/* ===== KWIKSUM SHARED STYLES ===== */
:root {
  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface-2: #f0efec;
  --surface-3: #e8e7e4;
  --border: #dddcd8;
  --text: #1a1a1c;
  --text-muted: #5a5a60;
  --text-dim: #8b8b92;
  --accent: #0d9488;
  --accent-dim: rgba(13, 148, 136, 0.1);
  --accent-glow: rgba(13, 148, 136, 0.05);
  --success: #16a34a;
  --error: #dc2626;
  --radius: 12px;
  --radius-lg: 20px;
  --font-body: 'DM Sans', sans-serif;
  --font-display: 'Outfit', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
button { background-color: transparent; }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 244, 241, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  color: var(--text); text-decoration: none; letter-spacing: -0.04em; flex-shrink: 0;
}
.logo span { color: var(--accent); }
.search-bar { flex: 1; max-width: 420px; position: relative; }
.search-bar input {
  width: 100%; padding: 10px 16px 10px 40px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: var(--font-body); font-size: 0.9rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-bar input::placeholder { color: var(--text-dim); }
.search-bar svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); }
.header-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.currency-switcher, .decimal-switcher {
  display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.currency-btn, .decimal-btn {
  padding: 8px 12px; background: transparent; border: none; color: var(--text-dim);
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; cursor: pointer;
  transition: all 0.15s; position: relative;
}
.decimal-btn { padding: 8px 10px; font-size: 0.8rem; }
.currency-btn:not(:last-child)::after,
.decimal-btn:not(:last-child)::after {
  content: ''; position: absolute; right: 0; top: 25%; height: 50%; width: 1px; background: var(--border);
}
.currency-btn:hover, .decimal-btn:hover { color: var(--text); }
.currency-btn.active, .decimal-btn.active {
  background: var(--accent-dim); color: var(--accent); font-weight: 600;
}
.theme-toggle {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; color: var(--text-muted); cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.filter-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; align-self: center; }

/* ===== LAYOUT ===== */
.app-layout {
  max-width: 1200px; margin: 0 auto; padding: 24px;
  display: grid; grid-template-columns: 220px 1fr; gap: 32px; min-height: calc(100vh - 65px);
}
.sidebar { position: sticky; top: 89px; height: fit-content; }
.nav-section { margin-bottom: 28px; }
.nav-label {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); padding: 0 12px; margin-bottom: 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  color: var(--text-muted); font-size: 0.88rem; font-weight: 450; cursor: pointer;
  transition: all 0.15s; text-decoration: none; user-select: none;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 500; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.8; }
.nav-item.active svg { opacity: 1; }
.main-content { min-width: 0; }

/* ===== HOME GRID ===== */
.home-view .section-title {
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 700;
  margin-bottom: 6px; letter-spacing: -0.03em;
}
.home-view .section-sub { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 40px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; cursor: pointer; transition: all 0.2s; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 12px;
}
.tool-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 0 0 1px var(--accent-dim);
}
.tool-card-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.tool-card h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.tool-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.tool-card .tag { font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-top: auto; }

/* ===== CALCULATOR VIEWS ===== */
.calc-header { margin-bottom: 28px; }
.calc-back {
  display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.85rem;
  cursor: pointer; margin-bottom: 16px; transition: color 0.15s; background: none; border: none;
  font-family: var(--font-body); text-decoration: none;
}
.calc-back:hover { color: var(--accent); }
.calc-header h1 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 6px; }
.calc-header p { color: var(--text-muted); font-size: 0.95rem; }
.calc-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.calc-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.calc-panel h2 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); margin-bottom: 20px; }

/* Form elements */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 7px; }
.field input, .field select {
  width: 100%; padding: 11px 14px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-family: var(--font-body); font-size: 0.95rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.field input::placeholder { color: var(--text-dim); }
.input-group { display: flex; gap: 10px; }
.input-group .field { flex: 1; margin-bottom: 0; }
.field .input-with-unit { position: relative; }
.field .input-with-unit input { padding-right: 45px; }
.field .input-unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 0.85rem; pointer-events: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 10px; font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.15s; border: none; }
.btn-primary { background: var(--accent); color: #0c0c0e; width: 100%; margin-top: 8px; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-secondary { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }

/* Results */
.result-big { text-align: center; padding: 20px 0; }
.result-big .result-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 8px; }
.result-big .result-value { font-family: var(--font-display); font-size: 2.8rem; font-weight: 700; color: var(--accent); letter-spacing: -0.03em; line-height: 1.1; }
.result-big .result-sub { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }
.result-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.result-row:last-child { border-bottom: none; }
.result-row .rr-label { color: var(--text-muted); font-size: 0.9rem; }
.result-row .rr-value { font-weight: 600; font-size: 0.95rem; }
.result-divider { border: none; border-top: 1px dashed var(--border); margin: 4px 0; }

/* Bar chart */
.bar-chart { margin-top: 16px; }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar-row .bar-label { width: 80px; font-size: 0.82rem; color: var(--text-muted); flex-shrink: 0; text-align: right; }
.bar-row .bar-track { flex: 1; height: 28px; background: var(--surface-2); border-radius: 6px; overflow: hidden; position: relative; }
.bar-row .bar-fill { height: 100%; border-radius: 6px; transition: width 0.5s ease; display: flex; align-items: center; padding-left: 10px; font-size: 0.78rem; font-weight: 600; color: #0c0c0e; min-width: fit-content; }

/* Copy / share buttons */
.copy-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px;
  color: var(--text-muted); font-size: 0.78rem; font-family: var(--font-body); cursor: pointer;
  transition: all 0.15s; display: inline-flex; align-items: center; gap: 5px; margin-top: 16px;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== SHARE BAR ===== */
.share-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 16px 0; margin-top: 28px;
  border-top: 1px solid var(--border);
}
.share-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); margin-right: 4px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-family: var(--font-body); font-size: 0.82rem;
  font-weight: 500; cursor: pointer; text-decoration: none; transition: all 0.15s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn.copied { border-color: var(--success); color: var(--success); }
.share-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Calc tabs */
.calc-tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; margin-bottom: 20px; }
.calc-tab { flex: 1; padding: 8px 16px; border-radius: 8px; border: none; background: transparent; color: var(--text-muted); font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.calc-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.2); }

/* Bill split */
.person-entry { display: flex; gap: 10px; align-items: end; margin-bottom: 12px; }
.person-entry .field { margin-bottom: 0; }
.person-entry .field:first-child { flex: 1.2; }
.person-entry .field:nth-child(2) { flex: 1; }
.person-remove { padding: 11px; background-color: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text-muted); cursor: pointer; transition: all 0.15s; flex-shrink: 0; font-family: var(--font-body); font-size: 0.9rem; line-height: 1; }
.person-remove:hover { border-color: var(--error); color: var(--error); }
.add-person-btn { display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: none; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-muted); font-family: var(--font-body); font-size: 0.85rem; cursor: pointer; transition: all 0.15s; width: 100%; justify-content: center; }
.add-person-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Swap btn */
.swap-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; margin: 0 auto; flex-shrink: 0; }
.swap-btn:hover { border-color: var(--accent); color: var(--accent); transform: rotate(180deg); }

/* Tables */
.amort-table { width: 100%; font-size: 0.8rem; margin-top: 16px; border-collapse: collapse; }
.amort-table th { text-align: left; padding: 8px 6px; color: var(--text-dim); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
.amort-table td { padding: 7px 6px; color: var(--text-muted); border-bottom: 1px solid rgba(42,42,48,0.5); }
.amort-table tr:hover td { color: var(--text); }

/* FAQ / SEO content */
.seo-content { margin-top: 16px; }
.seo-content h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 16px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.faq-question { width: 100%; padding: 16px 20px; background: transparent; border: none; color: var(--text); font-family: var(--font-body); font-size: 0.92rem; font-weight: 500; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; transition: color 0.15s; }
.faq-question:hover { color: var(--accent); }
.faq-question .faq-icon { flex-shrink: 0; transition: transform 0.2s; color: var(--text-dim); font-size: 1.2rem; }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-answer-inner { padding: 0 20px 16px; color: var(--text-muted); font-size: 0.88rem; line-height: 1.65; }
.seo-text { color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; margin-top: 20px; max-width: 720px; }
.seo-text a { color: var(--accent); text-decoration: none; }
.seo-text a:hover { text-decoration: underline; }

/* Mobile nav */
.mobile-nav { display: none; overflow-x: auto; gap: 6px; padding: 12px 0; margin-bottom: 8px; -webkit-overflow-scrolling: touch; }
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav-item { flex-shrink: 0; padding: 7px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: all 0.15s; white-space: nowrap; text-decoration: none; }
.mobile-nav-item:hover, .mobile-nav-item.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* Decimal switcher */
.decimal-btn { padding: 8px 10px; font-size: 0.8rem; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.25s ease; }

/* Ad slots */
.ad-slot { border-radius: var(--radius); display: none; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.ad-slot.ad-active { display: flex; background: var(--surface); border: 1px solid var(--border); }
.ad-slot-sidebar { min-height: 250px; padding: 20px; margin-top: 20px; }
.ad-slot-leaderboard { min-height: 90px; padding: 16px; max-width: 1200px; margin: 0 auto 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 60px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer-brand .logo { display: inline-block; margin-bottom: 12px; }
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; max-width: 300px; }
.footer-col h4 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.88rem; padding: 4px 0; transition: color 0.15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { color: var(--text-dim); font-size: 0.8rem; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--text-dim); text-decoration: none; font-size: 0.8rem; transition: color 0.15s; }
.footer-bottom-links a:hover { color: var(--accent); }

/* Breadcrumb */
.breadcrumb { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-muted); }

/* Light theme */
body.dark {
  --bg: #0c0c0e;
  --surface: #161619;
  --surface-2: #1e1e22;
  --surface-3: #26262b;
  --border: #2a2a30;
  --text: #e8e6e3;
  --text-muted: #b0b0b6;
  --text-dim: #7e7e86;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.12);
  --accent-glow: rgba(45, 212, 191, 0.06);
  --success: #4ade80;
  --error: #f87171;
}
body.dark header { background: rgba(12, 12, 14, 0.85); }
body.dark .tool-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 0 0 1px var(--accent-dim); }
body.dark .bar-row .bar-fill { color: #0c0c0e; }

/* Responsive */
@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
  .sidebar { display: none; }
  .calc-body { grid-template-columns: 1fr; }
  .mobile-nav { display: flex !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .header-controls { gap: 6px; }
  .currency-switcher { display: none; }
  .decimal-switcher { display: none; }
  .filter-label { display: none; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* Mobile nav category separator */
.mobile-nav-sep {
  flex-shrink: 0; color: var(--border); font-size: 0.9rem; padding: 0 4px;
  display: flex; align-items: center; user-select: none;
}

/* Educational content sections */
.edu-content h2 { margin-top: 32px; }
.edu-content h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--text); margin-top: 24px; margin-bottom: 8px; letter-spacing: -0.01em; }
.edu-content p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.75; margin-bottom: 12px; }
.edu-content a { color: var(--accent); text-decoration: none; }
.edu-content a:hover { text-decoration: underline; }

/* Nav category labels - larger, bold, no emojis */
.nav-label.nav-category {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 8px;
  margin-top: 6px;
}

/* Hamburger menu button */
.burger-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  transition: all 0.15s;
  flex-shrink: 0;
}
.burger-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Mobile slide-out menu */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s;
}
.mobile-menu-overlay.open { opacity: 1; }

.mobile-menu {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  padding: 20px 0;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu .nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 20px 6px;
}
.mobile-menu .mm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 450;
  text-decoration: none;
  transition: all 0.15s;
}
.mobile-menu .mm-item:hover { background: var(--surface); color: var(--text); }
.mobile-menu .mm-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 500; }
.mobile-menu .mm-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.8; }
.mobile-menu .mm-item.active svg { opacity: 1; }
.mobile-menu .mm-close {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.mobile-menu .mm-close .logo { font-size: 1.3rem; }
.mobile-menu .mm-close-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.15s;
}
.mobile-menu .mm-close-btn:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 900px) {
  .burger-btn { display: flex; align-items: center; justify-content: center; }
  .mobile-menu-overlay { display: block; pointer-events: none; }
  .mobile-menu-overlay.open { pointer-events: auto; }
}

/* Mobile menu category labels - bold, no emojis */
.mobile-menu .nav-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 14px 20px 6px;
}

.nav-label.nav-category { font-size: 0.82rem !important; font-weight: 800 !important; color: var(--text) !important; letter-spacing: 0.05em; padding: 4px 12px; margin-top: 10px; margin-bottom: 10px; }
.mobile-menu .nav-label { font-size: 0.82rem !important; font-weight: 800 !important; color: var(--text) !important; letter-spacing: 0.05em; padding: 16px 20px 8px; }

/* ALL nav labels and section headings - consistent bold large style */
.nav-label, .nav-label.nav-category {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  padding: 4px 12px !important;
  margin-top: 12px !important;
  margin-bottom: 10px !important;
}

/* Homepage section headings above card grids */
.home-view h2 {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin-bottom: 12px !important;
}

/* Mobile menu labels */
.mobile-menu .nav-label {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  padding: 16px 20px 8px !important;
}

/* Disclaimer banners (YMYL pages) */
.disclaimer-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.disclaimer-icon {
  flex-shrink: 0;
  font-size: 0.9rem;
}
body.light .disclaimer-banner {
  background: rgba(96, 165, 250, 0.06);
  border-color: rgba(96, 165, 250, 0.15);
}

/* Source citations */
.source-citation {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 10px;
  padding-top: 8px;
}
.source-citation a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.source-citation a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Footer headings (replacing h4 with spans) */
.footer-heading {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 14px;
}

/* Section labels (replacing h2 in calc panels) */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* All-tools hub page */
.all-tools-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.all-tools-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}
.all-tools-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}
.all-tools-item strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.all-tools-item span {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.all-tools-item:hover strong {
  color: var(--accent);
}

p.section-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); margin-bottom: 20px; }

/* Legal content pages */
.legal-content { max-width: 720px; }
.legal-content h2 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--text); margin: 28px 0 10px; letter-spacing: -0.01em; }
.legal-content h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin: 20px 0 8px; }
.legal-content p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.75; margin-bottom: 12px; }
.legal-content a { color: var(--accent); text-decoration: none; }
.legal-content a:hover { text-decoration: underline; }

/* Cookie table */
.cookie-table { margin: 12px 0 20px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cookie-row { display: grid; grid-template-columns: 140px 1fr 100px; padding: 10px 16px; font-size: 0.84rem; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.cookie-row:last-child { border-bottom: none; }
.cookie-header { background: var(--surface-2); font-weight: 600; color: var(--text-dim); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 500px) { .cookie-row { grid-template-columns: 1fr; gap: 2px; } .cookie-header { display: none; } }

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 300;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  flex-wrap: wrap;
}
.cookie-banner p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  max-width: 600px;
}
.cookie-banner a {
  color: var(--accent);
  text-decoration: none;
}
.cookie-banner a:hover {
  text-decoration: underline;
}
.cookie-banner-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie-accept-btn { padding: 8px 20px;
  background: var(--accent);
  color: #0c0c0e;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s;
}
.cookie-accept-btn:hover { filter: brightness(1.1); }
.cookie-decline-btn {
  padding: 8px 20px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.cookie-decline-btn:hover { border-color: var(--text-muted); color: var(--text); }

/* Salary comparison */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.compare-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.compare-col.highlight { border-color: var(--success); }
.col-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.col-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); }
.col-badge { font-size: 0.7rem; font-weight: 600; padding: 3px 10px; border-radius: 6px; }
.badge-a { background: rgba(96,165,250,0.15); color: #60a5fa; }
.badge-b { background: rgba(74,222,128,0.15); color: #4ade80; }
.compare-summary { margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.summary-header { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); margin-bottom: 16px; }
.diff-row { display: grid; grid-template-columns: 140px 1fr 1fr 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.86rem; align-items: center; }
.diff-row:last-child { border-bottom: none; }
.diff-row.diff-header { color: var(--text-dim); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.diff-label { color: var(--text-muted); }
.diff-a { color: #60a5fa; font-weight: 500; }
.diff-b { color: #4ade80; font-weight: 500; }
.diff-change { font-weight: 600; }
.diff-positive { color: var(--success); }
.diff-negative { color: var(--error); }
.bar-compare { margin-top: 20px; }
.bar-pair { margin-bottom: 12px; }
.bar-pair-label { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 4px; }
.bar-pair-tracks { display: flex; flex-direction: column; gap: 3px; }
.compare-insight { font-size: 0.82rem; color: var(--text-dim); margin-top: 16px; text-align: center; }
@media (max-width: 900px) {
  .compare-grid { grid-template-columns: 1fr; }
  .diff-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .diff-row.diff-header { display: none; }
}


/* Light mode (default) specific fixes */
header { background: rgba(245, 244, 241, 0.92); }
.btn-primary { color: #fff !important; }
.bar-row .bar-fill { color: #fff !important; }
.tool-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08), 0 0 0 1px var(--accent-dim); }

/* Dark mode header override */
body.dark header { background: rgba(12, 12, 14, 0.85) !important; }
body.dark .btn-primary { color: #0c0c0e; }
body.dark .bar-row .bar-fill { color: #0c0c0e; }
body.dark .tool-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 0 0 1px var(--accent-dim) !important; }

/* Disclaimer banner — both modes */
body.dark .disclaimer-banner { background: rgba(96, 165, 250, 0.08); border-color: rgba(96, 165, 250, 0.2); }
.disclaimer-banner { background: rgba(96, 165, 250, 0.06); border-color: rgba(96, 165, 250, 0.15); }

/* Cookie banner dark mode */
body.dark .cookie-banner { background: var(--surface); }
body.dark .cookie-accept-btn { color: #fff !important; color: #0c0c0e; background: var(--accent); }

/* Compare colours — ensure readable in light */
body.dark .diff-a { color: #60a5fa; }
body.dark .diff-b { color: #4ade80; }
.diff-a { color: #2563eb; }
.diff-b { color: #16a34a; }
body.dark .badge-a { background: rgba(96,165,250,0.15); color: #60a5fa; }
body.dark .badge-b { background: rgba(74,222,128,0.15); color: #4ade80; }
.badge-a { background: rgba(37,99,235,0.1); color: #2563eb; }
.badge-b { background: rgba(22,163,74,0.1); color: #16a34a; }

/* Result value colours in light mode */
body.dark .result-big .result-value { color: var(--accent); }

/* Prevent flash of wrong theme */
html.dark-pending { background: #0c0c0e; }
html.dark-pending body { visibility: hidden; }
