:root {
  --bg: #eef1f4;
  --bg-deep: #dfe5ec;
  --panel: #ffffff;
  --ink: #0a1218;
  --muted: #4a5560;
  --ocean: #023047;
  --ocean-mid: #034866;
  --signal: #ffb703;
  --ember: #fb8500;
  --ice: #8ecae6;
  --line: #c8d0d8;
  --ok: #1b7f4e;
  --danger: #b42318;
  --shadow: 0 12px 28px rgba(2, 48, 71, 0.08);
  --display: "Bricolage Grotesque", "Avenir Next Condensed", "Segoe UI", sans-serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  --wrap: 1200px;
  --radius: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mast-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(2, 48, 71, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(2, 48, 71, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(1200px 500px at 10% -10%, rgba(142, 202, 230, 0.35), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(255, 183, 3, 0.18), transparent 50%),
    var(--bg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
}
img, svg { max-width: 100%; }
a { color: var(--ocean-mid); text-underline-offset: 3px; }
a:hover { color: var(--ember); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

.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;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ocean);
  color: #fff;
  padding: 8px 14px;
  z-index: 80;
  border-radius: var(--radius);
  font-weight: 700;
}
.skip:focus { top: 12px; color: #fff; }

.progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--ember), var(--signal));
  z-index: 70;
  transition: width 0.12s linear;
}

/* —— Header —— */
.mast {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ocean);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
  overflow: visible;
}
.mast.is-stuck {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.mast-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: visible;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex: none;
}
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}
.brand em {
  font-style: normal;
  color: var(--signal);
}
.mark { width: 40px; height: 40px; flex: none; }

.mast .search {
  position: relative;
  flex: 0 1 220px;
  width: 220px;
  min-width: 140px;
  z-index: 60;
}
.mast .search input {
  padding: 8px 11px 8px 34px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.96);
  border-color: transparent;
}
.search-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  display: flex;
  z-index: 1;
}
.search-list, .suggest {
  position: absolute;
  z-index: 70;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 32px rgba(2, 48, 71, 0.18);
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: min(360px, 55vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.search-list a, .suggest a {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink);
}
.search-list a:hover, .suggest a[aria-selected="true"], .search-list a:focus {
  background: rgba(255, 183, 3, 0.22);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  margin-left: auto;
}
.nav > a, .mega > button, .nav-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  color: #e8f1f6;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  padding: 8px 11px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav > a:hover, .mega > button:hover, .nav > a[aria-current="page"], .mega.open > button {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.nav > a[aria-current="page"] { color: var(--signal); }
.mega > button .chev {
  transition: transform 0.2s var(--ease);
  opacity: 0.75;
}
.mega.open > button .chev { transform: rotate(180deg); }

.nav-toggle {
  display: none;
  margin-left: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.mega { position: static; }
.mega-panel {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--ocean);
  color: #f4f8fb;
  padding: 22px 0 26px;
  animation: dropIn 0.28s var(--ease);
  z-index: 55;
  border-bottom: 3px solid var(--signal);
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.mega.open .mega-panel { display: block; }
.mega-grid {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.mega-label {
  font-family: var(--display);
  font-size: 1.02rem;
  margin: 0 0 8px;
  color: var(--signal);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.mega-grid a {
  display: block;
  color: #e8f1f6;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  font-size: 0.95rem;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.mega-grid a:hover {
  color: var(--signal);
  border-bottom-color: rgba(255, 183, 3, 0.4);
}


.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sheet { padding-top: 8px; padding-bottom: 24px; }

/* —— Hero (home) —— */
.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 0;
  align-items: stretch;
  margin: 10px 0 14px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--ocean);
}
.hero-copy {
  position: relative;
  padding: 22px 26px 24px;
  background:
    radial-gradient(420px 180px at 90% 0%, rgba(255, 183, 3, 0.26), transparent 60%),
    linear-gradient(135deg, #023047 0%, #034866 48%, #012433 100%);
  color: #f4f8fb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}
.hero-copy::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 24px solid rgba(142, 202, 230, 0.14);
  pointer-events: none;
}
.hero-copy > * { position: relative; z-index: 1; }
.hero .kicker { color: var(--signal); }
.hero h1 {
  color: #fff;
  max-width: none;
  font-size: clamp(1.9rem, 3.6vw, 2.65rem);
  margin: 0 0 8px;
}
.hero h1 em {
  font-style: normal;
  color: var(--signal);
}
.hero .lede {
  color: rgba(244, 248, 251, 0.92);
  max-width: 46ch;
  margin: 0 0 12px;
  font-size: 1.02rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 720px) {
  .hero .lede { white-space: normal; }
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}
.hero-ghost {
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #fff !important;
}
.hero-ghost:hover {
  border-color: var(--signal) !important;
  color: var(--signal) !important;
  background: transparent !important;
}
.hero-mini {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: none;
  min-width: 0;
  overflow: hidden;
}
.hero-mini h2 { font-size: 1.15rem; margin: 0 0 4px; }
.hero-mini p { margin: 0 0 8px; font-size: 0.9rem; }
.hero-mini textarea { min-height: 52px; margin-bottom: 8px; }
.hero-mini .actions,
.hero-mini .btn-lime { margin-top: 0; }
.hero-mini .mini-result {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.kicker {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 700;
  font-size: 0.74rem;
  margin: 0 0 6px;
}
h1, h2, h3, .brand-name {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
}
h1 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); margin: 0 0 8px; }
h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); margin: 1.1em 0 0.35em; }
h3 { font-size: 1.15rem; margin: 1em 0 0.25em; }
.deck, .lede { font-size: 1.08rem; color: var(--muted); max-width: 62ch; margin: 0 0 8px; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.hero-points li {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 183, 3, 0.35);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.86rem;
  color: #fff;
}

.mini, .hero-mini, .contact-card {
  background: var(--panel);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 6px 6px 0 rgba(255, 183, 3, 0.5);
  animation: riseIn 0.45s var(--ease) both;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.mini h2, .contact-card h2 { margin-top: 0; font-size: 1.3rem; }
.mini-result { margin: 10px 0 0; font-size: 1.05rem; }
.mini-result strong {
  font-family: var(--mono);
  color: var(--ocean);
  font-size: 1.35rem;
}

.row { display: flex; gap: 8px; flex-wrap: wrap; }
button, .button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  border-radius: var(--radius);
  padding: 10px 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
button:active, .button:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ocean);
  color: #fff;
}
.btn-primary:hover { background: var(--ocean-mid); color: #fff; }
.btn-lime {
  background: var(--signal);
  color: var(--ocean);
}
.btn-lime:hover { background: var(--ember); color: #fff; }
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ocean); }

.search input, .hero-search input, .filter input, input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(142, 202, 230, 0.45);
  outline: none;
}
textarea { min-height: 110px; resize: vertical; }

.index-list { list-style: none; padding: 0; margin: 12px 0 8px; }
.index-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: baseline;
  text-decoration: none;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding: 12px 0;
  transition: padding-left 0.2s var(--ease), background 0.2s var(--ease);
}
.index-list a:hover {
  padding-left: 8px;
  background: linear-gradient(90deg, rgba(255, 183, 3, 0.12), transparent);
}
.index-list span {
  color: var(--ember);
  font-family: var(--display);
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}
.index-list small { color: var(--muted); }

.bento {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 12px;
}
.bento a, .post-list a, .tool-link {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  min-height: 100%;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.bento a:hover, .post-list a:hover, .tool-link:hover {
  transform: translateY(-2px);
  border-color: var(--ocean);
  box-shadow: 5px 5px 0 rgba(2, 48, 71, 0.1);
}
.bento a strong, .tool-link strong, .post-list strong {
  display: block;
  font-family: var(--display);
  font-size: 1.08rem;
  margin-bottom: 4px;
}
.bento .feature {
  background: var(--ocean);
  color: #f4f8fb;
  border-color: var(--ocean);
}
.bento .feature small { color: var(--signal); }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-top: 22px;
}
.section-head h2 { margin: 0; }
.post-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 12px 0 20px;
  position: relative;
  z-index: 1;
}
.post-list time, .byline {
  color: var(--ember);
  font-weight: 700;
  font-size: 0.88rem;
}
.post-list span { color: var(--muted); font-size: 0.9rem; }

/* —— Page chrome —— */
.crumbs { font-size: 0.88rem; color: var(--muted); margin: 6px 0 4px; }
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.page-hero {
  margin: 0 0 14px;
  max-width: none;
}
.page-hero .deck { margin-top: 4px; }
.sheet-head { max-width: 78ch; }

.about-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 18px;
}
.about-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 4px solid var(--signal);
}
.about-stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  margin-bottom: 2px;
}
.about-stat span { color: var(--muted); font-size: 0.92rem; }

.page-layout, .faqs-layout {
  display: block;
  width: 100%;
}
.blog-lede { margin-bottom: 8px !important; }

.bench {
  margin: 10px 0 18px;
  background: var(--panel);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 16px;
  box-shadow: 8px 8px 0 rgba(2, 48, 71, 0.08);
}
.bench > h2 { margin-top: 0; }
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field span { font-weight: 650; }
.hint { color: var(--muted); font-size: 0.9rem; font-weight: 400; }

.result {
  margin-top: 14px;
  color: #f4f8fb;
  background:
    linear-gradient(180deg, rgba(255, 183, 3, 0.12), transparent 40%),
    var(--ocean);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 88px;
  border-left: 5px solid var(--signal);
}
.result h2 {
  color: var(--signal);
  margin: 0 0 10px;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 10px;
}
.figures div {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(142, 202, 230, 0.25);
  border-radius: var(--radius);
  padding: 10px;
}
.figures strong {
  display: block;
  color: var(--signal);
  font-family: var(--mono);
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  font-weight: 600;
  line-height: 1.15;
}
.figures span { color: rgba(244, 248, 251, 0.75); font-size: 0.86rem; }
.steps { margin: 8px 0 0; padding-left: 18px; }
.steps li { margin: 5px 0; }
.chart {
  width: 100%;
  height: auto;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
}

.warn, .caution {
  background: #fff8e8;
  color: #3d2c08;
  border-left: 5px solid var(--signal);
  padding: 10px 12px;
  border-radius: var(--radius);
  margin: 8px 0;
}
.result .warn {
  background: rgba(255, 183, 3, 0.12);
  color: #f4f8fb;
  border-left-color: var(--signal);
}
.error {
  background: #fde8e6;
  color: #6d120c;
  padding: 10px 12px;
  border-radius: var(--radius);
}

.read {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: start;
}
.toc, .rail {
  position: sticky;
  top: 72px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.toc ol, .rail ul, .related ul { margin: 0; padding-left: 18px; }
.toc a, .rail a { text-decoration: none; }
.prose {
  max-width: 72ch;
  font-size: 1.05rem;
  line-height: 1.7;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0;
  position: relative;
  z-index: 0;
}
.prose-wide {
  max-width: none;
  width: 100%;
}
.prose p { margin: 0 0 0.9em; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
}
.prose th, .prose td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 8px 10px;
  vertical-align: top;
}
.prose th { background: rgba(2, 48, 71, 0.06); }
.pull {
  margin: 14px 0;
  padding: 14px 16px;
  background: var(--ocean);
  color: #f4f8fb;
  border-radius: var(--radius);
  border-left: 5px solid var(--signal);
  font-family: var(--display);
  font-size: 1.22rem;
  line-height: 1.3;
}
.formula {
  font-family: var(--mono);
  background: var(--bg);
  border: 1px dashed var(--ocean);
  padding: 10px 12px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.95rem;
}

.faqs { margin: 22px 0 8px; width: 100%; }
.faqs > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
  border-radius: 6px;
  background: rgba(255, 183, 3, 0.25);
  color: var(--ocean);
  font-size: 0.85em;
  font-family: var(--mono);
}
.faqs details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  margin: 8px 0;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.faqs details[open] {
  border-color: var(--ocean);
  box-shadow: 3px 3px 0 rgba(255, 183, 3, 0.35);
}
.faqs summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  list-style: none;
}
.faqs summary::-webkit-details-marker { display: none; }
.faqs .fq { flex: 1; }
.faqs .n {
  font-family: var(--mono);
  color: var(--ember);
  font-size: 0.92rem;
  min-width: 2ch;
}
.faq-chev {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  flex: none;
  position: relative;
  transition: transform 0.2s var(--ease), background 0.15s, border-color 0.15s;
}
.faq-chev::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--ocean);
  border-bottom: 2px solid var(--ocean);
  transform: translate(-50%, -60%) rotate(45deg);
}
.faqs details[open] .faq-chev {
  background: var(--signal);
  border-color: var(--ocean);
  transform: rotate(180deg);
}
.faqs details p { margin-top: 0; color: var(--muted); padding-bottom: 12px; }

.related { margin: 12px 0 20px; }
.related-grid, .tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin: 10px 0 18px;
}
.tool-grid > h2 {
  grid-column: 1 / -1;
  margin: 14px 0 2px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--ocean);
  font-size: 1.25rem;
}

/* —— Contact —— */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}
.contact-card.quiet {
  box-shadow: none;
  border-style: solid;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.85);
}
.check-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.check-list li { margin: 6px 0; }
.mail-line { margin: 14px 0 0; font-weight: 650; }
.contact-copy { margin-top: 8px; }

.site-footer {
  margin-top: 28px;
  background: var(--ocean);
  color: #e8f1f6;
  padding: 28px 0 14px;
}
.site-footer a { color: var(--signal); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 18px;
}
.foot-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.foot-brand .mark, .mark-foot { width: 40px; height: 40px; flex: none; }
.foot-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 4px;
}
.foot-brand p {
  margin: 0;
  color: rgba(232, 241, 246, 0.82);
  font-size: 0.92rem;
  line-height: 1.4;
  max-width: 28ch;
}
.site-footer h2 {
  font-size: 0.95rem;
  margin: 0 0 8px;
  color: #fff;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 4px 0; font-size: 0.92rem; }
.legal {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 16px;
  padding-top: 12px;
  color: rgba(232, 241, 246, 0.8);
  font-size: 0.84rem;
  text-align: center;
}
.legal p { margin: 0; }

/* —— Dock arrows —— */
.dock {
  position: fixed;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 40;
}
.dock button {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--ocean);
  color: var(--ocean);
  box-shadow: 0 2px 8px rgba(2, 48, 71, 0.12);
}
.dock button:hover {
  background: var(--ocean);
  color: var(--signal);
}

.hp { position: absolute; left: -9999px; }
.status {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #e5f6ea;
  color: var(--ok);
}
.status.bad { background: #fde8e6; color: var(--danger); }

@media (max-width: 1100px) {
  .post-list { grid-template-columns: 1fr 1fr; }
  .read { grid-template-columns: 1fr; }
  .toc, .rail { position: static; }
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero-mini { border-top: 1px solid var(--line); }
  .contact-grid, .foot-grid, .bento, .about-band { grid-template-columns: 1fr; }
  .mega-grid { grid-template-columns: 1fr 1fr; }
  .mast-inner { flex-wrap: wrap; }
  .mast .search {
    order: 3;
    flex: 1 1 100%;
    width: auto;
    max-width: none;
  }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ocean);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    z-index: 55;
    margin-left: 0;
  }
  .nav.open { display: flex; }
  .nav > a, .mega > button { color: #e8f1f6; }
  .mega-panel { position: static; display: none; border: 0; }
  .mega.open .mega-panel { display: block; }
  .fields { grid-template-columns: 1fr; }
  .hero-copy { min-height: 0; }
}

@media (max-width: 640px) {
  .mast-inner { padding: 8px 12px; }
  .post-list { grid-template-columns: 1fr; }
  .index-list a { grid-template-columns: auto 1fr; }
  .index-list small { grid-column: 2; }
  h1 { font-size: 1.85rem; }
  .dock { right: 8px; bottom: 8px; }
  .dock button { width: 36px; height: 36px; }
  .prose { padding: 14px; }
  .brand-name { font-size: 1.02rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .mast, .dock, .site-footer, .search, .toc, .progress { display: none !important; }
  body { background: white; }
  .result { color: black; background: white; border: 1px solid #222; }
  a { text-decoration: underline; }
}

/* —— Compact Omni-style worksheet —— */
.calc-page .compact-hero { margin-bottom: 6px; }
.calc-page .compact-hero h1 { font-size: clamp(1.45rem, 2.5vw, 1.95rem); margin-bottom: 4px; }
.calc-page .compact-hero .deck { font-size: 0.95rem; margin-bottom: 2px; max-width: 70ch; }
.calc-page .byline { margin: 0 0 4px; font-size: 0.8rem; }
.calc-page .crumbs { margin: 4px 0 2px; }
.compact-caution { margin: 0 0 8px; padding: 7px 10px; font-size: 0.86rem; }
.calc-page .read { margin-top: 8px; gap: 14px; }
.calc-page .prose { padding: 14px 16px; font-size: 1.02rem; }
.calc-page .prose p { margin: 0 0 0.75em; }
.calc-page .faqs { margin-top: 14px; }

.bench-omni {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  margin: 0 0 14px;
  padding: 0;
  background: var(--panel);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  box-shadow: 6px 6px 0 rgba(2, 48, 71, 0.08);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
.bench-form {
  padding: 12px 14px 14px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.bench-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.bench-head h2 { margin: 0; font-size: 1.05rem; }
.bench-head .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.28);
}
.live-tag {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ocean);
  background: rgba(255, 183, 3, 0.35);
  padding: 3px 8px;
  border-radius: 999px;
}
.bench-out {
  background:
    linear-gradient(180deg, rgba(255, 183, 3, 0.1), transparent 35%),
    var(--ocean);
  padding: 14px;
  min-height: 140px;
  min-width: 0;
  overflow: auto;
  max-height: none;
}
.bench-out .result-panel,
.bench-out .result {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  min-height: 0;
  box-shadow: none;
  color: #f4f8fb;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.result-idle {
  margin: 0;
  color: rgba(244, 248, 251, 0.8);
  font-size: 0.95rem;
}
.bench-out h2 {
  color: var(--signal);
  margin: 0 0 10px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bench-out .figures {
  margin-bottom: 8px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.bench-out .figures strong {
  color: var(--signal);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  overflow-wrap: anywhere;
}
.bench-out .figures .fig-text {
  margin: 0 0 4px;
  color: var(--signal);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.35;
}
.bench-out .figures span { color: rgba(244, 248, 251, 0.75); }
.bench-out .steps { color: rgba(244, 248, 251, 0.9); font-size: 0.88rem; padding-left: 16px; }
.bench-out .steps li { margin: 4px 0; }
.bench-out .warn {
  background: rgba(255, 183, 3, 0.15);
  color: #fff;
  border-left-color: var(--signal);
}
.bench-out .error { background: rgba(253, 232, 230, 0.95); }
.bench .fields {
  gap: 8px;
}
.bench .field span, .bench .flab {
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.25;
}
.bench .hint { display: block; font-size: 0.78rem; margin-top: 1px; }
.bench input, .bench select, .bench textarea {
  padding: 7px 9px;
  font-size: 0.95rem;
}
.bench textarea { min-height: 72px; }
.bench .actions { margin-top: 10px; gap: 6px; }
.bench .actions button { padding: 8px 12px; font-size: 0.9rem; }

.layout-data .fields { grid-template-columns: 1fr; }
.layout-data .field.is-num,
.layout-data .field.is-select { grid-column: auto; }
.layout-tight .fields { grid-template-columns: 1fr 1fr; }
.layout-dense .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout-dense .field.wide { grid-column: 1 / -1; }
.layout-money .fields,
.layout-health .fields,
.layout-home .fields,
.layout-school .fields { grid-template-columns: 1fr 1fr; }
.layout-game .fields { grid-template-columns: 1fr; }

.related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 12px;
}
.chips-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-right: 4px;
}
.chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 650;
}
.chip:hover { border-color: var(--ocean); color: var(--ocean); }

.content-cards {
  display: grid;
  gap: 10px;
  margin: 8px 0 18px;
}
.content-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  align-items: start;
}
.content-card h2, .content-card h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
}
.content-card p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.card-ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(2, 48, 71, 0.08);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ember);
  flex: none;
}
.home-sec { margin-top: 18px; }
.prose-sections h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  margin-top: 1.2em;
}
.prose-sections h2:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.prose-sections h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.25);
  flex: none;
}

.mast { overflow: visible; }
.mega.open { z-index: 58; }
.bento a, .tool-link, .post-list a {
  padding: 12px;
}
.bento { gap: 10px; }

@media (max-width: 900px) {
  .bench-omni { grid-template-columns: 1fr; max-width: none; }
  .bench-form { border-right: 0; border-bottom: 1px solid var(--line); }
  .layout-dense .fields { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .dock button { width: 30px; height: 30px; }
  .layout-tight .fields,
  .layout-money .fields,
  .layout-health .fields,
  .layout-home .fields,
  .layout-school .fields,
  .layout-dense .fields { grid-template-columns: 1fr; }
  .content-card { grid-template-columns: 1fr; gap: 8px; }
}
