/* Kettle Lane Studio. One stylesheet, no JavaScript.
   Type: Newsreader (self-hosted, OFL) for the editorial voice, system sans for the working voice. */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f3efe6;
  --paper-deep: #e9e3d6;
  --ink: #1a1f1c;
  --ink-soft: #4a524d;
  --ink-mute: #767e78;
  --rule: #cfc8b9;
  --green: #1f5b43;
  --green-deep: #15402f;
  --brass: #9a6f1f;
  --card: #fbf9f4;
  --focus: #1f5b43;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 64ch;
  --gutter: clamp(16px, 4vw, 48px);
  --wide: 1240px;

  --step--1: clamp(0.875rem, 0.84rem + 0.17vw, 0.975rem);
  --step-0: clamp(1.0625rem, 1.02rem + 0.22vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.35rem + 1.2vw, 2.25rem);
  --step-3: clamp(2.1rem, 1.6rem + 2.4vw, 3.5rem);
  --step-4: clamp(2.75rem, 1.8rem + 4.8vw, 5.75rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 100%;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-size: var(--step-0);
  background: var(--paper);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }
p + p { margin-top: 1em; }
ul, ol { margin: 0; padding-left: 1.2em; }
li + li { margin-top: 0.4em; }
strong { font-weight: 600; }
em { font-family: var(--serif); font-style: italic; font-size: 1.06em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }
small { font-size: var(--step--1); }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 10;
  text-decoration: none; font-size: 0.95rem;
}
.skip:focus { top: 12px; }

/* Masthead */
.masthead {
  border-bottom: 1px solid var(--rule);
}
.masthead-inner {
  max-width: var(--wide); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0.005em; min-height: 44px;
}
.wordmark svg { width: 26px; height: 26px; color: var(--green); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px 4px; flex-wrap: wrap; }
.nav a {
  display: inline-block; padding: 10px 10px; min-height: 44px; line-height: 24px;
  text-decoration: none; font-size: var(--step--1); color: var(--ink-soft); border-radius: 4px;
}
.nav a:hover { color: var(--ink); background: var(--paper-deep); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--green); border-radius: 4px 4px 0 0; }
@media (max-width: 640px) {
  .masthead-inner { padding-bottom: 0; }
  .nav { flex-basis: 100%; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
  .nav ul { flex-wrap: nowrap; padding: 0 calc(var(--gutter) - 10px); width: max-content; }
  .nav a { white-space: nowrap; }
}

main { flex: 1; }

.wrap { max-width: var(--wide); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin-top: 2.4em; margin-bottom: 0.5em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.8em; margin-bottom: 0.4em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin-bottom: 0.9em; }
.prose p + p { margin-top: 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--step--1); margin: 1em 0 1.4em; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 600; color: var(--ink-soft); }

.eyebrow { font-size: var(--step--1); color: var(--ink-mute); letter-spacing: 0.02em; }
.lede { font-family: var(--serif); font-size: var(--step-1); line-height: 1.35; color: var(--ink-soft); text-wrap: pretty; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--green); color: #fff; text-decoration: none; font-size: var(--step--1); font-weight: 600;
  border: 1px solid var(--green); transition: background 120ms ease, transform 80ms ease;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Home: editorial front ---------- */
.front { padding-block: clamp(40px, 7vw, 96px) clamp(32px, 5vw, 64px); }
.front-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 900px) {
  .front-grid { grid-template-columns: 7fr 5fr; gap: 64px; align-items: end; }
}
.front h1 { font-size: var(--step-4); line-height: 0.98; letter-spacing: -0.02em; max-width: 14ch; }
.front h1 em { font-size: 1em; color: var(--green); }
.front-aside { font-size: var(--step-0); color: var(--ink-soft); max-width: 40ch; }
.front-aside p + p { margin-top: 0.8em; }
.dateline { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; font-size: var(--step--1); color: var(--ink-mute); }
.dateline span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: middle; }

.ledger { border-top: 1px solid var(--ink); }
.ledger-row {
  display: grid; grid-template-columns: 1fr; gap: 14px 32px; padding: 28px 0; border-bottom: 1px solid var(--rule);
}
@media (min-width: 760px) {
  .ledger-row { grid-template-columns: 180px 1fr; }
}
@media (min-width: 1100px) {
  .ledger-row { grid-template-columns: 220px minmax(0, 1fr) 280px; }
}
.ledger-key { font-size: var(--step--1); color: var(--ink-mute); padding-top: 0.35em; }
.ledger-body h2, .ledger-body h3 { font-size: var(--step-2); margin-bottom: 0.4em; }
.ledger-body p { max-width: var(--measure); color: var(--ink-soft); }
.ledger-body p + p { margin-top: 0.7em; }
.ledger-note { font-size: var(--step--1); color: var(--ink-mute); max-width: 32ch; }
@media (max-width: 1099px) { .ledger-note { grid-column: 1 / -1; max-width: var(--measure); } }
.ledger-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

.status {
  display: inline-block; font-size: 0.8rem; line-height: 1; padding: 6px 9px; border: 1px solid var(--rule);
  border-radius: 4px; color: var(--ink-soft); background: var(--card); white-space: nowrap; vertical-align: middle;
}

/* Principles list: two columns on wide screens, numbered as a real sequence of commitments */
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px 40px; }
@media (min-width: 760px) { .principles { grid-template-columns: 1fr 1fr; } }
.principles li { margin: 0; padding-top: 14px; border-top: 1px solid var(--rule); }
.principles h3 { font-size: var(--step-1); margin-bottom: 6px; }
.principles p { color: var(--ink-soft); font-size: var(--step--1); }

/* ---------- App page: split persistent ---------- */
.split { display: grid; grid-template-columns: 1fr; gap: 36px; padding-block: clamp(32px, 6vw, 80px); }
.split-head, .split-body { min-width: 0; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); grid-template-rows: auto 1fr; column-gap: 72px; row-gap: 0; align-items: start; }
  .split-head { grid-column: 1; grid-row: 1; }
  .split-body { grid-column: 1; grid-row: 2; }
  .split-figure { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 24px; }
}
.split-head h1 { font-size: var(--step-3); max-width: 16ch; margin-bottom: 0.4em; }
.split-head .lede { max-width: 44ch; margin-bottom: 1.6em; }
.split-body section { max-width: var(--measure); }
.split-body section + section { margin-top: clamp(40px, 6vw, 72px); }
@media (min-width: 960px) { .split-body { padding-top: clamp(40px, 6vw, 72px); } }
.split-body section h2 { font-size: var(--step-2); margin-bottom: 0.45em; }
.split-body section p { color: var(--ink-soft); }
.split-body section p + p { margin-top: 0.8em; }
.split-body dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 1.2em 0 0; font-size: var(--step--1); }
.split-body dt { color: var(--ink-mute); }
.split-body dd { margin: 0; color: var(--ink-soft); }

/* The estimate card: an HTML illustration of the result layout, never a screenshot */
.figure { margin: 0; }
.estimate {
  background: var(--card); border: 1px solid var(--rule); border-radius: 18px; padding: 22px 22px 18px;
  box-shadow: 0 1px 0 rgba(26,31,28,0.04), 0 18px 40px -28px rgba(26,31,28,0.35);
  max-width: 440px;
}
.estimate-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.8rem; color: var(--ink-mute); }
.estimate-photo {
  margin: 16px 0; aspect-ratio: 4 / 3; border-radius: 10px; background:
    repeating-linear-gradient(135deg, rgba(26,31,28,0.045) 0 2px, transparent 2px 10px), var(--paper-deep);
  display: grid; place-items: center; color: var(--ink-mute); font-size: 0.85rem; text-align: center; padding: 16px;
}
.estimate-name { font-family: var(--serif); font-size: 1.45rem; line-height: 1.15; }
.estimate-attrs { font-size: 0.85rem; color: var(--ink-mute); margin-top: 4px; }
.estimate-range { margin-top: 18px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.estimate-range .range { font-family: var(--serif); font-size: 2.4rem; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.estimate-range .label { font-size: 0.8rem; color: var(--ink-soft); border: 1px solid var(--rule); border-radius: 4px; padding: 3px 7px; }
.estimate-conf { margin-top: 10px; font-size: 0.85rem; color: var(--ink-soft); }
.estimate-conf b { font-weight: 600; color: var(--ink); }
.estimate-row { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--rule); font-size: 0.85rem; color: var(--ink-soft); display: flex; justify-content: space-between; gap: 12px; }
.estimate-foot { margin-top: 14px; font-size: 0.78rem; color: var(--ink-mute); }
.figcaption { font-size: var(--step--1); color: var(--ink-mute); margin-top: 14px; max-width: 44ch; }

/* ---------- Notice (draft legal) ---------- */
.notice {
  border: 1px solid var(--brass); background: #fbf4e3; color: #5a4210; border-radius: 8px;
  padding: 12px 14px; font-size: var(--step--1); margin: 0 0 28px;
}
.todo {
  background: #fbf4e3; border-bottom: 2px solid var(--brass); padding: 0 3px; color: #5a4210; font-style: normal; font-family: var(--sans); font-size: 0.95em;
}

/* Page header for inner pages */
.page-head { padding-block: clamp(32px, 6vw, 72px) clamp(20px, 3vw, 36px); border-bottom: 1px solid var(--rule); margin-bottom: clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: var(--step-3); max-width: 18ch; }
.page-head .lede { margin-top: 0.6em; max-width: 50ch; }
.page-meta { margin-top: 18px; font-size: var(--step--1); color: var(--ink-mute); }
.page-body { padding-bottom: clamp(48px, 8vw, 96px); }

.toc { font-size: var(--step--1); list-style: none; padding: 0; margin: 0 0 2em; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.toc li { margin: 0; }
.toc a { color: var(--ink-soft); }

/* Support cards */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 0 0 2.4em; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { border: 1px solid var(--rule); border-radius: 12px; padding: 20px; background: var(--card); }
.card h2 { font-size: var(--step-1); margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: var(--step--1); }
.card p + p { margin-top: 0.6em; }

.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 16px 0; font-family: var(--serif); font-size: var(--step-1); list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--ink-mute); font-size: 1.2em; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2013"; }
.faq .answer { padding: 0 0 18px; color: var(--ink-soft); max-width: var(--measure); }
.faq .answer p + p { margin-top: 0.7em; }

/* Footer */
.foot { border-top: 1px solid var(--ink); margin-top: auto; }
.foot-inner {
  max-width: var(--wide); margin: 0 auto; padding: 28px var(--gutter) 40px;
  display: grid; gap: 20px 40px; grid-template-columns: 1fr; font-size: var(--step--1); color: var(--ink-soft);
}
@media (min-width: 760px) { .foot-inner { grid-template-columns: 1fr 1fr 1fr; } }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li + li { margin-top: 6px; }
.foot a { text-decoration: none; display: inline-block; padding: 6px 0; }
.foot li + li { margin-top: 0; }
.foot a:hover { text-decoration: underline; }
.foot .fine { color: var(--ink-mute); max-width: 44ch; }
.foot .fine p + p { margin-top: 0.6em; }

/* 404 */
.lost { padding-block: clamp(48px, 10vw, 120px); }
.lost h1 { font-size: var(--step-3); }
.lost p { margin-top: 1em; color: var(--ink-soft); max-width: 44ch; }
