/* ==========================================================================
   SoftwarePick — design system
   --------------------------------------------------------------------------
   Identity: "ink on paper". A warm paper ground rather than sterile white,
   near-black warm ink, a high-contrast editorial serif for display type, and
   two accents — indigo for anything interactive, ember for editorial
   signalling (eyebrows, rules, picks). The intent is a serious publication
   that happens to be on the web, not a SaaS marketing template.

   Everything is driven by the tokens in :root. Change a token, the whole
   site follows. No framework, no build step.

   Order: tokens → reset → primitives → layout → components → prose
          → page blocks → utilities → print
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Type ---------------------------------------------------------------- */
  --font-display: "Fraunces", "Iowan Old Style", "Charter", Cambria, Georgia,
    "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --text-2xs: 0.6875rem;
  --text-xs: 0.78125rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.6875rem;
  --text-3xl: 2.125rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;

  --leading-tight: 1.08;
  --leading-snug: 1.25;
  --leading-normal: 1.55;
  --leading-relaxed: 1.72;

  --tracking-tight: -0.021em;
  --tracking-snug: -0.011em;
  --tracking-wide: 0.09em;

  /* Space (4px base) ----------------------------------------------------- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.5rem;
  --sp-8: 3rem;
  --sp-9: 4rem;
  --sp-10: 5.5rem;
  --sp-11: 7rem;

  /* Radius, borders, elevation -------------------------------------------- */
  --radius-sm: 5px;
  --radius: 9px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --border-width: 1px;

  --shadow-sm: 0 1px 2px rgba(28, 20, 12, 0.05);
  --shadow: 0 1px 2px rgba(28, 20, 12, 0.05), 0 10px 24px -12px rgba(28, 20, 12, 0.18);
  --shadow-lg: 0 2px 4px rgba(28, 20, 12, 0.05),
    0 28px 56px -20px rgba(28, 20, 12, 0.26);

  /* Layout ---------------------------------------------------------------- */
  --w-page: 1200px;
  --w-wide: 1360px;
  --w-prose: 43rem;
  --header-h: 66px;

  /* Colour — light: warm paper -------------------------------------------- */
  --c-bg: #faf8f4;
  --c-bg-alt: #f2eee6;
  --c-surface: #ffffff;
  --c-surface-2: #f5f1ea;
  --c-ink: #14110e;
  --c-ink-2: #3c3630;
  --c-muted: #6c635a;
  --c-faint: #9a9087;
  --c-border: #e7e0d5;
  --c-border-strong: #d3c9ba;

  --c-brand: #4338ca;
  --c-brand-ink: #322a9e;
  --c-brand-soft: #eeecfb;
  --c-brand-contrast: #ffffff;

  --c-ember: #b8420f;
  --c-ember-soft: #fbeee5;

  --c-positive: #14663f;
  --c-positive-soft: #e6f2ea;
  --c-negative: #a7301f;
  --c-negative-soft: #fbeae6;
  --c-notice: #8a5b00;
  --c-notice-soft: #fbf1de;

  --c-focus: #4338ca;
  --c-selection: #ded9fa;

  /* Buttons take the ink, not the brand: a black button reads editorial,
     a blue one reads software marketing. */
  --btn-bg: var(--c-ink);
  --btn-fg: var(--c-bg);
  --btn-bg-hover: var(--c-brand);

  color-scheme: light;
}

/* Dark — warm charcoal, not a neutral inversion. The accents lift rather
   than invert so the identity survives the theme switch. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #131110;
    --c-bg-alt: #191614;
    --c-surface: #1d1a17;
    --c-surface-2: #262119;
    --c-ink: #f4efe8;
    --c-ink-2: #d6cec4;
    --c-muted: #a49a8e;
    --c-faint: #7c7367;
    --c-border: #302a24;
    --c-border-strong: #443c33;

    --c-brand: #a9b4ff;
    --c-brand-ink: #c8cfff;
    --c-brand-soft: #201f3a;
    --c-brand-contrast: #12101d;

    --c-ember: #f0975c;
    --c-ember-soft: #2b1d13;

    --c-positive: #5ec78f;
    --c-positive-soft: #10241a;
    --c-negative: #ef8d7f;
    --c-negative-soft: #2a1714;
    --c-notice: #e0b25e;
    --c-notice-soft: #2a2113;

    --c-focus: #a9b4ff;
    --c-selection: #2b2a52;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 28px -14px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.8);

    --btn-bg: var(--c-ink);
    --btn-fg: #16130f;
    --btn-bg-hover: var(--c-brand);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --c-bg: #131110;
  --c-bg-alt: #191614;
  --c-surface: #1d1a17;
  --c-surface-2: #262119;
  --c-ink: #f4efe8;
  --c-ink-2: #d6cec4;
  --c-muted: #a49a8e;
  --c-faint: #7c7367;
  --c-border: #302a24;
  --c-border-strong: #443c33;

  --c-brand: #a9b4ff;
  --c-brand-ink: #c8cfff;
  --c-brand-soft: #201f3a;
  --c-brand-contrast: #12101d;

  --c-ember: #f0975c;
  --c-ember-soft: #2b1d13;

  --c-positive: #5ec78f;
  --c-positive-soft: #10241a;
  --c-negative: #ef8d7f;
  --c-negative-soft: #2a1714;
  --c-notice: #e0b25e;
  --c-notice-soft: #2a2113;

  --c-focus: #a9b4ff;
  --c-selection: #2b2a52;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 28px -14px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.8);

  --btn-bg: var(--c-ink);
  --btn-fg: #16130f;
  --btn-bg-hover: var(--c-brand);

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-5));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--c-brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

a:hover {
  color: var(--c-brand-ink);
  text-decoration-color: currentColor;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  font-weight: 650;
  text-wrap: balance;
}

hr {
  border: 0;
  border-top: var(--border-width) solid var(--c-border);
  margin: var(--sp-7) 0;
}

.icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.15em;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--w-page);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

@media (min-width: 640px) {
  .container {
    padding-inline: var(--sp-6);
  }
}

.container--wide {
  max-width: var(--w-wide);
}
.container--prose {
  max-width: var(--w-prose);
}

.stack > * + * {
  margin-top: var(--sp-4);
}
.stack-lg > * + * {
  margin-top: var(--sp-6);
}

.section {
  padding-block: var(--sp-8);
}

@media (min-width: 900px) {
  .section {
    padding-block: var(--sp-9);
  }
}

.section--alt {
  background: var(--c-bg-alt);
  border-block: var(--border-width) solid var(--c-border);
}

/* Editorial section header: eyebrow, rule, title, lede. */
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 2px solid var(--c-ink);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 40;
}

@media (min-width: 900px) {
  .section__title {
    font-size: var(--text-3xl);
  }
}

.section__lede {
  color: var(--c-muted);
  font-size: var(--text-base);
  max-width: 58ch;
  margin-top: var(--sp-3);
}

.section__link {
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  color: var(--c-ink);
  border-bottom: 2px solid var(--c-ember);
  padding-bottom: 2px;
}

.section__link:hover {
  color: var(--c-ember);
}

.section__link .icon {
  width: 15px;
  height: 15px;
  margin-inline-start: 4px;
}

/* Eyebrow: the small ember label that sets an editorial tone. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--c-ember);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
  flex: none;
}

.eyebrow--plain::before {
  display: none;
}

.grid {
  display: grid;
  gap: var(--sp-5);
}

/* Grid items default to min-width:auto too, so a wide child (a table, a long
   product name) can force the whole track past the viewport. */
.grid > *,
.split > *,
.shell > * {
  min-width: 0;
}

@media (min-width: 620px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.shell {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1080px) {
  .shell--with-aside {
    grid-template-columns: minmax(0, 1fr) 296px;
    gap: var(--sp-9);
    align-items: start;
  }
}

.shell__aside {
  display: none;
}

@media (min-width: 1080px) {
  .shell__aside {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + var(--sp-5));
  }
}

/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--c-ink);
  color: var(--c-bg);
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: var(--border-width) solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--c-border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 8px 24px -20px rgba(20, 17, 14, 0.5);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header {
    background: var(--c-bg);
  }
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: var(--header-h);
  min-width: 0;
}

@media (min-width: 640px) {
  .header__inner {
    gap: var(--sp-5);
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 24;
  color: var(--c-ink);
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.brand:hover {
  color: var(--c-ink);
}

.brand__mark {
  width: 28px;
  height: 28px;
  flex: none;
}

@media (min-width: 480px) {
  .brand {
    font-size: var(--text-xl);
  }
}

.nav {
  display: none;
}

@media (min-width: 1020px) {
  .nav {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
  }
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  color: var(--c-ink-2);
  font-size: var(--text-sm);
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: var(--sp-3);
  right: var(--sp-3);
  bottom: 2px;
  height: 2px;
  background: var(--c-ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.nav__link:hover {
  color: var(--c-ink);
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__link[aria-current="page"] {
  color: var(--c-ink);
  font-weight: 650;
}

.header__tools {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-inline-start: auto;
  flex: none;
}

@media (min-width: 640px) {
  .header__tools {
    gap: var(--sp-2);
  }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--c-ink-2);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--c-surface-2);
  color: var(--c-ink);
}

.icon-btn .icon {
  width: 19px;
  height: 19px;
}

@media (min-width: 1020px) {
  .icon-btn--menu {
    display: none;
  }
}

/* Mobile drawer */
.mobile-nav {
  display: block;
  border-top: var(--border-width) solid var(--c-border);
  background: var(--c-bg);
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-nav[hidden] {
  display: none;
}

@media (min-width: 1020px) {
  .mobile-nav {
    display: none !important;
  }
}

.mobile-nav__inner {
  padding-block: var(--sp-5) var(--sp-7);
}

.mobile-nav__group + .mobile-nav__group {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: var(--border-width) solid var(--c-border);
}

.mobile-nav__label {
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--c-faint);
  margin-bottom: var(--sp-3);
}

.mobile-nav__links {
  display: grid;
  gap: var(--sp-1);
}

.mobile-nav__link {
  display: flex;
  align-items: center;
  padding: var(--sp-3);
  border-radius: var(--radius-sm);
  color: var(--c-ink);
  text-decoration: none;
  font-weight: 550;
  min-height: 46px;
  font-size: var(--text-lg);
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 20;
}

.mobile-nav__link:hover {
  background: var(--c-surface-2);
}

/* --------------------------------------------------------------------------
   5. Buttons, pills, chips
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 46px;
  padding: var(--sp-3) var(--sp-5);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--text-sm);
  font-weight: 620;
  letter-spacing: 0.005em;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease,
    border-color 0.16s ease, transform 0.16s ease;
}

.btn:hover {
  background: var(--btn-bg-hover);
  color: var(--c-brand-contrast);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--c-border-strong);
  color: var(--c-ink);
}

.btn--ghost:hover {
  background: var(--c-surface-2);
  border-color: var(--c-ink);
  color: var(--c-ink);
}

.btn--sm {
  min-height: 38px;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-xs);
}

.btn--block {
  width: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: var(--text-2xs);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--c-surface-2);
  color: var(--c-muted);
  white-space: nowrap;
}

/* A pill carrying a long value - a whole pricing model, say - has to be
   allowed to wrap rather than forcing the card wider than the screen. */
.pill {
  max-width: 100%;
}

.sw-card__tags .pill,
.pill--wrap {
  white-space: normal;
  text-align: start;
}

.chips {
  min-width: 0;
}

.pill--brand {
  background: var(--c-brand-soft);
  color: var(--c-brand);
}
.pill--positive {
  background: var(--c-positive-soft);
  color: var(--c-positive);
}
.pill--notice {
  background: var(--c-ember-soft);
  color: var(--c-ember);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: var(--border-width) solid var(--c-border-strong);
  border-radius: var(--radius-pill);
  background: var(--c-surface);
  color: var(--c-ink-2);
  font-size: var(--text-sm);
  font-weight: 550;
  text-decoration: none;
  min-height: 40px;
  transition: border-color 0.15s ease, color 0.15s ease,
    background-color 0.15s ease;
}

.chip:hover {
  border-color: var(--c-ink);
  background: var(--c-ink);
  color: var(--c-bg);
}

/* --------------------------------------------------------------------------
   6. Cards
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--c-surface);
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.18s ease;
}

/* A hairline of ember that draws itself on hover — the one flourish. */
.card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 2px;
  background: var(--c-ember);
  border-radius: var(--radius) var(--radius) 0 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.card:hover {
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card:hover::before {
  transform: scaleX(1);
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--c-faint);
}

.card__title {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  font-weight: 640;
}

.card__title a {
  color: var(--c-ink);
  text-decoration: none;
}

.card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card:hover .card__title a {
  color: var(--c-brand);
}

.card__text {
  color: var(--c-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  margin-top: auto;
}

.card__foot {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--c-faint);
}

.card--feature {
  gap: var(--sp-4);
  padding: var(--sp-6);
}

.card--feature .card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 40;
}

@media (min-width: 900px) {
  .card--feature .card__title {
    font-size: var(--text-3xl);
  }
}

.card--flat {
  border-color: transparent;
  background: var(--c-bg-alt);
}

/* Category card */
.cat-card {
  position: relative;
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-5);
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  text-decoration: none;
  min-height: 104px;
  transition: border-color 0.18s ease, transform 0.18s ease,
    box-shadow 0.18s ease;
}

.cat-card:hover {
  border-color: var(--c-ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.cat-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--c-brand-soft);
  color: var(--c-brand);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.cat-card:hover .cat-card__icon {
  background: var(--c-ink);
  color: var(--c-bg);
}

.cat-card__icon .icon {
  width: 20px;
  height: 20px;
}

.cat-card__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.2;
  letter-spacing: var(--tracking-snug);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 24;
  color: var(--c-ink);
  text-wrap: balance;
}

.cat-card__count {
  display: block;
  font-size: var(--text-xs);
  color: var(--c-muted);
  margin-top: var(--sp-2);
  font-weight: 450;
  line-height: 1.5;
}

/* Flex children default to min-width:auto, which stops long words and long
   titles from wrapping and pushes the layout wider than the viewport. Every
   flex row that holds text needs its text column allowed to shrink. */
.sw-card > *,
.cat-card > *,
.author-box > *,
.callout > *,
.takeaways li > *,
.proscons li > * {
  min-width: 0;
}

.sw-card__name,
.sw-card__text,
.cat-card__name,
.cat-card__count {
  overflow-wrap: break-word;
}

/* Software card */
.sw-card {
  position: relative;
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  align-items: flex-start;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.sw-card:hover {
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-sm);
}

.sw-card__logo {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--c-surface-2);
  border: var(--border-width) solid var(--c-border);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  color: var(--c-muted);
  overflow: hidden;
}

.sw-card__name {
  font-size: var(--text-base);
  font-weight: 650;
}

.sw-card__name a {
  color: var(--c-ink);
  text-decoration: none;
}

.sw-card__name a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.sw-card:hover .sw-card__name a {
  color: var(--c-brand);
}

.sw-card__text {
  font-size: var(--text-sm);
  color: var(--c-muted);
  margin-top: var(--sp-1);
}

.sw-card__tags {
  margin-top: var(--sp-3);
}

/* --------------------------------------------------------------------------
   7. Tables
   -------------------------------------------------------------------------- */

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
}

.data-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.data-table caption {
  caption-side: top;
  text-align: left;
  padding: var(--sp-4) var(--sp-5) var(--sp-2);
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--c-faint);
}

.data-table th,
.data-table td {
  padding: var(--sp-4) var(--sp-5);
  text-align: left;
  vertical-align: top;
  border-bottom: var(--border-width) solid var(--c-border);
}

.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--c-surface-2);
  font-weight: 700;
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--c-ink-2);
  white-space: nowrap;
  z-index: 1;
}

.data-table tbody tr:last-child td,
.data-table tbody tr:last-child th {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: var(--c-bg-alt);
}

.data-table th[scope="row"] {
  font-weight: 650;
  color: var(--c-ink);
  white-space: nowrap;
}

.table-hint {
  font-size: var(--text-xs);
  color: var(--c-faint);
  margin-top: var(--sp-2);
}

@media (min-width: 720px) {
  .table-hint {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   8. Prose
   -------------------------------------------------------------------------- */

.prose {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--c-ink-2);
  /* Long-form text stops being comfortable past about 70 characters, whatever
     width the column happens to have. */
  max-width: 70ch;
}

@media (min-width: 900px) {
  .prose {
    font-size: var(--text-lg);
  }
}

.prose > * + * {
  margin-top: var(--sp-5);
}

.prose p {
  text-wrap: pretty;
}

/* The opening paragraph gets a touch more presence. */
.prose > p:first-child {
  font-size: 1.08em;
  color: var(--c-ink);
}

.prose h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 44;
  color: var(--c-ink);
  margin-top: var(--sp-9);
  padding-top: var(--sp-4);
  border-top: var(--border-width) solid var(--c-border);
  scroll-margin-top: calc(var(--header-h) + var(--sp-5));
}

.prose h3 {
  font-size: var(--text-lg);
  font-weight: 680;
  letter-spacing: var(--tracking-snug);
  color: var(--c-ink);
  margin-top: var(--sp-7);
  scroll-margin-top: calc(var(--header-h) + var(--sp-5));
}

.prose h4 {
  font-size: var(--text-base);
  font-weight: 680;
  color: var(--c-ink);
  margin-top: var(--sp-5);
}

@media (min-width: 900px) {
  .prose h2 {
    font-size: var(--text-3xl);
  }
  .prose h3 {
    font-size: var(--text-xl);
  }
}

.prose ul,
.prose ol {
  padding-inline-start: var(--sp-5);
}

.prose li + li {
  margin-top: var(--sp-3);
}

.prose li::marker {
  color: var(--c-ember);
  font-weight: 600;
}

.prose strong {
  color: var(--c-ink);
  font-weight: 650;
}

.prose blockquote {
  margin-inline: 0;
  padding: var(--sp-5) var(--sp-6);
  border-inline-start: 3px solid var(--c-ember);
  background: var(--c-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--c-ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 24;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  background: var(--c-surface-2);
  border: var(--border-width) solid var(--c-border);
  color: var(--c-ink);
}

.prose pre {
  padding: var(--sp-5);
  border-radius: var(--radius);
  background: var(--c-surface-2);
  border: var(--border-width) solid var(--c-border);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  background: none;
  border: 0;
}

.prose img {
  border-radius: var(--radius);
  border: var(--border-width) solid var(--c-border);
}

.prose a {
  font-weight: 550;
  color: var(--c-ink);
  text-decoration-color: var(--c-ember);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.prose a:hover {
  color: var(--c-ember);
}

.prose .table-scroll {
  margin-block: var(--sp-6);
}

/* --------------------------------------------------------------------------
   9. Editorial components
   -------------------------------------------------------------------------- */

.breadcrumbs {
  padding-block: var(--sp-5) 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--text-xs);
  color: var(--c-faint);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.breadcrumbs a {
  color: var(--c-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--c-ember);
}

.breadcrumbs .sep {
  color: var(--c-border-strong);
}

.breadcrumbs [aria-current="page"] {
  color: var(--c-ink-2);
}

.page-head {
  padding-block: var(--sp-6) var(--sp-7);
}

.page-head__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.page-head__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.06;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 96;
}

@media (min-width: 720px) {
  .page-head__title {
    font-size: var(--text-4xl);
  }
}

@media (min-width: 1080px) {
  .page-head__title {
    font-size: var(--text-5xl);
  }
}

.page-head__deck {
  margin-top: var(--sp-5);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--c-muted);
  max-width: 60ch;
  text-wrap: pretty;
}

@media (min-width: 900px) {
  .page-head__deck {
    font-size: var(--text-xl);
  }
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: var(--border-width) solid var(--c-border);
  font-size: var(--text-sm);
  color: var(--c-muted);
}

.byline__dot {
  color: var(--c-border-strong);
}

.byline strong {
  color: var(--c-ink);
  font-weight: 620;
}

/* Key takeaways */
.takeaways {
  padding: var(--sp-6);
  border: var(--border-width) solid var(--c-border);
  border-inline-start: 3px solid var(--c-ember);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--c-surface);
}

.takeaways__title {
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--c-ember);
  margin-bottom: var(--sp-4);
}

.takeaways ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--sp-4);
}

.takeaways li {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--c-ink-2);
}

.takeaways li .icon {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 5px;
  color: var(--c-ember);
}

/* Table of contents */
.toc {
  border-top: 2px solid var(--c-ink);
  padding-top: var(--sp-4);
}

.toc__title {
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--c-faint);
  margin-bottom: var(--sp-3);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  font-size: var(--text-sm);
}

.toc a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-inline-start: 2px solid var(--c-border);
  color: var(--c-muted);
  text-decoration: none;
  line-height: 1.4;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.toc a:hover {
  border-inline-start-color: var(--c-border-strong);
  color: var(--c-ink);
}

.toc a[aria-current="true"] {
  color: var(--c-ink);
  font-weight: 600;
  border-inline-start-color: var(--c-ember);
}

.toc li.is-sub a {
  padding-inline-start: var(--sp-5);
  font-size: var(--text-xs);
}

.toc--mobile {
  margin-block: var(--sp-6);
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius);
  border-top-width: 2px;
  border-top-color: var(--c-ink);
  padding: var(--sp-4);
}

.toc--mobile summary {
  cursor: pointer;
  font-weight: 650;
  font-size: var(--text-sm);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
}

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

.toc--mobile[open] summary {
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: var(--border-width) solid var(--c-border);
}

@media (min-width: 1080px) {
  .toc--mobile {
    display: none;
  }
}

/* Pros & cons */
.proscons {
  display: grid;
  gap: var(--sp-4);
}

@media (min-width: 720px) {
  .proscons {
    grid-template-columns: 1fr 1fr;
  }
}

.proscons__col {
  padding: var(--sp-5);
  border-radius: var(--radius);
  border: var(--border-width) solid var(--c-border);
  background: var(--c-surface);
}

.proscons__col--pro {
  border-top: 2px solid var(--c-positive);
}
.proscons__col--con {
  border-top: 2px solid var(--c-negative);
}

.proscons__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--sp-4);
}

.proscons__col--pro .proscons__title {
  color: var(--c-positive);
}
.proscons__col--con .proscons__title {
  color: var(--c-negative);
}

.proscons ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.proscons li {
  display: flex;
  gap: var(--sp-3);
}

.proscons li .icon {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 5px;
}

.proscons__col--pro li .icon {
  color: var(--c-positive);
}
.proscons__col--con li .icon {
  color: var(--c-negative);
}

/* Callout */
.callout {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--radius);
  border: var(--border-width) solid var(--c-border);
  background: var(--c-surface);
}

.callout__icon {
  flex: none;
  color: var(--c-brand);
}

.callout__icon .icon {
  width: 22px;
  height: 22px;
}

.callout__title {
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--c-muted);
  margin-bottom: var(--sp-3);
}

.callout__body {
  font-size: var(--text-lg);
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 24;
  color: var(--c-ink);
  line-height: var(--leading-snug);
}

.callout--brand {
  background: var(--c-brand-soft);
  border-color: color-mix(in srgb, var(--c-brand) 22%, transparent);
}

.callout--notice {
  background: var(--c-ember-soft);
  border-color: color-mix(in srgb, var(--c-ember) 28%, transparent);
}

.callout--notice .callout__icon {
  color: var(--c-ember);
}

/* Disclosure */
.disclosure {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--c-muted);
  line-height: var(--leading-normal);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-bg-alt);
  border-radius: var(--radius-sm);
}

.disclosure .icon {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 3px;
  color: var(--c-ember);
}

.disclosure a {
  color: var(--c-ink);
}

/* FAQ */
.faq {
  display: grid;
  gap: 0;
  border-top: var(--border-width) solid var(--c-border);
}

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

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  font-weight: 620;
  font-size: var(--text-base);
  cursor: pointer;
  list-style: none;
  min-height: 56px;
  color: var(--c-ink);
}

@media (min-width: 900px) {
  .faq__q {
    font-size: var(--text-lg);
  }
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q:hover {
  color: var(--c-ember);
}

.faq__q .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--c-faint);
  transition: transform 0.2s ease;
}

.faq__item[open] .faq__q .icon {
  transform: rotate(180deg);
}

.faq__a {
  padding: 0 0 var(--sp-5);
  color: var(--c-ink-2);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  max-width: 68ch;
}

.faq__a > * + * {
  margin-top: var(--sp-3);
}

/* Author box */
.author-box {
  display: flex;
  gap: var(--sp-5);
  padding: var(--sp-6);
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg-alt);
}

.author-box__avatar {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  background: var(--c-surface);
  border: var(--border-width) solid var(--c-border);
  display: grid;
  place-items: center;
  color: var(--c-muted);
  overflow: hidden;
}

.author-box__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 24;
}

.author-box__role {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 700;
  color: var(--c-faint);
  margin-top: 4px;
}

.author-box__bio {
  margin-top: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--c-muted);
  line-height: var(--leading-normal);
}

/* Sources */
.sources ol {
  padding-inline-start: var(--sp-5);
  font-size: var(--text-sm);
  color: var(--c-muted);
  display: grid;
  gap: var(--sp-3);
}

.share {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--c-faint);
}

/* --------------------------------------------------------------------------
   10. Hero & home blocks
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: var(--sp-8) var(--sp-8);
  border-bottom: var(--border-width) solid var(--c-border);
  overflow: hidden;
}

/* A single soft wash of brand colour, bled off the top-right corner. */
.hero::before {
  content: "";
  position: absolute;
  top: -34rem;
  right: -18rem;
  width: 62rem;
  height: 62rem;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--c-brand) 12%, transparent) 0%,
    transparent 62%
  );
  pointer-events: none;
}

@media (min-width: 900px) {
  .hero {
    padding-block: var(--sp-10) var(--sp-9);
  }
}

.hero__grid {
  position: relative;
  display: grid;
  gap: var(--sp-7);
  align-items: start;
}

@media (min-width: 1000px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: var(--sp-9);
  }
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 600;
  letter-spacing: -0.032em;
  line-height: 1.02;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 144;
  margin-top: var(--sp-5);
  max-width: 15ch;
  text-wrap: balance;
}

@media (min-width: 720px) {
  .hero__title {
    font-size: var(--text-5xl);
  }
}

@media (min-width: 1200px) {
  .hero__title {
    font-size: 3.75rem;
  }
}

.hero__title em {
  font-style: italic;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 144;
  color: var(--c-brand);
}

.hero__lede {
  margin-top: var(--sp-5);
  max-width: 46ch;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--c-muted);
  text-wrap: pretty;
}

@media (min-width: 900px) {
  .hero__lede {
    font-size: var(--text-xl);
  }
}

.hero__search {
  margin-top: var(--sp-6);
  max-width: 32rem;
}

.hero__stats {
  list-style: none;
  margin: var(--sp-7) 0 0;
  padding: var(--sp-5) 0 0;
  border-top: var(--border-width) solid var(--c-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
}

.hero__stat-n {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 40;
  color: var(--c-ink);
}

.hero__stat-l {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--text-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--c-faint);
}

.hero__trust {
  list-style: none;
  margin: var(--sp-7) 0 0;
  padding: var(--sp-4) 0 0;
  border-top: var(--border-width) solid var(--c-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-muted);
}

.hero__trust li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.hero__trust li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-ember);
  flex: none;
}

/* The panel beside the hero */
.hero__aside {
  position: relative;
}

.hero__panel {
  padding: var(--sp-6);
  background: var(--c-surface);
  border: var(--border-width) solid var(--c-border);
  border-top: 2px solid var(--c-ink);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}

.hero__panel-title {
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--c-faint);
  margin-bottom: var(--sp-4);
}

/* Search field */
.searchbox {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2);
  padding-inline-start: var(--sp-4);
  background: var(--c-surface);
  border: var(--border-width) solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.searchbox:focus-within {
  border-color: var(--c-ink);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}

.searchbox__icon {
  color: var(--c-faint);
  flex: none;
}

.searchbox input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: var(--sp-2) 0;
  font-size: var(--text-base);
}

.searchbox input:focus {
  outline: none;
}

.searchbox .btn {
  flex: none;
}

/* Split panels */
.split {
  display: grid;
  gap: var(--sp-6);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-8);
  }
}

.panel {
  padding: var(--sp-6);
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
}

.panel__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: var(--border-width) solid var(--c-border);
}

.panel__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--c-ink);
  color: var(--c-bg);
  flex: none;
}

.panel__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 32;
}

.linklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.linklist li + li {
  border-top: var(--border-width) solid var(--c-border);
}

.linklist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  color: var(--c-ink-2);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 550;
  min-height: 46px;
  transition: color 0.15s ease, padding-inline-start 0.15s ease;
}

.linklist a:hover {
  color: var(--c-ink);
  padding-inline-start: var(--sp-2);
}

.linklist .icon {
  width: 15px;
  height: 15px;
  color: var(--c-border-strong);
  flex: none;
}

.linklist a:hover .icon {
  color: var(--c-ember);
}

/* Methodology */
.method {
  display: grid;
  gap: var(--sp-6);
  counter-reset: method;
}

@media (min-width: 800px) {
  .method {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-7);
  }
}

.method__item {
  display: grid;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 2px solid var(--c-ink);
}

.method__num {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  color: var(--c-ember);
}

.method__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 32;
}

.method__text {
  font-size: var(--text-base);
  color: var(--c-muted);
  line-height: var(--leading-normal);
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: var(--sp-10);
  border-top: 2px solid var(--c-ink);
  background: var(--c-bg-alt);
  padding-block: var(--sp-8) var(--sp-7);
  font-size: var(--text-sm);
}

.footer__top {
  display: grid;
  gap: var(--sp-7);
}

@media (min-width: 720px) {
  .footer__top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--sp-6);
  }
}

.footer__about p {
  margin-top: var(--sp-4);
  color: var(--c-muted);
  max-width: 38ch;
  line-height: var(--leading-normal);
}

.footer__label {
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--c-faint);
  margin-bottom: var(--sp-4);
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-3);
}

.footer__links a {
  color: var(--c-muted);
  text-decoration: none;
  display: inline-block;
}

.footer__links a:hover {
  color: var(--c-ink);
  text-decoration: underline;
  text-decoration-color: var(--c-ember);
  text-decoration-thickness: 2px;
}

.footer__bottom {
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: var(--border-width) solid var(--c-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
  color: var(--c-faint);
  font-size: var(--text-xs);
}

.footer__social {
  display: flex;
  gap: var(--sp-2);
}

/* --------------------------------------------------------------------------
   12. Language switcher & translation notice
   -------------------------------------------------------------------------- */

.lang {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang--header {
  display: none;
}

@media (min-width: 640px) {
  .lang--header {
    display: inline-flex;
  }
}

.lang--drawer {
  display: block;
  width: 100%;
}

@media (min-width: 640px) {
  .lang--drawer {
    display: none;
  }
}

.lang__select {
  appearance: none;
  -webkit-appearance: none;
  padding: var(--sp-2) var(--sp-6) var(--sp-2) var(--sp-3);
  min-height: 38px;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--c-ink-2);
  font-size: var(--text-sm);
  font-weight: 550;
  cursor: pointer;
  max-width: 9.5rem;
}

.lang__select:hover {
  background: var(--c-surface-2);
}

.lang--drawer .lang__select {
  width: 100%;
  max-width: none;
  min-height: 46px;
  border-color: var(--c-border);
  background: var(--c-surface);
}

.lang__chev {
  position: absolute;
  right: var(--sp-2);
  pointer-events: none;
  color: var(--c-faint);
  width: 16px;
  height: 16px;
}

.lang--drawer .lang__chev {
  top: auto;
  bottom: 14px;
}

.translate-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-ember-soft);
  border-bottom: var(--border-width) solid
    color-mix(in srgb, var(--c-ember) 30%, transparent);
  font-size: var(--text-xs);
  color: var(--c-ink-2);
}

.translate-notice button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--c-ember);
  font-weight: 700;
  text-decoration: underline;
  font-size: inherit;
}

.skiptranslate iframe,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}

body {
  top: 0 !important;
}

.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   13. Listings, pagination, search
   -------------------------------------------------------------------------- */

.listing {
  display: grid;
  gap: 0;
}

.list-row {
  position: relative;
  display: grid;
  gap: var(--sp-3);
  padding-block: var(--sp-6);
  border-bottom: var(--border-width) solid var(--c-border);
}

.list-row:first-child {
  padding-top: 0;
}

.list-row__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 32;
}

@media (min-width: 900px) {
  .list-row__title {
    font-size: var(--text-2xl);
  }
}

.list-row__title a {
  color: var(--c-ink);
  text-decoration: none;
}

.list-row__title a:hover {
  color: var(--c-brand);
}

.list-row__text {
  color: var(--c-muted);
  font-size: var(--text-base);
  max-width: 70ch;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-8);
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: var(--sp-3);
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-ink-2);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
}

.pagination a:hover {
  border-color: var(--c-ink);
  color: var(--c-ink);
}

.pagination [aria-current="page"] {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: var(--c-bg);
}

.empty {
  padding: var(--sp-9) var(--sp-5);
  text-align: center;
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--radius);
  color: var(--c-muted);
  background: var(--c-surface);
}

mark {
  background: var(--c-ember-soft);
  color: inherit;
  padding: 0 3px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   14. Ads
   -------------------------------------------------------------------------- */

.ad {
  display: block;
  margin-block: var(--sp-7);
  text-align: center;
}

.ad__label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--c-faint);
  margin-bottom: var(--sp-2);
}

.ad--in-article {
  min-height: 280px;
}
.ad--sidebar {
  min-height: 600px;
}
.ad--below-intro {
  min-height: 100px;
}

/* --------------------------------------------------------------------------
   15. Utilities
   -------------------------------------------------------------------------- */

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

.muted {
  color: var(--c-muted);
}
.faint {
  color: var(--c-faint);
}
.small {
  font-size: var(--text-sm);
}
.xs {
  font-size: var(--text-xs);
}
.center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.mt-4 {
  margin-top: var(--sp-4);
}
.mt-5 {
  margin-top: var(--sp-5);
}
.mt-6 {
  margin-top: var(--sp-6);
}
.mt-7 {
  margin-top: var(--sp-7);
}
.mt-8 {
  margin-top: var(--sp-8);
}
.mb-4 {
  margin-bottom: var(--sp-4);
}
.mb-5 {
  margin-bottom: var(--sp-5);
}
.flow > * + * {
  margin-top: var(--sp-4);
}

.divider {
  height: 1px;
  background: var(--c-border);
  margin-block: var(--sp-8);
  border: 0;
}

/* --------------------------------------------------------------------------
   16. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .toc,
  .ad,
  .share,
  .translate-notice,
  .hero__aside {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .prose a::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }
}

/* --------------------------------------------------------------------------
   14. Exit reports
   --------------------------------------------------------------------------
   The exit report is the one page type on the site where the data outranks
   the prose, so it gets its own furniture: a scorecard, a dotted rubric, and
   a two-column split for what survives an export and what does not.
   -------------------------------------------------------------------------- */

.exit-card {
  margin-block: var(--sp-6);
  padding: var(--sp-6);
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
}

.exit-card__head {
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start;
}

.exit-card__head > * { min-width: 0; }

.exit-card__grade {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: var(--radius);
  border: 2px solid var(--c-ink);
  background: var(--c-bg);
}

.exit-card__letter {
  font-family: var(--font-display, inherit);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--c-ink);
}

.exit-card__grade[data-grade="a"] { border-color: #1f7a4d; }
.exit-card__grade[data-grade="a"] .exit-card__letter { color: #1f7a4d; }
.exit-card__grade[data-grade="b"] { border-color: var(--c-brand); }
.exit-card__grade[data-grade="b"] .exit-card__letter { color: var(--c-brand); }
.exit-card__grade[data-grade="c"] { border-color: var(--c-ember); }
.exit-card__grade[data-grade="c"] .exit-card__letter { color: var(--c-ember); }
.exit-card__grade[data-grade="d"],
.exit-card__grade[data-grade="e"] { border-color: #a3231b; }
.exit-card__grade[data-grade="d"] .exit-card__letter,
.exit-card__grade[data-grade="e"] .exit-card__letter { color: #a3231b; }

:root:not([data-theme="light"]) .exit-card__grade[data-grade="a"] { border-color: #6ecf9e; }
:root:not([data-theme="light"]) .exit-card__grade[data-grade="a"] .exit-card__letter { color: #6ecf9e; }
:root:not([data-theme="light"]) .exit-card__grade[data-grade="d"],
:root:not([data-theme="light"]) .exit-card__grade[data-grade="e"] { border-color: #f08a82; }
:root:not([data-theme="light"]) .exit-card__grade[data-grade="d"] .exit-card__letter,
:root:not([data-theme="light"]) .exit-card__grade[data-grade="e"] .exit-card__letter { color: #f08a82; }

:root[data-theme="dark"] .exit-card__grade[data-grade="a"] { border-color: #6ecf9e; }
:root[data-theme="dark"] .exit-card__grade[data-grade="a"] .exit-card__letter { color: #6ecf9e; }
:root[data-theme="dark"] .exit-card__grade[data-grade="d"],
:root[data-theme="dark"] .exit-card__grade[data-grade="e"] { border-color: #f08a82; }
:root[data-theme="dark"] .exit-card__grade[data-grade="d"] .exit-card__letter,
:root[data-theme="dark"] .exit-card__grade[data-grade="e"] .exit-card__letter { color: #f08a82; }

.exit-card__title {
  margin: 0 0 var(--sp-3);
  font-size: 1.15rem;
  line-height: 1.25;
}

.exit-card__sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--c-muted);
}

.exit-meter {
  margin-block: var(--sp-5) var(--sp-5);
  height: 0.5rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--c-ink) 12%, transparent);
  overflow: hidden;
}

.exit-meter__fill {
  display: block;
  height: 100%;
  background: var(--c-brand);
}

.exit-table th[scope="row"] { white-space: normal; }
.exit-table__score { white-space: nowrap; }

.exit-dots {
  display: inline-flex;
  gap: 3px;
  margin-right: var(--sp-2);
  vertical-align: middle;
}

.exit-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: color-mix(in oklab, var(--c-ink) 18%, transparent);
}

.exit-dot.is-on { background: var(--c-brand); }

.exit-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--sp-5);
  margin-block: var(--sp-6);
}

.exit-split > *,
.exit-split__col > * { min-width: 0; }

.exit-split__col {
  padding: var(--sp-5);
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
}

.exit-split__col--out { border-left: 3px solid #1f7a4d; }
.exit-split__col--stay { border-left: 3px solid var(--c-ember); }

.exit-split__label {
  margin: 0 0 var(--sp-4);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.exit-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.94rem;
}

.exit-list li { margin-bottom: var(--sp-3); }
.exit-list li:last-child { margin-bottom: 0; }

.exit-checklist {
  margin-block: var(--sp-7);
  padding: var(--sp-6);
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
}

.exit-checklist h2 { margin-top: 0; font-size: 1.1rem; }
.exit-checklist ol { margin-bottom: 0; padding-left: 1.2rem; }
.exit-checklist li { margin-bottom: var(--sp-3); }

.exit-gaps {
  margin-block: var(--sp-6);
  padding: var(--sp-5);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius);
}

.exit-gaps__label {
  margin: 0 0 var(--sp-3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.exit-gaps ul { margin: 0; padding-left: 1.1rem; font-size: 0.92rem; }
.exit-gaps li { margin-bottom: var(--sp-2); }

.linklist--plain li {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-2);
  font-size: 0.88rem;
}

.linklist--plain li > span { color: var(--c-muted); }

@media (max-width: 480px) {
  .exit-card { padding: var(--sp-5); }
  .exit-card__head { gap: var(--sp-4); }
  .exit-card__grade { width: 3.25rem; height: 3.25rem; }
  .exit-card__letter { font-size: 1.5rem; }
}

/* --------------------------------------------------------------------------
   15. Hero icon field
   --------------------------------------------------------------------------
   A sparse scatter of the site's own category icons behind the hero.

   One rule governs every position below: icons occupy the page gutters and
   the strip above the headline, never the column the text runs down. They
   are also either wholly inside the hero or bled well past an edge - a shape
   cropped exactly in half reads as a mistake rather than as decoration.
   -------------------------------------------------------------------------- */

.hero__icons {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero__icon {
  position: absolute;
  display: block;
  color: var(--c-brand);
  opacity: 0.8;
  will-change: transform;
  animation: hero-drift 24s ease-in-out infinite alternate;
}

.hero__icon svg {
  display: block;
  width: 100%;
  height: auto;
  stroke-width: 1.1;
}

/* Two of the eight take the ember accent so the field is not monotone. */
.hero__icon--d,
.hero__icon--g { color: var(--c-ember); opacity: 0.8; }

@keyframes hero-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -10px, 0); }
}

/*
 * Mobile and tablet: the container runs almost edge to edge, so there are no
 * gutters to hide in. Two icons only, both bled deliberately off a corner
 * where the text is ragged, and nothing behind a line of copy.
 */
.hero__icon--a { top: -1.5rem; right: -1.75rem; width: 7rem; rotate: -10deg; }
.hero__icon--f { top: 34%; right: -1.25rem; width: 5rem; rotate: 8deg; animation-duration: 28s; animation-delay: -7s; }

.hero__icon--b,
.hero__icon--c,
.hero__icon--d,
.hero__icon--e,
.hero__icon--g,
.hero__icon--h { display: none; }

/* Desktop: real gutters open up on both sides, plus a strip above the panel. */
@media (min-width: 1000px) {
  .hero__icon--b,
  .hero__icon--c,
  .hero__icon--d,
  .hero__icon--e,
  .hero__icon--g,
  .hero__icon--h { display: block; }

  /* Left gutter */
  .hero__icon--a { top: 7%;    left: 2%;  right: auto; width: 4.5rem;  rotate: -8deg;  animation-duration: 26s; }
  .hero__icon--b { top: 45%;   left: 3.5%;            width: 3.5rem;  rotate: 7deg;   animation-duration: 30s; animation-delay: -6s; }
  .hero__icon--c { bottom: 13%; left: 2%;             width: 3rem;    rotate: -13deg; animation-duration: 23s; animation-delay: -11s; }

  /* Strip above the panel, and the narrow gap between the two columns */
  .hero__icon--d { top: 4%;  left: 60%;               width: 3.25rem; rotate: 6deg;   animation-duration: 32s; animation-delay: -18s; }
  .hero__icon--h { top: 19%; left: 54%;               width: 2.75rem; rotate: -5deg;  animation-duration: 25s; animation-delay: -14s; }

  /* Right gutter */
  .hero__icon--e { top: 6%;    right: 3%;             width: 2.25rem; rotate: 18deg;  animation-duration: 21s; animation-delay: -8s; }
  .hero__icon--f { top: 40%;   right: 2%;             width: 4.5rem;  rotate: -11deg; animation-duration: 27s; animation-delay: -9s; }
  .hero__icon--g { bottom: 15%; right: 3%;            width: 3rem;    rotate: 12deg;  animation-duration: 31s; animation-delay: -5s; }
}

/* Dark mode needs a little more presence to register against the ink. */
:root:not([data-theme="light"]) .hero__icon { opacity: 0.8; }
:root:not([data-theme="light"]) .hero__icon--d,
:root:not([data-theme="light"]) .hero__icon--g { opacity: 0.8; }

:root[data-theme="dark"] .hero__icon { opacity: 0.8; }
:root[data-theme="dark"] .hero__icon--d,
:root[data-theme="dark"] .hero__icon--g { opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  .hero__icon { animation: none; }
}

/* Postal address in the footer. Shown as stacked lines rather than a run-on
   sentence, and hidden entirely by the template when none is configured. */
.footer__address {
  margin-top: var(--sp-4);
  font-style: normal;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--c-muted);
}

.footer__address span { display: block; }


/* ==========================================================================
   16. Fix reports and tools
   The two formats share a visual language: a coloured rail on the left of
   every structured block, so the reader can tell at a glance which parts of
   the page are data and which are commentary.
   ========================================================================== */

/* --- The symptom block ---------------------------------------------------
   Deliberately first and deliberately plain. Someone landing here mid-problem
   needs to confirm in two seconds that they are on the right page. */
.fix-symptom {
  margin-block: var(--sp-6);
  padding: var(--sp-5) var(--sp-6);
  border: var(--border-width) solid var(--c-border);
  border-left: 3px solid var(--c-ember);
  border-radius: var(--radius);
  background: var(--c-surface);
}

.fix-symptom__label {
  margin: 0 0 var(--sp-2);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.fix-symptom__text {
  margin: 0;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--c-ink);
}

.fix-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-6);
  margin: var(--sp-5) 0 0;
  padding: var(--sp-4) 0 0;
  border-top: var(--border-width) solid var(--c-border);
  list-style: none;
}

.fix-meta li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fix-meta span {
  font-size: var(--text-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-faint);
}

.fix-meta strong {
  font-size: var(--text-sm);
  color: var(--c-ink);
}

/* --- The cause table ----------------------------------------------------- */
.fix-causes { margin-block: var(--sp-7); }

.fix-causes__intro {
  max-width: 62ch;
  margin: 0 0 var(--sp-5);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--c-muted);
}

.fix-table th[scope="row"] {
  font-weight: 600;
  color: var(--c-ink);
}

/* The confirm column is the reason this format exists, so it is weighted to
   read as an instruction rather than as another cell of description. */
.fix-table__confirm {
  font-size: var(--text-sm);
  color: var(--c-ink);
  background: var(--c-brand-soft);
}

.fix-likelihood {
  display: block;
  margin-top: var(--sp-1);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-faint);
}

/* The documented fact each row rests on. Small, but it is the difference
   between advice and evidence. */
.fix-doc {
  display: block;
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: var(--border-width) dashed var(--c-border);
  font-size: var(--text-2xs);
  line-height: 1.5;
  color: var(--c-muted);
}

/* --- The number ---------------------------------------------------------- */
.fix-number {
  margin-block: var(--sp-7);
  padding: var(--sp-6);
  border-radius: var(--radius);
  background: var(--c-brand-soft);
  border: var(--border-width) solid var(--c-border);
}

.fix-number__label {
  margin: 0 0 var(--sp-2);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-brand-ink);
}

.fix-number__value {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  color: var(--c-ink);
}

.fix-number__note {
  max-width: 60ch;
  margin: var(--sp-3) 0 0;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--c-muted);
}

/* --- Escalation ---------------------------------------------------------- */
.fix-still {
  margin-block: var(--sp-7);
  padding: var(--sp-6);
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg-alt);
}

.fix-still h2 {
  margin: 0 0 var(--sp-4);
  font-size: var(--text-xl);
}

.fix-still ol {
  margin: 0;
  padding-left: 1.15em;
  display: grid;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--c-ink);
}

/* --- Tools --------------------------------------------------------------- */
.tool-privacy {
  margin-block: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border-left: 3px solid var(--c-positive);
  border-radius: var(--radius-sm);
  background: var(--c-positive-soft);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--c-ink);
}

.tool {
  margin-block: var(--sp-6);
  padding: var(--sp-6);
  border: var(--border-width) solid var(--c-border-strong);
  border-radius: var(--radius);
  background: var(--c-surface);
}

.tool__label {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.tool__hint {
  margin: var(--sp-2) 0 0;
  font-size: var(--text-xs);
  color: var(--c-faint);
}

.tool__input,
.tool__select {
  width: 100%;
  max-width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: var(--border-width) solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.tool__select { font-family: var(--font-sans); }

.tool__input:focus-visible,
.tool__select:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

.tool__row {
  display: grid;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

@media (min-width: 640px) {
  .tool__row--split { grid-template-columns: 1fr 1fr; }
}

.tool__out {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: var(--border-width) solid var(--c-border);
}

/* One verdict line, stated plainly, before any detail. */
.tool__verdict {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-4);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--c-ink);
}

.tool__verdict[data-state="pass"] { color: var(--c-positive); }
.tool__verdict[data-state="fail"] { color: var(--c-negative); }
.tool__verdict[data-state="warn"] { color: var(--c-notice); }

.tool__checks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--sp-3);
}

.tool__check {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: var(--sp-3);
  align-items: start;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  background: var(--c-bg-alt);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.tool__check[data-state="fail"] { background: var(--c-negative-soft); }
.tool__check[data-state="warn"] { background: var(--c-notice-soft); }

.tool__mark {
  font-weight: 700;
  line-height: 1.5;
}

.tool__check[data-state="pass"] .tool__mark { color: var(--c-positive); }
.tool__check[data-state="fail"] .tool__mark { color: var(--c-negative); }
.tool__check[data-state="warn"] .tool__mark { color: var(--c-notice); }

.tool__check b { font-weight: 600; }

.tool__check code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  word-break: break-all;
}

.tool__why {
  display: block;
  margin-top: 2px;
  font-size: var(--text-2xs);
  color: var(--c-muted);
}

.tool__suggest {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  border: var(--border-width) dashed var(--c-border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.tool__suggest code {
  font-family: var(--font-mono);
  word-break: break-all;
}

/* Results table inside the transfer planner. */
.tool__table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }

.tool__table th,
.tool__table td {
  padding: var(--sp-3);
  text-align: left;
  border-bottom: var(--border-width) solid var(--c-border);
  vertical-align: top;
}

.tool__table th { font-weight: 600; color: var(--c-muted); font-size: var(--text-xs); }

.tool__table td b { font-weight: 600; }

@media (max-width: 560px) {
  .fix-symptom { padding: var(--sp-4) var(--sp-5); }
  .fix-number { padding: var(--sp-5); }
  .fix-number__value { font-size: var(--text-xl); }
  .fix-still { padding: var(--sp-5); }
  .tool { padding: var(--sp-5); }
  .fix-meta { gap: var(--sp-3) var(--sp-5); }
}
