
  :root {
    color-scheme: light dark;
    --bg-primary: #fdfcfa;
    --bg-secondary: #f4f2ee;
    --text-primary: #232a2e;
    --text-secondary: #515a60;
    --accent-color: #12556b;
    --border-subtle: #ded9d2;
    --border-color: #8a9096;
  }
  /* Three states, not two, and that is task S13.1.
     data-theme is stamped on <html> by SHELL_THEME_SCRIPT below when the
     visitor has made an explicit choice on the main site; the un-stamped state
     is "system", where only the media query separates light from dark. So the
     dark tokens are declared twice: once behind the media query guarded
     against an explicit light choice, and once behind the explicit dark one,
     so a toggle wins in both directions rather than only in the direction the
     OS already agreed with.

     (No backticks in this comment on purpose: it lives inside a template
     literal, and one would end the string 60 lines early. It did, once.) */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
    --bg-primary: #14181a;
    --bg-secondary: #1f2529;
    --text-primary: #f2efea;
    --text-secondary: #c3ccd1;
    --accent-color: #7fb9cc;
    --border-subtle: #333b41;
    --border-color: #6b757c;
    }
  }
  :root[data-theme='dark'] {
    --bg-primary: #14181a;
    --bg-secondary: #1f2529;
    --text-primary: #f2efea;
    --text-secondary: #c3ccd1;
    --accent-color: #7fb9cc;
    --border-subtle: #333b41;
    --border-color: #6b757c;
  }
  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  }
  a { color: var(--accent-color); }
  .shell { max-width: 44rem; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
  .site-head { border-bottom: 1px solid var(--border-subtle); }
  .site-head-inner {
    max-width: 44rem; margin: 0 auto; padding: .9rem 1.5rem;
    display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.5rem;
  }
  .wordmark {
    font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em;
    color: var(--text-primary); text-decoration: none;
  }
  /* The header stays at the top; the short page content sits in the middle of the rest. */
  .shell-centred { min-height: 100vh; display: flex; flex-direction: column; }
  .shell-centred > main {
    flex: 1; width: 100%; margin: 0 auto;
    display: flex; flex-direction: column; justify-content: center; text-align: center;
  }
  h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .75rem; }
  h2 { font-size: 1.05rem; margin: 2rem 0 .5rem; }
  p { margin: 0 0 1.25rem; }
  small, .muted { color: var(--text-secondary); font-size: .9rem; }
  button, .btn {
    font: inherit; font-weight: 600; padding: .7rem 1.6rem;
    border: 0; border-radius: .5rem; cursor: pointer;
    background: var(--accent-color); color: var(--bg-primary);
    text-decoration: none; display: inline-block;
  }
  .btn-quiet {
    background: transparent; color: inherit;
    border: 1px solid var(--border-color);
  }
  input {
    width: 100%; font: inherit; padding: .5rem;
    border: 1px solid var(--border-color); border-radius: .35rem;
    background: transparent; color: inherit;
  }
  label { display: block; text-align: left; margin: 0 0 .9rem; }
  /* Task 20A.3: a field the site derived rather than the submitter supplied. */
  label span em { font-style: normal; font-weight: 400; color: var(--text-secondary); }
  /* Task 20A.6: the one checkbox on this page. The box sits with its label
     rather than above it, which is what every other checkbox anywhere does. */
  .opt-in { display: grid; grid-template-columns: auto 1fr; gap: .2rem .5rem; align-items: start; }
  .opt-in input { width: auto; margin: .25rem 0 0; }
  .opt-in span { grid-column: 2; font-weight: 600; font-size: .9rem; }
  .opt-in small { grid-column: 2; display: block; }
  label > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
  dl { margin: 0; }
  dt { font-weight: 600; font-size: .85rem; color: var(--text-secondary); margin-top: .8rem; }
  dd { margin: .15rem 0 0; }
  footer { margin-top: 3rem; border-top: 1px solid var(--border-color); padding-top: 1rem; }
  .danger-zone { margin-top: 2rem; }

  /* These pages had neither a focus indicator nor a motion preference, and
     they are not optional pages: confirming a listing and deleting one both
     happen here. A keyboard visitor got whatever the browser chose, on a
     button whose own background had already changed the contrast around it.

     Two-colour outline so it stays visible on either theme's ground and
     against the accent-coloured buttons, which a single colour cannot do. */
  :focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: .2rem;
  }
  button:focus-visible, .btn:focus-visible {
    outline-color: var(--text-primary);
  }

  /* The site honours this globally; these pages are served by the Worker and
     never load that stylesheet, so they have to say it themselves. */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: .01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: .01ms !important;
      scroll-behavior: auto !important;
    }
  }

  @media (prefers-contrast: more) {
    :root { --border-color: currentColor; --text-secondary: var(--text-primary); }
  }

  /* 320px is the narrowest the site supports, and a confirmation link opened
     on a phone is the most likely way these pages are ever seen. */
  @media (max-width: 480px) {
    .shell { padding: 1.5rem 1rem 3rem; }
    h1 { font-size: 1.35rem; }
    button, .btn { width: 100%; text-align: center; }
  }

.tool-reader { color: var(--text-primary); font-size: 1rem; line-height: 1.5; }
.tool-reader h2 { font-size: 1.05rem; margin: 1.1rem 0 .4rem; font-weight: 600; }
.tool-reader h3 { font-size: 0.95rem; margin: 1rem 0 .4rem; font-weight: 600; }
.tool-reader p { margin: .4rem 0; overflow-wrap: anywhere; }
.tool-reader dl { margin: 0; }
.tool-reader-fact[data-content-tone] { border-inline-start: 4px solid; padding-inline-start: .6rem; }
.tool-reader-fact[data-content-tone="stays"] { border-inline-start-color: var(--color-success, #1f6b45); }
.tool-reader-fact[data-content-tone="leaves"] { border-inline-start-color: var(--color-warning, #8a5a12); }
.tool-reader-fact { display: grid; grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr); gap: 0.75rem; padding: .35rem 0; border-bottom: 1px solid var(--border-subtle); }
.tool-reader dt { color: var(--text-secondary); font-size: .9rem; }
.tool-reader dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tool-reader dd p { margin: 0 0 .3rem; }
.tool-reader dd p:last-child { margin-bottom: 0; }
.tool-reader a:not(.btn):not(.primary-btn):not(.secondary-btn) { color: var(--accent-color); overflow-wrap: anywhere; }
.tool-reader .tool-detail-actions .secondary-btn { color: var(--text-primary); border-color: var(--border-color); }
.tool-reader-sources { font-size: .8rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.tool-reader-sources a { display: inline-block; min-height: 24px; }
.tool-reader-mode { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; margin: .75rem 0 1rem; }
.tool-reader-mode label { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: .9rem; }
.tool-reader-mode select, .tool-reader-mode button { max-width: 100%; min-height: 2.75rem; padding: .4rem .65rem; background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: .35rem; font: inherit; }
.tool-reader-mode button { cursor: pointer; }
.tool-reader :is(a, select, button, summary):focus-visible { outline: 2px solid var(--accent-color); outline-offset: 3px; }
.tool-reader-note { color: var(--text-secondary); }
.tool-reader details { margin: 0.85rem 0; }
.tool-reader summary { cursor: pointer; color: var(--text-secondary); padding: .5rem 0; }
.tool-reader-source-list { padding-inline-start: 1.5rem; }
.tool-reader-source-list li { margin: .75rem 0; scroll-margin-top: 1rem; }
.tool-reader-source-list p { color: var(--text-secondary); font-size: .9rem; }
.tool-reader pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; background: var(--bg-secondary); padding: .75rem; }
@media (max-width: 36rem) { .tool-reader-fact { grid-template-columns: minmax(0, 1fr); gap: .1rem; padding: .6rem 0; } .tool-reader-mode label { width: 100%; } .tool-reader-mode select { min-width: 0; flex: 1; } }

  .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .site-foot-inner {
    max-width: 44rem; margin: 0 auto; padding: .9rem 1.5rem;
    display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.5rem;
  }
  .tool { padding-top: 2rem; }
  .crumb { font-size: .9rem; color: var(--text-secondary); margin: 0 0 1.75rem; }
  .owner-link { margin: 2.5rem 0 0; font-size: .95rem; }
  .crumb a {
    display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none;
  }
  .crumb a:hover { text-decoration: underline; }
  .source-tag {
    display: inline-block; margin: 0 0 .6rem; padding: .15rem .65rem;
    font-size: .72rem; font-weight: 600; letter-spacing: .05em;
    text-transform: uppercase; color: var(--accent-color);
    border: 1px solid currentColor; border-radius: 999px;
  }
  .tool h1 {
    font-size: clamp(1.9rem, 5vw, 2.5rem); line-height: 1.15;
    letter-spacing: -.015em; margin: 0 0 .5rem; overflow-wrap: anywhere;
  }
  .destination { color: var(--text-secondary); margin: .25rem 0 1rem; }
  .destination, .action .btn { overflow-wrap: anywhere; }
  .maker { color: var(--text-secondary); margin: 0 0 1rem; overflow-wrap: anywhere; }
  .cap { color: var(--text-secondary); margin: 0 0 1.5rem; }
  .bar-note {
    font-size: .95rem; padding: .75rem 1rem; margin: 1.25rem 0 0;
    border-inline-start: 3px solid var(--border-color);
    background: var(--bg-secondary); border-radius: 0 .5rem .5rem 0;
  }
  .action {
    display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
    margin: 1.75rem 0 2.75rem; padding: 1.25rem;
    background: var(--bg-secondary); border: 1px solid var(--border-subtle);
    border-radius: .75rem;
  }
  .action .btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; }
  .action .btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
  .disclosure { flex-basis: 100%; margin: 0; font-size: .9rem; color: var(--text-secondary); }
  footer.site-foot {
    margin-top: 3rem; padding-top: 0; border-top: 1px solid var(--border-subtle);
  }
  .site-foot-inner { font-size: .9rem; padding-block: 1.25rem; }
  @media (max-width: 36rem) {
    .action .btn { width: 100%; justify-content: center; }
  }
