/* PlayRank design system — round 2
   Single-authored. Builders consume these tokens and never redefine them.
   Every rule here answers a specific round-1 failure; the failure is named in the comment. */

:root{
  /* ---- Ground and surfaces ----
     Round 1: ground drifted (#0a0711 home/accel vs #120b1b scorecard). One value now. */
  --ink:#0a0711;          /* page ground, all pages */
  --night:#0f0918;        /* alternate section ground */
  --panel:#16101f;        /* the one card fill */
  --paper:#fff8f3;        /* light-section ground */
  --paper-ink:#17101d;    /* text on paper */

  /* ---- Accents ----
     Round 1: pink and cyan competed at equal strength with no rule, plus an
     undocumented orange appearing as a third accent in every gradient.
     Now: pink is the only brand/action accent. Cyan has exactly one job —
     it marks a winnable opportunity, which is the product's own semantics.
     Orange is deleted. */
  --pink:#ff2f6d;         /* brand + every primary action */
  --pink-deep:#c81450;    /* pink on paper, for contrast */
  --cyan:#5de8ff;         /* reserved: opportunity/winnable state only */
  --line:rgba(255,255,255,.16);
  --line-paper:rgba(23,16,29,.18);

  /* ---- Text ----
     Round 1: 6+ text colours per screen. Four, with one role each. */
  --fg:#ffffff;
  --fg-soft:#ded7e6;
  --fg-mute:#a79bb4;
  --fg-mute-paper:#5a4e63;

  /* ---- Type ----
     Round 1: 21 distinct sizes and 7 weights on the home page.
     Seven sizes, two weights, one display face. Display peaks at 68px, not 128px:
     all three craft critics named headline size as the single measurement to change. */
  --display:Impact,Haettenschweiler,'Arial Narrow Bold',sans-serif;
  --body:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
  --fs-hero:clamp(2.125rem,3.8vw,2.875rem); /* 34–46px — the one place boldness is spent */
  --fs-h2:clamp(1.625rem,2.5vw,2.125rem);   /* 26–34px, inside the reference's band */
  --fs-h3:1.125rem;                       /* 18px */
  --fs-lead:1.1875rem;                    /* 19px */
  --fs-body:1.0625rem;                    /* 17px */
  --fs-small:.875rem;                     /* 14px */
  --fs-label:.6875rem;                    /* 11px, uppercase, tracked */
  --w-reg:400;
  --w-bold:700;
  --track-label:.14em;

  /* ---- Measure ----
     Round 1: paragraphs ran to 1,180px (82% of frame) at up to 110 characters.
     Round 2 cut that to 60ch, and three craft critics independently measured the
     result at 72-78 characters and named the same fix: ~380px. 46ch is ~390px at
     17px. --measure-fine exists because round 2's small print ended up the widest
     text on the page, wider than the body copy it qualified. */
  /* NOTE ON UNITS, because this was wrong for four rounds: 1ch is the width of
     the "0" glyph, which in Inter is ~0.63em, while an average lowercase
     character is ~0.43em. So 46ch measured 492px and rendered ~67 characters,
     not 46 — which is why every craft critic from round 2 on measured 56-67
     characters against a token that claimed 46. These values are now set from
     measured character counts: 38ch renders ~55, 31ch ~45, 34ch ~50. */
  --measure:38ch;        /* ~404px at 17px, ~55 characters */
  --measure-tight:31ch;  /* ~330px, ~45 characters */
  --measure-fine:34ch;   /* ~300px at 14px, ~50 characters */

  /* ---- Spacing and shape ---- */
  --gutter:20px;
  --wrap:1120px;
  --s1:8px; --s2:14px; --s3:22px; --s4:34px; --s5:52px; --s6:80px;
  --section-y:clamp(72px,9vw,118px);
  --radius:2px;           /* Round 1: 3px on home, 0px on the other two. One value. */
  --control-h:50px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--ink);color:var(--fg-soft);
  font-family:var(--body);font-size:var(--fs-body);line-height:1.6;
  -webkit-font-smoothing:antialiased;overflow-x:hidden;
}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
img{display:block;max-width:100%}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.wrap{width:min(var(--wrap),calc(100% - (var(--gutter) * 2)));margin-inline:auto}
section{position:relative;padding-block:var(--section-y)}
/* Round 6: this was `section.paper`, so it only matched <section> elements. A
   builder put class="card paper" on a hero card, reported it as a light surface,
   and it rendered dark — the class was a no-op. Any element can be a paper
   surface now, and a card that is one overrides its own panel fill. */
.paper{background:var(--paper);color:var(--paper-ink)}
.card.paper{background:var(--paper);color:var(--paper-ink);border-color:var(--line-paper)}
section.night{background:var(--night)}

/* ---- Type components ---- */
.display{
  font-family:var(--display);font-weight:var(--w-bold);text-transform:uppercase;
  letter-spacing:.01em;line-height:.92;margin:0;color:var(--fg);
  text-wrap:balance;
}
.paper .display{color:var(--paper-ink)}
h1.display{font-size:var(--fs-hero)}
h2.display{font-size:var(--fs-h2)}
h3{font-size:var(--fs-h3);font-weight:var(--w-bold);margin:0;color:var(--fg)}
.paper h3{color:var(--paper-ink)}
/* li was never capped, only p — a Blueprint-page list ran 74 characters. */
p,li{margin:0;max-width:var(--measure)}

/* Round 1: the eyebrow, the nav link and the footer nav all landed within 1–2px
   of each other with no functional difference. One label component now. */
/* Round 2: the default colour here was cyan, which contradicted the accent rule
   at the top of this file. Labels are mute by default; cyan needs .label--flag
   and only ever marks a winnable opportunity. */
.label{
  font-size:var(--fs-label);font-weight:var(--w-bold);letter-spacing:var(--track-label);
  text-transform:uppercase;color:var(--fg-mute);margin:0 0 var(--s2);
}
.paper .label{color:var(--pink-deep)}
.label--mute{color:var(--fg-mute)}
.label--flag{color:var(--cyan)}

/* ---- The one tag component ----
   Round 2: status tags rendered as a bordered pill in one section and bare
   uppercase text in another, for the same job. One component, three states. */
.tag{
  display:inline-block;padding:4px 9px;border-radius:var(--radius);
  border:1px solid var(--line);background:transparent;color:var(--fg-mute);
  font-size:var(--fs-label);font-weight:var(--w-bold);letter-spacing:var(--track-label);
  text-transform:uppercase;white-space:nowrap;
}
.paper .tag{border-color:var(--line-paper);color:var(--fg-mute-paper)}
.tag--flag{border-color:var(--cyan);color:var(--cyan)}  /* opportunity only */
.tag--own{border-color:var(--pink);color:var(--pink)}   /* "PlayRank does this" */

.lead{font-size:var(--fs-lead);line-height:1.45;color:var(--fg);max-width:var(--measure)}
.paper .lead{color:var(--paper-ink)}
.small{font-size:var(--fs-small);max-width:var(--measure-fine)}
.mute{color:var(--fg-mute)}
.paper .mute{color:var(--fg-mute-paper)}

/* ---- The one button component ----
   Round 1: primary CTAs were 100deg pink→cyan→orange gradients with a cyan glow
   shadow, 180–828px wide, at two different radii across pages. Nine to ten
   gradient/glow events where the reference has zero.
   Now: solid fill, ink offset shadow (a print device, not a neon bloom),
   content width, one radius. Full width only below 520px. */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  min-height:var(--control-h);padding-inline:var(--s3);
  background:var(--pink);color:#fff;border:0;border-radius:var(--radius);
  font-size:var(--fs-label);font-weight:var(--w-bold);letter-spacing:.1em;
  text-transform:uppercase;cursor:pointer;
  box-shadow:5px 5px 0 #05030a;
  transition:transform .2s ease,box-shadow .2s ease;
  max-width:100%;text-align:center;
}
.btn:hover{transform:translate(3px,3px);box-shadow:2px 2px 0 #05030a}
.btn:focus-visible{outline:3px solid var(--cyan);outline-offset:4px}
.paper .btn{box-shadow:5px 5px 0 var(--paper-ink)}
.btn--ghost{
  background:transparent;color:var(--fg);border:1px solid var(--line);box-shadow:none;
}
.paper .btn--ghost{color:var(--paper-ink);border-color:var(--line-paper);box-shadow:none}
.btn--ghost:hover{transform:none;box-shadow:none;border-color:var(--pink)}
@media(max-width:520px){.btn{width:100%}}

/* ---- The one card component ----
   Round 1: seven distinct panel treatments in a handful of sections, including a
   three-row list whose third row was a bordered rounded card while rows one and
   two were borderless dividers. */
.card{
  border:1px solid var(--line);background:var(--panel);
  border-radius:var(--radius);padding:var(--s4);
}
.paper .card{border-color:var(--line-paper);background:transparent}
.card--flag{border-color:rgba(93,232,255,.55)}   /* the opportunity state, cyan's only job */

/* ---- Numbers ----
   Round 1: three numeric treatments doing one job — pink display numerals for
   steps, cyan boxed numerals for the countdown, small inline body numerals on
   the Accelerator page. One treatment, one colour.
   Round 2: it rendered --pink on dark and --pink-deep on paper with no rule
   licensing the difference, and at 28px it was the second-largest type in its
   frame while carrying only an ordinal. Licensed, and smaller.
   Round 4: a system critic pixel-sampled the renders and found .num rendering
   WHITE in the ticker strip and the score specimen, plus three different numeral
   sizes in one section. Numerals must take their colour from here, not from a
   section's own rule. A score specimen legitimately wants one big figure, so that
   is licensed as a single variant rather than invented per section. */
.num{
  font-family:var(--display);font-size:1.375rem;line-height:1;
  color:var(--pink);font-weight:var(--w-bold);
}
.paper .num{color:var(--pink-deep)}
.num--lg{font-size:var(--fs-h2)}     /* the one big figure: a score, a price */
.num--sub{font-size:var(--fs-body);color:var(--fg-mute)}  /* its denominator */

/* ---- Form controls ----
   Round 1: the same select rendered three ways; no focus, checked or error state
   existed anywhere; labels were placeholder-only so a filled form became
   unreadable; the consent checkbox was a 14px target gating every submit. */
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field > label{
  font-size:var(--fs-label);font-weight:var(--w-bold);letter-spacing:var(--track-label);
  text-transform:uppercase;color:var(--fg-mute);
}
.field input,.field select{
  min-height:var(--control-h);padding:0 14px;border-radius:var(--radius);
  border:1px solid var(--line);background:rgba(255,255,255,.05);color:var(--fg);
  min-width:0;width:100%;
}
.field input::placeholder{color:var(--fg-mute)}
.field select option{color:#111}
.field input:focus-visible,.field select:focus-visible{
  outline:2px solid var(--cyan);outline-offset:1px;border-color:var(--cyan);
}
.field input[aria-invalid="true"],.field select[aria-invalid="true"]{
  border-color:#ff8f8f;background:rgba(255,80,80,.09);
}
.field .hint{font-size:var(--fs-small);color:var(--fg-mute);max-width:var(--measure-fine)}
.field--optional > label:after{
  content:'Optional';margin-left:8px;letter-spacing:.06em;
  color:var(--fg-mute);font-weight:var(--w-reg);text-transform:none;
}

/* ---- One vocabulary for required and optional ----
   Round 5: a system critic found the consent boxes marking themselves with bold
   sentence-case lead-in words ("Required." / "Optional.") while the phone field
   used the muted, regular-weight appended label above — two treatments of one
   component, sitting next to each other on the same screen. This is the marker
   for anywhere the appended-label form cannot be used; it matches its language,
   and pink distinguishes the one the reader must act on. */
.mark{
  font-weight:var(--w-reg);color:var(--fg-mute);text-transform:none;
  letter-spacing:.06em;margin-right:7px;
}
.mark--req{color:var(--pink)}

.consent{
  display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start;
  font-size:var(--fs-small);line-height:1.5;color:var(--fg-soft);
  max-width:var(--measure-fine);
}
.consent input[type=checkbox]{
  width:24px;height:24px;margin:0;flex:none;accent-color:var(--pink);
  cursor:pointer;
}
.consent input[type=checkbox]:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.consent a{text-decoration:underline;text-underline-offset:2px}

.form-error{
  display:none;padding:12px 14px;border-radius:var(--radius);
  border:1px solid #ff8f8f;background:rgba(255,80,80,.12);color:#fff;
  font-size:var(--fs-small);font-weight:var(--w-bold);
}
.form-error.show{display:block}

/* ---- Motion ----
   Round 1: a 24s marquee and a live minutes digit sat in the reading path.
   Reveals start visible and animate from a resting state, never from opacity:0. */
.reveal{transition:transform .7s ease,opacity .7s ease}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal,.btn{transition:none}
  *{animation:none!important}
}
