.account-page a { text-decoration:underline; text-underline-offset:.2em; }
.community-person { display:flex; align-items:center; gap:.6rem; overflow-wrap:anywhere; }
.community-person img { width:32px; height:32px; border-radius:50%; }
.community-status { position:sticky; top:var(--header-h); z-index:45; margin:0; background:#111; color:var(--ink); padding:.7rem 1rem; }
.community-status:empty { display:none; }
.community-section { margin-top:3rem; padding:2rem 0; border-top:1px solid var(--line); }
.interaction-bar { display:flex; flex-wrap:wrap; gap:.5rem; margin:1rem 0; }
.community-section button, .account-page button { padding:.65rem .9rem; border:1px solid var(--line); background:#0b0b0b; color:var(--ink); font:inherit; cursor:pointer; }
.community-section button:hover, .account-page button:hover { border-color:var(--signal); }
.interaction-bar [aria-pressed="true"] { border-color:var(--signal); color:var(--signal); background:#1a0d0b; }
.community-section button:disabled, .account-page button:disabled { opacity:.55; cursor:wait; }
.comment-form label { display:grid; gap:.5rem; }
.comment-form button { margin-top:.7rem; }
.community-section textarea { display:block; width:100%; box-sizing:border-box; padding:1rem; background:#0b0b0b; color:var(--ink); border:1px solid var(--line); font:inherit; resize:vertical; }
.community-section textarea:focus-visible, .account-page button:focus-visible { outline:2px solid var(--signal); outline-offset:3px; }
.comment-card { margin-top:1.5rem; padding:1.5rem 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.comment-card time, .comment-meta { font-size:.75rem; color:var(--muted); }
.comment-body { white-space:pre-wrap; line-height:1.65; }
.comment-card > button { margin-right:.5rem; }
.account-page { max-width:850px; margin:3rem auto 5rem; }
.account-page > button, .account-page > a { display:inline-block; margin:.5rem .7rem .5rem 0; }
.account-page h1 { font-size:clamp(2.5rem,7vw,4rem); letter-spacing:-.05em; }
.account-page h2 { margin-top:2rem; }
.topic-preferences { margin:1.5rem 0; display:grid; gap:.7rem; }
.topic-preferences fieldset { border:1px solid var(--line); padding:.7rem 1rem 1rem; display:flex; flex-wrap:wrap; gap:1rem; }
.topic-preferences legend { font-weight:700; }
.topic-preferences label { display:flex; gap:.35rem; align-items:center; cursor:pointer; }
.topic-preferences input { accent-color:var(--signal); }
.saved-list a { font-size:1.15rem; font-weight:700; }
.account-page [hidden], .community-section [hidden] { display:none !important; }

/* Header auth shares the site's ember-to-amber accents. */
.header-actions { display:flex; align-items:center; gap:.65rem; min-width:0; }
.header-actions .header-join { display:inline-flex; min-height:44px; align-items:center; gap:.45rem; white-space:nowrap; border-color:var(--signal); background:var(--signal); color:var(--paper); }
.header-actions .header-join span { color:inherit; }
.header-actions .header-join:hover { background:var(--accent-gradient); }
.header-auth { position:relative; flex-shrink:0; }
.header-sign-in { display:inline-flex; min-height:40px; padding:.55rem .7rem; align-items:center; justify-content:center; gap:.5rem; border:1px solid #41352e; border-radius:.3rem; background:#101010; color:#d2bca7; font-size:.7rem; font-weight:650; line-height:1.3; cursor:pointer; transition:border-color 160ms ease, color 160ms ease; }
.header-sign-in:hover { color:var(--ink); border-color:#84603f; background:#191510; }
.header-sign-in:disabled { opacity:.65; cursor:wait; }
.community-icon { display:block; width:19px; height:19px; flex:none; }
.header-sign-in .community-icon { color:#cd9668; }
.account-avatar { position:relative; display:grid; width:44px; height:44px; padding:3px; place-items:center; border:1px solid transparent; border-radius:50%; background:linear-gradient(var(--paper),var(--paper)) padding-box, var(--accent-gradient) border-box; box-shadow:0 0 12px #e85d041f; cursor:pointer; transition:box-shadow 160ms ease; }
.account-avatar:hover, .account-avatar[aria-expanded="true"] { box-shadow:0 0 16px #e85d0440; }
.account-avatar img, .account-avatar__fallback { grid-area:1/1; width:36px; height:36px; border-radius:50%; object-fit:cover; }
.account-avatar img { z-index:1; }
.account-avatar__fallback { display:grid; place-items:center; background:#2c150e; color:#ffc78b; font-size:.85rem; font-weight:750; }
.account-menu { position:absolute; z-index:110; top:calc(100% + .7rem); right:0; width:216px; max-width:calc(100vw - 2rem); max-height:calc(100svh - var(--header-h) - 1.5rem); overflow-y:auto; padding:.45rem; border:1px solid #593321; border-radius:.7rem; background:#100e0c; box-shadow:0 16px 40px #0009, 0 0 22px #e85d040c; }
.account-menu[hidden] { display:none; }
.account-menu__item { display:flex; width:100%; min-height:44px; padding:.65rem .75rem; align-items:center; gap:.7rem; border:0; border-radius:.35rem; background:transparent; color:var(--ink); font:inherit; font-size:.8rem; font-weight:550; text-align:left; cursor:pointer; }
.account-menu__item .community-icon { width:18px; height:18px; color:#f6a657; }
.account-menu__item:hover, .account-menu__item:focus-visible { background:#291a12; }
.account-menu__item:focus-visible { outline:2px solid var(--orange); outline-offset:-2px; }
.account-menu__divider { height:3px; margin:.4rem .75rem; border-radius:2px; background:var(--accent-gradient); opacity:.75; }
.account-menu__logout, .account-menu__logout .community-icon { color:#d99289; }
.account-menu__logout:hover, .account-menu__logout:focus-visible { background:#2e1513; color:#ffc1b8; }
.account-menu__logout:disabled { opacity:.6; cursor:wait; }

/* One compact control set is used by feed stories, articles, and comments. */
.interaction-bar .interaction-action { display:inline-flex; min-width:44px; min-height:44px; padding:.55rem .7rem; align-items:center; justify-content:center; gap:.45rem; border:1px solid #35302a; border-radius:.4rem; background:#100e0b; color:var(--action-color); font-size:.8rem; font-weight:700; line-height:1; text-decoration:none; cursor:pointer; transition:background 150ms ease, border-color 150ms ease; }
.interaction-action--upvote { --action-color:#ff986b; }
.interaction-action--save { --action-color:#ffd064; }
.interaction-action--comments { --action-color:#87c9ee; }
.interaction-action--share { --action-color:#83d5b0; }
.interaction-bar .interaction-action:hover { border-color:var(--action-color); background:#211a12; }
.interaction-bar .interaction-action[aria-pressed="true"] { border-color:var(--action-color); background:#2a1b10; box-shadow:inset 0 0 0 1px #ffffff08; }
.interaction-action[aria-pressed="true"] .community-icon { fill:currentColor; fill-opacity:.2; }
.interaction-action--save[aria-pressed="true"] .community-icon { fill-opacity:.85; }
.interaction-bar .interaction-action[aria-disabled="true"] { opacity:.55; cursor:wait; }
.interaction-bar .interaction-action:focus-visible { outline:2px solid var(--action-color); outline-offset:3px; }
.interaction-count { min-width:.65rem; font-variant-numeric:tabular-nums; }
.interaction-bar--compact { margin:0 0 .95rem; gap:.4rem; }
.interaction-bar--compact .interaction-action { font-size:.72rem; }
.interaction-bar .interaction-retry { padding:.45rem; border:0; background:transparent; color:var(--muted); font:inherit; font-size:.7rem; text-decoration:underline; cursor:pointer; }
.account-page #profile, .account-page #alerts, .account-page #settings { scroll-margin-top:calc(var(--header-h) + 1.5rem); }
@media (max-width:1100px) {
  .header-actions { gap:.5rem; }
}
@media (max-width:620px) {
  .header-actions { gap:.45rem; }
  .header-sign-in { padding:.45rem .55rem; font-size:.66rem; }
  .site-header { gap:.45rem; }
  .menu-toggle { min-width:32px; min-height:44px; padding:.6rem .35rem; justify-content:center; }
  .menu-toggle > span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
}
@media (max-width:420px) {
  .header-sign-in .community-icon { display:none; }
  .header-sign-in span { max-width:4.7rem; }
  .header-actions .header-join { padding:.55rem; letter-spacing:.02em; }
}
@media (prefers-reduced-motion:reduce) {
  .header-sign-in, .account-avatar, .interaction-bar .interaction-action { transition:none; }
}

.comments-heading { display:flex; align-items:center; gap:.6rem; scroll-margin-top:calc(var(--header-h) + 1rem); }
.comments-heading__count { display:inline-flex; min-width:1.8rem; padding:.2rem .5rem; justify-content:center; border:1px solid #33424a; border-radius:.35rem; color:#87c9ee; font-size:.85rem; font-weight:650; font-variant-numeric:tabular-nums; }
.share-dialog { width:min(26rem, calc(100% - 2rem)); padding:1.3rem; border:1px solid #4a4038; border-radius:.65rem; background:#11100e; color:var(--ink); box-shadow:0 16px 60px #0009; }
.share-dialog::backdrop { background:#000a; }
.share-dialog h2 { margin:0 0 1.25rem; font-size:1.35rem; }
.share-dialog label { display:grid; gap:.5rem; color:var(--muted); font-size:.8rem; }
.share-dialog input { width:100%; min-width:0; padding:.7rem; border:1px solid var(--line); border-radius:.3rem; background:var(--paper); color:var(--ink); font:inherit; }
.share-dialog button { min-height:44px; padding:.6rem .8rem; border:1px solid #655142; border-radius:.3rem; background:#241b15; color:var(--ink); font:inherit; font-size:.8rem; cursor:pointer; }
.share-dialog__close { float:right; margin:-.35rem -.35rem .5rem .5rem; }
.share-dialog__copy { margin-top:.75rem; }
.share-dialog p { margin:.8rem 0 0; color:var(--muted); font-size:.8rem; }
