/* =============================================================================
   style.css :: structure, type and colour
   Design direction: "Chevron". The Progress Pride chevron is the structural
   device throughout, because it points forward and means progress unfinished.
   ============================================================================= */

:root {
  /* Canvas :: light theme.
     Paper is very slightly warm-pink rather than pure white, so the flag
     colours sit on it without looking like they are floating on a screenshot. */
  --paper:      #FBF7FA;   /* page background */
  --panel:      #F3ECF2;   /* tinted section bands and cards */
  --panel-alt:  #EBE0EA;   /* hover state */
  --text:       #1E0A1B;   /* deep aubergine, primary text */
  --text-dim:   #6B5566;   /* secondary text */
  --line:       rgba(30, 10, 27, 0.14);

  /* Accents, drawn from the flags but darkened to clear AA contrast on paper */
  --magenta: #C2185B;
  --amber:   #9A6100;
  --cyan:    #06697A;
  --lilac:   #6D3E9E;
  --jade:    #12734F;
  --coral:   #C03A25;
  --violet:  #5B3BC4;
  --sun:     #8A6A00;

  --accent: var(--magenta);

  /* Type */
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body:    "Newsreader", Georgia, "Times New Roman", serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Scale */
  --step--1: clamp(0.82rem, 0.78rem + 0.2vw, 0.92rem);
  --step-0:  clamp(1rem, 0.95rem + 0.3vw, 1.14rem);
  --step-1:  clamp(1.3rem, 1.15rem + 0.7vw, 1.7rem);
  --step-2:  clamp(1.7rem, 1.4rem + 1.5vw, 2.6rem);
  --step-3:  clamp(2.2rem, 1.6rem + 3vw, 4rem);
  --step-4:  clamp(3rem, 1.8rem + 6vw, 7.5rem);

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --stack:  clamp(4rem, 10vh, 9rem);
  --maxw:   1180px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .eyebrow, .mono { font-family: var(--display); }

h2 {
  font-size: var(--step-3);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

h3 {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

p { margin: 0 0 1rem; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 999;
  font-family: var(--mono);
}
.skip-link:focus { left: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.lede {
  font-size: var(--step-1);
  color: var(--text-dim);
  max-width: 46ch;
  line-height: 1.5;
}

.fineprint {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--text-dim);
  margin-top: 3rem;
}

/* -----------------------------------------------------------------------------
   SIGNATURE :: the chevron rail down the left edge
   -------------------------------------------------------------------------- */
.rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  z-index: 40;
  pointer-events: none;
}
.rail__track {
  position: absolute;
  inset: 0;
  background: rgba(30, 10, 27, 0.08);
}
.rail__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(
    to bottom,
    #FFFFFF 0%, #FFAFC8 8%, #74D7EE 16%, #613915 24%, #000000 30%,
    #E40303 40%, #FF8C00 52%, #FFED00 64%, #008026 76%, #004DFF 88%, #750787 100%
  );
}

/* Section dot navigation */
.dots {
  position: fixed;
  right: clamp(0.5rem, 1.5vw, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.dots a {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(30, 10, 27, 0.20);
  transition: background 0.3s, transform 0.3s;
  position: relative;
}
.dots a::after {
  content: attr(data-tip);
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  padding: 0.3rem 0.55rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  color: var(--text);
}
.dots a:hover::after, .dots a:focus-visible::after { opacity: 1; }
.dots a.is-active { background: var(--magenta); transform: scale(1.7); }

@media (max-width: 760px) { .dots { display: none; } }

/* -----------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(5rem, 12vh, 9rem) var(--gutter) 6rem;
  overflow: hidden;
}

.hero__flag {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: min(62vw, 780px);
  opacity: 0.30;
  filter: blur(0.4px);
  pointer-events: none;
}
.hero__flag svg { width: 100%; height: auto; display: block; }

@media (max-width: 760px) {
  .hero__flag {
    top: 84%;
    right: -28%;
    width: 130vw;
    opacity: 0.13;
  }
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero__headline {
  font-family: var(--display);
  font-size: var(--step-4);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin: 0 0 1.5rem;
  max-width: 14ch;
  text-wrap: balance;
}

.hero__subhead {
  font-size: var(--step-1);
  max-width: 40ch;
  color: var(--text-dim);
  line-height: 1.5;
}

.hero__anchor {
  margin-top: clamp(2rem, 6vh, 4rem);
  padding-left: 1.5rem;
  border-left: 3px solid var(--magenta);
  max-width: 34ch;
}
.hero__anchor .num {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 800;
  letter-spacing: -0.03em;
  display: block;
  line-height: 1;
}
.hero__anchor .cap {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--text-dim);
  display: block;
  margin-top: 0.6rem;
  line-height: 1.5;
}
.hero__anchor .src {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  display: block;
  margin-top: 0.5rem;
}

.hero__cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  z-index: 2;
  text-align: center;
}

/* -----------------------------------------------------------------------------
   SECTIONS
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  padding: var(--stack) var(--gutter);
}
.section > * { max-width: var(--maxw); margin-inline: auto; }

.section--tint { background: var(--panel); }
.section--tint::before,
.section--tint::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: clamp(28px, 4vw, 60px);
  background: var(--panel);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
}
.section--tint::before { top: calc(-1 * clamp(28px, 4vw, 60px)); clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.section--tint::after  { bottom: calc(-1 * clamp(28px, 4vw, 60px)); }

.section--quiet { padding-block: clamp(3rem, 8vh, 6rem); }

.section__head { margin-bottom: clamp(3rem, 7vh, 5rem); }

.land {
  font-size: var(--step-1);
  font-style: italic;
  line-height: 1.5;
  max-width: 58ch;
  color: var(--text-dim);
  border-left: 3px solid var(--amber);
  padding-left: 1.5rem;
  margin: 0;
}

/* -----------------------------------------------------------------------------
   ACRONYM LETTERS
   -------------------------------------------------------------------------- */
.letters { display: flex; flex-direction: column; border-top: 1px solid var(--line); }

.letter {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(min(120px, 100%), 1fr) 3fr;
  gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(1.75rem, 4vw, 3rem) 0;
  transition: background 0.4s ease;
  position: relative;
}
.letter:hover { background: var(--panel); }

.letter::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--letter-accent);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.letter:hover::before { width: 4px; }

.letter__glyph {
  font-family: var(--display);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.06em;
  color: var(--letter-accent);
  padding-left: clamp(0.75rem, 2vw, 1.5rem);
}

.letter__term {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 0.35rem;
}
.letter__short {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--letter-accent);
  margin: 0 0 1.1rem;
  line-height: 1.5;
}
.letter__body { max-width: 58ch; margin: 0 0 1.25rem; }
.letter__key {
  border-left: 2px solid var(--letter-accent);
  padding-left: 1rem;
  font-size: var(--step--1);
  font-family: var(--mono);
  line-height: 1.6;
  color: var(--text);
  max-width: 54ch;
  margin: 0;
}

@media (max-width: 700px) {
  .letter { grid-template-columns: 1fr; gap: 0.75rem; }
  .letter__glyph { padding-left: 1rem; }
  .letter__term, .letter__short, .letter__body, .letter__key { padding-left: 1rem; }
}

/* -----------------------------------------------------------------------------
   STATS
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.stat {
  background: var(--panel);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  transition: background 0.35s ease;
}
.stat:hover { background: var(--panel-alt); }

.stat__value {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.2vw, 3.85rem);
  max-width: 100%;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--stat-accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.75rem;
}
.stat__value--long { font-size: clamp(2rem, 4.2vw, 3.1rem); }

.stat__label {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.stat__note {
  font-size: var(--step--1);
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}
.stat__source {
  min-height: 44px;
  display: flex;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  text-decoration: none;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
  line-height: 1.5;
}
.stat__source:hover { color: var(--stat-accent); }

/* -----------------------------------------------------------------------------
   FLAGS
   -------------------------------------------------------------------------- */
.flags {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.flag {
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s;
}
.flag:hover { transform: translateY(-6px); border-color: rgba(30, 10, 27, 0.32); }
.flag--featured { grid-column: 1 / -1; }

/* Side-by-side on wide screens so the flag keeps its true 5:3 geometry.
   Forcing a different aspect ratio here distorts the chevron angle, because
   the SVG is drawn with preserveAspectRatio="none". */
@media (min-width: 820px) {
  .flag--featured {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }
  .flag--featured .flag__art { aspect-ratio: auto; height: 100%; min-height: 260px; }
  .flag--featured .flag__body { display: flex; flex-direction: column; justify-content: center; }
}

.flag__art { width: 100%; aspect-ratio: 5 / 3; overflow: hidden; }
.flag__art svg { width: 100%; height: 100%; display: block; }

.flag__body { padding: clamp(1.1rem, 2.2vw, 1.75rem); }
.flag__name {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.2rem;
}
.flag__designer {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 0.9rem;
}
.flag__meaning { font-size: var(--step--1); line-height: 1.65; margin: 0 0 1rem; color: var(--text-dim); }

.flag__swatches { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.flag__swatch {
  font-family: var(--mono);
  font-size: 0.6rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--line);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.flag__chip { width: 9px; height: 9px; display: inline-block; }

/* -----------------------------------------------------------------------------
   PRONOUN LAB
   -------------------------------------------------------------------------- */
.pronoun-lab {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(1.5rem, 3.5vw, 3rem);
  margin-bottom: clamp(3rem, 6vh, 4.5rem);
}

.pronoun-lab__picker { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }

.pill {
  font-family: var(--mono);
  font-size: var(--step--1);
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
.pill:hover { color: var(--text); border-color: var(--text-dim); }
.pill[aria-selected="true"] {
  background: var(--magenta);
  border-color: var(--magenta);
  color: var(--paper);
  font-weight: 700;
}

.pronoun-lab__sample {
  font-size: var(--step-2);
  font-family: var(--body);
  line-height: 1.35;
  max-width: 30ch;
  margin: 0 0 1rem;
}
.pronoun-lab__sample .swap {
  color: var(--magenta);
  font-style: italic;
  font-weight: 400;
}

.pronoun-lab__note {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--text-dim);
  max-width: 52ch;
  border-left: 2px solid var(--magenta);
  padding-left: 1rem;
  margin: 0 0 2rem;
  line-height: 1.6;
}

.pronoun-lab__table { overflow-x: auto; }
.pronoun-lab__table table { width: 100%; border-collapse: collapse; min-width: 560px; }
.pronoun-lab__table th,
.pronoun-lab__table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--step--1);
}
.pronoun-lab__table th {
  color: var(--text-dim);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
.pronoun-lab__table tr.is-current td { color: var(--magenta); background: rgba(194, 24, 91, 0.08); }

.etiquette {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.etiquette__item {
  background: var(--panel);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.25rem, 2.5vw, 2rem);
}
.etiquette__item h3 { font-size: var(--step-0); color: var(--amber); margin-bottom: 0.5rem; }
.etiquette__item p { font-size: var(--step--1); color: var(--text-dim); line-height: 1.65; margin: 0; }

/* -----------------------------------------------------------------------------
   REPRESENTATION
   -------------------------------------------------------------------------- */
.rep { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.rep__item { border-top: 3px solid var(--magenta); padding-top: 1.5rem; }
.rep__item:nth-child(2) { border-color: var(--cyan); }
.rep__item:nth-child(3) { border-color: var(--amber); }
.rep__item:nth-child(4) { border-color: var(--jade); }
.rep__item h3 { font-size: var(--step-1); }
.rep__item p { font-size: var(--step--1); color: var(--text-dim); line-height: 1.7; }
.rep__stat {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 0.4rem 0.7rem;
  display: inline-block;
}

/* -----------------------------------------------------------------------------
   TIMELINE
   -------------------------------------------------------------------------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }

.tl {
  display: grid;
  grid-template-columns: clamp(52px, 8vw, 110px) 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  position: relative;
}
.tl__year {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--amber);
  text-align: right;
  padding-top: 0.35rem;
  letter-spacing: 0.05em;
}
.tl__body {
  position: relative;
  padding-left: 1.5rem;
  padding-bottom: clamp(2rem, 4vh, 3rem);
  border-left: 1px solid var(--line);
}
.tl:last-child .tl__body { border-left-color: transparent; }
.tl__body::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.7rem;
  width: 10px;
  height: 10px;
  background: var(--amber);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.tl__title { font-family: var(--display); font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
.tl__text { font-size: var(--step--1); color: var(--text-dim); line-height: 1.7; max-width: 60ch; margin: 0; }
.tl:last-child .tl__body::before { background: var(--magenta); }
.tl:last-child .tl__year { color: var(--magenta); }

/* -----------------------------------------------------------------------------
   RESOURCES
   -------------------------------------------------------------------------- */
.resources { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.res {
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.25rem, 2.5vw, 1.9rem);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.3s;
}
.res:hover { background: var(--panel); }
.res__kind {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  display: block;
  margin-bottom: 0.6rem;
}
.res__name { font-family: var(--display); font-weight: 600; font-size: var(--step-0); letter-spacing: -0.01em; margin: 0 0 0.35rem; }
.res__detail { font-size: var(--step--1); color: var(--text-dim); margin: 0; line-height: 1.55; }

/* -----------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer { background: var(--panel); border-top: 1px solid var(--line); padding: clamp(3rem, 8vh, 5rem) var(--gutter); }
.footer__inner { max-width: var(--maxw); margin-inline: auto; }
.footer__mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-2);
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  background: linear-gradient(90deg, #C81E1E, #C05600, #9A6100, #12734F, #1B4FD8, #6D3E9E);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer__sources h3 { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.9rem; }
.footer__sources ul { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 0.5rem; }
.footer__sources a { font-size: var(--step--1); color: var(--text-dim); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 0.4rem; display: block; }
.footer__sources a:hover { color: var(--magenta); border-color: var(--magenta); }
.footer__credit { font-family: var(--mono); font-size: 0.68rem; color: var(--text-dim); line-height: 1.7; max-width: 60ch; }

/* -----------------------------------------------------------------------------
   FOUNDATIONS :: the five axes, the comparison table, the mix-ups
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.axes {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(3.5rem, 8vh, 6rem);
}

.axis {
  display: grid;
  grid-template-columns: clamp(76px, 9vw, 116px) 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.axis::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--axis-accent);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.axis:hover::before { width: 4px; }

.axis__rail { padding-left: clamp(0.5rem, 2vw, 1.25rem); }

.axis__num {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--axis-accent);
}
.axis__kind {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.axis__term {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 0.35rem;
}
.axis__plain {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--axis-accent);
  margin: 0 0 1rem;
}
.axis__def { max-width: 60ch; margin: 0 0 1.1rem; }

.axis__examples {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}
.axis__examples li {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--line);
  padding: 0.3rem 0.6rem;
  color: var(--text-dim);
  background: var(--paper);
}

@media (max-width: 700px) {
  .axis { grid-template-columns: 1fr; gap: 0.9rem; }
  .axis__rail { display: flex; align-items: baseline; gap: 0.75rem; }
  .axis__num { font-size: 1.5rem; }
  .axis__kind { margin-top: 0; }
  .axis__main { padding-left: clamp(0.5rem, 2vw, 1.25rem); }
}

/* --- The three-person comparison table ---------------------------------- */
.profiles {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  margin-bottom: clamp(3rem, 6vh, 4.5rem);
}
.profiles__heading { font-size: var(--step-1); margin-bottom: 0.5rem; }
.profiles__body {
  font-size: var(--step--1);
  color: var(--text-dim);
  max-width: 60ch;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

.profiles__table { overflow-x: auto; }
.profiles__table table { width: 100%; border-collapse: collapse; min-width: 620px; }

.profiles__table th,
.profiles__table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--step--1);
  vertical-align: top;
}

.profiles__table thead th { border-bottom: 2px solid var(--text); }

.profiles__label {
  display: block;
  font-family: var(--display);
  font-size: var(--step-0);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.profiles__summary {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.66rem;
  line-height: 1.45;
  color: var(--text-dim);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
}

.profiles__table tbody th {
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.profiles__table tbody tr:nth-child(odd) td { background: var(--panel); }

/* --- Common mix-ups ------------------------------------------------------ */
.confusions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.confusion {
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.25rem, 2.5vw, 1.9rem);
}
.confusion__wrong {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-dim);
  text-decoration: line-through;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
}
.confusion__wrong::before {
  content: "\00D7";
  position: absolute;
  left: 0;
  top: -0.05em;
  color: var(--coral);
  font-size: 1.2em;
  text-decoration: none;
}
.confusion__right {
  font-size: var(--step--1);
  line-height: 1.7;
  margin: 0;
  padding-left: 1.5rem;
  position: relative;
}
.confusion__right::before {
  content: "\2192";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--jade);
  font-family: var(--mono);
}

/* Author credit in the footer */
.footer__author {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--magenta);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}
.footer__author:hover { color: var(--magenta); border-color: var(--text); }

/* Wipe-overlay colours. The overlay must match the surface behind the card,
   otherwise the wipe shows as a transparent no-op. */
.letter::after { background: var(--paper); }
.axis::after   { background: var(--panel); }


/* -----------------------------------------------------------------------------
   SMALL PHONE HARDENING (<= 420px)
   Long unbroken strings, oversized display type and the mono chips were the
   three things pushing past the right edge on 320 and 360 wide screens.
   -------------------------------------------------------------------------- */
@media (max-width: 420px) {
  :root { --gutter: 1rem; }

  h1, h2, h3, .hero__headline, .letter__term, .axis__term, .flag__name {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  .hero__headline { font-size: clamp(2.4rem, 13vw, 3.4rem); }

  .letter__glyph { font-size: clamp(2.8rem, 16vw, 4rem); }

  .axis__examples li,
  .flag__swatch,
  .rep__stat { font-size: 0.62rem; }

  .stat__value { font-size: clamp(2rem, 11vw, 2.9rem); }
  .stat__value--long { font-size: clamp(1.7rem, 9vw, 2.4rem); }

  .pronoun-lab,
  .profiles { padding: 1.1rem; }

  .pill { font-size: 0.72rem; padding: 0.55rem 0.8rem; }
}

/* Nothing may exceed the viewport width, whatever the content. */
img, svg, table { max-width: 100%; }
.axis, .letter, .stat, .flag, .confusion, .etiquette__item, .res, .tl { min-width: 0; }
.axis__main, .letter > div, .stat__note, .axis__def { min-width: 0; overflow-wrap: break-word; }
