/* Modern CSS Radar landing page
   Palette: paper, ink, one green accent, with matched light/dark tokens.
   Conventions: BEM class names and cascade layers. */

@layer reset, base, layout, components, utilities, motion;

:root {
  color-scheme: light dark;

  --paper: light-dark(#fff8f0, #141814);
  --surface: light-dark(#fffdf9, #1c221d);
  --ink: light-dark(#171717, #eef6ef);
  --ink-muted: light-dark(#4f514f, #bcc7be);
  --accent: light-dark(#367d59, #82c99f);
  --accent-deep: light-dark(#2a5f45, #a8dfbd);
  --mint: light-dark(#99d6b7, #315a43);
  --mint-soft: light-dark(#d9efe4, #213429);
  --danger: light-dark(#963729, #ff9f91);
  --code-surface: light-dark(#171917, #0f120f);
  --code-text: #f4f7f2;
  --code-muted: #aeb7ae;
  --code-before: light-dark(#a94f41, #e18274);
  --focus: light-dark(#235b3e, #a8dfbd);

  --font-display: "Iowan Old Style", Baskerville, Georgia, serif;
  --font-body: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;

  --border: 1px solid color-mix(in oklab, var(--ink) 82%, transparent);
  --shadow: 4px 4px 0 var(--ink);
  --radius: 2px;
  --wrap: 68rem;
}

/* ================= reset ================= */

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

  body,
  h1,
  h2,
  h3,
  h4,
  p,
  ul,
  ol,
  dl,
  dd,
  figure,
  pre {
    margin: 0;
  }

  ul,
  ol {
    padding: 0;
  }

  img,
  svg {
    max-width: 100%;
    height: auto;
  }
}

/* ================= base ================= */

@layer base {
  body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-width: 20rem;
  }

  h1,
  h2,
  h3 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.12;
    text-wrap: balance;
  }

  code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--mint-soft);
    padding: 0.1em 0.3em;
    border-radius: var(--radius);
  }

  :focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }

  ::selection {
    background: var(--mint);
    color: var(--ink);
  }

  dialog {
    max-width: 32rem;
    border: var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    padding: 2rem;
    box-shadow: 8px 8px 0 var(--accent);
  }

  dialog h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  dialog p {
    margin-bottom: 1rem;
  }

  dialog::backdrop {
    background: rgb(23 23 23 / 0.55);
  }
}

/* ================= layout ================= */

@layer layout {
  .wrap {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  }

  .section {
    padding-block: clamp(3.5rem, 8vw, 6rem);
    border-top: var(--border);
  }

  .section__head {
    max-width: 40rem;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
  }

  .section__label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 1rem;
  }

  .section h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
  }

  .section__intro {
    margin-top: 1.25rem;
    max-width: 52ch;
  }
}

/* ================= components ================= */

@layer components {
  /* ----- site header ----- */

  .site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: var(--border);
    background: color-mix(in oklab, var(--paper) 94%, transparent);
    backdrop-filter: blur(12px);
  }

  .site-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
    padding-block: 0.45rem;
  }

  .site-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: var(--ink);
    text-decoration: none;
  }

  .site-header__actions {
    display: flex;
    align-items: center;
    gap: clamp(0.45rem, 1.5vw, 1rem);
    min-width: 0;
  }

  .radar-mark {
    flex: none;
  }

  .radar-mark__sweep {
    transform-origin: 16px 16px;
  }

  .theme-toggle {
    display: flex;
    flex: none;
  }

  .theme-toggle__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    opacity: 0;
  }

  .theme-toggle__label {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius);
    color: var(--ink);
    cursor: pointer;
  }

  .theme-toggle__input:focus-visible + .theme-toggle__label {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
  }

  .theme-toggle__icon {
    position: relative;
    display: block;
    width: 1.875rem;
    height: 1.875rem;
  }

  .theme-toggle__icon svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
  }

  .theme-toggle__icon .theme-toggle__moon {
    opacity: 0;
    visibility: hidden;
  }

  .theme-toggle__input:checked + .theme-toggle__label .theme-toggle__moon {
    opacity: 1;
    visibility: visible;
  }

  .theme-toggle__input:checked + .theme-toggle__label .theme-toggle__sun {
    opacity: 0;
    visibility: hidden;
  }

  .theme-toggle__label:hover .theme-toggle__icon svg {
    animation: theme-toggle-bounce 0.6s ease-in-out;
  }

  @keyframes theme-toggle-bounce {
    0% {
      transform: rotate(0);
    }

    25% {
      transform: rotate(8deg);
    }

    50% {
      transform: rotate(-8deg);
    }

    75% {
      transform: rotate(5deg);
    }

    100% {
      transform: rotate(0);
    }
  }

  .site-header__nav {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .site-header__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--ink);
    text-decoration: none;
  }

  .site-header__link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
  }

  .site-header__link[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
  }

  .site-header__link--cta {
    border: var(--border);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius);
    background: var(--mint);
    transition: box-shadow 0.15s, translate 0.15s;
  }

  .site-header__link--cta:hover {
    text-decoration: none;
    box-shadow: 3px 3px 0 var(--ink);
    translate: -1px -1px;
  }

  /* ----- buttons ----- */

  .btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
    border: var(--border);
    border-radius: var(--radius);
    padding: 0.8rem 1.6rem;
    background: var(--surface);
    cursor: pointer;
    transition: box-shadow 0.15s, translate 0.15s;
  }

  .btn:hover {
    box-shadow: var(--shadow);
    translate: -2px -2px;
  }

  .btn:active {
    box-shadow: none;
    translate: 0 0;
  }

  .btn--primary {
    background: var(--accent);
    color: light-dark(#f7fff9, #102217);
    border-color: var(--ink);
  }

  /* ----- hero ----- */

  .hero {
    display: block;
    padding-block: clamp(2.25rem, 5vw, 4.5rem);
    scroll-margin-block-start: 5rem;
  }

  .hero__content {
    min-width: 0;
    max-width: 47rem;
  }

  .hero__eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 1.25rem;
  }

  .hero__title {
    font-size: clamp(2.45rem, 4vw, 4rem);
    max-width: 14ch;
    letter-spacing: -0.025em;
    line-height: 1.04;
  }

  .hero__title em {
    font-style: italic;
    color: var(--accent);
  }

  .hero__lede {
    max-width: 41ch;
    font-size: clamp(1.08rem, 2vw, 1.25rem);
    line-height: 1.5;
    margin-top: 1.35rem;
  }

  /* Hero radar: large editorial radar graphic drawn with borders and a
     conic sweep. No box, no surface: it sits directly on the paper. */
  .hero-radar {
    display: none;
    min-inline-size: 0;
    justify-self: end;
    inline-size: 100%;
    max-inline-size: 24rem;
    padding: 1rem;
  }

  .hero-radar__scope {
    position: relative;
    aspect-ratio: 1;
  }

  .hero-radar__ring {
    position: absolute;
    border: 1px solid var(--ink);
    border-radius: 50%;
  }

  .hero-radar__ring--outer {
    inset: 0;
    opacity: 0.55;
  }

  .hero-radar__ring--mid {
    inset: 16.5%;
    opacity: 0.35;
  }

  .hero-radar__ring--inner {
    inset: 33%;
    opacity: 0.22;
  }

  .hero-radar__sweep {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: clip;
  }

  .hero-radar__sweep::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: conic-gradient(
      from 0deg,
      transparent 0 72%,
      rgb(54 125 89 / 0.18) 92%,
      rgb(54 125 89 / 0.4) 100%
    );
  }

  .hero-radar__center {
    position: absolute;
    inset: 0;
    margin: auto;
    inline-size: 8px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--accent);
  }

  .hero-radar__blips {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .hero-radar__blip {
    position: absolute;
    inset-inline-start: var(--bx);
    inset-block-start: var(--by);
    translate: -50% -50%;
  }

  .hero-radar__blip code {
    display: inline-block;
    padding: 0.25em 0.55em;
    border: 1px solid var(--ink);
    border-radius: 2px;
    background: var(--paper);
    box-shadow: 2px 2px 0 var(--mint);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .hero-radar__blip::before {
    content: "";
    position: absolute;
    inset-block-start: -0.5rem;
    inset-inline-start: 50%;
    inline-size: 5px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--accent);
  }

  /* Dracula syntax palette. */
  .code-token--keyword {
    color: #ff79c6;
  }

  .code-token--boolean {
    color: #bd93f9;
  }

  .code-token--tag {
    color: #ff79c6;
  }

  .code-token--attribute {
    color: #50fa7b;
  }

  .code-token--comment {
    color: #6272a4;
    font-style: italic;
  }

  /* ----- analyzer input ----- */

  .analyze {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    gap: 1rem;
    max-width: 60rem;
    margin-top: 1.85rem;
    scroll-margin-block-start: clamp(14rem, 28vh, 16rem);
  }

  .analyze__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .analyze__field {
    display: grid;
    gap: 0.45rem;
  }

  .analyze__field label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.25;
    color: var(--accent-deep);
  }

  .analyze__input {
    width: 100%;
    font: inherit;
    font-family: var(--font-mono);
    font-size: 1rem; /* 16px minimum: prevents iOS Safari zoom-on-focus */
    color: var(--ink);
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    box-shadow: 4px 4px 0 var(--mint);
    transition: box-shadow 0.15s, translate 0.15s;
  }

  .analyze__input::placeholder {
    color: #767676;
  }

  .analyze__input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 0;
    box-shadow: 4px 4px 0 var(--accent);
  }

  .analyze__input[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 4px 4px 0 color-mix(in oklab, var(--danger) 35%, transparent);
  }

  .analyze__btn {
    flex: none;
    justify-self: start;
    padding-inline: 2rem;
    min-height: 3.25rem;
  }

  .analyze__btn:disabled {
    cursor: wait;
    opacity: 0.7;
    box-shadow: none;
    translate: 0 0;
  }

  .form-status {
    max-width: 60rem;
    margin-top: 0.9rem;
    padding: 0.8rem 1rem;
    border: var(--border);
    border-left: 5px solid var(--accent);
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .form-status[data-state="error"] {
    border-left-color: var(--danger);
  }

  .form-status[data-state="loading"] {
    border-left-color: var(--accent-deep);
  }

  .analyze__notice {
    max-width: 60rem;
    margin-top: 0.85rem;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.55;
  }

  .analyze__notice a {
    color: var(--accent-deep);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
  }

  /* ----- example finding card ----- */

  .finding {
    border: var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 6px 6px 0 var(--mint);
  }

  .finding__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.5rem;
    padding: 1.5rem 1.75rem;
    border-bottom: var(--border);
  }

  .finding__head h3 {
    font-size: 1.4rem;
    margin-right: auto;
  }

  .finding__replacement {
    font-family: var(--font-mono);
    font-size: 0.85rem;
  }

  .finding__replacement code {
    padding: 0.2em 0.5em;
  }

  .finding__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.75rem;
  }

  .finding__col {
    min-width: 0;
  }

  .finding__col h4 {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin: 0 0 0.9rem;
  }

  .finding__col pre + h4 {
    margin-top: 1.5rem;
  }

.finding__col p,
.finding__col ul {
	margin: 0;
}

.finding__col .finding__trigger {
	margin: 0 0 1.35rem;
	padding: 0.75rem 0.85rem;
	border-inline-start: 3px solid var(--accent);
	background: var(--mint-soft);
	color: var(--ink-muted);
	font-size: 0.86rem;
	line-height: 1.55;
}

.finding__trigger strong {
	color: var(--ink);
}

  .finding__col .finding__example {
    margin-block-start: 1.5rem;
  }

  .finding__example-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-inline-size: 100%;
    text-align: start;
  }

  .source-location {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.35rem 0.8rem;
    margin: 0.7rem 0 0;
    padding-block-start: 0.65rem;
    border-block-start: 1px solid var(--mint);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.5;
  }

  .finding__col .source-location {
    margin-block-start: 1.4rem;
    padding-block-start: 1rem;
  }

  .source-location dt {
    margin: 0;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .source-location dd {
    min-width: 0;
    margin: 0;
  }

  .source-location__list {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .source-location__item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.55rem;
    min-width: 0;
  }

  .source-location__file {
    min-width: 0;
    color: var(--accent-deep);
    font-weight: 600;
    overflow-wrap: anywhere;
  }

  .source-location code {
    display: inline-block;
    max-width: 100%;
    padding: 0.12em 0.4em;
    border: 1px solid var(--mint);
    background: var(--mint-soft);
    overflow-wrap: anywhere;
  }

  .finding__evidence {
    list-style: none;
    display: grid;
    gap: 0.8rem;
    font-size: 0.98rem;
  }

  .finding__evidence li {
    padding-left: 1.4rem;
    position: relative;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .finding__evidence li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.55em;
    height: 0.55em;
    background: var(--mint);
    border: 1px solid var(--ink);
  }

  .finding__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1.5rem 1.75rem;
    border-top: var(--border);
    background: var(--mint-soft);
  }

  .finding__foot p {
    font-size: 0.95rem;
  }

  .finding__foot > p {
    flex: 1 1 24rem;
  }

  .finding__resources {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    margin-inline-start: auto;
    text-align: right;
    flex-shrink: 0;
  }

  .finding__foot .finding__support {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.15rem 0.5rem;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.76rem;
  }

  .finding__support strong {
    color: inherit;
    font-weight: 700;
  }

  .finding__support a,
  .finding__mdn {
    color: var(--ink);
    font-family: var(--font-mono);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
  }

  .finding__support a:hover,
  .finding__mdn:hover {
    color: var(--accent-deep);
  }

  .finding__docs {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: right;
  }

  .finding__mdn {
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* ----- code blocks ----- */

  .code-block {
    margin: 0;
    padding: 1rem 1.1rem;
    background: #282a36;
    color: #f8f8f2;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.65;
    border-radius: var(--radius);
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .code-block code {
    background: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
  }

  .code-block--after {
    border: 2px solid var(--mint);
  }

  .code-block--before {
    border: 2px solid var(--code-before);
  }

  .code-block__comment {
    font-style: italic;
    color: #6272a4;
  }

  .code-token--object {
    color: #f8f8f2;
  }

  .code-token--property {
    color: #8be9fd;
  }

  .code-token--string {
    color: #f1fa8c;
  }

  .code-token--function {
    color: #50fa7b;
  }

  /* ----- audit confirmation dialog ----- */

  .scan-dialog {
    width: min(34rem, calc(100vw - 2.5rem));
    padding: clamp(1.5rem, 5vw, 2.5rem);
  }

  .scan-dialog__eyebrow {
    margin: 0 0 0.65rem;
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.16em;
  }

  .scan-dialog h2 {
    margin: 0;
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .scan-dialog__url {
    color: var(--accent);
  }

  .scan-dialog__description {
    margin: 1rem 0 0;
    color: var(--ink-muted);
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .scan-dialog__description strong {
    color: var(--ink);
  }

  .scan-dialog__hint {
    margin: 0.65rem 0 0;
    font-size: 0.85rem;
    color: var(--ink-muted);
  }

  .scan-dialog form {
    margin-block-start: 1.5rem;
  }

  .scan-dialog__close {
    min-height: 3.25rem;
    padding-inline: 2rem;
  }

  .limit-dialog {
    position: relative;
    width: min(34rem, calc(100vw - 2.5rem));
    padding: clamp(1.5rem, 5vw, 2.5rem);
  }

  .limit-dialog__eyebrow {
    margin: 0 0 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent-deep);
  }

  .limit-dialog h2 {
    max-width: 18ch;
    margin-bottom: 1rem;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }

  .limit-dialog p {
    max-width: 46ch;
    color: var(--ink-muted);
  }

  .limit-dialog__actions {
    display: grid;
    justify-items: start;
    gap: 0.8rem;
    margin-top: 1.5rem;
  }

  .limit-dialog__actions p {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
  }

  .limit-dialog__actions a:not(.btn),
  .limit-dialog__dismiss {
    color: var(--accent-deep);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
  }

  .limit-dialog form {
    position: absolute;
    inset-block-start: 0.75rem;
    inset-inline-end: 0.75rem;
  }

  .limit-dialog__dismiss {
    border: 0;
    background: transparent;
    padding: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    cursor: pointer;
  }

  /* ----- scope ----- */

  .scope-group__count {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-deep);
  }

  .scope-group + .scope-group {
    margin-top: 2.75rem;
  }

  .scope-group__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
  }

  .scope-group__title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
  }

  .scope-group__count {
    flex: 0 0 auto;
  }

  .scope-group__intro {
    max-width: 66ch;
    margin: 0.55rem 0 1.15rem;
    color: var(--ink-muted);
    font-size: 0.92rem;
  }

  .scope-list {
    list-style: none;
    border-top: var(--border);
  }

  .scope-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 1rem;
    padding: 1.1rem 0.25rem;
    border-bottom: var(--border);
  }

  .scope-list li:hover {
    background: linear-gradient(to right, var(--mint-soft), transparent 70%);
  }

  .scope-list__pattern {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  }

  .scope-list__arrow {
    color: var(--accent);
    font-size: 1.2rem;
  }

  .scope-list__fix {
    font-size: 1rem;
  }

  .scope-note {
    margin-top: 2.5rem;
    max-width: 52ch;
    font-size: 0.95rem;
    color: var(--ink-muted);
  }

  /* ----- process ----- */

  .process {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .process__step {
    border-top: 3px solid var(--ink);
    padding-top: 1.25rem;
  }

  .process__step h3 {
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
  }

  .process__step p {
    font-size: 0.98rem;
  }

  .honesty-note {
    margin-top: 2.75rem;
    padding: 1.1rem 1.4rem;
    border: var(--border);
    border-left: 6px solid var(--accent);
    background: var(--surface);
    max-width: 46rem;
    font-size: 0.98rem;
  }

  /* ----- report ----- */

  .report {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: start;
  }

  .report__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 4vw, 2.5rem);
  }

  .report__group {
    border-top: 3px solid var(--ink);
    padding-top: 1rem;
  }

  .report__group h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
  }

  .report__group p {
    font-size: 0.98rem;
    margin-top: 0.45rem;
  }

  .limits-card {
    border: var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 1.6rem 1.75rem;
    box-shadow: var(--shadow);
  }

  .limits-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  .limits-card p {
    font-size: 0.98rem;
  }

  /* ----- who it is for ----- */

  .fit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2rem, 6vw, 5rem);
  }

  /* ----- FAQ -----
     Native <details> with the exclusive `name` attribute: no JavaScript,
     which is the same replacement the audit recommends for accordions. */

  .faq {
    max-width: 52rem;
    border-top: var(--border);
  }

  .faq__item {
    border-bottom: var(--border);
  }

  .faq__item summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.15rem 0;
    font-family: var(--font-display);
    font-size: clamp(1.08rem, 2vw, 1.25rem);
    line-height: 1.3;
    cursor: pointer;
    list-style: none;
  }

  .faq__item summary::-webkit-details-marker {
    display: none;
  }

  .faq__item summary::after {
    content: '+';
    flex: none;
    font-family: var(--font-mono);
    font-size: 1.35rem;
    line-height: 1;
    color: var(--accent);
  }

  .faq__item[open] summary::after {
    content: '\2212';
  }

  .faq__item summary:hover {
    color: var(--accent-deep);
  }

  .faq__item summary:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }

  .faq__item p {
    max-width: 62ch;
    padding-bottom: 1.3rem;
    color: var(--ink-muted);
  }

  .fit-group {
    border-top: 3px solid var(--ink);
    padding-top: 1.25rem;
  }

  .fit-group h3 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
  }

  .who__list {
    list-style: none;
    display: grid;
    gap: 0.7rem;
    max-width: 46rem;
  }

  .who__list li {
    padding-left: 1.6rem;
    position: relative;
    font-size: 1.05rem;
  }

  .who__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 0.7em;
    height: 0.35em;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    rotate: -45deg;
  }

  .who__list--limits li::before {
    top: 50%;
    width: 0.7em;
    height: 2px;
    border: 0;
    background: var(--accent);
    translate: 0 -50%;
    rotate: 0deg;
  }

  /* ----- next steps ----- */

  .next-steps__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: stretch;
  }

  .next-steps {
    scroll-margin-block-start: 5rem;
  }

  .offer-card {
    --offer-card-padding: clamp(1.5rem, 4vw, 2.5rem);
    --offer-card-action-gap: clamp(1.5rem, 3vw, 2rem);
    --offer-card-column-gap: clamp(1.5rem, 4vw, 2.75rem);
    border: var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 6px 6px 0 var(--mint);
    min-width: 0;
  }

  .offer-card--book {
    grid-column: span 7;
  }

  .offer-card--work {
    grid-column: span 5;
  }

  .offer-card__inner {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: start;
    row-gap: var(--offer-card-action-gap);
    min-height: 100%;
    padding: var(--offer-card-padding);
  }

  .offer-card--book .offer-card__inner {
    grid-template-columns: minmax(0, 1fr) clamp(7.5rem, 15vw, 10rem);
    grid-template-areas:
      "copy cover"
      "link cover";
    column-gap: var(--offer-card-column-gap);
  }

  .offer-card--work .offer-card__inner {
    grid-template-areas:
      "copy"
      "link";
  }

  .offer-card__eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent-deep);
    margin-bottom: 0.9rem;
  }

  .offer-card h3 {
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    max-width: 18ch;
  }

  .offer-card p:not(.offer-card__eyebrow) {
    max-width: 42ch;
    margin-top: 1rem;
    color: var(--ink-muted);
  }

  .offer-card__copy {
    grid-area: copy;
  }

  .offer-card__link {
    grid-area: link;
    justify-self: start;
  }

  .offer-card__actions {
    grid-area: link;
    display: grid;
    justify-items: start;
    gap: 0.85rem;
  }

  .offer-card__actions .offer-card__link {
    grid-area: auto;
  }

  .offer-card p.offer-card__social {
    max-width: none;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--ink-muted);
  }

  .offer-card__social a {
    color: var(--accent-deep);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
  }

  .offer-card__book-cover {
    grid-area: cover;
    align-self: end;
    width: 100%;
    border: 0;
    box-shadow: none;
  }

  /* ----- final CTA ----- */

  .cta-section {
    padding-bottom: clamp(4.5rem, 10vw, 7rem);
  }

  .cta {
    border: var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: clamp(2.25rem, 6vw, 4rem);
    max-width: 44rem;
  }

  .cta h2 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    margin-bottom: 1.25rem;
  }

  .cta p {
    max-width: 46ch;
    margin-bottom: 2rem;
  }

  .cta .section__label {
    color: var(--accent-deep);
  }

  /* ----- privacy page ----- */

  .privacy-page {
    padding-block: clamp(3.5rem, 8vw, 6rem);
  }

  .privacy-page__header,
  .privacy-page__content {
    max-width: 48rem;
  }

  .privacy-page__eyebrow {
    margin-bottom: 1rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  .privacy-page h1 {
    max-width: 15ch;
    font-size: clamp(2.45rem, 6vw, 4rem);
    letter-spacing: -0.025em;
  }

  .privacy-page__intro {
    max-width: 58ch;
    margin-top: 1.35rem;
    color: var(--ink-muted);
    font-size: clamp(1.08rem, 2vw, 1.25rem);
  }

  .privacy-page__updated {
    margin-top: 1rem;
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 0.75rem;
  }

  .privacy-page__content {
    margin-top: clamp(3rem, 7vw, 5rem);
  }

  .privacy-section {
    display: grid;
    gap: 1rem;
    padding-block: 2rem;
    border-top: var(--border);
  }

  .privacy-section h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
  }

  .privacy-section p,
  .privacy-section li {
    max-width: 68ch;
  }

  .privacy-section ul {
    display: grid;
    gap: 0.75rem;
    padding-inline-start: 1.25rem;
  }

  .privacy-section a {
    color: var(--accent-deep);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
  }

  .privacy-section__note {
    padding: 1rem 1.15rem;
    border: var(--border);
    background: var(--mint-soft);
    font-family: var(--font-mono);
    font-size: 0.82rem;
  }

  /* ----- blog index ----- */

  .blog-page {
    padding-block: clamp(3rem, 7vw, 5.5rem);
  }

  .blog-index__hero {
    display: grid;
    place-items: center;
    min-height: clamp(22rem, 52vw, 34rem);
  }

  .blog-index__hero-copy {
    max-width: 52rem;
    text-align: center;
  }

  .blog-index__eyebrow,
  .article-header__eyebrow {
    margin-bottom: 1rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  .blog-index__title {
    max-width: 12ch;
    margin-inline: auto;
    font-size: clamp(2.65rem, 6vw, 4rem);
    letter-spacing: -0.035em;
  }

  .blog-index__intro {
    max-width: 42ch;
    margin-top: 1.4rem;
    margin-inline: auto;
    color: var(--ink-muted);
    font-size: clamp(1.08rem, 2vw, 1.25rem);
  }

  .article-header__visual {
    overflow: hidden;
    border: var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 6px 6px 0 var(--mint);
  }

  .article-header__visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .blog-posts {
    margin-top: clamp(4rem, 10vw, 8rem);
  }

  .blog-posts__heading {
    max-width: 16ch;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
  }

  .post-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
    overflow: hidden;
    margin-top: clamp(2rem, 5vw, 3.5rem);
    border: var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 6px 6px 0 var(--mint);
  }

  .post-feature__content {
    display: grid;
    align-content: center;
    padding: clamp(1.75rem, 4vw, 3rem);
  }

  .post-feature__content > .post-meta {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  }

  .post-feature__title {
    max-width: 18ch;
    font-size: clamp(1.9rem, 4vw, 3rem);
  }

  .post-feature__title a,
  .post-row h3 a {
    color: inherit;
    text-decoration: none;
  }

  .post-feature__title a:hover,
  .post-row h3 a:hover {
    color: var(--accent-deep);
  }

  .post-feature__summary {
    max-width: 48ch;
    margin-top: 1.1rem;
    color: var(--ink-muted);
  }

  .post-feature__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem 1.5rem;
    margin-top: clamp(2rem, 5vw, 3rem);
  }

  .post-feature__visual {
    display: block;
    min-width: 0;
    min-height: 24rem;
    border-inline-start: var(--border);
    background: var(--mint-soft);
  }

  .post-feature__visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    line-height: 1.5;
  }

  .post-list {
    margin-top: clamp(3rem, 7vw, 5rem);
    border-top: var(--border);
  }

  .post-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: clamp(1.25rem, 4vw, 3rem);
    padding-block: clamp(1.75rem, 4vw, 2.75rem);
    border-bottom: var(--border);
  }

  .post-row h3 {
    max-width: 22ch;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
  }

  .post-row p {
    max-width: 55ch;
    margin-top: 0.75rem;
    color: var(--ink-muted);
  }

  .post-row__link {
    align-self: center;
    white-space: nowrap;
  }

  .blog-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2rem;
    margin-top: clamp(4rem, 9vw, 7rem);
    padding-block: clamp(2rem, 5vw, 3rem);
    border-block: var(--border);
  }

  .blog-page > .blog-cta {
    margin-top: clamp(2.5rem, 6vw, 4.5rem);
    border-block-start: 0;
  }

  .blog-cta h2 {
    max-width: 16ch;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
  }

  .blog-cta p {
    max-width: 52ch;
    margin-top: 0.75rem;
    color: var(--ink-muted);
  }

  /* ----- article template ----- */

  .article-page {
    padding-block: clamp(2.5rem, 7vw, 5.5rem);
  }

  .article-breadcrumb {
    margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
    font-family: var(--font-mono);
    font-size: 0.74rem;
  }

  .article-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    list-style: none;
  }

  .article-breadcrumb li + li::before {
    content: '/';
    margin-inline-end: 0.65rem;
    color: var(--accent);
  }

  .article-breadcrumb a {
    color: var(--accent-deep);
    text-underline-offset: 0.2em;
  }

  .article-header {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(13rem, 0.55fr);
    align-items: stretch;
    gap: clamp(2rem, 6vw, 5rem);
  }

  .article-header__copy {
    align-self: center;
    min-width: 0;
  }

  .article-header h1 {
    max-width: 22ch;
    font-size: clamp(2.45rem, 5vw, 4rem);
    letter-spacing: -0.035em;
  }

  .article-header__lede {
    max-width: 56ch;
    margin-top: 1.4rem;
    color: var(--ink-muted);
    font-size: clamp(1.08rem, 2vw, 1.25rem);
  }

  .article-header .post-meta {
    margin-top: 1.3rem;
  }

  .article-header .post-meta a {
    color: var(--accent-deep);
    text-underline-offset: 0.2em;
  }

  .article-header__visual {
    min-height: 22rem;
  }

  .article-header__visual img {
    object-position: center;
  }

  .article-layout {
    display: grid;
    grid-template-columns: minmax(11rem, 0.34fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 7vw, 6rem);
    margin-top: clamp(4rem, 10vw, 8rem);
    padding-top: clamp(2rem, 5vw, 3.5rem);
    border-top: var(--border);
  }

  .article-toc {
    align-self: start;
    position: sticky;
    top: 6.5rem;
  }

  .article-toc__title {
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .article-toc ol {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    list-style: none;
    scroll-target-group: auto;
  }

  .article-toc a {
    color: var(--ink-muted);
    font-size: 0.84rem;
    line-height: 1.4;
    text-decoration: none;
  }

  .article-toc a:hover {
    color: var(--accent-deep);
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  .article-toc a:target-current {
    color: var(--accent-deep);
    font-weight: 700;
    text-decoration-line: underline;
    text-decoration-color: var(--mint);
    text-decoration-thickness: 0.14em;
    text-underline-offset: 0.2em;
  }

  .article-body {
    min-width: 0;
    max-width: 48rem;
  }

  .article-body > p,
  .article-body > ul,
  .article-body > ol,
  .article-body > blockquote {
    max-width: 68ch;
  }

  .article-body > * + * {
    margin-top: 1.35rem;
  }

  .article-body h2 {
    margin-top: clamp(3rem, 7vw, 4.75rem);
    font-size: clamp(1.8rem, 4vw, 2.65rem);
    scroll-margin-block-start: 6.5rem;
  }

  .article-body h3 {
    margin-top: 2.25rem;
    font-family: var(--font-body);
    font-size: 1.18rem;
    font-weight: 700;
    scroll-margin-block-start: 6.5rem;
  }

  .article-body ul,
  .article-body ol {
    display: grid;
    gap: 0.65rem;
    padding-inline-start: 1.35rem;
  }

  .article-body a:not(.btn) {
    color: var(--accent-deep);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
  }

  .article-body .code-block {
    max-width: 100%;
    margin-top: 1.2rem;
    font-size: clamp(0.72rem, 1.7vw, 0.84rem);
  }

  .article-comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    max-width: none;
    margin-top: 1.5rem;
  }

  .article-comparison__item {
    min-width: 0;
  }

  .article-comparison__label {
    margin-bottom: 0.6rem;
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .article-note {
    padding: 1.1rem 1.25rem;
    border-inline-start: 5px solid var(--accent);
    background: var(--mint-soft);
    color: var(--ink-muted);
  }

  .article-note strong {
    color: var(--ink);
  }

  .article-demo {
    padding: clamp(1rem, 3vw, 1.5rem);
    border: var(--border);
    background: var(--surface);
    box-shadow: 5px 5px 0 var(--mint);
  }

  .article-demo__label {
    margin-bottom: 0.9rem;
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .scroll-demo__viewport {
    position: relative;
    block-size: 18rem;
    overflow-y: auto;
    border: var(--border);
    background: var(--paper);
    scroll-timeline: --article-scroll block;
  }

  .scroll-demo__progress {
    display: none;
    position: sticky;
    z-index: 1;
    inset-block-start: 0;
    inline-size: 100%;
    block-size: 0.4rem;
    transform-origin: inline-start;
    background: var(--accent);
  }

  .scroll-demo__section {
    display: grid;
    min-block-size: 12rem;
    padding: 1.5rem;
    border-block-end: var(--border);
    place-items: center;
    text-align: center;
  }

  .scroll-demo__section:last-child {
    border-block-end: 0;
  }

  .scroll-demo__section strong {
    display: block;
    margin-bottom: 0.35rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
  }

  .details-demo details {
    border-block-start: var(--border);
  }

  .details-demo details:last-child {
    border-block-end: var(--border);
  }

  .details-demo summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding-block: 0.9rem;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
  }

  .details-demo summary::-webkit-details-marker {
    display: none;
  }

  .details-demo summary::after {
    content: '+';
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 1.15rem;
  }

  .details-demo details[open] summary::after {
    content: '\2212';
  }

  .details-demo details > div {
    padding: 0 2.5rem 1rem 0;
    color: var(--ink-muted);
  }

  .field-demo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .field-demo__item {
    min-width: 0;
  }

  .field-demo label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 0.72rem;
  }

  .field-demo textarea {
    display: block;
    inline-size: 100%;
    min-block-size: 5lh;
    max-block-size: 12lh;
    padding: 0.75rem;
    border: var(--border);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    line-height: 1.45;
    resize: block;
  }

  .field-demo__auto {
    field-sizing: content;
  }

  /* Pure CSS radar demos for the radar animation article. Each modifier
     turns on one build step; the animations themselves are declared in the
     prefers-reduced-motion: no-preference block. */
  .radar-demo {
    --radar-accent: var(--accent);
    --radar-shadow: var(--mint);
    --radar-duration: 9s;
    position: relative;
    inline-size: min(100%, 20rem);
    aspect-ratio: 1;
    margin-inline: auto;
    color: var(--ink);
  }

  .radar-demo--amber {
    --radar-accent: light-dark(#b45309, #f0a13a);
    --radar-shadow: light-dark(#f3cf9f, #5a3d14);
  }

  .radar-demo--outlined {
    outline: 1px dashed var(--accent);
  }

  .radar-demo__ring {
    position: absolute;
    border: 1px solid currentColor;
    border-radius: 50%;
  }

  .radar-demo__ring--outer {
    inset: 0;
    opacity: 0.55;
  }

  .radar-demo__ring--mid {
    inset: 16.5%;
    opacity: 0.35;
  }

  .radar-demo__ring--inner {
    inset: 33%;
    opacity: 0.22;
  }

  .radar-demo__sweep {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: clip;
  }

  .radar-demo__sweep::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: conic-gradient(
      from 0deg,
      transparent 0 72%,
      color-mix(in srgb, var(--radar-accent) 18%, transparent) 92%,
      color-mix(in srgb, var(--radar-accent) 40%, transparent) 100%
    );
  }

  .radar-demo__center {
    position: absolute;
    inset: 0;
    margin: auto;
    inline-size: 8px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--radar-accent);
  }

  .radar-demo .radar-demo__blips {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  /* Labels and annotations sit at an angle and a distance from the center. */
  .radar-demo .radar-demo__blip,
  .radar-demo__note {
    --angle: calc(var(--turn, 0) * 1turn);
    position: absolute;
    left: calc(50% + sin(var(--angle)) * var(--distance, 0%));
    top: calc(50% - cos(var(--angle)) * var(--distance, 0%));
    margin: 0;
    translate: -50% -50%;
  }

  .radar-demo__blip::before {
    content: "";
    position: absolute;
    inset-block-start: -0.5rem;
    inset-inline-start: 50%;
    inline-size: 5px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--radar-accent);
    translate: -50% 0;
  }

  .radar-demo--ping .radar-demo__blip::before {
    opacity: 0.45;
  }

  .radar-demo .radar-demo__blip code {
    display: inline-block;
    padding: 0.25em 0.55em;
    border: 1px solid var(--ink);
    border-radius: 2px;
    background: var(--paper);
    box-shadow: 2px 2px 0 var(--radar-shadow);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    white-space: nowrap;
  }

  /* Guides and notes explain a preview. They are not part of the radar. */
  .radar-demo__guide {
    position: absolute;
    left: 50%;
    bottom: 50%;
    inline-size: 0;
    block-size: var(--distance, 50%);
    border-left: 1px dashed var(--accent-deep);
    transform-origin: 0 100%;
    rotate: calc(var(--turn, 0) * 1turn);
    opacity: 0.75;
  }

  .radar-demo__note {
    padding: 0.1em 0.4em;
    background: var(--surface);
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 0.64rem;
    line-height: 1.3;
    white-space: nowrap;
  }

  .radar-progress {
    container-type: inline-size;
  }

  .radar-progress__layout {
    display: grid;
    justify-items: center;
    gap: 1.25rem;
  }

  .radar-progress__side {
    display: grid;
    justify-items: center;
    gap: 1rem;
    max-inline-size: 20rem;
    text-align: center;
  }

  .article-body .radar-build {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.72rem;
  }

  .radar-build li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink-muted);
  }

  .radar-build li::before {
    content: "";
    flex: none;
    inline-size: 0.6rem;
    aspect-ratio: 1;
    border: 1px solid currentColor;
    border-radius: 50%;
  }

  /* Every step listed before the current one is already built. */
  .radar-build li:has(~ [aria-current="step"]) {
    color: var(--ink);
  }

  .radar-build li:has(~ [aria-current="step"])::before {
    border-color: var(--accent);
    background: var(--accent);
  }

  .radar-build [aria-current="step"] {
    color: var(--accent-deep);
    font-weight: 700;
  }

  .radar-build [aria-current="step"]::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--mint);
  }

  .radar-progress__note,
  .radar-motion-note {
    color: var(--ink-muted);
    font-size: 0.85rem;
    line-height: 1.45;
  }

  .radar-motion-note {
    display: none;
    margin-block-start: 1rem;
    text-align: center;
  }

  .radar-progress__side .radar-motion-note {
    margin-block-start: 0;
    text-align: inherit;
  }

  @container (min-width: 34rem) {
    .radar-progress__layout {
      grid-template-columns: minmax(0, 20rem) minmax(0, 13rem);
      justify-content: center;
      justify-items: stretch;
      align-items: center;
      gap: 2.5rem;
    }

    .radar-progress__side {
      justify-items: start;
      text-align: start;
    }

    .article-body .radar-build {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.6rem;
    }
  }

  /* Replay without JavaScript: toggling the checkbox swaps the animation name,
     and a new name restarts the animation. Shown only when motion is allowed. */
  .radar-replay {
    display: none;
    position: relative;
  }

  .radar-replay__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    opacity: 0;
  }

  .radar-replay__button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    box-shadow: 3px 3px 0 var(--mint);
  }

  .radar-replay__input:focus-visible + .radar-replay__button {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
  }

  .radar-demo-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: 2rem 1.5rem;
  }

  .radar-demo-steps .radar-demo-step {
    margin: 0;
  }

  .radar-demo-step figcaption {
    margin-block-start: 1rem;
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-align: center;
  }

  .article-checklist {
    list-style: none;
    padding-inline-start: 0 !important;
  }

  .article-checklist li {
    position: relative;
    padding-inline-start: 1.65rem;
  }

  .article-checklist li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 0.52em;
    width: 0.65rem;
    height: 0.35rem;
    border-inline-start: 2px solid var(--accent);
    border-block-end: 2px solid var(--accent);
    rotate: -45deg;
  }

  .article-source-list {
    padding-top: 1.25rem;
    border-top: var(--border);
    font-family: var(--font-mono);
    font-size: 0.78rem;
  }

  .article-author {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin-top: clamp(3.5rem, 8vw, 5.5rem);
    padding-block: 1.5rem;
    border-block: var(--border);
  }

  .article-author__mark {
    display: grid;
    place-items: center;
    width: 3.25rem;
    aspect-ratio: 1;
    border: var(--border);
    border-radius: 50%;
    background: var(--mint-soft);
    color: var(--accent-deep);
    font-family: var(--font-display);
    font-size: 1.35rem;
  }

  .article-author p {
    color: var(--ink-muted);
    font-size: 0.9rem;
  }

  .article-author a {
    color: var(--accent-deep);
    text-underline-offset: 0.2em;
  }

  .article-related {
    margin-top: clamp(3.5rem, 8vw, 5.5rem);
  }

  .article-related h2 {
    max-width: 16ch;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
  }

  .article-related__list {
    margin-top: 1.5rem;
    border-top: var(--border);
  }

  .article-related__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 0.25rem;
    border-bottom: var(--border);
    color: var(--ink);
    text-decoration: none;
  }

  .article-related__item:hover {
    background: linear-gradient(to right, var(--mint-soft), transparent 70%);
  }

  .article-related__title {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  }

  .article-related__item:hover .article-related__title {
    color: var(--accent-deep);
  }

  .article-related__topic {
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    white-space: nowrap;
  }

  /* ----- footer ----- */

  .site-footer {
    border-top: var(--border);
    background: var(--mint-soft);
  }

  .site-footer__row {
    padding-block: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    font-size: 0.92rem;
  }

  .site-footer__credit {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-deep);
  }

  .site-footer__credit a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
  }

  .site-footer__meta {
    display: grid;
    justify-items: end;
    gap: 0.5rem;
  }

  .site-footer__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.25rem 0.75rem;
    max-inline-size: 100%;
  }

  .site-footer__badge {
    display: inline-flex;
    align-items: center;
    min-block-size: 2.75rem;
    max-inline-size: 100%;

    img {
      display: block;
      block-size: 2rem;
      inline-size: auto;
      max-inline-size: 100%;
      object-fit: contain;
    }
  }

  /* ----- responsive ----- */

  @media (min-width: 57rem) {
    .hero {
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.75fr);
      column-gap: clamp(2.5rem, 4vw, 3.5rem);
      align-items: center;
    }

    .hero__content {
      max-width: 48rem;
    }

    .hero__title {
      max-width: 18ch;
    }

    .hero-radar {
      display: block;
    }
  }

  @media (max-width: 48rem) {
    .next-steps__grid {
      grid-template-columns: 1fr;
    }

    .offer-card--book,
    .offer-card--work {
      grid-column: auto;
    }

    .offer-card--book .offer-card__inner {
      grid-template-columns: minmax(0, 1fr) 7rem;
    }
  }

  @media (max-width: 34rem) {
    .offer-card--book .offer-card__inner {
      grid-template-columns: 1fr;
      grid-template-rows: auto;
      grid-template-areas:
        "copy"
        "cover"
        "link";
    }

    .offer-card h3,
    .offer-card p:not(.offer-card__eyebrow) {
      max-width: none;
    }

    .offer-card__book-cover {
      width: min(9rem, 55%);
      justify-self: center;
    }

    .offer-card__link {
      display: block;
      width: 100%;
      padding-inline: 1rem;
      text-align: center;
    }
  }

  @media (max-width: 56rem) {
    .finding__body,
    .report {
      grid-template-columns: 1fr;
    }

    .blog-index__hero,
    .article-header,
    .article-layout {
      grid-template-columns: 1fr;
    }

    .article-toc {
      position: static;
      padding-bottom: 1.5rem;
      border-bottom: var(--border);
    }

    .article-toc ol {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-header__visual {
      min-height: 18rem;
      aspect-ratio: 16 / 8;
    }

    .process {
      grid-template-columns: 1fr;
      gap: 1.75rem;
    }

    .fit-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (min-width: 35rem) and (max-width: 56rem) {
    .hero__content {
      max-width: none;
    }

    .hero__title {
      max-width: none;
    }

    .hero__lede {
      max-width: 56ch;
    }
  }

  @media (max-width: 52rem) {
    .hero__content {
      max-width: 100%;
    }

    .analyze {
      grid-template-columns: 1fr;
    }

    .analyze__btn {
      justify-self: start;
    }

  }

  @media (max-width: 44rem) {
    .finding__resources {
      width: 100%;
      align-items: stretch;
      margin-inline-start: 0;
      text-align: start;
    }

    .finding__foot .finding__support {
      width: 100%;
      justify-content: flex-start;
    }

    .finding__docs {
      width: 100%;
      align-items: flex-start;
      text-align: start;
    }

    .finding__support a,
    .finding__mdn {
      display: block;
      width: fit-content;
      max-width: 100%;
      white-space: normal;
      overflow-wrap: anywhere;
      text-wrap: pretty;
    }
  }

  @media (max-width: 34rem) {
    .site-header__actions {
      gap: 0.35rem;
    }

    .site-header__nav {
      gap: 0;
      font-size: 0.88rem;
    }

    .site-header__link:not(.site-header__link--cta) {
      display: none;
    }

    .site-header__brand {
      font-size: 0.84rem;
    }

    .radar-mark {
      width: 1.5rem;
    }

    .finding__head,
    .finding__body,
    .finding__foot {
      padding-inline: 1.15rem;
    }

    .source-location {
      grid-template-columns: 1fr;
      gap: 0.4rem;
    }

    .analyze,
    .analyze__fields {
      grid-template-columns: 1fr;
    }

    .analyze__btn {
      width: 100%;
    }

    .report__list {
      grid-template-columns: 1fr;
    }

    .blog-index__hero,
    .post-feature,
    .blog-cta,
    .article-comparison,
    .field-demo {
      grid-template-columns: 1fr;
    }

    .blog-index__title,
    .article-header h1 {
      max-width: none;
    }

    .post-feature__visual {
      min-height: 0;
      aspect-ratio: 16 / 10;
      border-block-start: var(--border);
      border-inline-start: 0;
    }

    .post-row {
      grid-template-columns: 1fr;
    }

    .post-row__link {
      justify-self: start;
    }

    .site-footer__meta {
      justify-items: start;
    }

    .site-footer__badges {
      justify-content: flex-start;
    }

    .blog-cta .btn {
      width: 100%;
      text-align: center;
    }

    .article-toc ol {
      grid-template-columns: 1fr;
    }

    .article-header__visual {
      min-height: 0;
      aspect-ratio: 4 / 3;
    }

    .article-related__item {
      grid-template-columns: 1fr;
      gap: 0.35rem;
    }

  }

  @media (max-width: 24rem) {
    .site-header__brand-text {
      display: none;
    }
  }
}

/* ================= utilities ================= */

@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .skip-link {
    position: absolute;
    inset-inline-start: 1rem;
    inset-block-start: 1rem;
    z-index: 20;
    background: var(--ink);
    color: var(--paper);
    padding: 0.5rem 1rem;
  }

  .skip-link:not(:focus-visible) {
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ================= motion ================= */

@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    html {
      scroll-behavior: smooth;
    }

    /* Dialog: @starting-style for the entry state, allow-discrete so
       display and overlay can animate on the way out. */
    dialog {
      opacity: 0;
      translate: 0 12px;
      transition:
        opacity 0.25s ease,
        translate 0.25s ease,
        display 0.25s allow-discrete,
        overlay 0.25s allow-discrete;
    }

    dialog[open] {
      opacity: 1;
      translate: 0 0;
    }

    @starting-style {
      dialog[open] {
        opacity: 0;
        translate: 0 12px;
      }
    }

    dialog::backdrop {
      background: rgb(23 23 23 / 0);
      transition:
        background 0.25s ease,
        display 0.25s allow-discrete,
        overlay 0.25s allow-discrete;
    }

    dialog[open]::backdrop {
      background: rgb(23 23 23 / 0.55);
    }

    @starting-style {
      dialog[open]::backdrop {
        background: rgb(23 23 23 / 0);
      }
    }

    /* Hero radar: slow sweep + staggered blip reveal on load. */
    .hero-radar__sweep::before {
      animation: hero-sweep 9s linear infinite;
    }

    .hero-radar__blip {
      animation: hero-blip-in 0.5s ease backwards;
    }

    .hero-radar__blip:nth-child(1) { animation-delay: 0.2s; }
    .hero-radar__blip:nth-child(2) { animation-delay: 0.5s; }
    .hero-radar__blip:nth-child(3) { animation-delay: 0.8s; }
    .hero-radar__blip:nth-child(4) { animation-delay: 1.1s; }
    .hero-radar__blip:nth-child(5) { animation-delay: 1.4s; }
    .hero-radar__blip:nth-child(6) { animation-delay: 1.7s; }

    /* Radar article demos: each modifier adds one build step, and one clock
       drives the sweep and every ping. */
    .radar-demo--rotate .radar-demo__sweep::before {
      animation: hero-sweep var(--radar-duration) linear infinite;
    }

    .radar-demo--entrance .radar-demo__blip {
      animation: hero-blip-in 0.5s ease backwards;
      animation-delay: calc(0.2s + var(--i, 0) * 0.3s);
    }

    .radar-demo--ping .radar-demo__blip::before {
      animation: radar-demo-ping var(--radar-duration) linear infinite;
      animation-delay: calc(var(--turn, 0) * var(--radar-duration));
    }

    .radar-progress:has(.radar-replay__input:checked) .radar-demo__blip {
      animation-name: radar-demo-blip-replay;
    }

    .radar-demo--still .radar-demo__sweep::before,
    .radar-demo--still .radar-demo__blip,
    .radar-demo--still .radar-demo__blip::before {
      animation: none;
    }

    .radar-replay {
      display: block;
    }

    @supports (animation-timeline: scroll()) {
      .scroll-demo__progress {
        display: block;
        scale: 0 1;
        animation: article-scroll-progress 1ms linear both;
        animation-timeline: --article-scroll;
      }
    }

    @keyframes hero-sweep {
      to {
        rotate: 1turn;
      }
    }

    @keyframes hero-blip-in {
      from {
        opacity: 0;
        scale: 0.85;
      }
    }

    /* Same frames as hero-blip-in under another name, for the replay. */
    @keyframes radar-demo-blip-replay {
      from {
        opacity: 0;
        scale: 0.85;
      }
    }

    @keyframes radar-demo-ping {
      0% {
        opacity: 1;
        scale: 2.4;
      }

      15%,
      100% {
        opacity: 0.45;
        scale: 1;
      }
    }

    @keyframes article-scroll-progress {
      to {
        scale: 1 1;
      }
    }

  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }

    .btn,
    .site-header__link--cta,
    .theme-toggle__icon svg,
    .analyze__input,
    dialog,
    dialog::backdrop {
      transition: none;
    }

    .theme-toggle__label:hover .theme-toggle__icon svg {
      animation: none;
    }

    .hero-radar__sweep::before,
    .hero-radar__blip {
      animation: none;
    }

    .radar-motion-note {
      display: block;
    }
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--paper);
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --border: 2px solid var(--ink);
  }
}

@media (forced-colors: active) {
  .btn,
  .site-header__link--cta,
  .analyze__input,
  .finding,
  .limits-card,
  .offer-card,
  .cta,
  .hero-proof {
    box-shadow: none;
  }

  .who__list li::before {
    forced-color-adjust: none;
    background: CanvasText;
  }
}
