@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #202622;
  --paper: #f4f3ef;
  --amber: #e4ad65;
  --line: rgba(32, 38, 34, 0.16);
  --muted: #3c433f;
  --measure: 72rem;
  --header: 4.25rem;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body.redesign {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  font-weight: 450;
  overflow-x: clip;
}

img, svg { max-width: 100%; height: auto; }

a { color: inherit; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 0.9rem;
  z-index: 20;
}

.skip:focus { top: 0.75rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.bar {
  max-width: none;
  margin: 0 auto;
  padding: 0.55rem 13.5rem 0.55rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.unit-row {
  position: fixed;
  top: 0;
  right: 1.25rem;
  z-index: 31;
  display: flex;
  align-items: center;
  height: 75px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
  min-height: 44px;
}

.brand img { display: block; width: 11.4rem; height: auto; }

.primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.primary a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.7rem;
  text-decoration: none;
  font-weight: 560;
  font-size: 0.95rem;
}

.primary a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--amber); }

.unit-toggle {
  display: flex;
  border: 1px solid var(--ink);
}

.unit-toggle button {
  min-height: 44px;
  min-width: 5.5rem;
  padding: 0 0.75rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 560;
  font-size: 0.92rem;
  cursor: pointer;
}

.unit-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.wrap {
  max-width: none;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.hero { padding-bottom: 0.25rem; }

.hero-copy { max-width: 40rem; }

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.96;
  font-weight: 680;
  letter-spacing: -0.035em;
}

.support {
  max-width: 36rem;
  margin: 1.25rem 0 0;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.button:hover { background: #141815; }

.free {
  margin: 0;
  font-size: 0.98rem;
}

.hero-photo {
  margin: 1.6rem -1.25rem 0;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 3.5rem 0 1.25rem;
  padding-top: 0.4rem;
  border-top: 3px solid var(--amber);
}

.section-head h2 {
  margin: 0.7rem 0 0;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  font-weight: 650;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}

.cards a {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-decoration: none;
  background: #fffdf9;
  border: 1px solid var(--line);
  color: var(--ink);
}

.cards a:hover { border-color: var(--ink); }

.cards img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #d9d4cc;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.05rem 1.1rem 1.15rem;
  flex: 1;
}

.card-body h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  flex: 1;
}

.card-cta {
  margin-top: 0.45rem;
  font-weight: 620;
  font-size: 0.95rem;
  box-shadow: inset 0 -2px 0 var(--amber);
  align-self: flex-start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.card-figure {
  margin: 0;
  min-height: 7.5rem;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem 1.1rem;
}

.card-figure strong {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 680;
}

.card-figure span {
  color: var(--amber);
  font-weight: 620;
  margin-top: 0.25rem;
}

.app-band {
  margin-top: 3.5rem;
  background: var(--ink);
  color: var(--paper);
  padding: 2.2rem 1.5rem;
  border-top: 4px solid var(--amber);
}

.app-band h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
  font-weight: 650;
  max-width: 18ch;
}

.app-band p { margin: 0.4rem 0; max-width: 40rem; }

.app-band a {
  color: var(--paper);
  font-weight: 620;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  box-shadow: inset 0 -2px 0 var(--amber);
  text-underline-offset: 0.2em;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.4rem;
}

.site-footer .wrap { padding-top: 0; padding-bottom: 0; }

.site-footer p {
  margin: 0.4rem 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 62rem;
}

.site-footer a {
  color: var(--ink);
  display: inline-block;
  padding: 0.75rem 0.2rem;
  line-height: 1.2;
}

.credits { font-size: 0.82rem; }

.page-intro h1 {
  margin: 0.4rem 0 0.6rem;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 680;
  max-width: 18ch;
}

.lede {
  margin: 0;
  max-width: 40rem;
  font-size: 1.15rem;
  color: var(--muted);
}

.crumbs { font-size: 0.92rem; }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; color: var(--muted); }

.crumbs a { min-height: 44px; display: inline-flex; align-items: center; }

.page-photo { margin: 1.4rem 0 0; }

.page-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.6rem;
}

.panel {
  border: 1px solid var(--line);
  background: #fffdf9;
  padding: 1.1rem 1.1rem 1.25rem;
}

fieldset {
  border: 0;
  margin: 0 0 1.1rem;
  padding: 0;
}

legend {
  font-weight: 680;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  padding: 0;
  margin-bottom: 0.7rem;
}

.fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem 1rem;
}

.fields.two { grid-template-columns: 1fr 1fr; }

.field { min-width: 0; }

.field.wide { grid-column: 1 / -1; }

label { display: block; font-weight: 580; font-size: 0.95rem; margin-bottom: 0.3rem; }

input, select, button {
  font: inherit;
  color: var(--ink);
}

input, select {
  width: 100%;
  min-height: 48px;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(32, 38, 34, 0.45);
  background: #fff;
  border-radius: 0;
}

input:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.hint, .error { margin: 0.3rem 0 0; font-size: 0.86rem; color: var(--muted); }

.error:empty { display: none; }

input[aria-invalid="true"] { border-color: #8a3b24; }

.note {
  margin: 0.6rem 0 0;
  padding: 0.75rem 0.85rem;
  background: var(--paper);
  border-left: 3px solid var(--amber);
  font-size: 0.95rem;
}

.advanced {
  border-top: 1px solid var(--line);
  margin: 0.2rem 0 0.4rem;
}

.advanced summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.advanced summary::-webkit-details-marker { display: none; }

.advanced summary::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.7rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg);
}

.advanced[open] summary::before { transform: rotate(45deg); }

.advanced .fields { padding: 0.2rem 0 1rem; }

.actions { margin-top: 0.6rem; }

.actions button, button.secondary {
  min-height: 48px;
  padding: 0.55rem 1rem;
  background: transparent;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-weight: 620;
}

.board {
  position: sticky;
  top: calc(var(--header) + 0.8rem);
  background: var(--ink);
  color: var(--paper);
  padding: 1.2rem 1.15rem 1.3rem;
}

.board-kicker {
  margin: 0;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 680;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.purchase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0.85rem 0 0.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(244, 243, 239, 0.2);
}

.purchase p { margin: 0; }

.purchase-label {
  color: rgba(244, 243, 239, 0.72);
  font-size: 0.86rem;
}

.purchase-value {
  margin-top: 0.2rem !important;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  line-height: 1.05;
  font-weight: 680;
  letter-spacing: -0.03em;
}

.order-summary {
  margin: 0.85rem 0 0;
  font-size: 1.02rem;
  font-weight: 560;
}

.tri {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.tri h3 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 680;
}

.tri dl, .assume { margin: 0; }

.tri div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid rgba(244, 243, 239, 0.12);
  font-size: 0.92rem;
}

.tri dt { font-weight: 450; color: rgba(244, 243, 239, 0.78); }

.tri dd { margin: 0; text-align: right; font-weight: 620; }

.diagram {
  margin-top: 1.15rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.75rem 0.7rem 0.55rem;
}

.diagram svg { display: block; width: 100%; height: auto; }

.diagram figcaption {
  margin: 0.35rem 0.15rem 0.15rem;
  font-size: 0.82rem;
  color: var(--muted);
}

#warnings-wrap { margin-top: 0.9rem; }

#warnings {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--amber);
}

#math {
  margin: 0.9rem 0 0;
  white-space: pre-wrap;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(244, 243, 239, 0.72);
}

.app-line {
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.app-line a {
  color: var(--ink);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.below { margin-top: 2.6rem; }

.below h2 {
  margin: 2rem 0 0.6rem;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  font-weight: 650;
}

.prose h2, .below h2 {
  margin: 1.6rem 0 0.5rem;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  font-weight: 650;
}
.prose h3 { margin: 1.15rem 0 0.35rem; font-size: 1.1rem; }
.prose p, .prose ul, .below p, .below ul { max-width: 44rem; }
.prose li { margin: 0.25rem 0; }

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-weight: 600;
}
.check input { width: 1.15rem; height: 1.15rem; flex: none; }

.pair-line { font-size: 1.05rem; max-width: 40rem; }
.compare {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.compare article {
  background: #fffdf9;
  border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
  padding: 0.9rem 1rem;
}
.compare .k {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 680;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.compare strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0.2rem 0;
}
.compare p:last-child { margin: 0; color: var(--muted); }

@media (min-width: 700px) {
  .compare { grid-template-columns: 1fr 1fr; }
}

.assume { display: grid; gap: 0.85rem; }

.assume div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.assume dt { font-weight: 680; }

.assume dd { margin: 0; color: var(--muted); }

.table-wrap { overflow-x: auto; max-width: 100%; }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

th { font-weight: 680; }

.related { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }

.related a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.85rem;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-weight: 600;
}

#error-summary {
  margin: 0 0 0.8rem;
  padding: 0.7rem 0.8rem;
  background: #f3e4d4;
  border-left: 3px solid #8a3b24;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 860px) {
  .site-header { height: 64px; }
  .bar {
    height: 64px;
    max-height: 64px;
    flex-wrap: nowrap;
    gap: 0.2rem;
    padding: 0 0.7rem;
  }
  .brand { min-height: 44px; margin-right: 0.2rem; }
  .brand img { width: auto; height: 32px; }
  .primary { flex-wrap: nowrap; }
  .primary a {
    min-height: 44px;
    padding: 0 0.4rem;
    font-size: 0.86rem;
  }
  .unit-row {
    position: static;
    height: auto;
    justify-content: flex-end;
    padding: 0.75rem 0 0.25rem;
  }
}

@media (min-width: 1024px) {
  .bar { padding-left: 3.5rem; padding-right: 14rem; }
  .unit-row { right: 1.5rem; }
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 2.5rem 3rem;
    align-items: stretch;
    margin: -0.5rem -1.25rem 0;
    padding: 0.5rem 0 0 3.5rem;
    min-height: 34rem;
  }
  .hero-copy {
    align-self: center;
    padding-bottom: 1rem;
  }
  .hero h1 { font-size: clamp(3.1rem, 4.4vw, 4.8rem); }
  .hero-photo { margin: 0; }
  .hero-photo img {
    width: 100%;
    height: 100%;
    min-height: 34rem;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center 62%;
  }
}

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .page-photo img { aspect-ratio: 16 / 9; }
  .workspace { grid-template-columns: 1fr; }
  .board { position: static; }
  .fields.two { grid-template-columns: 1fr; }
  .assume div { grid-template-columns: 1fr; gap: 0.2rem; }
  body.redesign { padding-bottom: 5.6rem; }
  #order-summary.order-summary {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    margin: 0;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
    background: var(--ink);
    color: var(--paper);
    border-top: 3px solid var(--amber);
    font-size: 1rem;
    font-weight: 620;
    line-height: 1.3;
  }
}

@media (min-width: 861px) {
  .fields.two .field.wide { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .purchase { grid-template-columns: 1fr; }
  .primary a { padding: 0 0.32rem; font-size: 0.8rem; }
  .unit-toggle button { min-width: 4.6rem; padding: 0 0.45rem; }
}

@media print {
  .site-header, .unit-row, .app-band, .app-line { display: none; }
  body.redesign { padding-bottom: 0; }
  #order-summary.order-summary { position: static; color: var(--ink); background: transparent; border: 0; }
  .board { color: var(--ink); background: transparent; }
}
