/* Shot Budget. Blue revision paper, navy ink, highlighter for what you keep,
   red grease pencil for what you throw away. */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("fonts/big-shoulders-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #d6e2f0;      /* blue revision page */
  --paper-deep: #c3d3e6;
  --sheet: #fbfcfe;      /* the top sheet itself */
  --ink: #16213a;        /* navy ink */
  --ink-soft: #3f4c66;
  --mark: #ffe14d;       /* highlighter */
  --cut: #b3261e;        /* grease pencil */
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --text: "Instrument Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wide: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--cut); }

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

.wrap { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- masthead ---------- */
.top { padding-block: 1.1rem clamp(1.25rem, 3vw, 2.25rem); }
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: 0.01em; line-height: 1;
}
.brand svg { width: 2.1rem; height: 1.35rem; flex: none; }
.intro { margin-top: clamp(1.1rem, 3vw, 2.25rem); display: grid; gap: 0.9rem; }
h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.35rem, 7.2vw, 5rem); line-height: 0.94; letter-spacing: -0.005em;
  max-width: 17ch; text-wrap: balance;
}
.lead { max-width: 40ch; color: var(--ink-soft); font-size: 1.0625rem; }

/* ---------- the calculator sheet ---------- */
.sheet {
  background: var(--sheet);
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 7px 7px 0 var(--paper-deep);
  display: grid;
}
.sheet-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0.7rem clamp(0.9rem, 2.5vw, 1.5rem);
  border-bottom: 2px solid var(--ink);
}
.sheet-head h2 { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.1; }
.sheet-head span { font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; }

.inputs { padding: clamp(0.9rem, 2.5vw, 1.5rem); display: grid; gap: 1.1rem; align-content: start; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; align-items: end; }
.fields label { display: grid; gap: 0.4rem; font-size: 0.9rem; line-height: 1.3; font-weight: 500; }
.fields input {
  width: 100%; min-height: 3.5rem; padding: 0.1rem 0.7rem;
  font: 700 2.1rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums;
  background: #fff; border: 2px solid var(--ink); border-radius: 2px;
}
.fields input:focus-visible { outline-offset: 2px; background: #fffbe0; }

/* film strip: yellow is what stays in the cut, hatched is thrown away */
.strip {
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(90deg, transparent 0 6px, var(--paper) 6px 14px, transparent 14px 20px),
    repeating-linear-gradient(90deg, transparent 0 6px, var(--paper) 6px 14px, transparent 14px 20px);
  background-size: 100% 6px, 100% 6px;
  background-position: 0 5px, 0 calc(100% - 5px);
  background-repeat: no-repeat;
  padding: 16px 0; border-radius: 2px;
}
.frames { position: relative; display: flex; height: 2.75rem; }
.frames::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 38px, var(--ink) 38px 40px);
}
.frames .kept { background: var(--mark); flex: 1 1 0; min-width: 3px; transition: flex-grow 0.25s ease; }
.frames .cut {
  flex: 3 1 0; transition: flex-grow 0.25s ease;
  background: repeating-linear-gradient(135deg, var(--paper) 0 5px, var(--cut) 5px 7.5px);
}
.key { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-top: 0.55rem; font-size: 0.9rem; min-height: 1.4em; }
.key span { display: inline-flex; align-items: center; gap: 0.45rem; font-variant-numeric: tabular-nums; }
.key span::before { content: ""; width: 0.95rem; height: 0.95rem; border: 1.5px solid var(--ink); flex: none; }
.key .k-kept::before { background: var(--mark); }
.key .k-cut::before { background: repeating-linear-gradient(135deg, var(--paper) 0 3px, var(--cut) 3px 5px); }

.result {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 4.6vw, 2.05rem); line-height: 1.08;
  min-height: 2.16em; text-wrap: balance; font-variant-numeric: tabular-nums;
}
.result b { font-weight: 800; background: var(--mark); padding: 0 0.14em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.rates { border-top: 2px solid var(--ink); min-width: 0; }
.scroll { overflow-x: auto; min-height: calc(2.6rem + 13 * 2.75rem); }
.scroll:focus-visible { outline-offset: -3px; }
table { width: 100%; min-width: 19.5rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0 0.6rem; }
th:first-child, td:first-child { padding-left: clamp(0.9rem, 2.5vw, 1.5rem); }
th:last-child, td:last-child { padding-right: clamp(0.9rem, 2.5vw, 1.5rem); }
.num { text-align: right; white-space: nowrap; }
thead th { height: 2.6rem; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid var(--ink); vertical-align: middle; line-height: 1.15; }
tbody tr { height: 2.75rem; border-bottom: 1px solid #cfd8e6; }
tbody tr:last-child { border-bottom: 0; }
tbody td { font-size: 0.97rem; line-height: 1.15; vertical-align: middle; }
td.model { font-weight: 600; }
td.model .bar { display: block; height: 5px; margin-top: 5px; background: var(--ink); min-width: 3px; width: var(--w, 0%); transition: width 0.25s ease; }
td.rate { color: var(--ink-soft); }
td.total { font-weight: 700; }
tr.cheapest td.total span { background: var(--mark); padding: 0.1em 0.3em; margin-right: -0.3em; }
tr.dearest td.model .bar { background: var(--cut); }

.fine { padding: 0.85rem clamp(0.9rem, 2.5vw, 1.5rem); border-top: 2px solid var(--ink); font-size: 0.85rem; line-height: 1.45; color: var(--ink-soft); }
.next { margin-top: 1.4rem; font-weight: 600; }

/* ---------- the offer ---------- */
.offer { margin-top: clamp(2.5rem, 6vw, 4.5rem); background: var(--ink); color: #fff; padding-block: clamp(2rem, 5vw, 3.5rem); scroll-margin-top: 0; }
.offer-in { display: grid; gap: 1.5rem; }
.offer h2 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.offer .pitch { margin-top: 0.8rem; max-width: 46ch; color: #dbe4f2; }
.price { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 9vw, 4.5rem); line-height: 0.9; color: var(--mark); white-space: nowrap; }
.price small { font-size: 0.42em; font-weight: 700; color: #fff; letter-spacing: 0.01em; }
.deal { display: grid; gap: 1rem; align-content: start; }
.buy, form[data-signup] button {
  font: 700 1.1rem/1.2 var(--text); color: var(--ink); background: var(--mark);
  border: 2px solid var(--mark); border-radius: 2px; padding: 0.95rem 1.4rem; min-height: 3.4rem; cursor: pointer;
  box-shadow: 5px 5px 0 #0a1124;
}
.buy { width: 100%; max-width: 24rem; }
.buy:hover, form[data-signup] button:hover { background: #fff; border-color: #fff; }
.buy:active, form[data-signup] button:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #0a1124; }
.offer :focus-visible { outline-color: var(--mark); }
form[data-signup] { display: flex; flex-wrap: wrap; gap: 0.7rem; max-width: 30rem; position: relative; }
form[data-signup] input[type="email"] {
  flex: 1 1 13rem; min-width: 0; min-height: 3.4rem; padding: 0.6rem 0.9rem;
  font: 500 1.05rem/1.2 var(--text); color: var(--ink); background: #fff; border: 2px solid #fff; border-radius: 2px;
}
form[data-signup] input::placeholder { color: #5b6880; }
form[data-signup] button { flex: 0 0 auto; }
form[data-signup] button:disabled { opacity: 0.6; cursor: default; }
form[data-signup] [data-note] { flex-basis: 100%; font-size: 0.92rem; color: #dbe4f2; min-height: 1.5em; }
form[data-signup].done input, form[data-signup].done button { display: none; }
form[data-signup].done [data-note] { font-size: 1.15rem; font-weight: 600; color: var(--mark); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- reading matter ---------- */
.notes { padding-block: clamp(2.5rem, 6vw, 4.5rem) 1rem; display: grid; gap: clamp(2rem, 5vw, 3.25rem); }
.note { display: grid; gap: 0.7rem; }
.note h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.75rem, 4vw, 2.3rem); line-height: 1; text-wrap: balance; }
.note .body { display: grid; gap: 0.9rem; max-width: 62ch; }
.qa { display: grid; gap: 1.5rem; }
.qa h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.3rem; }

footer { border-top: 2px solid var(--ink); margin-top: 2.5rem; padding-block: 1.25rem 2rem; font-size: 0.92rem; }

/* ---------- wider screens ---------- */
@media (max-width: 26rem) {
  .sheet-head span { display: none; }
  .fields label { font-size: 0.84rem; }
}
@media (min-width: 46rem) {
  .intro { grid-template-columns: minmax(0, 1fr) minmax(15rem, 21rem); align-items: end; gap: 2.5rem; }
  .lead { padding-bottom: 0.4rem; }
  .offer-in { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: center; }
  .deal { min-width: 21rem; }
  .note { grid-template-columns: minmax(11rem, 17rem) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
  .note h2 { padding-top: 0.1rem; }
}
@media (min-width: 60rem) {
  .sheet { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .sheet-head, .fine { grid-column: 1 / -1; }
  .inputs { align-self: start; position: sticky; top: 0.5rem; gap: 1.5rem; padding-block: 1.75rem; }
  .rates { border-top: 0; border-left: 2px solid var(--ink); }
  .inputs { gap: 2rem; }
  .fields input { min-height: 4.25rem; font-size: 2.7rem; }
  .frames { height: 5rem; }
  .frames::after { background: repeating-linear-gradient(90deg, transparent 0 58px, var(--ink) 58px 60px); }
  .key { font-size: 0.95rem; }
  .result { font-size: 3.1rem; line-height: 1.04; min-height: 3.12em; }
}

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

/* ---------- supporting pages: schedules attached to the top sheet ---------- */
.brand a { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.brand a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.page .intro { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.page h1 { font-size: clamp(2.1rem, 5.6vw, 3.6rem); line-height: 0.98; max-width: 24ch; }
.page .lead { max-width: 66ch; color: var(--ink); font-size: 1.125rem; padding-bottom: 0; }
.doc { display: grid; gap: clamp(2rem, 5vw, 3rem); padding-bottom: clamp(1rem, 3vw, 2rem); }
.doc > section { display: grid; gap: 1rem; min-width: 0; }
.doc h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 3.6vw, 2.1rem); line-height: 1.02; max-width: 30ch; text-wrap: balance; }
.doc p { max-width: 68ch; }
.sched {
  margin: 0; min-width: 0; background: var(--sheet);
  border: 2px solid var(--ink); border-radius: 3px; box-shadow: 7px 7px 0 var(--paper-deep);
}
.sched figcaption { display: grid; gap: 0.3rem; padding: 0.75rem clamp(0.9rem, 2.5vw, 1.5rem); border-bottom: 2px solid var(--ink); }
.sched figcaption strong { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.1; }
.sched figcaption span { font-size: 0.85rem; line-height: 1.45; color: var(--ink-soft); max-width: 90ch; }
.tscroll { overflow-x: auto; }
.tscroll:focus-visible { outline-offset: -3px; }
.sched table { min-width: var(--min, 30rem); }
.sched thead th { height: auto; padding-block: 0.6rem; vertical-align: bottom; }
.sched tbody th, .sched tbody td { padding-block: 0.55rem; font-size: 0.97rem; line-height: 1.25; vertical-align: middle; }
.sched tbody th { font-weight: 600; min-width: 9rem; }
.sched td.num { white-space: normal; }
.sched tbody tr:hover { background: #fffbe0; }
.sources { border-top: 2px solid var(--ink); padding-top: 1.25rem; font-size: 0.92rem; color: var(--ink-soft); }
.sources h2 { font-size: 1.35rem; color: var(--ink); }
.sources .made { color: var(--ink); }
.more { display: grid; gap: 0.9rem; }
.more ul, .note .links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--ink); max-width: 46rem; }
.more li, .note .links li { border-bottom: 1px solid var(--ink); }
.more a, .note .links a { display: block; padding: 0.7rem 0.1rem; font-weight: 600; text-decoration: none; }
.more a:hover, .note .links a:hover { background: var(--mark); }
.page .offer { margin-top: clamp(1.5rem, 4vw, 3rem); }
