@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #e8eef5;
  --surface: #ffffff;
  --ink: #122033;
  --muted: #3e5166;
  --line: #d5dee8;
  --blue: #1a6fb5;
  --blue-dark: #145a94;
  --navy: #12283f;
  --link: #0b4f94;
  --green: #2f9e44;
  --green-dark: #237a34;
  --lcd: #e7f6d8;
  --lcd-ink: #17331c;
  --danger: #b64032;
  --warn: #8a5a00;
  --shadow: 0 1px 2px rgba(16, 36, 58, 0.05), 0 10px 30px rgba(16, 36, 58, 0.05);
  --radius: 14px;
  --max: 1120px;
  --font: "Plus Jakarta Sans", "Segoe UI", Arial, Helvetica, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 50% -180px, #ffffff 0%, transparent 70%),
    var(--bg);
}
img, svg { display: block; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--link); font-weight: 600; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; color: var(--navy); }
h1 { font-size: clamp(1.85rem, 3vw, 2.45rem); line-height: 1.15; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #184e86;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.brand .logo { width: 36px; height: 36px; }
.brand-tld { color: #6aa0cc; font-weight: 700; }
.brand.light { color: #fff; font-size: 1.25rem; }
.brand.light .brand-tld { color: #9cc4e4; }

.lang-switch { position: relative; display: flex; align-items: center; }
.lang-button, .lang-menu button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c9d5e2;
  background: #f6f9fb;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}
.lang-button {
  height: 42px;
  border-radius: 999px;
  padding: 0 12px 0 10px;
  max-width: 210px;
}
.lang-button span, .lang-menu button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(16, 36, 58, 0.18); flex: none; }
.lang-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  right: 0;
  width: min(260px, 78vw);
  max-height: min(360px, 60vh);
  overflow: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 36, 58, 0.16);
}
.lang-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  min-height: 40px;
  padding: 6px 8px;
  text-align: start;
}
.lang-menu button:hover, .lang-menu [aria-selected="true"] button { background: #e8f2fb; }
.search { position: relative; margin-left: auto; width: min(340px, 42vw); }
.search input {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #c9d5e2;
  background: #f6f9fb;
  padding: 0 46px 0 16px;
}
.search input:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 111, 181, 0.16);
}
.search > button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.search > button:hover { background: var(--blue-dark); }
.search-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(16, 36, 58, 0.14);
  overflow: hidden;
}
.search-panel a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--ink);
}
.search-panel a strong { color: #184e86; }
.search-panel a span { color: var(--muted); font-size: 0.82rem; }
.search-panel a:hover, .search-panel a:focus { background: #f3f7fb; }
.search-empty { margin: 0; padding: 12px; color: var(--muted); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  height: 40px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}
.main-nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2px 12px 0;
  display: flex;
  gap: 2px;
}
.main-nav a {
  text-decoration: none;
  color: #3e5366;
  font-weight: 700;
  padding: 12px 14px 10px;
  border-bottom: 3px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: #184e86; border-bottom-color: var(--blue); }

.sheet, .home { max-width: var(--max); margin: 0 auto; padding: 22px 20px 48px; }
.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px 28px;
  align-items: start;
  direction: ltr;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.7fr);
  gap: 18px;
  align-items: start;
}
.intro-card, .panel, .calc-card, .sci {
  background: var(--surface);
  border: 1px solid #e1e8f0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.intro-card { padding: 22px; }
.intro-card h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -0.03em; color: var(--navy); margin-bottom: 8px; }
.intro-card p { color: var(--muted); }
.intro-card .search { width: 100%; margin: 14px 0 0; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.quick a {
  text-decoration: none;
  background: #f3f7fb;
  color: #184e86;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 0.92rem;
}
.quick a:hover { background: #e5f0f8; }

.category { margin-top: 28px; scroll-margin-top: 112px; }
.category-head { display: flex; justify-content: space-between; gap: 12px; align-items: end; }
.category-head h2 { margin: 0; color: var(--navy); font-size: 1.4rem; }
.category-head p { margin: 4px 0 0; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.calc-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  min-height: 108px;
}
.calc-card:hover { border-color: #b9d3ea; transform: translateY(-1px); }
.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #e8f3fb;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
}
.category-health .card-icon { background: #e7f6ee; color: var(--green-dark); }
.category-math .card-icon { background: #eef0fb; color: #3d4db3; }
.category-utility .card-icon { background: #fff4e5; color: #a15c07; }
.calc-card strong { display: block; color: var(--navy); }
.calc-card span { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 3px; }

.crumb { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.crumb a { text-decoration: none; }
.page-head h1 { margin-bottom: 4px; font-size: clamp(1.7rem, 3vw, 2.15rem); letter-spacing: -0.03em; color: var(--navy); }
.page-head p { color: var(--muted); max-width: 68ch; }

.calc-layout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.panel { padding: 16px; }
.form-panel { background: #f8fafc; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span, .choices legend, .tabs { font-weight: 700; color: #294257; }
.field small, .hero-note { color: var(--muted); }
.control {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #c5d0dc;
  border-radius: 10px;
  min-height: 44px;
}
.control:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26, 111, 181, 0.15); }
.control input, .control select {
  width: 100%;
  border: 0;
  background: transparent;
  height: 42px;
  padding: 0 12px;
  outline: none;
  border-radius: 10px;
}
.affix { color: var(--muted); padding-left: 12px; white-space: nowrap; }
.affix.suffix { padding: 0 12px 0 0; }
.choices { border: 0; padding: 0; margin: 0 0 12px; }
.choices legend { padding: 0; margin-bottom: 6px; }
.choice { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; font-weight: 600; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 12px; }
details summary { cursor: pointer; font-weight: 800; color: #294257; margin: 8px 0; }
.form-actions { display: flex; gap: 8px; align-items: center; }
.calc-layout > .save-bar { grid-column: 1 / -1; display: flex; }
.save-bar .btn-calc { flex: 0 0 auto; min-width: 180px; padding: 0 22px; }
.tool-grid { display: grid; gap: 8px; margin: 0 0 16px; }
.tool-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.tool-row .check { margin: 0; align-items: center; }
.btn-calc {
  flex: 1;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(#3caf5c, var(--green));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.btn-calc:hover { background: var(--green-dark); }
.btn-text, .btn-small {
  border: 0;
  background: transparent;
  color: var(--link);
  font-weight: 700;
  cursor: pointer;
  padding: 8px;
}
.btn-small {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  margin: 8px 0;
}

.kicker { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; font-weight: 800; color: var(--green-dark); margin-bottom: 2px; }
.hero-num { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.04em; color: var(--navy); margin: 0 0 6px; line-height: 1.1; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.stat-grid div { background: #f6faf7; border-radius: 10px; padding: 10px; }
.stat-grid dt { color: var(--muted); font-size: 0.82rem; }
.stat-grid dd { margin: 2px 0 0; font-weight: 800; color: var(--navy); }
.stat-grid small { display: block; font-weight: 600; color: var(--muted); }
.chart-row { display: grid; grid-template-columns: 180px 1fr; gap: 8px; align-items: center; margin-top: 8px; }
canvas.chart { width: 100%; height: 210px; }
canvas.chart.donut { height: 180px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.legend li { display: flex; gap: 8px; align-items: center; color: #345066; }
.legend i { width: 10px; height: 10px; border-radius: 99px; display: block; }

.meter { position: relative; height: 16px; border-radius: 99px; margin: 12px 0 22px; background: linear-gradient(90deg, #5dade2 0 18%, #2f9e44 18% 46%, #e0a106 46% 64%, #d4533b 64%); }
.meter span {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 26px;
  background: var(--navy);
  border-radius: 4px;
  transform: translateX(-50%);
}
.meter em { position: absolute; top: 20px; transform: translateX(-50%); font-style: normal; font-size: 0.75rem; font-weight: 800; color: var(--navy); white-space: nowrap; }

.callout { border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; }
.callout.error { background: #fdecea; color: #8d2b22; }
.callout.warn { background: #fff6e5; color: #6d4a08; }
.callout.info { background: #eef6fc; color: #1d4e73; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.table-caption { font-weight: 800; color: var(--navy); margin: 14px 0 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid #edf1f5; }
th:first-child, td:first-child { text-align: left; }
th { background: #f5f8fb; color: #3c5164; font-size: 0.78rem; letter-spacing: 0.03em; text-transform: uppercase; }
tr.year td { background: #eef5fb; font-weight: 800; }
tr.active td { background: #e8f7ec; }
.below { margin-top: 16px; }
.scroll-table { max-height: 460px; overflow: auto; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  color: #345066;
}
.tabs button[aria-selected="true"] { background: #184e86; color: #fff; border-color: #184e86; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.shape-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.shape-picker button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 4px;
  cursor: pointer;
  font-weight: 700;
  color: #345066;
}
.shape-picker button[aria-pressed="true"] { border-color: var(--blue); color: #184e86; background: #eef6fc; }
.shape { width: 100%; height: auto; }
.shape-fill { fill: #e5f2fb; stroke: #1a6fb5; stroke-width: 2; }
.shape-line { stroke: #1a6fb5; stroke-width: 2; }
.shape text { fill: #1c2834; font-size: 12px; font-family: Arial, sans-serif; }

.prose { margin-top: 28px; max-width: 78ch; color: #314556; }
.prose h2 { color: var(--navy); font-size: 1.3rem; margin-bottom: 8px; }
.prose ul { padding-left: 1.2rem; }
.formula {
  background: #f4f7fb;
  border-left: 4px solid var(--blue);
  padding: 12px 14px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.45;
}
.related { margin-top: 22px; }
.related h2 { font-size: 1.05rem; color: var(--navy); }
.related-links { display: flex; flex-wrap: wrap; gap: 8px; }
.related-links a { text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-weight: 700; }

.sci { padding: 12px; }
.lcd {
  background: linear-gradient(#f4fbea, var(--lcd));
  border-radius: 12px;
  min-height: 92px;
  padding: 8px 12px 10px;
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px #cfe3bf;
  color: var(--lcd-ink);
}
.lcd-top { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.lcd-mode, .lcd-mem { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; }
.lcd-mc { margin-left: auto; border: 0; background: transparent; color: #2d6a3e; font-weight: 800; cursor: pointer; }
.lcd-expr { min-height: 1.2em; font-size: 0.92rem; opacity: 0.8; overflow-x: auto; white-space: nowrap; }
.lcd-result { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; min-height: 1.2em; overflow-x: auto; }
.lcd-result.bad { color: var(--danger); font-size: 1.1rem; }
.sci-keys { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.key {
  min-height: 44px;
  border: 1px solid #d5dee6;
  background: #f4f7fa;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  color: #24384a;
  padding: 0 2px;
}
.key:hover { background: #e7eef5; }
.key.num { background: #fff; }
.key.op { background: #e7f1fa; color: #184e86; }
.key.mem { background: #f7f1e4; }
.key.danger { background: #fdecea; color: var(--danger); }
.key.equal { grid-column: span 2; background: var(--green); color: #fff; border-color: var(--green-dark); }
.key.on { box-shadow: inset 0 0 0 2px var(--blue); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.examples button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; cursor: pointer; font-weight: 700; color: #184e86; }

#site-footer,
.site-footer {
  background: #0c2340 !important;
  color: #ffffff !important;
  margin-top: 28px;
}
#site-footer p,
#site-footer li,
#site-footer h2,
#site-footer span,
#site-footer a,
.site-footer p,
.site-footer li,
.site-footer h2,
.site-footer a {
  color: #ffffff !important;
}
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 32px 20px 26px; }
.footer-brand p { max-width: 52ch; color: #f4f8fc !important; font-size: 1.05rem; font-weight: 500; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 22px 0; }
.footer-cols h2 { font-size: 1.08rem; margin-bottom: 10px; color: #ffffff !important; }
.footer-cols h2 a,
.footer-cols a { color: #ffffff !important; text-decoration: none; font-weight: 700; }
.footer-cols a:hover { text-decoration: underline; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.disclaimer, .copyright { color: #f4f8fc !important; font-size: 0.98rem; }
.copyright a { color: #ffffff !important; font-weight: 700; }
.home-intro { grid-column: 1; grid-row: 1; margin: 0; }
.directory { grid-column: 1; grid-row: 2; }
#home-calc {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 112px);
}
[dir="rtl"] .home-intro,
[dir="rtl"] .directory,
[dir="rtl"] .link-box { direction: rtl; }
.basic-calc {
  background: linear-gradient(#ffffff, #f7fbff);
  border: 1px solid #c5d6ea;
  border-radius: 22px;
  padding: 16px 16px 14px;
  box-shadow: 0 16px 36px rgba(16, 40, 70, 0.12);
}
.basic-kicker { margin: 0 0 4px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; color: var(--navy); }
.basic-expr { min-height: 1.2em; margin: 0 0 8px; text-align: right; color: var(--muted); font-weight: 700; font-size: 0.92rem; }
.basic-screen {
  display: block;
  background: var(--lcd);
  color: var(--lcd-ink);
  border-radius: 12px;
  min-height: 64px;
  padding: 12px 14px;
  text-align: right;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  overflow-x: auto;
}
.basic-screen.bad { color: var(--danger); font-size: 1.3rem; }
.basic-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.basic-keys button {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #eef3f8;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.15rem;
  cursor: pointer;
}
.basic-keys button:hover { background: #e2ebf4; }
.basic-keys .op { background: #e5f1fb; color: var(--blue-dark); }
.basic-keys .eq { background: linear-gradient(#3caf5c, var(--green)); color: #fff; }
.basic-keys .wide { grid-column: span 2; }
.home-intro { margin-bottom: 18px; }
.directory { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.link-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 14px; }
.link-box h2 { margin: 0; padding: 8px 10px 0; font-size: 1.15rem; color: var(--navy); }
.link-box > p { margin: 4px 10px 8px; color: var(--muted); font-size: 0.92rem; }
.link-list { list-style: none; margin: 0; padding: 0; columns: 2; }
.link-list a { display: block; padding: 7px 10px; text-decoration: none; font-weight: 700; font-size: 1.05rem; color: #0c4a8a; }
.link-list a:hover { text-decoration: underline; background: #f3f8fc; border-radius: 8px; }
textarea { width: 100%; border: 1px solid #c5d0dc; border-radius: 10px; padding: 10px 12px; min-height: 90px; }
.chart-box { margin-top: 12px; }
.chart-box canvas { width: 100%; height: 220px; }
.prose p { max-width: 68ch; }
.admin-list { display: grid; gap: 8px; }
.admin-list a { font-weight: 700; }

.loading { color: var(--muted); }

@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .hero, .calc-layout, .directory, .home { grid-template-columns: 1fr; }
  .home-intro { grid-column: 1; grid-row: 2; }
  .directory { grid-column: 1; grid-row: 3; }
  #home-calc { grid-column: 1; grid-row: 1; position: static; max-height: none; }
  .basic-calc { width: 100%; }
}
[dir="rtl"] .search { margin-left: 0; margin-right: auto; }
[dir="rtl"] .search input { padding: 0 16px 0 46px; }
[dir="rtl"] .search > button { right: auto; left: 4px; }
[dir="rtl"] .basic-screen { text-align: left; }
[dir="rtl"] .main-nav { margin-left: 0; margin-right: auto; }

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .header-bar { flex-wrap: wrap; }
  .lang-switch { order: 2; }
  .lang-button { max-width: 46vw; }
  .search { order: 3; width: 100%; margin-left: 0; margin-right: 0; }
  .main-nav { display: none; flex-direction: column; padding-bottom: 10px; }
  .main-nav.open { display: flex; }
  .main-nav a { border-bottom: 0; padding: 10px 14px; }
  .chart-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .card-grid, .stat-grid, .shape-picker, .footer-cols { grid-template-columns: 1fr; }
  .tool-row { flex-direction: column; align-items: flex-start; }
  .link-list { columns: 1; }
  .sheet, .home { padding-inline: 14px; }
  .key { min-height: 40px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .calc-card { transform: none; }
}
@media print {
  .site-header, .site-footer, .form-panel, .related, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .calc-layout { display: block; }
}
