/* =========================================================================
   EDITORIAL FINTECH / FINANCIAL LEDGER DESIGN SYSTEM
   ========================================================================= */
:root {
  --bg-paper: #F2F6FA;
  --bg-panel: #FFFFFF;
  --bg-inset: #EBF1F7;
  --border: #D5E0EC;
  --border-strong: #B0C4DA;
  --ink: #0F172A;
  --ink-muted: #475569;
  --ink-subtle: #64748B;
  --accent: #0B4F8A;
  --accent-hover: #083D6B;
  --accent-tint: #EFF6FF;
  --accent-border: #BFDBFE;
  --emerald: #0D7A63;
  --emerald-tint: #ECFDF7;
  --emerald-border: #99E2CE;
  --rust: #C81E3A;
  --rust-tint: #FFF1F2;
  --rust-border: #FECDD3;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.11), 0 2px 6px rgba(15, 23, 42, 0.05);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.num {
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

/* =========================================================================
   TOP STICKY HEADER
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}

.brand-wordmark {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.bench-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--bg-paper);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.bench-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.currency-switch {
  display: inline-flex;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.curr-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.curr-btn:hover {
  color: var(--ink);
}

.curr-btn.active {
  background: var(--accent);
  color: #FFFFFF;
}

/* =========================================================================
   SEGMENTED TOOL MATRIX BAR (TWO LABELED GROUPS)
   ========================================================================= */
.matrix-bar {
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
}

.matrix-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.matrix-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.matrix-group-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  padding-right: 4px;
  white-space: nowrap;
}

.matrix-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
}

@media (max-width: 980px) {
  .matrix-divider {
    display: none;
  }
}

.matrix-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.12s ease, color 0.12s ease, background-color 0.12s ease;
}

.tool-tab:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.tool-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
}

/* =========================================================================
   MAIN CONTAINER & TOOL INTRO BAR
   ========================================================================= */
.main-wrap {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 18px 16px 40px;
  flex: 1;
}

.tool-section {
  display: none;
}

.tool-section.active {
  display: block;
}

.tool-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 20px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.tool-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 3px;
}

.tool-h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--ink);
}

.tool-lead {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  max-width: 680px;
}

.fx-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* =========================================================================
   TWO-COLUMN WORKSPACE & LEDGER PANELS
   ========================================================================= */
.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 920px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.panel-head {
  border-top-left-radius: calc(var(--radius-lg) - 1px);
  border-top-right-radius: calc(var(--radius-lg) - 1px);
}

.panel-head {
  padding: 11px 16px;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.panel-body {
  padding: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =========================================================================
   PRECISION INPUTS, SLIDERS, CHECKBOXES & BUTTONS
   ========================================================================= */
.field {
  margin-bottom: 15px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.field-readout {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.field-note {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.input-box {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-prefix, .input-suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.input-prefix {
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-suffix {
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.ctrl-input, .ctrl-select {
  width: 100%;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: border-color 0.12s ease;
}

.ctrl-select {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-sans);
  font-weight: 500;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3.5 5.25L7 8.75L10.5 5.25' stroke='%23475569' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.ctrl-input:hover, .ctrl-select:hover {
  border-color: var(--border-strong);
}

.ctrl-input:focus, .ctrl-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.14);
}

.input-box.has-prefix .ctrl-input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-box.has-suffix .ctrl-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Crisp editorial range slider */
input[type="range"].ledger-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  margin-top: 8px;
  background: var(--border);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

input[type="range"].ledger-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px var(--accent), 0 1px 3px rgba(15, 23, 42, 0.2);
  cursor: pointer;
  transition: transform 0.12s ease;
}

input[type="range"].ledger-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

input[type="range"].ledger-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px var(--accent), 0 1px 3px rgba(15, 23, 42, 0.2);
  cursor: pointer;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-subtle);
}

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

@media (max-width: 480px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.seg-control {
  display: flex;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.seg-opt {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  white-space: nowrap;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.seg-opt.active {
  background: var(--accent);
  color: #FFFFFF;
}

/* Checkboxes */
.check-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.check-row:hover {
  border-color: var(--border-strong);
  background: var(--bg-panel);
}

.check-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}

.check-left input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
  cursor: pointer;
  margin: 0;
}

.check-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald);
  white-space: nowrap;
}

.check-tag.fee {
  color: var(--rust);
}

/* Action Buttons */
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-panel);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  background: var(--bg-paper);
  border-color: var(--ink);
}

.btn-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

.btn-ink:hover {
  background: #2A2A28;
  border-color: #2A2A28;
}

.btn-emerald {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #FFFFFF;
}

.btn-emerald:hover {
  background: #0B5636;
  border-color: #0B5636;
}

/* =========================================================================
   LIVE LEDGER OUTPUTS, METRIC CARDS & VISUAL BARS
   ========================================================================= */
.hero-metric {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.hero-number {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--emerald);
}

.hero-number.ink { color: var(--ink); }
.hero-number.rust { color: var(--rust); }

.hero-sub {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--ink-muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--ink);
}

.pill.profit {
  background: var(--emerald-tint);
  border-color: var(--emerald-border);
  color: var(--emerald);
}

.pill.loss {
  background: var(--rust-tint);
  border-color: var(--rust-border);
  color: var(--rust);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.kpi-card {
  padding: 10px 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.kpi-card.emerald {
  background: var(--emerald-tint);
  border-color: var(--emerald-border);
}

.kpi-card.rust {
  background: var(--rust-tint);
  border-color: var(--rust-border);
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.kpi-val {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.kpi-val.emerald { color: var(--emerald); }
.kpi-val.rust { color: var(--rust); }

.kpi-meta {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* Visual Breakdown Bars */
.bar-block {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.bar-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.stacked-track {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 3px;
  overflow: hidden;
  background: #E6E4DC;
  border: 1px solid rgba(21, 21, 20, 0.08);
}

.seg-bar {
  height: 100%;
  transition: width 0.2s ease;
}

.seg-emerald { background: var(--emerald); }
.seg-ink { background: var(--ink); }
.seg-slate { background: #475569; }
.seg-sand { background: #94A3B8; }
.seg-rust { background: var(--rust); }
.seg-muted { background: #D4D1C7; }

.bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.leg-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Comparative single bars (YouTube / Multipliers) */
.comp-row {
  margin-bottom: 10px;
}

.comp-row:last-child {
  margin-bottom: 0;
}

.comp-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.comp-track {
  width: 100%;
  height: 10px;
  background: #E8E6DF;
  border-radius: 3px;
  overflow: hidden;
}

.comp-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.2s ease;
}

/* Ledger Breakdown Tables */
.ledger-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

table.ledger-table th {
  background: var(--bg-inset);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.ledger-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #ECEAE3;
  white-space: nowrap;
}

table.ledger-table tr:last-child td {
  border-bottom: none;
}

table.ledger-table td.num-col,
table.ledger-table th.num-col {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

table.ledger-table tr.row-total td {
  font-weight: 700;
  background: var(--bg-inset);
  border-top: 1px solid var(--border-strong);
}

table.ledger-table tr.row-active td {
  background: var(--emerald-tint);
}

.tag-best {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--emerald);
  color: #FFFFFF;
  vertical-align: middle;
}

/* Side-by-side YouTube Cards */
.vs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 560px) {
  .vs-grid {
    grid-template-columns: 1fr;
  }
}

.vs-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--bg-inset);
}

.vs-card.winner {
  background: var(--emerald-tint);
  border-color: var(--emerald-border);
}

.vs-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.vs-amount {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.vs-card.winner .vs-amount {
  color: var(--emerald);
}

.vs-stats {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(21, 21, 20, 0.09);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.vs-stats div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.vs-stats strong {
  color: var(--ink);
}

/* =========================================================================
   EDITORIAL BENCHMARKS, FORMULAS & FAQ (DYNAMIC PER TOOL)
   ========================================================================= */
.editorial-section {
  margin-top: 26px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.editorial-head {
  padding: 16px 20px;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.editorial-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.editorial-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 860px) {
  .editorial-grid {
    grid-template-columns: 1fr;
  }
}

.editorial-col {
  padding: 18px 20px;
  min-width: 0;
}

.editorial-col:first-child {
  border-right: 1px solid var(--border);
}

@media (max-width: 860px) {
  .editorial-col:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.editorial-subhead {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.formula-box {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  background: var(--bg-paper);
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre-wrap;
}

.editorial-copy {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.faq-wrap {
  padding: 8px 20px 14px;
}

.faq-item {
  border-bottom: 1px solid #ECEAE3;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  padding: 12px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
  color: var(--ink);
}

.faq-item p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* =========================================================================
   FOOTER, MODALS & TOAST
   ========================================================================= */
.site-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: 16px;
  font-size: 12px;
  color: var(--ink-muted);
}

.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.footer-btn {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--ink-muted);
  cursor: pointer;
}

.footer-btn:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(21, 21, 20, 0.58);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  overflow: hidden;
}

.modal-card.wide {
  max-width: 760px;
}

.modal-head {
  padding: 13px 16px;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.modal-close {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--ink-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.modal-body {
  padding: 16px;
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.65;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-body p {
  margin: 0 0 10px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-body strong {
  color: var(--ink);
}

.modal-foot {
  padding: 12px 16px;
  background: var(--bg-inset);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.share-preview-frame {
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.share-preview-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Toast Notification */
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  background: var(--ink);
  color: #FFFFFF;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(72px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34D399;
  flex-shrink: 0;
}

/* =========================================================================
   MULTI-PAGE NAVIGATION, HUB HOMEPAGE & EDITORIAL COMPLIANCE PAGES
   ========================================================================= */
a.tool-tab {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.tool-tab:focus-visible,
.curr-btn:focus-visible,
.btn:focus-visible,
.hub-card:focus-visible,
.footer-link:focus-visible,
.breadcrumb a:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--ink-muted);
}

.breadcrumb a {
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.breadcrumb a:hover {
  color: var(--ink);
  border-bottom-color: var(--border-strong);
}

.breadcrumb-sep {
  color: var(--ink-subtle);
}

/* Footer Links (replacing JS modal buttons) */
.footer-link {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.footer-link:hover,
.footer-link.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.footer-disclaimer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--ink-subtle);
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Hub Homepage Hero */
.hub-hero {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  margin-bottom: 20px;
}

.hub-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 24px;
  align-items: end;
}

.hub-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald);
  margin-bottom: 8px;
}

.hub-h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 12px;
}

.hub-lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 18px;
  max-width: 66ch;
}

.hub-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hub-hero-actions .btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hub-ledger-summary {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.hub-ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}

.hub-ledger-row:first-child {
  padding-top: 0;
}

.hub-ledger-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.hub-ledger-label {
  color: var(--ink-muted);
}

.hub-ledger-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hub-ledger-val.emerald {
  color: var(--emerald);
}

/* Hub Tool Directory Sections */
.hub-section {
  margin-bottom: 22px;
}

.hub-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.hub-section-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}

.hub-section-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

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

.hub-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

.hub-card:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.hub-card-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.hub-card-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-tint);
  border: 1px solid var(--emerald-border);
  padding: 2px 7px;
  border-radius: 999px;
}

.hub-card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 6px;
}

.hub-card-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted);
  margin: 0 0 14px;
}

.hub-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.hub-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}

.hub-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.hub-card-arrow {
  font-family: var(--font-mono);
  color: var(--emerald);
  transition: transform 0.16s ease;
}

.hub-card:hover .hub-card-arrow {
  transform: translateX(3px);
}

/* Hub Principles Strip */
.hub-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.principle-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.principle-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald);
  margin-bottom: 6px;
}

.principle-card h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}

.principle-card p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-muted);
  margin: 0;
}

/* Related Tools Internal Link Strip (bottom of each tool page) */
.related-strip {
  margin-top: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

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

.related-head h2 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

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

.related-link {
  display: block;
  padding: 11px 13px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.related-link:hover {
  border-color: var(--ink);
  background: var(--bg-panel);
}

.related-link-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 3px;
}

.related-link-desc {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* Standalone Editorial / Compliance Document Pages */
.doc-article {
  max-width: 820px;
  margin: 0 auto;
}

.doc-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
}

.doc-h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 6px 0 10px;
  color: var(--ink);
}

.doc-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.doc-body h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--ink);
}

.doc-body h2:first-child {
  margin-top: 0;
}

.doc-body p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-muted);
  margin: 0 0 12px;
}

.doc-body ul {
  margin: 0 0 14px;
  padding-left: 20px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.65;
}

.doc-body li {
  margin-bottom: 6px;
}

.doc-body strong {
  color: var(--ink);
}

.doc-callout {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-left: 3px solid var(--emerald);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.6;
}

.doc-callout.warn {
  border-left-color: var(--rust);
  background: var(--rust-tint);
}

.contact-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 18px 0;
}

.contact-email {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.error-404 {
  text-align: center;
  padding: 44px 24px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .hub-hero-grid {
    grid-template-columns: 1fr;
  }
  .hub-principles,
  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .hub-hero {
    padding: 20px 18px;
  }
  .hub-grid {
    grid-template-columns: 1fr;
  }
  .doc-card {
    padding: 20px 18px;
  }
}

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

/* Language Switcher in Sticky Header */
.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg-inset);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2366645E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 26px 6px 10px;
  cursor: pointer;
  line-height: 1.2;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.lang-select:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-panel);
}

.lang-select:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

/* =========================================================================
   CUSTOM COOL-SLATE DROPDOWN MENUS (Header Language & Form Selects)
   ========================================================================= */
.lang-dropdown {
  position: relative;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  line-height: 1.2;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

.lang-trigger:hover {
  border-color: var(--border-strong);
  background: var(--bg-inset);
}

.lang-dropdown.open .lang-trigger,
.lang-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.14);
}

.lang-chevron,
.cselect-chevron {
  width: 14px;
  height: 14px;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: transform 0.16s ease, color 0.14s ease;
}

.lang-dropdown.open .lang-chevron,
.cselect.open .cselect-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 176px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 5px;
  z-index: 60;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.lang-dropdown.open .lang-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.lang-option:hover {
  background: var(--accent-tint);
  color: var(--accent);
}

.lang-option.active {
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 600;
}

.lang-option-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-subtle);
  margin-right: 6px;
}

.lang-option.active .lang-option-code {
  color: var(--accent);
}

/* Progressive-Enhancement Custom Select for Calculator Forms */
.cselect {
  position: relative;
  width: 100%;
}

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

.cselect-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

.cselect-trigger:hover {
  border-color: var(--border-strong);
  background: #FAFBFD;
}

.cselect.open .cselect-trigger,
.cselect-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.14);
}

.cselect-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cselect-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 5px;
  z-index: 55;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.cselect.open .cselect-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cselect-opt {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.cselect-opt:hover,
.cselect-opt:focus-visible {
  outline: none;
  background: var(--accent-tint);
  color: var(--accent);
}

.cselect-opt.selected {
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 600;
}

.cselect-check {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0;
}

.cselect-opt.selected .cselect-check {
  opacity: 1;
}

/* Cool-tone polish for active tabs, badges & hero surfaces */
.tool-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.tool-tab:hover:not(.active) {
  border-color: var(--accent-border);
  background: var(--accent-tint);
  color: var(--accent);
}

.btn-ink {
  background: var(--ink);
  border-color: var(--ink);
}

.btn-ink:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.hub-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.hub-card-badge {
  color: var(--accent);
  background: var(--accent-tint);
  border-color: var(--accent-border);
}

.hub-kicker,
.principle-num {
  color: var(--accent);
}

/* Dynamic Cobalt Slider Fill Track & Quick Preset Chips */
input[type="range"].ledger-slider {
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--slider-pct, 50%),
    var(--border) var(--slider-pct, 50%),
    var(--border) 100%
  );
}

.preset-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.preset-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-subtle);
  margin-right: 2px;
}

.preset-chip {
  appearance: none;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

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

.preset-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
