/* 1. Variables ----------------------------------------------------------- */
:root {
  --ink: #0d0f12;
  --ink-2: #161a1f;
  --paper: #eceeef;
  --paper-2: #f6f7f7;
  --muted: #5a616b;
  /* Small grey text that can have the hero's glow behind it: readable there
     (5.0 to 1 on the glow at its strongest, where --muted is 3.4). */
  --muted-on-glow: #434952;
  --on-ink: #eceeef;
  --on-ink-muted: #99a0aa;
  --line: rgba(13, 15, 18, .13);
  --line-ink: rgba(236, 238, 239, .13);
  --accent: #4263eb;
  /* Verdict colours: the only place on the site where colour carries meaning. */
  --flag: #f59e0b;      /* signs that the image was made on a computer */
  --clear: #4cc38a;     /* looks like a camera photo */
  --unsure: #99a0aa;    /* no judgement */
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --edge: clamp(8px, 1.2vw, 16px);
}

/* 2. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.55 var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1160px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }

/* Off-screen until focused (the "skip" link), and text for screen readers only. */
.skip { position: absolute; left: -999px; }
.skip:focus {
  left: 16px; top: 16px; z-index: 10;
  background: var(--ink); color: var(--on-ink);
  padding: 8px 12px; border-radius: 6px;
}

/* 3. Type ---------------------------------------------------------------- */
h1, h2, .mail-address { font-family: var(--serif); font-weight: 300; letter-spacing: -.02em; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(46px, 7.4vw, 92px); line-height: .98; }
h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.05; text-wrap: balance; }
h3 { font-size: 17px; font-weight: 600; }
.lede { font-size: clamp(17px, 1.6vw, 19px); max-width: 33em; margin: 22px auto 0; }
.link { font-weight: 500; text-underline-offset: 5px; }

/* 4. Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 14px/1 var(--sans);
  padding: 11px 16px; border-radius: 8px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
}
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { background: #000; }
.btn-paper { background: var(--paper-2); color: var(--ink); }
.btn-paper:hover { background: #fff; }
.btn-quiet { background: none; color: var(--on-ink-muted); border-color: var(--line-ink); }
.btn-quiet:hover { color: var(--on-ink); }
.btn-line { background: none; color: var(--ink); border-color: rgba(13, 15, 18, .25); }
.btn-line:hover { border-color: var(--ink); }
.btn-lg { font-size: 15px; padding: 15px 22px; }

/* 5. Header and menu ----------------------------------------------------- */
/* Above the page, so the phone menu's panel covers what is under it (the FAQ
   page's row of groups is at 5); below the "skip" link when it shows (10). */
.nav {
  position: relative; z-index: 6;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px 32px; flex-wrap: wrap;
  padding-block: 22px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 18px; letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav ul {
  display: flex; align-items: center; gap: clamp(12px, 2.6vw, 34px);
  list-style: none; margin: 0; padding: 0;
}
.nav ul a { font-size: 15px; text-decoration: none; }
.nav ul a:hover, .nav ul a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }
.ext { display: inline-flex; align-items: center; gap: 5px; }

/* Phones: a "Menu" button that opens a panel with the same links and the
   "Scan an image" button (shown from 700 px down, below). */
.menu { display: none; position: relative; }
.menu summary {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 15px/1 var(--sans); padding: 9px 14px;
  border: 1px solid rgba(13, 15, 18, .6); border-radius: 8px;
  cursor: pointer; list-style: none; user-select: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--paper-2); border-color: var(--ink); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  width: min(340px, calc(100vw - 60px)); padding: 10px 12px 12px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 50px -14px rgba(13, 15, 18, .38);
}
.menu-panel ul { display: block; }
.menu-panel ul a { display: flex; align-items: center; gap: 6px; padding: 12px; border-radius: 8px; font-size: 17px; }
.menu-panel ul a:hover { text-decoration: none; background: var(--paper); }
.menu-panel ul a[aria-current] { text-decoration: none; font-weight: 600; }
/* A rule between the links and the button, then the button across the panel. */
.menu-panel .btn {
  display: flex; margin-top: 20px; padding-block: 14px; font-size: 15px; position: relative;
}
.menu-panel .btn::before {
  content: ""; position: absolute; left: 0; right: 0; top: -11px; border-top: 1px solid var(--line);
}

/* 6. Hero ---------------------------------------------------------------- */
.hero {
  position: relative; text-align: center;
  padding-block: clamp(48px, 8vw, 96px) clamp(56px, 7vw, 88px);
}
.hero > .wrap { position: relative; z-index: 1; }
/* Glow layer: drifts on its own, and follows the pointer when JavaScript is on. */
.glow {
  position: absolute; inset: -130px 0 0; z-index: 0;
  overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.glow-drift { position: absolute; left: 0; top: 0; animation: drift 12s ease-in-out infinite alternate; }
.glow-blob {
  position: absolute; left: -400px; top: -400px; width: 800px; height: 800px; border-radius: 50%;
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--accent) 34%, transparent),
    color-mix(in srgb, var(--accent) 12%, transparent) 55%,
    transparent);
  transform: translate3d(50vw, 300px, 0); will-change: transform;
}
@keyframes drift { from { transform: translate(-70px, -24px); } to { transform: translate(70px, 36px); } }
@media (prefers-reduced-motion: reduce) { .glow-drift { animation: none; } }

/* 7. Small pieces -------------------------------------------------------- */
/* The heading of a page that has no hero. */
.page-head { text-align: center; padding-block: clamp(32px, 5vw, 64px) clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1; }
.page-head p { margin: 16px auto 0; font-size: clamp(17px, 1.6vw, 19px); max-width: 32em; }

.block { padding-block: clamp(64px, 8vw, 112px); }
.block + .block { padding-top: 0; }
/* A pill label. On a dark card by default. */
.tag {
  font-size: 13px; line-height: 1; padding: 7px 11px;
  border: 1px solid var(--line-ink); border-radius: 999px; color: var(--on-ink-muted);
}

/* Ad positions (templates/partials/ad.html). The size is fixed per screen
   width, so the room is there before the ad arrives and the page does not
   jump. The dashed box is the placeholder shown while AdSense is switched off. */
.ad { padding-inline: 20px; }
.ad-top { padding-inline: 0; margin-top: clamp(28px, 4vw, 44px); }
.ad ins { display: block; margin-inline: auto; max-width: 100%; }
.ad-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  margin-inline: auto; max-width: 100%;
  border: 1px dashed rgba(13, 15, 18, .28); border-radius: 8px;
  color: var(--muted); font-size: 13px;
}
.ad-leader { width: 728px; height: 90px; }
.ad-billboard { width: 970px; height: 250px; }
.ad-fluid { width: 100%; height: 90px; }
.ad-tile { width: 300px; height: 250px; }
.ad-inline { width: 100%; height: 250px; }

/* A dark rounded band across the page, and a light rounded panel inside it. */
.dark {
  margin-inline: var(--edge); border-radius: clamp(20px, 2.6vw, 32px);
  background: var(--ink); color: var(--on-ink);
  padding-block: clamp(56px, 7vw, 96px);
}
.panel {
  padding: clamp(28px, 4.5vw, 60px);
  background: var(--paper-2); border-radius: clamp(16px, 2vw, 24px);
}
/* Heading on the left, a sentence on the right. */
.split { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px 64px; align-items: end; }
.split p { color: var(--on-ink-muted); font-size: 17px; max-width: 30em; }
.panel .split p { color: var(--muted); }
/* Heading column on the left, content on the right. */
.two { display: grid; grid-template-columns: 1fr 1.25fr; gap: 32px 64px; align-items: start; }
.two > div > p { color: var(--muted); margin-top: 16px; max-width: 26em; }

/* 8. Footer -------------------------------------------------------------- */
.foot {
  margin: 0 var(--edge) var(--edge);
  border-radius: clamp(20px, 2.6vw, 32px);
  background: var(--ink); color: var(--on-ink-muted);
  padding-block: 64px 32px; font-size: 15px;
}
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.foot .brand { color: var(--on-ink); }
/* The logo is a black square: on the dark footer it needs an edge to be seen. */
.foot .brand img { box-shadow: 0 0 0 1px rgba(236, 238, 239, .32); }
.foot p { margin-top: 12px; max-width: 24em; }
.foot h3 { font-size: 14px; font-weight: 500; color: var(--on-ink); margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { text-decoration: none; }
.foot a:hover, .foot a[aria-current] { color: var(--on-ink); }
.legal {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-ink); font-size: 14px;
}

@media (max-width: 1010px) {
  .ad-billboard { width: 728px; height: 90px; }
}
@media (max-width: 860px) {
  .split, .two { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav > nav { order: 3; width: 100%; }
  .nav > nav ul { justify-content: space-between; }
}
/* Phones: the "Menu" button takes the place of the links and the button. */
@media (max-width: 700px) {
  .nav > nav, .nav > .btn { display: none; }
  .menu { display: block; }
}
@media (max-width: 900px) {
  .ad-fluid { width: 728px; }
}
/* Up to this width a page's column is narrower than a 728 px ad. */
@media (max-width: 792px) {
  .ad-leader, .ad-fluid { width: 320px; height: 100px; }
}
@media (max-width: 780px) {
  .ad-billboard { width: 300px; height: 250px; }
}
/* Phones: the name and the button must share the first row, so both shrink a
   little. The button keeps its height; only its sides get narrower. */
@media (max-width: 520px) {
  .nav { column-gap: 12px; }
  .nav .brand { font-size: 16px; gap: 8px; }
  .nav .brand img { width: 24px; height: 24px; border-radius: 6px; }
  /* The name and blurb take the full width; in half of it the blurb ran to
     seven lines and squeezed the links beside it. */
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 359px) {
  /* The smallest phones: let a 320 px or 300 px ad keep its full width. */
  .ad { padding-inline: 10px; }
  .ad-top, .result-ad, .faq-ad, .post-ad, .blog-ad, .prose-ad { margin-inline: -20px; padding-inline: 0; }
  .nav { column-gap: 8px; }
  .nav .brand { font-size: 15px; gap: 7px; }
  .nav .brand img { width: 22px; height: 22px; border-radius: 5px; }
  .menu summary { padding-inline: 11px; }
}

/* ==========================================================================
 * Home page
 * ======================================================================== */
.block-tight { padding-top: clamp(8px, 2vw, 32px); }
.center-head { text-align: center; max-width: 14em; margin: 0 auto clamp(32px, 4vw, 56px); }

/* Scan box. Works without JavaScript: the file input covers the whole drop
   area, so a click opens the file chooser and a dropped file lands in it. */
.scan {
  max-width: 580px; margin: clamp(28px, 4vw, 44px) auto 0; padding: 6px; text-align: left;
  background: var(--ink); color: var(--on-ink); border-radius: 14px;
  box-shadow: 0 34px 60px -24px rgba(13, 15, 18, .55);
}
.drop { position: relative; display: block; padding: 20px 20px 64px; border-radius: 9px; cursor: pointer; }
.drop:hover, .drop.is-over { background: var(--ink-2); }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-title { display: block; font-size: 17px; }
.drop-title u { text-underline-offset: 4px; }
.drop-hint { display: block; margin-top: 4px; font-size: 14px; color: var(--on-ink-muted); overflow-wrap: anywhere; }
.drop-ready { display: none; font-size: 17px; }
/* A small picture of the chosen image, added by the script. It is as tall as
   the two lines of text beside it, so the box keeps its size. */
.drop.has-thumb { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; align-items: start; }
.drop.has-thumb > span { grid-column: 2; }
.drop-thumb {
  grid-column: 1; grid-row: 1 / span 3;
  width: 52px; height: 52px; object-fit: cover; border-radius: 8px;
  background: var(--ink-2); box-shadow: 0 0 0 1px var(--line-ink);
}
/* Once a file is chosen the title gives way to "Image added". */
.drop:has(input:valid) .drop-title { display: none; }
.drop:has(input:valid) .drop-ready { display: block; }
/* A problem with the chosen file, found before it is sent. */
.scan-error { padding: 0 20px 14px; font-size: 15px; color: #f5c26b; }
.scan-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px 10px; }
.scan-bar .btn-quiet { margin-left: auto; }
/* The two labels. On wide screens they sit in the bar beside the buttons, as
   if this wrapper were not there; on phones they get a row of their own. */
.scan-tags { display: contents; }
/* While the upload is on its way: nothing in the box can be changed. */
.scan.is-busy .drop { pointer-events: none; opacity: .6; }
.scan.is-busy .btn { opacity: .6; cursor: progress; }

/* Generator names: the strip moves by itself and pauses under the pointer. */
.gens { margin-top: clamp(48px, 6vw, 84px); }
.gens h2 { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.2; }
.marquee {
  max-width: 980px; margin: 26px auto 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul {
  display: flex; align-items: center; gap: clamp(40px, 6vw, 76px);
  list-style: none; margin: 0; padding: 0 clamp(20px, 3vw, 38px);
}
.marquee li { font-size: 20px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; color: var(--muted); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; width: auto; }
  .marquee ul { flex-wrap: wrap; justify-content: center; row-gap: 16px; }
  .marquee ul[aria-hidden] { display: none; }
}

/* Three steps, each under a small picture of the step. */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px;
  list-style: none; margin: 0; padding: 0; counter-reset: step;
}
.steps > li { counter-increment: step; display: grid; grid-template-columns: 2.2em 1fr; align-content: start; }
.steps > li::before {
  content: counter(step); grid-row: 2; grid-column: 1;
  font-family: var(--serif); font-size: 26px; font-weight: 300; line-height: 1; color: var(--muted);
}
.steps h3 { grid-row: 2; grid-column: 2; }
.steps p { grid-row: 3; grid-column: 2; margin-top: 6px; color: var(--muted); }
.tile {
  grid-row: 1; grid-column: 1 / -1;
  display: flex; flex-direction: column; justify-content: center;
  height: 200px; margin-bottom: 24px; padding: 24px;
  border-radius: 14px; background: var(--paper-2); font-size: 14px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px;
  background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 500; line-height: 1;
}
.mini-drop { flex: 1; display: grid; place-items: center; border: 1.5px dashed rgba(13, 15, 18, .25); border-radius: 10px; }
.mini-checks { list-style: none; margin: 0 auto; padding: 0; width: min(100%, 280px); display: grid; gap: 16px; }
.mini-checks li { display: grid; grid-template-columns: 1fr 96px; align-items: center; gap: 12px; }
.mini-checks i { height: 4px; border-radius: 2px; background: var(--line); }
.mini-checks i::after {
  content: ""; display: block; height: 100%; width: var(--w, 100%);
  border-radius: 2px; background: var(--ink);
}
.mini-verdict { display: grid; justify-items: start; gap: 10px; margin-inline: auto; color: var(--muted); }
.mini-verdict .chip { margin-bottom: 4px; }
.mini-verdict span:not(.chip) { display: flex; align-items: center; gap: 10px; }
.mini-verdict span:not(.chip)::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }

/* The four checks, numbered, inside the dark band. */
.layers {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px;
  list-style: none; margin: clamp(36px, 5vw, 56px) 0 0; padding: 32px 0 0;
  border-top: 1px solid var(--line-ink); counter-reset: layer;
}
.layers li { counter-increment: layer; }
.layers li::before {
  content: "0" counter(layer); display: block; margin-bottom: 28px;
  font-family: var(--serif); font-size: 26px; font-weight: 300; color: var(--on-ink-muted);
}
.layers p { margin-top: 8px; font-size: 15px; color: var(--on-ink-muted); }

/* Six features inside the light panel. */
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin: clamp(28px, 4vw, 48px) 0 0; }
.feat > div { padding-block: 24px 28px; border-top: 1px solid var(--line); }
.feat svg { display: block; margin-bottom: 16px; }
.feat dt { font-weight: 600; }
.feat dd { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.uses {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px;
  margin-top: clamp(28px, 4vw, 48px); padding-top: 28px; border-top: 1px solid var(--ink);
}
.uses p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* A row of articles that scrolls sideways (the home page's newest articles,
   "Keep reading" under an article). It swipes and scrolls without
   JavaScript; the arrow buttons appear only when the script can drive them. */
.head {
  display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.head-tools { display: flex; align-items: center; gap: 10px; }
.head-tools .link { margin-left: 14px; }
.arrow {
  width: 42px; height: 42px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--ink); cursor: pointer;
}
.arrow:hover:not(:disabled) { border-color: var(--ink); }
.arrow:disabled { opacity: .35; cursor: default; }
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 64px) / 3); gap: 32px;
  list-style: none; margin: 0 -6px; padding: 6px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 6px;
  overscroll-behavior-x: contain; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.post { scroll-snap-align: start; }
.post a { display: flex; flex-direction: column; gap: 12px; text-decoration: none; }
/* The grey picture icon shows through until the article's image has loaded,
   and stays for an article that has none. */
.post img {
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 12px; margin-bottom: 6px;
  background: #d7dade url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24' fill='none' stroke='%239099a3' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='15' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='m4 17 5-4.5 3.5 3 3-2.5L20 17'/%3E%3C/svg%3E") center no-repeat;
}
.post .meta { font-size: 14px; color: var(--muted); }
.post h3 {
  font-family: var(--serif); font-size: 24px; line-height: 1.2; font-weight: 400; letter-spacing: -.01em;
}
.post a:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.no-posts { color: var(--muted); }

/* Questions that open and close; one open at a time (the name attribute). */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; gap: 24px; padding-block: 20px;
  font-weight: 500; font-size: 17px; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--serif); font-size: 24px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 22px; color: var(--muted); max-width: 38em; }
.faq .link { display: inline-block; margin-top: 24px; }

/* A light band with a heading and a sentence on the left and one button on
   the right: the API band on the home page, the Ko-fi band on Contact. */
.band {
  display: flex; align-items: center; justify-content: space-between; gap: 28px 48px; flex-wrap: wrap;
  padding: clamp(28px, 4.5vw, 60px); background: var(--paper-2); border-radius: clamp(16px, 2vw, 24px);
}
.band h2 { font-size: clamp(28px, 3.4vw, 42px); max-width: 14em; }
.band p { margin-top: 12px; color: var(--muted); max-width: 32em; }
.band p a { color: var(--ink); text-underline-offset: 4px; }

@media (max-width: 860px) {
  .layers, .uses { grid-template-columns: 1fr 1fr; }
  .layers li::before { margin-bottom: 12px; }
  .steps { grid-template-columns: 1fr; }
  .tile { height: 170px; }
  .feat { grid-template-columns: 1fr 1fr; }
  .carousel { grid-auto-columns: calc((100% - 24px) / 2); gap: 24px; }
}
/* Scan box where the labels and both buttons no longer fit on one row (they
   need about 460 px): less empty room under the text, the labels on a row of
   their own, then Clear and a wide Scan now button that is easy to hit. */
@media (max-width: 600px) {
  .drop { padding-bottom: 36px; }
  .scan-bar { row-gap: 10px; }
  .scan-tags { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .scan-bar .btn { padding-block: 13px; }
  .scan-bar .btn-quiet { margin-left: 0; }
  .scan-bar .btn-paper { flex: 1; }
}
@media (max-width: 359px) {
  .scan-tags { gap: 6px; }
  .scan-tags .tag { font-size: 12px; padding: 7px 9px; }
}
@media (max-width: 520px) {
  .layers, .uses { grid-template-columns: 1fr; }
  .carousel { grid-auto-columns: 84%; gap: 16px; }
  .feat { grid-template-columns: 1fr; }
  .marquee li { font-size: 18px; }
  .head-tools .link { margin-left: 6px; }
}

/* ==========================================================================
 * Result page
 * ======================================================================== */
/* Wide screens: the image on the left, the verdict and the four lines on the
   right. Narrow screens: one column, with the banner above the verdict (the
   owner's choice). Only the look is reordered: in the page's code the verdict
   still comes first, which is the order a screen reader gives. */
.result {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  grid-template-areas: "compare verdict" "compare findings"; grid-template-rows: auto 1fr;
  gap: 20px; align-items: start;
}
.result-left { grid-area: compare; align-self: start; display: flex; flex-direction: column; gap: 20px; }
.verdict { grid-area: verdict; }
.findings { grid-area: findings; }
.result-ad { padding-inline: 0; }
.ad-row { padding-top: clamp(40px, 5vw, 64px); }

/* Verdict card: the same dark shell as the scan box. The dot's colour is the
   verdict's; the words beside and under it say the same thing. */
.verdict {
  padding: 26px 26px 28px; background: var(--ink); color: var(--on-ink); border-radius: 14px;
  box-shadow: 0 34px 60px -30px rgba(13, 15, 18, .55);
}
.verdict-state { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--on-ink-muted); }
.verdict-state::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--state, var(--flag));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--state, var(--flag)) 22%, transparent);
}
.verdict[data-state="clear"] { --state: var(--clear); }
.verdict[data-state="unsure"] { --state: var(--unsure); }
.verdict-text {
  margin-top: 16px; font-family: var(--serif); font-weight: 300; letter-spacing: -.02em;
  font-size: clamp(28px, 3vw, 38px); line-height: 1.08;
}
.verdict-note { margin-top: 12px; color: var(--on-ink-muted); }

/* The uploaded image with its Error Level Analysis map over it. A slider
   decides how much of each shows (--pos, from the left edge). The box has the
   image's own shape, so the whole image is always in view; a tall image is
   made narrower instead of taller than --max-h. Without JavaScript the
   slider rests halfway. */
.compare {
  padding: 6px; background: var(--ink); color: var(--on-ink); border-radius: 14px;
  box-shadow: 0 34px 60px -30px rgba(13, 15, 18, .55);
}
.compare-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap;
  padding: 14px 16px 16px;
}
.compare-head p { font-size: 14px; color: var(--on-ink-muted); }
.cmp {
  --pos: 50%; --max-h: 600px;
  position: relative; overflow: hidden; border-radius: 9px; margin-inline: auto;
  width: min(100%, calc(var(--max-h) * var(--w, 16) / var(--h, 11)));
  background: var(--ink-2);
}
.cmp img { width: 100%; height: auto; }
/* The original gives the box its height; the map is laid over it. */
.cmp-original { position: relative; }
.cmp-ela { position: absolute; inset: 0; height: 100% !important; clip-path: inset(0 0 0 var(--pos)); }
.cmp-tag {
  position: absolute; top: 12px; padding: 6px 10px; border-radius: 999px;
  font-size: 12px; line-height: 1; background: rgba(13, 15, 18, .72); color: var(--on-ink);
  pointer-events: none;
}
.cmp-tag-a { left: 12px; }
.cmp-tag-b { right: 12px; }
/* The slider control lies unseen over the whole image, so a drag anywhere
   moves the line. Its thumb is made 2 px wide: the line then follows the
   pointer exactly. Up-and-down swipes still scroll the page. */
.cmp input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0;
  cursor: ew-resize; touch-action: pan-y;
  -webkit-appearance: none; appearance: none; background: none;
}
.cmp input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 2px; height: 100%; }
.cmp input::-moz-range-thumb { width: 2px; height: 100%; border: 0; border-radius: 0; }
.cmp-line {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: #fff; pointer-events: none;
}
.cmp-line::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px;
  border-radius: 50%; box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%230d0f12' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 6 3 10l4 4M13 6l4 4-4 4'/%3E%3C/svg%3E") center no-repeat;
}
.cmp input:focus-visible ~ .cmp-line::after { outline: 3px solid var(--accent); outline-offset: 2px; }

/* What each layer found: a dot, the check's name, one sentence. */
.findings { padding: 8px 26px 24px; background: var(--paper-2); border-radius: 14px; }
.findings h2 { font: 500 13px/1 var(--sans); letter-spacing: 0; color: var(--muted); padding-block: 18px 14px; }
.findings > ul { list-style: none; margin: 0; padding: 0; }
.findings > ul > li {
  display: grid; grid-template-columns: 10px 1fr; gap: 4px 14px;
  padding-block: 14px; border-top: 1px solid var(--line);
}
.findings > ul > li::before {
  content: ""; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--unsure);
}
.findings > ul > li[data-state="flag"]::before { background: var(--flag); }
.findings > ul > li[data-state="clear"]::before { background: var(--clear); }
.findings p { grid-column: 2; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
/* Detection signals: the technical lines behind a finding, closed until asked for. */
.signals { grid-column: 2; margin-top: 6px; }
.signals summary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; cursor: pointer; list-style: none;
}
.signals summary::-webkit-details-marker { display: none; }
.signals summary::after { content: "+"; font-family: var(--serif); font-size: 20px; line-height: .8; color: var(--muted); }
.signals[open] summary::after { content: "\2212"; }
.signals summary:hover::after { color: var(--ink); }
.signals ul { list-style: none; margin: 10px 0 2px; padding: 0; display: grid; gap: 6px; }
.signals li {
  position: relative; padding-left: 18px;
  font-size: 14px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere;
}
.signals li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 1.5px; background: currentColor; }
.actions { display: grid; gap: 10px; margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.privacy { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }

/* Understanding your result. */
.page-result .block { padding-block: clamp(56px, 7vw, 96px); }
.page-result .split { gap: 20px 64px; }
.page-result .split p { color: var(--muted); }
.page-result .split a { color: var(--ink); text-underline-offset: 4px; }
.explain {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px;
  margin-top: clamp(28px, 4vw, 48px); padding-top: 28px; border-top: 1px solid var(--ink);
}
.explain p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* Wide and tall enough: the ad and the image stay in view together while the
   verdict and the lines scroll past, so the image may not be taller than the
   window leaves room for. */
@media (min-width: 901px) and (min-height: 680px) {
  .result-left { position: sticky; top: 20px; }
  .cmp { --max-h: min(600px, calc(100vh - 230px)); }
}
@media (max-width: 900px) {
  .result {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: none;
    grid-template-areas: "ad" "verdict" "compare" "findings";
  }
  /* With ads off there is no banner: its row must not leave a gap. */
  .result.no-ad { grid-template-areas: "verdict" "compare" "findings"; }
  .result-left { display: contents; }
  .compare-track { grid-area: compare; }
  .result-ad { grid-area: ad; }
  .explain { grid-template-columns: 1fr 1fr; }
  .page-result .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .explain { grid-template-columns: 1fr; }
  .verdict, .findings { padding-inline: 20px; }
}

/* ==========================================================================
 * Contact page
 * ======================================================================== */
.page-contact .hero { padding-bottom: clamp(64px, 8vw, 112px); }
.page-contact .lede { max-width: 30em; }
.page-contact .block { padding-top: 0; }

/* Email card: the same dark shell as the scan box on the home page. */
.mail {
  max-width: 660px; margin: clamp(36px, 5vw, 56px) auto 0; padding: 6px; text-align: left;
  background: var(--ink); color: var(--on-ink); border-radius: 14px;
  box-shadow: 0 34px 60px -24px rgba(13, 15, 18, .55);
}
.mail-body { padding: 22px 20px 26px; }
.mail-label { font-size: 14px; color: var(--on-ink-muted); }
.mail-address {
  display: inline-block; margin-top: 8px;
  font-size: clamp(21px, 5.6vw, 44px); line-height: 1.1;
  text-decoration: none; overflow-wrap: anywhere;
}
.mail-address:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.mail-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px 10px; }
.mail-bar .btn-quiet { margin-left: auto; }
/* While the Copy button is hidden, the next button takes its place on the right. */
.mail-bar .btn-quiet[hidden] + .btn { margin-left: auto; }
/* Inside the hero, where the glow can rest behind it. */
.social { margin-top: 24px; font-size: 15px; color: var(--muted-on-glow); }
.social a { color: var(--ink); font-weight: 500; text-underline-offset: 4px; }

.topics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px;
  margin-top: clamp(28px, 4vw, 48px); padding-top: 28px; border-top: 1px solid var(--ink);
}
.topics p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.topics a { color: var(--ink); text-underline-offset: 4px; }

@media (max-width: 860px) {
  .topics { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 520px) {
  .mail-bar .btn-quiet { margin-left: 0; }
  .mail-bar .btn-quiet[hidden] + .btn { margin-left: 0; }
}

/* ==========================================================================
 * FAQ page
 * ======================================================================== */
/* The page heading sits on the left here, with a rule under it. */
.page-faq .page-head {
  text-align: left; border-bottom: 1px solid var(--line);
  padding-block: clamp(40px, 6vw, 80px) clamp(32px, 4vw, 52px);
}
.page-faq .page-head h1 { font-size: clamp(44px, 6.8vw, 84px); line-height: .98; max-width: 11em; }
.page-faq .page-head p { margin: 20px 0 0; max-width: 34em; }

/* Two columns: the list of groups, then the questions. */
.faq-grid {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  align-items: start; padding-block: clamp(32px, 4vw, 56px) clamp(56px, 7vw, 96px);
}
.toc { position: sticky; top: 24px; font-size: 15px; }
.toc h2 { font: 500 13px/1 var(--sans); letter-spacing: 0; color: var(--muted); margin-bottom: 12px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 12px; margin-left: -12px; border-radius: 8px; text-decoration: none;
}
.toc a span { color: var(--muted); }
.toc a:hover { background: var(--paper-2); }

.groups { max-width: 760px; }
/* A jump from the list stops a little above the group's heading. */
.group { scroll-margin-top: 28px; }
.group + .group, .faq-ad + .group { margin-top: clamp(44px, 5vw, 68px); }
.group h2 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.1; margin-bottom: 18px; }
.page-faq .faq summary { line-height: 1.4; }
.page-faq .faq details p { max-width: 40em; line-height: 1.6; }
.faq details p a { color: var(--ink); text-underline-offset: 4px; }
.faq-ad { padding-inline: 0; margin-top: clamp(44px, 5vw, 68px); }
.band-wrap { padding-bottom: clamp(64px, 8vw, 112px); }

/* A jump to a place on the same page glides, on every page: the lists of the
   FAQ, legal and article pages, "Scan an image" on the home page. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Between these widths the list takes its share and the questions' column is
   narrower than a 728 px ad: the smaller size is used, as on a phone. */
@media (min-width: 901px) and (max-width: 1120px) {
  .faq-ad .ad-leader { width: 320px; height: 100px; }
}

@media (max-width: 900px) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  /* The list of groups becomes a row that scrolls sideways and stays in view. */
  .toc {
    top: 0; z-index: 5;
    margin-inline: calc(clamp(20px, 4vw, 40px) * -1); padding: 10px clamp(20px, 4vw, 40px);
    background: var(--paper); border-bottom: 1px solid var(--line);
    overflow-x: auto; scrollbar-width: none;
  }
  .toc::-webkit-scrollbar { display: none; }
  .toc h2 { display: none; }
  .toc ul { display: flex; gap: 6px; }
  .toc a { margin: 0; white-space: nowrap; background: var(--paper-2); }
  .toc a span { display: none; }
  .groups { max-width: none; padding-top: 36px; }
  /* Room for that row above a group's heading after a jump. */
  .group { scroll-margin-top: 76px; }
}

/* ==========================================================================
 * About page
 * ======================================================================== */
.page-about h1 { font-size: clamp(44px, 6.8vw, 84px); text-wrap: balance; }
.page-about .hero { padding-bottom: clamp(48px, 6vw, 80px); }
.page-about .lede { font-size: clamp(18px, 1.9vw, 22px); line-height: 1.45; max-width: 30em; margin-top: 26px; }

/* Four short facts under the hero's sentence. */
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; text-align: left;
  margin: clamp(40px, 6vw, 72px) 0 0; padding: 28px 0 0; border-top: 1px solid var(--ink);
}
.facts dt { font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 2.8vw, 34px); line-height: 1.1; letter-spacing: -.02em; }
.facts dd { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* The sections: heading on the left, text on the right. */
.story { padding-block: clamp(40px, 5vw, 72px) clamp(64px, 8vw, 112px); }
.row {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 16px 64px; align-items: start;
  padding-block: clamp(32px, 4vw, 52px); border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.1; }
.row-body { max-width: 38em; font-size: 17px; line-height: 1.65; }
.row-body > * + * { margin-top: 16px; }
.row-body a { text-underline-offset: 4px; }
/* The one statement the page sets apart. */
.key { padding: 22px 24px; border-radius: 14px; background: var(--ink); color: var(--on-ink); }
.contact-list { list-style: none; margin: 0; padding: 0; }
/* After a sentence, the list keeps the gap any other paragraph would have. */
.row-body > p + .contact-list { margin-top: 16px; }
.contact-list li {
  display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 16px;
  padding-block: 14px; border-top: 1px solid var(--line);
}
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list span { color: var(--muted); }
.contact-list a { overflow-wrap: anywhere; }
.story .band { margin-top: clamp(24px, 3vw, 40px); }

@media (max-width: 860px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .facts { gap: 28px 24px; }
  .contact-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ==========================================================================
 * Legal pages (Privacy Policy, Terms and Conditions, Disclaimer)
 * ======================================================================== */
.page-legal main { line-height: 1.65; }
.page-legal .page-head {
  text-align: left; border-bottom: 1px solid var(--line);
  padding-block: clamp(40px, 6vw, 80px) clamp(32px, 4vw, 52px);
}
.page-legal .page-head h1 { font-size: clamp(44px, 6.4vw, 80px); line-height: .98; }
.page-legal .page-head p { margin: 18px 0 0; max-width: none; font-size: 16px; color: var(--muted); }

/* Two columns: the list of sections, then the text. */
.legal-grid {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px);
  align-items: start; padding-block: clamp(32px, 4vw, 56px) clamp(64px, 8vw, 112px);
}
/* The list stays in view, and scrolls inside itself on a short screen. The
   side padding leaves room for a link's hover shape, which the scrolling
   would otherwise cut off. */
.legal-toc {
  position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto;
  margin-left: -12px; padding-left: 12px; font-size: 15px; line-height: 1.4;
}
.legal-toc h2 { font: 500 13px/1 var(--sans); letter-spacing: 0; color: var(--muted); margin-bottom: 12px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.legal-toc li { counter-increment: toc; }
.legal-toc a {
  display: grid; grid-template-columns: 2em 1fr;
  padding: 6px 12px; margin-left: -12px; border-radius: 8px; text-decoration: none;
}
.legal-toc a::before { content: counter(toc); color: var(--muted); }
.legal-toc a:hover { background: var(--paper-2); }

/* The text. Each section's number is drawn here, never typed. */
.policy { max-width: 720px; counter-reset: sec; }
.policy section { counter-increment: sec; scroll-margin-top: 28px; }
.policy section + section, .policy > p + section { margin-top: clamp(36px, 4vw, 52px); }
.policy h2 { display: grid; grid-template-columns: 1.6em 1fr; font-size: clamp(26px, 2.8vw, 34px); line-height: 1.12; }
.policy h2::before { content: counter(sec); color: var(--muted); }
.policy section p, .policy ul { margin-top: 14px; }
.policy ul { margin-bottom: 0; padding-left: 1.2em; }
.policy li + li { margin-top: 6px; }
.policy a { text-underline-offset: 4px; }
.policy .key { margin-top: 18px; padding: 20px 22px; border-radius: 12px; }
.policy .key p { margin: 0; }

@media (max-width: 860px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  /* The list becomes a box above the text. */
  .legal-toc {
    position: static; max-height: none; margin-left: 0;
    padding: 20px 22px; border-radius: 12px; background: var(--paper-2);
  }
  .legal-toc ol { grid-template-columns: 1fr 1fr; gap: 2px 20px; }
  .legal-toc a { margin: 0; padding: 6px 0; }
}
@media (max-width: 520px) {
  .legal-toc ol { grid-template-columns: 1fr; }
}

/* ==========================================================================
 * Blog list
 * ======================================================================== */
.page-blog main { padding-bottom: clamp(64px, 8vw, 112px); }
.page-blog .page-head { text-align: left; padding-block: clamp(40px, 6vw, 80px) clamp(32px, 4vw, 52px); }
.page-blog .page-head h1 { font-size: clamp(46px, 7.4vw, 92px); line-height: .98; }
.page-blog .page-head p { margin: 18px 0 0; }

/* The newest article: picture on the left, words on the right. */
.lead {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(14px, 1.6vw, 20px); background: var(--paper-2);
  border-radius: clamp(16px, 2vw, 24px); text-decoration: none;
}
/* The grey picture icon shows through until the image has loaded, and stays
   for an article that has none (as on the cards below). */
.lead img {
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: clamp(10px, 1.2vw, 14px);
  background: #d7dade url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24' fill='none' stroke='%239099a3' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='15' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='m4 17 5-4.5 3.5 3 3-2.5L20 17'/%3E%3C/svg%3E") center no-repeat;
}
/* Beside the words (wide screens), the picture is as tall as the card: when
   the title and summary are taller than its 16:10 shape it fills the height,
   cropped, not stretched. Above the words (900 px and below) it keeps 16:10. */
@media (min-width: 901px) {
  .lead img { height: 100%; }
}
.lead-text {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  padding: clamp(8px, 2vw, 24px) clamp(8px, 2vw, 28px) clamp(12px, 2vw, 24px) 0;
}
.lead h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; }
.lead p { color: var(--muted); font-size: 17px; }
.lead .meta { font-size: 14px; }
.lead:hover h2 { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.lead .tag { border-color: rgba(13, 15, 18, .25); color: var(--ink); }

/* The other articles. The cards are the home page's (.post). */
.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(36px, 4vw, 56px) 32px;
  margin-top: clamp(40px, 5vw, 64px);
}
.page-blog .page-head + .post-grid { margin-top: 0; }
.post-grid .post a { height: 100%; }
.post-grid .post p:not(.meta) { color: var(--muted); font-size: 15px; }
.post-grid .post a:hover h3 { text-underline-offset: 5px; }
/* The ad in the grid's last cell. */
.post-ad { display: flex; align-items: flex-start; justify-content: center; padding-inline: 0; }
.blog-ad { padding-inline: 0; padding-top: clamp(48px, 6vw, 80px); }

/* Page numbers. */
.pages {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: clamp(48px, 6vw, 80px) 0 16px; padding: 0; list-style: none;
}
.pages a, .pages span {
  display: grid; place-items: center; min-width: 44px; height: 44px; padding-inline: 14px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none;
}
.pages a:hover { border-color: var(--ink); }
.pages [aria-current] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.pages [aria-disabled] { opacity: .4; }

/* While the ad shows, a cell must stay at least as wide as the ad (300 px):
   one column fewer where three, then two, would be too narrow for it. */
@media (max-width: 1043px) {
  .post-grid.with-ad { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .lead { grid-template-columns: 1fr; }
  .lead-text { padding: 4px 10px 14px; }
  .post-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 686px) {
  .post-grid.with-ad { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .post-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
 * Blog article
 * ======================================================================== */
/* The head: breadcrumb, title, summary, author. */
.post-head {
  max-width: 900px; margin-inline: auto; text-align: center;
  padding-block: clamp(32px, 5vw, 64px) clamp(32px, 4vw, 52px);
}
.crumbs {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
  list-style: none; margin: 0 0 24px; padding: 0; font-size: 14px; color: var(--muted);
}
.crumbs li + li::before { content: "/"; margin-right: 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.post-head h1 { font-size: clamp(36px, 5.4vw, 68px); line-height: 1.02; text-wrap: balance; overflow-wrap: anywhere; }
.dek { margin: 20px auto 0; font-size: clamp(17px, 1.6vw, 19px); max-width: 34em; }
.byline { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; text-align: left; font-size: 15px; }
.byline .meta { display: block; font-size: 14px; color: var(--muted); }
/* The author's photo, or the first letters of the name. */
.avatar {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 500; object-fit: cover;
}

/* The main picture: a wide strip, cropped to fit. */
.lead-img { margin: 0; }
.lead-img img {
  width: 100%; height: auto; aspect-ratio: 21 / 9; object-fit: cover;
  border-radius: clamp(14px, 2vw, 24px); background: #d7dade;
}
.page-post figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.page-post figcaption a { text-underline-offset: 3px; }

/* Two columns: the list of sections, then the text. Without a list the text
   sits in the middle. */
.article-grid {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  align-items: start; padding-block: clamp(36px, 5vw, 64px) clamp(56px, 7vw, 96px);
}
.article-grid.no-toc { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.article-grid.no-toc .prose { width: 100%; }
/* The list stays in view, and scrolls inside itself on a short screen. The
   side padding leaves room for a link's hover shape. */
.article-toc {
  position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto;
  margin-left: -12px; padding-left: 12px; font-size: 15px;
}
.article-toc h2 { font: 500 13px/1 var(--sans); letter-spacing: 0; color: var(--muted); margin-bottom: 12px; }
.article-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.article-toc li { counter-increment: toc; }
.article-toc a {
  display: grid; grid-template-columns: 1.8em 1fr; padding: 7px 12px; margin-left: -12px;
  border-radius: 8px; text-decoration: none; line-height: 1.35;
}
.article-toc a::before { content: counter(toc); color: var(--muted); }
.article-toc a:hover { background: var(--paper-2); }

/* The text. Its pieces are the blocks of templates/blocks/. */
.prose { max-width: 700px; font-size: 18px; line-height: 1.7; overflow-wrap: break-word; }
.prose > * + * { margin-top: 22px; }
.prose h2 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.12; margin-top: clamp(44px, 5vw, 64px); }
.prose h3 { font-size: 22px; line-height: 1.3; margin-top: 40px; }
.prose h4 { font-size: 18px; line-height: 1.35; font-weight: 600; margin: 32px 0 0; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 28px; }
.prose a { text-underline-offset: 4px; }
.prose code {
  font: 0.88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 2px 5px; border-radius: 5px; background: var(--paper-2);
}
/* Lists. A numbered list at the top level is a checklist: a large number,
   and a rule between the steps. The number is set beside the text, not in a
   grid: a step's text may hold links and bold words. */
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 8px; }
.prose li > ul, .prose li > ol { margin-top: 8px; }
.prose > ol { list-style: none; padding: 0; counter-reset: step; }
.prose > ol > li {
  counter-increment: step; position: relative; margin: 0;
  padding: 14px 0 14px 2.2em; border-top: 1px solid var(--line);
  min-height: calc(24px * 1.3 + 29px);          /* never shorter than its number */
}
.prose > ol > li:last-child { border-bottom: 1px solid var(--line); }
.prose > ol > li::before {
  content: counter(step); position: absolute; left: 0; top: 14px;
  font-family: var(--serif); font-size: 24px; font-weight: 300; line-height: 1.3; color: var(--muted);
}
/* A quotation in large type: a rule on the left, or centred between two rules. */
.prose blockquote {
  margin: 32px 0; padding-left: 24px; border-left: 2px solid var(--ink);
  font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.25; letter-spacing: -.01em;
}
.prose blockquote.quote-centered {
  padding: 28px 0; border-left: 0; border-block: 1px solid var(--line); text-align: center;
}
.prose blockquote cite {
  display: block; margin-top: 14px; font: 400 15px/1.4 var(--sans); letter-spacing: 0; color: var(--muted);
}
/* A tip in a light box: its label, then the text. */
.callout { padding: 20px 22px; border-radius: 12px; background: var(--paper-2); font-size: 16px; line-height: 1.6; }
.callout strong { display: block; margin-bottom: 4px; font-weight: 600; }
/* One large figure and what it is. */
.stat { display: grid; gap: 8px; padding: 24px 22px; border-radius: 12px; background: var(--paper-2); }
.stat-value {
  font-family: var(--serif); font-weight: 300; font-size: clamp(44px, 6vw, 64px);
  line-height: 1; letter-spacing: -.02em;
}
.stat-label { font-size: 16px; line-height: 1.5; color: var(--muted); }
/* "Read also": a link to another article. */
.also {
  display: grid; gap: 4px; padding: 16px 22px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; line-height: 1.45; text-decoration: none;
}
.also span { font-size: 13px; color: var(--muted); }
.also b { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.also:hover { border-color: var(--ink); }
/* A picture keeps its own shape; the grey shows until it has loaded. */
.prose figure { margin: 32px 0; }
.prose figure img { width: 100%; height: auto; border-radius: 12px; background: #d7dade; }
/* A wide table scrolls inside its own frame, so the page never does. */
.table-wrap { margin: 32px 0; overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.table-wrap caption { caption-side: bottom; padding-top: 10px; text-align: left; font-size: 14px; color: var(--muted); }
/* A column is never squeezed under a few words' width: a table with many
   columns scrolls instead of breaking every word onto its own line. */
.table-wrap th, .table-wrap td {
  min-width: 6em; padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line);
}
.table-wrap th:first-child, .table-wrap td:first-child { padding-left: 0; }
.table-wrap th:last-child, .table-wrap td:last-child { padding-right: 0; }
.table-wrap thead th { font-size: 14px; font-weight: 600; border-bottom-color: var(--ink); }
.table-wrap tbody th { font-weight: 600; }
/* Questions: the same control as on the FAQ page, a little tighter. */
.prose .faq summary { padding-block: 18px; line-height: 1.4; }
.prose .faq details p { padding-bottom: 20px; font-size: 16px; max-width: none; }
/* An ad the owner placed in the text. */
.prose-ad { padding-inline: 0; }

/* The author, then the way to the next article. */
.prose > .author {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; margin-top: clamp(44px, 5vw, 64px);
  padding: 22px; border-radius: 14px; background: var(--paper-2); font-size: 16px; line-height: 1.55;
}
.author .avatar { width: 48px; height: 48px; font-size: 16px; }
.author p { color: var(--muted); }
.author strong { color: var(--ink); font-weight: 600; }
.prose > .pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; font-size: 16px; line-height: 1.4; }
.pager a { display: grid; gap: 4px; align-content: start; padding-top: 16px; border-top: 1px solid var(--ink); text-decoration: none; }
.pager a:nth-child(2) { text-align: right; }
.pager span { font-size: 13px; color: var(--muted); }
.pager b { font-weight: 500; }
.pager a:hover b { text-decoration: underline; text-underline-offset: 4px; }

/* "Keep reading": the home page's row of articles (.carousel). */
.page-post .block { padding-block: clamp(56px, 7vw, 96px); }

@media (max-width: 900px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  /* The list becomes a box above the text. */
  .article-toc {
    position: static; max-height: none; margin-left: 0;
    padding: 20px 22px; border-radius: 12px; background: var(--paper-2);
  }
  .article-toc a { margin: 0; padding: 6px 0; }
  .prose { max-width: none; }
  .lead-img img { aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .prose > .pager { grid-template-columns: 1fr; }
  .pager a:nth-child(2) { text-align: left; }
  .crumbs li:last-child { display: none; }
  .prose { font-size: 17px; }
}

/* ==========================================================================
 * Error pages (templates/layouts/error.html)
 * ======================================================================== */
/* The text sits in the middle of a tall area, on the hero's glow (the owner's
   choice of position). The glow also follows the pointer, so it can come to
   rest behind any of the text: the small grey text uses the grey made for
   that (--muted-on-glow). */
.page-error .hero {
  display: grid; align-items: center;
  min-height: clamp(440px, 66vh, 700px); padding-block: clamp(56px, 9vw, 120px);
}
.error-code {
  font: 500 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted-on-glow); margin-bottom: 18px;
}
.page-error h1 {
  font-size: clamp(38px, 5.4vw, 68px); line-height: 1.04; text-wrap: balance;
  max-width: 14em; margin-inline: auto;
}
.page-error .lede { color: var(--muted-on-glow); max-width: 35em; }
/* The buttons, under a thin rule. The rule is as wide as the text above it:
   the column in this centred area is only as wide as its widest line. */
.error-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line);
}
