/* TOS Shared Design System: site-wide readability and interaction layer */
:root {
  --bg: #0d0d0d;
  --surface: #141414;
  --surface2: #1c1c1c;
  --border: #2a2a2a;
  --amber: #f59e0b;
  --amber-dim: #d97706;
  --amber-glow: rgba(245,158,11,0.10);
  --white: #f4f1eb;
  --muted: #aaa9a1;
  --text: #dedbd3;
  --success: #70ad82;
  --info: #7f9fbd;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
}

p, li, dd, .post-body, .post-content, .article-body, .page-hero-sub,
.page-header-sub, .tier-desc, .tool-detail, .tool-why, .job-note,
.target-label, .target-value, .modifier-desc, .rate-note, .field-hint,
.insight-text, .result-sub, .result-metric-sub, .room-row-name,
.vault-card-desc, .calc-card-desc, .about-card-desc, .audience-body {
  font-family: 'Barlow', ui-sans-serif, system-ui, sans-serif;
  line-height: 1.58;
}

table, input, select, textarea, output, .result-value, .result-val,
.result-metric-value, .breakdown-value, .price-cell, .hours-cell,
.calc-price, .target-value, .modifier-mult, .rate-input, .temp-input {
  font-family: 'Barlow', ui-sans-serif, system-ui, sans-serif !important;
  font-variant-numeric: tabular-nums lining-nums;
}

table { font-size: 0.95rem; }
th { line-height: 1.35; }
td { line-height: 1.5; }

.rate-table td, .tools-table td, .pt-table td, .markup-table td,
.breakdown-table td { padding-top: 14px !important; padding-bottom: 14px !important; }

.rate-table th, .tools-table th, .pt-table th, .markup-table th,
.breakdown-table th { color: #d6b36f !important; font-size: 0.78rem !important; }

.hours-cell, .price-cell, .calc-price, .pt-table td, .result-value,
.result-val, .result-metric-value, .breakdown-value, .modifier-mult {
  font-weight: 650 !important;
  letter-spacing: 0 !important;
}

.calc-price, .result-value.green, .result-metric-value.green,
.tag.green, .priority-must { color: var(--success) !important; }
.pt-table td:last-child, .result-val { color: var(--info) !important; }

.meta-tag, .vault-tag, .modifier-tag, .tool-priority, .section-badge,
.calc-badge, .series-badge, .shop-badge, .vault-badge {
  cursor: default;
  border-radius: 2px;
}

a, button, input, select, textarea, [tabindex] { outline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--amber);
  box-shadow: 0 0 0 2px var(--bg);
}

button, [role='tab'] { min-height: 42px; }
.nav-links a, .mobile-menu a, .footer-links-list a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.nav-links a:hover, .nav-links a:focus-visible,
.footer-links-list a:hover, .footer-links-list a:focus-visible { color: var(--white); }

[id] { scroll-margin-top: 92px; }
.section-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}
.section-jump-nav a {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-jump-nav a:hover, .section-jump-nav a:focus-visible {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(245, 158, 11, 0.06);
}

.tier-tab, .tab {
  appearance: none;
  border-top: 0;
  border-left: 0;
  background: var(--surface);
}
.faq-q {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}
.checklist-item:focus-visible { background: rgba(245, 158, 11, 0.06); }
.tier-tab:focus-visible, .tab:focus-visible, .mode-btn:focus-visible,
.tab-btn:focus-visible { position: relative; z-index: 2; }

@media (max-width: 768px) {
  body { font-size: 16px; }
  table { font-size: 0.9rem; }
  .rate-table, .tools-table, .pt-table, .markup-table, .breakdown-table { min-width: 620px; }
  .pt-table { min-width: 360px; }
  .pt-table-wrap, .tools-category, .tab-content, .breakdown-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .section-jump-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .section-jump-nav a { flex: 0 0 auto; }
}
