/* HowPaano public site.
 *
 * The site carries no images, no video and no emoji, so every bit of energy has
 * to come from type, colour and space. The approach: a crisp high-contrast
 * surface, a modern grotesque at a wide weight range, and one saturated colour
 * per topic that runs through the whole page. Structure stays editorial (a
 * numbered index rather than a wall of cards) but the finish is contemporary.
 *
 * Hand-authored so the stylesheet stays one cacheable file with no build step.
 */

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: light;

  --bg:        #ffffff;
  --bg-sunk:   #f5f6f8;
  --bg-rise:   #ffffff;
  --bg-inset:  #fafbfc;
  --ink:       #0b0d12;
  --ink-soft:  #474e5a;
  --ink-mute:  #737c8a;
  --line:      #e6e9ee;
  --line-firm: #d2d7df;

  /* One saturated hue per topic. Set on a wrapper; everything inside inherits. */
  --accent:         #1d4ed8;
  --accent-tech:    #1d4ed8;
  --accent-outdoor: #0f8a4d;
  --accent-money:   #b45309;
  --accent-wash:    color-mix(in srgb, var(--accent) 7%, transparent);
  --accent-edge:    color-mix(in srgb, var(--accent) 28%, transparent);

  --focus: #1d4ed8;

  --sans: "Segoe UI Variable Display", "Segoe UI", -apple-system,
          BlinkMacSystemFont, "SF Pro Display", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", "Roboto Mono", Menlo,
          Consolas, "Liberation Mono", monospace;

  --measure: 68ch;
  --gutter: clamp(1.15rem, 4vw, 3.25rem);
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* Dark palette twice: once for system preference when the reader has not
 * chosen, once for an explicit choice, so the toggle wins in both directions. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg:        #0a0b0e;
    --bg-sunk:   #101218;
    --bg-rise:   #14161c;
    --bg-inset:  #101218;
    --ink:       #f2f4f8;
    --ink-soft:  #b2bac7;
    --ink-mute:  #7b8492;
    --line:      #1f232c;
    --line-firm: #2c313c;

    --accent:         #6f9dff;
    --accent-tech:    #6f9dff;
    --accent-outdoor: #43cc8a;
    --accent-money:   #f0ac4d;

    --focus: #6f9dff;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:        #0a0b0e;
  --bg-sunk:   #101218;
  --bg-rise:   #14161c;
  --bg-inset:  #101218;
  --ink:       #f2f4f8;
  --ink-soft:  #b2bac7;
  --ink-mute:  #7b8492;
  --line:      #1f232c;
  --line-firm: #2c313c;

  --accent:         #6f9dff;
  --accent-tech:    #6f9dff;
  --accent-outdoor: #43cc8a;
  --accent-money:   #f0ac4d;

  --focus: #6f9dff;
}

/* ----------------------------------------------------------------- reset */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.97rem + 0.18vw, 1.06rem);
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 640;
  line-height: 1.12;
  letter-spacing: -0.021em;
  text-wrap: balance;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

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

ul, ol { margin: 0 0 1.05em; padding-left: 1.15em; }
li { margin-bottom: 0.35em; }

::selection { background: var(--accent); color: #fff; }

/* ------------------------------------------------------------- utilities */

.shell {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.kicker {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 1rem;
  z-index: 60;
  font-size: 0.85rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

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

/* --------------------------------------------------------------- masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}

.masthead__bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem clamp(1rem, 3vw, 2.5rem);
  padding-block: 0.85rem;
}

.wordmark {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .slash {
  color: var(--accent);
  padding-inline: 0.05em;
}

.masthead__nav {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.masthead__nav a {
  font-size: 0.855rem;
  font-weight: 520;
  letter-spacing: -0.005em;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.38rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color 140ms var(--ease), background-color 140ms var(--ease);
}
.masthead__nav a:hover,
.masthead__nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-sunk);
}

.controls { display: flex; gap: 0.5rem; align-items: center; }

/* ---------------------------------------------------------- nav search */

.navsearch {
  position: relative;
  flex: 1 1 15rem;
  max-width: 22rem;
  min-width: 0;
  margin-left: auto;
}

.navsearch input {
  width: 100%;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--bg-sunk);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.44rem 2.1rem 0.44rem 0.9rem;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease),
              box-shadow 140ms var(--ease);
}
.navsearch input::placeholder { color: var(--ink-mute); }
.navsearch input:focus {
  outline: none;
  background: var(--bg-rise);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
/* The browser's own clear button duplicates Escape and crowds the field. */
.navsearch input::-webkit-search-cancel-button { display: none; }

.navsearch__hint {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--ink-mute);
  border: 1px solid var(--line-firm);
  border-radius: 4px;
  padding: 0.05rem 0.32rem;
  pointer-events: none;
}
.navsearch input:focus ~ .navsearch__hint { opacity: 0; }

.navsearch__results {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 40;
  list-style: none;
  margin: 0;
  padding: 0.3rem;
  background: var(--bg-rise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 10px -6px rgba(11, 13, 18, 0.2),
              0 18px 40px -22px rgba(11, 13, 18, 0.45);
  max-height: 60vh;
  overflow-y: auto;
}
.navsearch__results li { margin: 0; }

.navsearch__hit {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
}
.navsearch__hit-title {
  font-size: 0.9rem;
  font-weight: 540;
  line-height: 1.3;
  min-width: 0;
}
.navsearch__hit-meta {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
  flex: none;
}
.navsearch__results li.is-active .navsearch__hit,
.navsearch__hit:hover {
  background: var(--accent-wash);
  color: var(--accent);
}
.navsearch__results li.is-active .navsearch__hit-meta { color: var(--accent); }

.navsearch__empty {
  padding: 0.7rem 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-mute);
}

@media (max-width: 46rem) {
  .navsearch {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }
  .navsearch__hint { display: none; }
}

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

/* Short declarative lines, each given its own beat. */
.hero__facts {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: grid;
  gap: 0.55rem;
  max-width: 40ch;
}
.hero__facts li {
  margin: 0;
  font-size: clamp(0.96rem, 0.93rem + 0.18vw, 1.05rem);
  font-weight: 520;
  color: var(--ink-soft);
  padding-left: 0.95rem;
  position: relative;
}
.hero__facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}

@media (max-width: 46rem) {
  .masthead__bar { row-gap: 0.55rem; }
  .wordmark { flex: 0 0 auto; }
  .controls { margin-left: auto; order: 1; }
  .masthead__nav {
    order: 2;
    flex-basis: 100%;
    margin-left: -0.6rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }
  .masthead__nav::-webkit-scrollbar { display: none; }
  .masthead__nav a { white-space: nowrap; }
}

.chip {
  font-size: 0.775rem;
  font-weight: 540;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line-firm);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  transition: border-color 140ms var(--ease), color 140ms var(--ease),
              background-color 140ms var(--ease);
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-wash);
}

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

.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  padding-block: clamp(3rem, 9vw, 6.5rem);
  overflow: hidden;
}

/* A soft colour field instead of a photograph. Cheap, and it gives the page
 * somewhere for the eye to land without adding a single byte of image. */
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 40% auto -20%;
  height: 130%;
  background:
    radial-gradient(60% 55% at 30% 35%,
      color-mix(in srgb, var(--accent-tech) 13%, transparent), transparent 70%),
    radial-gradient(45% 45% at 70% 60%,
      color-mix(in srgb, var(--accent-outdoor) 10%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__statement {
  font-size: clamp(2.3rem, 1.1rem + 4.6vw, 4.6rem);
  line-height: 1.015;
  letter-spacing: -0.038em;
  font-weight: 700;
  max-width: 15ch;
  margin-top: 0.9rem;
}

.hero__lede {
  margin-top: 1.5rem;
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.14rem);
}

/* The index panel states what the site actually holds. */
.indexcard {
  border: 1px solid var(--line);
  background: var(--bg-rise);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
  box-shadow: 0 1px 2px rgba(11, 13, 18, 0.04),
              0 12px 28px -18px rgba(11, 13, 18, 0.28);
}
.indexcard__title {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 0.6rem 0.65rem 0.7rem;
  margin: 0;
}
.indexcard__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.62rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 140ms var(--ease);
}
.indexcard__row:hover { background: var(--accent-wash); }
.indexcard__label {
  font-weight: 560;
  font-size: 0.93rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
/* A colour dot carries the topic identity where an icon would otherwise go. */
.indexcard__label::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.indexcard__row:hover .indexcard__label { color: var(--accent); }
.indexcard__value {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------- register */

.band { padding-block: clamp(2.6rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
.band:last-of-type { border-bottom: 0; }

.band__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.1rem;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
}

.band__title {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem);
  letter-spacing: -0.028em;
  font-weight: 680;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

/* An accent bar replaces the old hairline rule and gives each topic a colour. */
.rule-accent {
  border-bottom: 1px solid var(--line);
  position: relative;
}
.rule-accent::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 3.5rem; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.band__blurb {
  color: var(--ink-soft);
  max-width: 58ch;
  margin-top: 1.15rem;
  font-size: 1rem;
}

.register { display: grid; }

.entry {
  display: grid;
  grid-template-columns: 2.9rem minmax(0, 1fr) auto;
  gap: 0 1.2rem;
  align-items: baseline;
  padding: 1.25rem 0.9rem 1.25rem 0.75rem;
  margin-inline: -0.75rem;
  border-radius: var(--radius);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  position: relative;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}
.entry:hover {
  background: var(--bg-sunk);
  transform: translateX(3px);
}
.entry:hover .entry__figure { color: var(--accent); }
.entry:hover .entry__title { color: var(--accent); }

.entry__figure {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  transition: color 160ms var(--ease);
}

.entry__title {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.32rem);
  font-weight: 620;
  letter-spacing: -0.021em;
  margin: 0;
  transition: color 160ms var(--ease);
}

.entry__dek {
  margin-top: 0.42rem;
  color: var(--ink-soft);
  font-size: 0.945rem;
  max-width: 64ch;
}

.entry__meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-mute);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Topic pill, coloured by the band it sits in. */
.entry__meta .tag {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid var(--accent-edge);
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
}

@media (max-width: 40rem) {
  .entry { grid-template-columns: 2.1rem minmax(0, 1fr); }
  .entry__meta { grid-column: 2; text-align: left; margin-top: 0.55rem; white-space: normal; }
  .entry__meta .tag { margin-top: 0; margin-left: 0.5rem; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Topic hues. Set on a wrapper so a whole band picks up one colour.
 *
 * The derived tints have to be redeclared here, not just --accent. A custom
 * property is substituted at the point it is DECLARED, so --accent-wash
 * defined on :root keeps the root accent no matter what --accent becomes
 * further down the tree. That is what made a green article show a blue tint. */
[data-topic="tech"] {
  --accent: var(--accent-tech);
  --accent-wash: color-mix(in srgb, var(--accent-tech) 7%, transparent);
  --accent-edge: color-mix(in srgb, var(--accent-tech) 28%, transparent);
}
[data-topic="outdoor"] {
  --accent: var(--accent-outdoor);
  --accent-wash: color-mix(in srgb, var(--accent-outdoor) 8%, transparent);
  --accent-edge: color-mix(in srgb, var(--accent-outdoor) 30%, transparent);
}
[data-topic="money"] {
  --accent: var(--accent-money);
  --accent-wash: color-mix(in srgb, var(--accent-money) 8%, transparent);
  --accent-edge: color-mix(in srgb, var(--accent-money) 30%, transparent);
}

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

.article { padding-block: clamp(2.2rem, 5vw, 3.8rem); }

.article__head {
  padding-bottom: 1.9rem;
  margin-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.article__head::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 4rem; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.article__breadcrumb {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
  font-size: 0.8rem;
}
.article__breadcrumb a { text-decoration: none; }
.article__breadcrumb a:hover { text-decoration: underline; }

.article__title {
  font-size: clamp(2rem, 1.15rem + 3.2vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 19ch;
}

.article__dek {
  margin-top: 1.15rem;
  font-size: clamp(1.06rem, 1rem + 0.4vw, 1.26rem);
  color: var(--ink-soft);
  max-width: var(--measure);
}

.article__rail {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  align-items: center;
}

.article__body {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(0, 16rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

@media (max-width: 62rem) {
  .article__body { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static !important; order: -1; }
}

.prose { font-size: 1.05rem; line-height: 1.68; }
.prose p { margin-bottom: 1.1em; }

/* The standfirst gets the topic colour as a left rule and a tinted field. */
.lede {
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--accent-wash);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.15rem 1.35rem;
  margin-bottom: 2.5rem;
}

.step { margin-bottom: 2.7rem; scroll-margin-top: 5.5rem; }

.step__head {
  display: grid;
  grid-template-columns: 4.3rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: baseline;
  margin-bottom: 0.85rem;
}

/* A solid numbered marker rather than a small grey label. */
.step__figure {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid var(--accent-edge);
  border-radius: 999px;
  padding: 0.24rem 0.1rem;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  align-self: start;
}

.step__title {
  font-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.5rem);
  letter-spacing: -0.024em;
  font-weight: 640;
}

.step__body { padding-left: 5.2rem; }
@media (max-width: 40rem) {
  .step__head { grid-template-columns: 4.1rem minmax(0, 1fr); }
  .step__body { padding-left: 0; }
}

.checklist { list-style: none; padding-left: 0; margin-top: 1rem; }
.checklist li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.5em;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.45rem; height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

.closing {
  margin-top: 3rem;
  padding: 1.6rem 1.5rem;
  background: var(--bg-sunk);
  border-radius: var(--radius);
}

.sources { margin-top: 2.6rem; }
.sources ol { padding-left: 1.25rem; }
.sources li { font-size: 0.9rem; word-break: break-word; }
.sources a { color: var(--accent); }

.toc {
  position: sticky;
  top: 5.4rem;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}
.toc__title {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 0.85rem;
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { margin-bottom: 0.15rem; counter-increment: toc; }
.toc a {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 0.35rem;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--ink-soft);
  line-height: 1.4;
  padding: 0.35rem 0.4rem;
  margin-inline: -0.4rem;
  border-radius: var(--radius-sm);
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-mute);
}
.toc a:hover { color: var(--accent); background: var(--accent-wash); }
.toc a:hover::before { color: var(--accent); }

/* ------------------------------------------------------------ parallel cue */

/* The bilingual switch is the one piece of chrome specific to this site, so it
 * gets a real treatment rather than a plain link. */
.parallel {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line-firm);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  overflow: hidden;
  background: var(--bg);
}
.parallel span { padding: 0.34rem 0.62rem; line-height: 1.3; }
.parallel .on { background: var(--ink); color: var(--bg); }
.parallel .off { color: var(--ink-mute); }
.parallel:hover .off { color: var(--ink); }

/* ------------------------------------------------------------------ forms */

.searchform { display: flex; gap: 0.5rem; margin-top: 1.7rem; max-width: 34rem; }
.searchform input {
  flex: 1;
  font-family: inherit;
  font-size: 0.94rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line-firm);
  border-radius: var(--radius-sm);
  background: var(--bg-rise);
  color: var(--ink);
  min-width: 0;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.searchform input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.searchform button {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 560;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: filter 140ms var(--ease);
}
.searchform button:hover { filter: brightness(1.08); }

/* ------------------------------------------------------------------ misc */

.note {
  border-left: 3px solid var(--line-firm);
  padding-left: 1.05rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.empty {
  padding-block: 3rem;
  color: var(--ink-mute);
  font-size: 0.95rem;
}

.pagehead {
  padding-block: clamp(2.6rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.pagehead h1 {
  font-size: clamp(2rem, 1.2rem + 2.8vw, 3.2rem);
  letter-spacing: -0.033em;
  font-weight: 700;
  margin-top: 0.85rem;
}
.pagehead p { margin-top: 1.15rem; max-width: var(--measure); color: var(--ink-soft); }

.longform { padding-block: clamp(2.2rem, 5vw, 3.6rem); max-width: var(--measure); }
.longform h2 {
  font-size: 1.32rem;
  letter-spacing: -0.025em;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.longform h2:first-child { margin-top: 0; }
.longform a { color: var(--accent); }
.longform code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-sunk);
  padding: 0.12em 0.36em;
  border-radius: 4px;
}

/* One AdSense slot. Fixed minimum height so a late-loading ad cannot push the
 * text around after paint, which is what wrecks CLS. */
.adslot {
  margin-block: 2.8rem;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--bg-sunk);
  border-radius: var(--radius);
  padding: 1rem;
}
.adslot__label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

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

.colophon {
  border-top: 1px solid var(--line);
  background: var(--bg-sunk);
  margin-top: clamp(3rem, 8vw, 6rem);
  padding-block: 3rem 3.4rem;
  padding-bottom: calc(3.4rem + env(safe-area-inset-bottom, 0px));
}

.colophon__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 2.2rem;
}

.colophon h2 {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.9rem;
  font-weight: 600;
}

.colophon ul { list-style: none; padding: 0; margin: 0; }
.colophon li { margin-bottom: 0.5rem; }
.colophon a {
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 140ms var(--ease);
}
.colophon a:hover { color: var(--accent); }

.colophon__base {
  margin-top: 2.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ print */

@media print {
  .masthead, .colophon, .toc, .adslot, .controls, .searchform { display: none !important; }
  .hero::before { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article__body { grid-template-columns: 1fr; }
  a { text-decoration: none; }
  .entry { break-inside: avoid; }
}
