/* Lensable account — editorial dashboard on the site's parchment palette. */
:root {
  --paper: #f7f7f4;
  --paper-2: #f2f1ed;
  --paper-3: #e6e5e0;
  --surface: #ffffff;
  --text: #26251e;
  --text-2: #3a3931;
  --muted: rgba(38, 37, 30, 0.66);
  --faint: rgba(38, 37, 30, 0.45);
  --line: rgba(38, 37, 30, 0.10);
  --line-2: rgba(38, 37, 30, 0.06);
  --line-3: rgba(38, 37, 30, 0.19);
  --accent: #f54e00;
  --accent-deep: #b83b00;
  --accent-soft: rgba(245, 78, 0, 0.10);
  --signal: #245f75;
  --success: #2f6f49;
  --danger: #a53020;
  --danger-soft: rgba(165, 48, 32, 0.08);
  --shadow-1: 0 1px 2px rgba(38, 37, 30, 0.05);
  --shadow-2: 0 1px 2px rgba(38, 37, 30, 0.04), 0 14px 36px -24px rgba(38, 37, 30, 0.28);
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --editorial: "Fraunces", "Iowan Old Style", Georgia, serif;
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 42px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: rgba(245, 78, 0, 0.18); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.acc-shell { min-height: 100vh; display: flex; flex-direction: column; }
.acc-container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* Header and brand --------------------------------------------------------- */
.acc-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 244, 0.84);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
}
.acc-topbar-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
/* Tracking matches the landing header's wordmark (-0.01em), so the mark and the
   word beside it are both the same as the landing brand rather than only the mark. */
.brand .name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
/* Header mark — the landing page's implementation verbatim (index.html's
   .dot-mark rules plus the parchment-theme override that wins over them), so the
   topbar logo is the same mark here as on the landing header rather than a
   lookalike. The dark ink fill and the pulsing ring are both part of it. */
.dot-mark { position: relative; width: 9px; height: 9px; flex: none; }
.dot-mark i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #26251e;
  box-shadow: 0 0 0 1.5px rgba(38, 37, 30, 0.20);
}
.dot-mark::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(11, 12, 15, 0.45);
  animation: ring 2.6s ease-out infinite;
}
@keyframes ring {
  0%   { opacity: 0.6; transform: scale(0.55); }
  70%  { opacity: 0; transform: scale(1.7); }
  100% { opacity: 0; transform: scale(1.7); }
}

/* Footer mark — the globe used by the Terms/Services footer, sized by the same
   rule site.css gives it there. fill="currentColor" picks up this color. */
.brand-mark { width: 22px; height: 22px; flex: none; color: var(--text); }
/* 14px is the site's button-pair gap (.nav .nav-cta and .hero .cta-row both use
   it), and sitting inside the topbar's own 24px it reads as a pair rather than
   two unrelated controls. Without a gap Pricing and Log out render flush. */
.acc-primary-nav { display: flex; align-items: center; gap: 14px; }

/* Shared controls --------------------------------------------------------- */
.btn {
  min-height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--paper-3);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}
.btn:hover { background: #dcdbd3; }
.btn.solid { background: var(--text); color: var(--paper); }
.btn.solid:hover { background: var(--text-2); }
.btn.ghost { border-color: var(--line-3); background: transparent; }
.btn.ghost:hover { background: rgba(38, 37, 30, 0.05); }
.btn.danger { border-color: rgba(165, 48, 32, 0.25); background: transparent; color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { min-height: 34px; padding-inline: 14px; font-size: 13px; }
.btn[disabled] { opacity: .48; cursor: not-allowed; }

.acc-main { width: 100%; max-width: var(--maxw); margin-inline: auto; padding: 0 var(--gutter) clamp(64px, 9vh, 104px); flex: 1 0 auto; }
.acc-eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-family: var(--editorial);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.acc-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--line-3); }
.acc-muted { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* Boot and auth ----------------------------------------------------------- */
.acc-boot {
  min-height: 56vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.acc-spinner {
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--line-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: acc-spin .8s linear infinite;
}
@keyframes acc-spin { to { transform: rotate(360deg); } }

.acc-auth-wrap { max-width: 470px; margin: clamp(54px, 9vh, 96px) auto; }
.acc-auth-card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: clamp(26px, 5vw, 38px); box-shadow: var(--shadow-2); }
.acc-auth-card h1 { margin: 18px 0 0; font-size: clamp(1.8rem, 5vw, 2.35rem); font-weight: 450; letter-spacing: -.03em; line-height: 1.12; }
.acc-auth-sub { margin: 14px 0 24px; color: var(--muted); font-family: var(--serif); font-size: 1.12rem; line-height: 1.5; }
.acc-field-label { display: block; margin: 13px 0 6px; color: var(--text-2); font-size: 12px; font-weight: 600; }
.acc-field {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-3);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}
.acc-field:focus { border-color: var(--accent); }
.acc-auth-submit { width: 100%; margin-top: 18px; }
.acc-google { width: 100%; background: var(--surface); border-color: var(--line-3); }
.acc-google:hover { background: var(--paper-2); }
.acc-or { margin: 18px 0; display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.acc-or::before, .acc-or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.acc-swap { display: block; margin-top: 18px; color: var(--muted); font-size: 13.5px; text-align: center; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.acc-swap:hover { color: var(--text); text-decoration-color: var(--accent); }
.acc-auth-foot { margin: 18px auto 0; max-width: 44ch; color: var(--faint); font-size: 12.5px; line-height: 1.65; text-align: center; }
.acc-notice { margin: 0 0 18px; padding: 11px 13px; border: 1px solid rgba(47, 111, 73, .2); border-radius: 4px; background: rgba(47, 111, 73, .07); color: var(--success); font-size: 13px; }
.acc-err { min-height: 20px; margin-top: 10px; color: var(--danger); font-size: 13px; }
/* Inline logout failure, in the nav beside the button. Same --danger the auth
   form's error uses, sized to sit in a 64px topbar without changing its height. */
.ss-logout-error { color: var(--danger); font-size: 12.5px; margin-left: 10px; max-width: 30ch; }

/* Dashboard shell --------------------------------------------------------- */
.acc-page-head {
  padding: clamp(48px, 8vh, 82px) 0 38px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  border-bottom: 1px solid var(--line);
}
.acc-page-head h1 { margin: 18px 0 0; max-width: 18ch; font-size: clamp(2rem, 4.5vw, 3.15rem); font-weight: 400; letter-spacing: -.038em; line-height: 1.05; }
.acc-page-lede { margin: 18px 0 0; max-width: 58ch; color: var(--muted); font-family: var(--serif); font-size: clamp(1.08rem, 1.6vw, 1.22rem); line-height: 1.55; }
.acc-userline { margin: 0; flex: none; color: var(--faint); font-size: 12.5px; }
.acc-userline span { color: var(--text-2); }
.acc-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(30px, 4.5vw, 58px); align-items: start; padding-top: 42px; }
.acc-nav { position: sticky; top: 92px; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.acc-nav-item {
  position: relative;
  appearance: none;
  width: 100%;
  padding: 9px 12px 9px 16px;
  border: 0;
  background: none;
  color: var(--faint);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.acc-nav-item::before { content: ""; position: absolute; left: -1px; top: 7px; bottom: 7px; width: 2px; background: var(--accent); opacity: 0; transform: scaleY(.35); transition: opacity .2s ease, transform .2s ease; }
.acc-nav-item:hover { color: var(--text); }
.acc-nav-item.is-active { color: var(--text); font-weight: 650; }
.acc-nav-item.is-active::before { opacity: 1; transform: scaleY(1); }
.acc-content { min-width: 0; }

/* Existing account cards -------------------------------------------------- */
.acc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.acc-card { margin-bottom: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-1); }
.acc-label { margin-bottom: 8px; color: var(--faint); font-family: var(--editorial); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.acc-plan-name { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.acc-badge { display: inline-block; margin-top: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(47, 111, 73, .10); color: var(--success); font-size: 11px; }
.acc-remaining-num { font-size: 34px; font-weight: 680; letter-spacing: -.035em; }
.acc-bar { height: 7px; margin: 10px 0; overflow: hidden; border-radius: 999px; background: var(--paper-3); }
.acc-bar-fill { height: 100%; border-radius: inherit; background: var(--text); transition: width .3s ease; }
.acc-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 6px; }
.acc-plan-opt { padding: 14px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 6px; }
.acc-plan-opt-name { font-weight: 620; }
.acc-plan-opt-price { color: var(--faint); font-size: 13px; }
.acc-plan-opt .btn { margin-top: auto; }
.acc-balance { padding: 9px 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; border-bottom: 1px solid var(--line-2); }
.acc-balance:last-of-type { border-bottom: 0; }
.acc-balance-label, .acc-balance-value { font-size: 13.5px; }
.acc-balance-label { font-weight: 600; }
.acc-balance-value { text-align: right; }
.acc-balance-hint { grid-column: 1 / -1; color: var(--faint); font-size: 12px; }
.acc-saved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.acc-saved { overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.acc-saved-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper-2); }
.acc-saved-body { padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.acc-saved-title { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.acc-saved-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--faint); font-size: 12.5px; }
.acc-saved-price { color: var(--text); font-weight: 600; }
.acc-saved-actions { display: flex; gap: 8px; margin-top: 2px; }
.acc-saved-actions .btn { flex: 1; }
.acc-hist-controls { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acc-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.acc-hist-list { display: flex; flex-direction: column; }
.acc-hist-row { padding: 11px 0; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-2); }
.acc-hist-thumb { width: 44px; height: 44px; border-radius: 5px; object-fit: cover; background: var(--paper-2); }
.acc-hist-label { font-size: 14px; font-weight: 600; }

/* Honest request states --------------------------------------------------- */
.acc-loading, .acc-state { min-height: 230px; padding: 42px 24px; display: grid; place-items: center; align-content: center; gap: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: center; }
.acc-loading { color: var(--muted); font-size: 13.5px; }
.acc-loading .acc-spinner { margin-bottom: 4px; }
.acc-state-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--line-3); }
.acc-state.is-unavailable .acc-state-mark, .acc-state.is-error .acc-state-mark { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.acc-state-title, .acc-empty-title { font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.acc-state-body { max-width: 48ch; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.acc-state .btn { margin-top: 8px; }
.acc-empty { padding: 48px 20px; text-align: center; }

/* Saved Highlights -------------------------------------------------------- */
.acc-research-head { margin-bottom: 24px; }
.acc-research-head h2 { margin: 12px 0 0; font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.acc-research-intro { margin: 12px 0 0; max-width: 64ch; color: var(--muted); font-family: var(--serif); font-size: 1.08rem; line-height: 1.55; }
.acc-sync-note { margin: 12px 0 0; padding-left: 12px; border-left: 2px solid var(--accent); color: var(--faint); font-size: 12.5px; line-height: 1.55; }
.acc-research-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(270px, .72fr); gap: 18px; align-items: start; }
.acc-library-panel, .acc-summary-card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-1); }
.acc-library-controls { padding: 16px; border-bottom: 1px solid var(--line-2); background: #fbfaf7; }
.acc-filter-label { display: block; color: var(--text-2); font-size: 12px; font-weight: 600; }
.acc-filter-wrap { position: relative; margin-top: 7px; }
.acc-filter-icon { position: absolute; left: 11px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.acc-filter { width: 100%; min-height: 39px; padding: 8px 34px 8px 34px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); font-size: 13.5px; }
.acc-filter::-webkit-search-cancel-button { cursor: pointer; }
.acc-filter:focus { border-color: var(--accent); }
.acc-selection-bar { margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-selection-count { margin-right: auto; color: var(--faint); font-size: 12.5px; }
.acc-text-button { padding: 4px 2px; border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.acc-text-button:hover { color: var(--text); text-decoration-color: var(--accent); }
.acc-text-button[disabled] { opacity: .45; cursor: not-allowed; }
.acc-filter-result { padding: 10px 16px; border-bottom: 1px solid var(--line-2); color: var(--faint); font-size: 12px; }
.acc-highlight-list { display: flex; flex-direction: column; }
.acc-highlight-card { position: relative; padding: 18px 18px 17px 48px; border-bottom: 1px solid var(--line-2); transition: background .2s ease; }
.acc-highlight-card:last-child { border-bottom: 0; }
.acc-highlight-card:hover { background: #fdfcfa; }
.acc-highlight-card.is-selected { background: rgba(245, 78, 0, .035); }
.acc-highlight-card.is-deleting { opacity: .56; }
.acc-highlight-check { position: absolute; left: 18px; top: 20px; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.acc-highlight-check[disabled] { cursor: not-allowed; }
.acc-highlight-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.acc-highlight-source { min-width: 0; color: var(--text-2); font-size: 12.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-highlight-date { flex: none; color: var(--faint); font-family: var(--editorial); font-size: 11px; letter-spacing: .04em; }
.acc-highlight-text { margin: 12px 0 0; color: var(--text); font-family: var(--serif); font-size: 1.08rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.acc-highlight-text.is-clamped { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.acc-highlight-origin { margin-top: 8px; color: var(--faint); font-size: 11.5px; overflow-wrap: anywhere; }
.acc-highlight-actions { margin-top: 13px; display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.acc-source-link { color: var(--accent-deep); font-size: 12.5px; font-weight: 650; text-decoration: underline; text-decoration-color: rgba(184, 59, 0, .28); text-underline-offset: 3px; }
.acc-source-link:hover { text-decoration-color: var(--accent); }
.acc-highlight-error { margin-top: 10px; padding: 8px 10px; border-radius: 4px; background: var(--danger-soft); color: var(--danger); font-size: 12px; }
.acc-filter-empty { padding: 42px 20px; text-align: center; }
.acc-filter-empty strong { display: block; font-size: 15px; }
.acc-filter-empty span { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }

.acc-summary-card { position: sticky; top: 92px; overflow: hidden; }
.acc-summary-head { padding: 20px 20px 17px; border-bottom: 1px solid var(--line-2); background: linear-gradient(180deg, #fdfcfa, #faf9f5); }
.acc-summary-kicker { color: var(--accent); font-family: var(--editorial); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.acc-summary-head h3 { margin: 10px 0 0; font-size: 17px; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; }
.acc-summary-body { min-height: 214px; padding: 19px 20px; display: flex; flex-direction: column; }
.acc-summary-copy { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.acc-summary-result { margin: 0; color: var(--text); font-family: var(--serif); font-size: 1.12rem; line-height: 1.58; white-space: pre-wrap; overflow-wrap: anywhere; }
.acc-summary-meta { margin-top: 14px; color: var(--faint); font-size: 11.5px; }
.acc-summary-disclosure { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); color: var(--faint); font-size: 11.5px; line-height: 1.55; }
.acc-summary-actions { margin-top: auto; padding-top: 18px; display: flex; gap: 8px; }
.acc-summary-actions .btn { width: 100%; }
.acc-summary-progress { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.acc-summary-progress .acc-spinner { width: 15px; height: 15px; }
.acc-summary-error { color: var(--danger); font-size: 13px; line-height: 1.55; }

/* Toast and footer -------------------------------------------------------- */
.acc-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 80;
  max-width: min(92vw, 560px);
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 5px;
  background: var(--text);
  color: var(--paper);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity .2s ease, transform .2s ease;
}
.acc-toast.show { opacity: 1; transform: translate(-50%, 0); }
.acc-toast.err { background: #6e2419; }
.acc-footer { margin-top: auto; border-top: 1px solid var(--line); }
.acc-footer-inner { min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--faint); font-size: 12.5px; }
.acc-footer p { margin: 0; }
.acc-footer a { color: var(--muted); text-decoration: none; }
.acc-footer a:hover { color: var(--text); }

.acc-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 980px) {
  .acc-page-head { align-items: flex-start; flex-direction: column; gap: 18px; }
  .acc-layout { grid-template-columns: 170px minmax(0, 1fr); gap: 28px; }
  .acc-research-layout { grid-template-columns: minmax(0, 1fr); }
  .acc-summary-card { position: static; }
}

@media (max-width: 720px) {
  .acc-main { padding-bottom: 60px; }
  .acc-page-head { padding-top: 42px; }
  .acc-layout { grid-template-columns: minmax(0, 1fr); padding-top: 28px; }
  .acc-nav { position: static; flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
  .acc-nav-item { width: auto; flex: none; padding: 10px 13px 12px; white-space: nowrap; }
  .acc-nav-item::before { left: 8px; right: 8px; top: auto; bottom: -1px; width: auto; height: 2px; transform: scaleX(.35); }
  .acc-nav-item.is-active::before { transform: scaleX(1); }
  .acc-row { grid-template-columns: minmax(0, 1fr); }
  .acc-hist-controls { align-items: flex-start; flex-direction: column; }
  .acc-footer-inner { padding-block: 24px; align-items: flex-start; flex-direction: column; justify-content: center; }
}

@media (max-width: 480px) {
  .acc-topbar-inner { height: 58px; }
  .acc-auth-wrap { margin-top: 34px; }
  .acc-auth-card { padding: 24px 20px; }
  .acc-library-controls { padding: 14px; }
  .acc-highlight-card { padding: 16px 14px 16px 43px; }
  .acc-highlight-check { left: 15px; top: 18px; }
  .acc-highlight-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
  .acc-summary-head, .acc-summary-body { padding-inline: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* For You — masonry knowledge feed ----------------------------------------
   Card language ported from the marketing "Follow" / "A brief, not a feed"
   sections: white cards on parchment, fine rules, small-caps labels, muted
   provenance rows, and the accent reserved for genuine signal. */
.acc-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.acc-feed-head { margin-bottom: 24px; }
.acc-feed-head h2 { margin: 12px 0 0; font-family: var(--editorial); font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.acc-feed-intro { margin: 12px 0 0; max-width: 64ch; color: var(--muted); font-family: var(--serif); font-size: 1.08rem; line-height: 1.55; }

.acc-feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.acc-feed[data-columns="1"] { grid-template-columns: minmax(0, 1fr); }
.acc-feed-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* Topic cluster — a grouping frame, not a card. It stays visually quieter than
   the update cards it holds: no surface fill and no border, so the cards remain
   the objects on the page and the parchment ground still reads through. */
.acc-fcluster { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.acc-fcluster-head { display: flex; flex-direction: column; gap: 2px; }
.acc-fcluster-name { margin: 0; font-family: var(--editorial); font-size: 1.12rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.25; }
.acc-fcluster-meta { margin: 0; font-size: 12.5px; color: var(--faint); }
.acc-fcluster-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.acc-fcluster-more { margin: 0; font-size: 12.5px; color: var(--faint); }

.acc-fcard {
  position: relative; min-width: 0; padding: 18px 20px 16px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  box-shadow: var(--shadow-1); transition: box-shadow .2s ease, border-color .2s ease;
}
.acc-fcard:hover { box-shadow: var(--shadow-2); }
.acc-fcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.acc-fcard.is-unread { border-color: var(--line-3); }
.acc-fcard.is-brief { background: linear-gradient(var(--paper-2) 0 74px, var(--surface) 74px); }

.acc-fcard-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.acc-fcard-topic { font-size: 12px; font-weight: 650; letter-spacing: .01em; }
.acc-fcard-time { font-family: var(--serif); font-size: 12.5px; color: var(--faint); white-space: nowrap; }

.acc-fcard-unread { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--signal); }
.acc-fcard-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); flex: none; }

.acc-fcard-headrow { display: flex; gap: 9px; margin-top: 18px; }
.acc-fcard-bullet { width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--line-3); flex: none; }
.acc-fcard-bullet.is-hot { background: var(--signal); }
.acc-fcard-title { margin: 0; font-size: 15.5px; font-weight: 650; letter-spacing: -.018em; line-height: 1.36; }

.acc-fcard-body { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.62; }
.acc-fcard-body.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Serif is reserved for the user's own saved words. */
.acc-fcard-quote { margin: 12px 0 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--accent); font-family: var(--serif); font-size: 1.06rem; line-height: 1.5; }
.acc-fcard-quotemeta { margin: 8px 0 0; font-size: 11.5px; color: var(--faint); }

.acc-fcard-label { margin: 14px 0 0; font-size: 10.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.acc-fcard-sources { margin: 5px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1px; }
/* inline-block + min-height keeps the tap target >= 24px while still letting a
   long title wrap normally. */
.acc-fcard-source { display: inline-block; min-height: 24px; padding: 3px 0; font-size: 12.5px; line-height: 1.45; color: var(--text-2); text-decoration: none; }
/* Sources stay muted. The accent is reserved for signal — the contradiction
   bullet and the unread marker — so a card with five citations does not read
   as five alarms. */
a.acc-fcard-source { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
a.acc-fcard-source:hover { color: var(--accent-deep); text-decoration-color: var(--accent); }

.acc-fcard-why { display: flex; align-items: flex-start; gap: 8px; margin: 13px 0 0; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 11.5px; line-height: 1.5; color: var(--faint); }

.acc-fcard-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.acc-fcard-readmark { font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }

.acc-feed-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.acc-feed-count { margin: 0; font-size: 12.5px; color: var(--faint); }

@media (max-width: 720px) {
  .acc-feed { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .acc-feed-col { gap: 14px; }
  .acc-fcluster-body { gap: 14px; }
  .acc-fcard { padding: 16px 16px 14px; }
  .acc-feed-foot { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .acc-fcard { transition: none; }
}

/* Interests — explicit follows ---------------------------------------------
   White topic rows on parchment, fine rules, compact muted metadata. The
   filled pill marks an active follow; the accent is reserved for focus and
   genuine status, never decoration. */
.acc-interests-head { margin-bottom: 24px; }
.acc-interests-head h2 { margin: 12px 0 0; font-family: var(--editorial); font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.acc-interests-intro { margin: 12px 0 0; max-width: 64ch; color: var(--muted); font-family: var(--serif); font-size: 1.08rem; line-height: 1.55; }

.acc-interests-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.acc-interests-count { margin: 0; font-size: 12.5px; color: var(--faint); }
/* Describes every cadence select in the frame; one instance, referenced by
   aria-describedby, so it reads once on screen and once to a screen reader. */
.acc-cadence-help { margin: 12px 0 0; max-width: 68ch; font-size: 12px; line-height: 1.5; color: var(--faint); }

.acc-irow-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.acc-irow { padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-1); }
.acc-irow:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.acc-irow.is-muted { background: var(--paper-2); }
.acc-irow-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acc-irow-label { margin: 0; font-size: 15.5px; font-weight: 650; letter-spacing: -.018em; }
.acc-irow-pill { flex: none; padding: 4px 12px; border-radius: 999px; background: var(--text); color: var(--paper); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.acc-irow-pill.is-muted { background: transparent; color: var(--faint); border: 1px solid var(--line-3); }
.acc-irow-meta { margin: 8px 0 0; font-size: 12px; color: var(--faint); }
.acc-irow-desc { margin: 8px 0 0; max-width: 62ch; font-size: 13px; line-height: 1.55; color: var(--muted); }
.acc-irow-error { margin-top: 10px; font-size: 12.5px; color: var(--danger); }

.acc-irow-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.acc-irow-buttons { display: flex; align-items: center; gap: 14px; }
.acc-irow-cadence { display: flex; flex-direction: column; gap: 5px; }
.acc-irow-rename { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.acc-irow-renameacts { display: flex; gap: 14px; margin-top: 8px; }

.acc-select { min-height: 34px; padding: 6px 10px; border: 1px solid var(--line-3); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 13px; }
.acc-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.acc-add-form { width: 100%; max-width: 520px; margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.acc-add-cadence { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; }
.acc-add-preview { margin-top: 12px; padding: 12px 14px; border-left: 2px solid var(--accent); background: var(--paper-2); border-radius: 0 6px 6px 0; }
.acc-add-preview-label { margin: 0; font-size: 10.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.acc-add-preview-name { margin: 6px 0 0; font-size: 14.5px; font-weight: 650; }
.acc-add-preview-desc { margin: 6px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.acc-add-preview-note { margin: 8px 0 0; font-size: 11.5px; color: var(--faint); }
.acc-add-error { margin: 12px 0 0; font-size: 12.5px; color: var(--danger); }
.acc-add-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }

@media (max-width: 720px) {
  .acc-interests-bar { flex-direction: column; align-items: flex-start; }
  .acc-irow-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
  .acc-add-form { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .acc-irow { transition: none; }
}

/* Briefs — the period document ---------------------------------------------
   Ported from the marketing "A brief, not a feed" section: a tinted header
   band, small-caps section labels, fine rules between sections, and a compact
   right rail of stat and principle cards. */
.acc-briefs-head { margin-bottom: 24px; }
.acc-briefs-head h2 { margin: 12px 0 0; font-family: var(--editorial); font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.acc-briefs-intro { margin: 12px 0 0; max-width: 64ch; color: var(--muted); font-family: var(--serif); font-size: 1.08rem; line-height: 1.55; }

.acc-brief-layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(240px, 1fr); gap: 18px; align-items: start; }
.acc-brief-main { min-width: 0; }

.acc-brief-switch-list { display: flex; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; overflow-x: auto; }
.acc-brief-tab { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); cursor: pointer; text-align: left; white-space: nowrap; }
.acc-brief-tab:hover { color: var(--text); }
.acc-brief-tab.is-active { border-color: var(--line-3); background: var(--text); color: var(--paper); }
.acc-brief-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acc-brief-tab-topic { font-size: 13px; font-weight: 650; letter-spacing: -.01em; }
.acc-brief-tab-meta { font-size: 11px; opacity: .78; }

.acc-doc { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.acc-doc:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.acc-doc-band { padding: 20px 24px 18px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.acc-doc-kicker { margin: 0; font-size: 10.5px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.acc-doc-headline { margin: 12px 0 0; font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 600; letter-spacing: -.024em; line-height: 1.22; }
.acc-doc-sub { margin: 9px 0 0; font-size: 12.5px; color: var(--muted); }
.acc-doc-unread { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-deep); }
.acc-doc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

.acc-doc-sec { padding: 20px 24px; border-bottom: 1px solid var(--line-2); }
.acc-doc-sec:last-child { border-bottom: 0; }
.acc-doc-label { margin: 0; font-size: 10.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.acc-doc-body { margin: 10px 0 0; max-width: 68ch; font-size: 14px; line-height: 1.68; color: var(--text-2); }
.acc-doc-sources { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1px; }
.acc-doc-source { display: inline-block; min-height: 24px; padding: 3px 0; font-size: 12.5px; line-height: 1.45; color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
a.acc-doc-source:hover { color: var(--accent-deep); text-decoration-color: var(--accent); }
.acc-doc-source-date { font-size: 11.5px; color: var(--faint); }
.acc-doc-actions { display: flex; align-items: center; gap: 14px; padding: 14px 24px 16px; border-top: 1px solid var(--line); }
.acc-doc-readmark { font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }

.acc-brief-rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 92px; }
.acc-rail-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.acc-rail-card h4 { margin: 8px 0 0; font-size: 14.5px; font-weight: 650; letter-spacing: -.015em; }
.acc-rail-kicker { margin: 0; font-size: 10.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.acc-rail-body { margin: 9px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.acc-statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 14px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.acc-stat { padding: 12px 13px; background: var(--surface); }
.acc-stat-v { font-size: 21px; font-weight: 650; letter-spacing: -.028em; }
.acc-stat-l { margin-top: 2px; font-size: 11px; color: var(--faint); }

@media (max-width: 720px) {
  .acc-brief-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .acc-brief-rail { position: static; }
  .acc-doc-band { padding: 16px 16px 14px; }
  .acc-doc-sec { padding: 16px; }
  .acc-doc-actions { padding: 12px 16px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .acc-brief-tab { transition: none; }
}

/* Briefs — topic sections inside a period document -------------------------
   The grouping is presentation only: each topic keeps its own prose and
   citations, separated by a rule rather than merged. */
.acc-topic-brief { padding: 18px 24px 4px; border-bottom: 1px solid var(--line); }
.acc-topic-brief:last-child { border-bottom: 0; }
.acc-topic-brief.is-unread { background: linear-gradient(90deg, var(--accent-soft) 0 2px, transparent 2px); }
.acc-topic-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acc-topic-name { margin: 0; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); }
.acc-topic-headline { margin: 8px 0 0; font-size: 15.5px; font-weight: 650; letter-spacing: -.018em; line-height: 1.34; }
.acc-topic-brief .acc-doc-sec { padding: 14px 0; border-bottom: 0; }
.acc-topic-brief .acc-doc-sec:first-of-type { padding-top: 12px; }
.acc-topic-brief .acc-doc-actions { padding: 8px 0 14px; border-top: 0; }
@media (max-width: 720px) {
  .acc-topic-brief { padding: 16px 16px 4px; }
}
