/* Sheetcrumb — sheetcrumb.com
   Colors from the brand mark: teal #0F4C5C, ink #0A3440, accent #F2A541. */

@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #0f4c5c;
  --teal-dark: #0a3440;
  --teal-mid: #186578;
  --teal-soft: #d7e6ea;
  --teal-tint: #eef5f6;
  --orange: #f2a541;
  --orange-deep: #c67e1c;
  --cream: #f7f4ee;
  --paper: #fffcf7;
  --ink: #1a2a30;
  --muted: #5a6e74;
  --line: #d5dee1;
  --yellow: #fff3c4;
  --green: #e4f3ea;
  --green-ink: #1b5e3b;
  --danger: #9b2c2c;
  --danger-bg: #fdecec;
  --shadow: 0 12px 40px rgba(10, 52, 64, 0.12);
  --radius: 16px;
  --header-h: 4.25rem;
  --max: 72rem;
  --measure: 42rem;
  --font-display: "Outfit", "Helvetica Neue", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--teal-mid); text-underline-offset: 0.18em; }
a:hover { color: var(--teal-dark); }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--orange);
  color: var(--teal-dark);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  z-index: 100;
}
.skip:focus { top: 0.75rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner, .footer-inner, .wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--teal);
  flex-shrink: 0;
}
.brand img, .brand svg { width: 2.25rem; height: 2.25rem; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--teal);
  border-radius: 1px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.nav-toggle:checked + .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked + .nav-burger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked + .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.25rem;
}
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; color: var(--teal); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}
.btn-primary {
  background: var(--orange);
  color: var(--teal-dark);
  border-color: var(--orange);
}
.btn-primary:hover { background: #e89828; color: var(--teal-dark); }
.btn-dark {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn-dark:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.45);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-ghost-ink {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
}
.btn-ghost-ink:hover { background: var(--teal-tint); color: var(--teal-dark); }
.btn-lg { padding: 0.9rem 1.4rem; font-size: 1.05rem; }

.hero-actions, .cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Hero */
.hero {
  background:
    linear-gradient(180deg, rgba(10,52,64,0.12) 0%, rgba(10,52,64,0) 40%),
    var(--teal-dark);
  background-image:
    linear-gradient(180deg, rgba(10,52,64,0.15), rgba(10,52,64,0.35)),
    linear-gradient(rgba(15,76,92,0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,76,92,0.55) 1px, transparent 1px);
  background-size: auto, auto, 36px 36px, 36px 36px;
  background-color: var(--teal-dark);
  color: #fff;
  padding: 4.5rem 0 5rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.035em;
  font-size: clamp(2.15rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  max-width: 14em;
  color: #fff;
}
.hero .lede {
  font-size: 1.25rem;
  max-width: 38rem;
  color: #d7e6ea;
  margin: 0 0 1.75rem;
}
.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 0.85rem;
}
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}
.pill {
  border: 1px solid rgba(242,165,65,0.55);
  color: var(--orange);
  background: rgba(242,165,65,0.08);
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 650;
  font-family: var(--font-display);
}

/* Sections */
.section { padding: 4.25rem 0; }
.section-tight { padding: 3rem 0; }
.section h2, .page-hero h1, .post h1 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--teal-dark);
  margin: 0 0 0.85rem;
}
.section h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.section .intro, .lede-ink {
  color: var(--muted);
  max-width: 40rem;
  margin: 0 0 2rem;
}

.page-hero {
  padding: 3rem 0 1.5rem;
}
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 20ch; }
.breadcrumb {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.breadcrumb a { color: var(--teal); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Feature grid */
.grid-3, .grid-2, .cards {
  display: grid;
  gap: 1.15rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.5rem;
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: var(--teal-dark);
}
.card p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.card-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: var(--teal-tint);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

/* Band / CTA */
.band {
  background: var(--teal);
  color: #fff;
  padding: 3.5rem 0;
}
.band h2 { color: #fff; }
.band p { color: #d7e6ea; max-width: 38rem; }
.band a:not(.btn) { color: var(--orange); }

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.price-chip {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--teal-dark);
  letter-spacing: -0.03em;
  margin: 0;
}
.price-chip small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

/* FAQ */
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin: 0 0 0.65rem;
}
.faq summary {
  font-family: var(--font-display);
  font-weight: 650;
  cursor: pointer;
  color: var(--teal-dark);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--teal-mid);
  font-weight: 600;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0.7rem 0 0.25rem; color: var(--muted); }

/* Calculator */
.calc-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: start;
}
.calc-panel, .results-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.4rem 1.4rem 1.6rem;
}
.results-panel { position: sticky; top: calc(var(--header-h) + 1rem); }
.panel-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.05rem;
  margin: 0 0 1rem;
  color: var(--teal-dark);
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--teal);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
  margin-bottom: 0.25rem;
}
.field { margin-bottom: 0.85rem; }
.field label, .field .label {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--teal-dark);
  margin-bottom: 0.28rem;
}
.hint {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.22rem;
  line-height: 1.4;
}
.field input[type="number"],
.field input[type="text"],
.field select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e3c96a;
  border-radius: 8px;
  background: var(--yellow);
  appearance: auto;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  text-align: center;
  padding: 0.6rem 0.5rem;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--cream);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--teal);
}
.seg input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }
.seg input:checked + label {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.result-price {
  background: var(--yellow);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
}
.result-price .label { font-size: 0.85rem; font-weight: 650; color: var(--teal); margin: 0 0 0.15rem; }
.result-price .value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  letter-spacing: -0.03em;
  color: var(--teal-dark);
  line-height: 1.1;
}
.metrics { display: grid; gap: 0.35rem; }
.metric {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}
.metric span:first-child { color: var(--muted); }
.metric strong { font-variant-numeric: tabular-nums; color: var(--ink); }
.metric.total { border-bottom: none; font-weight: 650; }
.alert {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  font-size: 0.95rem;
}
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-ok { background: var(--green); color: var(--green-ink); }
.formula-box {
  background: var(--teal-tint);
  border-left: 4px solid var(--teal);
  padding: 0.9rem 1rem;
  border-radius: 0 10px 10px 0;
  margin: 1.25rem 0;
  font-size: 1.02rem;
}
.formula-box code, .post code {
  font-family: ui-monospace, "IBM Plex Mono", Menlo, monospace;
  font-size: 0.92em;
}

/* Blog */
.post-list { display: grid; gap: 1.15rem; }
.post-teaser {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.post-teaser:hover { border-color: var(--teal-mid); }
.post-teaser h2 { font-size: 1.35rem; margin: 0 0 0.4rem; }
.post-teaser p { margin: 0; color: var(--muted); }
.post-meta { font-size: 0.88rem; color: var(--muted); margin: 0 0 0.5rem; }

.article-wrap { width: min(var(--measure), calc(100% - 2rem)); margin-inline: auto; padding: 2.5rem 0 4rem; }
.post h1 { font-size: clamp(1.85rem, 4vw, 2.6rem); margin-bottom: 0.6rem; }
.post h2 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--teal-dark);
  font-size: 1.45rem;
  margin: 2.2rem 0 0.7rem;
}
.post h3 {
  font-family: var(--font-display);
  font-weight: 650;
  color: var(--teal-dark);
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}
.post p, .post li { color: var(--ink); }
.post ul, .post ol { padding-left: 1.25rem; }
.post li { margin: 0.3rem 0; }
.post .disclosure, .disclaimer {
  font-size: 0.95rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding-top: 1rem;
}
.example {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 1.2rem 0;
}
.example .example-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-deep);
  margin: 0 0 0.4rem;
}
.cta-box {
  background: var(--teal-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  margin: 2rem 0;
}
.cta-box h2, .cta-box h3 { color: #fff; margin-top: 0; }
.cta-box p { color: #d7e6ea; }

/* Footer */
.site-footer {
  background: var(--teal-dark);
  color: #c5d6db;
  padding: 3rem 0 1.75rem;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2rem;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--orange); }
.site-footer h2 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 0.7rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.3rem 0; }
.footer-brand { display: flex; align-items: center; gap: 0.65rem; color: #fff; text-decoration: none; margin-bottom: 0.7rem; }
.footer-brand span {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: #fff;
}
.legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.88rem;
  color: #9bb0b6;
}

/* Prose pages */
.prose { width: min(var(--measure), calc(100% - 2rem)); margin: 0 auto; padding: 2.5rem 0 4rem; }
.prose h1 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--teal-dark);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}
.prose h2 {
  font-family: var(--font-display);
  font-weight: 650;
  color: var(--teal-dark);
  font-size: 1.35rem;
  margin: 2rem 0 0.6rem;
}

.note {
  background: var(--teal-tint);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  color: var(--teal-dark);
  margin: 1rem 0 0;
  font-size: 1.02rem;
}

/* 404 */
.page-404 { text-align: center; padding: 5rem 1rem 6rem; }
.page-404 h1 { font-size: 2.4rem; }

@media (max-width: 900px) {
  .grid-3, .split, .calc-layout, .footer-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .results-panel { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 3.25rem 0 3.5rem; }
}

@media (max-width: 720px) {
  body { font-size: 1.05rem; }
  .nav-burger { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    gap: 0.15rem;
  }
  .nav a { padding: 0.55rem 0.25rem; }
  .nav .btn { margin-top: 0.4rem; width: 100%; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .header-inner { width: min(var(--max), calc(100% - 1.25rem)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

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