/* ══════════════════════════════════════
   DESIGN SYSTEM — MODERN IDE DARK PALETTE
   Deep Space · Low-Glare · Tech Authority
   Updated: 2026-05-15
══════════════════════════════════════ */
:root {
  --ink:      #C9D1D9; /* Text Primary */
  --ink2:     #B0B8C1;
  --ink3:     #8B949E; /* Text Muted */
  --ink4:     #484F58;
  --paper:    #0D1117; /* Background */
  --paper2:   #161B22; /* Surface */
  --paper3:   #21262D; /* Primary Action Area */
  --paper4:   #30363D; /* Border Subtle */
  --rule:     #30363D;
  --rule2:    #484F58;
  --accent:   #58A6FF; /* IDE Accent Blue */
  --accent2:  #1f6feb;
  --gold:     #d29922;
  --gold2:    #e3b341;
  --blue:     #58a6ff;
  --green:    #3fb950;
  --serif:    'Playfair Display', Georgia, 'Times New Roman', serif;
  --body:     'Source Serif 4', Georgia, serif;
  --mono:     'JetBrains Mono', 'Courier New', monospace;
  --shadow:   0 2px 8px rgba(0,0,0,.3);
  --shadow2:  0 8px 32px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  font-size: clamp(0.9rem, 0.2vw + 0.85rem, 1rem);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 1000; opacity: .1;
}

/* ══════════════════════════════════════
   TOP BAR
══════════════════════════════════════ */
.top-bar {
  background: var(--ink);
  color: var(--paper3);
  font-size: clamp(9px, 1.5vw, 11px);
  font-family: var(--body);
  text-align: center;
  padding: 5px 20px;
  letter-spacing: .04em;
}
.top-bar a { color: var(--gold2); text-decoration: none; }

/* ══════════════════════════════════════
   MASTHEAD
   Enhanced with fluid typography
══════════════════════════════════════ */
.masthead {
  background: var(--paper);
  border-bottom: 3px double var(--rule2);
  padding: 18px 32px 14px;
}
.masthead-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
}
.logo-block { flex: 1; }
.logo-name {
  font-family: var(--serif);
  font-size: 28px;
  font-size: clamp(24px, 4vw, 32px); font-weight: 900;
  color: var(--ink); letter-spacing: -1px;
  line-height: 1;
}
.logo-name em { color: var(--accent); font-style: normal; }
.logo-tagline {
  font-size: clamp(9px, 1.5vw, 11px); font-family: var(--body); color: var(--ink3);
  font-style: italic; margin-top: 3px; letter-spacing: .03em;
}
.masthead-meta {
  text-align: right; font-size: clamp(9px, 1.2vw, 10px); color: var(--ink3);
  font-family: var(--body); line-height: 1.7;
}
.masthead-meta strong { color: var(--ink2); font-weight: 600; display: block; font-size: clamp(10px, 1.5vw, 11px); }

/* ══════════════════════════════════════
   PRIMARY NAV
══════════════════════════════════════ */
.primary-nav {
  background: var(--paper2);
  border-bottom: 1px solid var(--rule);
}
.primary-nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 32px;
}
.nav-item {
  font-family: var(--body); font-size: 11.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink2); padding: 10px 16px;
  border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all .15s;
  position: relative;
  text-decoration: none;
}
.nav-item:hover { color: var(--accent); background: var(--paper3); }
.nav-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--paper);
}
.nav-item .nav-new {
  position: absolute; top: 6px; right: 4px;
  font-size: 8px; background: var(--accent); color: white;
  padding: 1px 4px; border-radius: 3px; letter-spacing: .02em;
}

/* Dropdown Logic */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
.nav-dropdown:hover .dropdown-content {
  display: block;
}
.nav-dropdown .nav-item {
  padding-right: 24px;
}
.nav-dropdown .nav-item::after {
  content: '';
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 7px; height: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9D1D9' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  opacity: 0.8;
}
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--paper);
  min-width: 180px;
  box-shadow: var(--shadow2);
  z-index: 2000;
  border: 1px solid var(--rule2);
  padding: 8px 0;
}
.dropdown-content a {
  display: block;
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink2);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--paper2);
  transition: all .15s;
}
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover {
  background: var(--paper3);
  color: var(--accent);
}

/* ══════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════ */
.breadcrumb-bar {
  background: var(--paper3);
  border-bottom: 1px solid var(--rule);
  padding: 6px 32px;
}
.breadcrumb-inner {
  max-width: 1100px; margin: 0 auto;
  font-size: 11px; color: var(--ink3); font-family: var(--body);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.breadcrumb-inner a { color: var(--accent); text-decoration: none; }
.breadcrumb-inner a:hover { text-decoration: underline; }
.bc-sep { color: var(--rule2); }

/* ══════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════ */
.site-wrapper {
  max-width: 1100px; margin: 0 auto;
  padding: 0 32px 48px;
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  margin-top: 28px;
  align-items: start;
}

/* ══════════════════════════════════════
   PAGE HERO
══════════════════════════════════════ */
.page-hero {
  border-bottom: 2px solid var(--rule);
  padding: 24px 0 18px;
  margin-top: 20px;
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: 32px;
  font-size: clamp(1.75rem, 5vw, 2.25rem); font-weight: 700;
  color: var(--ink); line-height: 1.1;
  margin-bottom: 8px;
}
.page-hero .hero-desc {
  font-size: 14px; color: var(--ink2); line-height: 1.6;
  max-width: 680px;
}
.hero-meta {
  display: flex; gap: 16px; margin-top: 10px;
  font-size: 11px; color: var(--ink3); font-family: var(--body);
  flex-wrap: wrap;
}
.hero-meta span { display: flex; align-items: center; gap: 4px; }
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--rule2); }

/* ══════════════════════════════════════
   ANSWER CAPSULE — #1 for AI / GEO
══════════════════════════════════════ */
.answer-capsule {
  background: var(--paper2);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  padding: 18px 20px;
  margin: 24px 0;
  position: relative;
  box-shadow: var(--shadow);
}
.answer-capsule::before {
  content: 'QUICK ANSWER';
  display: block; font-family: var(--body);
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  color: var(--gold2); margin-bottom: 8px;
}
.answer-capsule p {
  font-size: 14px; line-height: 1.65; color: var(--ink2);
  margin: 0;
}
.answer-capsule strong { color: var(--gold2); font-weight: 600; }

/* ══════════════════════════════════════
   CONVERTER TOOL CARD
══════════════════════════════════════ */
.tool-card {
  background: var(--paper);
  border: 1px solid var(--rule2);
  border-top: 3px solid var(--accent);
  padding: 24px;
  box-shadow: var(--shadow);
}
.tool-card-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 12px;
}
.tool-card-title {
  font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink);
}
.tool-card-sub { font-size: 11px; color: var(--ink3); font-style: italic; }

/* Standard Tool Grid (with Swap Button) */
.converter-inputs {
  display: grid; 
  grid-template-columns: 1fr 44px 1fr;
  gap: 12px; 
  align-items: end; 
  margin-bottom: 20px;
}

/* Flexible Tool Grid (Simple 2+ Inputs) */
.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.input-group { display: flex; flex-direction: column; }

.input-label {
  font-size: 10px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink3); font-family: var(--body);
  margin-bottom: 4px;
}
.input-field {
  background: var(--paper);
  border: 1px solid var(--rule2);
  padding: 10px 12px;
  font-family: var(--mono); font-size: 18px; font-weight: 500;
  color: var(--ink); width: 100%; outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,58,26,.1);
}
.input-field.output {
  background: var(--paper2);
  color: var(--accent); font-weight: 600;
  border-color: var(--rule); cursor: default;
}
.unit-select {
  background: var(--paper3);
  border: 1px solid var(--rule2);
  padding: 7px 10px;
  font-family: var(--body); font-size: 12px; color: var(--ink);
  width: 100%; outline: none; cursor: pointer;
  transition: border-color .15s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6760' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.unit-select:focus { border-color: var(--accent); outline: none; }

.swap-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: 0;
  background: var(--paper3); border: 1px solid var(--rule2);
  cursor: pointer; color: var(--ink3); font-size: 16px;
  transition: all .15s; align-self: center; margin-top: 20px;
  font-family: var(--mono);
}
.swap-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }

.result-display {
  background: var(--paper2);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  margin: 16px 0;
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap;
}
.result-number {
  font-family: var(--mono); font-size: 32px; font-weight: 600;
  color: var(--accent); line-height: 1;
}
.result-unit {
  font-family: var(--body); font-size: 16px; color: var(--ink2);
}
.result-eq {
  font-family: var(--body); font-size: 12px; color: var(--ink3);
  font-style: italic; margin-top: 4px; width: 100%;
}

/* Formula box */
.formula-box {
  background: var(--paper3);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  padding: 12px 14px;
  margin-top: 14px;
}
.formula-label {
  font-size: 9px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold); font-family: var(--body);
  margin-bottom: 5px;
}
.formula-text {
  font-family: var(--mono); font-size: 13px; color: var(--ink2); line-height: 1.6;
}

/* All units grid */
.all-units-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 16px;
}
.unit-result-item {
  background: var(--paper2); border: 1px solid var(--rule);
  padding: 8px 10px; cursor: pointer; transition: all .15s;
}
.unit-result-item:hover { border-color: var(--accent); background: var(--paper3); }
.unit-result-item.active-unit { border-color: var(--accent); border-left-width: 3px; }
.uri-label { font-size: 10px; color: var(--ink3); font-family: var(--body); margin-bottom: 2px; }
.uri-val { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--ink); }

/* ══════════════════════════════════════
   SECTION HEADINGS
══════════════════════════════════════ */
.section-head {
  font-family: var(--body); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink3);
  border-bottom: 2px solid var(--rule2);
  padding-bottom: 7px; margin: 28px 0 14px;
}
.section-head.gold { border-bottom-color: var(--gold); color: var(--gold); }

h2 {
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  color: var(--ink); margin: 28px 0 12px; line-height: 1.25;
}
h3 {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  color: var(--ink2); margin: 20px 0 8px;
}

/* ══════════════════════════════════════
   REFERENCE TABLES
══════════════════════════════════════ */
.ref-table-wrap { overflow-x: auto; margin: 12px 0; }
.ref-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; font-family: var(--body);
}
.ref-table caption {
  font-size: 11px; color: var(--ink3); font-style: italic;
  text-align: left; padding: 6px 0; caption-side: bottom;
}
.ref-table thead th {
  background: var(--paper3);
  font-family: var(--body); font-weight: 600; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink2);
  padding: 8px 12px; border: 1px solid var(--rule2);
  text-align: left; white-space: nowrap;
}
.ref-table td {
  padding: 7px 12px; border: 1px solid var(--rule);
  color: var(--ink2); vertical-align: middle;
}
.ref-table td:first-child { color: var(--ink); font-weight: 500; }
.ref-table td.mono { font-family: var(--mono); font-size: 12px; color: var(--accent2); }
.ref-table tbody tr:nth-child(even) td { background: var(--paper2); }
.ref-table tbody tr:hover td { background: var(--paper3); }

/* ══════════════════════════════════════
   CONTENT PROSE
══════════════════════════════════════ */
.prose { font-size: 14px; color: var(--ink2); line-height: 1.75; }
.prose p { margin-bottom: 14px; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 14px; }
.prose li { margin-bottom: 5px; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }

/* ══════════════════════════════════════
   FAQ SECTION
══════════════════════════════════════ */
.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
}
.faq-q {
  font-family: var(--serif); font-size: 15px; font-weight: 600;
  color: var(--ink); cursor: pointer;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.faq-q .faq-arrow {
  color: var(--accent); font-size: 14px; flex-shrink: 0;
  font-family: var(--mono); transition: transform .2s; margin-top: 2px;
}
.faq-q.open .faq-arrow { transform: rotate(90deg); }
.faq-a {
  font-size: 13.5px; color: var(--ink2); line-height: 1.7;
  margin-top: 10px; padding-left: 14px;
  border-left: 2px solid var(--rule);
  display: none;
}
.faq-a.open { display: block; }

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-card {
  background: var(--paper2);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--rule2);
  padding: 16px;
}
.sidebar-card.accent-top { border-top-color: var(--accent); }
.sidebar-card.gold-top { border-top-color: var(--gold); }

.sidebar-title {
  font-family: var(--body); font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink3);
  margin-bottom: 12px; border-bottom: 1px solid var(--rule);
  padding-bottom: 7px;
}

.qr-list { display: flex; flex-direction: column; }
.qr-item {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 5px 0; border-bottom: 1px dotted var(--rule);
  font-size: 12px;
}
.qr-item:last-child { border-bottom: none; }
.qr-label { font-family: var(--body); color: var(--ink2); }
.qr-val { font-family: var(--mono); font-size: 11.5px; color: var(--accent2); font-weight: 500; }

/* Related links */
.related-link {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--rule);
  cursor: pointer; transition: all .12s; text-decoration: none;
}
.related-link:last-child { border-bottom: none; }
.related-link:hover .rl-name { color: var(--accent); }
.rl-icon {
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--paper3); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--ink3);
}
.rl-name { font-size: 12px; font-weight: 600; color: var(--ink2); transition: color .12s; }
.rl-desc { font-size: 11px; color: var(--ink3); margin-top: 1px; }

/* Trade tip */
.trade-tip {
  background: var(--paper3);
  border-left: 3px solid var(--gold);
  padding: 10px 12px;
  font-size: 12px; color: var(--ink2); line-height: 1.55;
  font-style: italic;
}
.trade-tip strong {
  display: block; font-style: normal; font-size: 10px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--gold);
  margin-bottom: 4px; font-weight: 600;
}

/* ══════════════════════════════════════
   CONVERSION CHART SECTION
══════════════════════════════════════ */
.chart-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--rule); border: 1px solid var(--rule2);
  margin: 12px 0;
}
.chart-cell {
  background: var(--paper2); padding: 8px 10px;
  font-size: 12px;
}
.chart-cell.header {
  background: var(--paper3); font-family: var(--body);
  font-weight: 600; font-size: 10px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink2);
}
.chart-cell .cv-from { font-family: var(--body); color: var(--ink2); font-size: 11px; }
.chart-cell .cv-to { font-family: var(--mono); color: var(--accent); font-size: 13px; font-weight: 500; }

/* ══════════════════════════════════════
   RELATED PAGES GRID
══════════════════════════════════════ */
.related-pages-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin: 14px 0;
}
.rp-card {
  background: var(--paper2); border: 1px solid var(--rule);
  border-top: 2px solid var(--rule2);
  padding: 12px 14px; cursor: pointer; transition: all .15s;
  text-decoration: none;
}
.rp-card:hover { border-top-color: var(--accent); background: var(--paper3); }
.rp-card .rp-cat {
  font-size: 9px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--accent); font-weight: 600; font-family: var(--body);
  margin-bottom: 4px;
}
.rp-card .rp-name {
  font-family: var(--serif); font-size: 13px; font-weight: 600;
  color: var(--ink); line-height: 1.25; margin-bottom: 4px;
}
.rp-card .rp-desc { font-size: 11px; color: var(--ink3); line-height: 1.4; }

/* ══════════════════════════════════════
   ORNAMENTS & DIVIDERS
══════════════════════════════════════ */
.ornament { text-align: center; color: var(--rule2); margin: 16px 0; letter-spacing: 8px; font-size: 14px; }
.rule-single { border: none; border-top: 1px solid var(--rule); margin: 20px 0; }
.rule-double { border: none; border-top: 3px double var(--rule2); margin: 24px 0; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
  background: var(--paper);
  color: var(--ink2);
  margin-top: 40px;
  border-top: 1px solid var(--rule);
}
.footer-main {
  max-width: 1100px; margin: 0 auto;
  padding: 36px 32px 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand .f-name {
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  color: var(--ink); letter-spacing: -.5px; margin-bottom: 8px;
}
.footer-brand .f-name em { color: var(--gold2); font-style: normal; }
.footer-brand p { font-size: 12px; color: var(--ink3); line-height: 1.65; }
.footer-col h4 {
  font-family: var(--body); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--gold2); margin-bottom: 12px;
  border-bottom: 1px solid var(--rule); padding-bottom: 6px;
}
.footer-col a {
  display: block; font-size: 12px; color: var(--ink3);
  text-decoration: none; padding: 3px 0; transition: color .12s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--rule);
  padding: 14px 32px;
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--ink3);
}
.footer-bottom a { color: var(--ink3); text-decoration: none; transition: color .12s; }
.footer-bottom a:hover { color: var(--accent); }

/* ══════════════════════════════════════
   MOBILE & DYNAMIC RESPONSIVENESS
   Significant focus on mobile polish
══════════════════════════════════════ */
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .sidebar {
    order: 2;
  }
}

@media (max-width: 768px) {
  .masthead {
    padding: 14px 20px;
  }
  .masthead-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .masthead-meta {
    text-align: center;
  }
  
  /* Fixed Bottom Nav for Mobile - Refined with Premium Dark Blur Theme */
  .primary-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--rule);
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
  }
  .primary-nav-inner {
    padding: 0 10px;
    justify-content: space-between;
  }
  .nav-item {
    padding: 12px 4px;
    font-size: 9px;
    flex: 1;
    text-align: center;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--ink3);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
  }
  .nav-dropdown { flex: 1; display: flex; flex-direction: column; }
  .nav-dropdown .nav-item::after { display: none; } /* Hide arrow on mobile to save space */
  .dropdown-content {
    bottom: 100%; top: auto;
    left: 50%; transform: translateX(-50%);
    width: 220px;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
  }
  .dropdown-content a {
    padding: 14px 20px;
    font-size: 10px;
    text-align: center;
  }
  .nav-item:hover, .nav-item.active {
    background: none;
    color: var(--accent);
  }
  .nav-item.active::after {
    display: none; /* Removed for cleaner look */
  }
  .nav-item .nav-new {
    top: 0; right: 0;
    font-size: 7px;
    padding: 1px 3px;
  }

  .site-wrapper {
    padding: 0 20px 100px; /* Space for bottom nav */
  }
  .page-hero {
    text-align: center;
    padding: 32px 0 24px;
  }
  .page-hero h1 {
    line-height: 1.2;
    margin-bottom: 12px;
  }
  .hero-meta {
    justify-content: center;
  }
  .converter-inputs {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .swap-btn {
    transform: rotate(90deg);
    margin: 10px auto;
  }
  .result-number {
    font-size: clamp(32px, 12vw, 48px);
  }
  .answer-capsule {
    border-radius: 8px;
    padding: 24px;
  }
  .all-units-grid {
    grid-template-columns: 1fr 1fr;
  }
  .related-pages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .chart-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .chart-cell.header {
    display: none; /* Hide header columns on mobile to fit the split rows */
  }
}

@media (max-width: 480px) {
  .logo-name { font-size: 24px; }
  .logo-tagline { font-size: 9px; }
  .all-units-grid { grid-template-columns: 1fr; }
  .related-pages-grid { grid-template-columns: 1fr; }
  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .footer-col h4::after {
    content: ''; display: block; width: 40px; height: 1px; background: var(--gold2); margin: 8px auto;
  }
}
