/* News Gallery — preview build. Design tokens first; components after. */
:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #14161a;
  --ink-2: #4a4e57;
  --ink-3: #7b7f88;
  --line: #e5e3dc;
  --line-strong: #cfccc3;
  --pos: #1e7b45;
  --pos-fill: #2c9a5a;
  --pos-wash: #e4f1e8;
  --neg: #b93c28;
  --neg-fill: #dd6a53;
  --neg-wash: #f9e6e1;
  --mixed-fill: #b9b6ac;
  --focus: #2a78d6;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Sitka Text", Charter, "Iowan Old Style", Cambria, Georgia, serif;
  --r: 6px;
  --header-h: 56px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface: #12151a;
  --surface-2: #171b21;
  --ink: #f0eee6;
  --ink-2: #b8b6ad;
  --ink-3: #8a8c92;
  --line: #242930;
  --line-strong: #353b44;
  --pos: #9fd356;
  --pos-fill: #8cc63f;
  --pos-wash: #1b2a16;
  --neg: #f08a73;
  --neg-fill: #e2725b;
  --neg-wash: #33191a;
  --mixed-fill: #555a63;
  --focus: #6da7ec;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- Buttons & controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: .88; background: var(--ink); }
.btn.quiet { border-color: transparent; background: transparent; font-weight: 500; }
.btn.quiet:hover { background: var(--line); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.seg button {
  height: 30px; padding: 0 11px; border: 0; background: transparent; cursor: pointer;
  font-size: 13px; color: var(--ink-2); border-left: 1px solid var(--line);
}
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--surface-2); color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg .cnt { margin-left: 5px; font-size: 12px; color: var(--ink-3); }
.seg button[aria-pressed="true"] .cnt { color: inherit; opacity: .7; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--ink-3); }
.chip[aria-pressed="true"] .dot { background: var(--c); }

/* ---------- App shell ---------- */
.header {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 6px; display: block; }
.header .spacer { flex: 1; }
.search { position: relative; flex: 1; max-width: 440px; }
.search input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface-2);
}
.search input::placeholder { color: var(--ink-3); }
.search svg { position: absolute; left: 11px; top: 10px; color: var(--ink-3); pointer-events: none; }
.search kbd { position: absolute; right: 9px; top: 8px; font: 11px var(--sans); color: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 5px; }
.results {
  position: absolute; left: 0; right: 0; top: 42px; margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(0,0,0,.10); max-height: 360px; overflow: auto;
}
.results li { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.results li[aria-selected="true"], .results li:hover { background: var(--surface-2); }
.results .sym { font-weight: 650; width: 62px; flex: none; }
.results .nm { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.results .tag { font-size: 11px; color: var(--ink-3); }
.results .none { color: var(--ink-3); cursor: default; }

.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.side {
  position: sticky; top: var(--header-h); align-self: start;
  height: calc(100vh - var(--header-h)); overflow: auto;
  border-right: 1px solid var(--line); padding: 14px 10px 20px;
  display: flex; flex-direction: column; gap: 18px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav button {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; width: 100%;
  border: 0; background: transparent; border-radius: var(--r); cursor: pointer; text-align: left;
  color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav a:hover, .nav button:hover { background: var(--line); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--line); color: var(--ink); font-weight: 650; }
.side h2 { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px 6px; }
.quote-list { display: flex; flex-direction: column; }
.quote {
  display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 7px 10px; border-radius: var(--r);
  text-decoration: none;
}
.quote:hover { background: var(--line); }
.quote[aria-current="page"] { background: var(--line); }
.quote .sym { font-weight: 650; }
.quote .nm { grid-column: 1; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote .px { text-align: right; }
.quote .ch { text-align: right; font-size: 12px; }
.side .empty { padding: 4px 10px; font-size: 13px; color: var(--ink-3); }
.side .foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); }
/* Settings and Send feedback sit at the bottom of the sidebar, just above the footer links. */
.side .nav-bottom { margin-top: auto; }
.side .nav-bottom + .foot { margin-top: -10px; }

.main { padding: 28px 32px 64px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.page-head .sub { color: var(--ink-3); font-size: 13px; margin-top: 2px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; font-weight: 650; }
.panel-head .hint { font-size: 13px; color: var(--ink-3); }
.panel-body { padding: 18px; }
.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 18px; text-align: left; white-space: nowrap; }
th { font-size: 12px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--line); }
th button { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font-weight: inherit; }
th button:hover { color: var(--ink); }
th[aria-sort] button { color: var(--ink); }
td { border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover { background: var(--surface-2); }
td.r, th.r { text-align: right; }
td .sym { font-weight: 650; }
td .nm { color: var(--ink-3); margin-left: 8px; }
td.name-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Sentiment ---------- */
.sbar { display: flex; gap: 2px; height: 8px; width: 100%; min-width: 60px; }
.sbar i { display: block; height: 100%; border-radius: 2px; }
.sbar .p { background: var(--pos-fill); }
.sbar .n { background: var(--neg-fill); }
.sbar.lg { height: 12px; }
.scell { display: grid; grid-template-columns: 96px 110px; gap: 12px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.p { background: var(--pos-wash); color: var(--pos); }
.pill.n { background: var(--neg-wash); color: var(--neg); }
.pill.m { background: var(--line); color: var(--ink-2); }

.sent { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 28px; align-items: start; }
.sent .big { font-size: 40px; font-weight: 650; letter-spacing: -.03em; line-height: 1; }
.sent .big small { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); margin-left: 6px; }
.sent .legend { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.sent .counts { margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.sent .note { margin-top: 14px; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.sent h3 { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.key { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.key span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--c); }

/* ---------- Ticker header ---------- */
.thead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.thead h1 { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.thead .co { color: var(--ink-2); }
.thead .price { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 10px; }
.thead .price span { font-size: 15px; font-weight: 500; letter-spacing: 0; margin-left: 10px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stats div { padding: 12px 18px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats dt { font-size: 12px; color: var(--ink-3); }
.stats dd { margin: 2px 0 0; font-weight: 600; }
dl { margin: 0; }

/* ---------- Charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font: 11px var(--sans); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--line-strong); stroke-width: 1; }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; }
.tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 130px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
  box-shadow: 0 6px 18px rgba(0,0,0,.12); padding: 8px 10px; font-size: 12px;
}
.tip b { display: block; margin-bottom: 4px; font-weight: 600; }
.tip div { display: flex; align-items: center; gap: 6px; justify-content: space-between; color: var(--ink-2); }
.tip div span:first-child::before { content: ""; display: inline-block; width: 8px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--c); }
.tip div span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.legend-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.legend-row span::before { content: ""; display: inline-block; width: 12px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--c); }

/* ---------- Articles ---------- */
.alist { list-style: none; margin: 0; padding: 0; }
.aitem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; padding: 16px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.aitem:last-child { border-bottom: 0; }
.aitem:hover { background: var(--surface-2); }
.aitem h3 { font: 600 17px/1.3 var(--serif); letter-spacing: -.005em; }
.aitem h3 button { all: unset; cursor: pointer; }
.aitem h3 button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.aitem p { color: var(--ink-2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; grid-column: 1; }
.aitem .meta { grid-column: 1; font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.aitem .meta .tk { color: var(--ink-2); font-weight: 600; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 4px; }
.tchip { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--line); color: var(--ink-2); font-size: 11.5px; font-weight: 650; letter-spacing: .01em; text-decoration: none; }
a.tchip:hover { background: var(--line-strong); color: var(--ink); }
.tchip.on { background: var(--ink); color: var(--bg); }
.tchip.more { background: transparent; font-weight: 500; color: var(--ink-3); padding: 0 2px; }
.aitem .side-col { grid-column: 2; grid-row: 1 / span 3; width: 124px; text-align: right; }
.aitem .side-col .sbar { margin-top: 8px; }
.more { padding: 12px 18px; border-top: 1px solid var(--line); text-align: center; }

/* ---------- Drawer / dialogs ---------- */
dialog { color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); padding: 0; }
dialog::backdrop { background: rgba(10, 12, 15, .45); }
dialog.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(620px, 100vw); max-width: 100vw; border-width: 0 0 0 1px; }
dialog.modal { width: min(520px, calc(100vw - 32px)); border-radius: 10px; }
.d-head { position: sticky; top: 0; background: var(--surface); display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--line); z-index: 2; }
.d-head h2 { font-size: 15px; font-weight: 650; }
.d-body { padding: 22px 24px 40px; }
.article h1 { font: 600 26px/1.22 var(--serif); letter-spacing: -.01em; }
.article .meta { color: var(--ink-3); font-size: 13px; margin: 10px 0 18px; }
.article .lede { font: 400 16px/1.55 var(--serif); color: var(--ink); }
.article h3 { font-size: 13px; font-weight: 650; margin: 24px 0 8px; display: flex; align-items: center; gap: 8px; }
.article h3 i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.article ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.article li { margin: 5px 0; }
.article .sum { color: var(--ink-2); margin-top: 8px; }
.article .box { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 18px 0 4px; background: var(--surface-2); }
.article .box .row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.article .box .row b { font-size: 15px; }
.article .tks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label, .field .lbl { font-weight: 600; font-size: 13px; }
.field .help { font-size: 12px; color: var(--ink-3); }
.field textarea, .field input[type="text"] { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); padding: 8px 10px; }
.field textarea { min-height: 76px; resize: vertical; }
.field input[type="range"] { width: 100%; accent-color: var(--ink); }
.d-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.notice { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 14px 16px; color: var(--ink-2); }
.empty-state { padding: 40px 18px; text-align: center; color: var(--ink-2); }
.empty-state h2 { font-size: 16px; color: var(--ink); margin-bottom: 6px; }
.empty-state .tools { justify-content: center; margin-top: 14px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid-2 > div { min-width: 0; }
.grid-2 > div + div { border-left: 1px solid var(--line); }
.grid-2 h3 { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 12px 18px 2px; }
.tabbar { display: none; }

/* ---------- Landing ---------- */
.l-nav { display: flex; align-items: center; gap: 12px; max-width: 1120px; margin: 0 auto; padding: 18px 24px; }
.l-nav .spacer { flex: 1; }
.hero { max-width: 1120px; margin: 0 auto; padding: 56px 24px 40px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font: 600 52px/1.06 var(--serif); letter-spacing: -.025em; }
.hero p.lead { font-size: 18px; line-height: 1.55; color: var(--ink-2); margin: 20px 0 28px; max-width: 30em; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero .cta .btn { height: 44px; padding: 0 20px; font-size: 15px; }
.hero .fine { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.shot { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 60px -30px rgba(20,22,26,.35); overflow: hidden; }
.shot .cap { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 18px 0; }
.shot .cap b { font-size: 18px; }
.shot .body { padding: 14px 18px 18px; }
.band { border-top: 0; }
.band .in { max-width: 1120px; margin: 0 auto; padding: 56px 24px; }
.band h2 { font: 600 30px/1.15 var(--serif); letter-spacing: -.015em; margin-bottom: 8px; }
.band .sub { color: var(--ink-2); font-size: 16px; max-width: 40em; margin-bottom: 32px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.steps div { padding: 24px; border-left: 1px solid var(--line); }
.steps div:first-child { border-left: 0; }
.steps .n { font: 600 13px var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 17px; font-weight: 650; margin: 10px 0 6px; }
.steps p { color: var(--ink-2); }
.l-foot { border-top: 0; }
.l-foot .in { max-width: 1120px; margin: 0 auto; padding: 28px 24px 48px; color: var(--ink-3); font-size: 13px; display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.l-foot p { max-width: 52em; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding: 20px 16px 96px; }
  .header { padding: 0 12px; gap: 10px; }
  .brand span { display: none; }
  .header .spacer { display: none; }
  .search { max-width: none; }
  .search kbd { display: none; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar button { display: grid; place-items: center; gap: 2px; height: 56px; border: 0; background: none; font-size: 11px; color: var(--ink-3); text-decoration: none; cursor: pointer; }
  .tabbar a[aria-current="page"] { color: var(--ink); font-weight: 650; }
  .sent { grid-template-columns: 1fr; gap: 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 > div + div { border-left: 0; border-top: 1px solid var(--line); }
  th, td { padding: 10px 12px; }
  .hide-sm { display: none; }
  .scell { grid-template-columns: 56px auto; gap: 8px; }
  .aitem { grid-template-columns: 1fr; padding: 14px; }
  .aitem .side-col { grid-column: 1; grid-row: auto; width: auto; text-align: left; display: flex; align-items: center; gap: 10px; }
  .aitem .side-col .sbar { width: 72px; margin: 0; }
  .panel-head, .panel-body { padding-left: 14px; padding-right: 14px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 28px; }
  .hero h1 { font-size: 38px; }
  .steps { grid-template-columns: 1fr; }
  .steps div { border-left: 0; border-top: 1px solid var(--line); }
  .steps div:first-child { border-top: 0; }
  .band .in { padding: 40px 16px; }
  .l-nav { padding: 14px 16px; }
  .l-nav .hide-sm { display: none; }
  .d-body { padding: 18px 16px 40px; }
  .article h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Accounts, dialogs, legal ---------- */
a.sym { text-decoration: none; }
a.sym:hover { text-decoration: underline; }
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 650; }
.btn.wide { width: 100%; justify-content: center; height: 40px; }
.btn.danger { color: var(--neg); border-color: var(--neg); }
.btn.danger:hover { background: var(--neg-wash); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
dialog.modal.narrow { width: min(400px, calc(100vw - 32px)); }
dialog.modal.wide { width: min(720px, calc(100vw - 32px)); }
.field input.code { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; height: 48px; }
.field input[type="text"] { height: 40px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fine { font-size: 12px; color: var(--ink-3); margin-top: 16px; line-height: 1.5; }
.linklike { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font-size: inherit; }
.notice.err { border-color: var(--neg); color: var(--neg); background: var(--neg-wash); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); flex: none; }
.scrollbox { max-height: 42vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; background: var(--surface-2); }
.legal h1 { font: 600 20px/1.25 var(--serif); margin-bottom: 12px; }
.legal h2 { font-size: 15px; font-weight: 650; margin: 22px 0 8px; }
.legal h3 { font-size: 14px; font-weight: 650; margin: 16px 0 6px; }
.legal p, .legal li { color: var(--ink-2); margin: 0 0 10px; line-height: 1.6; }
.legal ol { padding-left: 22px; margin: 0 0 10px; }
.legal.page { max-width: 760px; margin: 0 auto; padding: 24px 24px 80px; }
.legal.page h1 { font-size: 30px; margin-bottom: 20px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: calc(100vw - 32px); }
.side .foot a { color: inherit; }
@media (max-width: 900px) { .toast { bottom: 72px; } }
.btn { white-space: nowrap; }

/* ---------- Wide screens: use the width instead of leaving it blank ---------- */
.main { max-width: 2200px; margin: 0 auto; }
.main > .page-head, .main > .thead { max-width: none; }
.cols { display: flex; flex-direction: column; }
.cols .col-main, .cols .rail { display: contents; }
.o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; }
body.page-narrow .main { max-width: 1040px; }
@media (min-width: 1500px) {
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) clamp(400px, 30%, 620px); gap: 20px; align-items: start; }
  .cols .col-main { display: block; grid-column: 1; grid-row: 1; min-width: 0; }
  .cols .rail { display: block; grid-column: 2; grid-row: 1; min-width: 0; position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; border-radius: 8px; }
  .rail .panel { margin-bottom: 0; }
  .rail .hide-rail, .rail .nm { display: none; }
  .rail .sent { grid-template-columns: 1fr; gap: 22px; }
  .rail .panel-head { flex-direction: column; align-items: flex-start; }
  .rail .scell { grid-template-columns: 72px auto; }
  .shell { grid-template-columns: 264px minmax(0, 1fr); }
  .main { padding: 28px 40px 64px; }
}

/* ---------- Admin: feedback list ---------- */
.fb-item { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.fb-item:last-child { border-bottom: 0; }
.fb-item .meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fb-item .meta .tk { color: var(--ink-2); font-weight: 600; }
.fb-item .meta a { color: inherit; }
.fb-q { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-top: 12px; }
.fb-a { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Pro ---------- */
.pro-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; background: var(--s1); color: #fff; vertical-align: middle; }
.nav .pro-badge { margin-left: 6px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: var(--surface); display: flex; flex-direction: column; gap: 14px; }
.plan.best { border-color: var(--s1); box-shadow: 0 0 0 1px var(--s1) inset; }
.plan h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.plan .price { font-size: 30px; font-weight: 700; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.plan .alt { font-size: 13px; color: var(--ink-2); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.plan li { padding-left: 22px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 10px; height: 6px; border-left: 2px solid var(--pos); border-bottom: 2px solid var(--pos); transform: rotate(-45deg); }
.plan li.no { color: var(--ink-3); }
.plan li.no::before { border: 0; height: 2px; top: 9px; background: var(--ink-3); transform: none; }
.plan .tools { margin-top: auto; }
.lock { padding: 28px 18px; text-align: center; color: var(--ink-2); }
.lock h3 { font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.lock .tools { justify-content: center; margin-top: 14px; }
.teaser { position: relative; }
.teaser::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.shift { font-weight: 600; }
.bell { display: inline-flex; align-items: center; justify-content: center; }
.select { height: 34px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); padding: 0 8px; }
.toggle { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.toggle input { margin-top: 3px; accent-color: var(--ink); }
.mail-item { border-bottom: 1px solid var(--line); }
.mail-item summary { padding: 14px 18px; cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.mail-item summary b { font-weight: 650; }
.mail-item iframe { width: 100%; height: 560px; border: 0; border-top: 1px solid var(--line); background: #f4f5f7; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }.plan .price .was { font-size: 18px; font-weight: 500; color: var(--ink-3); margin-right: 4px; }
