/* ==========================================================================
   iCalc by Infodoer — Design System
   Direction: "Precision instrument" — paper surfaces, ink type, saffron
   accent, LCD-style result displays with tabular mono digits.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #f5f2ea;
  --bg-2: #ede8dc;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --line: #e2dccd;
  --line-strong: #cdc5b1;

  /* Ink */
  --ink: #15171d;
  --ink-2: #3a3e4a;
  --muted: #5d6272;

  /* Brand */
  --accent: #ff6a2b;          /* fills, never small text on white */
  --accent-ink: #b8410e;      /* accessible text accent (5.3:1 on white) */
  --accent-soft: #ffe7dc;
  --on-accent: #1a0d05;

  /* LCD display */
  --lcd-bg: #14171f;
  --lcd-bg-2: #1c2130;
  --lcd-ink: #f3f0e6;
  --lcd-muted: #a5abbb;
  --lcd-glow: #ffb38f;
  --lcd-line: #2b3142;

  /* Status */
  --ok: #157a46;
  --warn: #a8620a;
  --bad: #c0332b;

  /* Type */
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* Scale */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --shadow-1: 0 1px 0 rgba(21, 23, 29, .04), 0 1px 3px rgba(21, 23, 29, .06);
  --shadow-2: 0 2px 4px rgba(21, 23, 29, .04), 0 12px 32px -8px rgba(21, 23, 29, .14);
  --shadow-3: 0 24px 64px -16px rgba(21, 23, 29, .28);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

@media not all {
  :root:not([data-theme="light"]) {
    --bg: #0d0f14; --bg-2: #12151c; --surface: #161a23; --surface-2: #1b202b;
    --line: #262c39; --line-strong: #353d4e;
    --ink: #eeebe3; --ink-2: #c9c6bd; --muted: #9aa0ae;
    --accent: #ff7a40; --accent-ink: #ff9a6b; --accent-soft: #2a1a12; --on-accent: #1a0d05;
    --lcd-bg: #07090d; --lcd-bg-2: #0d1118; --lcd-line: #1e2431;
    --ok: #4cc98a; --warn: #f0b04b; --bad: #ff7b72;
    --shadow-1: 0 1px 0 rgba(0,0,0,.3); --shadow-2: 0 12px 32px -8px rgba(0,0,0,.6);
    --shadow-3: 0 24px 64px -16px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark-disabled"] {
  --bg: #0d0f14; --bg-2: #12151c; --surface: #161a23; --surface-2: #1b202b;
  --line: #262c39; --line-strong: #353d4e;
  --ink: #eeebe3; --ink-2: #c9c6bd; --muted: #9aa0ae;
  --accent: #ff7a40; --accent-ink: #ff9a6b; --accent-soft: #2a1a12; --on-accent: #1a0d05;
  --lcd-bg: #07090d; --lcd-bg-2: #0d1118; --lcd-line: #1e2431;
  --ok: #4cc98a; --warn: #f0b04b; --bad: #ff7b72;
  --shadow-1: 0 1px 0 rgba(0,0,0,.3); --shadow-2: 0 12px 32px -8px rgba(0,0,0,.6);
  --shadow-3: 0 24px 64px -16px rgba(0,0,0,.8);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Paper grain + grid backdrop */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 20%, transparent 75%);
  opacity: .55;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 12px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-height: 44px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--ink); display: grid; place-items: center; position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 4px; background: var(--accent); border: 2px solid var(--bg); }
.brand-mark svg { width: 20px; height: 20px; color: var(--bg); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -.03em; }
.brand-name b { color: var(--accent-ink); font-weight: 800; }
.brand-by { font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; }

.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--surface); color: var(--ink); }

.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: transform .15s var(--ease), border-color .15s; flex: none; }
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }
.search-trigger { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; min-width: 220px; transition: border-color .15s; }
.search-trigger:hover { border-color: var(--line-strong); }
.search-trigger svg { width: 18px; height: 18px; }
.search-trigger span { flex: 1; text-align: left; font-size: 15px; }
kbd { font-family: var(--font-mono); font-size: 12px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark-disabled"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark-disabled"] .theme-toggle .i-moon { display: block; }
@media not all {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
.menu-btn { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .search-trigger { min-width: 0; width: 44px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .menu-btn { display: inline-grid; }
}

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 60; display: none; }
.drawer.open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 16, .5); animation: fade .2s; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(360px, 88vw); background: var(--surface); padding: 20px; overflow-y: auto; box-shadow: var(--shadow-3); animation: slideIn .28s var(--ease); }
.drawer-panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--font-body); margin: 22px 0 8px; }
.drawer-panel a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px; border-radius: 12px; text-decoration: none; }
.drawer-panel a:hover { background: var(--surface-2); }
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Command palette ---------- */
.palette { position: fixed; inset: 0; z-index: 80; display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.palette.open { display: flex; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 16, .55); backdrop-filter: blur(4px); animation: fade .15s; }
.palette-box { position: relative; width: min(640px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden; animation: pop .22s var(--ease); }
@keyframes pop { from { transform: translateY(-8px) scale(.98); opacity: 0; } }
.palette-input-wrap { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette-input-wrap svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.palette input { flex: 1; height: 60px; border: 0; background: transparent; font-size: 18px; outline: none; }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: 56vh; overflow-y: auto; }
.palette-list a { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; text-decoration: none; min-height: 52px; }
.palette-list a[aria-selected="true"], .palette-list a:hover { background: var(--surface-2); }
.palette-list small { display: block; color: var(--muted); font-size: 13px; }
.palette-empty { padding: 28px; text-align: center; color: var(--muted); }
.palette-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- Icon tile ---------- */
.tile-icon {
  --h: 20;
  width: 44px; height: 44px; border-radius: 13px; flex: none; display: grid; place-items: center;
  background: hsl(var(--h) 90% 92%); color: hsl(var(--h) 70% 28%);
}
:root[data-theme="dark-disabled"] .tile-icon { background: hsl(var(--h) 45% 18%); color: hsl(var(--h) 85% 75%); }
@media not all { :root:not([data-theme="light"]) .tile-icon { background: hsl(var(--h) 45% 18%); color: hsl(var(--h) 85% 75%); } }
.tile-icon svg { width: 22px; height: 22px; }

/* ---------- Hero (home) ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 22px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.hero h1 { font-size: clamp(40px, 7vw, 82px); font-weight: 800; letter-spacing: -.045em; line-height: .98; margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--accent-ink); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .14em; background: var(--accent); opacity: .28; border-radius: 4px; z-index: -1; }
.hero .lede { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 560px; margin-bottom: 28px; }
.hero-search { display: flex; align-items: center; gap: 12px; max-width: 520px; height: 60px; padding: 0 8px 0 20px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow-2); cursor: text; transition: border-color .15s, box-shadow .2s; }
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent), var(--shadow-2); }
.hero-search svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.hero-search input { flex: 1; border: 0; outline: none; background: transparent; font-size: 17px; min-width: 0; height: 100%; }
.hero-stats { display: flex; gap: 28px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-family: var(--font-display); font-size: 28px; letter-spacing: -.03em; }
.hero-stats span { font-size: 14px; color: var(--muted); }

/* Hero device */
.device { position: relative; background: var(--lcd-bg); border-radius: 34px; padding: 22px; box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255,255,255,.06); color: var(--lcd-ink); transform: rotate(2deg); max-width: 380px; margin-left: auto; }
.device::before { content: ""; position: absolute; inset: -14px -14px auto auto; width: 120px; height: 120px; background: var(--accent); border-radius: 30px; z-index: -1; transform: rotate(-12deg); opacity: .9; }
.device-screen { background: linear-gradient(180deg, var(--lcd-bg-2), #0a0d13); border: 1px solid var(--lcd-line); border-radius: 20px; padding: 18px 18px 16px; margin-bottom: 18px; min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end; }
.device-label { font-family: var(--font-mono); font-size: 12px; color: var(--lcd-muted); letter-spacing: .08em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 12px; }
.device-label span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.device-label span:last-child { color: var(--lcd-glow); flex: none; }
.device-value { font-family: var(--font-mono); font-size: 38px; font-weight: 600; text-align: right; color: var(--lcd-ink); text-shadow: 0 0 24px rgba(255, 140, 90, .25); font-variant-numeric: tabular-nums; overflow: hidden; white-space: nowrap; }
.device-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.device-keys span { height: 52px; border-radius: 14px; background: #20263a; display: grid; place-items: center; font-family: var(--font-mono); font-size: 18px; color: #d7dae4; }
.device-keys span.op { background: #2c3550; color: var(--lcd-glow); }
.device-keys span.eq { background: var(--accent); color: var(--on-accent); font-weight: 700; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .device { margin: 8px auto 0; transform: rotate(0); max-width: 340px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(36px, 6vw, 72px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin: 0; }
.section-head p { color: var(--muted); margin: 6px 0 0; max-width: 560px; }

/* Category chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; font-size: 14px; color: var(--ink-2); transition: all .15s; }
.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Bento grid */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; grid-auto-flow: dense; }
.card {
  --h: 20;
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; overflow: hidden; min-height: 190px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s;
}
.card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -70px; bottom: -90px; border-radius: 50%; background: hsl(var(--h) 90% 60%); opacity: 0; filter: blur(40px); transition: opacity .3s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.card:hover::after { opacity: .22; }
.card h3 { font-size: 20px; margin: 0; }
.card p { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.card .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--accent-ink); }
.card .go svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.card:hover .go svg { transform: translateX(4px); }
.card .tag { position: absolute; top: 18px; right: 18px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.card.wide { grid-column: span 2; }
.card.tall { grid-row: span 2; }
.card.feature { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.card.feature p { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.card.feature .go { color: var(--accent); }
.card.feature .tag { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.card.feature .mini-lcd { margin-top: auto; background: var(--lcd-bg); border-radius: 14px; padding: 14px 16px; font-family: var(--font-mono); color: var(--lcd-ink); border: 1px solid #2a3040; }
.card.feature .mini-lcd small { display: block; color: var(--lcd-muted); font-size: 12px; }
.card.feature .mini-lcd b { font-size: 26px; font-weight: 600; }
.card[hidden] { display: none; }
@media (max-width: 1024px) { .bento { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .bento { grid-template-columns: repeat(2, 1fr); } .card.tall { grid-row: auto; } }
@media (max-width: 520px) { .bento { grid-template-columns: 1fr; } .card.wide { grid-column: auto; } .card { min-height: 0; } }

/* Feature strip */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature-item { padding: 22px; border-radius: var(--r-lg); border: 1px dashed var(--line-strong); }
.feature-item svg { width: 26px; height: 26px; color: var(--accent-ink); margin-bottom: 12px; }
.feature-item h3 { font-size: 18px; margin-bottom: 6px; }
.feature-item p { color: var(--muted); font-size: 15px; margin: 0; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }

/* ---------- Calculator page ---------- */
.crumbs { padding-top: 22px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.calc-hero { padding: 18px 0 26px; display: flex; gap: 18px; align-items: flex-start; }
.calc-hero .tile-icon { width: 64px; height: 64px; border-radius: 20px; }
.calc-hero .tile-icon svg { width: 32px; height: 32px; }
.calc-hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: -.04em; margin-bottom: 8px; }
.calc-hero p { color: var(--ink-2); font-size: 18px; margin: 0; max-width: 720px; }
@media (max-width: 560px) { .calc-hero { flex-direction: column; gap: 12px; } }

.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 18px; align-items: start; }
.calc-layout.single { grid-template-columns: minmax(0, 560px); justify-content: center; }
@media (max-width: 900px) { .calc-layout { grid-template-columns: minmax(0, 1fr); } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow-1); }
.panel-title { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--font-body); font-weight: 600; margin: 0 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Tabs (segmented) */
.seg { display: flex; padding: 4px; gap: 4px; background: var(--bg-2); border-radius: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.seg button { flex: 1; min-height: 42px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); transition: all .18s var(--ease); white-space: nowrap; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* Fields */
.fields { display: grid; gap: 16px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } .row-3 { grid-template-columns: 1fr 1fr; } }
.field label, .field .label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: var(--ink-2); }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input, select.input {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: 13px;
  border: 1.5px solid var(--line); background: var(--surface-2); font-size: 17px;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
select.input { font-family: var(--font-body); font-size: 16px; appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235d6272' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input[type="date"].input, input[type="time"].input { font-family: var(--font-body); }
.input:hover { border-color: var(--line-strong); }
.input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input-wrap .prefix, .input-wrap .suffix { position: absolute; color: var(--muted); font-size: 15px; pointer-events: none; font-family: var(--font-mono); }
.input-wrap .prefix { left: 14px; }
.input-wrap .suffix { right: 14px; }
.input-wrap.has-prefix .input { padding-left: 34px; }
.input-wrap.has-suffix .input { padding-right: 54px; }
.err { color: var(--bad); font-size: 13px; margin-top: 6px; min-height: 0; }
.err:empty { display: none; }

/* Range */
.range { width: 100%; margin-top: 12px; accent-color: var(--accent); height: 28px; cursor: pointer; }

/* Pill radios */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills label { margin: 0; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 14px; cursor: pointer; transition: all .15s; font-family: var(--font-mono); }
.pills input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pills input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 15px; min-height: 44px; }
.switch input { width: 44px; height: 26px; appearance: none; -webkit-appearance: none; background: var(--line-strong); border-radius: 999px; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 13px; border: 1.5px solid transparent; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .12s var(--ease), background .15s, border-color .15s; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--line-strong); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.swap-btn { align-self: end; }

/* ---------- LCD result display ---------- */
.lcd {
  position: relative; background: radial-gradient(120% 80% at 100% 0%, #222a3d 0%, var(--lcd-bg) 55%);
  color: var(--lcd-ink); border-radius: var(--r-xl); padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255,255,255,.06); overflow: hidden;
}
.lcd::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px); }
.lcd-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; position: relative; }
.lcd-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--lcd-muted); }
.lcd-actions { display: flex; gap: 6px; }
.lcd-actions button { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--lcd-line); background: rgba(255,255,255,.04); color: var(--lcd-ink); cursor: pointer; display: grid; place-items: center; transition: background .15s; }
.lcd-actions button:hover { background: rgba(255,255,255,.1); }
.lcd-actions svg { width: 18px; height: 18px; }
.lcd-main { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: clamp(32px, 5.4vw, 50px); line-height: 1.1; letter-spacing: -.02em; color: #fff; text-shadow: 0 0 28px rgba(255, 140, 90, .22); word-break: break-word; position: relative; }
.lcd-main small { font-size: .45em; color: var(--lcd-muted); font-weight: 500; letter-spacing: 0; }
.lcd-sub { color: var(--lcd-muted); font-size: 15px; margin-top: 6px; position: relative; }
.lcd-sub b { color: var(--lcd-glow); font-weight: 600; }
.lcd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 20px; background: var(--lcd-line); border: 1px solid var(--lcd-line); border-radius: 16px; overflow: hidden; position: relative; }
.lcd-grid > div { background: var(--lcd-bg-2); padding: 14px 16px; min-width: 0; }
.lcd-grid > div.full { grid-column: 1 / -1; }
.lcd-grid dt { font-size: 12px; color: var(--lcd-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.lcd-grid dd { margin: 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 600; color: var(--lcd-ink); overflow-wrap: anywhere; }
.lcd-grid dd.accent { color: var(--lcd-glow); }
.lcd-grid dd.ok { color: #6fe0a5; }
.lcd-grid dd.bad { color: #ff8f86; }
.flash { animation: flash .45s var(--ease); }
@keyframes flash { 0% { opacity: .35; transform: translateY(3px); } 100% { opacity: 1; transform: none; } }

/* Bars / charts */
.bar { height: 12px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; display: flex; margin-top: 18px; position: relative; }
.bar span { height: 100%; transition: width .5s var(--ease); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--lcd-muted); position: relative; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.donut-wrap { display: flex; align-items: center; gap: 20px; margin-top: 18px; position: relative; flex-wrap: wrap; }
.donut { width: 132px; height: 132px; flex: none; }

/* BMI gauge */
.gauge { margin-top: 22px; position: relative; }
.gauge-track { height: 14px; border-radius: 999px; background: linear-gradient(90deg, #5aa9ff 0 18%, #3fcf8e 18% 45%, #f6c445 45% 65%, #ff8a4c 65% 82%, #ff5c5c 82% 100%); }
.gauge-pin { position: absolute; top: -6px; width: 4px; height: 26px; background: #fff; border-radius: 4px; box-shadow: 0 0 0 3px var(--lcd-bg); transform: translateX(-50%); transition: left .5s var(--ease); }
.gauge-scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--lcd-muted); margin-top: 8px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); margin-top: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { background: var(--surface-2); font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; position: sticky; top: 0; }
td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.prose table td { font-family: var(--font-body); }

/* Keypads (basic & scientific) */
.keypad-shell { background: var(--lcd-bg); border-radius: 34px; padding: clamp(16px, 3vw, 24px); box-shadow: var(--shadow-3); }
.screen { background: linear-gradient(180deg, var(--lcd-bg-2), #090c12); border: 1px solid var(--lcd-line); border-radius: 22px; padding: 16px 18px; margin-bottom: 16px; min-height: 124px; display: flex; flex-direction: column; justify-content: flex-end; text-align: right; color: var(--lcd-ink); overflow: hidden; }
.screen .expr { font-family: var(--font-mono); color: var(--lcd-muted); font-size: 17px; min-height: 26px; word-break: break-all; }
.screen .out { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(34px, 7vw, 48px); font-weight: 600; color: #fff; line-height: 1.15; word-break: break-all; }
.screen .mode { font-family: var(--font-mono); font-size: 11px; color: var(--lcd-glow); letter-spacing: .1em; text-align: left; margin-bottom: auto; }
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.keys.sci { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.key { min-height: 60px; border: 0; border-radius: 16px; background: #1f2536; color: #e7e9f0; font-family: var(--font-mono); font-size: 20px; cursor: pointer; transition: transform .08s, background .15s; box-shadow: inset 0 -2px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05); touch-action: manipulation; }
.keys.sci .key { min-height: 52px; font-size: 16px; border-radius: 13px; }
.key:hover { background: #283048; }
.key:active, .key.pressed { transform: scale(.94); }
.key.fn { background: #2a3148; color: #b9c2dc; font-size: 16px; }
.key.op { background: #33302c; color: var(--lcd-glow); }
.key.op:hover { background: #3f3a34; }
.key.eq { background: var(--accent); color: var(--on-accent); font-weight: 800; }
.key.eq:hover { background: #ff7f47; }
.key.wide { grid-column: span 2; }
.key.on { background: var(--accent-soft); color: var(--accent-ink); }
.history { margin-top: 14px; max-height: 220px; overflow-y: auto; }
.history button { display: block; width: 100%; text-align: right; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-family: var(--font-mono); color: var(--ink-2); font-size: 14px; }
.history button:hover { background: var(--surface-2); }
.history b { color: var(--ink); }

/* ---------- Content / prose ---------- */
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; margin-top: clamp(32px, 6vw, 64px); }
@media (max-width: 960px) { .content-grid { grid-template-columns: minmax(0, 1fr); } }
.prose { max-width: 760px; font-size: 17px; color: var(--ink-2); }
.prose h2 { font-size: clamp(24px, 3.2vw, 32px); color: var(--ink); margin-top: 1.8em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; color: var(--ink); margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--accent-ink); text-underline-offset: 3px; }
.prose code, .formula { font-family: var(--font-mono); font-size: .92em; }
.formula { display: block; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 16px 18px; color: var(--ink); overflow-x: auto; white-space: pre-wrap; line-height: 1.7; margin: 0 0 1.2em; }
.steps { list-style: none; padding: 0 !important; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0; }
.steps li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-family: var(--font-mono); font-size: 14px; }
.callout { background: var(--accent-soft); border-radius: 14px; padding: 16px 18px; color: var(--ink); font-size: 16px; margin: 1.2em 0; }

/* FAQ */
.faq { display: grid; gap: 10px; margin-top: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; transition: border-color .15s; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 22px; color: var(--muted); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 18px 16px; color: var(--ink-2); }
.faq .ans p:last-child { margin: 0; }

/* Sidebar */
.aside { position: sticky; top: 90px; display: grid; gap: 14px; }
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.aside-card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--font-body); margin-bottom: 10px; }
.toc { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-size: 15px; }
.toc a:hover { background: var(--surface-2); color: var(--ink); }
.related { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.related a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-decoration: none; font-weight: 500; min-height: 52px; }
.related a:hover { background: var(--surface-2); }
.related .tile-icon { width: 36px; height: 36px; border-radius: 10px; }
.related .tile-icon svg { width: 18px; height: 18px; }
@media (max-width: 960px) { .aside { position: static; } }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(48px, 8vw, 96px); border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.foot-grid h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--font-body); margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot-grid ul a { text-decoration: none; color: var(--ink-2); display: inline-block; padding: 5px 0; font-size: 15px; }
.foot-grid ul a:hover { color: var(--ink); text-decoration: underline; }
.foot-about p { color: var(--muted); font-size: 15px; max-width: 340px; margin-top: 14px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-bottom a { color: var(--ink-2); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, calc(100% + 48px)); visibility: hidden; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 15px; z-index: 90; transition: transform .3s var(--ease); box-shadow: var(--shadow-3); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* Static pages */
.page-hero { padding: 40px 0 16px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -.04em; }
.notice { font-size: 14px; color: var(--muted); margin-top: 18px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .aside, .lcd-actions, .btn-row { display: none !important; }
  body::before { display: none; }
  .lcd { box-shadow: none; border: 1px solid #000; }
}


/* Light theme only + image logo (2026-11-26) */
:root{color-scheme:light}
.theme-toggle{display:none!important}
.brand-logo{display:block;height:54px;width:auto;max-width:100%}
@media (max-width:480px){.brand-logo{height:44px}}

/* ============ iCalc brand theme (matches logo) — 2026-11-26 ============ */
:root{
  --brand-navy:#0b2a5b; --brand-blue:#0a7bd6; --brand-orange:#f7840a;
  --bg:#f6f8fc; --bg-2:#eef3fa; --surface:#ffffff; --surface-2:#f8fafd;
  --line:#e2e8f2; --line-strong:#c9d4e5;
  --ink:#0b2a5b; --ink-2:#2a3f63; --muted:#5a6a84;
  --accent:#f7840a; --accent-ink:#b4530a; --accent-soft:#fff1e2; --on-accent:#0b2a5b;
  --lcd-bg:#0b2a5b; --lcd-bg-2:#123a75; --lcd-ink:#ffffff; --lcd-muted:#a9bddb; --lcd-glow:#ffb36b; --lcd-line:#21508f;
}
body::before{display:none!important}
::selection{background:#ffd9b0;color:#0b2a5b}
a{color:var(--brand-blue)}
.site-header{background:rgba(255,255,255,.92)!important;border-bottom:1px solid var(--line)}
.tile-icon{background:#e6f1fd;color:#0a6fc2}
[hidden]{display:none!important}

/* Home hero */
.hero2{padding:56px 0 30px;text-align:center;background:radial-gradient(ellipse 80% 100% at 50% 0%,#e3effd 0%,rgba(227,239,253,0) 70%)}
.hero2-badge{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--brand-navy);background:#fff;border:1px solid var(--line);padding:6px 14px;border-radius:999px}
.hero2-badge .dot{width:8px;height:8px;border-radius:50%;background:#1aa35a;box-shadow:0 0 0 3px #d5f3e2}
.hero2 h1{font-family:var(--font-display);font-size:clamp(32px,5.2vw,54px);line-height:1.08;letter-spacing:-.025em;margin:18px auto 12px;max-width:820px;color:var(--brand-navy)}
.hero2 h1 span{color:#e06d00}
.hero2-sub{font-size:18px;color:var(--muted);max-width:600px;margin:0 auto 26px}
.hero2-search{display:flex;align-items:center;gap:12px;max-width:640px;margin:0 auto;background:#fff;border:2px solid var(--line-strong);border-radius:16px;padding:0 18px;height:62px;box-shadow:0 12px 32px -14px rgba(11,42,91,.28);transition:border-color .15s,box-shadow .15s;cursor:text}
.hero2-search:focus-within{border-color:var(--brand-blue);box-shadow:0 0 0 4px rgba(10,123,214,.15),0 12px 32px -14px rgba(11,42,91,.28)}
.hero2-search svg{width:22px;height:22px;color:var(--brand-blue);flex:none}
.hero2-search input{flex:1;min-width:0;height:100%;border:0;outline:0;background:transparent;font:inherit;font-size:18px;color:var(--ink)}
.hero2-search input::placeholder{color:#8794aa}
.hero2-popular{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;margin-top:18px;font-size:14px}
.hero2-popular span{color:var(--muted);margin-right:2px}
.hero2-popular a{padding:7px 15px;border-radius:999px;background:#fff;border:1px solid var(--line);color:var(--brand-navy);font-weight:600;text-decoration:none;transition:all .15s}
.hero2-popular a:hover{border-color:var(--brand-orange);background:var(--accent-soft);color:var(--accent-ink)}

/* Calculator groups */
.calc-section{padding-top:18px!important}
.cat-groups{display:grid;gap:34px}
.cat-head{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.cat-head h2{font-family:var(--font-display);font-size:22px;line-height:1.2;margin:0;color:var(--brand-navy)}
.cat-head p{margin:2px 0 0;font-size:14px;color:var(--muted)}
.cat-ico{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--brand-navy);color:#fff;flex:none}
.cat-ico svg{width:20px;height:20px}
.cat-group[data-group="money"] .cat-ico{background:var(--brand-orange);color:#fff}
.cat-group[data-group="maths"] .cat-ico{background:var(--brand-blue)}
.cat-count{margin-left:auto;min-width:30px;height:30px;padding:0 10px;border-radius:999px;display:grid;place-items:center;font-size:13px;font-weight:700;color:var(--brand-navy);background:#fff;border:1px solid var(--line)}
.cat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
@media (max-width:900px){.cat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.cat-grid .calc-card{display:grid;grid-template-columns:48px 1fr 18px;grid-template-rows:auto auto;column-gap:14px;row-gap:3px;align-items:center;padding:16px 18px;border-radius:14px;min-height:0;grid-column:auto!important;grid-row:auto!important;background:#fff;border:1px solid var(--line);box-shadow:0 1px 2px rgba(11,42,91,.04);text-decoration:none}
.calc-card .tile-icon{grid-row:1 / 3;grid-column:1;width:48px;height:48px;border-radius:12px}
.calc-card h3{grid-column:2;grid-row:1;align-self:end;font-size:17px;line-height:1.25;color:var(--brand-navy)}
.calc-card p{grid-column:2;grid-row:2;align-self:start;font-size:14px;line-height:1.45;color:var(--muted)}
.calc-card::after{content:"→";position:static;grid-column:3;grid-row:1 / 3;width:auto;height:auto;border-radius:0;background:none;filter:none;opacity:1;font-size:18px;font-weight:700;color:#b9c5d8;transition:transform .15s,color .15s}
.cat-grid .calc-card:hover{transform:translateY(-2px);border-color:var(--brand-blue);box-shadow:0 12px 26px -16px rgba(11,42,91,.4)}
.calc-card:hover::after{opacity:1;color:var(--brand-orange);transform:translateX(3px)}
.calc-card:focus-visible{outline:3px solid var(--brand-blue);outline-offset:2px}
.cat-group[data-group="money"] .tile-icon{background:#fff1e2;color:#c25e05}
.cat-group[data-group="maths"] .tile-icon{background:#e6f1fd;color:#0a6fc2}
.cat-group[data-group="date"] .tile-icon{background:#e9eef8;color:#0b2a5b}
.cat-group[data-group="health"] .tile-icon{background:#e6f6ee;color:#157a46}
.empty-msg{text-align:center;padding:28px;color:var(--muted);background:#fff;border:1px dashed var(--line-strong);border-radius:14px}
@media (max-width:640px){
  .hero2{padding:34px 0 18px}
  .hero2-sub{font-size:16px;margin-bottom:20px}
  .hero2-search{height:56px;border-radius:14px}
  .hero2-search input{font-size:16px}
  .cat-grid{grid-template-columns:1fr;gap:10px}
  .cat-head h2{font-size:20px}
}

.calc-card .mini-lcd,.calc-card .tag,.calc-card .go{display:none!important}
html{scroll-padding-top:80px}

.made-with{white-space:nowrap;font-weight:600;color:var(--brand-navy)}
.made-with .heart{color:#e5383b;display:inline-block;animation:ic-beat 1.6s ease-in-out infinite}
.foot-bottom .made-with a{color:var(--brand-orange);text-decoration:none;font-weight:800;letter-spacing:.04em}
.made-with a:hover{text-decoration:underline}
@keyframes ic-beat{0%,100%{transform:scale(1)}15%{transform:scale(1.25)}30%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.made-with .heart{animation:none}}