:root {
  --ink: #111214;
  --ink-2: #3b3e45;
  --muted: #6b707a;
  --line: #e3e6eb;
  --line-2: #cfd4dc;
  --paper: #fefefe;
  --tint: #f5f7fa;
  --blue: #1256ff;
  --blue-ink: #0b3fcc;
  --blue-tint: #eaf0ff;
  --red: #e0413a;
  --red-tint: #fdeceb;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  --wrap: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
  font-variant-ligatures: none;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ─── nav ─── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font: 26px/1 var(--display); letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.nav nav { display: flex; gap: 36px; font-size: 14px; }
.nav nav a { text-decoration: none; }
.nav nav a:hover { color: var(--blue); }

/* ─── hero ─── */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding-top: 28px;
}
.hero-copy { position: relative; z-index: 1; padding: 0 0 18px 110px; }
.name { margin: 0; display: flex; flex-direction: column; align-items: flex-start; }
.wordmark {
  font: clamp(96px, 17vw, 208px)/0.82 var(--display);
  letter-spacing: -0.045em;
}
.the {
  margin: 10px 0 0 6px;
  padding: 2px 10px 4px;
  border: 0;
  background: var(--blue);
  color: #fff;
  font: clamp(22px, 3.2vw, 38px)/1.1 var(--display);
  letter-spacing: -0.01em;
  transform: rotate(-2deg);
  transition: transform .15s ease;
}
.the:hover { transform: rotate(-4deg) scale(1.03); }
.the:active { transform: rotate(0) scale(.98); }
#title-word { display: inline-block; }
.tagline {
  margin: 18px 0 0;
  font-size: clamp(18px, 2.5vw, 32px);
  font-weight: 700;
  letter-spacing: 0.02em;
  word-spacing: 0.15em;
}
.mascot {
  width: clamp(220px, 30vw, 370px);
  margin: -8px 20px -4px -40px;
  position: relative;
  z-index: 0;
  animation: bob 5s ease-in-out infinite;
  transform-origin: 50% 90%;
}
@keyframes bob {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(-1.2deg) translateY(-2px); }
}

/* ─── the desk (tool) ─── */
.desk { position: relative; z-index: 2; padding-bottom: 8px; }
.card {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 18px 24px 16px;
  margin: 0 0 28px;
  box-shadow: 6px 6px 0 var(--ink);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.tabs { display: flex; gap: 6px; }
.tabs [role=tab] {
  position: relative;
  background: none; border: 0;
  padding: 6px 14px 8px;
  font-size: 13px; color: var(--ink-2);
  border-bottom: 2px solid transparent;
}
.tabs [role=tab][aria-selected=true] { color: var(--blue); font-weight: 500; border-bottom-color: var(--blue); }
.tabs [role=tab].filled::after {
  content: ''; position: absolute; top: 6px; right: 4px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue);
}

.input-box {
  border: 1px solid var(--line-2);
  background: var(--paper);
  transition: border-color .15s;
}
.input-box:focus-within { border-color: var(--ink); }
.input-box textarea {
  display: block; width: 100%;
  min-height: 108px; resize: vertical;
  border: 0; outline: 0; background: transparent;
  padding: 16px 16px 4px;
  font: 14px/1.6 var(--mono); color: var(--ink);
  tab-size: 2;
}
.input-box textarea::placeholder { color: #a3a8b1; }
.input-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 8px 0 0 12px; }
.link-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 8px 4px 12px; font-size: 13px; }
.link-btn:hover { color: var(--blue); }
.ask {
  min-width: 246px;
  background: var(--blue); color: #fff;
  border: 0; padding: 16px 28px;
  font-size: 19px; font-weight: 700; letter-spacing: 0.02em;
  transition: background .15s, transform .1s;
}
.ask:hover { background: var(--blue-ink); }
.ask:active { transform: translateY(1px); }
.ask[aria-busy=true] { opacity: .8; cursor: progress; }

.drop {
  display: grid; place-items: center;
  min-height: 108px; margin: 12px 12px 0;
  border: 1.5px dashed var(--line-2);
  background: var(--tint);
  cursor: pointer; color: var(--muted); font-size: 13px;
  text-align: center; padding: 12px;
}
.drop.over { border-color: var(--blue); color: var(--blue); background: var(--blue-tint); }
.drop img { max-height: 220px; border: 1px solid var(--line); }
.drop-note { margin: 8px 12px 0; font-size: 12px; color: var(--muted); }

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.try { background: none; border: 0; padding: 0; color: var(--blue); font-size: 15px; font-weight: 500; }
.try:hover { text-decoration: underline; text-underline-offset: 4px; }
kbd { font: 11px var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; padding: 0 4px; border-radius: 3px; color: var(--ink-2); }

/* ─── merv's take ─── */
.take { border-top: 1px solid var(--line); padding: 20px 0 8px; }
.take-label {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px 26px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
}
.take-label .pill { padding: 2px 8px; background: var(--blue-tint); color: var(--blue); letter-spacing: .04em; }
.take-label .pill.guess { background: var(--red-tint); color: var(--red); }
.take-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.col { padding: 0 26px 12px; min-width: 0; }
.col + .col { border-left: 1px solid var(--line-2); }
.col h3 { margin: 0 0 14px; font-size: 18px; font-weight: 800; }
.num { color: var(--blue); margin-right: 4px; }
.col p { margin: 0 0 12px; color: var(--ink-2); }
.col code { font: 500 0.92em var(--mono); background: var(--tint); padding: 1px 4px; color: var(--ink); overflow-wrap: anywhere; }
.col em { font-style: normal; font-weight: 700; color: var(--ink); }
.evidence {
  font-size: 13px; padding: 8px 10px;
  background: var(--red-tint); border-left: 3px solid var(--red);
  color: var(--ink) !important;
  overflow-wrap: anywhere;
}
.evidence b { color: var(--red); font-weight: 700; }
.snippet {
  margin: 0; padding: 12px 14px;
  background: var(--tint);
  font: 13px/1.65 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.snippet code { background: none; padding: 0; }
.snippet .c { color: #8a8f99; }
.checks { list-style: none; margin: 0 0 18px; padding: 0; }
.checks li { margin: 0 0 8px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.checks input { appearance: none; flex: none; width: 18px; height: 18px; margin: 2px 0 0; border: 1.5px solid var(--ink-2); background: var(--paper); display: grid; place-items: center; cursor: pointer; }
.checks input:checked { background: var(--blue); border-color: var(--blue); }
.checks input:checked::after { content: ''; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.checks input:checked + span { text-decoration: line-through; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ghost {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1.5px solid var(--ink);
  padding: 9px 16px; font-size: 13px; font-weight: 500;
  transition: background .15s;
}
.ghost:hover { background: var(--tint); }

.take.fresh .col { animation: rise .35s ease both; }
.take.fresh .col:nth-child(2) { animation-delay: .07s; }
.take.fresh .col:nth-child(3) { animation-delay: .14s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ─── how it works ─── */
.how { border-top: 1px solid var(--line); margin-top: 28px; padding: 22px 0; }
.how ol { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; }
.how li { counter-increment: step; padding: 0 26px; font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }
.how li + li { border-left: 1px solid var(--line-2); }
.how strong { color: var(--ink); font-weight: 700; }
.how strong::before { content: counter(step) '. '; }

/* ─── footer ─── */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 16px 0 28px; font-size: 12px; color: var(--ink-2); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; font-size: 13px; z-index: 10;
}

/* ─── smaller screens ─── */
@media (max-width: 980px) {
  .hero-copy { padding-left: 0; }
  .take-grid, .how ol { grid-template-columns: 1fr; }
  .col + .col, .how li + li { border-left: 0; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 6px; }
  .col, .how li { padding-inline: 4px; }
  .take-label { margin-left: 4px; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .nav nav { gap: 14px; font-size: 12px; }
  .nav nav a:last-child { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .mascot { order: -1; width: 230px; margin: 0 auto -18px; }
  .hero-copy { padding-bottom: 20px; text-align: left; }
  .card { padding: 16px 14px 14px; box-shadow: 4px 4px 0 var(--ink); }
  .card-head { flex-direction: column; align-items: flex-start; }
  .tabs [role=tab] { padding-inline: 8px; }
  .input-foot { flex-direction: column-reverse; align-items: stretch; padding: 8px 0 0; }
  .link-btn { padding-left: 12px; }
  .ask { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot, .take.fresh .col { animation: none; }
  html { scroll-behavior: auto; }
}
