:root {
  color-scheme: dark;
  --bg: #090c11;
  --panel: #121821;
  --panel-2: #18202b;
  --line: rgba(232, 237, 245, 0.08);
  --line-strong: rgba(232, 237, 245, 0.16);
  --text: #e8edf5;
  --muted: #8b97a8;
  --accent: #8eb6ff;
  --green: #3dd68c;
  --red: #ff6b6b;
  --amber: #e8b84a;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  --page-pad: clamp(12px, 2.2vw, 20px);
  --content: min(1320px, calc(100% - (var(--page-pad) * 2)));
  --touch: 44px;
  --radius: 12px;
  --radius-sm: 8px;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-feature-settings: "tnum" 1;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(142, 182, 255, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
}

.top,
.stats,
.workspace,
section,
.notice {
  width: var(--content);
  margin-left: auto;
  margin-right: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  padding:
    calc(8px + env(safe-area-inset-top, 0))
    max(var(--page-pad), env(safe-area-inset-right, 0))
    8px
    max(var(--page-pad), env(safe-area-inset-left, 0));
  background: rgba(9, 12, 17, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.share-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  font-size: 11px;
}
.share-bar .board-form { margin: 0; flex: 0 1 auto; }
.share-bar select,
.share-bar input[type="search"] {
  font-size: 11px;
  padding: 4px 8px;
  min-width: 0;
}
.share-bar select { width: 220px; }
.share-bar input[type="search"] { width: 140px; }
.share-card {
  display: none;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  margin: 0;
}
.share-card:not([hidden]) { display: flex; }
.share-bar .share-name {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}
.share-bar .meta { margin: 0; font-size: 11px; white-space: nowrap; }
.quote-bit {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.quote-bit strong { color: var(--text); font-weight: 600; }
.quote-bit strong.pnl-up { color: var(--green); }
.quote-bit strong.pnl-down { color: var(--red); }
#share-change { margin-left: 6px; }
.share-bar .check { font-size: 11px; gap: 4px; }

.brand { min-width: 0; flex: 0 1 auto; }
.eyebrow, .owner, .section-head p, .meta, th { color: var(--muted); }
.eyebrow {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
}
.owner {
  margin: 2px 0 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
h1, h2 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(18px, 2.4vw, 22px); line-height: 1.1; }
h2 { font-size: 15px; }

.mode-line {
  margin: 0;
  margin-left: 8px;
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.clock {
  margin: 0;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.top-actions {
  flex: 0 0 auto;
  margin-left: 4px;
}
.paper-panel {
  width: var(--content);
  margin: 12px auto 24px;
  padding: 14px;
}

.ticker {
  overflow: hidden;
  height: 26px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 12, 17, 0.96);
  font-size: 11px;
}
.ticker[hidden] { display: none; }
/* One rule under the header — not a second empty ticker line. */
body:has(#ticker:not([hidden])) .top { border-bottom: 0; }
.ticker-track {
  display: inline-flex;
  align-items: baseline;
  gap: 18px;
  padding-left: 16px;
  white-space: nowrap;
}
.ticker-track.run { animation: ticker-move linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-move {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--shift))); }
}
.tick { display: inline-flex; gap: 6px; align-items: baseline; }
.tick-name { color: var(--muted); }
.tick-price, .tick-move { font-variant-numeric: tabular-nums; font-weight: 600; }

.text-btn {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.text-btn.halt { color: var(--red); border-color: rgba(255, 107, 107, 0.7); }
.text-btn.start { color: var(--green); border-color: rgba(61, 214, 140, 0.7); }
.text-btn:disabled { opacity: 0.5; cursor: wait; }

.phone-setup { margin-top: 16px; padding: 16px 18px; }
.guest-note { background: rgba(142, 182, 255, 0.12); }
.phone-key {
  margin: 8px 0 12px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0.08em;
  word-break: break-all;
}
.phone-form, .hold-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.phone-form input, #hold-code {
  font: inherit;
  font-size: 18px;
  letter-spacing: 0.12em;
  min-height: 44px;
  width: min(220px, 100%);
}
dialog {
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  border-radius: 16px;
  padding: 20px;
  width: min(440px, calc(100% - 32px));
}
dialog::backdrop { background: rgba(0, 0, 0, 0.62); }
dialog h2 { margin-bottom: 8px; }
dialog p { margin: 0 0 14px; color: var(--muted); line-height: 1.45; }
.hold-actions { justify-content: flex-end; margin-top: 14px; }

.login-page {
  font-family: "Outfit", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 520px at 12% 18%, rgba(142, 182, 255, 0.14), transparent 58%),
    radial-gradient(700px 420px at 88% 82%, rgba(61, 214, 140, 0.07), transparent 55%),
    linear-gradient(165deg, #070a0f 0%, #0d131c 48%, #090c11 100%);
  min-height: 100vh;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}
.login-aside {
  display: none;
  padding: clamp(40px, 8vw, 88px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(18, 24, 33, 0.35), transparent 42%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 22px,
      rgba(232, 237, 245, 0.015) 22px,
      rgba(232, 237, 245, 0.015) 23px
    );
}
.login-aside-kicker {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.login-aside-title {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--text);
}
.login-aside-copy {
  margin: 22px 0 0;
  max-width: 28ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
}
@media (min-height: 820px) {
  .login-wrap { align-items: center; }
}
.login-card {
  width: min(420px, 100%);
  background: rgba(18, 24, 33, 0.92);
  border: 1px solid rgba(232, 237, 245, 0.12);
  border-radius: 20px;
  padding: clamp(24px, 5vw, 36px) clamp(18px, 4vw, 32px) clamp(22px, 4vw, 28px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 64px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}
.login-card-head { margin-bottom: clamp(20px, 4vw, 28px); }
.login-brand {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.login-card h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.login-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 24px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(9, 12, 17, 0.72);
  border: 1px solid var(--line);
}
.login-tab {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.login-tab.is-on {
  color: var(--text);
  background: rgba(142, 182, 255, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
.login-tab:hover { color: var(--text); }
.login-pane.is-hidden { display: none !important; }
.login-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.28);
  color: #ffb4b4;
  font-size: 13px;
  line-height: 1.4;
}
.login-pane label {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.login-pane input {
  width: 100%;
  min-height: var(--touch);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(232, 237, 245, 0.14);
  background: rgba(9, 12, 17, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-pane input:hover { border-color: rgba(232, 237, 245, 0.24); }
.login-pane input:focus {
  outline: none;
  border-color: rgba(142, 182, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(142, 182, 255, 0.18);
}
.login-submit {
  width: 100%;
  min-height: var(--touch);
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #9fc0ff 0%, #7aa6f5 100%);
  color: #0b1220;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(122, 166, 245, 0.28);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.login-submit:hover { filter: brightness(1.04); }
.login-submit:active { transform: translateY(1px); }
.login-back {
  display: inline-block;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.login-back:hover {
  color: var(--accent);
  border-bottom-color: rgba(142, 182, 255, 0.45);
}
@media (min-width: 960px) {
  .login-aside { display: flex; flex-direction: column; justify-content: center; }
}
@media (max-width: 959px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-wrap {
    padding:
      max(20px, env(safe-area-inset-top, 0))
      max(16px, env(safe-area-inset-right, 0))
      max(24px, env(safe-area-inset-bottom, 0))
      max(16px, env(safe-area-inset-left, 0));
  }
  .login-card h1 { font-size: 24px; }
  .login-tabs { margin-bottom: 18px; }
}
.owner-menu {
  position: relative;
}
.owner-menu-btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.owner-menu-btn::-webkit-details-marker { display: none; }
.owner-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 220px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.owner-menu[hidden] { display: none; }

.lamp {
  width: 10px;
  height: 10px;
  min-width: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #6d7888;
  box-shadow: 0 0 0 3px rgba(109, 120, 136, 0.22);
}
a.lamp { display: inline-block; }
.lamp.up { background: var(--green); box-shadow: 0 0 0 3px rgba(61, 214, 140, 0.22); }
.lamp.down { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.22); }
.lamp.idle { background: #6d7888; }

.top-actions,
.toolbar,
.board-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

button, a.button-link, input[type="search"], input[type="date"], select {
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
}

button, a.button-link { cursor: pointer; text-decoration: none; }
button:hover { border-color: var(--accent); }
button:disabled { cursor: wait; opacity: 0.65; }

.pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill.up { color: var(--green); border-color: rgba(61, 214, 140, 0.4); }
.pill.down { color: var(--red); border-color: rgba(255, 107, 107, 0.4); }

.notice, .banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.45;
}
.notice { background: rgba(255, 107, 107, 0.12); }
.banner {
  background: rgba(232, 184, 74, 0.08);
  color: var(--amber);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.stats article, .quotes article, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stats article { padding: 12px 14px; }
.reverse-panel { margin: 16px auto 0; }
.board-panel {
  width: var(--content);
  margin: 12px auto 0;
  padding: 14px;
}
.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.board-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.filter-btn {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  min-height: 32px;
  padding: 4px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.filter-btn.is-on {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(142, 182, 255, 0.12);
}
#board-live-query {
  min-width: min(200px, 100%);
  flex: 1 1 140px;
  font: inherit;
  font-size: 13px;
  padding: 6px 10px;
  min-height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
}
.board-scroller {
  max-height: min(620px, 68vh);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  scrollbar-gutter: stable;
}
.board-scroll-hint {
  display: none;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.board-spacer { position: relative; }
.board-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}
.board-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #10161e;
}
.board-table th, .board-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  background: var(--panel-2);
}
.board-table thead th { background: #10161e; }
.board-table tbody tr:nth-child(even) td { background: rgba(9, 12, 17, 0.28); }
.board-table th.num, .board-table td.num { text-align: right; }
/* Keep share identity visible while scrolling sideways on phones. */
.board-table th:nth-child(1),
.board-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 36px;
  box-shadow: 1px 0 0 var(--line);
}
.board-table th:nth-child(2),
.board-table td:nth-child(2) {
  position: sticky;
  left: 36px;
  z-index: 1;
  min-width: 78px;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.18);
}
.board-table thead th:nth-child(1),
.board-table thead th:nth-child(2) {
  z-index: 3;
  background: #10161e;
}
.board-table tbody td:nth-child(1),
.board-table tbody td:nth-child(2) {
  background: #151c26;
}
.board-table tbody tr:nth-child(even) td:nth-child(1),
.board-table tbody tr:nth-child(even) td:nth-child(2) {
  background: #121820;
}
.board-table tbody tr:hover td:nth-child(1),
.board-table tbody tr:hover td:nth-child(2) {
  background: #1a2330;
}
.board-table .sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.board-table th.num .sort-btn { width: 100%; justify-content: flex-end; }
.board-table .sort-btn::after {
  content: "↕";
  font-size: 10px;
  opacity: 0.35;
}
.board-table .sort-btn.is-sorted { color: var(--text); }
.board-table .sort-btn.is-sorted[data-dir="asc"]::after {
  content: "↑";
  opacity: 0.9;
  color: var(--accent);
}
.board-table .sort-btn.is-sorted[data-dir="desc"]::after {
  content: "↓";
  opacity: 0.9;
  color: var(--accent);
}
.board-table .sort-btn:hover { color: var(--text); }
.board-table tbody { position: relative; will-change: transform; }
.board-table tbody tr { cursor: pointer; height: 30px; }
.board-table tbody tr:hover td { background: rgba(142, 182, 255, 0.07); }
.board-table .name-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.stats p, .quotes p { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; }
.stats strong, .quotes strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(18px, 2.2vw, 24px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.stat-focus { background: var(--panel-2); }
.quotes strong { font-size: 18px; text-transform: none; letter-spacing: 0; }
.quotes .move { display: block; margin-top: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.quotes .range { margin-top: 4px; text-transform: none; letter-spacing: 0; font-size: 12px; }
.move.up, .pnl-up { color: var(--green); }
.move.down, .pnl-down { color: var(--red); }
.pnl-flat, .num-flat { color: var(--muted); }
.num-vol { color: var(--accent); }
.stats strong.pnl-up,
.stats strong.pnl-down,
.stats strong.pnl-flat { letter-spacing: -0.03em; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 22px;
  align-items: start;
  margin-top: 8px;
}

.main-col,
.side-col,
.workspace section,
.quotes article { min-width: 0; }

.workspace section, .side-col section { width: auto; margin: 0 0 22px; }
.main-col > section:first-child { margin-top: 22px; }
.side-col { margin-top: 22px; }
.panel { padding: 14px; }
.panel .banner, .panel .meta { width: auto; }

section { margin: 20px auto; }
.section-head { margin-bottom: 10px; }
.section-head p { margin: 4px 0 0; line-height: 1.45; font-size: 12px; }

.signal-wrap { max-height: 420px; overflow-x: hidden; overflow-y: auto; }
.signal-wrap table { font-size: 12px; table-layout: fixed; width: 100%; }
.signal-wrap col.sig-time { width: 18%; }
.signal-wrap col.sig-symbol { width: 14%; }
.signal-wrap col.sig-side { width: 8%; }
.signal-wrap col.sig-price { width: 10%; }
.signal-wrap col.sig-rule { width: 14%; }
.signal-wrap col.sig-status { width: 12%; }
.signal-wrap col.sig-note { width: 24%; }
.signal-wrap th,
.signal-wrap td {
  padding: 5px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.signal-wrap .signal-note {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.signal-side { font-weight: 600; letter-spacing: 0.04em; }
.signal-side-BUY { color: var(--green); }
.signal-side-SELL { color: var(--red); }
#quotes td:nth-child(n + 2) { text-align: right; }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.table-wrap > table { min-width: 680px; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #10161e;
}
th.num,
td.num,
#paper td:nth-child(n + 5),
.side-col td:nth-child(n + 2),
.side-col th.num { text-align: right; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(142, 182, 255, 0.04); }

.status-APPROVED, .status-REJECTED, .status-PROPOSED {
  font-size: 12px;
  font-weight: 600;
}
.status-APPROVED { color: var(--green); }
.status-REJECTED { color: var(--red); }
.status-PROPOSED { color: var(--amber); }

.section-head p:empty { display: none; }
#review-advice[hidden] { display: none; }

.board-form { margin-bottom: 10px; }
input[type="search"] { min-width: min(320px, 100%); }
select { min-width: min(360px, 100%); }
.share-card { margin-top: 8px; }
.share-name { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.share-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.share-stats article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.share-stats p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.share-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
#share-note { margin-top: 0; }
.check { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.meta { margin: 0 0 10px; font-size: 13px; line-height: 1.45; }
.toolbar .meta, .board-form .meta { margin: 0; }
#review-advice { margin: 0 0 12px; padding-left: 18px; color: var(--text); }
#review-advice li { margin: 6px 0; line-height: 1.4; }

@media (max-width: 980px) {
  .stats, .share-stats { grid-template-columns: 1fr 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .top-row { flex-wrap: wrap; row-gap: 8px; }
  .share-bar { flex-wrap: wrap; }
  .mode-line {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
    white-space: normal;
  }
  .clock { margin-left: auto; }
  .top-actions { margin-left: 0; }
  .board-scroller { max-height: min(520px, 58vh); }
  .board-scroll-hint { display: block; }
  .filter-btn, .text-btn, .owner-menu-btn {
    min-height: var(--touch);
    min-width: var(--touch);
  }
  #board-live-query { min-height: var(--touch); flex: 1 1 100%; }
  .board-filters { width: 100%; }
  .toolbar {
    gap: 8px;
  }
  .toolbar input[type="date"],
  .toolbar button {
    min-height: var(--touch);
  }
}

@media (max-width: 640px) {
  :root { --page-pad: 12px; }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }
  .stats article { padding: 10px 12px; }
  .stats strong { font-size: 18px; }
  .brand h1 { font-size: 18px; }
  .owner { font-size: 11px; }
  .mode-line { font-size: 11px; }
  .board-panel,
  .paper-panel {
    padding: 12px;
    border-radius: 10px;
  }
  .board-head {
    align-items: stretch;
    flex-direction: column;
  }
  .board-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .board-filters #board-live-query {
    grid-column: 1 / -1;
  }
  .board-scroller {
    max-height: min(68vh, 560px);
    border-radius: 10px;
  }
  .board-table { font-size: 12px; min-width: 640px; }
  .board-table th,
  .board-table td { padding: 7px 8px; }
  .board-table .name-cell { max-width: 140px; }
  .paper-panel { margin-bottom: 20px; }
  .owner-menu-panel {
    position: fixed;
    right: max(12px, env(safe-area-inset-right, 0));
    left: max(12px, env(safe-area-inset-left, 0));
    top: auto;
    width: auto;
    min-width: 0;
    justify-content: center;
  }
  dialog {
    width: min(440px, calc(100% - 24px));
    padding: 16px;
    border-radius: 14px;
  }
  .login-pane input { font-size: 16px; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .clock { font-size: 11px; }
  .filter-btn { padding: 4px 8px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track.run { animation: none; }
  .login-submit,
  .login-tab { transition: none; }
}
