:root {
  /* --page is the app's off-white (--sidebar in the app's tokens.css). The rest are arubi9/parser-website tokens. */
  --page: #fafafa;
  --ink: #0d0d0d;
  --muted: #6b6b6b;
  --rule: #8f8f8f;
  --sky: #8ec0ee;
  --sky-hover: #7cb6ea; /* one small step darker: the same 11% step Instinct's brush takes on hover */
  --chip: #d4d4d4; /* the app's input border */
  --focus: #0a5ce6;
  --danger: #d42f25;
  --card: #ffffff; /* the app's card and border tokens, for the dialog */
  --line: #e5e5e5;
  /* The spring Instinct uses for its hover pop. Browsers without linear() (pre-2023) show the badge without the pop. */
  --ease-pop: linear(0, .092, .296, .528, .736, .897, 1.004, 1.063, 1.085, 1.084, 1.068, 1.049, 1.029, 1.014, 1.003, .996, .993, .993, .993, .995, .997, .998, .999, 1);
  --hidden-scale: 0;
}
html { font-size: 90%; background: var(--page); } /* every rem below, type and logo included, is 10% smaller */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink); /* the lead is set apart by weight alone, as on Instinct */
  /* shortcut: system serif, no webfont. Self-host a licensed serif when the exact Instinct feel matters. */
  font: 400 clamp(1.2rem, 1rem + 1vw, 1.5rem) / 1.3 "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--sky); color: var(--ink); }
main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.9em;
  max-width: calc(31em + 4rem); /* ~62 characters a line, as on Instinct */
  padding: 2.5rem 2rem 20vh;
}
.logo { display: block; height: 24px; width: auto; margin-bottom: 1.5rem; } /* a signature, not a heading */
h1, h2, p { margin: 0; font: inherit; }
/* Iowan/Palatino have no 600, so this lands on their bold. */
h1, h2 { font-weight: 600; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 2px; }

/* Load-in: each block rises 8px and fades in, 90ms after the one before (site.js sets --reveal). */
.js-reveal:not(.is-revealed) main > * { opacity: 0; }
.js-reveal.is-revealed main > * { animation: rise .6s cubic-bezier(.22, 1, .36, 1) calc(var(--reveal, 0) * 90ms) both; }
@keyframes rise { from { opacity: 0; translate: 0 8px; } }

/* "It can" items: a hairline underline; hovering pops a sky badge out of the cursor. */
.can { position: relative; }
.t {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-decoration: underline 1px var(--rule);
  text-underline-offset: calc(.1em + 1px);
}
.anchor { position: absolute; left: var(--x, 0); top: var(--y, 0); } /* site.js moves it to the pointer */
.reaction {
  position: absolute;
  bottom: .25em;
  left: .25em;
  display: grid;
  place-items: center;
  width: 1.48em;
  height: 1.48em;
  border-radius: 50%;
  background: var(--sky);
  pointer-events: none;
  opacity: 0;
  scale: var(--hidden-scale);
  transform-origin: 0 100%; /* grows out of the cursor */
  transition: scale .15s, opacity .15s;
}
.reaction svg { display: block; width: .83em; height: .83em; scale: var(--hidden-scale); }
.t.is-reacting .reaction { opacity: 1; scale: 1; transition: scale .5s var(--ease-pop), opacity .12s; }
.t.is-reacting .reaction svg { scale: 1; transition: scale .43s .07s var(--ease-pop); }
@media (hover: hover) {
  .t:hover { text-decoration-color: var(--ink); }
  .t:hover .reaction { opacity: 1; scale: 1; transition: scale .5s var(--ease-pop), opacity .12s; }
  .t:hover .reaction svg { scale: 1; transition: scale .43s .07s var(--ease-pop); }
}
/* Moving straight from one item to the next swaps the badge without replaying the pop. */
.can.is-warm :is(.reaction, .reaction svg) { transition: none; }

svg.line { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Calls to action: a sky brush stroke that draws in on load and darkens a step on hover, as on Instinct. */
nav { display: flex; flex-direction: column; gap: .5em; }
.cta { width: fit-content; color: var(--ink); font-weight: 600; text-decoration: none; }
button.cta { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; }
.cta span { position: relative; isolation: isolate; }
.cta span::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 .13em;
  height: .42em;
  background-color: var(--sky);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 8' preserveAspectRatio='none'%3E%3Cpath d='M1 2.3C8 1.3 15 1.7 22 1.1 29 .6 37 1.4 44 .9 50 .5 55 1.2 59 1.5 59.8 3 59.5 5 59 6.6 52 7.3 45 6.8 38 7.2 30 7.6 22 6.9 14 7.4 9 7.6 4 7.1.8 6.6.2 5 .3 3.4 1 2.3Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  scale: 1.05;
  transition: background-color .15s;
}
.js-reveal.is-revealed .cta span::before { animation: brush-draw .7s cubic-bezier(.33, 1, .68, 1) calc(var(--reveal, 0) * 90ms + .25s) both; }
@keyframes brush-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@media (hover: hover) { .cta:hover span::before { background-color: var(--sky-hover); } }
.cta svg { display: inline-block; width: .9em; height: .9em; margin-left: .1em; vertical-align: -.18em; stroke-width: 1.8; }

/* Request access dialog: Parser's modal (a white card, 16px corners, large shadow) popping in over a soft scrim. */
.modal {
  width: min(30rem, 100vw - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .16);
  overflow: auto;
}
.modal[open] { animation: pop .16s cubic-bezier(.2, 0, 0, 1); }
.modal::backdrop { background: rgba(13, 13, 13, .25); }
.modal[open]::backdrop { animation: fade .16s; }
@keyframes pop { from { opacity: 0; scale: .97; } }
html:has(.modal[open]) { overflow: hidden; } /* the page behind stays put */
.modal-body { display: flex; flex-direction: column; gap: 1.25em; padding: 2rem 2rem 2.25rem; }
.modal h2 { padding-right: 2rem; } /* never under the close button, even on a phone */
.close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: background-color .15s;
}
.close:hover { background: var(--page); }
.close svg { width: 1.1rem; height: 1.1rem; }
.sent { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25em; }
.sent[hidden] { display: none; }
.form-error { font-size: .7em; color: var(--danger); }

/* Request access form: hairline fields in the page's own type; the button is a call to action. */
.form { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25em; width: 100%; }
.form[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: .25em; width: 100%; }
.field > span { font-size: .7em; color: var(--muted); }
.field input {
  width: 100%;
  padding: .15em 0 .3em;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  appearance: none;
  transition: border-color .15s;
}
.field input:focus { outline: none; border-bottom: 2px solid var(--focus); padding-bottom: calc(.3em - 1px); }
.field input:user-invalid { border-bottom-color: var(--danger); }

/* Monthly volume: four pills instead of a dropdown, so every option is visible and one click picks it.
   Real radio inputs sit invisibly on top of each pill, so keyboard, required and the form data work as usual. */
.choices { min-width: 0; margin: 0; padding: 0; border: 0; }
.choices legend { margin-bottom: .5em; padding: 0; font-size: .7em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .4em; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: block;
  padding: .3em .85em;
  border: 1px solid var(--chip);
  border-radius: 999px;
  font-size: .75em;
  transition: background-color .15s, border-color .15s;
}
@media (hover: hover) { .chip:hover span { border-color: var(--ink); } }
.chip input:checked + span { border-color: var(--sky); background: var(--sky); font-weight: 600; } /* weight marks it without colour too */
@media (hover: hover) { .chip:hover input:checked + span { border-color: var(--sky-hover); background: var(--sky-hover); } }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.choices.is-invalid .chip span { border-color: var(--danger); } /* site.js sets it: Chrome gives radio groups no :user-invalid */

.note { font-size: .75em; color: var(--muted); }
.legal { display: flex; flex-wrap: wrap; gap: .4em 1.5em; font-size: .6em; color: var(--muted); }
.legal a { text-decoration: none; }
.legal a:hover { color: var(--ink); }

/* Reduced motion: blocks fade without rising, the badge fades without growing, the brush is simply there. */
@media (prefers-reduced-motion: reduce) {
  :root { --hidden-scale: 1; }
  .js-reveal.is-revealed main > * { animation: fade .3s both; }
  .js-reveal.is-revealed .cta span::before { animation: none; }
  .modal[open] { animation: fade .16s; }
}
@keyframes fade { from { opacity: 0; } }
