/* Maple QA marketing site
   Palette: spruce ink on white, cool "receipt" paper, maple green accent.
   Type: Schibsted Grotesk for everything; IBM Plex Mono only inside receipts
   and transcripts, where it imitates printed call records. */

:root {
  --ink: #1d2a27;
  --muted: #56635f;
  --paper: #ffffff;
  --receipt: #eef3ef;
  --line: #d6ddd8;
  --maple: #2e6a4f;
  --maple-dark: #22513c;
  --maple-tint: #e2efe7;
  --amber: #8a5a0f;
  --red: #a8352a;
  --hit: #fff2c4;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --step--1: 0.889rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.6rem;
  --step-3: 2.05rem;
  --step-4: clamp(2.3rem, 1.6rem + 2.8vw, 3.55rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; font-weight: 800; letter-spacing: -0.015em; }
h1 { font-size: var(--step-4); letter-spacing: -0.03em; max-width: 15ch; }
h2 { font-size: var(--step-3); max-width: 24ch; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: inherit; }
.muted { color: var(--muted); }
.fine { font-size: var(--step--1); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--ink); color: #fff; padding: 0.5rem 0.9rem; border-radius: 6px; z-index: 20; }
.skip:focus { left: 0.5rem; }
:focus-visible { outline: 3px solid var(--maple); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow > * { max-width: 48rem; }
.narrow-p { max-width: 60ch; }
main > section { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0; }
.band { background: var(--receipt); }

/* Links and buttons */
.link { color: var(--maple-dark); text-underline-offset: 3px; text-decoration-thickness: 1.5px; font-weight: 500; }
.link:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 1rem/1 var(--font);
  padding: 0.95rem 1.35rem; border-radius: 8px;
  background: var(--maple); color: #fff; text-decoration: none;
  border: 2px solid var(--maple); cursor: pointer;
}
.btn:hover { background: var(--maple-dark); border-color: var(--maple-dark); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--receipt); border-color: var(--ink); color: var(--ink); }
.btn-small { padding: 0.6rem 0.95rem; font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.02em; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 760px) {
  .nav { display: none; }
  .header-row .btn-small { margin-left: auto; }
}

/* Hero */
.hero { padding-top: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink); max-width: 36ch; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

/* The receipt: the one bold element */
.receipt { margin: 0; justify-self: center; width: min(100%, 23rem); filter: drop-shadow(0 18px 30px rgba(29, 42, 39, 0.16)); }
.receipt-paper {
  --tooth: 9px;
  background: var(--receipt);
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  padding: 1.6rem 1.35rem 1.5rem;
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 90deg, #0000 91deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 90deg, #0000 91deg) top / calc(2 * var(--tooth)) var(--tooth) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--tooth) + 1px) no-repeat;
          mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 90deg, #0000 91deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 90deg, #0000 91deg) top / calc(2 * var(--tooth)) var(--tooth) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--tooth) + 1px) no-repeat;
}
.r-title { font-family: var(--font); font-weight: 800; font-size: 1.15rem; text-align: center; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
.r-meta { display: grid; gap: 0.1rem; margin: 0 0 0.9rem; padding-bottom: 0.75rem; border-bottom: 1.5px dashed #a9b5af; }
.r-meta div { display: flex; justify-content: space-between; }
.r-meta dt { color: var(--muted); }
.r-meta dd { margin: 0; }
.r-items { list-style: none; margin: 0; padding: 0 0 0.75rem; border-bottom: 1.5px dashed #a9b5af; }
.r-items li { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.12rem 0; }
.r-items li span { flex: 1; display: flex; gap: 0.4rem; }
.r-items li span::after { content: ""; flex: 1; border-bottom: 1.5px dotted #a9b5af; transform: translateY(-0.3em); }
.r-items b { font-weight: 500; }
.r-hit { background: var(--hit); margin: 0 -0.4rem; padding-left: 0.4rem !important; padding-right: 0.4rem !important; }
.ok { color: var(--maple); }
.miss { color: var(--red); }
.r-total { display: flex; align-items: baseline; gap: 0.6rem; margin: 0.8rem 0 0.9rem; max-width: none; }
.r-total span { flex: 1; font-weight: 500; }
.r-total b { font-family: var(--font); font-weight: 800; font-size: 2.6rem; line-height: 1; letter-spacing: -0.03em; }
.r-total em { font-style: normal; color: var(--maple); font-weight: 500; }
.r-proof { border-top: 1.5px dashed #a9b5af; padding-top: 0.8rem; }
.r-proof-head { margin: 0 0 0.3rem; color: var(--muted); }
.r-proof blockquote { margin: 0; font-family: var(--font); font-size: 0.98rem; line-height: 1.45; background: var(--hit); padding: 0.5rem 0.6rem; border-radius: 4px; }

/* Steps: a real sequence, so they're numbered */
.steps { list-style: none; counter-reset: step; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 2rem 1.75rem; }
.steps li { counter-increment: step; position: relative; padding-top: 3.1rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; color: var(--maple-dark); background: var(--maple-tint);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.1rem; left: 2.9rem; right: -1rem; border-top: 2px solid var(--maple-tint); }
.steps p { color: var(--muted); }
@media (max-width: 720px) { .steps li::after { display: none; } }

/* Proof demo */
.proof { background: var(--ink); color: #f1f5f2; }
.proof .muted { color: #b7c4be; }
.proof-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: start; }
@media (max-width: 880px) { .proof-grid { grid-template-columns: 1fr; } }
.demo { display: grid; gap: 1rem; }
.demo-criteria { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.demo-criteria button {
  width: 100%; display: flex; justify-content: space-between; gap: 1rem;
  font: 500 0.95rem/1.3 var(--mono); text-align: left;
  background: transparent; color: #f1f5f2;
  border: 1.5px solid #3c4d48; border-radius: 8px; padding: 0.75rem 0.9rem; cursor: pointer;
}
.demo-criteria button:hover { border-color: #8fa39b; }
.demo-criteria button[aria-pressed="true"] { border-color: var(--hit); background: rgba(255, 242, 196, 0.08); }
.demo-criteria .ok { color: #8fd3ad; }
.demo-criteria .miss { color: #f2a196; }
.transcript { list-style: none; margin: 0; padding: 1rem; background: #f7faf8; color: var(--ink); border-radius: var(--radius); display: grid; gap: 0.35rem; }
.transcript li { display: grid; grid-template-columns: 3rem 5.5rem 1fr; gap: 0.5rem; padding: 0.5rem 0.55rem; border-radius: 6px; transition: background-color 0.25s ease; }
.transcript time, .transcript .who { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); padding-top: 0.15rem; }
.transcript p { margin: 0; }
.transcript .is-hit { background: var(--hit); }
@media (max-width: 560px) { .transcript li { grid-template-columns: 1fr; gap: 0.1rem; } .transcript time, .transcript .who { display: inline; } }

/* Scorecards */
.sc-list { list-style: none; margin: 2rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.sc-list li { padding: 1.25rem 1.5rem 1.25rem 0; border-bottom: 1px solid var(--line); }
.sc-list li p { margin-bottom: 0.4rem; }

/* Lists */
.ticks { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.7rem; }
.ticks li { position: relative; padding-left: 1.9rem; max-width: 64ch; }
.ticks li::before { content: ""; position: absolute; left: 0.15rem; top: 0.42em; width: 0.95rem; height: 0.55rem; border-left: 2.5px solid var(--maple); border-bottom: 2.5px solid var(--maple); transform: rotate(-45deg); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary { font-weight: 700; font-size: var(--step-1); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 500; color: var(--maple); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0.75rem 0 0; color: var(--muted); }

/* Early access */
.early { background: var(--maple-tint); }
.early-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 1rem + 4vw, 4.5rem); }
@media (max-width: 880px) { .early-grid { grid-template-columns: 1fr; } }
.form { background: var(--paper); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); border-radius: var(--radius); display: grid; gap: 1rem; border: 1px solid var(--line); }
.field { display: grid; gap: 0.35rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
label { font-weight: 500; font-size: 0.95rem; }
input, select {
  font: 400 1rem/1.3 var(--font); color: var(--ink);
  padding: 0.75rem 0.8rem; border: 1.5px solid #aab6b1; border-radius: 8px; background: #fff; width: 100%;
}
input:focus-visible, select:focus-visible { outline: 3px solid var(--maple); outline-offset: 1px; border-color: var(--maple); }
.hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; }
.form-note { font-size: var(--step--1); margin: 0; }
.form-status { margin: 0; font-weight: 500; }
.form-status.is-error { color: var(--red); }
.form-status.is-ok { color: var(--maple-dark); }

/* Inner pages */
.page-head { padding-bottom: 1rem !important; }
.prose h2 { font-size: var(--step-2); margin-top: 2rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; align-items: stretch; }
.plan { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.plan .btn { margin-top: auto; }
.plan-featured { border: 2px solid var(--maple); }
.plan h2 { font-size: var(--step-2); display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pill { font-size: 0.8rem; font-weight: 700; color: var(--maple-dark); background: var(--maple-tint); padding: 0.25rem 0.55rem; border-radius: 999px; letter-spacing: 0; }
.price { font-size: var(--step-0); color: var(--muted); }
.price b { font-size: var(--step-3); color: var(--ink); letter-spacing: -0.03em; }
.plan-facts { margin: 0.5rem 0 1.25rem; display: grid; gap: 0.35rem; }
.plan-facts div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dotted var(--line); padding-bottom: 0.3rem; }
.plan-facts dt { color: var(--muted); }
.plan-facts dd { margin: 0; font-weight: 500; text-align: right; }

.tpl-index { padding-top: 0 !important; padding-bottom: 0 !important; }
.tpl-jump { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tpl-jump a { display: inline-block; padding: 0.5rem 0.85rem; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 500; }
.tpl-jump a:hover { border-color: var(--ink); }
.tpl + .tpl { border-top: 1px solid var(--line); }
.tpl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.tpl h3 { margin-top: 2rem; font-size: var(--step-1); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 0.8rem 0.9rem 0.8rem 0; border-bottom: 1px solid var(--line); }
thead th { border-bottom: 2px solid var(--ink); font-size: 0.9rem; }
tbody th { font-weight: 700; width: 26%; }
td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tag { display: block; margin-top: 0.3rem; font-size: 0.8rem; font-weight: 500; color: var(--red); }
.alerts { padding-left: 1.2rem; display: grid; gap: 0.4rem; max-width: 70ch; }
.compare tbody th { width: 22%; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 2rem; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.footer-grid nav { display: grid; gap: 0.45rem; align-content: start; }
.footer-grid nav a { color: var(--muted); text-decoration: none; }
.footer-grid nav a:hover { color: var(--ink); }
.footer-head { font-size: 0.95rem; margin: 0 0 0.2rem; }
.legal { margin-top: 2.5rem; font-size: var(--step--1); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

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

@media (min-width: 1100px) { .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Before and after */
.week { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.week-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; background: var(--paper); }
.week-card h3 { margin-top: 0; }
.week-card ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; color: var(--muted); }
.week-card-after { background: var(--maple-tint); border-color: var(--maple); }
.week-card-after ul { color: var(--ink); }

/* Mobile friendliness: comfortable tap targets (44px+), a phone menu and stacked tables */
.btn-small { min-height: 44px; display: inline-flex; align-items: center; }
.brand { min-height: 44px; }
.nav a { padding: 0.65rem 0; }
.faq summary { padding-block: 0.55rem; min-height: 44px; align-items: center; }
.footer-grid nav { gap: 0; }
.footer-grid nav a { display: block; padding: 0.6rem 0; }
.site-footer a[href^="mailto"], .site-footer a[href="/privacy/"] { display: inline-block; padding: 0.6rem 0; }

.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; min-height: 44px; min-width: 44px; padding: 0 0.85rem; display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span, .menu summary span::before, .menu summary span::after { display: block; width: 16px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.menu summary span::before, .menu summary span::after { content: ""; position: absolute; left: 0; }
.menu summary span::before { top: -5px; }
.menu summary span::after { top: 5px; }
.menu[open] summary { background: var(--receipt); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 13rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(29, 42, 39, 0.12); padding: 0.4rem; display: grid; }
.menu-panel a { display: block; padding: 0.8rem 0.9rem; min-height: 48px; text-decoration: none; color: var(--ink); font-weight: 500; border-radius: 6px; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { background: var(--receipt); }
@media (max-width: 760px) {
  .menu { display: block; margin-left: auto; }
  .header-row .btn-small { margin-left: 0; }
}
@media (max-width: 440px) {
  .menu summary { padding: 0 0.7rem; }
  .menu summary { font-size: 0; gap: 0; } /* icon only on the smallest phones; aria-label keeps it named */
  .header-row .btn-small { padding-inline: 0.75rem; font-size: 0.9rem; }
}

@media (max-width: 640px) {
  .table-scroll:has(table.stack) { overflow: visible; }
  table.stack { min-width: 0; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; width: auto; }
  table.stack tr { border-bottom: 1px solid var(--line); padding: 1rem 0; }
  table.stack th, table.stack td { border: 0; padding: 0.2rem 0; white-space: normal; }
  table.stack tbody th { width: auto; font-size: 1.05rem; margin-bottom: 0.35rem; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--ink); }
  table.stack td { color: var(--muted); }
}
.brand span, .header-row .btn-small { white-space: nowrap; }
@media (max-width: 760px) { .header-row { gap: 0.6rem; } }
@media (max-width: 360px) { .brand img { width: 24px; height: 24px; } .brand { font-size: 1.05rem; } .header-row .btn-small { padding-inline: 0.6rem; font-size: 0.85rem; } }
@media (max-width: 640px) { table.stack td[data-label]::before { font-variant-numeric: normal; } }
.brand { flex-shrink: 0; }

/* Scorecard spreadsheet signup */
.get-sheet { position: relative; }
.get-sheet > summary { list-style: none; cursor: pointer; min-height: 44px; }
.get-sheet > summary::-webkit-details-marker { display: none; }
.get-sheet[open] > summary { background: var(--receipt); border-color: var(--ink); }
.get-sheet-form { margin-top: 0.75rem; width: min(26rem, calc(100vw - 2 * var(--gutter))); }
.get-sheet-what { margin: 0; }
@media (min-width: 761px) { .get-sheet-form { position: absolute; right: 0; z-index: 5; box-shadow: 0 12px 32px rgba(29, 42, 39, 0.14); } }
