@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --bg: #FDFAF8;
  --surface: #FFFFFF;
  --primary: #7B4070;
  --primary-dark: #5E2E55;
  --primary-light: #F5EAF3;
  --secondary: #C8921A;
  --secondary-light: #FDF3DC;
  --text: #2D2D2D;
  --text-muted: #6B6B6B;
  --border: #E8D4E4;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

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

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── NAV ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary);
  white-space: nowrap;
}

.nav-logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.nav-toggle:hover {
  background: var(--primary-light);
}

/* ── MAIN ── */
main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 52px 0 44px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--secondary-light);
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.18;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ── CONVERTER CARD ── */
.converter-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  max-width: 580px;
  margin: 0 auto 64px;
  border: 1px solid var(--border);
}

.converter-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
  text-align: center;
}

.input-row {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

.input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input[type="text"],
select {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(123, 64, 112, 0.14);
  background: var(--surface);
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text-muted);
  pointer-events: none;
}

.btn-convert {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  letter-spacing: 0.03em;
}

.btn-convert:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 18px rgba(123, 64, 112, 0.35);
}

.btn-convert:active {
  transform: scale(0.98);
}

/* ── RESULTS ── */
.results {
  display: none;
  margin-top: 28px;
}

.results.show {
  display: block;
}

.results-title {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 16px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.result-item {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.result-item.highlight {
  border-color: var(--primary);
  background: var(--primary-light);
}

.result-item.approx {
  border-style: dashed;
}

.result-item .sys-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.result-item .size-val {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.result-item.highlight .size-val {
  color: var(--primary);
}

.result-item .size-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.result-item.approx .size-sub {
  font-style: italic;
}

/* ── ERROR ── */
.error-msg {
  display: none;
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 16px;
  text-align: center;
}

.error-msg.show {
  display: block;
}

/* ── AD SLOT ── */
.ad-slot {
  text-align: center;
  margin: 0 auto 48px;
  max-width: 728px;
  min-height: 90px;
  background: #f3f3f3;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 0.8rem;
  border: 1px dashed #ddd;
}

/* ── TOOL TOGGLE ── */
.tool-toggle {
  display: flex;
  gap: 8px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 24px;
}

.tool-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}

.tool-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.tool-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
}

/* ── METRIC CALLOUT ── */
.metric-callout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--secondary-light);
  border: 1px solid #E8D4A0;
  border-left: 4px solid var(--secondary);
  border-radius: var(--radius);
  padding: 20px 24px;
  max-width: 860px;
  margin: 0 auto 40px;
}

.metric-callout-icon {
  flex-shrink: 0;
  background: var(--secondary);
  color: white;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 5px 7px;
  border-radius: 6px;
  margin-top: 2px;
}

.metric-callout-body {
  font-size: 0.93rem;
  color: #7A5C1A;
  line-height: 1.7;
}

.metric-callout-body strong {
  color: #5C4010;
}

/* ── CHART CONTROLS ── */
.chart-controls {
  display: flex;
  justify-content: flex-end;
  max-width: 860px;
  margin: 0 auto 12px;
}

.btn-print {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-print:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* ── YARN WEIGHT BADGES ── */
.yarn-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.yarn-lace {
  background: #f0e6ff;
  color: #6b21a8;
}

.yarn-fingering {
  background: #dbeafe;
  color: #1d4ed8;
}

.yarn-sport {
  background: #d1fae5;
  color: #065f46;
}

.yarn-dk {
  background: #d9f99d;
  color: #3f6212;
}

.yarn-worsted {
  background: #fef9c3;
  color: #854d0e;
}

.yarn-aran {
  background: #fed7aa;
  color: #9a3412;
}

.yarn-bulky {
  background: #fecaca;
  color: #991b1b;
}

.yarn-superbulky {
  background: #fce7f3;
  color: #9d174d;
}

.yarn-jumbo {
  background: #e0e7ff;
  color: #3730a3;
}

/* ── REFERENCE SECTION ── */
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1rem;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 64px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.95rem;
}

thead {
  background: var(--primary);
  color: white;
}

thead th {
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-align: center;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--primary-light);
}

tbody td {
  padding: 11px 20px;
  text-align: center;
  font-weight: 600;
}

tbody td.na {
  color: #ccc;
  font-weight: 400;
}

tbody td.mm-col {
  font-weight: 700;
  color: var(--secondary);
}

/* ── FAQ ── */
.faq-section {
  max-width: 720px;
  margin: 0 auto 64px;
}

.faq-section>h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 24px;
  text-align: center;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 22px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.97rem;
  gap: 16px;
  user-select: none;
  transition: background 0.15s;
}

.faq-q:hover {
  background: var(--bg);
}

.faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 800;
  transition: transform 0.22s;
  line-height: 1;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-a {
  max-height: 300px;
}

.faq-a-inner {
  padding: 0 22px 18px;
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 0.95rem;
}

/* 3-column variant for crochet results */
.results-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ── EDITORIAL CONTENT ── */
.editorial {
  max-width: 720px;
  margin: 0 auto 64px;
}

.editorial-block {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.editorial-block h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
}

.editorial-block p {
  color: var(--text-muted);
  line-height: 1.85;
  font-size: 0.97rem;
  margin-bottom: 12px;
}

.editorial-block p:last-child {
  margin-bottom: 0;
}

.editorial-block ul {
  color: var(--text-muted);
  padding-left: 22px;
  line-height: 2.1;
  font-size: 0.97rem;
  margin: 12px 0 16px;
}

/* ── STATIC PAGES ── */
.author-quote {
  border-left: 4px solid var(--primary);
  margin: 0 0 24px 0;
  padding: 10px 0 10px 20px;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
}

.author-quote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

.author-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.author-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--border);
}

@media (max-width: 600px) {
  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.about-banner {
  width: 100%;
  height: 300px;
  overflow: hidden;
  display: block;
}

.about-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

@media (max-width: 600px) {
  .about-banner { height: 200px; }
}

.page-hero {
  text-align: center;
  padding: 48px 0 28px;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1rem;
}

.page-content {
  max-width: 720px;
  margin: 0 auto 64px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.page-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--primary);
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 12px;
  font-size: 0.97rem;
}

.page-content ul,
.page-content ol {
  color: var(--text-muted);
  padding-left: 22px;
  margin-bottom: 14px;
  line-height: 1.8;
  font-size: 0.97rem;
}

.page-content a {
  color: var(--primary);
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}

.last-updated {
  font-size: 0.82rem;
  color: #aaa;
  margin-bottom: 24px;
  display: block;
}

/* ── FOOTER ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 24px;
  font-weight: 800;
  color: var(--primary);
  font-size: 1rem;
  text-decoration: none;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.footer-copy {
  color: #aaa;
  font-size: 0.82rem;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ── PRINT ── */
@media print {

  header,
  .hero,
  .converter-card,
  .metric-callout,
  .chart-controls,
  .faq-section,
  .editorial,
  footer,
  .nav-toggle {
    display: none !important;
  }

  body {
    background: white;
  }

  main {
    padding: 0;
    max-width: 100%;
  }

  .section-title {
    font-size: 1.1rem;
    margin-bottom: 4px;
    text-align: left;
  }

  .section-subtitle {
    text-align: left;
    margin-bottom: 16px;
  }

  .table-wrapper {
    box-shadow: none;
    border: 1px solid #ccc;
    border-radius: 0;
    margin-bottom: 0;
  }

  [hidden] {
    display: none !important;
  }

  thead {
    background: #444 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .yarn-badge {
    border: 1px solid #ccc;
    background: transparent !important;
    color: #333 !important;
  }
}

/* ══════════════════════════════════════════════════
   CONVERSION PAGES
   ══════════════════════════════════════════════════ */

.conv-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 24px 4rem;
}

/* ── BREADCRUMB ── */
nav.breadcrumb { max-width: fit-content; margin-left: 0; padding: 0; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-tertiary); margin-bottom: 2rem; }
.breadcrumb a { color: var(--text-tertiary); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── HERO LABEL ── */
.hero-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.conv-wrap h1 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.65rem;
}

.hero-intro {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-width: 620px;
  line-height: 1.7;
}

/* ── QUICK ANSWER ── */
.quick-answer {
  background: var(--secondary-light);
  border-left: 4px solid var(--secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.75rem;
}

.quick-answer .qa-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.3rem;
}

.quick-answer p {
  color: var(--text);
  font-size: 0.93rem;
  margin: 0;
  line-height: 1.6;
}

/* ── CONVERTER CTA BOX ── */
.converter-box {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 2.25rem;
}

.converter-box h2 {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
  color: var(--text);
  border: none !important;
  padding: 0 !important;
}

.converter-link {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem;
  font-weight: 800;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s;
}

.converter-link:hover {
  background: var(--primary-dark);
}

.converter-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.55rem;
}

/* ── CONTENT SECTIONS ── */
.section {
  margin-bottom: 2.25rem;
}

.section h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--border);
}

.section h3 {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.1rem 0 0.45rem;
}

.section p {
  margin-bottom: 0.8rem;
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 0.97rem;
}

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

/* ── CONVERSION TABLE ── */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.conv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--surface);
}

.conv-table thead {
  background: var(--primary);
}

.conv-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  font-family: 'Nunito', sans-serif;
}

.conv-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.conv-table tbody tr:last-child {
  border-bottom: none;
}

.conv-table tbody tr:nth-child(even) {
  background: var(--bg);
}

.conv-table tbody tr:hover {
  background: var(--primary-light);
}

.conv-table tbody td {
  padding: 9px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
}

.conv-table tbody td:first-child {
  color: var(--primary);
  font-weight: 800;
}

.highlight-row {
  background: var(--secondary-light) !important;
}

.approx {
  font-size: 0.72rem;
  color: var(--text-muted);
}


/* ── RELATED LINKS ── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
  margin-top: 0.65rem;
}

.related-link {
  display: block;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.related-link:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.rl-label {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* ── CHART ── */
.chart-key { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1rem; font-size: 13px; }
.key-item { display: flex; align-items: center; gap: 6px; }
.key-swatch { width: 16px; height: 16px; border-radius: 3px; }

/* ── MOBILE ── */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .converter-card {
    padding: 24px 20px;
  }

  .tool-btn {
    font-size: 0.8rem;
    padding: 9px 10px;
    gap: 5px;
  }

  .input-row {
    flex-direction: column;
  }

  .results-grid--3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .results-grid--3 .size-val {
    font-size: 1.5rem;
  }

  .metric-callout {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .chart-controls {
    padding: 0 4px;
  }

  .hero {
    padding: 32px 0 28px;
  }

  main {
    padding: 24px 16px;
  }

  .page-content {
    padding: 24px 20px;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-logo {
    margin-bottom: 16px;
  }

  .conv-wrap {
    padding: 1.5rem 16px 3rem;
  }

  .conv-table thead th,
  .conv-table tbody td {
    padding: 8px 10px;
  }
}