/* =========================================================
   Evara Advisory — Design System
   ========================================================= */

:root {
  /* Canvas — Anthropic-inspired warm near-black */
  --ink: #141413;              /* Anthropic Dark, primary surface */
  --ink-2: #1C1C1A;            /* card / elevated */
  --ink-3: #252523;            /* hover / active */
  --line: #2C2C29;             /* dividers */
  --line-2: #3A3A36;           /* stronger dividers */

  /* Paper (elevated section surfaces — dark-elevated, sit above --ink-3 on dark palettes;
     cards use a vertical gradient between --paper-top and --paper-bot for subtle lift;
     paper palette mode in applyTweaks() inverts these to a light treatment) */
  --paper: #1F1F1D;            /* flat fallback (cards use gradient stops below) */
  --paper-top: #2A2A27;        /* gradient top stop — ~7% lift */
  --paper-bot: #1F1F1D;        /* gradient bottom stop */
  --paper-2: #2D2D2A;          /* deeper elevation variant */
  --paper-ink: #F5F4EE;        /* primary text on paper (matches --text) */
  --paper-muted: #847D6E;      /* muted text on paper (matches --text-3) */

  /* Type on ink — warm whites/greys */
  --text: #F5F4EE;             /* Anthropic Light — warm white */
  --text-2: #C5C1B1;
  --text-3: #847D6E;
  --text-4: #565148;

  /* Signals — functional, restrained */
  --live: #8FB5A6;             /* muted teal — active engagements, live model */
  --live-bright: #A0C7B7;      /* lifted variant for small dots/indicators (5–8px) */
  --live-glow: rgba(143, 181, 166, 0.25);
  --warn: #D4A656;             /* warnings, key signals (gold — distinct from --live) */
  --accent: #A89E8A;           /* subtle warm accent */

  /* Signature warm — used sparingly: italic highlights, active dot, hover traces */
  --cream: #EDE5CC;
  --cream-dim: rgba(237, 229, 204, 0.65);
  --cream-line: rgba(237, 229, 204, 0.22);

  /* Families */
  --ff-display: "Newsreader", "Source Serif 4", Georgia, serif;
  --ff-ui: "Inter Tight", "Inter", -apple-system, system-ui, sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --radius: 2px;
  --radius-2: 4px;
  --unit: 4px;

  /* Tweakable */
  --density: 1;   /* 0.8 compact — 1 standard — 1.2 airy */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===========================================================
   HARD VIEWPORT CONTAINMENT
   Enforced at every container level. Three iterations of targeted
   fixes failed on Oppo Reno8 Lite / Android Chrome. This is the
   nuclear option: every ancestor of every page container is pinned
   to 100vw with overflow-x: clip. Any descendant that tries to
   widen a parent gets clipped at the parent's boundary — no chain
   of min-content propagation can escalate up to body.
   =========================================================== */
html {
  overflow-x: clip;
  overflow-x: -webkit-clip;
  max-width: 100vw;
  width: 100vw;
}
body {
  overflow-x: clip;
  max-width: 100vw;
  width: 100vw;
  position: relative;
}
#root {
  max-width: 100vw;
  overflow-x: clip;
}
.shell {
  max-width: 100vw !important;
  overflow-x: clip !important;
}
.main {
  max-width: 100vw !important;
  overflow-x: clip !important;
  min-width: 0 !important;
}
section, .page-pad, header, footer, nav {
  max-width: 100vw;
  min-width: 0;
}

html, body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--ff-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Media should never overflow its container. Scoped to replaceable-element types;
   NOT applied universally because `.ticker-inner` and the overflow-x:auto tables
   intentionally exceed their parent. */
img, video, iframe { max-width: 100%; height: auto; }
svg, canvas { max-width: 100%; }

body {
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
}

::selection { background: var(--warn); color: var(--ink); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* ---------- Type utilities ---------- */
.t-display { font-family: var(--ff-display); font-weight: 300; letter-spacing: -0.02em; line-height: 1; }
.t-display-it {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;     /* looser than roman so italic tails don't collide */
  padding-right: 0.06em;        /* guard for descenders like y, g, f meeting next roman char */
  display: inline-block;
}
.t-serif { font-family: var(--ff-display); font-weight: 400; }
.t-mono { font-family: var(--ff-mono); font-weight: 400; letter-spacing: 0; }
.t-ui { font-family: var(--ff-ui); }

/* Guard against over-tight clamp at huge sizes — Newsreader weight 300 at 100px+
   visually collides when letter-spacing is -0.035em. Relax on very large. */
.t-display[style*="clamp"] { word-spacing: 0.02em; }

.t-micro {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}

.t-muted { color: var(--text-3); }
.t-dim { color: var(--text-4); }
.t-live { color: var(--live); }
.t-warn { color: var(--warn); }

/* ---------- Layout primitives ---------- */
.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  z-index: 10;
}

.main {
  min-width: 0;
}

.row-border { border-bottom: 1px solid var(--line); }
.col-border { border-right: 1px solid var(--line); }

.page-pad { padding: 64px 72px; }
.page-pad-sm { padding: 40px 72px; }

/* ---------- Ticker ---------- */
/* ticker-inner is intentionally far wider than viewport (marquee animation).
   Parent MUST be strictly 100vw with overflow:hidden, or the inner bleeds
   out and forces the entire document wide — a cascade that makes every
   sibling container appear to overflow on mobile. */
.ticker {
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  width: 100%;
  max-width: 100vw;
}
.ticker-inner {
  display: inline-flex;
  animation: ticker 72s linear infinite;
  padding: 10px 0;
  gap: 48px;
}
.ticker span {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ticker .up { color: var(--live); }
.ticker .dn { color: #B84A3E; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
}
.btn:hover { border-color: var(--text-2); background: var(--ink-2); }
.btn.primary {
  background: var(--text);
  color: var(--ink);
  border-color: var(--text);
}
.btn.primary:hover { background: #fff; color: var(--ink); }
.btn.ghost {
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}
.btn.ghost:hover {
  border-color: transparent;
  background: transparent;
  color: var(--text);
}

.btn .arrow {
  width: 10px;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: width 0.25s ease;
}
.btn .arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-top: 1px solid currentColor;
  transform: rotate(45deg);
}
.btn:hover .arrow { width: 16px; }

/* ---------- Badges & pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}
.pill.live {
  border-color: var(--live);
  color: var(--live);
  background: rgba(143,181,166,0.08);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
}
.dot.live {
  background: var(--live-bright);
  box-shadow: 0 0 0 0 var(--live-glow);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 var(--live-glow); }
  50% { box-shadow: 0 0 0 6px rgba(143,181,166,0); }
}

/* ---------- Mono panels (terminal / readout) ---------- */
.readout {
  border: 1px solid var(--line);
  background: var(--ink-2);
  font-family: var(--ff-mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-2);
}
.readout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--ink-3);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.readout-body { padding: 16px; }
.readout-line { display: flex; gap: 16px; align-items: baseline; padding: 3px 0; }
.readout-line .k {
  color: var(--text-3);
  width: 90px;
  min-width: 90px;
  flex-shrink: 0;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.readout-line .v {
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   Caustics motion — page hero ambient background
   Soft white light pools drift across the navy base — no
   new colour introduced, just motion. Blurred so the spots
   merge into shifting pools rather than crisp circles.
   ========================================================= */
.page-hero-bg {
  position: relative;
  isolation: isolate;
  background-color: var(--ink);
  overflow: hidden;
}

.page-hero-bg::before {
  content: "";
  position: absolute;
  inset: -15%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 8%),
    radial-gradient(circle at 75% 60%, rgba(143, 181, 166, 0.05) 0%, transparent 7%),
    radial-gradient(circle at 45% 80%, rgba(255, 255, 255, 0.07) 0%, transparent 7%),
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 5%),
    radial-gradient(circle at 10% 70%, rgba(255, 255, 255, 0.06) 0%, transparent 6%);
  filter: blur(35px);
  will-change: transform;
}

@media (prefers-reduced-motion: no-preference) and (min-width: 760px) {
  .page-hero-bg::before {
    animation: caustics-drift 42s ease-in-out infinite;
  }
}

@keyframes caustics-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(20%, -15%, 0) scale(1.15); }
  66%      { transform: translate3d(-18%, 20%, 0) scale(0.9); }
}

/* ---------- Grids ---------- */
.g2 { display: grid; grid-template-columns: 1fr 1fr; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); }

.cell {
  padding: 32px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.cell:nth-child(-n+2), .g3 > .cell:nth-child(-n+3), .g4 > .cell:nth-child(-n+4) { border-top: 0; }
.g2 > .cell:nth-child(2n+1), .g3 > .cell:nth-child(3n+1), .g4 > .cell:nth-child(4n+1) { border-left: 0; }

/* ---------- Inputs ---------- */
.input {
  width: 100%;
  padding: 14px 16px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--ff-ui);
  font-size: 14px;
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.input:focus { outline: none; border-color: var(--text-2); }
.input::placeholder { color: var(--text-4); }

textarea.input { resize: vertical; min-height: 110px; line-height: 1.55; }
select.input { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 13px) calc(50% - 2px); background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
  font-weight: 500;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Focus / misc ---------- */
:focus-visible { outline: 1px solid var(--text-2); outline-offset: 2px; }

.divider {
  width: 32px;
  height: 1px;
  background: var(--text-3);
  opacity: 0.6;
}

.hair { border-top: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: clip;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    flex-wrap: wrap;                 /* nav wraps to its own row */
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    column-gap: 20px;
    row-gap: 8px;
  }
  /* Sidebar direct children must be able to shrink — prevents flex-shrink:0
     items (logo, clock cluster) from pushing the sidebar wider than viewport. */
  .sidebar > * { min-width: 0; max-width: 100%; }
  /* Nav occupies its own full-width row below the logo/clock row.
     Prior behaviour relied on flex-shrink + overflow-x:auto collapsing the
     nav to ~50px beside the logo/clock, which failed on narrow Android
     (Oppo Reno8 Lite, 360px) — the nav extended past the sidebar edge and
     `body { overflow-x: hidden }` clipped Contact unreachably. */
  .sidebar > nav {
    order: 10;                       /* lay out after logo + clock */
    flex: 0 0 100% !important;       /* own row, full width */
    width: 100%;
    min-width: 0;
    flex-direction: row !important;
    gap: 2px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 20px;             /* trailing breathing room so the last item (Contact) clears the viewport edge when scrolled */
  }
  .sidebar > nav::-webkit-scrollbar { display: none; }
  .sidebar > nav button {
    border: 0 !important;
    border-bottom: 1px solid transparent !important;
    padding: 6px 10px !important;
    grid-template-columns: auto !important;
    white-space: nowrap;
    font-size: 12px;
  }
  .sidebar > nav button > span:first-child { display: none; }
  .sidebar > nav button > span:nth-child(3) { margin-left: 6px; }
  .sidebar > a { margin-bottom: 0 !important; flex-shrink: 0; }
  .sidebar > a > div:last-child { display: none; }
  .sidebar > div:last-child {
    margin-top: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    flex-shrink: 0;
  }
  .sidebar > div:last-child > div:last-child {
    padding-top: 0 !important;
    border-top: 0 !important;
  }
  .sidebar > div:last-child > div:last-child > span:last-child { display: none; }
  .page-pad { padding: 48px 28px !important; }
  .page-pad-sm { padding: 28px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; padding: 40px 28px 24px !important; }
  footer > div:last-child { padding: 18px 28px !important; }
  /* Subtle right-edge fade hints that the nav is horizontally scrollable */
  .sidebar > nav {
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 20px), transparent);
    mask-image: linear-gradient(to right, black calc(100% - 20px), transparent);
  }
}

@media (max-width: 760px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .g2 > .cell, .g3 > .cell, .g4 > .cell { border-left: 0; border-top: 1px solid var(--line); padding: 24px; }
  .g2 > .cell:first-child, .g3 > .cell:first-child, .g4 > .cell:first-child { border-top: 0; }
  .sidebar > nav button > span:nth-child(3) { display: none; }
  .footer-grid { grid-template-columns: 1fr !important; }
  .sidebar > div:last-child > .pill { display: none; }
  body { font-size: 14.5px; }
  /* mobile: tighten page padding, readouts + ledger rows collapse to stacked blocks */
  .page-pad { padding: 36px 20px !important; }
  .readout-line { flex-wrap: wrap; }
  .readout-line .k { width: auto; min-width: 0; }
  /* Any explicit grid of 4+ cols collapses to 2, then 1 */
  [style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns: 1fr 1fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; }
  [style*="grid-template-columns: 1fr 1fr"]:not([style*="repeat"]) { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns: 1.4fr"], [style*="grid-template-columns: 1.2fr"], [style*="grid-template-columns: 1.6fr"] { grid-template-columns: 1fr !important; gap: 32px !important; }
  /* ledger rows — stack label above value */
  .ledger-head { display: none !important; }
  .ledger-row { grid-template-columns: 1fr !important; gap: 6px !important; padding: 18px 16px !important; }
  /* Hero scale — keep display type punchy but within the viewport */
  h1.t-display, h2.t-display { word-break: break-word; }
  /* Services segment tabs collapse to single column */
  .seg-tabs { grid-template-columns: 1fr !important; }
  .seg-tabs button { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .seg-tabs button:last-child { border-bottom: 0 !important; }
}

@media (max-width: 520px) {
  .btn { padding: 10px 16px; font-size: 10px; }
  .readout-body { padding: 12px !important; }
  .readout-line { padding: 2px 0; }
  /* Footer padding tightens further on phones (H2) */
  footer > div:last-child { padding: 16px 20px !important; }
}

/* ---------- Mobile pass: tightening for new sections ---------- */
@media (max-width: 900px) {
  /* Any text content must break rather than overflow its container — guards
     against descendants forcing their ancestor wider than the viewport. */
  p, h1, h2, h3, h4, h5, h6, li, blockquote, span {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  /* Hero stacks */
  .hero-top { grid-template-columns: 1fr !important; gap: 24px !important; }
  .principal-card { min-width: 0 !important; width: 100%; }
  /* Headline sizes scale down more aggressively on phones */
  h1.t-display { font-size: clamp(36px, 11vw, 64px) !important; }
  h2.t-display { font-size: clamp(28px, 8vw, 44px) !important; }
  /* Stats: 2 per row instead of 4 */
  .g4 { grid-template-columns: 1fr 1fr !important; }
  .g4 > .cell:nth-child(even) { border-right: 0; }
  /* Valuation workbench collapses to single column */
  .live-model .lv-top,
  .live-model .lv-bottom,
  .live-model .lv-scen-tabs { grid-template-columns: 1fr !important; }
  .live-model .lv-scen-tabs button { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  /* KPI strip: 2-col on mobile instead of 4 */
  .live-model [style*="repeat(4, 1fr)"] { grid-template-columns: 1fr 1fr !important; }
  /* Ledger rows: stack */
  .ledger-head { display: none !important; }
  .ledger-row { grid-template-columns: 1fr !important; gap: 8px; padding: 20px 16px !important; }
  /* Flagship quote tightens */
  .flagship-quote { padding: 56px 24px !important; }
  /* Heatmap allows horizontal scroll */
  table { font-size: 10.5px !important; }
  /* Deal pipeline — 5 stages don't fit on tablet */
  .pipeline-grid { grid-template-columns: 1fr 1fr 1fr !important; }
  .pipeline-grid > div { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); }
  .pipeline-grid > div:nth-child(3n) { border-right: 0 !important; }
  .pipeline-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 640px) {
  /* Ticker and small chrome */
  .pill { font-size: 9px !important; padding: 4px 8px !important; }
  /* Hide the 2nd-column footer-grid on super narrow */
  .footer-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  /* CTA section reduces padding */
  .page-pad { padding: 36px 20px !important; }
  /* Principal card readout sizes */
  .readout-head, .readout-body { padding: 12px 14px !important; }
  /* Sensitivity matrix becomes scrollable */
  .live-model [style*="borderCollapse"] { min-width: 420px; }
  /* Engagement shapes stack */
  .shapes-grid { grid-template-columns: 1fr !important; }
  /* Scope drafter textarea + sketch columns */
  .ai-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  /* Wrap tags */
  .t-mono { letter-spacing: 0.06em !important; }
  /* Deal pipeline — stack fully on phones */
  .pipeline-grid { grid-template-columns: 1fr !important; }
  .pipeline-grid > div { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .pipeline-grid > div:last-child { border-bottom: 0; }
}

/* ---------- Touch devices: larger slider tap targets (H1) ---------- */
@media (hover: none) and (pointer: coarse) {
  input[type=range]::-webkit-slider-thumb { width: 22px !important; height: 22px !important; }
  input[type=range]::-moz-range-thumb { width: 22px !important; height: 22px !important; }
}

/* ---------- Track Record: detail indent only on desktop (C2) ---------- */
@media (min-width: 901px) {
  .tr-detail { padding-left: 154px !important; }
  /* Principal card desktop min-width (moved from inline style to avoid
     inline-vs-CSS conflicts on Android WebView during grid track-sizing). */
  .principal-card { min-width: 300px; }
}

/* ---------- Tweaks panel ---------- */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  width: 280px;
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-2);
  font-family: var(--ff-mono);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.tweaks-body { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.tweak-row { display: flex; flex-direction: column; gap: 6px; }
.tweak-row label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.tweak-row .opts { display: flex; gap: 6px; flex-wrap: wrap; }
.tweak-row .opts button {
  padding: 6px 10px;
  font-size: 10.5px;
  border: 1px solid var(--line);
  color: var(--text-2);
  background: var(--ink);
  border-radius: 2px;
}
.tweak-row .opts button.on {
  background: var(--text);
  color: var(--ink);
  border-color: var(--text);
}
