@font-face {
  font-family: Geist;
  src: url("../../assets/geist-wordmark.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0020, U+0041, U+0043-0044, U+004C, U+004F, U+0052, U+0055;
}

:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page: #fff;
  --paper: #fff;
  --ink: #21192e;
  --muted: #5e566c;
  --accent: #5435bb;
  --accent-soft: #efe9ff;
  --line: #e4ddeb;
  --subtle: #f8f6fb;
  --key: #f6f4f9;
  --key-line: #e6e0ed;
  --key-hover: #ede7f8;
  --danger: #933d4b;
  --danger-bg: #fff1f2;
  --danger-hover: #f9dfe5;
  --display: #261c37;
  --display-text: #fff;
  --display-muted: #d0c4e2;
  --lime: #dcf678;
  --lime-hover: #cbe760;
  --focus: #633dd8;
  --footer: #172724;
  --brand-ink: #182c29;
  --brand-accent: #166244;
  --brand-ink-on-dark: #f6f9f2;
  --brand-accent-on-dark: #d4f38a;
  --brand-line-on-dark: #405a52;
  --brand-muted-on-dark: #d0ded7;
  --shadow: 0 24px 68px #26183914, 0 3px 12px #2618390a;
  --heading-intro-gap: .6rem;
  --intro-content-gap: 1.25rem;
  color: var(--ink);
  background: var(--page);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #15121c;
  --paper: #1e1928;
  --ink: #f6f1fc;
  --muted: #c1b5cd;
  --accent: #ceb7ff;
  --accent-soft: #35264e;
  --line: #45394f;
  --subtle: #191622;
  --key: #2b2337;
  --key-line: #493d56;
  --key-hover: #413352;
  --danger: #ffc0cb;
  --danger-bg: #462933;
  --danger-hover: #53303e;
  --display: #100d18;
  --display-text: #fff;
  --display-muted: #c6b7d9;
  --focus: #dac4ff;
  --footer: #111f1d;
  --brand-ink: var(--brand-ink-on-dark);
  --brand-accent: var(--brand-accent-on-dark);
  --shadow: 0 22px 60px #0005;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 6rem; }
body { margin: 0; min-width: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; width: auto; height: auto; clip-path: none; top: .5rem; left: .5rem; padding: .75rem; background: var(--paper); z-index: 5; }

.acao-calculo { display: flex; align-items: center; justify-content: center; gap: .55rem; text-align: center; }
.acao-calculo > [aria-hidden="true"] { flex: none; }

.campo-select { position: relative; display: block; min-width: 0; }
.campo-select > select:not([multiple]) {
  appearance: none;
  padding-inline-end: 2.15rem;
  text-overflow: ellipsis;
}
.campo-select::after {
  content: "";
  position: absolute;
  inset-inline-end: .85rem;
  top: 50%;
  width: .45rem;
  height: .45rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  color: var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.site-header {
  --nav-glass: #f8fbf9f5;
  --nav-panel: #fcfffc;
  --nav-line: #d7e5dd;
  --nav-shine: #fff;
  --nav-shadow: #12342e20;
  --nav-hover: #e8f3eb;
  --nav-muted: #475a54;
  min-height: 5.45rem;
}
:root[data-theme="dark"] .site-header {
  --nav-glass: #172724f5;
  --nav-panel: #172724;
  --nav-line: var(--brand-line-on-dark);
  --nav-shine: #bdeac922;
  --nav-shadow: #050d0a66;
  --nav-hover: #2b423a;
  --nav-muted: var(--brand-muted-on-dark);
}
.site-header:focus-visible, .guide:focus-visible { outline-offset: -3px; }
.site-header :focus-visible { outline-color: var(--brand-accent); }
.site-nav {
  position: fixed;
  z-index: 4;
  inset: .86rem clamp(.8rem, 3.4vw, 2.4rem) auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(.65rem, 1.6vw, 1.4rem);
  max-width: 73rem;
  min-height: 3.87rem;
  margin-inline: auto;
  padding: .45rem .7rem .45rem clamp(.9rem, 1.4vw, 1.25rem);
  border: 1px solid var(--nav-line);
  border-radius: 999px;
  background: var(--nav-glass);
  box-shadow: 0 9px 25px var(--nav-shadow), inset 0 1px var(--nav-shine);
  backdrop-filter: blur(10px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .68rem;
  justify-self: start;
  min-width: 0;
  min-height: 2.75rem;
  text-decoration: none;
  font-size: clamp(.78rem, 1.16vw, 1.035rem);
  letter-spacing: .055em;
  line-height: 1.15;
}
.brand-name {
  min-width: 0;
  color: var(--brand-ink);
  font-family: Geist, "Avenir Next", system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.brand-initial { color: var(--brand-accent); }
.brand-mark {
  display: block;
  flex: none;
  width: 2.45rem;
  height: auto;
}
.nav-desktop .nav-links { display: flex; align-items: center; gap: clamp(.85rem, 1.9vw, 1.75rem); }
.nav-links { margin: 0; padding: 0; list-style: none; }
.nav-links a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--nav-muted);
  font-size: .875rem;
  font-weight: 640;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a[aria-current] { color: var(--brand-accent); }
.nav-desktop a { position: relative; white-space: nowrap; }
.nav-desktop a[aria-current]::after {
  content: "";
  position: absolute;
  inset: auto 50% .12rem auto;
  width: .25rem;
  height: .25rem;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(50%);
}
.nav-actions { display: flex; align-items: center; justify-self: end; gap: .45rem; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.75rem;
  padding: .45rem .87rem;
  border: 1px solid #bacd62;
  border-radius: 999px;
  background: var(--lime);
  color: #271c35;
  box-shadow: inset 0 -2px #b7cb58;
  font-size: .875rem;
  font-weight: 730;
  text-decoration: none;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--lime-hover); }
.mobile-menu { display: none; }
.theme-toggle, .mobile-menu > summary { min-height: 2.75rem; border: 1px solid var(--nav-line); border-radius: 50%; background: transparent; color: var(--brand-ink); }
.theme-toggle { display: grid; place-items: center; justify-self: end; width: 2.75rem; height: 2.75rem; padding: 0; }
.theme-toggle[hidden] { display: grid !important; visibility: hidden; }
.theme-toggle:hover, .mobile-menu > summary:hover, .mobile-menu[open] > summary { background: var(--nav-hover); color: var(--brand-accent); }
.theme-icon { width: 1.05rem; height: 1.05rem; border-radius: 50%; box-shadow: inset .34rem -.18rem 0 currentColor; transform: rotate(-15deg); }
.theme-toggle[aria-pressed="true"] .theme-icon { width: .63rem; height: .63rem; background: currentColor; box-shadow: 0 -.58rem 0 -.23rem, 0 .58rem 0 -.23rem, -.58rem 0 0 -.23rem, .58rem 0 0 -.23rem, .41rem .41rem 0 -.23rem, -.41rem -.41rem 0 -.23rem, .41rem -.41rem 0 -.23rem, -.41rem .41rem 0 -.23rem; transform: none; }

.hero { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); align-items: start; gap: clamp(1.5rem, 4vw, 3.75rem); max-width: 76rem; margin: auto; padding: clamp(2.5rem, 7vw, 6.25rem) clamp(1rem, 4vw, 3rem); }
.hero-copy { align-self: start; padding-top: clamp(1rem, 4vw, 3.5rem); min-width: 0; }
h1 { margin-bottom: 0; font-size: clamp(2.75rem, 5.15vw, 5rem); font-weight: 790; letter-spacing: -.06em; line-height: .98; overflow-wrap: anywhere; }
h1 span { display: block; color: var(--accent); font-family: Georgia, "Times New Roman", serif; font-size: 1.14em; font-style: italic; font-weight: 400; letter-spacing: -.065em; line-height: 1.08; }
.hero-art { position: relative; display: grid; place-items: center; width: min(100%, 19.5rem); aspect-ratio: 2 / 1; margin-top: clamp(1.75rem, 4vw, 3.25rem); overflow: hidden; background: radial-gradient(var(--line) 1px, transparent 1px) center / .85rem .85rem; }
.hero-art i { position: absolute; width: 78%; aspect-ratio: 3.2; border: 1px solid var(--accent); border-radius: 50%; opacity: .48; }
.hero-art i:nth-child(1) { rotate: 26deg; }
.hero-art i:nth-child(2) { rotate: -26deg; }
.hero-art i:nth-child(3) { width: 94%; }
.hero-art span { position: relative; display: grid; place-items: center; width: 2.2rem; aspect-ratio: 1; border: 1px solid #46344c; border-radius: .63rem; background: var(--lime); rotate: -12deg; }
.hero-art span::before, .hero-art span::after { content: ""; position: absolute; width: .79rem; height: 2px; background: #241c35; }
.hero-art span::after { rotate: 90deg; }

.calculator { display: grid; grid-template: auto 1fr / minmax(0, 1fr); width: 100%; max-width: 40rem; min-width: 0; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 1.4rem; box-shadow: var(--shadow); }
.calculator > .panel { grid-area: 2 / 1; }
/* The keypad determines the height of the shared panel, including on the history tab. */
.calculator > #panel-calculator[hidden] { display: block !important; visibility: hidden; }
.tab-list { display: flex; flex-wrap: wrap; gap: .35rem; padding: .55rem .9rem 0; border-bottom: 1px solid var(--line); }
.tab { position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .52rem; min-width: 0; min-height: 2.8rem; padding: .65rem .75rem .75rem; border: 0; background: transparent; color: var(--muted); font-size: .875rem; font-weight: 680; overflow-wrap: anywhere; }
.tab:hover, .tab[aria-selected="true"] { color: var(--accent); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; inset: auto .55rem -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.hero .tab-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 0; }
.hero .tab { min-height: 3rem; padding-inline: .45rem; }
.hero .tab + .tab { border-inline-start: 1px solid var(--line); }
.hero .tab[aria-selected="true"]::after { inset-inline: 0; border-radius: 0; }
.hero .tab:focus-visible { outline-offset: -3px; }
.icon { position: relative; display: inline-block; width: .95rem; height: .95rem; flex: 0 0 auto; }
.icon-calc { border: 1.5px solid currentColor; border-radius: .18rem; }
.icon-calc::before { content: ""; position: absolute; top: .17rem; left: .14rem; right: .14rem; height: 1px; background: currentColor; }
.icon-calc::after { content: ""; position: absolute; width: .12rem; height: .12rem; top: .4rem; left: .19rem; background: currentColor; box-shadow: .31rem 0, 0 .2rem, .31rem .2rem; }
.icon-clock { border: 1.5px solid currentColor; border-radius: 50%; }
.icon-clock::before { content: ""; position: absolute; width: .24rem; height: .31rem; left: .33rem; top: .12rem; border: solid currentColor; border-width: 0 0 1.5px 1.5px; border-radius: 0 0 0 1px; }
.count { padding: .12rem .34rem; border-radius: 1rem; background: var(--accent-soft); color: var(--accent); font-size: .75rem; }
.panel { min-width: 0; padding: .9rem 1rem 1rem; }
.mode-row, .angle-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.mode-label, .angle-label { color: var(--muted); font-size: .875rem; font-weight: 650; }
.segments { display: inline-flex; max-width: 100%; flex-wrap: wrap; gap: .16rem; padding: .19rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--subtle); }
.segment { min-height: 2.3rem; padding: .3rem .63rem; border: 0; border-radius: .49rem; background: transparent; color: var(--muted); font-size: .875rem; font-weight: 670; }
.segment:hover, .segment[aria-pressed="true"] { color: var(--accent); }
.segment[aria-pressed="true"] { background: var(--accent-soft); }
.display { display: grid; gap: .2rem; min-width: 0; min-height: 6.15rem; align-content: center; padding: .8rem .9rem; border-radius: .95rem; background: var(--display); color: var(--display-text); text-align: right; font-variant-numeric: tabular-nums; }
.display-line { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; min-width: 0; }
.display-label { color: var(--lime); font-size: .75rem; font-weight: 740; letter-spacing: .09em; text-transform: uppercase; }
.expression { min-width: 0; max-block-size: 2.5em; overflow: auto; overflow-wrap: anywhere; color: var(--display-muted); font-size: .875rem; line-height: 1.25; }
.result { display: block; min-width: 0; overflow-wrap: anywhere; font-size: clamp(1.3rem, 1.35rem + 1.6vw, 2.65rem); font-weight: 630; letter-spacing: -.035em; line-height: 1.16; }
.result:not(.error) { max-block-size: 2.32em; overflow: auto; }
.result.error { color: #ffd3dd; font-size: clamp(1rem, 1.1vw + .75rem, 1.5rem); letter-spacing: -.015em; }
.keypad, .science-grid { display: grid; gap: .42rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.keypad { margin-top: .65rem; }
.key { min-height: 2.85rem; min-width: 0; padding: .23rem .1rem; border: 1px solid var(--key-line); border-radius: .67rem; background: var(--key); font-size: 1.14rem; font-weight: 660; font-variant-numeric: tabular-nums; transition: transform .12s; }
.key:hover { background: var(--key-hover); }
.key:active { transform: translateY(1px); }
.key-function, .key-operator { background: var(--accent-soft); color: var(--accent); }
.key-operator { font-size: 1.32rem; }
.key-clear { background: var(--danger-bg); color: var(--danger); font-size: .925rem; }
.key-clear:hover { background: var(--danger-hover); }
.key-equals { border-color: #b2cc50; background: var(--lime); color: #252333; font-size: 1.4rem; }
.key-equals:hover { background: var(--lime-hover); }
.science-tools { margin-top: .65rem; }
.angle-row { margin-bottom: .45rem; }
.science-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.science-grid .key { min-height: 2.75rem; font-size: .875rem; }
.panel-note { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin: .72rem 0 0; color: var(--muted); font-size: .8rem; }
kbd { padding: .05rem .24rem; border: 1px solid var(--line); border-radius: .26rem; background: var(--subtle); font: inherit; font-weight: 650; }

.history {
  display: flex;
  flex-direction: column;
  contain: size;
  min-block-size: 0;
  overflow: auto;
  border-end-start-radius: inherit;
  border-end-end-radius: inherit;
}
.history > :not(.history-list) { flex-shrink: 0; }
.history h2 { margin: .15rem 0 .35rem; font-size: 1.3rem; letter-spacing: -.035em; }
.history p { margin-bottom: .85rem; color: var(--muted); line-height: 1.5; }
.history-actions, .history-confirm { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.history-confirm { margin-top: .75rem; }
.history-confirm p { flex-basis: 100%; margin: 0; }
.action { min-height: 2.75rem; padding: .45rem .75rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--accent-soft); color: var(--accent); font-size: .875rem; font-weight: 680; }
.action:hover:not(:disabled) { background: var(--key-hover); }
.action-danger { background: var(--danger-bg); color: var(--danger); }
.action-danger:hover:not(:disabled) { background: var(--danger-hover); }
.history .empty { display: grid; flex-grow: 1; align-content: center; margin: 1rem 0 0; padding: 1.7rem 1rem; border: 1px dashed var(--line); border-radius: .85rem; text-align: center; }
.empty .icon { display: block; margin: 0 auto .65rem; color: var(--accent); }
.empty strong { display: block; margin-bottom: .3rem; }
.empty p { margin: 0; font-size: .9rem; }
.history-list { display: grid; flex: 1 1 auto; align-content: start; gap: .4rem; min-block-size: 5rem; margin: 1rem 0 0; padding: 0; overflow: auto; list-style: none; }
.history-list:focus-visible { outline-offset: -2px; }
.history-entry { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: .14rem .55rem; align-items: baseline; padding: .65rem .72rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--subtle); text-align: left; }
.history-entry:hover { background: var(--key-hover); }
.history-entry:focus-visible { outline-offset: -3px; }
.history-entry .past-expression, .history-entry .past-result { min-width: 0; overflow-wrap: anywhere; }
.history-entry .past-expression { font-size: .92rem; }
.history-entry .past-result { max-width: min(9rem, 37vw); color: var(--accent); font-size: 1.05rem; font-weight: 740; text-align: right; }
.history-entry time { color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.history .storage-note { margin: .78rem 0 0; font-size: .82rem; }

.guide { border-block: 1px solid var(--line); background: var(--subtle); }
.content { max-width: 76rem; margin: auto; padding: clamp(2.4rem, 5vw, 4.5rem) clamp(1rem, 4vw, 3rem); }
.content h2 { margin-bottom: var(--heading-intro-gap); font-size: clamp(1.55rem, 1rem + 1.85vw, 2.65rem); letter-spacing: -.043em; line-height: 1.1; overflow-wrap: anywhere; }
.content p { color: var(--muted); line-height: 1.65; }
.content h2 + p { margin-bottom: var(--intro-content-gap); }
.guide-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.guide-cards article { min-width: 0; padding: 1.05rem 1.1rem; border: 1px solid var(--line); border-radius: .88rem; background: var(--paper); overflow-wrap: anywhere; }
.guide-cards h3 { margin-bottom: .38rem; font-size: 1.05rem; letter-spacing: -.025em; }
.guide-cards p { margin: 0; font-size: .95rem; }
.cartao-artigo {
  max-width: 53rem;
  margin-inline: auto;
  padding: clamp(1rem, 3.5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--paper);
}
.cartao-artigo > :last-child { margin-bottom: 0; }
.faq { width: 100%; max-width: 53rem; margin-inline: auto; }
.faq > h2 { margin-bottom: 1.15rem; text-align: center; text-wrap: balance; }
.faq details { border: 1px solid var(--line); border-radius: .75rem; background: var(--paper); }
.faq details + details { margin-top: .5rem; }
.faq details[open] { background: var(--subtle); }
.faq summary { min-height: 2.75rem; padding: .8rem .95rem; cursor: pointer; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.faq summary::marker { color: var(--accent); }
.faq summary:focus-visible { outline-offset: -3px; border-radius: .7rem; }
.faq details p { margin: 0 .95rem 1rem; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }

.site-footer {
  --brand-ink: var(--brand-ink-on-dark);
  --brand-accent: var(--brand-accent-on-dark);
  background: var(--footer);
  color: var(--brand-ink);
}
.footer-inner { display: grid; justify-items: center; max-width: 76rem; margin: auto; padding: clamp(1.6rem, 4.25vw, 3.25rem) clamp(1rem, 4vw, 3rem) 1.4rem; text-align: center; }
.footer-heading { display: grid; justify-items: center; max-width: 100%; }
.footer-heading .brand-mark { width: clamp(2.65rem, 5.5vw, 4rem); }
.footer-heading .brand-name {
  padding-inline-start: .3em;
  font-size: clamp(1.05rem, 4.5vw, 3.35rem);
  letter-spacing: .3em;
  line-height: 3;
}
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 clamp(.52rem, 1.6vw, 1.25rem); max-width: 100%; padding: .25rem clamp(.4rem, 2vw, 1.05rem); border: 1px solid var(--brand-line-on-dark); border-radius: 2rem; }
.footer-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding-inline: .24rem; color: var(--brand-muted-on-dark); font-size: .875rem; font-weight: 650; text-decoration: none; }
.footer-institutional { display: grid; justify-items: center; max-width: 100%; gap: .85rem; }
.footer-institutional a[aria-current="page"] { color: var(--brand-accent); }
.footer-copyright { margin: .55rem 0 .65rem; color: var(--brand-muted-on-dark); font-size: .82rem; }
.footer-nav a:hover { color: var(--brand-accent); text-decoration: underline; text-underline-offset: .3em; }
.site-footer :focus-visible { outline-color: var(--brand-accent); }

@media (max-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 1.35rem; padding-block: clamp(2rem, 5vw, 3.2rem); }
  .hero-copy { padding: 0; text-align: center; }
  h1 { font-size: clamp(2rem, 6.8vw, 3.8rem); line-height: 1.05; }
  h1 span { display: inline; }
  .hero-art { display: none; }
}
@media (max-width: 55rem) {
  html { scroll-padding-top: 5.4rem; }
  .site-header { min-height: 4.8rem; }
  .site-nav { inset: .72rem clamp(.68rem, 3.4vw, 1.7rem) auto; grid-template-columns: minmax(0, 1fr) auto auto; min-height: 3.58rem; padding: .35rem .44rem .35rem .72rem; gap: .35rem; }
  .brand { gap: .48rem; }
  .brand-mark { width: 2.15rem; }
  .nav-desktop, .nav-cta-desktop { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu > summary { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .menu-icon { position: relative; width: 1rem; height: .75rem; border-block: 1.5px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat; }
  .mobile-menu[open] .menu-icon { border: 0; background: none; }
  .mobile-menu[open] .menu-icon::before, .mobile-menu[open] .menu-icon::after { content: ""; position: absolute; inset: 50% 0 auto; height: 1.5px; border-radius: 1px; background: currentColor; transform: translateY(-50%) rotate(45deg); }
  .mobile-menu[open] .menu-icon::after { transform: translateY(-50%) rotate(-45deg); }
  .nav-sheet {
    position: absolute;
    inset: calc(100% + .55rem) 0 auto;
    max-height: calc(100vh - 5.4rem);
    max-height: calc(100svh - 5.4rem);
    overflow: auto;
    overscroll-behavior: contain;
    padding: .58rem;
    border: 1px solid var(--nav-line);
    border-radius: 1rem;
    background: var(--nav-panel);
    box-shadow: 0 12px 30px var(--nav-shadow);
  }
  .mobile-menu:not([open]) > .nav-sheet { display: none; }
  .nav-sheet .nav-links a { padding-inline: .72rem; border-radius: .53rem; color: var(--brand-ink); }
  .nav-sheet .nav-links a:hover, .nav-sheet .nav-links a[aria-current] { background: var(--nav-hover); color: var(--brand-accent); }
  .nav-sheet .nav-cta { display: flex; margin-top: .5rem; }
}
@media (max-width: 45rem) { .guide-cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 36rem) {
  .hero { padding-inline: .75rem; }
  .calculator { border-radius: 1.15rem; }
  .tab-list { padding-inline: .5rem; }
  .tab { padding-inline: .55rem; gap: .4rem; }
  .panel { padding: .72rem .68rem .9rem; }
  .display { min-height: 5.4rem; padding-inline: .72rem; }
}
@media (max-width: 25rem) { .science-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 19rem) {
  .brand { font-size: .7rem; letter-spacing: .025em; }
  .brand-mark { width: 1.95rem; }
}
@media (hover: none) and (pointer: coarse) { .panel-note { display: none; } }
@media (prefers-reduced-motion: reduce) { .key { transition: none; } }
@media (forced-colors: active) {
  .theme-icon, .menu-icon { forced-color-adjust: none; color: ButtonText; }
  .nav-links a[aria-current] { outline: 1px solid Highlight; outline-offset: -1px; }
}
@media print { .site-header { display: none; } }
