:root {
  --bg: #f4f7fb;
  --bg-accent: #e7eefb;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --ink: #0b1736;
  --muted: #334155;
  --subtle: #3e4c63;
  --line: rgba(15, 35, 80, 0.12);
  --primary: #1d4ed8;
  --primary-strong: #1e3a8a;
  --link: #1d4ed8;
  --action: #1d4ed8;
  --action-hover: #1e3a8a;
  --action-text: #ffffff;
  --cyan: #0e7490;
  --accent-soft: #e7f0ff;
  --good: #065f46;
  --good-bg: #ecfdf5;
  --warn: #92400e;
  --warn-bg: #fff7ed;
  --danger: #991b1b;
  --danger-bg: #fef2f2;
  --shadow: 0 1px 2px rgba(11, 23, 54, 0.05), 0 18px 40px rgba(17, 45, 99, 0.08);
  --shadow-lg: 0 28px 70px rgba(13, 32, 80, 0.16);
  --glass: rgba(255, 255, 255, 0.78);
  --header: rgba(244, 247, 251, 0.86);
  --ring: rgba(29, 78, 216, 0.24);
  --grid: rgba(15, 35, 80, 0.18);
  --hero-glow: rgba(37, 99, 235, 0.2);
  --hero-glow-2: rgba(14, 165, 233, 0.16);
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --header-h: 76px;
  --max: 1160px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #070d1c;
  --bg-accent: #10192f;
  --surface: #111a31;
  --surface-soft: #17233f;
  --ink: #f4f7ff;
  --muted: #d5deee;
  --subtle: #c5d0e4;
  --line: rgba(186, 206, 245, 0.16);
  --primary: #93c5fd;
  --primary-strong: #dbeafe;
  --link: #93c5fd;
  --action: #1d4ed8;
  --action-hover: #1e40af;
  --action-text: #ffffff;
  --cyan: #67e8f9;
  --accent-soft: rgba(59, 130, 246, 0.18);
  --good: #a7f3d0;
  --good-bg: #063227;
  --warn: #fde68a;
  --warn-bg: #3a2a0c;
  --danger: #fecaca;
  --danger-bg: #3f1519;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.42);
  --glass: rgba(12, 20, 40, 0.78);
  --header: rgba(7, 13, 28, 0.84);
  --ring: rgba(147, 197, 253, 0.3);
  --grid: rgba(196, 214, 255, 0.16);
  --hero-glow: rgba(37, 99, 235, 0.32);
  --hero-glow-2: rgba(34, 211, 238, 0.14);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 100% -10%, var(--hero-glow), transparent 55%),
    radial-gradient(820px 420px at -10% 8%, var(--hero-glow-2), transparent 50%),
    var(--bg);
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
}

a { color: var(--link); text-decoration: none; }

img, svg { max-width: 100%; }

button, a, summary, input, select { touch-action: manipulation; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

::selection {
  background: #bfdbfe;
  color: #0b1736;
}

[data-theme="dark"] ::selection {
  background: #1e3a8a;
  color: #ffffff;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--action);
  color: var(--action-text);
  font-weight: 700;
}

.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header,
main,
.site-footer { position: relative; z-index: 1; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.15rem, 4.6vw, 4.15rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 2.4vw, 2.15rem); font-weight: 600; }
h3 { font-size: 1.12rem; font-weight: 600; }

p { margin: 0; color: var(--muted); text-wrap: pretty; }

.lead { font-size: 1.08rem; max-width: 66ch; }

.kicker, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 94%, var(--surface));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(7, 20, 51, 0.04);
  backdrop-filter: blur(18px);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.04em;
  min-height: 44px;
}

.brand-mark { width: 32px; height: 32px; flex: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav > a:not(.nav-cta) {
  color: var(--ink);
  font-weight: 700;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

.site-nav > a:not(.nav-cta):hover,
.site-nav > a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--primary-strong);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.icon {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
}

.icon-sm { width: 18px; height: 18px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.button.primary {
  background: var(--action);
  color: var(--action-text);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.28);
}

.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.button.inverse {
  background: #ffffff;
  color: #0b1736;
}

.button.ghost {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}

.button.ghost:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }

.button:hover { transform: translateY(-1px); text-decoration: none; }
.button.primary:hover { background: var(--action-hover); }
.button:active { transform: translateY(0) scale(0.98); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 28px;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
}

.blob-a {
  width: 280px;
  height: 280px;
  background: #60a5fa;
  opacity: 0.45;
  top: -60px;
  right: 6%;
  animation: drift 18s ease-in-out infinite;
}

.blob-b {
  width: 220px;
  height: 220px;
  background: #22d3ee;
  opacity: 0.32;
  left: -40px;
  bottom: 20px;
  animation: drift 22s ease-in-out infinite reverse;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 42px;
  align-items: center;
}

.hero-copy { display: grid; gap: 16px; justify-items: start; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.86rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.trust-chip .icon { width: 16px; height: 16px; color: var(--primary-strong); }

.hero-visual {
  position: relative;
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 0;
  padding: 8px 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7), rgba(37, 99, 235, 0.08) 42%, transparent 70%);
}

.orb-1 { width: 140px; height: 140px; right: 8%; top: 46%; }
.orb-2 { width: 84px; height: 84px; left: 8%; top: 18%; }

.dash, .float-card, .surface, .card, .mini-card, .content-panel, .sidebar-box, .stat, .faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.dash {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 18px 18px 14px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 28%),
    var(--glass);
  backdrop-filter: blur(16px);
}

.dash-top {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dash-top span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #93c5fd;
}

.dash-top span:nth-child(2) { background: #67e8f9; }
.dash-top span:nth-child(3) { background: #1d4ed8; }
.dash-top em { margin-left: auto; font-style: normal; }

.dash-kicker { margin-top: 18px; font-weight: 700; color: var(--subtle); }
.dash-value {
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.dash-value span { font-size: 1rem; color: var(--muted); margin-left: 4px; }

.spark { width: 100%; height: auto; display: block; }

.dash-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.dash-metrics div {
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.dash-metrics small, .float-card small, .stat span, .meter-label {
  display: block;
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 700;
}

.dash-metrics b, .float-card strong, .stat strong {
  font-family: var(--font-display);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.float-card {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  border-radius: 18px;
  color: var(--ink);
  background: var(--glass);
  backdrop-filter: blur(12px);
  text-decoration: none;
}

.float-card small { white-space: nowrap; }
.float-card:hover { text-decoration: none; color: var(--ink); }
.float-card-a { justify-self: end; animation: floaty 6.5s ease-in-out infinite; }
.float-card-b { justify-self: start; animation: floaty 7.5s ease-in-out infinite; animation-delay: -2s; }
.float-card strong { font-size: 1.05rem; }

.icon-tile {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--primary-strong);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.16), rgba(34, 211, 238, 0.12));
  flex: none;
}

.basic-calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 36px;
  align-items: center;
}

.basic-calc {
  background: linear-gradient(180deg, #10203c 0%, #07111f 100%);
  border-radius: 28px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(125, 211, 252, 0.18);
}

.basic-calc-screen {
  min-height: 104px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #050b16;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 4px;
}

.basic-calc-expr {
  min-height: 1.2em;
  color: #9fb4d4;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.basic-calc-value {
  color: #f8fbff;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: right;
}

.basic-calc-keys {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.basic-calc-keys button {
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  background: #172743;
  color: #f4f7ff;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

.basic-calc-keys button[data-op] {
  background: #12315f;
  color: #7dd3fc;
}

.basic-calc-keys button[data-action="equals"] {
  background: #1d4ed8;
  color: #fff;
}

.basic-calc-keys button[data-action="clear"] { color: #fecaca; }

.basic-calc-keys button:hover { filter: brightness(1.08); }
.basic-calc-keys button:active { transform: scale(0.97); }
.basic-calc-keys button:focus-visible { outline: 2px solid #7dd3fc; outline-offset: 2px; }

.stat-strip { padding: 10px 0 18px; }

.stat-grid, .split, .card-grid, .admin-grid {
  display: grid;
  gap: 16px;
}

.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-grid > *, .card-grid > *, .split > *, .admin-grid > *, .hero-grid > *, .steps > * { min-width: 0; }
.metric-grid { grid-template-columns: 1fr 1fr; }
.metric-grid .stat strong { font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }

.stat {
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  gap: 6px;
  min-height: 124px;
  align-content: end;
}

.stat strong {
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  letter-spacing: -0.04em;
  color: var(--primary-strong);
}

.section { padding: 34px 0 10px; }

.section-head {
  display: grid;
  gap: 8px;
  max-width: 680px;
  margin-bottom: 20px;
}

.card-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card, .mini-card, .content-panel, .sidebar-box {
  border-radius: var(--radius);
  padding: 22px;
}

.card, .mini-card { position: relative; display: grid; align-content: start; gap: 10px; min-height: 100%; }

.card::before, .mini-card::before, .content-panel::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, #1d4ed8, #22d3ee);
  opacity: 0.85;
}

.mini-card {
  color: inherit;
  text-decoration: none;
}

.mini-card h3, .card h3 { overflow-wrap: anywhere; }

.card p, .clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link, .text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-weight: 800;
  min-height: 44px;
  color: var(--link);
}

.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card-link .icon, .text-link .icon { position: relative; z-index: 1; }

@media (hover: hover) {
  a.mini-card:hover,
  .card:has(.card-link):hover,
  .keyword-pill:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
  }
}

.card:focus-within,
a.mini-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.card-link:focus-visible { outline: none; }

.card, .mini-card, .keyword-pill, .float-card, .button, .faq-item, .theme-toggle, .nav-toggle {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tag {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 800;
}

.keyword-list { display: flex; flex-wrap: wrap; gap: 10px; }

.keyword-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  backdrop-filter: blur(8px);
  overflow-wrap: anywhere;
}

.keyword-pill:hover { color: var(--primary-strong); text-decoration: none; }

.split { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.note-card { border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.note-card.good { background: var(--good-bg); border: 1px solid color-mix(in srgb, var(--good) 35%, transparent); }
.note-card.warn { background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.note-card h2, .note-card h3 { display: flex; align-items: center; gap: 8px; }
.note-card.good h2, .note-card.good h3, .note-card.good .icon { color: var(--good); }
.note-card.warn h2, .note-card.warn h3, .note-card.warn .icon { color: var(--warn); }

.check-list, .list, .sidebar-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.check-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  color: var(--ink);
}

.check-list .icon { width: 18px; height: 18px; margin-top: 3px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.step {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.step b {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.answer-lead { color: var(--ink); font-size: 1.05rem; }
.meta-row { color: var(--subtle); font-size: 0.92rem; font-weight: 700; }
.prose { display: grid; gap: 12px; }
.prose-block { display: grid; gap: 14px; max-width: 78ch; }
.prose-block p { font-size: 1.05rem; }
.figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.figure img, .card-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #071433;
}
.figure figcaption { padding: 10px 14px 14px; color: var(--subtle); font-size: 0.88rem; }
.card-media { border-bottom: 1px solid var(--line); }
.step-list { margin: 12px 0 0; padding-left: 1.2rem; display: grid; gap: 10px; color: var(--ink); }
.step-list li { line-height: 1.6; }
.post-hero { display: grid; gap: 16px; }

.faq-list { display: grid; gap: 12px; }

.faq-item {
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  min-height: 60px;
  padding: 16px 18px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  flex: none;
  margin-top: -4px;
}

.faq-item[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.faq-item p { padding: 0 18px 18px; max-width: 75ch; }

.cta-band {
  margin: 42px auto 10px;
  padding: 36px;
  border-radius: 28px;
  color: #f8fbff;
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(34, 211, 238, 0.35), transparent 55%),
    linear-gradient(135deg, #071433 0%, #12327a 62%, #0e7490 130%);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 14px;
  justify-items: start;
}

.cta-band h2, .cta-band p { color: #f8fbff; }
.cta-band p { max-width: 62ch; }
.cta-band .kicker { color: #dbeafe; }

.page-intro { padding: 36px 0 8px; }
.page-intro h1 { font-size: clamp(2rem, 4vw, 3.3rem); margin: 8px 0 12px; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--subtle);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.crumbs a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.crumbs span[aria-current="page"] { color: var(--ink); overflow-wrap: anywhere; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
  gap: 22px;
  padding: 18px 0 64px;
  align-items: start;
}

.stack { display: grid; gap: 16px; }

.field { display: grid; gap: 8px; margin-bottom: 14px; }

label { font-weight: 800; color: var(--ink); }

input, select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
}

select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 12px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

.form-note { color: var(--subtle); font-size: 0.92rem; margin: 4px 0 14px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.calculator-form { margin-top: 8px; }

@media (min-width: 760px) {
  .calculator-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
  }
  .calculator-form .actions,
  .calculator-form .form-note { grid-column: 1 / -1; }
}

.result-box, .info-box {
  border-radius: 18px;
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.result-box { background: linear-gradient(180deg, var(--accent-soft), var(--surface)); }
.result-box.is-error { background: var(--danger-bg); }

.result-output {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.result-output.is-error { color: var(--danger); font-size: 1.05rem; letter-spacing: 0; }

.result-output.pop { animation: pop 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.sidebar { display: grid; gap: 16px; }

.related-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.related-link:hover { color: var(--link); text-decoration: none; }
.sidebar-box li:last-child .related-link { border-bottom: 0; }
.registry-item { flex-wrap: wrap; }

.meter { display: grid; gap: 6px; }
.meter-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.meter-row strong { font-variant-numeric: tabular-nums; }
.meter-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-accent);
  overflow: hidden;
}
.meter-track span {
  display: block;
  height: 100%;
  width: var(--meter);
  border-radius: inherit;
  background: linear-gradient(90deg, #1d4ed8, #22d3ee);
}

.registry-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.registry-item a { font-weight: 800; color: var(--ink); }
.registry-item a:hover { color: var(--link); }

.admin-grid { grid-template-columns: 0.9fr 1.1fr; align-items: start; }

.empty {
  min-height: 52vh;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
  padding: 48px 0 80px;
}

.empty-mark {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  letter-spacing: -0.06em;
  line-height: 0.9;
  background: linear-gradient(120deg, #1d4ed8, #0e7490);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-footer {
  position: relative;
  margin-top: 48px;
  padding: 48px 0 0;
  background:
    radial-gradient(900px 240px at 0% 0%, rgba(37, 99, 235, 0.18), transparent 55%),
    linear-gradient(180deg, #07111f 0%, #050b16 100%);
  color: #d7e2f5;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 72%);
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) 0.7fr 0.85fr 0.7fr minmax(160px, 0.9fr);
  gap: 28px 22px;
  align-items: start;
  padding-bottom: 36px;
}

.footer-brand-col { display: grid; gap: 14px; justify-items: start; max-width: 340px; }
.footer-brand { margin: 0; color: #fff; }
.footer-brand span { color: #fff; }
.footer-brand-col p { color: #c5d2e8; font-size: 0.95rem; max-width: 32ch; }

.footer-subscribe {
  display: flex;
  width: min(100%, 320px);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.footer-subscribe input {
  min-height: 46px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #0b1736;
  padding: 0 14px;
  box-shadow: none;
}

.footer-subscribe input:focus { outline: none; box-shadow: inset 0 0 0 2px #1d4ed8; }
.footer-subscribe button {
  border: 0;
  border-radius: 0;
  min-height: 46px;
  padding: 0 16px;
  background: #1d4ed8;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.footer-subscribe button:hover { background: #1e40af; }
.footer-subscribe-note { margin: 0; min-height: 1.2em; color: #9fb4d4; font-size: 0.82rem; }

.footer-label {
  margin: 0 0 14px;
  color: #f8fbff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.footer-nav {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-nav a {
  color: #5ec8ff;
  font-weight: 700;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 4px;
  width: fit-content;
}

.footer-nav a:hover { color: #dff4ff; }

.footer-art {
  justify-self: end;
  width: min(180px, 100%);
  color: #7dd3fc;
}

.footer-art svg { width: 100%; height: auto; display: block; }

.footer-note {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(186, 214, 255, 0.16);
  text-align: center;
}

.footer-note p { color: #b7c6de; font-size: 0.92rem; }
.footer-note a { color: #8fd6ff; font-weight: 700; }

.js [data-stagger] > * {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.js [data-stagger] > *:nth-child(2) { animation-delay: 40ms; }
.js [data-stagger] > *:nth-child(3) { animation-delay: 80ms; }
.js [data-stagger] > *:nth-child(4) { animation-delay: 120ms; }
.js [data-stagger] > *:nth-child(5) { animation-delay: 160ms; }
.js [data-stagger] > *:nth-child(6) { animation-delay: 200ms; }
.js [data-stagger] > *:nth-child(7) { animation-delay: 240ms; }
.js [data-stagger] > *:nth-child(8) { animation-delay: 280ms; }
.js [data-stagger] > *:nth-child(n + 9) { animation-delay: 320ms; }

@keyframes rise {
  from { transform: translateY(14px); }
  to { transform: none; }
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(18px, -16px, 0); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pop {
  from { transform: translateY(6px); }
  to { transform: none; }
}

@media (max-width: 980px) {
  .hero-grid, .article-layout, .stat-grid, .split, .steps, .admin-grid, .info-grid {
    grid-template-columns: 1fr;
  }
  .hero { padding-top: 32px; }
  .hero-visual { max-width: 560px; }
  .sidebar { position: static; }
}

@media (min-width: 981px) {
  .sidebar { position: sticky; top: calc(var(--header-h) + 16px); }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 20px;
    right: 20px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
  }
  .js .site-nav.is-open { display: flex; }
  .site-nav > a, .theme-toggle, .nav-cta { width: 100%; }
  .nav { position: relative; }
}

@media (max-width: 980px) {
  .basic-calc-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand-col, .footer-art { grid-column: 1 / -1; }
  .footer-art { justify-self: center; width: 200px; }
}

@media (max-width: 720px) {
  .container { width: min(var(--max), calc(100% - 32px)); }
  .orb { display: none; }
  .float-card { animation: none; }
  .cta-band, .card, .mini-card, .content-panel { padding: 18px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-art { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js [data-stagger] > * { animation: none; opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .blob, .hero-visual, .cta-row, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .content-panel, .result-box { box-shadow: none; }
}
