/* =========================================================
   LOF-LY · 设计系统 v2 (Apple-style, May 2026)
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* 背景 */
  --bg-page: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-soft: #fafafa;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-active: rgba(0, 0, 0, 0.06);
  --bg-accent-soft: rgba(0, 113, 227, 0.08);
  --bg-accent-softer: rgba(0, 113, 227, 0.04);
  --bg-nav: rgba(255, 255, 255, 0.78);

  /* 文字 */
  --ink-1: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #a1a1a6;

  /* 强调 */
  --accent: #0071e3;
  --accent-strong: #0066cc;
  --accent-hover: #0077ed;

  /* 分隔线 */
  --line: rgba(0, 0, 0, 0.08);
  --line-soft: rgba(0, 0, 0, 0.05);
  --line-strong: rgba(0, 0, 0, 0.14);

  /* 涨跌（A 股口径） */
  --up: #e02d2d;
  --down: #00875a;
  --warn: #b42318;

  /* 阴影（两档） */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.06), 0 16px 32px rgba(0, 0, 0, 0.08);
  --scrollbar: rgba(0, 0, 0, 0.18);

  /* 几何 */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --radius-pill: 999px;

  /* 动画 */
  --ease: cubic-bezier(0.32, 0.72, 0.32, 1);
  --t-fast: 150ms;
  --t-base: 220ms;

  /* 字体（Inter 优先；中文用 PingFang） */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular",
    Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #101114;
    --bg-card: #1c1c1e;
    --bg-card-soft: #242426;
    --bg-hover: rgba(255, 255, 255, 0.07);
    --bg-active: rgba(255, 255, 255, 0.1);
    --bg-accent-soft: rgba(41, 151, 255, 0.16);
    --bg-accent-softer: rgba(41, 151, 255, 0.08);
    --bg-nav: rgba(28, 28, 30, 0.78);

    --ink-1: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #6e6e73;

    --accent: #2997ff;
    --accent-strong: #5eb0ff;
    --accent-hover: #147ce5;

    --line: rgba(255, 255, 255, 0.12);
    --line-soft: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.2);

    --up: #ff453a;
    --down: #30d158;
    --warn: #ff6961;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.28), 0 12px 28px rgba(0, 0, 0, 0.22);
    --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.32);
    --scrollbar: rgba(255, 255, 255, 0.22);
  }
}

/* ---------- 2. Reset / Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink-1);
  background: var(--bg-page);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  animation: page-fade 280ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@keyframes page-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

a:focus-visible, button:focus-visible, .button-link:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.28);
}

a:focus, button:focus { outline: none; }

.chip:focus-visible,
.sort-button:focus-visible,
.sort-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; display: block; }

/* ---------- 3. Layout ---------- */
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 64px;
}

.flash {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 3000;
  width: min(620px, calc(100vw - 32px));
  padding: 24px 56px 24px 26px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 2px solid var(--accent);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24), 0 0 0 9999px rgba(20, 24, 31, 0.22);
  color: var(--ink-1);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  transform: translate(-50%, -50%);
}

.flash p {
  margin: 0;
}

.flash-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1;
}

.flash-close:hover {
  background: rgba(0, 0, 0, 0.06);
  box-shadow: none;
}

.error, .bad { color: var(--warn); }
.ok { color: var(--down); }
.danger-text { color: var(--up); font-weight: 500; }
.profit-up { color: var(--up); font-weight: 500; }
.profit-down { color: var(--down); font-weight: 500; }

/* ---------- 4. Top Nav (sticky, blurred) ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 12px 20px;
  margin: 0 0 20px;
  background: var(--bg-nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar::after { display: none; }

.brand-block {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  margin: 0;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.022em;
  color: var(--ink-1);
  line-height: 1.2;
}

.brand-subtitle {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
}

.brand-channel-note { display: none; }

nav {
  display: flex;
  gap: 2px;
  align-items: center;
}

nav a {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  background: transparent;
  border: 0;
  transition: background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

nav a:hover {
  background: var(--bg-hover);
  color: var(--ink-1);
}

nav a.active {
  background: var(--bg-active);
  color: var(--ink-1);
  font-weight: 500;
}

.topbar-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.topbar-account.active,
.topbar-account:hover {
  border-color: var(--accent);
  background: var(--bg-accent-soft);
  color: var(--accent);
}

/* ---------- 5. Buttons ---------- */
.btn, button, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    filter var(--t-fast) var(--ease);
}

.btn:hover, button:hover, .button-link:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.18);
}

.btn:active, button:active, .button-link:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.button-link.button-link-soft,
.btn-soft {
  background: var(--bg-accent-soft);
  color: var(--accent);
  box-shadow: none;
}

.button-link.button-link-soft:hover,
.btn-soft:hover {
  background: rgba(0, 113, 227, 0.14);
  color: var(--accent-strong);
  box-shadow: none;
}

.button-link.button-link-ghost {
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink-1);
  box-shadow: none;
}

.button-link.button-link-ghost:hover {
  border-color: var(--accent);
  background: var(--bg-accent-soft);
  color: var(--accent);
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--ink-1);
  border-color: var(--line-strong);
  box-shadow: none;
}

button.danger { background: var(--warn); }
button.danger:hover { background: #931d12; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
}

.refresh-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: var(--bg-accent-soft);
  color: var(--accent);
  border: 0;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
    transform var(--t-base) var(--ease),
    color var(--t-fast) var(--ease);
  box-shadow: none;
}

.refresh-btn:hover {
  background: rgba(0, 113, 227, 0.14);
  color: var(--accent-strong);
  box-shadow: none;
}

.refresh-btn:active { transform: scale(0.96); }
.refresh-btn .lucide { width: 16px; height: 16px; }

.refresh-btn.is-loading {
  pointer-events: none;
  opacity: 0.72;
}

.refresh-btn.is-loading .lucide {
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow-1);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--bg-accent-soft);
  color: var(--accent-strong);
}

.back-to-top .lucide {
  width: 18px;
  height: 18px;
}

[data-clipboard] {
  min-width: 5.5em;
  text-align: center;
}

.copy-label { pointer-events: none; }

.copy-flash {
  animation: copy-pulse 700ms var(--ease);
}

@keyframes copy-pulse {
  0%   { transform: scale(1);    background: var(--down); color: #fff; }
  50%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ---------- 6. Cards / Panels ---------- */
.panel, .auth-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 24px;
  margin-bottom: 16px;
  position: relative;
}

.panel::after, .auth-card::after { display: none; }

.home-arbitrage-panel.panel-primary { padding: 20px 24px 22px; }
.home-initial-screen {
  display: grid;
  gap: 10px;
  margin: 2px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card-soft);
}
.home-initial-screen h4,
.home-initial-screen p { margin: 0; }
.home-initial-screen-list { display: grid; gap: 8px; }
.home-initial-screen-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.5fr) minmax(0, 1.5fr);
  gap: 8px 14px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.home-initial-screen-item > div { min-width: 0; }
.home-initial-screen-item > div:first-child,
.home-initial-screen-item > div:last-child { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.home-initial-screen-item > div:first-child span,
.home-initial-screen-item > div:last-child span,
.home-initial-screen > p { color: var(--ink-2); font-size: 12px; }

.contact-panel.panel-secondary { padding: 20px 24px; background: var(--bg-card); }
.contact-panel.contact-panel-compact { padding: 18px 22px; }

.auth-card { max-width: 420px; margin: 80px auto 0; padding: 28px; }

.panel > .table-wrap,
.panel .money-bond-table-wrap,
.panel .broker-public-preview {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.panel .doc-card {
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.panel .doc-card:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

/* ---------- 7. Section Heads ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: 0;
}

.section-head.section-head-split { display: flex; }
.section-head.section-head-compact { margin-bottom: 12px; }

.section-head h2, .section-head h3 {
  margin: 0;
  color: var(--ink-1);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.25;
}

.section-head h2 { font-size: 22px; }
.section-head h3 { font-size: 17px; }

.section-head p {
  margin: 4px 0 0;
  max-width: 60ch;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

.subhead, .eyebrow { display: none; }

/* ---------- 8. Chip Row (status / filter) ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--ink-1);
  font-size: 13px;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
  user-select: none;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chip.chip-static {
  background: transparent;
  border: 0;
  cursor: default;
  gap: 4px;
  padding: 0;
  color: var(--ink-2);
  font-size: 12px;
}

.chip.chip-static:hover {
  color: var(--ink-2);
}

.chip.chip-static + .chip.chip-static::before {
  content: "·";
  margin-right: 2px;
  color: var(--ink-3);
}

.chip.chip-static.chip-live::before {
  display: none;
}

.chip .chip-label { color: var(--ink-2); font-weight: 400; }
.chip.active .chip-label { color: rgba(255, 255, 255, 0.85); }
.chip .chip-value { color: var(--ink-1); font-weight: 500; }
.chip.active .chip-value { color: #fff; }

.chip-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--down);
  box-shadow: 0 0 0 3px rgba(0, 135, 90, 0.18);
}

/* ---------- 9. Editorial / Terminal Strip (legacy → chip-style) ---------- */
.editorial-strip,
.terminal-summary,
.terminal-summary.terminal-summary-compact,
.editorial-strip.editorial-strip-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  grid-template-columns: none;
}

.home-arbitrage-panel .editorial-strip.editorial-strip-inline,
.home-arbitrage-panel .editorial-strip.editorial-strip-inline.editorial-strip-subtle {
  margin: 14px 0 0;
  background: transparent;
  border: 0;
}

.editorial-strip article,
.terminal-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-hover);
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--ink-1);
}

.editorial-strip span,
.terminal-stat span,
.terminal-stat.terminal-stat-subtle span,
.editorial-strip-inline span {
  display: inline;
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

.editorial-strip strong,
.terminal-stat strong,
.terminal-stat.terminal-stat-subtle strong,
.editorial-strip-inline strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-1);
  letter-spacing: 0;
  font-family: var(--font-sans);
}

.strip-action {
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
}

.strip-action .button-link,
.editorial-strip .button-link,
.editorial-strip-inline .button-link {
  padding: 5px 12px;
  font-size: 12px;
}

/* ---------- 10. Metric numbers (Inline strip) ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.metric-card {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-card-soft);
  border: 1px solid var(--line-soft);
  box-shadow: none;
  transition: border-color var(--t-base) var(--ease),
    background-color var(--t-base) var(--ease);
}

.metric-card:hover {
  background: var(--bg-hover);
  border-color: var(--line);
  transform: none;
  box-shadow: none;
}

.metric-card span {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.022em;
  font-family: var(--font-sans);
  line-height: 1.2;
}

/* ---------- 11. Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.table-wrap[data-table-hint]::before {
  content: attr(data-table-hint);
  position: sticky;
  left: 100%;
  top: 8px;
  z-index: 4;
  display: none;
  float: right;
  margin: 8px 10px -30px 0;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-accent-soft);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.5;
  pointer-events: none;
  white-space: nowrap;
}

.table-wrap.is-scrollable[data-table-hint]::before {
  display: block;
}

.table-wrap.is-scrolled-end::before {
  opacity: 0;
}

.arbitrage-table-panel .table-wrap[data-table-hint]::before { display: none; }

.table-wrap.table-wrap-compact,
.table-wrap.table-wrap-wide,
.table-wrap.table-wrap-elevated {
  border-radius: var(--radius);
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  font-variant-numeric: tabular-nums;
  min-width: 720px;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--line-soft);
}

th {
  color: var(--ink-2);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  background: var(--bg-card);
}

td { font-variant-numeric: tabular-nums; color: var(--ink-1); }

tbody tr {
  transition: background-color var(--t-fast) var(--ease);
}

tbody tr:hover { background: var(--bg-accent-softer); }

/* Remove zebra striping globally */
table:not(.arbitrage-table):not(.futures-recommend-table) tbody tr:nth-child(even) {
  background: transparent;
}

table:not(.arbitrage-table):not(.futures-recommend-table) tbody tr:nth-child(even):hover {
  background: var(--bg-accent-softer);
}

tbody tr:last-child td { border-bottom: 0; }

/* ---------- 12. Sort Buttons ---------- */
.sort-button, .sort-toggle {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--ink-2);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
  box-shadow: none;
}

.sort-button:hover, .sort-toggle:hover {
  border-color: var(--accent);
  background: var(--bg-accent-soft);
  color: var(--accent);
  transform: none;
  box-shadow: none;
}

.sort-button[data-active="asc"],
.sort-button[data-active="desc"],
.sort-toggle[data-active="asc"],
.sort-toggle[data-active="desc"] {
  border-color: var(--accent);
  background: var(--bg-accent-soft);
  color: var(--accent);
  box-shadow: none;
}

.sort-glyph {
  position: relative;
  display: block;
  width: 9px;
  height: 12px;
}

.sort-glyph::before,
.sort-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: 0.4;
}

.sort-glyph::before { top: 0;    border-bottom: 5px solid currentColor; }
.sort-glyph::after  { bottom: 0; border-top:    5px solid currentColor; }

.sort-button[data-active="asc"] .sort-glyph::after,
.sort-button[data-active="desc"] .sort-glyph::before { opacity: 0.18; }
.sort-button[data-active="asc"] .sort-glyph::before,
.sort-button[data-active="desc"] .sort-glyph::after  { opacity: 1; }

.sortable-th {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: max-content;
  white-space: nowrap;
}

.th-label { display: inline-block; }
.inline-sort { flex: 0 0 auto; vertical-align: middle; }

/* ---------- 13. Arbitrage Table (the big one) ---------- */
.arbitrage-table {
  --sticky-favorite-width: 48px;
  --sticky-name-width: 160px;
  --sticky-code-width: 84px;
  width: 1414px;
  min-width: 1414px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.arbitrage-table th,
.arbitrage-table td {
  box-sizing: border-box;
  padding: 10px 8px;
  font-size: 13px;
  white-space: nowrap;
}

.arbitrage-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-1);
}

.arbitrage-table td:nth-child(3),
.arbitrage-table td:nth-child(4),
.arbitrage-table td:nth-child(6),
.arbitrage-table td:nth-child(7),
.arbitrage-table td:nth-child(8),
.arbitrage-table td:nth-child(9),
.arbitrage-table td:nth-child(10),
.arbitrage-table td:nth-child(11),
.arbitrage-table td:nth-child(12) {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0;
}

.arbitrage-table td:nth-child(4),
.arbitrage-table td:nth-child(6),
.arbitrage-table td:nth-child(7),
.arbitrage-table td:nth-child(8),
.arbitrage-table td:nth-child(9),
.arbitrage-table td:nth-child(10),
.arbitrage-table td:nth-child(11),
.arbitrage-table td:nth-child(12) {
  text-align: right;
}

.arbitrage-table th:nth-child(4),
.arbitrage-table th:nth-child(6),
.arbitrage-table th:nth-child(7),
.arbitrage-table th:nth-child(8),
.arbitrage-table th:nth-child(9),
.arbitrage-table th:nth-child(10),
.arbitrage-table th:nth-child(11),
.arbitrage-table th:nth-child(12) {
  text-align: right;
}

.arbitrage-table th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
  overflow: visible;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.arbitrage-table th:nth-child(1),
.arbitrage-table td:nth-child(1),
.arbitrage-table th:nth-child(2),
.arbitrage-table td:nth-child(2),
.arbitrage-table th:nth-child(3),
.arbitrage-table td:nth-child(3) {
  position: sticky;
  background: var(--bg-card);
  z-index: 2;
}

.arbitrage-table th:nth-child(1),
.arbitrage-table td:nth-child(1) {
  left: 0;
  width: var(--sticky-favorite-width);
  text-align: center;
  box-shadow: 1px 0 0 var(--line-soft);
}

.arbitrage-table th:nth-child(2),
.arbitrage-table td:nth-child(2) {
  left: var(--sticky-favorite-width);
  width: var(--sticky-name-width);
  box-shadow: 1px 0 0 var(--line-soft);
}

.arbitrage-table th:nth-child(3),
.arbitrage-table td:nth-child(3) {
  left: calc(var(--sticky-favorite-width) + var(--sticky-name-width));
  width: var(--sticky-code-width);
  box-shadow: 1px 0 0 var(--line);
}

.arbitrage-table thead th:nth-child(1),
.arbitrage-table thead th:nth-child(2),
.arbitrage-table thead th:nth-child(3) { z-index: 3; }

.arbitrage-table th:nth-child(4), .arbitrage-table td:nth-child(4)   { width: 136px; }
.arbitrage-table th:nth-child(5), .arbitrage-table td:nth-child(5)   { width: 108px; }
.arbitrage-table th:nth-child(6), .arbitrage-table td:nth-child(6)   { width: 118px; }
.arbitrage-table th:nth-child(7), .arbitrage-table td:nth-child(7)   { width: 126px; }
.arbitrage-table th:nth-child(8), .arbitrage-table td:nth-child(8),
.arbitrage-table th:nth-child(9), .arbitrage-table td:nth-child(9),
.arbitrage-table th:nth-child(11), .arbitrage-table td:nth-child(11) { width: 88px; }
.arbitrage-table th:nth-child(10), .arbitrage-table td:nth-child(10) { width: 104px; }
.arbitrage-table th:nth-child(12), .arbitrage-table td:nth-child(12) { width: 76px; }
.arbitrage-table th:nth-child(13), .arbitrage-table td:nth-child(13) { width: 86px; }
.arbitrage-table th:nth-child(14), .arbitrage-table td:nth-child(14) { width: 104px; }

.arbitrage-table tbody tr { position: relative; }
.arbitrage-table tbody tr:hover { background: var(--bg-accent-softer); }
.arbitrage-table tbody tr:hover td { background: var(--bg-accent-softer); }
.arbitrage-table tbody tr:hover td:nth-child(1),
.arbitrage-table tbody tr:hover td:nth-child(2),
.arbitrage-table tbody tr:hover td:nth-child(3) { background: var(--bg-accent-softer); }

.lof-mobile-sort-controls { display: none; }

.lof-mobile-sort-controls {
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.lof-mobile-sort-label,
.lof-mobile-sort-status { color: var(--ink-3); font-size: 12px; font-weight: 700; }
.lof-mobile-sort-status { margin-left: auto; }
.lof-mobile-sort-button,
.lof-mobile-sort-reset {
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}
.lof-mobile-sort-reset { color: var(--accent); }

.arbitrage-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
}

.arbitrage-view-tabs[hidden] {
  display: none;
}

.arbitrage-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-2);
  font: 700 14px/1 var(--font-sans);
  cursor: pointer;
}

.arbitrage-view-tab span {
  color: var(--ink-3);
  font-size: 12px;
}

.arbitrage-view-tab.is-active {
  background: var(--bg-card);
  color: var(--ink-1);
  box-shadow: var(--shadow-soft);
}

.arbitrage-empty-state {
  margin: -2px 0 14px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  color: var(--ink-2);
  font-weight: 600;
}

.arbitrage-empty-state[hidden] {
  display: none;
}

.closed-fund-view {
  display: grid;
  gap: 12px;
}

.closed-fund-view[hidden] { display: none; }

.closed-fund-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.closed-fund-head strong {
  display: block;
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.4;
}

.closed-fund-head span,
.closed-fund-note {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
}

.closed-fund-subtabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
}

.closed-fund-subtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-2);
  font: 700 13px/1 var(--font-sans);
  cursor: pointer;
}

.closed-fund-subtab span {
  color: var(--ink-3);
  font-size: 11px;
}

.closed-fund-subtab.is-active {
  background: var(--bg-card);
  color: var(--ink-1);
  box-shadow: var(--shadow-soft);
}

.closed-fund-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.closed-fund-filter {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--ink-2);
  font: 700 12px/1 var(--font-sans);
  cursor: pointer;
}

.closed-fund-filter.is-active {
  border-color: rgba(184, 87, 47, 0.36);
  background: rgba(184, 87, 47, 0.10);
  color: var(--accent);
}

.closed-fund-note {
  padding: 9px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.closed-fund-locked {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.closed-fund-locked strong {
  display: block;
  color: var(--ink-1);
  font-size: 15px;
  line-height: 1.4;
}

.closed-fund-locked p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

.closed-fund-table {
  width: 1310px;
  min-width: 1310px;
}

.closed-fund-table th,
.closed-fund-table td {
  white-space: nowrap;
  padding: 9px 10px;
  font-size: 13px;
}

.closed-fund-table th {
  font-size: 12px;
}

.closed-fund-table td:nth-child(1),
.closed-fund-table td:nth-child(2) {
  font-weight: 700;
}

.closed-fund-empty-cell {
  text-align: center;
  color: var(--ink-2);
  font-weight: 600;
}

.lof-favorite-cell { text-align: center; }
.lof-favorite-form { margin: 0; }
.lof-favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
}
.lof-favorite-button:hover,
.lof-favorite-button.is-active {
  border-color: rgba(195, 86, 47, 0.22);
  background: rgba(195, 86, 47, 0.10);
  color: var(--accent-strong);
}

.lof-favorite-button:disabled,
.community-like-form button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.lof-name-link {
  color: var(--ink-1);
  font-weight: 600;
  text-decoration: none;
}

.lof-name-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.lof-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.lof-confidence-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
}

.lof-confidence-badge-a {
  border: 1px solid rgba(0, 135, 90, 0.24);
  background: rgba(0, 135, 90, 0.08);
  color: var(--down);
}

.lof-confidence-badge-b {
  border: 1px solid rgba(0, 113, 227, 0.22);
  background: var(--bg-accent-soft);
  color: var(--accent);
}

.lof-confidence-badge-c {
  border: 1px solid rgba(94, 100, 112, 0.22);
  background: rgba(94, 100, 112, 0.08);
  color: var(--ink-2);
}

.arbitrage-table .premium-rate-positive {
  color: var(--up);
  font-weight: 700;
}

.arbitrage-table .premium-rate-negative {
  color: var(--down);
  font-weight: 700;
}

.arbitrage-table .premium-rate-reference {
  display: table-cell;
}

.arbitrage-table .premium-rate-reference .premium-rate-badge {
  margin-left: 6px;
  vertical-align: middle;
}

.arbitrage-table .premium-rate-reference .premium-rate-value {
  vertical-align: middle;
}

.premium-rate-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
}

.premium-rate-badge-reference {
  border: 1px solid rgba(94, 100, 112, 0.22);
  background: rgba(94, 100, 112, 0.08);
  color: var(--ink-2);
}

.premium-rate-interval {
  color: var(--ink-2);
  font-weight: 700;
}

.premium-rate-hidden {
  color: var(--ink-3);
  font-weight: 600;
}

.official-nav-deviation {
  color: var(--ink-2);
  font-weight: 700;
}

.official-nav-deviation-label {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}

.official-nav-deviation strong {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.arbitrage-table.arbitrage-table-refined thead th,
.arbitrage-table.arbitrage-table-refined tbody td { white-space: nowrap; }

.wide-table { min-width: 1480px; }
.wide-table.arbitrage-table { width: 1414px; min-width: 1414px; }

.lof-history-summary {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.lof-detail-title {
  text-align: center;
  padding: 18px 18px 12px;
}

.lof-detail-title h1 {
  margin: 0;
  color: var(--ink-1);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

.lof-detail-title p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.35;
}

.lof-detail-quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
  border-bottom: 8px solid rgba(0, 0, 0, 0.03);
  background: #fff;
}

.lof-detail-quote-item {
  min-width: 0;
  padding: 12px 14px;
  text-align: center;
  border-right: 1px solid var(--line-soft);
}

.lof-detail-quote-item:last-child {
  border-right: 0;
}

.lof-detail-quote-item span,
.lof-detail-info-item dt {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}

.lof-detail-quote-item strong {
  display: block;
  margin-top: 6px;
  color: var(--ink-1);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.lof-detail-quote-item small {
  display: block;
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.lof-detail-rate-line.premium-rate-positive,
.lof-detail-info-item .premium-rate-positive {
  color: var(--up);
  font-weight: 700;
}

.lof-detail-rate-line.premium-rate-negative,
.lof-detail-info-item .premium-rate-negative {
  color: var(--down);
  font-weight: 700;
}

.lof-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.lof-detail-info-item {
  display: grid;
  grid-template-columns: minmax(86px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.lof-detail-info-item:nth-child(2n) {
  border-right: 0;
}

.lof-detail-info-item.is-wide {
  grid-column: 1 / -1;
  grid-template-columns: minmax(86px, max-content) minmax(0, 1fr);
  border-right: 0;
}

.lof-detail-info-item dd {
  min-width: 0;
  margin: 0;
  color: var(--ink-1);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lof-history-panel { display: grid; gap: 12px; }

.lof-history-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.lof-history-table th,
.lof-history-table td {
  padding: 8px 10px;
  font-size: 13px;
  white-space: nowrap;
}

.lof-history-table th {
  background: var(--bg-card);
  color: var(--ink-2);
  font-weight: 700;
  text-align: right;
}

.lof-history-table th:first-child,
.lof-history-table td:first-child {
  text-align: left;
  width: 31%;
}

.lof-history-table th:nth-child(2),
.lof-history-table td:nth-child(2) { width: 19%; }

.lof-history-table th:nth-child(3),
.lof-history-table td:nth-child(3) { width: 26%; }

.lof-history-table th:nth-child(4),
.lof-history-table td:nth-child(4) { width: 24%; }

.lof-history-table td {
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-1);
  font-family: var(--font-mono);
  text-align: right;
}

.lof-history-table tbody tr.is-current td {
  background: rgba(238, 196, 80, 0.16);
}

.lof-history-table td:first-child strong {
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
}

.lof-history-table td:first-child span {
  display: inline-flex;
  margin-left: 6px;
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 11px;
}

.lof-history-estimate-tag {
  display: inline-flex;
  margin-left: 4px;
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
}

.lof-history-table .premium-rate-positive {
  color: var(--up);
  font-weight: 800;
}

.lof-history-table .premium-rate-negative {
  color: var(--down);
  font-weight: 800;
}

.arbitrage-tip-table {
  width: 100%;
  min-width: 760px;
  table-layout: auto;
}

.arbitrage-tip-table th,
.arbitrage-tip-table td,
.arbitrage-tip-table th:nth-child(1),
.arbitrage-tip-table td:nth-child(1),
.arbitrage-tip-table th:nth-child(2),
.arbitrage-tip-table td:nth-child(2),
.arbitrage-tip-table th:nth-child(3),
.arbitrage-tip-table td:nth-child(3),
.arbitrage-tip-table th:nth-child(4),
.arbitrage-tip-table td:nth-child(4),
.arbitrage-tip-table th:nth-child(5),
.arbitrage-tip-table td:nth-child(5),
.arbitrage-tip-table th:nth-child(6),
.arbitrage-tip-table td:nth-child(6) {
  width: auto;
}

.arbitrage-tip-table th,
.arbitrage-tip-table td,
.arbitrage-tip-table th:nth-child(1),
.arbitrage-tip-table td:nth-child(1),
.arbitrage-tip-table th:nth-child(2),
.arbitrage-tip-table td:nth-child(2) {
  position: static;
  left: auto;
  box-shadow: none;
}

.arbitrage-tip-table th:nth-child(4),
.arbitrage-tip-table td:nth-child(4),
.arbitrage-tip-table th:nth-child(6),
.arbitrage-tip-table td:nth-child(6) {
  text-align: right;
}

.arbitrage-tip-table td:nth-child(2),
.arbitrage-tip-table td:nth-child(3),
.arbitrage-tip-table td:nth-child(4),
.arbitrage-tip-table td:nth-child(5),
.arbitrage-tip-table td:nth-child(6) {
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0;
}

.empty-cell {
  color: var(--ink-2);
  text-align: center;
  padding: 32px 16px;
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- 14. Filter Row (arbitrage page) ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
}

/* ---------- 15. Panel Notes / Collapsible ---------- */
.panel-note-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.panel-note-list.panel-note-list-tight {
  margin-top: 14px;
  gap: 6px;
}

.panel-note-list p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}

.notes-collapse {
  margin-top: 12px;
  padding: 0;
  border-top: 1px solid var(--line);
}

.notes-collapse > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}

.notes-collapse > summary::-webkit-details-marker { display: none; }
.notes-collapse > summary::after {
  content: "›";
  color: var(--ink-3);
  font-size: 18px;
  transform: rotate(90deg);
  transition: transform var(--t-fast) var(--ease);
}

.notes-collapse[open] > summary::after {
  transform: rotate(-90deg);
  color: var(--accent);
}

.notes-collapse[open] > summary { padding-bottom: 6px; }

.notes-collapse .panel-note-list,
.notes-collapse .panel-note-list-tight {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  padding-bottom: 8px;
}

/* ---------- 16. Status Badges ---------- */
.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: -4px 0 16px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px 5px 22px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  position: relative;
}

.status-badge::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.status-live {
  color: var(--down);
  background: rgba(0, 135, 90, 0.08);
  border: 1px solid rgba(0, 135, 90, 0.18);
}

.status-offline {
  color: #8a5a14;
  background: rgba(202, 138, 4, 0.1);
  border: 1px solid rgba(202, 138, 4, 0.22);
}

.fallback-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.fallback-live    { color: #0f766e; background: rgba(15, 118, 110, 0.08); border: 1px solid rgba(15, 118, 110, 0.16); }
.fallback-cached  { color: #9a6700; background: rgba(202, 138, 4, 0.12); border: 1px solid rgba(202, 138, 4, 0.24); }
.fallback-offline { color: var(--warn); background: rgba(180, 35, 24, 0.08); border: 1px solid rgba(180, 35, 24, 0.18); }

/* ---------- 17. Contact / QR ---------- */
.contact-card, .account-contact-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 18px;
  align-items: center;
}

.contact-panel .contact-card.contact-card-slim {
  grid-template-columns: 112px 1fr;
  gap: 16px;
}

.contact-card-qr {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card-copy { display: grid; gap: 8px; }

.contact-card-copy p,
.contact-panel .contact-card.contact-card-slim .contact-card-copy p {
  margin: 0;
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.6;
}

.contact-qr-image, .promo-qr-image {
  width: 100%;
  max-width: 128px;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-card);
  transition: transform var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease);
}

.contact-qr-image:hover, .promo-qr-image:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-1);
}

/* ---------- 18. Open Account ---------- */
.account-card .section-head { align-items: center; }

.account-intro-panel { padding-bottom: 22px; }
.account-intro-header { display: grid; gap: 10px; }
.account-intro-header h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
}

.account-intro-lede {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.75;
  max-width: 64ch;
}

.account-contact-panel { background: var(--bg-card); }

.account-open-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.account-open-head h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
}

.account-open-wechat { justify-content: flex-end; }

.account-open-body {
  display: grid;
  grid-template-columns: 1fr 156px;
  gap: 24px;
  align-items: start;
}

.account-open-copy {
  display: grid;
  gap: 6px;
  color: var(--ink-1);
  font-size: 15px;
  line-height: 1.7;
}

.account-open-copy p { margin: 0; }
.account-audience-copy { color: var(--ink-1); line-height: 1.65; }
.account-audience-lead {
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 14px;
}

.account-audience-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: audience;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.account-audience-list li {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
}

.account-audience-list li:last-child { border-bottom: 0; }

.account-audience-list li::before { display: none; }

.account-audience-icon {
  display: inline-grid;
  place-items: center;
  grid-row: 1;
  align-self: start;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-xs);
  background: var(--bg-accent-soft);
  color: var(--accent);
  margin-top: 2px;
}

.account-audience-icon .lucide {
  width: 13px;
  height: 13px;
}

.account-audience-list > li > strong {
  display: block;
  grid-column: 2;
  margin-bottom: 2px;
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.account-audience-list > li > span:not(.account-audience-icon) {
  display: block;
  grid-column: 2;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.55;
}

.account-audience-list span strong {
  color: var(--ink-1);
  font-weight: 600;
}

.account-contact-grid {
  display: grid;
  grid-template-columns: 1fr 156px;
  gap: 24px;
  align-items: center;
}

.account-contact-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

.account-contact-panel h2 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  letter-spacing: -0.022em;
}

.account-contact-broker-list { margin-top: 22px; }

.account-wechat-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.account-wechat-title button,
.account-section-wechat button,
.account-open-wechat button {
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--accent);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  transition: background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.account-wechat-title button:hover,
.account-section-wechat button:hover,
.account-open-wechat button:hover {
  background: var(--bg-accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: none;
  box-shadow: none;
}

.account-section-wechat,
.account-open-wechat {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}

.account-contact-copy {
  max-width: 60ch;
  margin: 12px 0 0;
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.75;
}

.account-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.account-contact-actions a,
.account-contact-actions button,
.account-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0 14px;
  color: var(--ink-2);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.account-contact-actions a:hover,
.account-contact-actions button:hover,
.account-back-link:hover {
  background: var(--bg-hover);
  color: var(--ink-1);
  border-color: var(--line-strong);
  box-shadow: none;
  transform: none;
}

.account-contact-note {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
}

/* Account fit cards */
.account-fit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.account-fit-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg-card);
}

.account-fit-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}

.account-fit-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}

.account-fit-indicator { color: var(--ink-1) !important; font-weight: 600; }

.account-fit-card a {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.account-fit-card a:hover { color: var(--accent-strong); text-decoration: underline; }

/* Account stock copy */
.account-stock-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.account-stock-copy { display: grid; gap: 10px; }
.account-stock-copy p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-1);
  line-height: 1.75;
}

/* Account anchor nav */
.anchor-nav {
  position: sticky;
  top: 56px;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 0;
  margin: 0 0 14px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 0;
}

.anchor-nav a {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.anchor-nav a:hover {
  background: var(--bg-hover);
  color: var(--ink-1);
}

[id] {
  scroll-margin-top: 96px;
}

/* Broker public table */
.broker-public-preview {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-1);
}

.broker-public-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-card);
}

.broker-public-preview-head strong { color: var(--ink-1); font-size: 15px; font-weight: 600; }
.broker-public-preview-head span { color: var(--ink-2); font-size: 13px; }

.broker-public-table-wrap { border: 0; border-radius: 0; background: transparent; }

.broker-public-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  table-layout: fixed;
}

.broker-public-col-name      { width: 9%; }
.broker-public-col-summary   { width: 9%; }
.broker-public-col-stock,
.broker-public-col-etf       { width: 18%; }
.broker-public-col-adjust    { width: 11%; }
.broker-public-col-permanent { width: 35%; }

.broker-public-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}

.broker-public-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-1);
  font-size: 13px;
  line-height: 1.5;
  vertical-align: top;
  word-break: break-word;
}

.broker-public-summary-row { cursor: pointer; }

.broker-public-summary-row:hover td {
  background: var(--bg-accent-softer);
}

.broker-public-summary-row:active td {
  background: var(--bg-accent-soft);
}

.broker-public-table tbody tr:last-child td { border-bottom: 0; }

.broker-public-name-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.broker-public-name-button:hover,
.broker-public-name-button:focus-visible {
  text-decoration: underline;
  transform: none;
  box-shadow: none;
}

.broker-public-name-button strong {
  color: var(--accent);
  font-weight: 600;
}

.broker-public-detail-row { scroll-margin-top: 128px; }
.broker-public-detail-row[hidden] { display: none; }
.broker-public-detail-row td { padding: 0; background: var(--bg-card-soft); }

.broker-public-detail-panel {
  display: grid;
  gap: 10px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
}

.broker-public-detail-panel > strong { color: var(--ink-1); font-size: 13px; font-weight: 600; }

.broker-public-detail-panel dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 14px;
  margin: 0;
}

.broker-public-detail-panel dl div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px;
  min-width: 0;
}

.broker-public-detail-panel dt { color: var(--ink-2); font-size: 12px; }
.broker-public-detail-panel dd {
  min-width: 0;
  margin: 0;
  color: var(--ink-1);
  font-size: 12px;
  word-break: break-word;
}

.broker-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.broker-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--ink-1);
  font-size: 13px;
}

.broker-public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.broker-public-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg-card);
}

.broker-public-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.broker-public-head span { color: var(--ink-2); font-size: 12px; line-height: 1.5; text-align: right; }
.broker-public-card dl { display: grid; gap: 8px; margin: 12px 0 0; }
.broker-public-card dl div { display: grid; grid-template-columns: 72px 1fr; gap: 8px; }
.broker-public-card dt { color: var(--ink-2); }
.broker-public-card dd { margin: 0; }

.account-stock-qr {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.account-stock-qr p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.6;
}

.account-table-wrap { background: var(--bg-card); }

.account-table th, .account-table td { white-space: nowrap; }

/* Futures recommendation table */
.futures-table-shell { padding: 0; border: 0; background: transparent; }
.futures-table-shell .table-wrap { border: 0; box-shadow: none; }

.futures-recommend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 720px;
  background: var(--bg-card);
}

.futures-recommend-table th,
.futures-recommend-table td {
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 14px;
  vertical-align: top;
  text-align: left;
}

.futures-recommend-table thead th {
  background: var(--bg-card);
  color: var(--ink-2);
  font-weight: 500;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  text-transform: none;
  letter-spacing: 0;
}

.futures-recommend-table tbody th {
  width: 132px;
  background: var(--bg-card);
  color: var(--ink-2);
  text-align: left;
  font-weight: 400;
  font-size: 13px;
}

.futures-recommend-table tbody td {
  background: var(--bg-card);
  color: var(--ink-1);
  line-height: 1.6;
  font-size: 13px;
}

.futures-recommend-table tbody tr:hover th,
.futures-recommend-table tbody tr:hover td { background: var(--bg-accent-softer); }

.futures-recommend-table tbody td p {
  margin: 0 0 4px;
}
.futures-recommend-table tbody td p:last-child { margin-bottom: 0; }

.futures-note-cell { background: var(--bg-card-soft) !important; text-align: left !important; }
.futures-note-cell p { color: var(--ink-2); font-size: 13px; text-align: left; }

.futures-recommend-table tbody tr:last-child td,
.futures-recommend-table tbody tr:last-child th { border-bottom: 0; }

.account-table td,
.futures-recommend-table td,
.futures-recommend-table th { white-space: normal; }

.account-stock-qr p,
.futures-note-cell p,
.panel-note-list p { font-size: 13px; }

/* Doc grid / Doc card */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px;
}

.doc-card {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 120px;
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: var(--shadow-1);
  transition: border-color var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease),
    transform var(--t-base) var(--ease);
}

.doc-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-2);
}

.doc-card strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink-1);
}

.doc-card p { margin: 0; color: var(--ink-2); font-size: 13px; }

.permission-summary-list { display: grid; gap: 8px; margin-top: 10px; }
.permission-summary-list p { color: var(--ink-1); line-height: 1.75; font-size: 14px; }

.doc-card details {
  border-top: 1px solid var(--line-soft);
  padding: 0;
  margin: 0;
}

.doc-card details:first-of-type {
  border-top: 0;
}

.doc-card details summary {
  cursor: pointer;
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  line-height: 1.5;
}

.doc-card details summary::-webkit-details-marker { display: none; }
.doc-card details summary::after {
  content: "+";
  color: var(--ink-3);
  font-size: 20px;
  font-weight: 300;
  transition: transform var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
  flex-shrink: 0;
  line-height: 1;
}

.doc-card details[open] summary::after {
  content: "−";
  color: var(--accent);
}

.doc-card details p {
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.75;
}

.doc-card details[open] { padding-bottom: 6px; }

.doc-link-list, .doc-article-list { display: grid; gap: 10px; }

.doc-link-list a {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.5;
}

.doc-link-list a:hover { color: var(--accent-strong); text-decoration: underline; }

.doc-article-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}

.doc-article-link:hover { color: var(--accent-strong); text-decoration: underline; }

.doc-article-recommend {
  align-items: flex-start;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  text-decoration: none;
}

.doc-article-recommend:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-1);
  text-decoration: none;
}

.doc-article-meta {
  align-items: center;
  display: flex;
  gap: 6px;
}

.doc-article-title {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.doc-article-tag {
  background: var(--bg-accent-soft);
  border-radius: 4px;
  color: var(--accent);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  padding: 4px 6px;
  text-decoration: none;
}

.doc-pin-tag {
  background: var(--bg-accent-soft);
  border-radius: 4px;
  color: var(--accent);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  padding: 4px 6px;
}

.doc-table-wrap { margin-top: 10px; }

/* Account article (narrow read width) */
.account-article {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.account-article h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.25;
}

.account-article-sections {
  display: grid;
  gap: 20px;
  margin-top: 4px;
}

.account-article-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card-soft);
}

.account-article-attachment div { display: grid; gap: 2px; }
.account-article-attachment strong { color: var(--ink-1); font-size: 14px; font-weight: 600; }
.account-article-attachment span { color: var(--ink-2); font-size: 13px; line-height: 1.6; }

.account-article-attachment a {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--accent);
  background: var(--bg-accent-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease);
}

.account-article-attachment a:hover {
  background: rgba(0, 113, 227, 0.14);
  color: var(--accent-strong);
}

.account-article-sections section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.account-article-sections section:first-child {
  border-top: 0;
  padding-top: 0;
}

.account-article-sections h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink-1);
}

.account-article-sections p {
  margin: 0;
  color: var(--ink-1);
  font-size: 15px;
  line-height: 1.8;
}

.account-related-articles {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 4px;
}

.account-related-articles h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}

.account-related-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.account-related-grid a {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-1);
  text-decoration: none;
  background: var(--bg-card);
  transition: border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.account-related-grid a:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.account-related-grid a strong { font-size: 14px; font-weight: 600; color: var(--ink-1); }
.account-related-grid span { color: var(--ink-2); font-size: 13px; line-height: 1.6; }

/* ---------- 19. Money/Bond Arbitrage ---------- */
.money-bond-arbitrage-panel { background: var(--bg-card); }

.money-bond-refresh-meta {
  display: grid;
  gap: 2px;
  justify-items: end;
  color: var(--ink-2);
  font-size: 12px;
}

.money-bond-refresh-meta strong {
  color: var(--ink-1);
  font-family: var(--font-mono);
  font-size: 13px;
}

.money-bond-watch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.money-bond-watch-block { display: grid; gap: 10px; }
.money-bond-watch-block h4 {
  margin: 0;
  color: var(--ink-1);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.money-bond-table-wrap { border-radius: var(--radius); background: var(--bg-card); }

.money-bond-watch-table {
  min-width: 760px;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
  background: var(--bg-card);
}

.money-bond-watch-table th {
  position: static;
  color: var(--ink-2);
  background: var(--bg-card);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  font-size: 13px;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}

.money-bond-watch-table th:first-child,
.money-bond-watch-table td:first-child { width: 132px; }

.money-bond-watch-table th,
.money-bond-watch-table td {
  padding: 10px 8px;
  font-size: 13px;
  white-space: nowrap;
}

.money-bond-watch-table td {
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-1);
}

.money-bond-watch-table td:not(:first-child),
.money-bond-watch-table td:first-child span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -0.01em;
}

.money-bond-watch-table td:not(:first-child) { text-align: right; }
.money-bond-watch-table td:first-child strong,
.money-bond-watch-table td:first-child span {
  display: block;
}

.money-bond-watch-table td:first-child strong {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
}

.money-bond-watch-table td:first-child span {
  margin-top: 2px;
  color: var(--ink-2);
  font-weight: 400;
}

.money-bond-watch-table td:last-child {
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 12px;
  text-align: left;
}

.money-bond-rule-strip {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- 20. DCA next plan ---------- */
.next-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.next-plan-date {
  margin-bottom: 14px;
  font-size: 15px;
  color: var(--ink-2);
}

.next-plan-date strong { color: var(--up); font-weight: 600; font-size: 16px; }

.next-plan-card {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: none;
  transition: border-color var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease),
    transform var(--t-base) var(--ease);
}

.next-plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-1);
}

.next-plan-card p {
  margin: 0 0 10px;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-1);
}

.next-plan-card p span {
  color: var(--ink-2);
  margin-left: 6px;
  font-weight: 400;
  font-size: 13px;
}

.next-plan-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 600;
}

.next-plan-numbers {
  display: grid;
  gap: 4px;
  font-size: 14px;
}

.next-plan-numbers span { color: var(--up); font-weight: 500; }

.dca-records-collapse {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.dca-records-collapse > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 2px 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.dca-records-collapse > summary::-webkit-details-marker { display: none; }

.dca-records-collapse > summary::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid var(--accent);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform var(--t-fast) var(--ease);
}

.dca-records-collapse[open] > summary::before {
  transform: rotate(90deg);
}

.dca-records-collapse .table-wrap {
  margin-top: 12px;
}

/* ---------- 21. Hero / Promo ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(190px, 0.62fr);
  gap: 20px;
  padding: 24px 28px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.hero::before, .hero::after { display: none; }

.hero h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  max-width: 18ch;
}

.hero-copy { padding-top: 4px; }
.hero-copy p { max-width: 50ch; font-size: 15px; color: var(--ink-2); margin: 0; }
.hero-copy p + p { margin-top: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.hero-panel {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 4px 0 0 16px;
  border-left: 1px solid var(--line);
  background: transparent;
}

.hero-panel-compact { gap: 10px; padding-top: 4px; padding-left: 14px; }
.hero-panel-compact > div { display: grid; gap: 2px; }
.hero-panel-compact strong { font-size: 19px; font-weight: 600; }

.hero-panel strong {
  font-size: 26px;
  line-height: 1.1;
  font-family: var(--font-sans);
  letter-spacing: -0.022em;
  font-weight: 600;
}

.hero-panel span,
.hero-copy p:last-child,
.section-head p { color: var(--ink-2); }

.page-intro, .home-hero { min-height: auto; }

/* Formal portal home */
.home-portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  padding: 26px 28px;
  background:
    linear-gradient(180deg, var(--bg-accent-softer), transparent 48%),
    var(--bg-card);
}

.home-portal-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.home-portal-copy h1 {
  max-width: 14ch;
  margin: 0;
  color: var(--ink-1);
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.home-portal-copy p:not(.section-kicker) {
  max-width: 58ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.75;
}

.home-portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.home-portal-brief {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.home-portal-brief > div {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.home-portal-brief span,
.home-data-list dt {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
}

.home-portal-brief strong,
.home-data-list dd {
  margin: 0;
  color: var(--ink-1);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.home-portal-action-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 4px;
}

.home-portal-grid-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.home-portal-grid-head a {
  color: var(--accent);
}

.home-portal-action {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 3px 8px;
  align-content: start;
  min-height: 84px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: inherit;
}

.home-portal-action:hover {
  border-color: var(--accent);
  color: inherit;
  background: var(--bg-card-soft);
}

.home-portal-action i,
.home-portal-action .lucide {
  grid-row: span 2;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--accent);
}

.home-portal-action strong {
  grid-column: 2;
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.3;
}

.home-portal-action span {
  grid-column: 2;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
}

.home-small-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.home-small-row > .panel {
  height: 100%;
  min-width: 0;
  margin-bottom: 0;
}

.home-data-center-panel {
  display: grid;
  gap: 12px;
}

.home-data-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.home-data-list > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.home-data-list > div:last-child {
  border-bottom: 0;
}

.home-dca-dashboard {
  align-content: start;
}

.home-dca-list > div {
  grid-template-columns: 82px minmax(0, 1fr);
  padding: 9px 0;
}

.home-dca-visual {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 6px 0 12px;
}

.home-dca-donut {
  width: 108px;
  height: 108px;
}

.home-dca-donut-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 12;
}

.home-dca-donut-value {
  fill: none;
  stroke: var(--accent);
  stroke-width: 12;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
}

.home-dca-donut-num {
  fill: var(--ink-1);
  font-size: 22px;
  font-weight: 700;
  text-anchor: middle;
}

.home-dca-donut-cap {
  fill: var(--ink-3);
  font-size: 11px;
  text-anchor: middle;
}

.home-dca-return {
  display: grid;
  gap: 6px;
}

.home-dca-return-label {
  color: var(--ink-3);
  font-size: 12px;
}

.home-dca-rate {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.home-dca-bar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.home-dca-bar-zero {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--ink-3);
  opacity: 0.5;
}

.home-dca-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
}

.home-dca-bar-fill.profit-up {
  background: var(--profit-up, #2f9e44);
}

.home-dca-bar-fill.profit-down {
  background: var(--profit-down, #e03131);
}

.home-dca-return-foot {
  color: var(--ink-3);
  font-size: 12px;
}

.home-dca-note {
  color: var(--ink-3) !important;
}

.home-dca-next {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-card-soft);
}

.home-dca-next p {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
}

.home-data-links {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.home-data-links a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card-soft);
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 700;
}

.home-data-links a::after {
  content: ">";
  color: var(--ink-3);
}

.home-small-row .community-home-panel,
.home-small-row .sponsor-grid,
.home-small-row .home-process-steps {
  grid-template-columns: 1fr;
}

.home-small-row .sponsor-card,
.home-small-row .home-process-steps article {
  min-height: auto;
}

.home-process-panel {
  display: grid;
  gap: 12px;
}

.home-process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-process-steps article {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card-soft);
}

.home-process-steps span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.home-process-steps strong {
  color: var(--ink-1);
  font-size: 15px;
}

.home-process-steps p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.65;
}

/* Home education base */
.education-home-panel {
  display: grid;
  gap: 18px;
  padding: 22px 24px 24px;
  background: var(--bg-card);
}

.education-home-head {
  align-items: start;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.education-home-head h1 {
  margin: 0 0 8px;
  color: var(--ink-1);
  font-size: 28px;
  line-height: 1.18;
}

.education-home-head p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
}

.education-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.education-topic-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 260px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card-soft);
}

.education-topic-card span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
}

.education-topic-card h2 {
  margin: 0;
  color: var(--ink-1);
  font-size: 18px;
  line-height: 1.35;
}

.education-topic-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.65;
}

.education-topic-card .button-link {
  align-self: end;
  justify-self: start;
  margin-top: auto;
  padding: 7px 12px;
  font-size: 13px;
}

.article-directory {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.article-directory > p {
  margin: 0;
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 800;
}

.article-directory-list,
.article-directory-extra ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-directory-list li,
.article-directory-extra li {
  min-width: 0;
}

.article-directory-list a,
.article-directory-extra a {
  display: grid;
  gap: 3px;
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 2px);
  color: inherit;
  text-decoration: none;
  background: var(--bg-card);
}

.article-directory-list a:hover,
.article-directory-extra a:hover {
  border-color: var(--accent);
  background: var(--bg-card-soft);
}

.article-directory-list a span,
.article-directory-extra a span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 800;
}

.article-directory-list a strong,
.article-directory-extra a strong {
  overflow-wrap: anywhere;
  color: var(--ink-1);
  font-size: 13px;
  line-height: 1.45;
}

.article-directory-extra {
  margin-top: 2px;
}

.article-directory-extra summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.article-directory-extra ol {
  margin-top: 8px;
}

.ad-placement-panel {
  display: grid;
  gap: 12px;
  background: var(--bg-card);
}

.ad-carousel {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card-soft);
}

.ad-slide {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 142px;
  padding: 18px;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.ad-slide:not(.is-active) {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ad-slide.is-active {
  opacity: 1;
  transform: translateX(0);
}

.ad-slide span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 800;
}

.ad-slide h3 {
  margin: 0;
  color: var(--ink-1);
  font-size: 22px;
  line-height: 1.25;
}

.ad-slide p {
  max-width: 720px;
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
}

.ad-slide strong {
  color: var(--accent);
  font-size: 13px;
}

.ad-detail {
  margin-top: 4px;
}

.ad-detail summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.ad-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg-card);
}

.ad-detail-body p {
  max-width: none;
}

.ad-detail-qr {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
}

.ad-detail-qr .contact-qr-image {
  max-width: 96px;
}

.ad-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ad-dot {
  width: 28px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
}

.ad-dot.is-active {
  background: var(--accent);
}

.ad-disclaimer {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
}

.daily-writing-panel {
  display: grid;
  gap: 12px;
  background: var(--bg-card);
}

.daily-writing-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card-soft);
}

.daily-writing-card > div:first-child {
  display: grid;
  align-content: center;
}

.daily-writing-card > div:first-child p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
}

.daily-writing-card .article-directory {
  margin-top: 0;
}

.daily-writing-card .article-directory-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.community-home-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px 24px;
  background: var(--bg-card);
}

.community-home-copy {
  display: grid;
  gap: 6px;
}

.community-home-copy h3 {
  margin: 0;
  color: var(--ink-1);
  font-size: 20px;
  line-height: 1.3;
}

.community-home-copy p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
}

.home-topic-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.home-topic-list a {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-card-soft);
  color: inherit;
}

.home-topic-list a:hover {
  border-color: rgba(181, 80, 43, 0.20);
  background: var(--bg-card);
}

.home-topic-list strong {
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.35;
}

.home-topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.home-topic-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.2;
}

.home-topic-badge-strong {
  background: var(--bg-accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.home-topic-empty {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}

.community-home-actions,
.sponsor-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sponsor-panel {
  display: grid;
  gap: 12px;
  background: var(--bg-card);
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sponsor-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card-soft);
}

.sponsor-card > span {
  justify-self: start;
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.sponsor-card h3 {
  margin: 0;
  color: var(--ink-1);
  font-size: 18px;
  line-height: 1.35;
}

.sponsor-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.65;
}

.sponsor-card-actions {
  align-self: end;
  margin-top: auto;
}

.sponsor-disclaimer {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
}

.community-section {
  background: var(--bg-card);
}

.community-user-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  color: var(--ink-2);
  font-size: 13px;
}

.community-user-bar form {
  margin: 0;
}

.community-list-head.section-head.section-head-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.community-list-head .community-user-bar {
  justify-self: end;
}

.community-list-note {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}

.community-search-form,
.community-admin-search {
  display: flex;
  gap: 10px;
  align-items: end;
  margin: 12px 0 18px;
}

.community-search-form label,
.community-admin-search label {
  display: grid;
  flex: 1;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.community-search-form input,
.community-admin-search input,
.community-admin-search select,
.community-admin-bulk select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 10px 12px;
  color: var(--ink-1);
  font: inherit;
}

.community-admin-search button {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.account-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.account-profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-soft) 100%);
}

.account-profile-hero h2 {
  margin: 4px 0 8px;
  color: var(--ink-1);
  font-size: 28px;
  line-height: 1.2;
}

.account-profile-hero p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
}

.account-login-hero {
  align-items: flex-start;
}

.account-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.account-profile-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px;
  background: var(--bg-elevated);
}

.account-profile-grid span {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  margin-bottom: 6px;
}

.account-profile-grid strong {
  color: var(--ink-1);
  font-size: 15px;
}

.account-action-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.account-action-grid form {
  margin: 0;
}

/* Member center dashboard */
.account-dashboard {
  display: grid;
  gap: 18px;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-soft) 100%);
}

.account-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
}

.account-identity-main {
  flex: 1 1 auto;
  min-width: 0;
}

.account-identity-main h1 {
  margin: 0 0 4px;
  color: var(--ink-1);
  font-size: 22px;
  line-height: 1.25;
}

.account-identity-meta {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}

.account-identity-badge {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
}

.account-identity-badge.is-trusted {
  background: var(--bg-accent-soft);
  color: var(--accent);
}

.account-identity-badge.is-pending {
  background: var(--bg-elevated);
  color: var(--ink-3);
  border: 1px solid var(--line);
}

.account-identity-badge.is-admin {
  background: #2f6f4f;
  color: #fff;
}

.community-self-delete {
  margin: 0;
  display: inline;
}

.community-self-delete button {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 1px 10px;
  background: var(--bg-card);
  color: var(--ink-3);
  font-size: 12px;
  cursor: pointer;
}

.community-self-delete button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.community-post-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.community-reply-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-report {
  display: inline-block;
}

.community-report summary {
  list-style: none;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 13px;
}

.community-report summary::-webkit-details-marker {
  display: none;
}

.community-report form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.community-report input {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font: inherit;
  color: var(--ink-1);
  min-width: 180px;
}

.community-report button {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  background: var(--bg-card);
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
}

.community-like-form {
  margin: 0;
  display: inline;
}

.community-like-form button {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  background: var(--bg-card);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.community-like-form button.is-active {
  border-color: var(--accent);
  background: var(--bg-accent-soft);
  color: var(--accent);
}

.community-admin-inline-action {
  margin: 0;
  display: inline;
}

.community-admin-inline-action button {
  border: 1px solid #f1c8c2;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  background: #fff7f5;
  color: var(--warn);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.community-admin-inline-action button:hover {
  border-color: var(--warn);
  background: #fff1ed;
}

.account-menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.account-notification-list {
  display: grid;
  gap: 10px;
}

.account-notification {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-card-soft);
  text-decoration: none;
}

.account-notification.is-unread {
  border-left: 3px solid var(--accent);
}

.account-notification-text {
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 600;
}

.account-notification-sub {
  color: var(--ink-3);
  font-size: 12px;
}

.account-dashboard-body {
  display: grid;
  gap: 16px;
}

.account-side-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  box-shadow: 0 14px 32px rgba(30, 35, 42, 0.06);
}

.account-side-head {
  display: grid;
  gap: 4px;
  padding: 12px 12px 14px;
  border-bottom: 1px solid var(--line);
}

.account-side-head span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
}

.account-side-head strong {
  color: var(--ink-1);
  font-size: 16px;
}

.account-side-head em {
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.account-menu {
  display: grid;
  gap: 4px;
}

.account-menu-group {
  display: grid;
  gap: 4px;
}

.account-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.account-menu-link::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: transparent;
}

.account-menu-link:hover {
  background: var(--bg-elevated);
  border-color: var(--line);
  color: var(--ink-1);
}

.account-menu-link.active {
  background: var(--bg-accent-soft);
  border-color: rgba(192, 82, 47, 0.24);
  color: var(--accent-strong);
}

.account-menu-link.active::before {
  background: var(--accent);
}

.account-submenu {
  display: grid;
  gap: 2px;
  margin: 0 0 4px 18px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.account-submenu-link {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.account-dashboard-body.is-loading .account-content {
  opacity: 0.55;
  transition: opacity 0.16s ease;
}

.account-submenu-link:hover {
  background: var(--bg-elevated);
  color: var(--accent-strong);
}

.account-submenu-link.active {
  background: var(--bg-accent-soft);
  color: var(--accent-strong);
}

.account-progress-card {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card-soft);
}

.account-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.account-progress-head strong {
  color: var(--accent-strong);
  font-size: 18px;
}

.account-progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: #ece7e4;
}

.account-progress-bar span {
  display: block;
  width: var(--progress);
  min-width: 4px;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.account-level-table-static {
  width: 100%;
  overflow: visible;
}

.account-level-table-static .account-level-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.account-menu-logout {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.account-menu-logout button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.account-menu-logout button:hover {
  border-color: rgba(192, 82, 47, 0.28);
  background: var(--bg-accent-soft);
  color: var(--accent-strong);
}

.account-content {
  padding: 20px;
}

.account-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.account-section-head h2 {
  margin: 0;
  color: var(--ink-1);
  font-size: 19px;
}

.account-detail-list {
  display: grid;
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--line);
}

.account-detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-elevated);
}

.account-detail-list dt {
  color: var(--ink-3);
  font-size: 13px;
}

.account-detail-list dd {
  margin: 0;
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.account-detail-action {
  color: var(--accent-strong);
  text-decoration: none;
}

.account-detail-action:hover {
  text-decoration: underline;
}

.account-record-list {
  display: grid;
  gap: 12px;
}

.account-record {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-card-soft);
  padding: 14px 16px;
}

.account-record-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12px;
}

.account-record h3 {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.4;
}

.account-record h3 a {
  color: var(--ink-1);
  text-decoration: none;
}

.account-record h3 a:hover {
  color: var(--accent);
}

.account-record-snippet {
  margin: 8px 0 6px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

.account-record-link {
  color: var(--ink-3);
  font-size: 13px;
  text-decoration: none;
}

.account-record-link:hover {
  color: var(--accent);
}

.account-status-pill {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  background: var(--bg-card);
  color: var(--ink-3);
}

.account-status-pill.is-published {
  background: var(--bg-accent-soft);
  color: var(--accent);
}

.account-status-pill.is-pending {
  background: #fff4e6;
  color: #b8730f;
}

.account-status-pill.is-hidden {
  background: var(--bg-elevated);
  color: var(--ink-3);
}

.account-empty {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 28px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-elevated);
}

.account-empty strong {
  color: var(--ink-1);
  font-size: 16px;
}

.account-empty p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}

.account-subsection {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.account-subsection h3 {
  margin: 0 0 4px;
  color: var(--ink-1);
  font-size: 16px;
}

.account-note {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

.account-inline-form {
  margin-top: 12px;
}

.account-data-grid {
  display: grid;
  gap: 12px;
}

.account-data-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-card-soft);
}

.account-data-card span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
}

.account-data-card strong {
  color: var(--ink-1);
  font-size: 17px;
}

.account-data-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

.account-points-rules {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

@media (min-width: 760px) {
  .account-dashboard {
    max-width: 960px;
    margin-inline: auto;
  }
  .account-dashboard-body {
    grid-template-columns: 216px minmax(0, 1fr);
    align-items: start;
  }
  .account-side-panel {
    position: sticky;
    top: 16px;
  }
  .account-data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.account-edit-panel {
  display: grid;
  gap: 18px;
}

.dividend-strategy-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.dividend-strategy-hero h1 {
  margin: 4px 0 10px;
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: 0;
}

.dividend-strategy-hero p,
.dividend-caveats p,
.dividend-caveats li {
  color: var(--ink-2);
  line-height: 1.65;
}

.dividend-period {
  flex: 0 0 auto;
  display: grid;
  gap: 3px;
  text-align: right;
}

.dividend-period small,
.dividend-period span {
  color: var(--ink-3);
  font-size: 12px;
}

.dividend-strategy-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.dividend-holdings {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-card);
}

.dividend-holdings summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 18px;
  cursor: pointer;
  list-style: none;
}

.dividend-holdings summary::-webkit-details-marker { display: none; }
.dividend-holdings summary span:first-child { display: grid; gap: 5px; min-width: 0; }
.dividend-holdings summary strong { color: var(--ink-1); font-size: 18px; }
.dividend-holdings summary small { color: var(--ink-3); font-size: 12px; }
.dividend-frequency { flex: 0 0 auto; color: var(--ink-3); font-size: 12px; text-align: right; }
.dividend-frequency b { color: var(--accent); font-size: 16px; }

.dividend-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dividend-metric-grid span { min-width: 0; padding: 13px 16px; }
.dividend-metric-grid small,
.dividend-metric-grid b { display: block; }
.dividend-metric-grid small { color: var(--ink-3); font-size: 11px; }
.dividend-metric-grid b { margin-top: 4px; color: var(--ink-1); font-size: 17px; }
.dividend-selection-note { margin: 0; padding: 14px 16px 4px; color: var(--ink-3); font-size: 12px; }
.dividend-holdings .table-wrap { margin: 8px 16px 16px; }
.dividend-holdings-table small { display: block; margin-top: 3px; color: var(--ink-3); }
.dividend-comparison { margin-top: 14px; }
.dividend-comparison tr.is-preferred td { color: var(--ink-1); font-weight: 700; background: var(--bg-card-soft); }
.dividend-caveats { margin-top: 14px; }
.dividend-caveats h2 { margin-top: 0; }

@media (max-width: 760px) {
  .dividend-strategy-hero { align-items: start; flex-direction: column; }
  .dividend-period { text-align: left; }
  .dividend-strategy-layout { grid-template-columns: 1fr; }
  .dividend-holdings summary { min-height: 74px; padding: 15px; }
  .dividend-holdings summary strong { font-size: 16px; }
  .dividend-metric-grid span { padding: 12px 10px; }
  .dividend-metric-grid b { font-size: 15px; }
}

.account-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.account-edit-summary,
.account-edit-form-card,
.account-edit-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card-soft);
}

.account-edit-summary,
.account-edit-form-card {
  padding: 16px;
}

.account-edit-summary {
  display: grid;
  gap: 14px;
}

.account-edit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.account-edit-note {
  padding: 14px;
}

.account-edit-note strong,
.account-edit-form-card h2 {
  color: var(--ink-1);
}

.account-edit-note p,
.account-edit-form-card p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
}

.account-edit-form-card .community-form {
  max-width: none;
}

.account-edit-actions {
  margin-top: 14px;
}

.community-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.community-category-tabs a {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.community-category-tabs a.active,
.community-category-tabs a:hover {
  border-color: var(--accent);
  background: var(--bg-accent-soft);
  color: var(--accent);
}

.community-sort-tabs {
  display: flex;
  gap: 16px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.community-sort-tabs a {
  padding: 6px 2px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.community-sort-tabs a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.community-post-list,
.community-reply-list,
.community-admin-list {
  display: grid;
  gap: 12px;
}

.community-admin-search-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}

.community-admin-search-summary span,
.community-admin-search-results h3 span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
}

.community-admin-search-summary strong {
  color: var(--ink-1);
}

.community-admin-result-snippet {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.approval-workbench {
  max-width: 1280px;
}

.approval-workbench-head p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

.approval-stat-card {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
}

.approval-stat-card span {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.approval-stat-card strong {
  color: var(--ink-1);
  font-size: 30px;
  line-height: 1;
}

.approval-stat-card em {
  color: var(--ink-3);
  font-size: 12px;
  font-style: normal;
}

.approval-workbench-tabs {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(247, 245, 241, 0.94);
  backdrop-filter: blur(8px);
}

.approval-workbench-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.approval-workbench-tabs a.is-active {
  border-color: rgba(37, 99, 235, 0.35);
  background: #eaf2ff;
  color: #1d4ed8;
}

.approval-workbench-tabs span {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 12px;
}

.approval-workbench-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.approval-workbench-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.approval-workbench-section-head h2 {
  margin: 0;
  color: var(--ink-1);
  font-size: 20px;
}

.approval-workbench-section-head p {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}

.approval-queue-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.approval-queue-grid h3 {
  margin: 0 0 10px;
  color: var(--ink-1);
  font-size: 15px;
}

.approval-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.approval-pending-users-panel {
  grid-column: 1 / -1;
}

.approval-filter-panel {
  margin: 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.approval-filter-panel summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 800;
}

.approval-filter-panel .community-admin-search {
  margin: 0;
  padding: 0 12px 12px;
}

.approval-premium-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.approval-premium-overview article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
}

.approval-premium-overview span {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
}

.approval-premium-overview strong {
  color: var(--ink-1);
  font-size: 28px;
  line-height: 1;
}

.approval-premium-overview em {
  color: var(--ink-3);
  font-size: 12px;
  font-style: normal;
}

.approval-premium-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px auto auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.approval-premium-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
}

.approval-premium-toolbar input,
.approval-premium-toolbar select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--ink-1);
  font: inherit;
  padding: 8px 10px;
}

.approval-premium-toolbar button {
  min-height: 38px;
}

.approval-premium-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.approval-premium-workspace-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.approval-premium-workspace-tabs a:hover {
  border-color: rgba(188, 84, 47, 0.42);
  color: var(--accent);
}

.approval-premium-workspaces {
  display: grid;
  gap: 16px;
}

.approval-premium-workspace {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
}

.approval-premium-workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.approval-premium-workspace-head h3 {
  margin: 0;
  color: var(--ink-1);
  font-size: 17px;
}

.approval-premium-workspace-head p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
}

.approval-premium-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.approval-premium-table-box {
  width: 100%;
  overflow: visible;
}

.approval-premium-table th,
.approval-premium-table td {
  padding-top: 9px;
  padding-bottom: 9px;
  vertical-align: middle;
}

.approval-premium-account {
  min-width: 220px;
}

.approval-premium-account strong,
.approval-premium-account span {
  display: block;
}

.approval-premium-account strong {
  color: var(--ink-1);
  font-size: 14px;
}

.approval-premium-account span,
.approval-premium-retention p {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 12px;
}

.approval-premium-level-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.approval-premium-trial-note {
  display: block;
  margin-top: 5px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.35;
}

.approval-premium-number {
  color: var(--ink-1);
  font-size: 16px;
  font-weight: 900;
  text-align: right;
}

.approval-premium-retention {
  display: grid;
  gap: 6px;
}

.approval-premium-retention-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.approval-premium-retention-compact {
  min-width: 190px;
}

.approval-premium-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.approval-premium-status-badge.is-retained {
  background: rgba(0, 135, 90, 0.12);
  color: #047857;
}

.approval-premium-status-badge.is-warning {
  background: rgba(180, 83, 9, 0.14);
  color: #b45309;
}

.approval-premium-status-badge.is-muted {
  background: var(--bg-soft);
  color: var(--ink-2);
}

.approval-premium-progress {
  height: 7px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--bg-active);
}

.approval-premium-progress span {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #047857, var(--accent));
}

.approval-premium-row-actions {
  position: relative;
}

.approval-premium-row-actions summary {
  cursor: pointer;
  list-style: none;
  width: max-content;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card-soft);
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 900;
}

.approval-premium-row-actions summary::-webkit-details-marker {
  display: none;
}

.approval-premium-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  min-width: min(720px, 72vw);
  margin-top: 10px;
}

.approval-premium-row-actions[open] {
  z-index: 20;
}

.approval-premium-row-actions .approval-premium-quick-actions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(520px, calc(100vw - 48px));
  min-width: 0;
  grid-template-columns: 1fr;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: var(--shadow-2);
}

.approval-premium-maintenance-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: max(0px, calc(690px - 100vw));
  z-index: 30;
  display: grid;
  gap: 6px;
  width: min(340px, calc(100vw - 48px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: var(--shadow-2);
}

.approval-premium-maintenance-menu .approval-premium-action-title {
  gap: 0;
}

.approval-premium-maintenance-menu .approval-premium-action-title strong {
  font-size: 13px;
}

.approval-premium-maintenance-menu .approval-premium-action-title span {
  display: none;
}

.approval-premium-maintenance-form {
  display: grid;
  gap: 5px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.approval-premium-maintenance-form:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.approval-premium-maintenance-grid {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 6px;
  align-items: end;
}

.approval-premium-maintenance-note {
  grid-column: 1 / -1;
}

.approval-premium-maintenance-form label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 800;
}

.approval-premium-maintenance-form input,
.approval-premium-maintenance-form select {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--ink-1);
  font: inherit;
  padding: 5px 8px;
}

.approval-premium-maintenance-check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}

.approval-premium-maintenance-check input {
  width: 16px;
  min-height: 16px;
}

.approval-premium-maintenance-form button {
  min-height: 30px;
  padding: 6px 10px;
}

.approval-premium-open-actions {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  min-width: 0;
}

.approval-premium-open-list {
  display: grid;
  gap: 12px;
}

.approval-premium-open-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card-soft);
}

.approval-premium-open-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  min-width: 0;
}

.approval-premium-open-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  min-width: min(280px, 100%);
  margin: 0;
}

.approval-premium-open-meta div {
  display: grid;
  gap: 3px;
}

.approval-premium-open-meta dt {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 800;
}

.approval-premium-open-meta dd {
  margin: 0;
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 900;
}

.approval-premium-inline-form {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.approval-premium-inline-form label {
  display: grid;
  gap: 5px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
}

.approval-premium-inline-form input,
.approval-premium-inline-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--ink-1);
  font: inherit;
  padding: 7px 9px;
}

.approval-premium-inline-form button {
  min-height: 36px;
}

.approval-premium-referral-table th:nth-child(1),
.approval-premium-referral-table td:nth-child(1) {
  width: 25%;
}

.approval-premium-referral-table th:nth-child(2),
.approval-premium-referral-table td:nth-child(2) {
  width: 11%;
}

.approval-premium-referral-table th:nth-child(3),
.approval-premium-referral-table td:nth-child(3) {
  width: 10%;
}

.approval-premium-referral-table th:nth-child(4),
.approval-premium-referral-table td:nth-child(4) {
  width: 15%;
}

.approval-premium-referral-table th:nth-child(5),
.approval-premium-referral-table td:nth-child(5) {
  width: 14%;
}

.approval-premium-referral-table th:nth-child(6),
.approval-premium-referral-table td:nth-child(6) {
  width: 25%;
}

.approval-premium-referral-table .approval-premium-account {
  min-width: 0;
}

.approval-premium-compact-form {
  display: none;
}

.approval-premium-referral-input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--ink-1);
  font: inherit;
  padding: 5px 8px;
}

.approval-premium-referral-submit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.approval-premium-referral-button {
  min-height: 32px;
  padding: 6px 12px;
  white-space: nowrap;
}

.approval-premium-action-title {
  display: grid;
  gap: 3px;
}

.approval-premium-action-title strong {
  color: var(--ink-1);
  font-size: 14px;
}

.approval-premium-action-title span {
  color: var(--ink-3);
  font-size: 12px;
}

.approval-premium-current-trial {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.45;
}

.approval-premium-toggle {
  margin: 0;
}

.community-admin-email-tools {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.community-admin-email-tools .community-admin-search {
  margin: 0;
}

.community-post-card,
.community-post-detail,
.community-reply,
.community-admin-card,
.community-empty,
.community-form-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card-soft);
}

.community-post-card,
.community-reply,
.community-admin-card,
.community-empty {
  padding: 14px;
}

.community-post-card h2,
.community-admin-card h3 {
  margin: 8px 0;
  color: var(--ink-1);
  font-size: 18px;
  line-height: 1.35;
}

.community-post-card h2 a {
  color: inherit;
}

.community-post-card p,
.community-post-detail p,
.community-reply p,
.community-admin-card p,
.community-empty p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.community-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12px;
}

.community-post-meta span {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
}

.community-post-meta .community-featured-badge {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.community-post-meta .community-pinned-badge {
  background: var(--ink-1);
  color: #fff;
  font-weight: 700;
}

.community-post-footer,
.community-login-note {
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 13px;
}

.community-image-block {
  margin: 14px 0 0;
}

.community-post-image {
  display: block;
  max-width: min(100%, 720px);
  max-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  object-fit: contain;
}

.community-floating-action {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(176, 91, 48, 0.28);
}

.community-floating-action:hover {
  color: #fff;
  transform: translateY(-1px);
}

.account-auth-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 16px 0 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
}

.account-auth-tabs a {
  padding: 7px 22px;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.account-auth-tabs a.active {
  background: var(--accent);
  color: #fff;
}

.community-post-subhead {
  margin: 18px 0 6px;
  color: var(--ink-1);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.community-markdown-heading {
  margin: 24px 0 10px;
  color: var(--ink-1);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
}

.community-post-detail ul,
.community-post-detail ol {
  margin: 0 0 14px 22px;
  padding: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
}

.community-post-detail li + li {
  margin-top: 4px;
}

.community-post-detail strong {
  color: var(--ink-1);
  font-weight: 800;
}

.community-post-detail code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-soft);
  color: var(--ink-1);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.community-markdown-quote {
  margin: 16px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.75;
}

.community-markdown-rule {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.community-markdown-table-wrap {
  margin: 16px 0 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.community-markdown-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: var(--bg-card);
  color: var(--ink-2);
  font-size: 13px;
}

.community-markdown-table th,
.community-markdown-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.community-markdown-table th {
  background: var(--bg-soft);
  color: var(--ink-1);
  font-weight: 800;
}

.community-markdown-table tr:last-child td {
  border-bottom: 0;
}

.community-post-detail p + .community-post-subhead {
  margin-top: 22px;
}

.community-post-detail p,
.community-reply p {
  margin: 0 0 12px;
}

@media (min-width: 900px) {
  .community-post-detail,
  .community-form-panel,
  .account-profile-panel,
  .community-post-detail + .community-section {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }
  .community-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
    max-width: 1160px;
    margin-inline: auto;
  }
  .community-board-panel { margin: 0; }
  .community-sidebar { position: sticky; top: 16px; }
}

.community-layout {
  display: grid;
  gap: 16px;
}

.community-sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
}

.community-side-card h3 {
  margin: 0 0 12px;
  color: var(--ink-1);
  font-size: 15px;
}

.community-side-card p {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}

.community-side-list {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.community-side-list a {
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
}

.community-side-list a:hover {
  color: var(--accent);
}

.community-side-empty {
  color: var(--ink-3);
  font-size: 13px;
}

.community-side-more {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.community-side-actions {
  display: flex;
  gap: 10px;
}

.community-form {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin-top: 18px;
}

.community-form label {
  display: grid;
  gap: 7px;
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 700;
}

.community-form input,
.community-form select,
.community-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--ink-1);
  font: inherit;
  padding: 10px 12px;
  box-sizing: border-box;
}

.community-form textarea {
  min-height: 150px;
  resize: vertical;
}

.form-helper {
  margin: -6px 0 2px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

.community-post-detail {
  padding: 20px;
}

.community-post-detail h1 {
  margin: 12px 0;
  color: var(--ink-1);
  font-size: 28px;
  line-height: 1.25;
}

.community-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.community-admin-actions form {
  margin: 0;
}

.community-admin-actions button {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--ink-1);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
}

.community-admin-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.community-admin-operations {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}

.community-admin-filter-panel[open] {
  border-color: rgba(181, 87, 47, 0.28);
  background: rgba(181, 87, 47, 0.04);
}

.community-admin-utility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.community-admin-utility {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card-soft);
}

.community-admin-utility summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}

.community-admin-utility summary::-webkit-details-marker {
  display: none;
}

.community-admin-utility summary strong {
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 900;
}

.community-admin-utility summary span {
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
}

.community-admin-utility[open] summary {
  border-bottom: 1px solid var(--line);
}

.community-admin-utility .community-admin-bulk,
.community-admin-utility .community-admin-email-tools {
  margin: 0;
  padding: 12px;
}

.community-admin-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 10px 0 12px;
}

.community-admin-bulk label {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.community-admin-bulk input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--ink-1);
  font: inherit;
  padding: 8px 10px;
}

.community-admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: var(--bg-card);
  color: var(--ink-2);
  font-size: 13px;
}

.community-admin-table th,
.community-admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.community-admin-table th {
  background: var(--bg-soft);
  color: var(--ink-1);
  font-weight: 800;
}

.community-admin-table td span {
  display: block;
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 12px;
}

.approval-pending-users-table {
  min-width: 1040px;
  line-height: 1.35;
}

.approval-pending-users-table th:last-child,
.approval-pending-users-table td:last-child {
  width: 190px;
}

.approval-pending-users-table th,
.approval-pending-users-table td {
  padding-top: 7px;
  padding-bottom: 7px;
}

.approval-pending-users-table td {
  vertical-align: middle;
}

.approval-pending-users-table td span {
  display: inline;
  margin-top: 0;
}

.approval-pending-actions {
  display: grid;
  gap: 6px;
  margin-top: 0;
}

.approval-pending-button-row {
  display: grid;
  grid-template-columns: 74px minmax(82px, 1fr);
  gap: 6px;
  align-items: center;
}

.approval-pending-button-row > form {
  display: contents;
}

.approval-pending-reject-panel {
  position: relative;
  min-width: 0;
}

.approval-pending-reject-panel summary {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--ink-1);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  list-style: none;
  padding: 6px 9px;
  text-align: center;
}

.approval-pending-reject-panel summary::-webkit-details-marker {
  display: none;
}

.approval-pending-reject-panel[open] {
  z-index: 20;
}

.approval-pending-reject-panel[open] summary {
  border-color: var(--accent);
  color: var(--accent);
}

.approval-pending-reject-form {
  position: absolute;
  top: calc(100% + 6px);
  right: max(0px, calc(690px - 100vw));
  z-index: 30;
  display: grid;
  gap: 6px;
  width: min(260px, calc(100vw - 48px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: var(--shadow-2);
}

.approval-pending-actions input[name="reject_reason"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--ink-1);
  font: inherit;
  font-size: 12px;
  padding: 6px 9px;
}

.approval-pending-actions button {
  width: 100%;
  border-radius: var(--radius-sm);
  padding-top: 6px;
  padding-bottom: 6px;
}

.approval-pending-users-table .community-admin-user-detail {
  display: inline;
  margin-left: 8px;
}

.approval-pending-users-table .community-admin-user-detail summary {
  display: inline;
  font-size: 12px;
}

.community-admin-user-detail summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 800;
  list-style: none;
  white-space: nowrap;
}

.community-admin-user-detail summary::-webkit-details-marker {
  display: none;
}

.community-admin-user-detail dl {
  display: grid;
  gap: 8px;
  min-width: 240px;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}

.community-admin-user-detail dl div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
}

.community-admin-user-detail dt,
.community-admin-user-detail dd {
  margin: 0;
}

.community-admin-user-detail dt {
  color: var(--ink-3);
  font-weight: 700;
}

.community-admin-user-detail dd {
  color: var(--ink-1);
  font-weight: 800;
  word-break: break-word;
}

.community-admin-actions-compact {
  gap: 6px;
  margin-top: 0;
}

.community-admin-actions-compact button {
  padding: 5px 8px;
  font-size: 12px;
}

.community-admin-event-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
  gap: 10px;
}

.community-admin-event-card {
  width: min(100%, 420px);
}

.community-admin-history {
  margin-top: 12px;
}

.community-admin-history summary {
  cursor: pointer;
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 800;
}

.community-admin-history .community-admin-event-list {
  margin-top: 10px;
}

.convertible-course-panel,
.convertible-toc-panel,
.convertible-chapter {
  background: var(--bg-card);
}

.convertible-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.convertible-course-meta span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-card-soft);
}

.convertible-toc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.convertible-toc-card {
  display: grid;
  gap: 6px;
  min-height: 138px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  background: var(--bg-card-soft);
}

.convertible-toc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.convertible-toc-card span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 800;
}

.convertible-toc-card strong {
  color: var(--ink-1);
  font-size: 16px;
  line-height: 1.35;
}

.convertible-toc-card em {
  color: var(--ink-2);
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.convertible-chapter-list {
  display: grid;
  gap: 18px;
}

.convertible-chapter {
  scroll-margin-top: 96px;
}

.convertible-chapter h2 {
  max-width: 820px;
  margin: 0 0 18px;
  color: var(--ink-1);
  font-size: 24px;
  line-height: 1.35;
}

.article-upload-date {
  margin: -6px 0 18px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 700;
}

.convertible-article-body {
  max-width: 860px;
  color: var(--ink-1);
}

.convertible-article-body h3 {
  margin: 24px 0 10px;
  color: var(--ink-1);
  font-size: 18px;
  line-height: 1.45;
}

.convertible-article-body h4 {
  margin: 18px 0 8px;
  color: var(--ink-1);
  font-size: 15px;
}

.convertible-article-body p,
.convertible-article-body li {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.9;
}

.convertible-article-body p {
  margin: 0 0 12px;
}

.convertible-article-body ul,
.convertible-article-body ol {
  margin: 0 0 14px 22px;
  padding: 0;
}

.convertible-article-body .convertible-summary,
.convertible-article-body .convertible-risk,
.convertible-article-body .convertible-next {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card-soft);
}

.convertible-article-body .convertible-risk {
  color: var(--danger);
}

/* Home temperature (legacy) */
.home-temperature-strip { margin-bottom: 16px; padding: 14px 16px; }

.home-temperature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-temperature-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card-soft);
}

.home-temperature-card span { color: var(--ink-2); font-size: 11px; letter-spacing: 0; text-transform: none; }
.home-temperature-card strong { min-height: 38px; font-size: clamp(18px, 2.2vw, 24px); font-weight: 600; letter-spacing: -0.022em; }
.home-temperature-card .button-link { align-self: end; justify-self: start; margin-top: auto; padding: 5px 11px; font-size: 12px; }

.home-temperature-updated { margin: 8px 2px 0; color: var(--ink-2); font-size: 12px; }

/* Promo grid */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.promo-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 18px;
  box-shadow: var(--shadow-1);
}

.promo-card-qr { display: grid; gap: 10px; justify-items: center; }
.promo-card-broker { display: grid; align-items: center; min-height: 280px; }

.promo-qr-image, .promo-broker-image, .admin-preview-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  object-fit: cover;
}

.promo-caption {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  text-align: center;
  line-height: 1.7;
}

.promo-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-card-soft);
  color: var(--ink-2);
  padding: 20px;
}

.promo-placeholder p { margin: 0; }
.admin-placeholder { min-height: 180px; }
.admin-minimal-panel { padding: 18px 22px; }
.admin-minimal-note { margin: 0; color: var(--ink-2); font-size: 13px; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  align-items: start;
}

/* ---------- 22. Forms ---------- */
label {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  background: var(--bg-card);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-1);
  transition: border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}

.stack-form, .grid-form, .filter-row, .inline-form {
  display: grid;
  gap: 12px;
}

.grid-form, .filter-row {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.inline-form {
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  margin-bottom: 6px;
}

.upload-form, .export-box {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-card-soft);
  border: 1px solid var(--line);
}

.promo-toggle-form {
  grid-template-columns: minmax(220px, max-content);
  justify-content: start;
  margin-bottom: 8px;
}

.export-box p { margin: 0; color: var(--ink-2); }

.panel[id] { scroll-margin-top: 128px; }

/* ---------- 23. Misc / Notes ---------- */
.backtest-overview {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 14px;
  font-size: 14px;
  color: var(--ink-2);
}

.mini-note { color: var(--ink-2); font-size: 13px; }
.admin-anchors { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.anchor-note { color: var(--ink-2); font-size: 13px; }
.rollback-form { margin-bottom: 14px; }

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.note-grid.note-grid-muted { margin-top: 12px; }

.note-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-card-soft);
  border: 1px solid var(--line-soft);
}

.note-card strong {
  display: block;
  margin-bottom: 6px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-1);
}

.note-card p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.7;
  font-size: 13px;
}

/* Type indicator dot (premium/discount) */
.type-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

.type-dot.discount { background: var(--down); }
.type-dot.premium { background: var(--up); }
.type-dot.neutral { background: var(--accent); }

.type-cell {
  display: inline-flex;
  align-items: center;
}

.arbitrage-tip-resource {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.arbitrage-tip-resource .contact-qr-image {
  max-width: 96px;
}

.arbitrage-tip-resource-copy {
  display: grid;
  gap: 4px;
}

.arbitrage-tip-resource-copy strong {
  font-size: 14px;
  color: var(--ink-1);
}

.arbitrage-tip-resource-copy p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

/* Lucide icon sizing */
.lucide, [data-lucide] {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.lucide-sm { width: 14px; height: 14px; }
.lucide-lg { width: 20px; height: 20px; }

/* ---------- 24. Footer ---------- */
.site-footer {
  margin: 28px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
  text-align: center;
}

.site-footer p { margin: 0; line-height: 1.7; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--ink-2);
  font-weight: 500;
}

/* ---------- 25. Scrollbars ---------- */
.table-wrap::-webkit-scrollbar,
nav::-webkit-scrollbar { height: 8px; width: 8px; }

.table-wrap::-webkit-scrollbar-thumb,
nav::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.table-wrap::-webkit-scrollbar-thumb:hover,
nav::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  background-clip: padding-box;
  border: 2px solid transparent;
}

.table-wrap::-webkit-scrollbar-track,
nav::-webkit-scrollbar-track { background: transparent; }

.table-wrap, nav {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar) transparent;
}

/* ---------- 26. Responsive ---------- */
@media (max-width: 900px) {
  .page-shell {
    width: min(100%, calc(100% - 24px));
  }

  .hero, .metrics { grid-template-columns: 1fr; }

  .topbar {
    flex-direction: column;
    align-items: start;
    gap: 12px;
    padding: 12px 16px;
  }

  .section-head, .backtest-overview, .section-head.section-head-split {
    flex-direction: column;
    align-items: start;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }

  nav a { flex: 0 0 auto; white-space: nowrap; }

  .topbar-account {
    align-self: flex-end;
    max-width: 100%;
    box-sizing: border-box;
  }

  .panel.panel-primary,
  .panel.panel-secondary,
  .panel.arbitrage-table-panel,
  .education-home-panel,
  .community-home-panel,
  .sponsor-panel,
  .home-arbitrage-panel.panel-primary,
  .contact-panel.panel-secondary { padding: 18px 16px; }

  .panel, .auth-card, .hero { padding: 18px; }

  .home-portal-hero,
  .home-small-row { grid-template-columns: 1fr; }
  .home-portal-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .education-topic-grid { grid-template-columns: 1fr; }
  .education-topic-card { min-height: auto; }
  .community-home-panel,
  .sponsor-grid,
  .account-profile-grid { grid-template-columns: 1fr; }
  .approval-dashboard-grid,
  .approval-premium-overview,
  .approval-queue-grid {
    grid-template-columns: 1fr;
  }
  .approval-premium-toolbar,
  .approval-premium-quick-actions,
  .approval-premium-open-actions,
  .community-admin-utility-grid {
    grid-template-columns: 1fr;
  }
  .approval-premium-workspace-head {
    align-items: flex-start;
    display: grid;
  }
  .approval-premium-open-card-head {
    display: grid;
  }
  .approval-premium-open-meta {
    grid-template-columns: 1fr;
  }
  .approval-premium-quick-actions {
    min-width: 0;
  }
  .approval-workbench-section-head {
    display: grid;
  }
  .account-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
    padding: 14px;
  }
  .account-avatar {
    grid-row: auto;
    width: 52px;
    height: 52px;
    font-size: 23px;
  }
  .account-identity-main {
    grid-row: auto;
  }
  .account-identity-meta,
  .account-identity-badge {
    display: none;
  }
  .account-side-panel {
    padding: 12px;
  }
  .account-side-head {
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 4px 10px;
    padding: 8px 4px 12px;
  }
  .account-side-head em {
    grid-column: 1 / -1;
  }
  .account-menu {
    display: grid;
    gap: 4px;
    overflow: visible;
    padding-bottom: 0;
  }
  .account-menu-group {
    min-width: 0;
  }
  .account-menu-group.is-active {
    min-width: 0;
  }
  .account-menu-group.is-active > .account-menu-link[href="/account"] {
    display: none;
  }
  .account-menu-link {
    min-height: 44px;
    padding: 0 12px;
  }
  .account-menu-link::before {
    display: none;
  }
  .account-submenu {
    margin: 0 0 4px 0;
    padding: 0 0 0 12px;
  }
  .account-submenu-link {
    min-height: 40px;
    padding: 0 12px;
  }
  .account-menu-logout {
    padding-top: 12px;
  }
  .account-menu-logout button {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
  }
  .account-content {
    padding: 16px;
  }
  .account-section-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
  .account-detail-list > div {
    display: grid;
    grid-template-columns: minmax(88px, 0.65fr) minmax(0, 1.35fr);
    gap: 6px 12px;
    padding: 12px;
  }
  .account-detail-list dd {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
  }
  .account-edit-layout,
  .account-edit-grid {
    grid-template-columns: 1fr;
  }
  .account-profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .community-search-form,
  .community-admin-search {
    align-items: stretch;
    flex-direction: column;
  }
  .community-home-actions,
  .community-user-bar,
  .community-admin-actions {
    justify-content: start;
  }
  .community-form { max-width: none; }
  .community-floating-action {
    right: 16px;
    bottom: 76px;
  }
  .community-post-list,
  .community-reply-list { padding-bottom: 72px; }
  .daily-writing-card,
  .daily-writing-card .article-directory-list { grid-template-columns: 1fr; }
  .daily-writing-card { min-height: auto; }
  .convertible-toc-grid { grid-template-columns: 1fr; }
  .convertible-toc-card { min-height: auto; }
  .convertible-chapter h2 { font-size: 20px; }
  .convertible-article-body p,
  .convertible-article-body li { font-size: 14px; }

  .money-bond-watch-grid { grid-template-columns: 1fr; }
  .money-bond-refresh-meta { justify-items: start; }

  .promo-grid { grid-template-columns: 1fr; }
  .contact-card, .account-contact-card,
  .account-contact-grid, .account-stock-grid, .doc-grid { grid-template-columns: 1fr; }
  .account-fit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-audience-list { grid-template-columns: 1fr; }
  .contact-panel .contact-card.contact-card-slim { grid-template-columns: 1fr; gap: 12px; }
  .contact-card-qr { justify-content: start; }
  .contact-qr-image { max-width: 160px; }
  .tool-grid, .next-plan-grid { grid-template-columns: 1fr; }
  .account-open-body { grid-template-columns: 1fr; }

  .anchor-nav { top: auto; position: static; padding: 6px 0; margin-bottom: 12px; border-bottom: 0; background: transparent; backdrop-filter: none; }

  .table-wrap, .table-wrap.table-wrap-wide, .table-wrap.table-wrap-compact {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .wide-table { min-width: 1160px; }
  .arbitrage-table { min-width: 942px; }
  .wide-table.arbitrage-table { width: 1046px; min-width: 1046px; }
  .closed-fund-head { align-items: stretch; flex-direction: column; }
  .closed-fund-table { width: 1040px; min-width: 1040px; }
  .note-grid { grid-template-columns: 1fr; }
  .account-related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page-shell {
    width: calc(100% - 8px);
    padding-bottom: 40px;
  }

  .topbar, .panel, .hero, .auth-card { padding: 16px; }
  .topbar { padding: 10px 8px; }
  .topbar { gap: 8px; margin-bottom: 10px; }
  .brand-block { width: 100%; }
  .brand-block::before {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 17px;
  }

  .brand-name { font-size: 19px; }
  .brand-subtitle { font-size: 12px; line-height: 1.35; }

  nav { padding-bottom: 2px; }
  nav a { font-size: 13px; padding: 6px 9px; }
  .anchor-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .anchor-nav a { flex: 0 0 auto; }

  .section-head { gap: 8px; margin-bottom: 12px; }
  .section-head h3 { font-size: 17px; }
  .section-head h2 { font-size: 20px; }
  .section-head p { font-size: 12px; line-height: 1.6; }
  .home-portal-hero { gap: 12px; padding: 16px; }
  .home-portal-copy { gap: 8px; }
  .home-portal-copy h1 { font-size: 28px; line-height: 1.1; }
  .home-portal-copy p:not(.section-kicker) { font-size: 14px; line-height: 1.55; }
  .home-portal-actions { gap: 8px; margin-top: 2px; }
  .home-portal-brief { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home-portal-brief > div { min-height: 68px; padding: 10px; }
  .home-portal-brief span { font-size: 11px; }
  .home-portal-brief strong { font-size: 14px; }
  .home-portal-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home-portal-action { min-height: 82px; padding: 10px; grid-template-columns: 24px minmax(0, 1fr); }
  .home-portal-action .lucide { width: 17px; height: 17px; }
  .home-portal-action strong { font-size: 13px; }
  .home-portal-action span { font-size: 11px; line-height: 1.35; }
  .home-data-list > div { grid-template-columns: 1fr; gap: 4px; }
  .home-process-steps { grid-template-columns: 1fr; }
  .ad-detail-body {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .ad-detail-qr { justify-items: start; }

  .editorial-strip article, .terminal-stat,
  .editorial-strip-inline article { padding: 5px 10px; font-size: 12px; }
  .editorial-strip strong, .terminal-stat strong,
  .editorial-strip-inline strong { font-size: 12px; }

  .metrics { gap: 10px; margin-bottom: 16px; }
  .metric-card, .flash, .next-plan-card,
  .note-card, .account-fit-card, .doc-card { padding: 14px; }
  .account-fit-grid, .account-audience-list { grid-template-columns: 1fr; }
  .account-article-attachment { align-items: stretch; flex-direction: column; }
  .account-article-attachment a { width: fit-content; }
  .metric-card strong { font-size: 21px; }
  .status-strip { margin: 0 0 12px; }
  .next-plan-date { margin-bottom: 10px; font-size: 14px; }
  .next-plan-grid { gap: 10px; }
  .next-plan-card p { margin-bottom: 6px; font-size: 14px; }

  .next-plan-numbers, .contact-card-copy p,
  .account-contact-copy, .account-audience-list > li > strong,
  .account-audience-list span, .account-stock-copy p,
  .doc-card p, .panel-note-list p { font-size: 13px; }

  .button-link, button { padding: 7px 14px; font-size: 13px; }
  .table-wrap { max-width: 100%; }
  .table-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 22px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--bg-card));
  }
  table { min-width: 640px; }
  th, td { padding: 10px 10px; font-size: 13px; }
  th { font-size: 12px; }
  .wide-table { min-width: 900px; }
  .money-bond-watch-table { min-width: 620px; }
  .arbitrage-table { min-width: 762px; }
  .wide-table.arbitrage-table { width: 866px; min-width: 866px; }
  .closed-fund-subtabs { width: fit-content; }
  .closed-fund-table { width: 980px; min-width: 980px; }
  .arbitrage-table th, .arbitrage-table td { padding: 8px 6px; font-size: 12px; }
  .closed-fund-table th, .closed-fund-table td { padding: 8px 6px; font-size: 12px; }

  .arbitrage-table td:nth-child(3),
  .arbitrage-table td:nth-child(4),
  .arbitrage-table td:nth-child(5),
  .arbitrage-table td:nth-child(6),
  .arbitrage-table td:nth-child(7),
  .arbitrage-table td:nth-child(8),
  .arbitrage-table td:nth-child(9),
  .arbitrage-table td:nth-child(10),
  .arbitrage-table td:nth-child(11),
  .arbitrage-table td:nth-child(12),
  .arbitrage-table td:nth-child(13),
  .arbitrage-table td:nth-child(14) { font-size: 11px; }

  .home-arbitrage-panel .table-wrap.table-wrap-compact {
    overflow-x: visible;
  }

  .home-arbitrage-panel .table-wrap.table-wrap-compact::after {
    display: none;
  }

  .home-arbitrage-panel .arbitrage-table { min-width: 0; width: 100%; }
  .home-arbitrage-panel .arbitrage-table thead { display: none; }
  .home-arbitrage-panel .arbitrage-table tbody {
    display: grid;
    gap: 10px;
  }
  .home-arbitrage-panel .arbitrage-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .home-arbitrage-panel .arbitrage-table tbody td { display: flex; justify-content: space-between; gap: 10px; }
  .home-arbitrage-panel .arbitrage-table tbody td::before { content: attr(data-label); flex: 0 0 auto; color: var(--ink-2); font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0; }
  .home-arbitrage-panel .arbitrage-table tbody td:nth-child(1),
  .home-arbitrage-panel .arbitrage-table tbody td:nth-child(2) {
    justify-content: flex-start;
  }
  .home-arbitrage-panel .arbitrage-table tbody td:nth-child(2) { grid-column: 1 / -1; }
  .home-arbitrage-panel .arbitrage-table tbody td:nth-child(4),
  .home-arbitrage-panel .arbitrage-table tbody td:nth-child(5),
  .home-arbitrage-panel .arbitrage-table tbody td:nth-child(6) {
    text-align: right;
  }
  .home-arbitrage-panel .arbitrage-table tbody tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .home-arbitrage-panel .arbitrage-table tbody tr:last-child {
    border-bottom: 0;
  }
  .home-initial-screen-item { grid-template-columns: 1fr; }
  .home-initial-screen-item > div:last-child { display: grid; gap: 3px; }

  /* LOF 主观察表在手机端保持完整表格，并保留顶部排序入口。 */
  #lof-arbitrage-table-view > .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #lof-arbitrage-table-view > .table-wrap > .arbitrage-table {
    display: table;
    min-width: 1120px;
  }
  #lof-arbitrage-table-view .lof-mobile-sort-controls { display: flex; }
  #lof-arbitrage-table-view .lof-mobile-sort-controls {
    position: sticky;
    /* The mobile topbar is about 136px tall when stacked vertically. */
    top: 160px;
    z-index: 6;
    padding: 6px 0;
    background: var(--bg-card);
  }
  #lof-arbitrage-table-view .arbitrage-table {
    --sticky-favorite-width: 48px;
    --sticky-name-width: 136px;
    --sticky-code-width: 76px;
  }
  #lof-arbitrage-table-view .arbitrage-view-tab,
  .arbitrage-section-tab { min-height: 44px; }
  .sort-toggle, .sort-button { width: 44px; height: 44px; min-width: 44px; margin-left: 4px; }

  /* 首页保持内容完整，只收紧重复留白和窄屏卡片间距。 */
  .home-portal-hero { gap: 10px; padding: 14px; }
  .home-portal-copy { gap: 7px; }
  .home-portal-actions { gap: 8px; margin-top: 0; }
  .home-small-row { gap: 10px; }
  .education-home-panel { gap: 12px; padding: 16px 14px; }
  .home-data-list > div { padding: 9px 0; }
  .contact-qr-image { max-width: 128px; }

  .account-table-wrap, .futures-table-shell, .table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  .account-open-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .account-open-wechat { justify-content: flex-start; }
  .broker-public-preview-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .broker-public-table { min-width: 620px; }
  .broker-public-table th,
  .broker-public-table td { padding: 9px 8px; font-size: 12px; }
  .broker-public-detail-panel { padding: 10px 12px 12px; }
  .broker-public-detail-panel dl { grid-template-columns: 1fr; }
  .broker-public-detail-panel dl div { grid-template-columns: 76px 1fr; }
  .futures-recommend-table { min-width: 640px; }
  .doc-article-link { align-items: flex-start; flex-wrap: wrap; }
  .account-article { max-width: 100%; }
}

@media (max-width: 380px) {
  .home-portal-action-grid { grid-template-columns: 1fr; }
  .home-portal-brief { grid-template-columns: 1fr; }
  .account-identity {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

/* ---------- 27. Print ---------- */
@media print {
  body { background: #fff; animation: none; }
  .topbar, .site-footer, nav, .button-link, .anchor-nav,
  .sort-button, .sort-toggle, .refresh-btn { display: none !important; }
  .panel, .topbar, .auth-card {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: none;
    background: #fff;
    page-break-inside: avoid;
  }
  table, .arbitrage-table { min-width: 0 !important; }
  .arbitrage-table th, .arbitrage-table td {
    position: static !important;
    box-shadow: none !important;
  }
}

/* ---------- 28. High Contrast ---------- */
@media (prefers-contrast: more) {
  :root {
    --line: rgba(0, 0, 0, 0.22);
    --ink-2: #444;
  }
}

/* =========================================================
   LOF-LY · 高级感增强层 (Premium polish, June 2026)
   仅增强视觉与微交互；不改变页面内容与 DOM 结构。
   如需回退，删除本段（从此注释到文件末尾）即可。
   ========================================================= */

:root {
  --accent-2: #5e5ce6;
  --grad-accent: linear-gradient(135deg, var(--accent) 0%, #4f7cff 52%, var(--accent-2) 100%);
  --premium-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-soft:
    0 1px 1px rgba(16, 18, 27, 0.03),
    0 6px 16px rgba(16, 18, 27, 0.05),
    0 22px 44px rgba(16, 18, 27, 0.05);
  --shadow-lift:
    0 2px 4px rgba(16, 18, 27, 0.05),
    0 14px 30px rgba(16, 18, 27, 0.09),
    0 30px 60px rgba(16, 18, 27, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-2: #7d7aff;
    --shadow-soft:
      0 1px 1px rgba(0, 0, 0, 0.40),
      0 8px 22px rgba(0, 0, 0, 0.32),
      0 26px 52px rgba(0, 0, 0, 0.34);
    --shadow-lift:
      0 2px 6px rgba(0, 0, 0, 0.50),
      0 18px 40px rgba(0, 0, 0, 0.42),
      0 34px 68px rgba(0, 0, 0, 0.44);
  }
}

/* ---- Ambient background gradient（环境光，营造纵深） ---- */
body { position: relative; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 560px at 8% -10%, rgba(0, 113, 227, 0.07), transparent 58%),
    radial-gradient(960px 520px at 102% -4%, rgba(94, 92, 230, 0.06), transparent 55%);
}
@media (prefers-color-scheme: dark) {
  body::before {
    background:
      radial-gradient(1100px 560px at 8% -10%, rgba(41, 151, 255, 0.12), transparent 58%),
      radial-gradient(960px 520px at 102% -4%, rgba(125, 122, 255, 0.10), transparent 55%);
  }
}

/* ---- Topbar：品牌徽标 + 分段式导航 ---- */
.topbar { box-shadow: 0 1px 0 var(--line-soft); }

.brand-block {
  grid-template-columns: auto 1fr;
  grid-template-areas: "mark name" "mark sub";
  align-items: center;
  column-gap: 12px;
}
.brand-block::before {
  content: "路";
  grid-area: mark;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--grad-accent);
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.30);
}
.brand-name { grid-area: name; }
.brand-subtitle { grid-area: sub; }

nav {
  padding: 3px;
  background: var(--bg-active);
  border-radius: var(--radius-pill);
}
nav a { transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
nav a.active {
  background: var(--bg-card);
  box-shadow: var(--shadow-1);
}

/* ---- Panels：柔和分层阴影 ---- */
.panel, .auth-card { box-shadow: var(--shadow-soft); }

/* ---- Section kicker：强调短线 + 字距 ---- */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  letter-spacing: 0.16em;
  font-size: 11px;
}
.section-kicker::before {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-accent);
}

/* ---- Hero：放大标题、纵深背景 ---- */
.education-home-panel {
  padding: 40px 40px 34px;
  background:
    linear-gradient(180deg, var(--bg-accent-softer), transparent 42%),
    var(--bg-card);
  overflow: hidden;
}
.education-home-head h1 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 12px;
}
.education-home-head p:last-child {
  font-size: 15px;
  max-width: 68ch;
}

/* ---- Topic cards：徽章、悬浮抬升、顶部渐变描边 ---- */
.education-topic-grid { gap: 18px; }
.education-topic-card {
  position: relative;
  padding: 24px 22px;
  background: var(--bg-card);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition:
    transform 380ms var(--premium-ease),
    box-shadow 380ms var(--premium-ease),
    border-color 380ms var(--premium-ease);
}
.education-topic-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-accent);
  opacity: 0;
  transition: opacity 380ms var(--premium-ease);
}
.education-topic-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
}
.education-topic-card:hover::before { opacity: 1; }
.education-topic-card > span:first-child {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.education-topic-card h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* ---- Article directory：日期胶囊 + 悬浮位移 ---- */
.article-directory-list a,
.article-directory-extra a {
  background: var(--bg-card-soft);
  border-color: var(--line-soft);
  transition:
    transform 240ms var(--premium-ease),
    border-color 240ms var(--premium-ease),
    background-color 240ms var(--premium-ease),
    box-shadow 240ms var(--premium-ease);
}
.article-directory-list a:hover,
.article-directory-extra a:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--bg-card);
  box-shadow: var(--shadow-1);
  transform: translateX(3px);
}
.article-directory-list a span,
.article-directory-extra a span {
  justify-self: start;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ---- Ad carousel & daily writing：统一柔和卡片 ---- */
.ad-carousel,
.daily-writing-card {
  box-shadow: var(--shadow-soft);
  background: var(--bg-card);
}
.ad-slide > span:first-child {
  justify-self: start;
  display: inline-flex;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-accent-soft);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.ad-dot {
  transition: background 240ms var(--premium-ease), width 240ms var(--premium-ease);
}
.ad-dot.is-active {
  width: 32px;
  background: var(--grad-accent);
  box-shadow: 0 0 0 1px rgba(0, 113, 227, 0.18);
}

/* ---- Footer：顶部渐隐分隔线 ---- */
.site-footer {
  position: relative;
  border-top: 0;
  margin-top: 40px;
  padding-top: 24px;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 640px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.footer-links a { transition: color var(--t-fast) var(--ease); }
.footer-links a:hover { color: var(--accent); }

/* ---- 通用：链接型主按钮的渐变质感（不影响 soft / ghost / 圆点） ---- */
.button-link:not(.button-link-soft):not(.button-link-ghost):not(.ad-dot),
.btn:not(.btn-soft) {
  background-image: var(--grad-accent);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.18);
}

/* ---- 进入动效：首页面板依次淡入上浮 ---- */
@media (prefers-reduced-motion: no-preference) {
  .education-home-panel,
  .community-home-panel,
  .sponsor-panel,
  .ad-placement-panel,
  .daily-writing-panel {
    animation: premium-rise 620ms var(--premium-ease) both;
  }
  .community-home-panel { animation-delay: 80ms; }
  .sponsor-panel { animation-delay: 150ms; }
  .ad-placement-panel { animation-delay: 80ms; }
  .daily-writing-panel { animation-delay: 150ms; }
  @keyframes premium-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ---- 移动端：保持 hero 充裕留白但不溢出 ---- */
@media (max-width: 720px) {
  .education-home-panel { padding: 28px 20px 24px; }
  .education-topic-card { padding: 20px 18px; }
}

/* =========================================================
   白色 · 赤陶 Apple 层 (Clean White + Terracotta, June 2026)
   纯白苹果官网风；强调色改暖赤陶（去蓝）；强制浅色，不随系统切换。
   叠加在「高级层」之上：重新着色 + 滚动淡入交互。
   回退：删除本段（到文件末尾）。
   ========================================================= */

:root {
  color-scheme: light;

  /* 背景（白 + 极浅灰，Apple） */
  --bg-page: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-soft: #fafafa;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-active: rgba(0, 0, 0, 0.06);
  --bg-nav: rgba(255, 255, 255, 0.72);
  --bg-accent-soft: rgba(181, 80, 43, 0.10);
  --bg-accent-softer: rgba(181, 80, 43, 0.05);

  /* 文字（Apple 近黑） */
  --ink-1: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #a1a1a6;

  /* 强调：暖赤陶（呼应品牌 #8f3d24，去蓝） */
  --accent: #b5502b;
  --accent-strong: #98401f;
  --accent-hover: #c75f37;
  --accent-2: #dd8a4a;
  --grad-accent: linear-gradient(135deg, #b5502b 0%, #cf6a39 55%, #dd8a4a 122%);

  /* 分隔线 */
  --line: rgba(0, 0, 0, 0.08);
  --line-soft: rgba(0, 0, 0, 0.05);
  --line-strong: rgba(0, 0, 0, 0.14);

  /* 涨跌（A股口径 涨红跌绿，浅底配色） */
  --up: #e02d2d;
  --down: #00875a;
  --warn: #b42318;

  /* 阴影（柔和浅色） */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.06), 0 16px 32px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 1px 1px rgba(16, 18, 27, 0.03), 0 6px 16px rgba(16, 18, 27, 0.05), 0 22px 44px rgba(16, 18, 27, 0.05);
  --shadow-lift: 0 2px 4px rgba(16, 18, 27, 0.05), 0 14px 30px rgba(16, 18, 27, 0.09), 0 30px 60px rgba(16, 18, 27, 0.10);
  --scrollbar: rgba(0, 0, 0, 0.18);
}

/* 强制浅色：覆盖系统暗色下的 token */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #f5f5f7;
    --bg-card: #ffffff;
    --bg-card-soft: #fafafa;
    --bg-nav: rgba(255, 255, 255, 0.72);
    --ink-1: #1d1d1f;
    --ink-2: #6e6e73;
    --ink-3: #a1a1a6;
    --accent: #b5502b;
    --accent-strong: #98401f;
    --accent-2: #dd8a4a;
    --line: rgba(0, 0, 0, 0.08);
    --line-strong: rgba(0, 0, 0, 0.14);
    --up: #e02d2d;
    --down: #00875a;
    --shadow-soft: 0 1px 1px rgba(16, 18, 27, 0.03), 0 6px 16px rgba(16, 18, 27, 0.05), 0 22px 44px rgba(16, 18, 27, 0.05);
    --shadow-lift: 0 2px 4px rgba(16, 18, 27, 0.05), 0 14px 30px rgba(16, 18, 27, 0.09), 0 30px 60px rgba(16, 18, 27, 0.10);
  }
}

/* 页面环境光：极淡暖色顶光（Apple 趋于纯净，点到为止） */
body::before {
  background: radial-gradient(1100px 520px at 50% -12%, rgba(181, 80, 43, 0.05), transparent 60%);
}

/* 品牌徽标暖色阴影 */
.brand-block::before {
  box-shadow: 0 4px 12px rgba(181, 80, 43, 0.26);
}

/* 修正全部硬编码蓝 → 赤陶 */
a:focus-visible, button:focus-visible, .button-link:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(181, 80, 43, 0.28);
}
.btn:hover, button:hover, .button-link:hover {
  box-shadow: 0 4px 14px rgba(181, 80, 43, 0.20);
}
.button-link.button-link-soft:hover,
.btn-soft:hover {
  background: rgba(181, 80, 43, 0.14);
  color: var(--accent-strong);
}
.flash { border-color: rgba(181, 80, 43, 0.22); }
.ad-dot.is-active { box-shadow: 0 0 0 1px rgba(181, 80, 43, 0.18); }

/* ---- 滚动淡入（Apple 官网式，克制） ---- */
/* 旧的载入即播放动画交给滚动淡入统一处理 */
.education-home-panel,
.community-home-panel,
.sponsor-panel,
.ad-placement-panel,
.daily-writing-panel { animation: none; }

.reveal-ready .panel,
.reveal-ready .editorial-strip,
.reveal-ready .account-card {
  transition: opacity 0.7s var(--premium-ease), transform 0.7s var(--premium-ease);
  will-change: opacity, transform;
}
.reveal-ready .panel:not(.reveal-in),
.reveal-ready .editorial-strip:not(.reveal-in),
.reveal-ready .account-card:not(.reveal-in) {
  opacity: 0;
  transform: translateY(22px);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .panel,
  .reveal-ready .editorial-strip,
  .reveal-ready .account-card { opacity: 1 !important; transform: none !important; transition: none; }
}

/* 收尾：剩余两处硬编码蓝 hover 底色 → 赤陶 */
.refresh-btn:hover,
.account-article-attachment a:hover {
  background: rgba(181, 80, 43, 0.14);
}

/* ---- 资产收益页 ---- */
/* ===== 资产收益排行 · 精修（白底 Apple · 赤陶；保留周期表可追踪性） ===== */
.asset-return-board { display: grid; gap: 14px; background: var(--bg-card); }
.asset-return-matrix-wrap {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.asset-return-matrix-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0 10px;
  table-layout: fixed;
}
.asset-return-matrix-table th,
.asset-return-matrix-table td {
  padding: 0 4px;
  vertical-align: middle;
}
.asset-return-matrix-table thead th {
  padding: 0 8px 6px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: left;
}
.asset-return-matrix-table thead th:not(:first-child) { text-align: left; }

/* 年份行首：干净大数字 + 小标签，竖向发丝线分隔（不再黑底） */
.asset-return-matrix-table tbody th {
  width: 104px;
  padding: 8px 16px 8px 6px;
  text-align: left;
  vertical-align: middle;
  background: transparent;
  border-right: 1px solid var(--line);
}
.asset-return-year-main {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.asset-return-matrix-table tbody th em {
  display: block;
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

/* 资产格：资产色淡调底 + 左侧资产色条做身份标识；克制、易扫读 */
.asset-return-rank-cell {
  position: relative;
  display: grid;
  grid-template-areas:
    "index value"
    "name value";
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 10px;
  min-height: 60px;
  padding: 9px 12px 9px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  text-align: left;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.asset-return-rank-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--ar-accent, var(--ink-3));
}
.asset-return-rank-cell:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
  border-color: color-mix(in srgb, var(--ar-accent, var(--ink-3)) 40%, var(--line));
}
.asset-return-rank-index {
  grid-area: index;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}
.asset-return-rank-name {
  grid-area: name;
  color: var(--ink-1);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
}
.asset-return-rank-value {
  grid-area: value;
  justify-self: end;
  color: var(--ink-1);
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* 收益值按全站口径 涨红跌绿 */
.asset-return-rank-cell.is-positive .asset-return-rank-value { color: var(--up); }
.asset-return-rank-cell.is-negative .asset-return-rank-value { color: var(--down); }
.asset-return-rank-cell.is-missing {
  --ar-accent: var(--line-strong);
  background: var(--bg-card-soft);
}
.asset-return-rank-cell.is-missing .asset-return-rank-name,
.asset-return-rank-cell.is-missing .asset-return-rank-value { color: var(--ink-3); font-weight: 600; }

/* 8 类资产 · 精修协调色板（低饱和、亮度一致）：左色条用本色，底用 ~9% 淡调 */
.asset-return-orange { --ar-accent: #e0843a; background: color-mix(in srgb, #e0843a 9%, var(--bg-card)); }
.asset-return-purple { --ar-accent: #8b78d6; background: color-mix(in srgb, #8b78d6 9%, var(--bg-card)); }
.asset-return-teal   { --ar-accent: #2fa39a; background: color-mix(in srgb, #2fa39a 9%, var(--bg-card)); }
.asset-return-red    { --ar-accent: #d4574e; background: color-mix(in srgb, #d4574e 9%, var(--bg-card)); }
.asset-return-yellow { --ar-accent: #d3a23a; background: color-mix(in srgb, #d3a23a 10%, var(--bg-card)); }
.asset-return-blue   { --ar-accent: #4a82c4; background: color-mix(in srgb, #4a82c4 9%, var(--bg-card)); }
.asset-return-green  { --ar-accent: #5a9e4b; background: color-mix(in srgb, #5a9e4b 9%, var(--bg-card)); }

.asset-return-single-panel,
.asset-return-interval-panel {
  border-color: rgba(181, 80, 43, 0.12);
  background: var(--bg-card);
}
.asset-return-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.asset-return-picker-button {
  position: relative;
  min-height: 38px;
  padding: 0 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ar-accent, var(--accent)) 8%, var(--bg-card));
  color: var(--ink-2);
  font-weight: 700;
}
.asset-return-picker-button::before,
.asset-return-interval-asset::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: var(--ar-accent, var(--accent));
  transform: translateY(-50%);
}
.asset-return-picker-button.is-active {
  border-color: color-mix(in srgb, var(--ar-accent, var(--accent)) 44%, var(--line));
  color: var(--ink-1);
  box-shadow: var(--shadow-1);
}
.asset-return-asset-cards {
  margin-top: 16px;
}
.asset-return-asset-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.asset-return-asset-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 18px 20px 4px;
}
.asset-return-asset-card-head h3 {
  position: relative;
  margin: 0;
  padding-left: 14px;
  color: var(--ink-1);
  font-size: 18px;
}
.asset-return-asset-card-head h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 4px;
  border-radius: 999px;
  background: var(--ar-accent, var(--accent));
}
.asset-return-asset-card-note { color: var(--ink-3); font-size: 12px; }
.asset-return-chart-wrap { border: 0; background: transparent; box-shadow: none; }

/* 年度收益柱状图（容器沿用 asset-return-asset-year-list；红涨绿跌，柱高=收益绝对值） */
.asset-return-asset-year-list {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 920px;
  margin: 0;
  padding: 14px 20px 18px;
  list-style: none;
}
.asset-return-asset-year-list li {
  flex: 1 1 0;
  min-width: 44px;
  display: grid;
  grid-template-rows: 18px 150px 16px;
  align-items: center;
  justify-items: center;
  gap: 6px;
}
.asset-return-bar-val {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.asset-return-asset-year-list .is-positive .asset-return-bar-val { color: var(--up); }
.asset-return-asset-year-list .is-negative .asset-return-bar-val { color: var(--down); }
.asset-return-bar-track {
  position: relative;
  width: 100%;
  height: 150px;
  align-self: stretch;
}
.asset-return-bar-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line);
}
.asset-return-bar-track i {
  position: absolute;
  left: 22%;
  right: 22%;
  min-height: 2px;
  transition: height 0.5s var(--ease);
}
.asset-return-asset-year-list .is-positive .asset-return-bar-track i {
  bottom: 50%;
  height: calc(var(--ar-h, 0%) * 0.5);
  border-radius: 4px 4px 0 0;
  background: var(--up);
}
.asset-return-asset-year-list .is-negative .asset-return-bar-track i {
  top: 50%;
  height: calc(var(--ar-h, 0%) * 0.5);
  border-radius: 0 0 4px 4px;
  background: var(--down);
}
.asset-return-asset-year-list .is-missing .asset-return-bar-track i { display: none; }
.asset-return-bar-year {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* 区间累计收益率 · 数值（独立保留） */
.asset-return-interval-value {
  color: var(--ink-1);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.asset-return-interval-value.is-positive { color: var(--up); }
.asset-return-interval-value.is-negative { color: var(--down); }
.asset-return-interval-value.is-missing { color: var(--ink-3); font-weight: 700; }
.asset-return-interval-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
.asset-return-interval-table th,
.asset-return-interval-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}
.asset-return-interval-table th:first-child,
.asset-return-interval-table td:first-child {
  text-align: left;
}
.asset-return-interval-table thead th {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.asset-return-interval-table tbody tr { transition: background-color 0.18s var(--ease); }
.asset-return-interval-table tbody tr:hover { background: var(--bg-card-soft); }
.asset-return-interval-table tbody td:first-child { border-radius: 10px 0 0 10px; }
.asset-return-interval-table tbody td:last-child { border-radius: 0 10px 10px 0; }
.asset-return-interval-asset {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-left: 14px;
  color: var(--ink-1);
  font-weight: 800;
}
.asset-return-interval-asset::before {
  left: 0;
}
.asset-return-interval-ann { font-weight: 700; opacity: 0.82; }

/* 自定义区间控件 */
.asset-return-range {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 18px;
}
.asset-return-range-pickers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.asset-return-range-pickers label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}
.asset-return-range-pickers select {
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.asset-return-range-arrow { color: var(--ink-3); font-weight: 700; }
.asset-return-range-label {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.asset-return-range-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.asset-return-range-presets button {
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.asset-return-range-presets button:hover {
  transform: none;
  color: var(--ink-1);
  border-color: var(--line-strong);
  box-shadow: none;
}
.asset-return-range-presets button.is-active {
  background: var(--bg-accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
}
.asset-return-risk-panel {
  border-color: rgba(181, 80, 43, 0.14);
  background: linear-gradient(180deg, var(--bg-card), rgba(181, 80, 43, 0.025));
}
.asset-return-warnings {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--warn);
}
.asset-return-risk-panel p,
.asset-return-empty {
  color: var(--ink-2);
  line-height: 1.8;
}

@media (max-width: 900px) {
  .asset-return-asset-year-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .asset-return-matrix-table { min-width: 920px; }
  .asset-return-rank-cell { min-height: 52px; }
  .asset-return-rank-value { font-size: 15px; }
  .asset-return-asset-year-list { grid-template-columns: 1fr; }
  .asset-return-interval-table { min-width: 680px; }
}

@media (max-width: 680px) {
  .lof-detail-title {
    padding: 14px 12px 10px;
  }

  .lof-detail-title h1 {
    font-size: 22px;
  }

  .lof-detail-title p {
    font-size: 13px;
  }

  .lof-detail-quote-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lof-detail-quote-item {
    padding: 10px 8px;
  }

  .lof-detail-quote-item span,
  .lof-detail-quote-item small {
    font-size: 11px;
  }

  .lof-detail-quote-item strong {
    font-size: 18px;
  }

  .lof-detail-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lof-detail-info-item,
  .lof-detail-info-item.is-wide {
    grid-template-columns: minmax(68px, max-content) minmax(0, 1fr);
    padding: 8px 10px;
  }

  .lof-detail-info-item:nth-child(2n) {
    border-right: 0;
  }

  .lof-detail-info-item.is-wide {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .lof-detail-info-item dd {
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .lof-detail-info-grid {
    grid-template-columns: 1fr;
  }

  .lof-detail-info-item,
  .lof-detail-info-item:nth-child(2n),
  .lof-detail-info-item.is-wide {
    grid-column: auto;
    border-right: 0;
  }
}

/* Unified arbitrage evidence views. */
.arbitrage-section-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 10px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.arbitrage-section-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--bg-card);
  font-weight: 700;
  cursor: pointer;
}

.arbitrage-section-tab.is-active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.arbitrage-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--ink-3);
  font-size: 12px;
}

.arbitrage-status-legend span,
.arbitrage-row-status {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
}

.arbitrage-lof-evidence {
  display: block;
  max-width: 150px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arbitrage-safety-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(181, 80, 43, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(181, 80, 43, 0.045);
}

.arbitrage-safety-banner > div,
.arbitrage-safety-banner dl div,
.arbitrage-source-meta,
.arbitrage-status-cell {
  display: grid;
  gap: 4px;
}

.arbitrage-safety-banner > div span,
.arbitrage-status-cell small,
.arbitrage-opportunity-table td:last-child small {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.5;
}

.arbitrage-safety-banner dl {
  display: flex;
  gap: 18px;
  margin: 0;
}

.arbitrage-safety-banner dt {
  color: var(--ink-3);
  font-size: 11px;
}

.arbitrage-safety-banner dd {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 800;
}

.arbitrage-opportunity-table {
  min-width: 920px;
}

.arbitrage-opportunity-table td:first-child strong,
.arbitrage-opportunity-table td:first-child span,
.arbitrage-opportunity-table td:last-child time,
.arbitrage-opportunity-table td:last-child small {
  display: block;
}

.arbitrage-empty-cell {
  padding: 28px 16px !important;
  color: var(--ink-3);
  text-align: center;
}

.arbitrage-source-meta {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--ink-3);
  font-size: 12px;
}

.arbitrage-category-view[hidden] {
  display: none;
}

.lof-initial-screen {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--bg-card));
}

.lof-initial-screen .section-head { margin-bottom: 0; }
.lof-initial-screen .section-head p:last-child { max-width: 900px; }
.lof-initial-screen-table { min-width: 760px; }
.lof-initial-screen-table td:first-child strong,
.lof-initial-screen-table td:first-child small { display: block; }
.lof-initial-screen-empty { margin: 0; }

@media (max-width: 640px) {
  .arbitrage-section-tabs { margin-inline: -4px; padding-inline: 4px; }
  .arbitrage-section-tab { min-height: 44px; padding: 6px 12px; font-size: 13px; }
  .arbitrage-safety-banner { grid-template-columns: 1fr; gap: 12px; }
  .arbitrage-safety-banner dl { justify-content: space-between; gap: 8px; }
  .arbitrage-source-meta { grid-template-columns: 1fr; }
  .arbitrage-opportunity-table { min-width: 780px; }
  .lof-initial-screen { padding: 14px; }
}

/* =========================================================
   LOF-LY · 手机端展示精修层 (Mobile polish, August 2026)
   只调整展示层：补齐此前解析失败的设计令牌、压缩移动端导航与
   控件占位、统一卡片与横向滑动区的观感。
   不改 DOM 结构、数据口径、排序语义或任何业务判断。
   如需回退，删除本段（从此注释到文件末尾）即可。
   ========================================================= */

/* ---- M1. 补齐未定义令牌（此前 var() 解析失败，导致直角与透明底） ---- */
:root {
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-card: 16px;
  --bg-soft: #f2f2f5;
  --bg-elevated: #ffffff;
  --accent-soft: rgba(181, 80, 43, 0.12);
  --brand: var(--accent);
  --danger: var(--warn);
}

/* ---- M1b. 标题行内的 h1 此前未纳入统一排版，保留了浏览器默认外边距 ---- */
.section-head h1 {
  margin: 0;
  color: var(--ink-1);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.25;
}

/* ---- M2. 手机端基础手感 ---- */
@media (max-width: 900px) {
  html { -webkit-text-size-adjust: 100%; }
  body { -webkit-tap-highlight-color: rgba(181, 80, 43, 0.10); }

  /* 底部留出手势条安全区，避免浮动按钮压住内容 */
  .page-shell { padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }

  /* 16px 输入字号：避免 iOS 聚焦时自动放大整页 */
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea { font-size: 16px; }

  /* 表单主按钮回到可点击尺寸（默认移动端规则会压到 27px） */
  .community-form button[type="submit"],
  .auth-card button[type="submit"],
  .account-form button[type="submit"],
  .account-edit-form button[type="submit"] {
    min-height: 46px;
    font-size: 15px;
  }

  .section-head h1 { font-size: 24px; }

  /* 触摸反馈：按下时轻微回弹，替代桌面 hover */
  .btn:active, button:active, .button-link:active,
  .arbitrage-section-tab:active, .lof-mobile-sort-button:active,
  .refresh-btn:active { transform: scale(0.97); }
}

/* ---- M3. 顶栏：品牌与账户同排，导航独立成行 ---- */
@media (max-width: 900px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand account"
      "nav   nav";
    align-items: center;
    gap: 10px 12px;
    padding: 10px 14px;
  }

  .topbar .brand-block { grid-area: brand; width: auto; column-gap: 10px; }
  .topbar nav { grid-area: nav; width: 100%; margin: 0; }

  .topbar .topbar-account {
    grid-area: account;
    align-self: center;
    justify-self: end;
    min-height: 36px;
    padding: 6px 14px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .topbar { padding: 8px 12px; margin-bottom: 12px; gap: 8px 10px; }
  .topbar .brand-block::before {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 16px;
  }
  .topbar .brand-name { font-size: 17px; }
  .topbar .brand-subtitle {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar nav { padding: 3px; }
  .topbar nav a { min-height: 34px; padding: 0 12px; font-size: 13px; }
  .topbar .topbar-account { min-height: 34px; padding: 5px 12px; }
}

/* ---- M4. 横向滑动区：隐藏滚动条，保留可滑动语义 ---- */
@media (max-width: 900px) {
  .topbar nav,
  .anchor-nav,
  .arbitrage-section-tabs,
  .arbitrage-view-tabs,
  .closed-fund-subtabs,
  .community-category-tabs,
  .community-sort-tabs,
  .lof-mobile-sort-controls,
  .account-auth-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .topbar nav::-webkit-scrollbar,
  .anchor-nav::-webkit-scrollbar,
  .arbitrage-section-tabs::-webkit-scrollbar,
  .arbitrage-view-tabs::-webkit-scrollbar,
  .closed-fund-subtabs::-webkit-scrollbar,
  .community-category-tabs::-webkit-scrollbar,
  .community-sort-tabs::-webkit-scrollbar,
  .lof-mobile-sort-controls::-webkit-scrollbar,
  .account-auth-tabs::-webkit-scrollbar { width: 0; height: 0; display: none; }

  /* 数据表保留细滚动条，作为“可横向查看”的提示 */
  .table-wrap::-webkit-scrollbar,
  .account-table-wrap::-webkit-scrollbar,
  .futures-table-shell::-webkit-scrollbar { height: 4px; }
  .table-wrap::-webkit-scrollbar-track,
  .account-table-wrap::-webkit-scrollbar-track,
  .futures-table-shell::-webkit-scrollbar-track { background: transparent; }
  .table-wrap::-webkit-scrollbar-thumb,
  .account-table-wrap::-webkit-scrollbar-thumb,
  .futures-table-shell::-webkit-scrollbar-thumb {
    border-radius: var(--radius-pill);
    background: var(--scrollbar);
  }
}

/* ---- M5. 标题行：小工具按钮回到标题同排，不再单独占一行 ---- */
@media (max-width: 900px) {
  .section-head.section-head-split:has(> .refresh-btn),
  .section-head.section-head-split:has(> .status-badge) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 12px;
  }

  .section-head.section-head-split:has(> .refresh-btn) > .refresh-btn,
  .section-head.section-head-split:has(> .status-badge) > .status-badge {
    justify-self: end;
  }
}

/* ---- M6. 套利页控件：品类整屏可见，收紧留白 ---- */
@media (max-width: 640px) {
  /* 品类切换改为自适应铺满，手机端一屏看全，不再横向滑动 */
  .arbitrage-section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 8px;
    padding-bottom: 0;
    overflow: visible;
  }
  .arbitrage-section-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0 4px;
    min-width: 0;
    padding: 6px 6px;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
  }
  .arbitrage-section-tab span { font-size: 11px; }

  .arbitrage-status-legend { gap: 6px; margin-bottom: 12px; }

  /* 境内/境外两档改为整宽分段控件 */
  .arbitrage-view-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-bottom: 10px;
  }
  .arbitrage-view-tab { justify-content: center; padding: 0 10px; font-size: 13px; }

  .lof-mobile-sort-controls { gap: 6px 6px; margin-bottom: 10px; }
  .lof-initial-screen { gap: 10px; margin-bottom: 12px; }
  .arbitrage-empty-state { padding: 10px 12px; font-size: 13px; }
}

/* ---- M8. 首页：小屏保持两列摘要，避免过度拉长 ---- */
@media (max-width: 380px) {
  .home-portal-brief { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 340px) {
  .home-portal-brief strong { font-size: 13px; }
}

@media (min-width: 341px) and (max-width: 380px) {
  .home-portal-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .home-portal-brief > div,
  .home-portal-action { border-radius: var(--radius-sm); }
  .home-small-row { gap: 12px; }
}

/* ---- M9. 社区：搜索同排，分类整行可滑，浮动按钮避让安全区 ---- */
@media (max-width: 900px) {
  .community-search-form {
    align-items: flex-end;
    flex-direction: row;
    gap: 8px;
    margin: 10px 0 14px;
  }
  .community-search-form label { flex: 1 1 auto; min-width: 0; }
  .community-search-form button { flex: 0 0 auto; min-height: 46px; padding: 8px 18px; }

  .back-to-top {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 40px;
    height: 40px;
  }
  .community-floating-action {
    right: 14px;
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    height: 42px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  /* 栅格子项默认 min-width:auto，横向滑动的分类行会把面板撑宽 */
  .community-layout > * { min-width: 0; }

  .community-category-tabs {
    flex-wrap: nowrap;
    gap: 6px;
    margin: 10px -4px 12px;
    padding: 0 4px 2px;
    overflow-x: auto;
  }
  .community-category-tabs a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 36px;
  }
  .community-sort-tabs { gap: 14px; margin-bottom: 12px; }
  .community-post-card { padding: 13px 14px; }
  .community-post-card h2 { margin: 6px 0; font-size: 16px; }
  .community-post-meta { gap: 6px; font-size: 11px; }
}

/* ---- M10. LOF 详情页历史表：修正首列定宽 + nowrap 造成的文字重叠 ---- */
@media (max-width: 640px) {
  .lof-history-table th,
  .lof-history-table td { padding: 8px 6px; font-size: 12px; }

  .lof-history-table th:first-child,
  .lof-history-table td:first-child {
    width: 40%;
    white-space: normal;
  }
  .lof-history-table td:first-child strong {
    font-size: 12px;
    white-space: nowrap;
  }
  .lof-history-table td:first-child span {
    margin-left: 5px;
    font-size: 10px;
  }

  .lof-history-table th:nth-child(2),
  .lof-history-table td:nth-child(2) { width: 18%; }
  .lof-history-table th:nth-child(3),
  .lof-history-table td:nth-child(3) { width: 21%; }
  .lof-history-table th:nth-child(4),
  .lof-history-table td:nth-child(4) { width: 21%; }
}

/* ---- M11. 手机端滚动淡入收敛，减少快速滑动时的空白感 ---- */
@media (max-width: 900px) {
  .reveal-ready .panel,
  .reveal-ready .editorial-strip,
  .reveal-ready .account-card {
    transition-duration: 0.42s;
  }
  .reveal-ready .panel:not(.reveal-in),
  .reveal-ready .editorial-strip:not(.reveal-in),
  .reveal-ready .account-card:not(.reveal-in) {
    transform: translateY(12px);
  }
}

/* Data workspace and focused account overview */
.data-workspace { margin-top: 28px; }
.data-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 12px 4px 24px; }
.data-heading h1 { margin: 4px 0 0; font-size: clamp(28px, 3.2vw, 42px); letter-spacing: -.04em; font-weight: 650; }
.data-account-link { color: var(--ink-2); font-size: 13px; white-space: nowrap; padding-bottom: 6px; }
.data-tabs { display: flex; gap: 6px; padding: 6px; width: fit-content; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-card); margin-bottom: 22px; }
.data-tabs a { flex: 0 0 auto; padding: 9px 18px; border-radius: 7px; color: var(--ink-2); font-size: 14px; }
.data-tabs a[aria-current="page"] { background: var(--ink-1); color: var(--bg-card); }
.data-tabs a:hover { text-decoration: none; background: var(--bg-hover); color: var(--ink-1); }
.data-tabs a[aria-current="page"]:hover { background: var(--ink-1); color: var(--bg-card); }
.data-content { padding: clamp(20px, 3vw, 36px); min-width: 0; }
.data-intro { margin: 0 0 30px; color: var(--ink-2); font-size: 16px; max-width: 760px; }
.data-group + .data-group { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.data-group-heading { margin-bottom: 18px; }
.data-group-heading h2 { font-size: 20px; letter-spacing: -.025em; margin: 0 0 5px; }
.data-group-heading p { margin: 0; color: var(--ink-2); font-size: 13px; }
.data-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.data-tool { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-1); background: var(--bg-card-soft); transition: border-color var(--t-fast), transform var(--t-fast); }
.data-tool:hover { color: var(--ink-1); text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.data-tool-access { color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .03em; }
.data-tool h3 { font-size: 19px; margin: 16px 0 8px; letter-spacing: -.025em; }
.data-tool p { color: var(--ink-2); margin: 0 0 22px; font-size: 13px; line-height: 1.8; }
.data-tool-open { display: flex; width: 100%; justify-content: space-between; margin-top: auto; font-size: 12px; color: var(--ink-2); }
.data-tool-open span { color: var(--accent); }
.data-rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.data-rules-grid article { padding: 24px; border: 1px solid var(--line); border-radius: 12px; }
.data-rules-grid h2 { font-size: 20px; }
.data-rules-grid p, .data-rules-grid dd { color: var(--ink-2); font-size: 14px; line-height: 1.85; }
.data-rules-grid dt { font-weight: 600; margin-top: 16px; }
.data-rules-grid dd { margin: 4px 0 0; }
.data-workspace .account-data-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.account-data-shortcut { display: flex; justify-content: space-between; margin: 18px 12px 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--accent); font-size: 13px; }
.account-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 4px 0 28px; }
.account-overview a { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-card-soft); min-width: 0; }
.account-overview span { font-size: 12px; color: var(--ink-2); }
.account-overview strong { color: var(--ink-1); font-size: 20px; }
.account-overview small { color: var(--ink-2); font-size: 11px; }
@media (max-width: 900px) {
  .data-tools, .data-workspace .account-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-overview { grid-template-columns: 1fr; }
  .account-overview a { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .account-overview strong { grid-column: 2; grid-row: 1 / 3; text-align: right; }
}
@media (max-width: 600px) {
  .data-workspace { margin-top: 14px; }
  .data-heading { align-items: flex-start; flex-direction: column; gap: 10px; padding-bottom: 16px; }
  .data-tabs { width: 100%; gap: 0; }
  .data-tabs a { padding: 9px 12px; font-size: 12px; }
  .data-tools, .data-workspace .account-data-grid, .data-rules-grid { grid-template-columns: minmax(0, 1fr); }
  .data-tool { padding: 18px; }
  .data-tool h3 { margin-top: 12px; }
  .data-tool p { margin-bottom: 16px; }
  .data-rules-grid article { padding: 18px; }
  .data-intro { font-size: 14px; margin-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) { .data-tool { transition: none; } .data-tool:hover { transform: none; } }

/* Account navigation is a workspace menu, not the topbar pill. */
.account-menu { background: transparent; border-radius: 0; }
@media (max-width: 900px) {
  .account-side-panel { gap: 8px; }
  .account-side-head { padding: 2px 4px 8px; }
  .account-side-head em { grid-column: auto; justify-self: end; }
  .account-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-menu-group:first-child { grid-column: 1 / -1; }
  .account-menu-group:first-child > .account-menu-link { display: none; }
  .account-submenu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 0; border-left: 0; }
  .account-submenu-link { justify-content: center; padding: 0 3px; font-size: 12px; }
  .account-menu-link { justify-content: center; padding: 0 6px; }
  .account-data-shortcut { margin: 0 4px; padding-top: 10px; }
  .account-menu-logout { padding-top: 0; border-top: 0; }
  .account-menu-logout button { min-height: 34px; }
}

.premium-price-note { display: block; margin-top: 3px; color: var(--ink-2); font-size: 10px; font-weight: 400; white-space: normal; }

/* One home directory; data and account pages retain their own content. */
.home-hub { display: grid; gap: 24px; padding-top: 24px; }
.home-hub-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 20px 4px 8px; }
.home-hub-heading h1 { margin: 8px 0 12px; font-size: clamp(28px, 3.3vw, 44px); line-height: 1.25; letter-spacing: -.04em; }
.home-hub-heading p:not(.section-kicker) { color: var(--ink-2); max-width: 650px; margin: 0; line-height: 1.8; }
.home-guide-link { flex-shrink: 0; font-size: 13px; color: var(--accent); padding-bottom: 4px; }
.home-tool-group, .home-learning { padding: 28px; scroll-margin-top: 24px; }
.home-hub #market .data-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-hub #research .data-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-hub .data-tool { padding: 20px; }
.home-hub .data-tool h3 { font-size: 18px; }
.home-hub .education-topic-grid { margin-top: 20px; }
.home-community-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.home-community-row .panel { margin: 0; }
.home-community-row .sponsor-grid { grid-template-columns: 1fr; }
.data-breadcrumb { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; font-size: 13px; padding: 8px 4px; }
.data-breadcrumb a { color: var(--ink-2); }
.research-access-note { max-width: 680px; }
.research-access-note p { color: var(--ink-2); line-height: 1.8; }
@media (max-width: 1000px) {
  .home-hub #research .data-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .home-hub { padding-top: 12px; gap: 16px; }
  .home-hub-heading { align-items: flex-start; flex-direction: column; gap: 16px; padding: 12px 4px; }
  .home-hub-heading p:not(.section-kicker) { font-size: 14px; }
  .home-tool-group, .home-learning { padding: 18px; }
  .home-hub #market .data-tools, .home-hub #research .data-tools, .home-community-row { grid-template-columns: 1fr; }
  .home-community-row { gap: 16px; }
  .home-hub .data-tool h3 { margin-top: 8px; }
  .home-hub .data-tool p { margin-bottom: 14px; }
}

/* Member directory: history is a first-class reading path. */
.member-history-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 20px 0 0; margin-top: 24px; border-top: 1px solid #dce5eb; background: transparent; border-radius: 0; box-shadow: none; }
.member-history-shortcuts strong { color: #20394d; font-size: 13px; }
.member-history-shortcuts a { color: #536c80; font-size: 13px; text-decoration: none; padding: 6px 0; }
.member-history-shortcuts a:hover { text-decoration: underline; }
.member-history-shortcuts a:focus-visible { outline: 3px solid #6497b8; outline-offset: 4px; }
