:root{color-scheme:light;--bg:#f4f8fd;--surface:#fff;--surface2:#eef6ff;--text:#102443;--muted:#64758b;--primary:#0878ed;--border:#dce6f1;--shadow:0 14px 45px rgba(18,51,94,.075);--radius:18px;--max:1170px;--navy:#061d40}
@media(prefers-color-scheme:dark){:root{color-scheme:dark;--bg:#071529;--surface:#11223c;--surface2:#182c49;--text:#eaf1fc;--muted:#b0c0d6;--primary:#57a5ff;--border:#2b4260;--shadow:0 14px 42px rgba(0,0,0,.2)}}
body[data-theme=light]{color-scheme:light;--bg:#f4f8fd;--surface:#fff;--surface2:#eef6ff;--text:#102443;--muted:#64758b;--primary:#0878ed;--border:#dce6f1;--shadow:0 14px 45px rgba(18,51,94,.075)}
body[data-theme=dark]{color-scheme:dark;--bg:#071529;--surface:#11223c;--surface2:#182c49;--text:#eaf1fc;--muted:#b0c0d6;--primary:#57a5ff;--border:#2b4260;--shadow:0 14px 42px rgba(0,0,0,.2)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);font:16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--text)}a{color:var(--primary);text-decoration:none}a:hover{text-decoration:underline}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ffbf47;outline-offset:3px}h1,h2,h3,p{margin-top:0}h1,h2,h3{line-height:1.18;letter-spacing:-.035em}h1{font-size:clamp(2.2rem,5vw,3.55rem)}h2{font-size:clamp(1.4rem,2.7vw,2rem)}h3{font-size:1.16rem}.shell{width:min(var(--max),calc(100% - 36px));margin-inline:auto}.sr-only{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}.skip{position:absolute;top:-100px;left:8px;background:#fff;color:#000;padding:10px;z-index:30}.skip:focus{top:8px}.site-header{position:sticky;top:0;background:var(--surface);z-index:10;border-bottom:1px solid var(--border)}.nav-inner{min-height:77px;display:flex;align-items:center;gap:40px;justify-content:space-between}.brand{font-size:1.2rem;letter-spacing:-.05em;font-weight:850;color:var(--text);display:flex;align-items:center;white-space:nowrap}.brand-mark{display:grid;place-items:center;background:var(--primary);color:#fff;width:34px;height:34px;border-radius:10px;font-size:1.45rem;margin-right:8px;letter-spacing:0}.brand-ext{color:var(--primary)}.top-nav{display:flex;align-items:center;gap:26px}.top-nav a{color:var(--text);font-size:.88rem;font-weight:650;white-space:nowrap}.top-nav a:hover{color:var(--primary)}.nav-actions select{font-size:.8rem;color:var(--text);border:1px solid var(--border);border-radius:20px;background:var(--surface2);padding:8px 10px}.home-hero{background-color:#061a39;background-image:linear-gradient(90deg,#061b3b 2%,rgba(6,27,59,.98) 26%,rgba(6,27,59,.74) 49%,rgba(6,27,59,.04) 100%),url('/assets/img/hero.webp');background-position:center,right center;background-size:cover,cover;color:#fff}.hero-inner{display:flex;align-items:center;min-height:460px;padding:46px 0}.hero-copy{width:min(570px,58%)}.hero-copy h1{font-size:clamp(2.15rem,4.3vw,3.25rem);line-height:1.1;margin-bottom:24px}.eyebrow{font-weight:800;font-size:.74rem;letter-spacing:.13em;color:#91c7ff;margin-bottom:15px}.eyebrow.blue{color:var(--primary)}.hero-desc{font-size:1.08rem;color:#dce9ff;max-width:480px;margin-bottom:25px}.hero-cta{display:flex;gap:12px;flex-wrap:wrap}.button{display:inline-flex;align-items:center;gap:11px;justify-content:center;min-height:46px;border:0;border-radius:10px;padding:11px 19px;font-weight:740;font-size:.91rem;transition:transform .2s,background .2s;cursor:pointer}.button:hover{transform:translateY(-1px);text-decoration:none}.button.primary{color:#fff;background:#0879f6}.button.secondary{background:var(--surface2);color:var(--text);border:1px solid var(--border)}.button.ghost{border:1px solid #9eb1c2;color:#fff;background:#ffffff12}.hero-highlights{display:flex;gap:18px;flex-wrap:wrap;margin-top:31px;font-size:.78rem;color:#d6ecff;font-weight:650}.page-flow{padding-bottom:55px}.category-panel{background:var(--surface);border-radius:20px;margin-top:-22px;position:relative;box-shadow:var(--shadow);padding:26px;border:1px solid var(--border)}.section-heading{margin-bottom:20px}.section-heading h2{margin-bottom:7px}.section-heading p{color:var(--muted);margin:0;font-size:.94rem}.section-heading.flex{display:flex;justify-content:space-between;align-items:center;gap:16px}.section-link{white-space:nowrap;font-weight:700;font-size:.86rem}.dimension-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.dim-card{text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:138px;border-radius:14px;border:1px solid var(--border);background:var(--surface2);color:var(--text);transition:transform .2s,box-shadow .2s}.dim-card:hover{text-decoration:none;transform:translateY(-3px);box-shadow:var(--shadow)}.dim-card small{font-size:.75rem;color:var(--muted)}.dim-icon{font-size:2.1rem;line-height:1.3}.dim-longueurs{background:color-mix(in srgb,#189df1 12%,var(--surface));}.dim-longueurs .dim-icon{color:#169af2}.dim-masses{background:color-mix(in srgb,#2ab77a 12%,var(--surface))}.dim-masses .dim-icon{color:#18a66c}.dim-volumes{background:color-mix(in srgb,#ffac24 14%,var(--surface))}.dim-volumes .dim-icon{color:#f1a21d}.dim-surfaces{background:color-mix(in srgb,#a879ed 13%,var(--surface))}.dim-surfaces .dim-icon{color:#a17aec}.dim-capacites{background:color-mix(in srgb,#ef7277 13%,var(--surface))}.dim-capacites .dim-icon{color:#f05c64}.surface-section{padding:29px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);margin-top:24px}.mode-tabs{display:flex;gap:9px;overflow:auto;padding:2px 2px 16px}.mode-tabs button{border:1px solid var(--border);padding:9px 14px;background:var(--surface2);color:var(--text);border-radius:99px;font-size:.84rem;font-weight:700;white-space:nowrap}.mode-tabs button.active{background:#087af4;color:white;border-color:#087af4}.converter-widget{background:var(--surface2);border:1px solid var(--border);border-radius:15px;padding:22px}.converter-row{display:flex;align-items:end;gap:12px}.converter-field{flex:1;min-width:100px;display:flex;flex-direction:column;gap:7px;font-size:.79rem;color:var(--muted);font-weight:720}.converter-field input,.converter-field select{width:100%;min-height:51px;background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:10px 12px;font-weight:650;color:var(--text);font-size:1rem}.converter-field input{font-size:1.2rem}.converter-field.unit-select{flex:1.14}.swap{width:50px;height:50px;flex:none;border:1px solid var(--border);border-radius:50%;background:var(--surface);color:var(--primary);font-size:1.5rem}.result-line{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;padding:18px 0 0}.result-label{color:var(--muted);font-size:.86rem}.result-line strong{font-size:clamp(1.5rem,3vw,2rem);letter-spacing:-.03em}.text-button{background:none;border:0;color:var(--primary);font-size:.83rem;font-weight:750}.formula{color:var(--muted);margin:0;font-size:.87rem}.form-error{color:#cf3535;margin:7px 0 0;font-size:.85rem}.hint{color:var(--muted);font-size:.81rem;margin:13px 0 0}.visual-table{border:1px solid var(--border);border-radius:13px;overflow:hidden}.table-scroll{overflow:auto;scrollbar-width:thin}.visual-table table{width:100%;border-collapse:collapse;min-width:680px;table-layout:fixed}.visual-table th{background:#116bd7;color:#fff;font-size:.95rem;padding:12px 7px;border:1px solid #488be0;text-align:center}.visual-table td{background:var(--surface);text-align:center;height:65px;font-size:1.12rem;font-weight:800;border:1px solid var(--border);min-width:35px}.visual-table td.filled{background:var(--surface2);color:var(--primary)}.visual-table td.comma-edge{border-right:3px solid #fb8d19}.table-caption{background:var(--surface2);padding:12px 15px;color:var(--muted);font-size:.82rem;margin:0}.education-split{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:19px}.learn-tile{background:var(--surface2);padding:21px;border-radius:14px}.learn-tile.accent{background:color-mix(in srgb,#f7aa3f 12%,var(--surface))}.learn-tile h3{margin:8px 0}.learn-tile p{font-size:.88rem;color:var(--muted);margin-bottom:10px}.learn-tile a{font-weight:700;font-size:.83rem}.tile-emoji{color:var(--primary);font-size:2rem}.popular-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.popular-card{border:1px solid var(--border);border-radius:13px;background:var(--surface2);padding:20px;display:flex;flex-direction:column;gap:9px;min-height:190px;color:var(--text)}.popular-card:hover{text-decoration:none;box-shadow:var(--shadow)}.popular-card strong{font-size:1.02rem}.popular-card>span:not(.popular-icon){font-size:.8rem;color:var(--muted)}.popular-icon{font-size:1.8rem;color:var(--primary)}.popular-card .card-arrow{color:var(--primary)!important;font-weight:700;margin-top:auto}.resource-band{margin-top:24px;min-height:230px;border-radius:var(--radius);display:flex;justify-content:space-between;align-items:center;padding:30px 48px;overflow:hidden;background:linear-gradient(120deg,#eaf8fe,#fef2dd);color:#112643}.resource-band h2{margin-bottom:7px}.resource-band p{max-width:450px}.paper-sheet{width:250px;height:160px;background:#fff;box-shadow:7px 12px 30px #172f3f44;transform:rotate(11deg);border:1px solid #d4dce5;padding:22px;font-size:.7rem;color:#334}.paper-sheet span{display:block;margin-top:10px}.paper-sheet i{display:block;border-bottom:1px solid #9eafc2;height:26px}.interior{padding-top:28px}.breadcrumbs{display:flex;gap:12px;align-items:center;font-size:.84rem;color:var(--muted);margin-bottom:20px}.breadcrumbs a{font-weight:650}.page-title{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:35px}.page-title h1{font-size:clamp(2rem,4vw,3.05rem);margin-bottom:13px}.page-title p:last-child{color:var(--muted);max-width:770px}.sample-table{border-collapse:collapse;width:100%;max-width:540px;margin:18px 0}.sample-table td,.sample-table th{border:1px solid var(--border);padding:10px 16px;text-align:left}.sample-table th{background:var(--surface2)}.highlight-formula{font-weight:800;font-size:1.5rem;background:var(--surface2);border-left:4px solid var(--primary);padding:16px}.info-note{padding:17px;background:var(--surface2);border-radius:10px;margin-top:18px}.text-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.text-grid p{color:var(--muted)}.download-list{display:flex;flex-wrap:wrap;gap:11px;margin:18px 0}.download-list.extras{margin-bottom:0}.link-pill{border:1px solid var(--border);border-radius:12px;padding:11px 16px;background:var(--surface2);font-weight:650;font-size:.86rem}.download-main{margin-top:22px;padding:20px;border-radius:13px;border:1px solid var(--border);display:flex;align-items:center;gap:15px;justify-content:space-between;background:var(--surface2)}.download-main p{margin:3px 0 0;color:var(--muted)}.exercise-actions{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0}.question-row{display:flex;gap:15px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);padding:13px 0}.question-row input{width:180px;max-width:44%;padding:8px 11px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text)}.question-row .correct{border-color:#27bb82}.question-row .incorrect{border-color:#e34848}.site-footer{background:#081d36;color:#c8d5e5;padding-top:44px}.footer-grid{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:50px}.footer-grid div{display:flex;flex-direction:column;align-items:start}.footer-grid a{color:#c8d5e5;font-size:.84rem;margin-bottom:9px}.footer-grid a:hover{color:#fff}.footer-grid h2{font-size:.93rem;letter-spacing:0;color:#fff}.footer-grid .footer-brand{font-size:1.16rem;font-weight:800;color:#fff}.footer-grid p{font-size:.85rem;max-width:300px}.footer-bottom{border-top:1px solid #29415a;padding:20px 0;display:flex;justify-content:space-between;gap:12px;font-size:.78rem;margin-top:32px}.footer-bottom a{color:#c8d5e5}
@media(max-width:850px){.nav-inner{min-height:64px;gap:12px;flex-wrap:wrap;padding:10px 0}.top-nav{order:3;width:100%;justify-content:space-around;gap:9px;overflow-x:auto}.top-nav a{font-size:.79rem}.hero-copy{width:64%}.hero-inner{min-height:400px}.dimension-grid{grid-template-columns:repeat(3,1fr)}.popular-grid{grid-template-columns:repeat(2,1fr)}.footer-grid{grid-template-columns:repeat(2,1fr);gap:25px}}
@media(max-width:580px){.shell{width:min(100% - 24px,var(--max))}.brand{font-size:.95rem}.brand-mark{width:28px;height:28px}.nav-inner{justify-content:space-between}.home-hero{background-image:linear-gradient(90deg,rgba(6,27,59,.96),rgba(6,27,59,.78)),url('/assets/img/hero.webp');background-position:50% center,right center}.hero-inner{min-height:405px;padding:38px 0}.hero-copy{width:100%}.hero-copy h1{font-size:2.2rem}.hero-desc{font-size:.95rem}.hero-highlights{gap:11px;font-size:.7rem}.category-panel,.surface-section{padding:17px}.dimension-grid{grid-template-columns:repeat(2,1fr);gap:10px}.dim-card{min-height:125px}.dim-card:last-child{grid-column:span 2}.section-heading.flex{align-items:start;flex-direction:column}.converter-row{display:grid;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr);gap:10px}.converter-field:first-child{grid-column:1/4}.converter-field.unit-select{min-width:0}.converter-row .swap{width:38px;height:38px;grid-row:2;grid-column:2;justify-self:center;align-self:end;font-size:1rem}.converter-row .unit-select:last-child{grid-column:3;grid-row:2}.converter-row .unit-select:nth-child(2){grid-row:2;grid-column:1}.result-line{gap:9px}.education-split,.popular-grid,.text-grid{grid-template-columns:1fr}.resource-band{padding:26px}.paper-deco{display:none}.page-title{padding:23px}.download-main{flex-direction:column;align-items:start}.question-row{align-items:start;flex-direction:column;gap:7px}.question-row input{max-width:none;width:100%}.footer-grid{gap:16px}.site-footer{padding-top:30px}}
@media print{body{background:#fff!important;color:#000!important}.site-header,.site-footer,.home-hero,.breadcrumbs,.download-list,.nav-actions,.exercise-actions,.button,.section-link,.popular-grid,.resource-band{display:none!important}.shell{width:100%!important}.surface-section,.category-panel,.page-title{box-shadow:none;border:0;padding:8px;margin:5px}.visual-table{break-inside:avoid}.visual-table th{color:#000;background:#ddd}.question-row input{border:0;border-bottom:1px solid #222}.exercise-widget{break-inside:avoid}a{color:#000}}

/* --- Editorial Content and FAQ Accordion Styles --- */
.editorial-content, .editorial-article, .editorial-guide {
  line-height: 1.75;
  font-size: 1.02rem;
  color: var(--text);
}
.editorial-content h2, .editorial-article h2, .editorial-guide h2 {
  font-size: 1.45rem;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
}
.editorial-content h3, .editorial-article h3, .editorial-guide h3 {
  font-size: 1.22rem;
  margin-top: 1.4rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}
.editorial-content h4, .editorial-article h4, .editorial-guide h4 {
  font-size: 1.08rem;
  margin-top: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.editorial-content p, .editorial-article p, .editorial-guide p {
  margin-bottom: 1rem;
}
.editorial-content ul, .editorial-content ol, .editorial-article ul, .editorial-article ol, .editorial-guide ul, .editorial-guide ol {
  margin: 0.8rem 0 1.2rem 1.4rem;
  padding: 0;
}
.editorial-content li, .editorial-article li, .editorial-guide li {
  margin-bottom: 0.45rem;
}
.editorial-content code, .editorial-article code, .editorial-guide code {
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}
.editorial-content table, .editorial-article table, .editorial-guide table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}
.editorial-content th, .editorial-content td, .editorial-article th, .editorial-article td, .editorial-guide th, .editorial-guide td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.editorial-content th, .editorial-article th, .editorial-guide th {
  background: var(--surface2);
  font-weight: 700;
}

/* FAQ Accordion Styling */
.faq-section {
  margin-top: 1.5rem;
}
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 1rem;
}
.faq-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  transition: all 0.2s ease;
}
.faq-item[open] {
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}
.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.02rem;
  color: var(--text);
  user-select: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "＋";
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: bold;
  transition: transform 0.2s ease;
  margin-left: 12px;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-answer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--text);
  line-height: 1.65;
  font-size: 0.96rem;
}
.faq-answer p {
  margin-bottom: 0.6rem;
}
.faq-answer p:last-child {
  margin-bottom: 0;
}

/* --- Mobile Navigation, Horizontal Scroll Prevention, and UX Improvements --- */

/* Prevent page-wide horizontal overflow */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Responsive tables & horizontal scroll containers */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  scrollbar-width: thin;
}
.editorial-content table,
.editorial-article table,
.editorial-guide table,
.sample-table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.2rem 0;
  border-collapse: collapse;
}

/* Scroll hint banner for mobile devices */
.table-scroll-hint {
  display: none;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  background: var(--surface2);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px dashed var(--border);
}
@media (max-width: 850px) {
  .table-scroll-hint {
    display: inline-block;
  }
}

/* Mode tabs touch scroll */
.mode-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 2px 14px;
}
.mode-tabs::-webkit-scrollbar {
  display: none;
}
.mode-tabs button {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 0.9rem;
  touch-action: manipulation;
}

/* Header layout & Hamburger toggle button */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-toggle {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text);
  touch-action: manipulation;
  transition: background 0.2s, border-color 0.2s;
}
.nav-toggle:hover, .nav-toggle:focus-visible {
  background: var(--surface);
  border-color: var(--primary);
}
.nav-toggle-icon {
  width: 20px;
  height: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-menu {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 18px 40px rgba(0,0,0,0.14);
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideMenuDown 0.22s ease-out;
}
@keyframes slideMenuDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-menu[hidden] {
  display: none !important;
}
.mobile-menu-inner {
  padding: 16px 0 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mobile-nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-group-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 0 4px;
}
.mobile-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.mobile-links-grid a {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  box-sizing: border-box;
  transition: all 0.15s ease;
}
.mobile-links-grid a:hover, .mobile-links-grid a:active {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Responsive breakpoint <= 850px */
@media (max-width: 850px) {
  .top-nav {
    display: none !important;
  }
  .nav-toggle {
    display: inline-flex !important;
  }
  .nav-inner {
    min-height: 60px !important;
    padding: 8px 0 !important;
    flex-wrap: nowrap !important;
  }
  .brand {
    font-size: 1.05rem;
  }
  .nav-actions select {
    font-size: 16px !important;
    min-height: 44px;
  }
  .converter-row select, .converter-row input {
    font-size: 16px !important;
  }
}

/* Responsive breakpoint <= 580px */
@media (max-width: 580px) {
  .mobile-links-grid {
    grid-template-columns: 1fr;
  }
  .converter-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) !important;
    gap: 8px !important;
  }
  .converter-field:first-child {
    grid-column: 1 / 4 !important;
  }
  .converter-row .swap {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    grid-row: 2 !important;
    grid-column: 2 !important;
    justify-self: center !important;
    align-self: end !important;
    font-size: 1.15rem !important;
    margin-bottom: 2px !important;
  }
  .button, .link-pill {
    min-height: 44px;
    padding: 10px 18px;
  }
  .hero-highlights {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .hero-cta .button {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}
