/* Allen's Point: paper, ink, one blaze-orange signal colour. Colours match the app theme. */

@font-face {
  font-family: "DM Serif Display";
  src: url("../fonts/dm-serif-display.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3efe6;
  --paper-deep: #e9e3d6;
  --card: #fffdf8;
  --ink: #17181c;
  --ink-soft: #2a2b31;
  --muted: #7a766c;
  --muted-on-ink: #b9b4a8;
  --hairline: #ddd6c6;
  --accent: #e5560b;
  --accent-deep: #c2440a;
  --accent-soft: #fbe6d6;
  --forest: #3d6b4a;
  --caution: #b7791f;
  --danger: #b3261e;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 24px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 9vw, 4.6rem); }
h2 { font-size: clamp(2rem, 6vw, 3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
}
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

/* Header */
.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.45rem; line-height: 1; }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 15px; font-weight: 500; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent-deep); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 24px; border-radius: 999px; font-weight: 700; font-size: 16px;
  text-decoration: none; line-height: 1.2; border: 0;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); color: #fff; }
.btn-soft { background: var(--accent-soft); color: var(--accent-deep); }
.btn-soft:hover { background: #f8d8c0; color: var(--accent-deep); }
.btn svg { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { padding: 48px 0 56px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
.hero .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 34em; }
.hero .fine { font-size: 14px; color: var(--muted); margin-top: 14px; }
.hero-shots { display: flex; justify-content: center; gap: 16px; }
.hero-shots .phone:nth-child(2) { display: none; }

/* Phone frame: hides the status bar and tab bar of the screenshot. */
.phone {
  width: min(300px, 78vw);
  border-radius: 34px; padding: 8px; background: var(--ink);
  box-shadow: 0 24px 50px -28px rgba(23, 24, 28, .55);
}
.phone .screen { border-radius: 27px; overflow: hidden; aspect-ratio: 1206 / 2124; background: var(--paper); }
.phone .screen img { width: 100%; margin-top: -15.2%; }
.phone.short .screen { aspect-ratio: 1206 / 860; }
.phone.short .screen img { margin-top: -26%; }

/* Ruled tape divider: a nod to the range tape in the app. */
.tape {
  height: 26px; margin: 0;
  background:
    linear-gradient(var(--accent), var(--accent)) center top / 4px 22px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 60px) left top / 100% 18px no-repeat,
    repeating-linear-gradient(90deg, rgba(23,24,28,.35) 0 1px, transparent 1px 12px) left top / 100% 8px no-repeat;
  opacity: .9;
}

/* Features */
.section { padding: 64px 0; }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink .muted, .section-ink p { color: var(--muted-on-ink); }
.section-ink h2, .section-ink h3 { color: var(--paper); }
.section-deep { background: var(--paper-deep); }
.feature { display: grid; gap: 36px; align-items: center; }
.feature + .feature { margin-top: 72px; }
.feature .shot { display: flex; justify-content: center; }
.points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.points li { position: relative; padding-left: 26px; }
.points li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px;
  border-radius: 50%; border: 2px solid var(--accent);
}
.points li::after {
  content: ""; position: absolute; left: 4px; top: calc(.55em + 4px); width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.tag {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .14em; color: #fff;
  background: var(--accent); border-radius: 999px; padding: 3px 8px; vertical-align: 2px; margin-left: 6px;
}

.cards { display: grid; gap: 16px; margin: 28px 0 24px; }
.card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 1.45rem; }
.card p:last-child { margin-bottom: 0; }
.section-ink .card { background: var(--ink-soft); border-color: #3a3b42; }

/* Figures strip */
.figures { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--card); overflow: hidden; margin-top: 28px; }
.figures div { padding: 18px 16px; text-align: center; border-top: 1px solid var(--hairline); }
.figures div:nth-child(-n+2) { border-top: 0; }
.figures div:nth-child(odd) { border-right: 1px solid var(--hairline); }
.figures b { display: block; font-size: 1.9rem; font-weight: 700; font-feature-settings: "tnum"; letter-spacing: -0.02em; line-height: 1.1; }
.figures span { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Lite vs Full */
.table-wrap { overflow-x: auto; margin-top: 28px; border-radius: var(--radius); border: 1px solid var(--hairline); background: var(--card); }
table.compare { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 340px; }
.compare th, .compare td { padding: 13px 14px; text-align: left; border-top: 1px solid var(--hairline); vertical-align: top; }
.compare thead th { border-top: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: var(--paper); }
.compare thead th.full { color: var(--accent-deep); }
.compare td { font-feature-settings: "tnum"; width: 28%; }
.compare th[scope="row"] { font-weight: 500; }
.compare .yes { color: var(--forest); font-weight: 700; }
.compare .no { color: var(--muted); }
.compare tfoot td, .compare tfoot th { background: var(--paper); font-weight: 700; }

/* CTA band */
.cta { text-align: center; }
.cta .actions { justify-content: center; margin-top: 18px; }

/* Prose pages (legal, support) */
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(2.4rem, 8vw, 3.6rem); }
.prose { padding-bottom: 64px; }
.prose h2 { font-size: clamp(1.6rem, 5vw, 2rem); margin-top: 1.6em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 15px; }
.prose table th, .prose table td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--hairline); }
.prose table thead th { border-top: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.callout { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 16px 16px 0; padding: 18px 20px; margin: 0 0 1.4em; }
.callout p:last-child { margin-bottom: 0; }
.callout-ink { background: var(--ink); color: var(--paper); border-left: 0; border-top: 4px solid var(--accent); border-radius: 16px; }
.callout-ink strong { color: #fff; }
.contact-card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 22px; margin: 0 0 1.4em; }
.contact-card a.email { font-size: 1.25rem; font-weight: 700; word-break: break-all; }
details { background: var(--card); border: 1px solid var(--hairline); border-radius: 18px; padding: 0 18px; margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 700; padding: 16px 34px 16px 0; list-style: none; position: relative; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.5rem; line-height: 1.2; font-weight: 500; color: var(--accent); }
details[open] summary::after { content: "\2212"; }
details[open] summary { border-bottom: 1px solid var(--hairline); margin-bottom: 12px; }
details > :last-child { margin-bottom: 16px; }

/* Footer */
.site-footer { background: var(--ink); color: var(--muted-on-ink); padding: 40px 0 32px; font-size: 15px; }
.site-footer .wrap { display: grid; gap: 20px; }
.site-footer .brand { color: var(--paper); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer small { font-size: 13px; }

/* 404 */
.lost { padding: 80px 0 96px; text-align: center; }
.lost .big { font-family: var(--sans); font-weight: 700; font-size: clamp(5rem, 22vw, 9rem); line-height: 1; letter-spacing: -0.04em; font-feature-settings: "tnum"; margin: 0; }
.lost .actions { justify-content: center; margin-top: 20px; }

@media (min-width: 720px) {
  .hero-shots .phone:nth-child(2) { display: block; margin-top: 48px; }
  .phone { width: 270px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .figures { grid-template-columns: repeat(4, 1fr); }
  .figures div { border-top: 0; }
  .figures div:nth-child(odd) { border-right: 0; }
  .figures div + div { border-left: 1px solid var(--hairline); }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 960px) {
  body { font-size: 18px; }
  .hero { padding: 72px 0 80px; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; }
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature.flip .shot { order: -1; }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
  .section { padding: 96px 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .15s ease; }
}

/* ---------- Calculator ---------- */
.calc { padding: 8px 0 64px; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.calc-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.calc-form fieldset { margin: 0; min-width: 0; }
.calc-form legend { float: left; width: 100%; padding: 0; margin-bottom: 10px; font-family: var(--serif); font-size: 1.45rem; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--hairline); font-size: 15px; }
.calc-form legend + .field { border-top: 0; clear: both; }
.field > span:first-child { color: var(--ink-soft); }
.field .input { display: inline-flex; align-items: center; gap: 6px; }
.field em { font-style: normal; font-size: 13px; color: var(--muted); min-width: 2.2em; }
.field input[type="number"], .field select {
  font: inherit; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--paper);
  border: 1px solid var(--hairline); border-radius: 10px; padding: 7px 10px; width: 6.5em; text-align: right;
}
.field select { width: auto; text-align: left; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field input[aria-invalid="true"] { border-color: var(--danger); background: #fbeceb; }
.field.check { justify-content: flex-start; cursor: pointer; }
.field.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.field.inline { border: 0; padding: 0; justify-content: flex-start; }
.field-note { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.field-note strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.calc-out { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.answer-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.h-small { font-size: 1.45rem; margin: 0; }
.seg { display: inline-flex; background: var(--paper); border: 1px solid var(--hairline); border-radius: 999px; padding: 3px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .08em; cursor: pointer; color: var(--muted); }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.holds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.holds div { background: var(--ink); color: var(--paper); border-radius: 18px; padding: 16px 18px; }
.holds span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-on-ink); }
.holds strong { display: block; font-size: clamp(2rem, 8vw, 2.8rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent); }
.figures-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 12px; margin: 16px 0 0; }
.figures-row dt { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.figures-row dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-msg { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); font-size: 14px; }

.table-scroll { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.dope { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 560px; }
.dope th { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 0 8px 8px; line-height: 1.3; }
.dope th small { font-size: 10px; letter-spacing: .04em; text-transform: none; font-weight: 500; }
.dope td { text-align: right; padding: 8px; border-top: 1px solid var(--hairline); }
.dope th:first-child, .dope td:first-child { text-align: left; padding-left: 0; font-weight: 700; }
.dope td:nth-child(2), .dope td:nth-child(3) { font-weight: 700; }
.dope tr.trans td { background: var(--accent-soft); }
.chart-card .fine { font-size: 13px; margin: 12px 0 0; }
.cta h3 { margin-bottom: .3em; }

@media (min-width: 960px) {
  .calc-grid { grid-template-columns: minmax(320px, 400px) 1fr; }
  .calc-out { position: sticky; top: 16px; }
}
