:root {
  --paper: #f3f6f8;
  --sheet: #ffffff;
  --ink: #0f3155;
  --ink-soft: #4a5d70;
  --line: #8ea3b5;
  --rule: #d6dfe6;
  --red: #c8321d;
  --teal: #14c1ae;
  --btn-ink: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1d31; --sheet: #10263d; --ink: #e3eaec; --ink-soft: #a7b6c3;
    --line: #6f89a0; --rule: #213a52; --red: #ff6a4f; --teal: #14c1ae; --btn-ink: #0b1d31;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b1d31; --sheet: #10263d; --ink: #e3eaec; --ink-soft: #a7b6c3;
  --line: #6f89a0; --rule: #213a52; --red: #ff6a4f; --teal: #14c1ae; --btn-ink: #0b1d31;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "tnum" 1;
}
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.bar, main, .foot { max-width: 72rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 48rem) { .bar, main, .foot { padding-left: 2rem; padding-right: 2rem; } }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.mark { display: inline-block; line-height: 0; }
.mark img { display: block; height: 30px; width: auto; }
@media (min-width: 48rem) { .mark img { height: 36px; } }

.btn {
  display: inline-block; background: var(--ink); color: var(--btn-ink);
  text-decoration: none; font-weight: 650; padding: 0.85rem 1.3rem; border-radius: 3px;
}
.btn:hover { background: var(--teal); color: #0f3155; }
.btn-small { padding: 0.55rem 0.9rem; font-size: 0.95rem; }

h1, h2, h3 { font-variation-settings: "wdth" 72; line-height: 1.05; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 780; max-width: 15ch; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 750; max-width: 22ch; }
h3 { font-size: 1.3rem; font-weight: 700; font-variation-settings: "wdth" 85; }

section { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
.hero { border-top: 0; padding-top: 2rem; display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 60rem) { .hero { grid-template-columns: 1.15fr 1fr; gap: 3.5rem; padding-top: 3.5rem; padding-bottom: 4.5rem; } }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 36rem; margin: 1.5rem 0 2rem; }
.fine { color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.9rem; max-width: 34rem; }

.sheet { margin: 0; background: var(--sheet); padding: 0.5rem; }
.sheet svg { display: block; width: 100%; height: auto; }
.sheet figcaption { font-size: 0.85rem; color: var(--ink-soft); padding: 0.25rem 0.75rem 0.5rem; }
.frame { fill: none; stroke: var(--rule); }
.brackets { fill: none; stroke: var(--ink); stroke-width: 5; }
.barrier { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.bars { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: 0.65; }
.dim { fill: none; stroke: var(--line); stroke-width: 1.2; }
.dim-head { fill: var(--line); }
.dim-gap { fill: var(--sheet); }
.dim-label { font: 600 13px "Archivo", sans-serif; fill: var(--ink-soft); text-anchor: middle; }
.t-title { font: 700 19px "Archivo", sans-serif; fill: var(--ink); }
.t-price { font: 600 15px "Archivo", sans-serif; fill: var(--ink-soft); }
.t-body { font: 400 14px "Archivo", sans-serif; fill: var(--ink-soft); }
.pencil { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; }
.note { font: 650 15px "Archivo", sans-serif; font-style: italic; fill: var(--red); }
@media (prefers-reduced-motion: no-preference) {
  .pencil { stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw 0.7s ease-out forwards; }
  .p1 { animation-delay: 0.5s; }
  .p2 { animation-delay: 1.1s; }
  .p3 { animation-delay: 1.7s; }
  .note { opacity: 0; animation: show 0.3s ease-out 2.2s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes show { to { opacity: 1; } }

.section-lede { color: var(--ink-soft); max-width: 40rem; margin: 1rem 0 2rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 34rem; }
th { text-align: left; font-weight: 650; font-size: 0.95rem; color: var(--ink-soft); padding: 0 1rem 0.6rem 0; border-bottom: 2px solid var(--ink); }
td { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
td:first-child { font-weight: 650; width: 22%; }
td:nth-child(2) { width: 36%; }
td:last-child { color: var(--red); }

.how h2 { margin-bottom: 2rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 2rem; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(step); display: block; font-weight: 780; font-variation-settings: "wdth" 72; font-size: 2.2rem; line-height: 1; margin-bottom: 0.75rem; color: var(--line); }
.steps p { color: var(--ink-soft); margin: 0.6rem 0 0; }

.why h2 { margin-bottom: 1.5rem; }
.why-grid { display: grid; gap: 1.25rem; max-width: 62rem; }
@media (min-width: 48rem) { .why-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
.why-grid p { margin: 0; font-size: 1.15rem; }
.why sup a { color: var(--ink-soft); text-decoration: none; padding-left: 1px; }
.sources { margin: 2rem 0 0; padding-left: 1.2rem; font-size: 0.85rem; color: var(--ink-soft); max-width: 44rem; }

.close { padding: 4.5rem 0; }
.close p { color: var(--ink-soft); max-width: 36rem; margin: 1rem 0 2rem; font-size: 1.15rem; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-top: 1.5rem; padding-bottom: 2.5rem; border-top: 1px solid var(--rule); font-size: 0.9rem; color: var(--ink-soft); }
.foot p { margin: 0; }
.foot a + a { margin-left: 1.25rem; }

/* privacy page */
.doc { max-width: 40rem; padding: 2rem 0 4rem; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: none; margin-bottom: 1.5rem; }
.doc h2 { font-size: 1.35rem; font-variation-settings: "wdth" 85; margin: 2rem 0 0.5rem; max-width: none; }
.doc section { border: 0; padding: 0; }

.hero > * { min-width: 0; }

/* examples of what we found */
.finds { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .finds { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.find { margin: 0; }
.page { background: var(--sheet); border: 1px solid var(--rule); border-top: 6px solid var(--rule); padding: 1.25rem 1.25rem 1.1rem; min-height: 9.5rem; }
.page p { margin: 0; }
.pg-title { font-weight: 700; font-size: 1.15rem; margin-bottom: 0.6rem !important; }
.pg-body { color: var(--ink-soft); }
.pg-label { font-size: 0.85rem; color: var(--line); margin-bottom: 0.2rem !important; }
.pg-spec { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0 0 0.9rem; color: var(--ink-soft); }
.pg-spec dt { color: var(--line); }
.pg-spec dd { margin: 0; }
.pg-doc, .pg-file { font-size: 0.95rem; color: var(--ink-soft); border-top: 1px dashed var(--rule); padding-top: 0.6rem; margin-top: 0.6rem !important; }
.page-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.page-split > div + div { border-left: 1px dashed var(--rule); padding-left: 1rem; }
.err { color: var(--ink); white-space: nowrap; padding: 0.05em 0.35em; margin: 0 -0.1em; border: 2px solid var(--red); border-radius: 48% 52% 46% 54% / 60% 45% 55% 40%; }
.find figcaption { margin-top: 0.75rem; font-weight: 600; max-width: 34rem; }
.why-grid { max-width: 40rem; }
@media (min-width: 48rem) { .why-grid { grid-template-columns: 1fr; } }

/* cost of one error */
.cost { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 60rem) { .cost { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.cost-story p { font-size: 1.2rem; color: var(--ink-soft); max-width: 32rem; margin: 1.25rem 0 0; }
.cost-story p + p { color: var(--ink); font-weight: 650; }
.receipt {
  background: var(--sheet); padding: 1.5rem 1.5rem 2.25rem; max-width: 30rem; width: 100%;
  border-top: 6px solid var(--ink);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
  font-variation-settings: "wdth" 88;
}
.rc-head { margin: 0 0 0.75rem; font-weight: 700; padding-bottom: 0.6rem; border-bottom: 2px solid var(--ink); }
.rc-line, .rc-total { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px dashed var(--rule); }
.rc-line span:last-child { color: var(--red); text-align: right; font-weight: 600; }
.rc-total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 0.4rem; font-weight: 750; }
.rc-total span:last-child { color: var(--red); text-align: right; max-width: 12rem; }
@media (max-width: 30rem) { .rc-line, .rc-total { grid-template-columns: 1fr; gap: 0.15rem; } .rc-line span:last-child, .rc-total span:last-child { text-align: left; } }

/* phones */
.btn-small .sm { display: none; }
@media (max-width: 40rem) {
  .btn-small .lg { display: none; }
  .btn-small .sm { display: inline; }
  .btn-small { white-space: nowrap; }
  .mark img { height: 26px; }
  section { padding: 2.75rem 0; }
  .hero { padding-top: 1rem; padding-bottom: 2.5rem; }
  .lede { font-size: 1.1rem; margin: 1.25rem 0 1.5rem; }
  .hero .btn, .close .btn { display: block; text-align: center; }
  .fine { text-align: center; }
  /* the hero drawing's text gets too small to read on a phone; the first example card shows the same error at full size */
  .sheet { display: none; }
  .section-lede { margin-bottom: 1.5rem; }
  .page { min-height: 0; padding: 1rem; }
  .page-split { grid-template-columns: 1fr; gap: 0.75rem; }
  .page-split > div + div { border-left: 0; padding-left: 0; border-top: 1px dashed var(--rule); padding-top: 0.75rem; }
  .cost-story p { font-size: 1.1rem; }
  .receipt { padding: 1.25rem 1.25rem 2rem; }
  .why-grid p { font-size: 1.05rem; }
  .close { padding: 3rem 0; }
  .foot { flex-direction: column; }
}
