/* SynPop home: the S made of people opens into the answer.
   Loaded after styles.css. Every class is prefixed n- so nothing leaks, and colour comes from the site tokens only (alpha mixes excepted),
   so the dark theme is the token redefinition and nothing else. Orange appears only as resistance; blue is support; grey is uncertainty.
   One display weight (500). Type scale: h1 40 to 88 / h2 32 to 52 / annotation 20 to 28 / question 20 to 26 / lead 17 to 20 / body 15 to 20 / labels 13 to 15.
   One .wrap, a 12 column grid with 24px gutters, equal edges. No scroll reveals, no count ups, no pinned sections, no scroll driven motion:
   the only motion is the shared hero entrance and the one gesture of the dots.
   The wide layout is chosen with em based queries, so a larger default font size falls back to the stacked layout instead of overflowing. */

:root { --n-nav: 69px; --n-lbl: 56px; --n-gap: 24px; }

/* ---------------------------------------------------------------- Screen one */
.n-hero { padding: 0; }
.n-in { position: relative; display: flex; flex-direction: column; align-items: flex-start;
  padding-top: clamp(16px, 3.2vh, 32px); padding-bottom: clamp(14px, 2.4vh, 24px); }
.n-hero h1, .n-lede, .n-ask, .n-plot, .n-foot { position: relative; z-index: 1; }

.n-hero h1 { margin: 0; max-width: 100%; font-weight: var(--w-display); font-size: clamp(2rem, 9.6vw, 3.25rem); line-height: 1.02; letter-spacing: -.04em; color: var(--ink); text-wrap: balance; }
.n-hero h1 em { font-style: normal; color: var(--support); }
.n-lede { margin-top: 16px; max-width: 32em; font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }

/* The decision: the question and the three choices, together, under the sentence. */
.n-ask { margin-top: clamp(18px, 3vh, 28px); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; max-width: 100%; }
.n-q { margin: 0; max-width: 26em; font-size: clamp(1.25rem, 1.65vw, 1.625rem); line-height: 1.25; font-weight: 500; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
/* The controls need the script. Without it they are gone. While the script is on its way they hold their space but are not shown or usable. */
.n-controls { display: none; flex-wrap: wrap; align-items: center; gap: 8px 6px; visibility: hidden; }
html.n-js .n-controls { display: flex; }
html.n-ok .n-controls { visibility: visible; }
.n-switch { display: flex; flex-wrap: wrap; gap: 6px; }
.n-pill { min-height: 2.5rem; padding: .4em 1rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2);
  font: inherit; font-size: .9375rem; font-weight: 500; line-height: 1.2; white-space: nowrap; cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease), background-color .15s var(--ease), transform .15s var(--ease); }
.n-pill:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.n-pill:active { transform: translateY(1px) scale(.985); transition-duration: .09s; }
.n-pill[aria-pressed="true"], .n-pill[aria-pressed="true"]:hover { background: var(--ink); border-color: var(--ink); color: var(--on-ink); transform: none; }
.n-pill:focus-visible, .n-replay:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 999px; }
/* Replay is a normal flex item that wraps with the pills at any width. Its mark is a small S drawn with the same dots. */
.n-replay { display: none; align-items: center; gap: 9px; min-height: 2.5rem; margin-left: 6px; padding: 0 12px 0 8px; border: 0; border-radius: 999px; background: var(--bg);
  font: inherit; font-size: .9375rem; font-weight: 500; color: var(--ink-3); cursor: pointer; transition: color .15s var(--ease), transform .15s var(--ease); }
html.n-ok .n-replay { display: inline-flex; }
.n-replay-mark { width: 32px; height: 32px; flex: none; color: var(--logo); fill: none; stroke: currentColor; }
.n-replay:hover { color: var(--ink); }
.n-replay:active { transform: translateY(1px); }

/* The dots and the line that joins the annotation to its group draw on one canvas that is the page itself: no card, no frame, no axis. */
.n-canvas, .n-leader { display: none; position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
html.n-js .n-canvas, html.n-js .n-leader { display: block; }
.n-canvas { z-index: 0; }
.n-leader { z-index: 1; overflow: visible; }
.n-leader path { fill: none; stroke: var(--ink-3); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .12s linear; }
.n-leader circle { fill: var(--ink); opacity: 0; transition: opacity .12s linear; }
.n-read-on .n-leader path { stroke-dashoffset: 0; transition: stroke-dashoffset .7s var(--ease) .15s; }
.n-read-on .n-leader circle { opacity: 1; transition: opacity .3s var(--ease) .65s; }

/* Group names and the one metric under every column, in the same words everywhere: "46% resist". With no script this is a plain list. */
.n-plot { align-self: stretch; margin-top: 8px; flex: 0 0 auto; }
.n-labels { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 2px; }
.n-labels li { display: flex; flex-wrap: wrap; gap: 0 .75em; }
.n-nm { font-size: .9375rem; font-weight: 500; line-height: 1.3; color: var(--ink-2); white-space: nowrap; }
.n-pc { font-family: var(--font-mono); font-size: .875rem; line-height: 1.5; color: var(--ink-2); white-space: nowrap; font-feature-settings: "tnum" 1; }
.n-spot .n-nm, .n-spot2 .n-nm { color: var(--ink); }
.n-spot .n-pc { color: var(--resist-ink); font-weight: 500; }
.n-spot2 .n-pc { color: var(--ink); font-weight: 500; }
.n-spot2 .n-pc::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--neutral); vertical-align: .04em; }
html.n-js .n-plot { position: relative; flex: 1 1 auto; min-height: 240px; }
html.n-js .n-labels { position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: 0; display: block; pointer-events: none; }
html.n-js .n-labels li { position: absolute; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 1px; min-width: 0; opacity: 0; transition: opacity .15s var(--ease); }
html.n-js .n-plot[data-layout="cols"] .n-labels li { bottom: 0; height: var(--n-lbl); padding-top: 11px; border-top: 1px solid var(--line-2); }
html.n-js .n-plot[data-layout="rows"] .n-labels li { flex-direction: row; justify-content: space-between; align-items: baseline; }
html.n-js .n-read-on .n-labels li { opacity: 1; transition: opacity .5s var(--ease) .1s; }

/* The reading: one annotation and one question for the next meeting. --n-fit is set by the script when a long case needs a little less room. */
.n-read { --n-fit: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 18px; max-width: 34em; position: relative; z-index: 1; }
.n-annot { margin: 0; font-size: calc(clamp(1.25rem, 1.7vw, 1.625rem) * var(--n-fit)); line-height: 1.22; font-weight: 500; letter-spacing: -.022em; color: var(--ink); text-wrap: pretty; }
.n-meet { margin: 0; font-size: calc(1.0625rem * var(--n-fit)); line-height: 1.4; color: var(--ink); text-wrap: pretty; max-width: 30em; }

/* Under the data: the colour key with the overall result, and the one sentence that says what the picture is. */
.n-foot { align-self: flex-start; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 28px; margin: 12px 0 0; max-width: 100%; }
.n-legend { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; padding: 0; list-style: none; font-size: .8125rem; white-space: nowrap; line-height: 1.5; color: var(--ink-2); }
.n-legend li[style]::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: var(--c); vertical-align: .03em; }
.n-legend b { font-family: var(--font-mono); font-weight: 500; font-size: .95em; color: var(--ink); font-feature-settings: "tnum" 1; }
.n-lg-k { color: var(--ink-3); }
.n-note { margin: 0; max-width: 60em; font-size: .8125rem; line-height: 1.5; color: var(--ink-3); }
html.n-js .n-annot, html.n-js .n-meet { opacity: 0; transform: translateY(8px); transition: opacity .15s var(--ease), transform .15s var(--ease); }
html.n-js .n-read-on .n-annot, html.n-js .n-read-on .n-meet { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }
html.n-js .n-read-on .n-meet { transition-delay: .1s; }
html.n-js .n-foot .n-legend, html.n-js .n-note { opacity: 0; transition: opacity .15s var(--ease); }
html.n-js .n-read-on .n-legend, html.n-js .n-read-on .n-note { opacity: 1; transition: opacity .5s var(--ease) .2s; }

/* The question and the choices are on the page from the first moment, a beat after the headline has begun to rise. */
html.n-js.m-enter .n-ask { animation: n-up .5s var(--ease-enter) .2s both; }
@keyframes n-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Screen two */
.n-use { padding: clamp(64px, 11vh, 112px) 0 clamp(56px, 8vh, 88px); }
.n-use-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.n-use h2, .n-close h2 { margin: 0; font-size: clamp(1.875rem, 3.4vw, 3.25rem); line-height: 1.06; letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
.n-nb { white-space: nowrap; }
.n-use-copy > p { margin: 20px 0; max-width: 30em; font-size: clamp(1.0625rem, 1.35vw, 1.25rem); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.n-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.n-link { font-size: 1.125rem; font-weight: 500; }
.n-cap { margin: 0; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.n-compare { margin: 0; min-width: 0; }
.n-compare figcaption { font-size: clamp(1.25rem, 1.7vw, 1.625rem); font-weight: 500; letter-spacing: -.022em; margin-bottom: 4px; }
.n-compare .n-legend { margin-top: 20px; }
.n-compare dl { display: grid; gap: 16px; margin: 16px 0 20px; }
.n-compare dl > div { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); align-items: center; gap: 12px; }
.n-compare dt { font-weight: 500; }
.n-compare dd { display: flex; margin: 0; font: 500 .9375rem/1.5 var(--font-mono); text-align: center; }
.n-compare dd > span { width: var(--share); padding-bottom: 4px; border-bottom: 12px solid var(--c); }
.n-insight { margin: 0; font-size: 1.0625rem; line-height: 1.45; text-wrap: pretty; }

.n-close { background: var(--bg-2); padding: clamp(56px, 10vh, 104px) 0; }
.n-close-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.n-close-body { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 32em; }
.n-close-p { margin: 0; font-size: clamp(1.0625rem, 1.35vw, 1.25rem); line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.n-small { margin: -6px 0 0; font-size: .9375rem; line-height: 1.45; color: var(--ink-2); }

/* ---------------------------------------------------------------- Wide: the composition */
@media (min-width: 66em) and (min-height: 37em) {
  .n-in { min-height: calc(min(100svh, 1000px) - var(--n-nav)); }
  .n-hero h1 { font-size: min(5.9vw, 9.6vh, 5.75rem); line-height: .99; text-wrap: nowrap; }
  .n-ln { display: block; }
  .n-lede { max-width: min(31em, 52%); }
  .n-q { max-width: min(30em, 52vw); text-wrap: pretty; }
  .n-read { max-width: none; }
  html.n-js .n-read { position: absolute; left: 0; bottom: 0; width: 40%; margin: 0; visibility: hidden; }
  html.n-ok .n-read { visibility: visible; }
}
@media (min-width: 56.25em) {
  .n-use-in { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--n-gap); }
  .n-use-copy { grid-column: 1 / span 6; }
  .n-use h2 { max-width: 16em; }
  .n-compare { grid-column: 8 / -1; }
  .n-close-in { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--n-gap); }
  .n-close h2 { grid-column: 1 / span 6; }
  .n-close-body { grid-column: 8 / -1; }
}
/* Short laptops: the headline, the plot and the notes give up a little height so names, percentages and the unit note stay in the first view. */
@media (min-width: 66em) and (min-height: 37em) and (max-height: 760px) {
  :root { --n-lbl: 52px; }
  .n-lede { margin-top: 10px; }
  .n-ask { margin-top: 16px; gap: 8px; }
  .n-foot { margin-top: 8px; }
}
@media (min-width: 66em) and (min-height: 37em) and (max-height: 680px) {
  .n-in { padding-top: 12px; padding-bottom: 10px; }
  html.n-js .n-plot { min-height: 150px; }
  .n-hero h1 { font-size: min(5.9vw, 9vh, 5.75rem); }
  .n-ask { margin-top: 12px; }
}

/* ---------------------------------------------------------------- Stacked: phones, tablets in portrait, short or zoomed windows */
@media not all and (min-width: 66em) and (min-height: 37em) {
  .n-in { padding-top: 20px; padding-bottom: 28px; }
  .n-read { display: contents; }
  .n-hero h1 { order: 1; } .n-lede { order: 2; } .n-ask { order: 3; }
  /* Keep the key above the finding so the leader has a clear path to its group. */
  .n-annot { order: 4; margin-top: 18px; } .n-plot { order: 5; margin-top: 18px; }
  .n-meet { order: 6; margin-top: 18px; }
  .n-foot { order: 3; margin-top: 18px; flex-direction: column-reverse; gap: 6px; }
  .n-foot .n-lg-k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .n-foot .n-legend { display: grid; grid-template-columns: repeat(3, auto); column-gap: clamp(10px, 5vw, 24px); }
  .n-foot .n-legend b { display: block; margin-left: 15px; font-size: 1rem; }
  .n-hero[data-layout="rows"] .n-plot { margin-top: 12px; }
  .n-hero[data-layout="rows"] .n-meet { margin-top: 14px; }
  .n-q { max-width: 22em; min-height: 2.5em; }
  .n-switch { display: contents; }   /* the pills and Replay then wrap together as one row */
  .n-annot { font-size: 1.1875rem; }
  .n-use h2, .n-close h2 { max-width: 16em; }
  .n-link { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 56.24em) {
  .n-use-in { gap: 0; }
  .n-use-copy { display: contents; }
  .n-links { order: 1; margin-top: 18px; }
  .n-compare { margin-top: 12px; }
}
@media (max-width: 420px) {
  .n-compare dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .n-pill { padding: .4em .875rem; font-size: .9rem; }
  .n-ask { gap: 10px; }
  .n-hero h1 { font-size: clamp(2rem, 9vw, 2.25rem); }
}

@media (prefers-reduced-motion: reduce) {
  html.n-js.m-enter .n-ask { animation: none; }
  .n-replay { display: none !important; }
  html.n-js .n-annot, html.n-js .n-meet { transform: none; }
  .n-pill, .n-replay, html.n-js .n-annot, html.n-js .n-meet, html.n-js .n-legend, html.n-js .n-note, html.n-js .n-labels li, .n-leader path, .n-leader circle { transition-duration: .01ms !important; transition-delay: 0s !important; }
  .n-pill:hover, .n-pill:active { transform: none; }
}

/* Windows high contrast: the chosen switch and the colour key must survive the system palette. */
@media (forced-colors: active) {
  .n-compare dd > span { forced-color-adjust: none; background: Canvas; color: CanvasText; }
  .n-pill[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .n-legend li[style]::before, .n-spot2 .n-pc::before { forced-color-adjust: none; }
  .n-spot .n-pc, .n-spot2 .n-pc { font-weight: 700; }
}
