/* askaboutdomains.com — STYLESHEET
   Implements docs/design-spine.md, which is LOCKED. Every section below cites
   the spine section that authorises it. No framework, no reset library, no
   build step: this file is served as written.

   The formal grammar is inherited from C:\github\cars (radius 0, 2px hard
   rules, 4px 4px 0 hard shadow, hard-stop patterns only, 100-150ms linear or
   steps motion). The one deliberate break: body prose is a serif at 19px/1.65
   inside a 68ch measure, because this site is read, not operated. */


/* ============================================================
   00 — NORMALIZE (spine §05: "no rounded corners", "light only")
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    /* radius 0 everywhere, including UA-styled buttons and inputs */
    border-radius: var(--radius);
}

html {
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
    background: var(--card);
}

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

ul, ol {
    padding: 0;
}

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

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

button {
    background: none;
    border: 0;
    padding: 0;
}

table {
    border-collapse: collapse;
}

[hidden] {
    display: none !important;
}


/* ============================================================
   01 — TOKENS (spine §01, verbatim; no hex appears below this)
   ============================================================ */
:root {
  /* materials — 80% of the surface */
  --card:     #F2EAD8;  /* warm paper — page ground */
  --paper:    #FBF8F1;  /* text stock — reading surfaces */
  --shelf:    #E3D9C2;  /* heavier band — nav, footer, tiles */

  /* structure — 15% */
  --ink:      #14130E;  /* text, 2px rules, borders */
  --rule:     #C4B896;  /* card ruling, hairlines */
  --pencil:   #6D6552;  /* secondary text, NO DATA */

  /* signal — 5% total, and only where it means something */
  --terminal: #1B5E9C;  /* PRIMARY: actions, links, focus ring */
  --stamp:    #B3271E;  /* STOP: errors, WITHDRAWN, UNANSWERED */
  --due:      #E0C948;  /* highlight, NEW, emphasis */
  --buckram:  #24402F;  /* cloth binding — visited links */

  --border: 2px solid var(--ink);
  --radius: 0;
  --unit: 8px;
  --shadow-block: 4px 4px 0 var(--ink);
  --snap: 120ms linear;
  --measure: 68ch;

  --font-display: 'Source Serif 4', Charter, 'Bitstream Charter', Georgia, serif;
  --font-body:    'Source Serif 4', Charter, 'Bitstream Charter', Georgia, serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}


/* ============================================================
   02 — TYPE (spine §02)
   Three faces, no fourth. Body copy is sentence-case serif; metadata is
   always uppercase mono; italics are banned.
   ============================================================ */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--card);
    color: var(--ink);
    font: 400 19px/1.65 var(--font-body);
    text-rendering: optimizeLegibility;
}

h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.2;
}

h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.25;
}

/* Emphasis is a --due highlight or --stamp text. Never a slant. */
em, i, cite, address, dfn, var {
    font-style: normal;
    background: var(--due);
    padding: 0 .15em;
}

strong, b {
    font-weight: 700;
}

mark {
    background: var(--due);
    color: var(--ink);
    padding: 0 .2em;
}

code, kbd, samp, pre {
    font-family: var(--font-mono);
    letter-spacing: .02em;
}

code, kbd, samp {
    font-size: .85em;
    background: var(--shelf);
    padding: 1px 4px;
}

pre {
    font-size: 13px;
    line-height: 1.55;
    background: var(--shelf);
    border: var(--border);
    padding: var(--unit) calc(var(--unit) * 1.5);
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

blockquote {
    border-left: var(--border);
    padding-left: calc(var(--unit) * 2);
    color: var(--pencil);
}

/* Links: --terminal, 3px underline, --buckram once visited, [EXT] outbound */
a {
    color: var(--terminal);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 3px;
    transition: background-color var(--snap), color var(--snap);
}

a:visited {
    color: var(--buckram);
    text-decoration-color: var(--buckram);
}

a[target="_blank"]::after {
    content: " [EXT]";
    display: inline-block; /* escapes the link underline */
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 9px;
    letter-spacing: .08em;
    vertical-align: super;
    color: var(--pencil);
}

/* Focus ring: 3px --terminal, offset 2px. Never a glow, never removed. */
:focus-visible {
    outline: 3px solid var(--terminal);
    outline-offset: 2px;
}


/* ============================================================
   03 — SHELL (spine §03 "Shell")
   ============================================================ */
.top-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--unit) calc(var(--unit) * 2);
    padding: var(--unit) calc(var(--unit) * 2);
    background: var(--shelf);
    border-bottom: var(--border);
}

.nav-title {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    padding: 2px 0;
}

.nav-title::before {
    content: "[ ";
}

.nav-title::after {
    content: " ]";
}

/* The TLD sits back from the name without becoming a separate object: same
   face, size, weight and tracking, all inherited from .nav-title. --pencil
   is the obvious choice but is 4.12:1 on --shelf and fails AA — the trap
   .colophon documents below — so this is a flat ink/shelf mix at 5.06:1. */
.nav-title-tld {
    color: color-mix(in srgb, var(--ink) 65%, var(--shelf));
}

.nav-links {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--unit) calc(var(--unit) * 2);
}

.nav-links ul {
    display: contents;
    list-style: none;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: border-color var(--snap);
}

.nav-links a[aria-current] {
    border-bottom-color: var(--ink);
}

.nav-links a::after {
    content: none; /* no [EXT] on shell navigation */
}

/* The reading column: --paper stock ruled off the --card ground by 2px
   inline rules that run the full height of the page. */
.main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 78ch;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: calc(var(--unit) * 4);
    padding: calc(var(--unit) * 3) calc(var(--unit) * 2);
    background: var(--paper);
    border-inline: var(--border);
}

.colophon {
    background: var(--shelf);
    border-top: var(--border);
    padding: calc(var(--unit) * 2);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: .04em;
    /* --pencil on --shelf is 4.12:1 and fails AA, so shelf bands take ink */
    color: var(--ink);
}

.colophon a {
    color: var(--ink);
    text-decoration-thickness: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}

.skip-link:focus {
    position: fixed;
    left: var(--unit);
    top: var(--unit);
    z-index: 100;
    padding: var(--unit) calc(var(--unit) * 2);
    background: var(--terminal);
    color: var(--paper);
    border: var(--border);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
}


/* ============================================================
   04 — STRUCTURE (spine §03 "Structure")
   ============================================================ */
/* Numbered ruler: the figure comes from data-fig, the rule carries a
   hard-stop tick pattern along its baseline. */
.section-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--unit);
    margin-bottom: calc(var(--unit) * 2);
    padding-bottom: var(--unit);
    border-bottom: var(--border);
    background-image: repeating-linear-gradient(
        to right, var(--ink) 0 1px, transparent 1px 8px);
    background-size: 100% 4px;
    background-repeat: no-repeat;
    background-position: bottom;
}

.section-head::before {
    content: attr(data-fig);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--pencil);
}

.section-head h2,
.section-head h3 {
    letter-spacing: .01em;
}

/* Corner id plate. Sits ON the border line, not inside it. */
.id-plate {
    position: absolute;
    top: -1px;
    left: -1px;
    z-index: 1;
    padding: 3px 8px;
    background: var(--ink);
    color: var(--paper);
    border: var(--border);
    border-top: 0;
    border-left: 0;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: .08em;
    text-transform: uppercase;
    print-color-adjust: exact;
}

.prose {
    max-width: var(--measure);
    font-size: 19px;
    line-height: 1.65;
}

.prose > * + * {
    margin-top: calc(var(--unit) * 2);
}

.prose ul,
.prose ol {
    padding-left: calc(var(--unit) * 3);
}

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

.prose a {
    word-break: break-word;
}

.divider {
    height: 0;
    border: 0;
    border-top: var(--border);
    margin: 0;
}


/* ============================================================
   05 — THE QUESTION CARD (spine §03 "The question card", §04 skeleton)
   ============================================================ */
/* Ruled ground: 24px hard rules at 6% ink. Material, not decoration —
   above 6% it starts competing with the text it sits behind. */
.question-card {
    position: relative;
    padding: calc(var(--unit) * 4) calc(var(--unit) * 2) calc(var(--unit) * 2);
    border: var(--border);
    background-color: var(--paper);
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0 22px,
        color-mix(in srgb, var(--ink) 6%, transparent) 22px 24px);
}

.card-title {
    margin-bottom: var(--unit);
}

.card-byline {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11px;
    line-height: 1.6;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pencil);
}

/* An ordinary record wears no signal colour: byline links stay ink. */
.card-byline a {
    color: var(--ink);
    text-decoration-thickness: 2px;
}

.card-body {
    margin-block: calc(var(--unit) * 3);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: calc(var(--unit) * 1.5);
    margin-block: calc(var(--unit) * 3);
}

/* Rotation exists here and on .status-stamp. Nowhere else. */
.tag {
    display: inline-block;
    transform: rotate(-1.5deg);
    padding: 2px 8px;
    background: var(--shelf);
    color: var(--ink);
    border: var(--border);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform var(--snap), box-shadow var(--snap);
}

.meta-record {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 2px calc(var(--unit) * 2);
    margin-block: calc(var(--unit) * 3);
    padding: var(--unit) calc(var(--unit) * 1.5);
    /* --card panel, not a shelf band: --pencil labels need 4.5:1 and only
       clear it on --card (4.83:1) */
    background: var(--card);
    border: var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: .04em;
}

.meta-record dt {
    color: var(--pencil);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.meta-record dt::after {
    content: ":";
}

.meta-record dd {
    color: var(--ink);
    word-break: break-word;
}

/* The view counter lives here and nowhere else. */
.views {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--unit);
    margin-block: calc(var(--unit) * 3);
    padding: calc(var(--unit) * 1.5);
    background: var(--paper);
    border: 2px dashed var(--ink);
}

.views-label {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pencil);
}

.views-count {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: clamp(1.4rem, 5vw, 1.9rem);
    line-height: 1;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

/* Rubber stamp: hollow, 3px currentColor, off-square by 2 degrees. */
.status-stamp {
    display: inline-block;
    transform: rotate(-2deg);
    padding: 5px 10px;
    background: transparent;
    color: var(--ink);
    border: 3px solid currentColor;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.status-stamp--answered {
    color: var(--buckram);
}

.status-stamp--unanswered {
    color: var(--stamp);
}

.status-stamp--archive {
    color: var(--pencil);
}


/* ============================================================
   06 — ANSWERS AND COMMENTS (spine §03 "Answers and comments")
   ============================================================ */
.answers,
.comments {
    display: block;
}

.answer-count {
    margin-left: auto;
    padding: 3px 8px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
    print-color-adjust: exact;
}

.answer {
    padding-bottom: calc(var(--unit) * 3);
    margin-bottom: calc(var(--unit) * 3);
    border-bottom: var(--border);
}

.answer:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.answer-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--unit);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11px;
    line-height: 1.6;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pencil);
}

.answer-votes {
    margin-left: auto;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.answer-body {
    margin-top: calc(var(--unit) * 2);
}

.comment {
    padding-left: calc(var(--unit) * 2);
    border-left: 1px solid var(--rule);
    color: var(--pencil);
    font-size: 16px;
    line-height: 1.6;
}

.comment + .comment {
    margin-top: calc(var(--unit) * 2);
}

.comment-byline {
    margin-bottom: 2px;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11px;
    line-height: 1.6;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pencil);
}


/* ============================================================
   07 — LISTS AND INDEXES (spine §03 "Lists and indexes", §04 skeleton)
   ============================================================ */
.entry-list {
    list-style: none;
}

.entry {
    position: relative;
    padding: calc(var(--unit) * 2) 0;
    border-bottom: var(--border);
}

.entry:last-child {
    border-bottom: 0;
}

.entry-title {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.3;
}

.entry-meta {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11px;
    line-height: 1.6;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    color: var(--pencil);
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--unit);
    margin-top: calc(var(--unit) * 1.5);
}

/* The tag index: one tile per tag. */
.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--unit);
    list-style: none;
}

.tag-tile {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--unit);
    padding: var(--unit) calc(var(--unit) * 1.5);
    background: var(--shelf);
    color: var(--ink);
    border: var(--border);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform var(--snap), box-shadow var(--snap);
}

.tag-tile > :last-child {
    color: var(--ink); /* the tile is --shelf; --pencil would fail AA on it */
    font-variant-numeric: tabular-nums;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--unit);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 9px 10px;
    background: var(--paper);
    color: var(--ink);
    border: var(--border);
    text-decoration: none;
    transition: background-color var(--snap), color var(--snap);
}

.pagination .current {
    background: var(--terminal);
    color: var(--paper);
    print-color-adjust: exact;
}


/* ============================================================
   08 — CONTROLS AND STATES (spine §03 "Controls and states")
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--unit);
    padding: 11px 16px;
    background: var(--paper);
    color: var(--ink);
    border: var(--border);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--snap), box-shadow var(--snap),
                background-color var(--snap), color var(--snap);
}

/* Press: the button moves onto the page and loses its shadow. */
.btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.btn:focus-visible {
    outline: 3px solid var(--terminal);
    outline-offset: 2px;
}

.btn[disabled],
.btn[aria-disabled="true"] {
    background: var(--shelf);
    color: var(--pencil);
    border-color: var(--pencil);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn--primary {
    background: var(--terminal);
    color: var(--paper);
    print-color-adjust: exact;
}

.btn--ghost {
    background: transparent;
}

.field {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: var(--paper);
    color: var(--ink);
    border: var(--border);
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: .02em;
}

/* Fields get the same ring with no offset: the 2px rule is the field edge. */
.field:focus-visible {
    outline: 3px solid var(--terminal);
    outline-offset: 0;
}

.field::placeholder {
    color: var(--pencil);
}

textarea.field {
    min-height: 11em;
    resize: vertical;
}

.field-label {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pencil);
}

/* Direct about absence: the list is empty and says so. The message is element
   text, not generated content — build.py and js/aad.js each supply the literal
   apt to that page ([ NO QUESTIONS TAGGED .ORG ], [ NO ANSWER YET ], [ NO PAGE
   AT THIS ADDRESS ], [ NO MATCHES ]), so only the treatment lives here. No UI
   copy lives in this stylesheet. */
.empty-state {
    padding: calc(var(--unit) * 3);
    background: var(--card);
    border: 2px dashed var(--ink);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ink);
}

.notice {
    padding: var(--unit) calc(var(--unit) * 1.5);
    background: var(--due);
    color: var(--ink);
    border: var(--border);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: .06em;
    text-transform: uppercase;
    print-color-adjust: exact;
}

.notice--error {
    background: var(--stamp);
    color: var(--paper);
}

.notice--error a {
    color: var(--paper);
}

.see-also {
    padding-top: var(--unit);
    border-top: var(--border);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    line-height: 1.8;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.see-also::before {
    content: "SEE ALSO — ";
    color: var(--pencil);
}


/* ============================================================
   09 — SEARCH AND SUBMISSION FORMS (spine §03 "Search", "Forms")
   The forms are addressed by id. Turnstile injects a third-party widget
   with its own class, so the form owns the rhythm and the widget needs
   no rule of ours.
   ============================================================ */
#search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--unit);
}

#search-form .field-label {
    flex-basis: 100%;
    margin-bottom: 0;
}

#search-input {
    flex: 1 1 18ch;
    min-width: 0;
    width: auto;
}

#search-results {
    list-style: none;
    margin-top: calc(var(--unit) * 3);
}

/* The homepage leads with the search box, so the results panel is empty on
   arrival and must cost nothing until the reader types. No-op on /search,
   where the panel sits under its own section head. */
#search-results:empty {
    margin-top: 0;
}

.search-hit {
    padding: calc(var(--unit) * 2) 0;
    border-bottom: var(--border);
}

.search-hit:last-child {
    border-bottom: 0;
}

#ask-form,
#comment-form {
    max-width: var(--measure);
}

#ask-form > * + *,
#comment-form > * + * {
    margin-top: calc(var(--unit) * 2);
}



/* ============================================================
   10 — UTILITY (spine §03 "Utility")
   ============================================================ */
.mono {
    font-family: var(--font-mono);
}

.tnum {
    font-variant-numeric: tabular-nums;
}

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


/* ============================================================
   11 — LAYOUT BREAKPOINT (spine §05 restraint; the only one)
   ============================================================ */
@media (min-width: 720px) {
    .top-nav {
        padding: calc(var(--unit) * 1.5) calc(var(--unit) * 4);
    }

    .main {
        gap: calc(var(--unit) * 5);
        padding: calc(var(--unit) * 5) calc(var(--unit) * 4);
    }

    .colophon {
        padding: calc(var(--unit) * 3) calc(var(--unit) * 4);
    }

    .question-card {
        padding: calc(var(--unit) * 5) calc(var(--unit) * 3) calc(var(--unit) * 3);
    }

    .views {
        gap: calc(var(--unit) * 2);
        padding: calc(var(--unit) * 2);
    }

    .entry {
        padding: calc(var(--unit) * 2.5) 0;
    }
}


/* ============================================================
   12 — SMALL SCREEN ADJUSTMENT (spine §05 restraint)
   The 19px measure is spec and does not shrink. Only the registry grid,
   the tag grid and the view figure give way.
   ============================================================ */
@media (max-width: 480px) {
    .meta-record {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .meta-record dt {
        margin-top: var(--unit);
    }

    .meta-record dt:first-child {
        margin-top: 0;
    }

    .views-count {
        font-size: 1.4rem;
    }

    .tag-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .id-plate {
        font-size: 9px;
    }
}


/* ============================================================
   13 — TOUCH TARGETS (spine §05: 44px under a coarse pointer)
   ============================================================ */
@media (pointer: coarse) {
    .btn,
    .field,
    .tag-tile,
    .pagination a,
    .pagination span,
    .nav-links a,
    .tag {
        min-height: 44px;
    }

    .nav-links a,
    .tag {
        display: inline-flex;
        align-items: center;
    }

    .tag {
        padding-inline: 12px;
    }
}


/* ============================================================
   14 — HOVER (spine §05: every hover rule lives here, and only here)
   Pointer-only enhancement. Nothing below is required to use the site.
   ============================================================ */
@media (hover: hover) {
    a:hover {
        background: var(--due);
        color: var(--ink);
        text-decoration-color: var(--ink);
    }

    .nav-title:hover {
        background: var(--ink);
        color: var(--paper);
    }

    /* The wordmark inverts to paper-on-ink, so the TLD inverts with it or
       it would sit dark-on-dark. Recessive against --paper, still 8.89:1. */
    .nav-title:hover .nav-title-tld {
        color: color-mix(in srgb, var(--paper) 70%, var(--ink));
    }

    .nav-links a:hover {
        background: transparent;
        color: var(--ink);
        border-bottom-color: var(--ink);
    }

    .colophon a:hover {
        background: var(--due);
        color: var(--ink);
    }

    /* Lift: the button rises off the page and casts the hard block shadow. */
    .btn:hover {
        background: var(--paper);
        color: var(--ink);
        transform: translate(-2px, -2px);
        box-shadow: var(--shadow-block);
    }

    .btn--primary:hover {
        background: var(--terminal);
        color: var(--paper);
    }

    .btn--ghost:hover {
        background: transparent;
        color: var(--ink);
    }

    .btn[disabled]:hover,
    .btn[aria-disabled="true"]:hover {
        background: var(--shelf);
        color: var(--pencil);
        transform: none;
        box-shadow: none;
    }

    .tag:hover {
        background: var(--shelf);
        color: var(--ink);
        transform: rotate(-1.5deg) translate(-2px, -2px);
        box-shadow: var(--shadow-block);
    }

    .tag-tile:hover {
        background: var(--shelf);
        color: var(--ink);
        transform: translate(-2px, -2px);
        box-shadow: var(--shadow-block);
    }

    .pagination a:hover {
        background: var(--due);
        color: var(--ink);
    }

    .pagination .current:hover {
        background: var(--terminal);
        color: var(--paper);
    }
}


/* ============================================================
   15 — PRINT (a question page prints as a clean question card)
   Nav, footer, pagination and the beacon-driven view counter are
   screen chrome; none of it belongs on the card.
   ============================================================ */
@media print {
    .top-nav,
    .colophon,
    .skip-link,
    .pagination,
    .see-also,
    .views,
    #search-form,
    #search-results,
    #ask-form,
    #comment-form {
        display: none;
    }

    html,
    body {
        background: transparent;
        font-size: 11pt;
    }

    .main {
        max-width: none;
        margin: 0;
        padding: 0;
        gap: calc(var(--unit) * 3);
        background: transparent;
        border-inline: 0;
    }

    .question-card {
        background-image: none;
        break-inside: avoid;
    }

    .prose {
        max-width: none;
    }

    .tag,
    .status-stamp {
        transform: none;
    }

    .answer {
        break-inside: avoid;
    }

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

    a[target="_blank"]::after {
        content: none;
    }
}


/* ============================================================
   16 — REDUCED MOTION (spine §05, MANDATORY, end of file)
   Every effect in this file resolves to its end state instantly, so
   zeroing duration removes the motion without hiding anything.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0s !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }
}
