@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ink: #1c1b3a;
  --ink-soft: #55547a;
  --cobalt: #2f4bff;
  --cobalt-deep: #1f33c9;
  --pink: #ff6fae;
  --sun: #ffd23f;
  --paper: #ffffff;
  --wash: #eef1ff;
  --rule: #d6dbf5;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--wash);
}

a { color: inherit; }

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

.top, .foot {
  display: flex;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
}

.top { color: var(--paper); background: var(--cobalt); box-shadow: 0 0 0 100vmax var(--cobalt); clip-path: inset(0 -100vmax); }

.mark {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mark::before {
  content: "";
  width: 26px;
  height: 14px;
  border-radius: 14px 14px 6px 6px / 12px 12px 6px 6px;
  background: var(--sun);
  box-shadow: 4px 4px 0 var(--pink);
  transform: rotate(-8deg);
}

.top nav { display: flex; gap: 20px; font-weight: 600; font-size: 16px; }
.top nav a { text-decoration: none; opacity: 0.9; }
.top nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.hero {
  background: var(--cobalt);
  color: var(--paper);
  padding: 24px var(--gutter) 72px;
}

.hero-copy, .hero-grid, section > * { max-width: var(--max); margin-inline: auto; }

h1 {
  margin: 0 0 14px;
  font-weight: 800;
  font-size: clamp(44px, 7.2vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 12ch;
  margin-inline: 0;
}

.hero-copy { margin-bottom: 36px; }
.hero-copy p { margin: 0; max-width: 52ch; font-size: 20px; line-height: 1.55; color: #e3e7ff; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.picker {
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 10px 0 var(--cobalt-deep);
}

fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
fieldset:last-child { margin-bottom: 0; }
legend { padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 16px; line-height: 1.3; }

button { font: inherit; color: inherit; cursor: pointer; }

.chips, .systems { display: flex; flex-wrap: wrap; gap: 6px; }

.chips button, .systems button {
  border: 1.5px solid var(--rule);
  background: var(--paper);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
}

.chips button:hover, .systems button:hover { border-color: var(--ink); }

.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.systems button[aria-pressed="true"] { background: var(--sun); border-color: var(--ink); }

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  background: var(--wash);
  border-radius: 999px;
  padding: 4px;
}

.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 8px 20px; border-radius: 999px; font-weight: 700; font-size: 16px; line-height: 1.3; cursor: pointer; }
.segmented input:checked + span { background: var(--pink); color: var(--ink); }
.segmented input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 1px; }

.run {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 6px;
}

.run button {
  border: 1.5px solid var(--rule);
  background: var(--paper);
  border-radius: 10px;
  padding: 11px 2px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.run button:hover { border-color: var(--ink); }
.run button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: translateY(-2px); box-shadow: 0 3px 0 var(--pink); }

.box {
  position: sticky;
  top: 20px;
  background: var(--cobalt-deep);
  border-radius: 14px;
  padding: 56px 28px 32px;
  box-shadow: inset 0 -12px 0 rgba(0, 0, 0, 0.12);
}

.lid {
  position: absolute;
  inset: 0 0 auto;
  height: 30px;
  border-radius: 14px 14px 0 0;
  background: var(--pink);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.14);
}

.sticker {
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 18px 18px 16px;
  transform: rotate(-1.2deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.sticker.stamp { animation: stamp 0.28s cubic-bezier(.3, 1.6, .5, 1); }

@keyframes stamp {
  0% { transform: rotate(-1.2deg) scale(0.96); }
  100% { transform: rotate(-1.2deg) scale(1); }
}

.sticker-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.sticker-head strong { font-weight: 800; font-size: 30px; letter-spacing: -0.025em; line-height: 1.1; }
.sticker-head span { font-stretch: 85%; font-weight: 600; font-size: 16px; color: var(--ink-soft); text-align: right; }

.cells {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  border-top: 1.5px solid var(--ink);
  border-left: 1.5px solid var(--ink);
}

.cell {
  display: flex;
  flex-direction: column;
  padding: 8px 10px 9px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  min-width: 0;
}

.cell .k { font-stretch: 85%; font-weight: 700; font-size: 14px; line-height: 1.3; color: var(--ink-soft); }
.cell .v { font-weight: 800; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.12; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cell .v.long { font-size: clamp(20px, 2.2vw, 28px); white-space: nowrap; padding-top: 0.3em; }
.cell.is-known { background: var(--sun); }

.stamp .v { animation: rise 0.32s ease-out; }

@keyframes rise {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: none; }
}

.sticker-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 14px; }
.barcode { width: 46%; height: 38px; fill: var(--ink); flex: none; }
.source { margin: 0; font-stretch: 85%; font-size: 15px; line-height: 1.4; text-align: right; color: var(--ink-soft); }
.source a { color: var(--ink); font-weight: 700; }

.box-note { margin: 14px 4px 0; font-size: 15px; color: #dfe4ff; }
.box-note:empty { display: none; }

section:not(.hero) { padding: 72px var(--gutter) 0; }

h2 {
  margin: 0 auto 10px;
  font-weight: 800;
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lede { margin: 0 auto 26px; color: var(--ink-soft); }
.lede, h2 { max-width: var(--max); }

.table-wrap { background: var(--paper); border-radius: 18px; padding: 6px 20px; }

.match { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.match th, .match td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--rule); }
.match thead th { font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.match tbody tr:last-child > * { border-bottom: 0; }
.match tbody th { font-weight: 800; }
.match tbody th a { text-decoration: none; }
.match tbody th a:hover { text-decoration: underline; text-underline-offset: 3px; }
.match td { font-weight: 700; font-size: 18px; }
.match tbody th small { font-weight: 500; font-size: 14px; color: var(--ink-soft); }
.match tr.miss td { font-weight: 500; font-size: 15px; color: var(--ink-soft); }
.match tbody tr:hover { background: var(--wash); }

.strip {
  display: flex;
  gap: 10px;
  align-items: stretch;
  background: var(--paper);
  border-radius: 18px;
  padding: 26px 20px 20px;
  overflow-x: auto;
}

.stack { flex: 1 0 128px; display: flex; flex-direction: column; align-items: center; }

.pills {
  flex: 1;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.pill {
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.tone-0 .pill { background: #ffe0ee; }
.tone-1 .pill { background: #fff1bf; }
.tone-2 .pill { background: #dde3ff; }
.pill:hover { background: var(--sun); }

.stack .tick { margin-top: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; white-space: nowrap; }
.stack .count { font-size: 14px; color: var(--ink-soft); }

.brand-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.brand-grid a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--paper);
  border-radius: 14px;
  padding: 14px 16px;
  text-decoration: none;
  border: 1.5px solid transparent;
}

.brand-grid a:hover { border-color: var(--ink); }
.brand-grid strong { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; line-height: 1.25; }
.brand-grid span { font-size: 15px; line-height: 1.4; color: var(--ink-soft); }

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.steps li {
  counter-increment: step;
  background: var(--paper);
  border-radius: 18px;
  padding: 20px 22px 22px;
  position: relative;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--pink);
  font-weight: 800;
  font-size: 20px;
}

.steps strong { display: block; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 6px; }
.tip { margin-top: 18px; font-weight: 600; }

.foot {
  margin-top: 88px;
  background: var(--ink);
  box-shadow: 0 0 0 100vmax var(--ink);
  clip-path: inset(0 -100vmax);
  color: #c9cbe6;
  flex-wrap: wrap;
  padding-block: 30px;
}

.foot .mark { color: var(--paper); }
.foot p { margin: 0; max-width: 60ch; font-size: 15px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .box { position: relative; top: 0; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .top nav a:first-child { display: none; }
  .picker { padding: 18px; border-radius: 18px; }
  .box { padding: 50px 16px 22px; }
  .cell .v { font-size: 30px; }
  .table-wrap { padding: 2px 10px; }
  .match th, .match td { padding: 10px 6px; }
  .match .opt { display: none; }
  .match td { font-size: 17px; }
}

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

.brand-hero { padding-bottom: 56px; }
.brand-hero .gap { margin-top: 10px; font-weight: 600; color: var(--sun); }
.brand-hero .gap:empty { display: none; }

.cta {
  display: inline-block;
  margin-top: 24px;
  background: var(--sun);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--pink);
}

.cta:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--pink); }

.chart { padding-top: 56px; }
.match.full td { font-size: 17px; }
.match.full tbody tr:nth-child(even) { background: #f7f8ff; }
.match.full tbody tr:hover { background: #fff6d6; }
.match.full thead th { position: sticky; top: 0; background: var(--paper); }

section.about { padding-top: 48px; }

.about-card {
  background: var(--paper);
  border-radius: 18px;
  padding: 26px 28px 8px;
  box-shadow: 0 6px 0 var(--sun);
}

.about h2 { margin: 0 0 12px; font-size: clamp(24px, 2.8vw, 32px); }
.about p { margin: 0 0 18px; max-width: 68ch; }

.chart > p { margin: 0 auto 20px; color: var(--ink-soft); }
main > p { max-width: var(--max); margin: 36px auto 0; padding-inline: var(--gutter); font-size: 15px; color: var(--ink-soft); box-sizing: content-box; }

.table-wrap { overflow-x: auto; }
.match td.differs { background: #ffe0ee; box-shadow: inset 3px 0 0 var(--pink); }
.match.full tbody tr:hover td.differs { background: #ffd0e4; }

section.related { padding-top: 56px; }
.related h2 { font-size: clamp(24px, 2.8vw, 32px); margin-bottom: 14px; }
.related-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.related-list li { font-size: 16px; color: var(--ink-soft); }
.related-list li > a:only-child {
  display: inline-block;
  background: var(--paper);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 7px 15px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.related-list li > a:only-child:hover { border-color: var(--ink); }
.related-list li:not(:has(> a:only-child)) { flex-basis: 100%; }
.chart > .legend { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-top: -8px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; background: #ffe0ee; box-shadow: inset 3px 0 0 var(--pink); flex: none; }

section.guide { padding-top: 48px; }
.guide h2 { font-size: clamp(26px, 3.2vw, 36px); margin-top: 52px; margin-bottom: 16px; }
.guide > p { max-width: 68ch; margin-left: max(0px, calc((100% - var(--max)) / 2)); margin-bottom: 16px; }
.guide .steps { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.diagram { margin: 0 auto; background: var(--paper); border-radius: 22px; padding: clamp(12px, 3vw, 28px); box-shadow: 0 6px 0 var(--sun); }
.diagram svg { display: block; width: 100%; height: auto; font-family: "Archivo", system-ui, sans-serif; }

.needs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.needs li { background: var(--paper); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 16px; }

.guide-next { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 40px; }
.ghost { font-weight: 700; text-underline-offset: 4px; }
.tip a { text-underline-offset: 3px; }

section.explore .related { padding: 0; margin-top: 28px; }
section.explore .related h2 { font-size: clamp(20px, 2.2vw, 24px); margin-bottom: 12px; }
