/* Bali Off Script
   Visual language borrowed from the artefact people actually have to read:
   the Indonesian land certificate. Ink on warm paper, hairline rules,
   monospaced reference numbers, and a sealing-wax endorsement stamp. */

:root {
  --ink: #14181f;
  --paper: #faf8f4;
  --paper-2: #f2eee6;
  --slate: #4a5462;
  --seal: #9e2b20;
  --verify: #1d5c43;
  --rule: #ded9ce;
  --rule-2: #c9c2b3;

  --display: "Fraunces", Georgia, serif;
  --body: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 74rem;
  --measure: 40rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  letter-spacing: -0.003em;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }

a { color: inherit; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }

code { font-family: var(--mono); font-size: 0.875em; background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 2px; }

/* ---------------------------------------------------------- masthead */

.masthead { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 40; }

.masthead-inner { display: flex; align-items: center; gap: 2rem; min-height: 4.25rem; flex-wrap: wrap; }

.wordmark {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--seal); }

.nav { margin-left: auto; }
/* Spacing lives on the inner wrapper, which is what actually contains the
   links — putting it on .nav leaves them jammed together. */
.nav-inner { display: flex; gap: 1.35rem; flex-wrap: wrap; align-items: center; }

.nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--slate);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule-2); }
.nav a.on { color: var(--ink); border-bottom-color: var(--seal); }
.nav-search { font-family: var(--mono); }

.menu-btn {
  display: none;
  margin-left: auto;
  appearance: none;
  -webkit-appearance: none;
  background: var(--paper);
  /* Without an explicit colour iOS renders button text in system blue. */
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 0.85rem;
  min-height: 2.5rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

/* ---------------------------------------------------------- hero */

.hero { padding-block: 5rem 3.5rem; }

.hero-h {
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  margin: 0 0 1.25rem;
  max-width: 20ch;
}
.hero-h span { color: var(--seal); font-style: italic; }

.hero-sub {
  max-width: var(--measure);
  font-size: 1.125rem;
  color: var(--slate);
  margin: 0 0 2.25rem;
}

.hero-search { display: flex; max-width: 34rem; border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; }
.hero-search input { flex: 1; border: 0; padding: 0.9rem 1rem; font: 400 1rem var(--body); background: #fff; }
.hero-search input:focus { outline: 2px solid var(--seal); outline-offset: -2px; }
.hero-search button {
  border: 0; background: var(--ink); color: var(--paper);
  font: 500 0.875rem var(--body); letter-spacing: 0.04em;
  padding-inline: 1.4rem; cursor: pointer;
}
.hero-search button:hover { background: var(--seal); }

/* ---------------------------------------------------------- ledger */

.ledger-wrap { padding-bottom: 4rem; }
.ledger { border-top: 1px solid var(--rule); }

.ledger-row {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.ledger-row:hover .ledger-name { color: var(--seal); }
.ledger-name { font-family: var(--display); font-size: 1.35rem; font-weight: 600; }
.ledger-rule { flex: 1; border-bottom: 1px dotted var(--rule-2); transform: translateY(-0.25rem); }
.ledger-n { font-family: var(--mono); font-size: 0.875rem; color: var(--slate); }

/* ---------------------------------------------------------- sections */

.section, .article { padding-block: 3.5rem 5rem; }

.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--slate); margin: 0 0 1rem;
}
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { color: var(--seal); }

.section h1, .article h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0 0 1rem; max-width: 24ch; }

.standfirst { font-size: 1.1875rem; color: var(--slate); max-width: var(--measure); margin: 0 0 2.5rem; }

.sec-h { font-size: 1.5rem; margin: 0 0 1.5rem; padding-top: 2rem; border-top: 1px solid var(--rule); }

/* ---------------------------------------------------------- cards */

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 48rem) { .cards { grid-template-columns: 1fr 1fr; } }

.card a { display: block; background: var(--paper); height: 100%; padding: 1.5rem; text-decoration: none; }
.card a:hover { background: #fff; }
.card h3 { font-size: 1.1875rem; margin: 0 0 0.5rem; }
.card a:hover h3 { color: var(--seal); }
.card p { margin: 0; font-size: 0.9375rem; color: var(--slate); }

/* ---------------------------------------------------------- the stamp */

.stamp {
  max-width: var(--measure);
  border: 1px solid var(--rule-2);
  border-left: 3px solid var(--slate);
  background: var(--paper-2);
  padding: 1.1rem 1.25rem 1rem;
  margin: 0 0 2.5rem;
}
.stamp-critical { border-left-color: var(--seal); }
.stamp-high { border-left-color: #b5651d; }
.stamp-medium { border-left-color: #7a6a3f; }
.stamp-info { border-left-color: var(--verify); }

.stamp-flag {
  display: inline-block;
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--slate);
  margin-bottom: 0.75rem;
}
.stamp-critical .stamp-flag { color: var(--seal); }

.stamp dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0; font-size: 0.8125rem; }
.stamp dt { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); padding-top: 0.15rem; }
.stamp dd { margin: 0; }
.stamp code { background: transparent; padding: 0; font-size: 0.8125rem; }

/* ---------------------------------------------------------- prose */

.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.5rem; margin: 2.75rem 0 0.85rem; }
.prose h3 { font-size: 1.1875rem; margin: 2rem 0 0.6rem; }
.prose p { margin: 0 0 1.15rem; }
.prose ul { margin: 0 0 1.3rem; padding-left: 1.1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a { color: var(--seal); text-underline-offset: 2px; }

.callout {
  border-left: 2px solid var(--seal);
  padding: 0.15rem 0 0.15rem 1.1rem;
  font-family: var(--display);
  font-size: 1.125rem;
  color: var(--ink);
}

.table-wrap { overflow-x: auto; margin: 0 0 1.6rem; border: 1px solid var(--rule); }
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
th, td { text-align: left; padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; background: var(--paper-2); font-weight: 500; }
tbody tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------- reel + cta */

.reel { max-width: var(--measure); margin: 3rem 0 0; padding-top: 2rem; border-top: 1px solid var(--rule); }
.reel-h { font-size: 1.25rem; margin: 0 0 1rem; }
.reel .instagram-media { margin: 0 !important; }

.cta {
  max-width: var(--measure);
  margin: 3rem 0 0;
  background: var(--ink);
  color: var(--paper);
  padding: 2rem;
}
.cta-k { font-family: var(--display); font-size: 1.375rem; margin: 0 0 0.6rem; }
.cta-b { margin: 0 0 0.9rem; color: #b9c0ca; font-size: 0.9375rem; }

/* Byline: portrait sits left of the pitch, hairline ring echoing the stamp. */
.cta-id { display: flex; gap: 1.25rem; align-items: flex-start; margin-bottom: 1.5rem; }
.cta-said { flex: 1; min-width: 0; }
.cta-photo {
  flex: none; width: 76px; height: 76px; border-radius: 50%;
  object-fit: cover; object-position: center top;
  border: 1px solid rgba(250, 248, 244, 0.28);
}
.cta-by {
  margin: 0; font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: #8b94a1;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--seal); color: #fff;
  text-decoration: none; padding: 0.7rem 1.3rem;
  font-size: 0.875rem; font-weight: 500; letter-spacing: 0.02em;
}
.btn:hover { background: #fff; color: var(--ink); }
.ig { width: 1.05em; height: 1.05em; flex: none; }
.ig-sm { width: 0.95em; height: 0.95em; }
.ig-link { display: inline-flex; align-items: center; gap: 0.4rem; }

@media (max-width: 30rem) {
  .cta-id { gap: 1rem; }
  .cta-photo { width: 60px; height: 60px; }
}

.related { max-width: var(--measure); margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.related h2 { font-size: 1.125rem; margin: 0 0 0.85rem; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { border-bottom: 1px solid var(--rule); }
.related a { display: block; padding: 0.7rem 0; text-decoration: none; font-size: 0.9375rem; }
.related a:hover { color: var(--seal); }

/* ------------------------------------------------- home: proof / warn / who */

.btn-lg { padding: 0.85rem 1.6rem; font-size: 0.9375rem; }

/* Entrance animation. Headline lines stagger in; everything is opt-out for
   anyone who has asked the OS to reduce motion. */
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.hero-h { animation: riseIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-h span { display: inline-block; animation: riseIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both; }
.hero-sub { animation: riseIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both; }
.hero-search { animation: riseIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both; }
.hero-jump { animation: fadeIn 0.6s ease 0.42s both; }

/* Sections lift in as they are scrolled to. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-h, .hero-h span, .hero-sub, .hero-search, .hero-jump { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .nav, .nav a { transition: none; }
}

/* Jump button — on a phone the calculator is otherwise a long scroll away. */
.hero-jump {
  display: none; align-items: center; gap: 0.5rem; margin-top: 1rem;
  text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  background: var(--seal); color: #fff; padding: 0.8rem 1.2rem;
}
.hero-jump:hover { background: var(--ink); }
.hero-jump b { font-family: var(--mono); font-weight: 500; }

.tool-wrap { padding-block: 1.5rem 0; border-top: 2px solid var(--ink); margin-top: 2rem; scroll-margin-top: 1rem; }
.tool-head { max-width: 46rem; padding-top: 1rem; }
.tool-h { font-family: var(--display); font-size: 1.75rem; line-height: 1.15; margin: 0 0 0.6rem; }
.tool-b { font-size: 0.9375rem; color: var(--slate); margin: 0 0 1.5rem; }

.proof-wrap { padding-block: 1rem 0; }
.proof {
  display: grid; grid-template-columns: 1fr 22rem; gap: 2.5rem;
  align-items: center; background: var(--ink); color: var(--paper); padding: 2.25rem;
}
.proof-k {
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #8b94a1; margin: 0 0 0.5rem;
}
.proof-h { font-family: var(--display); font-size: 1.875rem; line-height: 1.15; margin: 0 0 0.75rem; }
.proof-b { color: #b9c0ca; font-size: 0.9375rem; margin: 0 0 1.5rem; max-width: 34rem; }
.proof-fig { border-left: 1px solid rgba(250,248,244,0.18); padding-left: 1.75rem; }
.proof-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.6rem 0; border-bottom: 1px solid rgba(250,248,244,0.12);
}
.proof-row span { font-size: 0.8125rem; color: #b9c0ca; }
.proof-row b { font-family: var(--mono); font-size: 1.0625rem; }
.proof-bad b { color: #e8837a; }
.proof-note { font-size: 0.75rem; color: #8b94a1; margin: 0.85rem 0 0; line-height: 1.5; }

.warn-wrap { padding-block: 2.5rem 0; }
.warn-block { border-left: 3px solid var(--seal); background: var(--paper-2); padding: 1.5rem 1.75rem; }
.warn-flag {
  display: inline-block; font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--seal); margin-bottom: 0.6rem;
}
.warn-block h2 { font-size: 1.375rem; line-height: 1.25; margin: 0 0 0.75rem; max-width: 44rem; }
.warn-block p { font-size: 0.9375rem; margin: 0 0 0.6rem; max-width: 48rem; color: var(--slate); }
.warn-block p:last-child { margin-bottom: 0; }

.who-wrap { padding-block: 3rem 0; }
.who { display: flex; gap: 2rem; align-items: flex-start; border-top: 2px solid var(--ink); padding-top: 1.75rem; }
.who-photo {
  flex: none; width: 132px; height: 132px; border-radius: 50%;
  object-fit: cover; object-position: center top; border: 1px solid var(--rule-2);
}
.who-h { font-size: 1.5rem; margin: 0 0 0.6rem; }
.who-b { font-size: 0.9375rem; margin: 0 0 0.75rem; max-width: 44rem; color: var(--slate); }
.who-ig { font-size: 0.875rem; text-decoration: none; }

@media (max-width: 52rem) {
  .proof { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; }
  .proof-fig { border-left: 0; border-top: 1px solid rgba(250,248,244,0.18); padding-left: 0; padding-top: 1.25rem; }
  .proof-h { font-size: 1.5rem; }
  .who { flex-direction: column; gap: 1.25rem; }
  .who-photo { width: 104px; height: 104px; }
}

/* -------------------------------------------------------- check page */

.chk { max-width: var(--measure); margin-top: 2rem; border-top: 2px solid var(--ink); padding-top: 1rem; }
.chk h2 { font-size: 1.125rem; margin: 0 0 0.75rem; }
.chk-list { list-style: none; margin: 0; padding: 0; }
.chk-list li {
  position: relative; padding: 0.55rem 0 0.55rem 1.65rem;
  border-bottom: 1px solid var(--rule); font-size: 0.9375rem;
}
.chk-list li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem;
  width: 0.6rem; height: 0.6rem; border: 1px solid var(--rule-2); background: #fff;
}

/* ---------------------------------------------------------- calculator */

.calc-page { padding-bottom: 3rem; }
.calc-wrap {
  display: grid; grid-template-columns: 1fr 20rem; gap: 2.5rem;
  align-items: start; margin-top: 2rem;
}
.calc-form { display: grid; gap: 1.5rem; min-width: 0; }
.fs { border: 0; border-top: 2px solid var(--ink); padding: 0.9rem 0 0; margin: 0; }
.fs legend {
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0 0.5rem 0 0;
}
.f { display: grid; gap: 0.25rem; margin-bottom: 0.85rem; }
.f-l { font-size: 0.875rem; font-weight: 500; }
.f-h {
  font-size: 0.8125rem; color: var(--slate); line-height: 1.5;
  border-left: 2px solid var(--rule-2); padding: 0.35rem 0 0.35rem 0.7rem;
  margin-top: 0.15rem;
}
.f-choice { gap: 0.4rem; }

/* Info toggle — a quiet marker, not a UI element competing for attention. */
.info {
  appearance: none; border: 1px solid var(--rule-2); background: transparent;
  color: var(--slate); font-family: var(--mono); font-size: 0.625rem;
  width: 1.05rem; height: 1.05rem; border-radius: 50%; line-height: 1;
  cursor: pointer; margin-left: 0.4rem; padding: 0; vertical-align: middle;
}
.info:hover, .info[aria-expanded="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.info:focus-visible { outline: 2px solid var(--seal); outline-offset: 1px; }
.f input {
  font: inherit; font-family: var(--mono); font-size: 0.9375rem;
  padding: 0.5rem 0.6rem; border: 1px solid var(--rule-2);
  background: #fff; color: var(--ink); width: 100%;
}
.f input:focus { outline: 2px solid var(--seal); outline-offset: -1px; }
/* Segmented control — real radios, styled as a set of hairline tabs. */
.segs { display: flex; flex-wrap: wrap; gap: -1px; border: 1px solid var(--rule-2); background: #fff; }
.seg { flex: 1 1 auto; min-width: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; padding: 0.55rem 0.7rem;
  font-size: 0.8125rem; cursor: pointer; white-space: nowrap;
  border-right: 1px solid var(--rule-2); color: var(--slate);
  transition: background 0.12s, color 0.12s;
}
.seg:last-child span { border-right: 0; }
.seg span:hover { background: var(--paper-2); color: var(--ink); }
.seg input:checked + span { background: var(--ink); color: var(--paper); font-weight: 500; }
.seg input:focus-visible + span { outline: 2px solid var(--seal); outline-offset: -2px; }

@media (max-width: 30rem) {
  .seg span { white-space: normal; font-size: 0.75rem; padding: 0.5rem 0.4rem; }
}

/* Result panel — styled as the endorsement stamp, not a dashboard. */
.calc-out {
  position: sticky; top: 1.5rem;
  background: var(--paper-2); border: 1px solid var(--rule-2); padding: 1.25rem;
}
.calc-h {
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.12em;
  text-transform: uppercase; margin: 0 0 0.9rem; color: var(--slate);
}
.calc-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--rule);
}
.calc-k { font-size: 0.8125rem; }
.calc-k em { display: block; font-style: normal; font-size: 0.6875rem; color: var(--slate); }
.calc-v {
  font-family: var(--mono); font-size: 0.875rem; font-weight: 500;
  text-align: right; overflow-wrap: anywhere;
}
.calc-v.ok { color: var(--verify); }
.calc-v.mid { color: #8a6d1f; }
.calc-v.bad { color: var(--seal); }
.calc-sep {
  font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--slate);
  margin: 1rem 0 0.25rem; padding-top: 0.6rem; border-top: 2px solid var(--ink);
}
.calc-warn { margin-top: 1rem; font-size: 0.8125rem; line-height: 1.5; }
.calc-warn ul { margin: 0; padding-left: 1rem; }
.calc-warn li { margin-bottom: 0.5rem; color: var(--slate); }
.calc-notes { margin-top: 3rem; }

/* ------------------------------------------------------------ charts */

.charts { margin-top: 3rem; display: grid; gap: 2.5rem; }
.chart { margin: 0; border-top: 2px solid var(--ink); padding-top: 1rem; }
.chart figcaption { margin-bottom: 0.9rem; }
.chart figcaption h2 { font-size: 1.125rem; margin: 0 0 0.35rem; }
.chart figcaption p { font-size: 0.875rem; color: var(--slate); margin: 0; max-width: 46rem; }
.cx { width: 100%; height: auto; display: block; overflow: visible; }
.cx-t { font-family: var(--mono); font-size: 9px; fill: var(--slate); letter-spacing: 0.02em; }
.cx-t-b { font-family: var(--mono); font-size: 10px; fill: var(--ink); font-weight: 500; }
.cx-end { text-anchor: end; }
.cx-mid { text-anchor: middle; }
.cx-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cx-area { fill: url(#gInk); }
.cx-line-warn { stroke: var(--seal); }
.cx-area-warn { fill: url(#gSeal); }
.cx-line-pos { stroke: var(--verify); }
.cx-zero { stroke: var(--ink); stroke-width: 1; opacity: 0.35; }
.cx-grid { stroke: var(--rule); stroke-width: 1; }
.cx-mark { stroke: var(--verify); stroke-width: 1.25; stroke-dasharray: 3 3; }
.cx-res { stroke: var(--verify); stroke-width: 2; stroke-dasharray: 2 2; }
.cx-dot-ok { fill: var(--verify); stroke: var(--paper); stroke-width: 1.5; }
.cx-dot-bad { fill: var(--seal); stroke: var(--paper); stroke-width: 1.5; }
.cx-badge { fill: var(--ink); }
.cx-badge-t { font-family: var(--mono); font-size: 9px; fill: var(--paper); }
.cx-seg { shape-rendering: crispEdges; }
.cx-seg.s1 { fill: #b9563f; } .cx-seg.s2 { fill: #c98a3c; }
.cx-seg.s3 { fill: #8a7f6d; } .cx-seg.s4 { fill: #6b7280; }
.cx-seg.s5 { fill: #a6a08e; } .cx-seg.s6 { fill: #4a5462; }
.cx-seg.s7 { fill: var(--verify); }

@media (max-width: 54rem) {
  .calc-wrap { grid-template-columns: 1fr; }
  .calc-out { position: static; }
}

/* ---------------------------------------------------------- search page */

.page-search { margin-bottom: 1.25rem; }
.page-search input {
  width: 100%; max-width: 34rem; padding: 0.9rem 1rem;
  border: 1px solid var(--ink); border-radius: 2px;
  font: 400 1rem var(--body); background: #fff;
}
.hits { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); margin: 0 0 1.25rem; }

/* ---------------------------------------------------------- footer */

.foot { border-top: 1px solid var(--rule); margin-top: 4rem; padding-top: 2.5rem; }
.foot-inner { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: space-between; padding-bottom: 2rem; }
.foot-mark { font-family: var(--display); font-size: 1.25rem; font-weight: 600; margin: 0 0 0.25rem; }
.foot-note { margin: 0; color: var(--slate); font-size: 0.9375rem; }
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; }
.foot-links a { font-size: 0.875rem; color: var(--slate); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.foot-links a:hover { color: var(--seal); }
/* Keep the rule under the handle only, not under the glyph. */
.foot-links .ig-link { border-bottom: none; }
.foot-links .ig-link span { border-bottom: 1px solid var(--rule-2); }
.foot-legal { border-top: 1px solid var(--rule); padding-block: 1.5rem 3rem; }
.foot-legal p { max-width: 52rem; margin: 0; font-size: 0.8125rem; line-height: 1.6; color: var(--slate); }

/* ---------------------------------------------------------- responsive */

@media (max-width: 46rem) {
  /* On a phone the calculator is the point of the page — shrink the hero,
     demote the search box, and put a jump button above the fold. */
  .hero { padding-block: 1.5rem 1.25rem; }
  .hero-h { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .hero-jump { display: inline-flex; }
  .hero-search { display: none; }
  .tool-wrap { margin-top: 1.25rem; }
  .tool-h { font-size: 1.375rem; }

  .menu-btn { display: block; }
  /* max-height rather than grid 0fr: WKWebView (Instagram's in-app browser)
     does not reliably collapse a 0fr row, which left the menu always open. */
  .nav {
    display: block; width: 100%; margin-left: 0;
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height 0.3s ease, visibility 0s linear 0.3s;
  }
  .nav.open { max-height: 32rem; visibility: visible; transition: max-height 0.3s ease, visibility 0s; }
  .nav-inner { display: flex; flex-direction: column; gap: 0; padding-bottom: 0.5rem; }
  .nav a {
    border-bottom: 1px solid var(--rule); padding-block: 0.8rem;
    opacity: 0; transform: translateY(-4px);
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  .nav.open a { opacity: 1; transform: none; }
  .nav.open a:nth-child(1) { transition-delay: 0.03s; }
  .nav.open a:nth-child(2) { transition-delay: 0.06s; }
  .nav.open a:nth-child(3) { transition-delay: 0.09s; }
  .nav.open a:nth-child(4) { transition-delay: 0.12s; }
  .nav.open a:nth-child(5) { transition-delay: 0.15s; }
  .nav.open a:nth-child(6) { transition-delay: 0.18s; }
  .nav.open a:nth-child(7) { transition-delay: 0.21s; }
  .nav.open a:nth-child(8) { transition-delay: 0.24s; }
  .nav.open a:nth-child(9) { transition-delay: 0.27s; }
  .menu-btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .hero { padding-block: 3rem 2.5rem; }
  .cta { padding: 1.5rem; }
}

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

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
