/* ==========================================================================
   Exeunt - exeunt.app
   One stylesheet. Mobile first. Light and dark.

   Colour contrast is checked, not guessed:
     light body  #1b1b1f on #fbfbfc   16.2:1
     light dim   #5c5c66 on #fbfbfc    6.4:1
     light link  #c4382d on #fbfbfc    5.1:1
     light btn   #ffffff on #d93a31    4.6:1
     dark  body  #f0f0f3 on #111113   17.4:1
     dark  dim   #a0a0aa on #111113    7.3:1
     dark  link  #ff7a73 on #111113    7.4:1
     dark  btn   #17171a on #ff5f57    6.0:1

   #ff5f57 is the brand red, Apple's close-button colour. It is too light to
   carry white text on a white page, so light mode uses a darkened version for
   anything interactive and keeps the true red for the mark itself.
   ========================================================================== */

/* --- tokens: light ------------------------------------------------------ */

:root {
  --bg:          #fbfbfc;
  --bg-raised:   #ffffff;
  --bg-sunken:   #f2f2f5;
  --text:        #1b1b1f;
  --text-dim:    #5c5c66;
  --border:      #e3e3e8;
  --border-firm: #d2d2da;

  --brand:       #ff5f57;
  --accent:      #c4382d;
  --btn-bg:      #d93a31;
  --btn-bg-hover:#c4322a;
  --btn-text:    #ffffff;

  --ok:          #1f7a4d;
  --warn-bg:     #fff6e8;
  --warn-border: #f0d4a8;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06), 0 1px 3px rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 12px rgb(0 0 0 / 0.07), 0 1px 3px rgb(0 0 0 / 0.05);

  --radius:    10px;
  --radius-lg: 16px;

  /*
   * Wide. This is a Mac site and Mac displays are big: at 1512pt (a 14"
   * MacBook Pro) the cap is never reached, so the page runs to the gutters.
   * The cap only starts to bite above ~1920px, on a 27" display, where
   * genuinely edge-to-edge would just be silly.
   *
   * Only CONTAINERS go this wide. Running text stays in a readable column --
   * --prose is about 80 characters, past which the eye loses its place on the
   * return sweep. Wide layout, narrow paragraphs.
   */
  --wrap:  120rem;
  --prose: 42rem;
  --wide:  66rem;     /* .breakout figures, and .prose-wide columns that match them */
  --gutter: clamp(1.25rem, 3vw, 4rem);   /* side margin inside every .wrap */
  --doc-nav: 15rem;

  /*
   * The header logo. 80px on a phone, about 95px on a 14" MacBook Pro, 112px
   * from about 1750px up.
   *
   * At this size the lockup fits even a 320px screen, so it needs no floor to
   * stop it pushing the page sideways.
   *
   * Everything that has to clear the pinned header -- anchor jumps, the Help
   * page's contents rail -- is computed from this, so resizing the logo can
   * never leave a heading hidden underneath it.
   */
  --logo: clamp(80px, 6.4vw, 112px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  color-scheme: light;
}

/* --- tokens: dark ------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #111113;
    --bg-raised:   #18181b;
    --bg-sunken:   #0c0c0e;
    --text:        #f0f0f3;
    --text-dim:    #a0a0aa;
    --border:      #2a2a31;
    --border-firm: #3a3a43;

    --brand:       #ff5f57;
    --accent:      #ff7a73;
    --btn-bg:      #ff5f57;
    --btn-bg-hover:#ff736c;
    --btn-text:    #17171a;

    --ok:          #4ade80;
    --warn-bg:     #2a2113;
    --warn-border: #4d3d1d;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 16px rgb(0 0 0 / 0.5);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:          #111113;
  --bg-raised:   #18181b;
  --bg-sunken:   #0c0c0e;
  --text:        #f0f0f3;
  --text-dim:    #a0a0aa;
  --border:      #2a2a31;
  --border-firm: #3a3a43;

  --brand:       #ff5f57;
  --accent:      #ff7a73;
  --btn-bg:      #ff5f57;
  --btn-bg-hover:#ff736c;
  --btn-text:    #17171a;

  --ok:          #4ade80;
  --warn-bg:     #2a2113;
  --warn-border: #4d3d1d;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 16px rgb(0 0 0 / 0.5);

  color-scheme: dark;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anything scrolled into view -- a jump link, a heading, a focused field --
     stops below the pinned header instead of underneath it. Derived from the
     logo, because the logo is what sets the header's height. The extra room
     covers the nav wrapping onto a second line on narrower screens. */
  scroll-padding-top: calc(var(--logo) + 4.5rem);
}

/* On most phones the five nav links need two lines beneath the logo --
   measured at 360 and 390px wide, the header is about 104px taller than the
   logo, against 65px when the links fit on one line. */
@media (max-width: 30rem) {
  html { scroll-padding-top: calc(var(--logo) + 7.5rem); }
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1; }

img, svg, video { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* --- type --------------------------------------------------------------- */

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

h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); margin-top: 0; }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }

p  { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.17em;
}
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 650; }
small  { font-size: 0.875rem; }

code, kbd, samp { font-family: var(--mono); font-size: 0.9em; }

code {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

kbd {
  background: var(--bg-raised);
  border: 1px solid var(--border-firm);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.12em 0.4em;
  font-size: 0.85em;
  white-space: nowrap;
}

pre {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; }

.dim { color: var(--text-dim); }
.lead { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); color: var(--text-dim); }

/* --- layout ------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  /* Gutters grow with the viewport, so a big screen does not get a thin
     16px margin pinned to the glass. Never below 1.25rem on a phone. */
  padding-inline: var(--gutter);
}

/* A lone text column centres itself. Left-aligning a 42rem column inside a
   120rem container reads as a mistake rather than as a choice. */
.prose { max-width: var(--prose); margin-inline: auto; }

/*
 * A text column as wide as the figures in it, for a page where the text and
 * the screenshots should share one edge. At this measure a line runs to about
 * 130 characters, so the leading opens up: the longer the line, the harder the
 * eye works to find the start of the next one.
 */
.prose-wide { max-width: var(--wide); line-height: 1.75; }

/* Figures in a wide column are already the right width. */
.prose-wide .breakout { width: auto; margin-left: 0; transform: none; }

/* Help's text column, the same width as How it works' text. That page's
   66rem includes its side margins; this column has none of its own, so they
   come off here to make the two measure the same. */
.doc-wide .doc-body { max-width: calc(var(--wide) - 2 * var(--gutter)); line-height: 1.75; }

/* Forms stay at the ordinary measure: a 1000px-wide email box is harder to
   use, not easier. */
.doc-wide .doc-body form { max-width: var(--prose); }

/* Label column sized to its labels, not to 40% of a very wide table. */
.prose-wide .specs th,
.doc-wide .specs th { width: min(12rem, 32%); }

/* A page's opening -- heading, intro, Buy block -- centred as one unit above
   reference text that stays left-aligned. Download page. */
.page-intro { text-align: center; margin-bottom: 3rem; }
.page-intro .btn-row { justify-content: center; margin-top: 1.75rem; }
.page-intro .buy-note { max-width: 50rem; margin-inline: auto; text-wrap: balance; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }

section { padding-block: clamp(2.5rem, 1.75rem + 2.5vw, 4rem); }
section + section { border-top: 1px solid var(--border); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-raised);
  color: var(--text);
  padding: 0.75rem 1rem;
  border: 2px solid var(--accent);
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip:focus { left: 0; }

/* --- focus -------------------------------------------------------------- */

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

/* --- header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  /* Prefixed first: Safari only dropped the prefix in 18, and macOS 13-14
     ship Safari 16-17. Without it the header is just translucent. */
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header > .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-block: 0.7rem;
}

/* Icon, gap and wordmark all scaled together, so the lockup keeps its
   proportions rather than becoming a giant icon beside small type. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--logo) * 0.15);
  font-weight: 650;
  font-size: calc(var(--logo) * 0.5);
  line-height: 1;
  letter-spacing: -0.028em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand img {
  width: var(--logo);
  height: auto;
  border-radius: 22%;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.1rem;
  font-size: 0.9375rem;
}
.nav a {
  color: var(--text-dim);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--brand);
}

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--btn-bg-hover); }

.btn-secondary {
  background: var(--bg-raised);
  color: var(--text);
  border-color: var(--border-firm);
}
.btn-secondary:hover { border-color: var(--text-dim); }

.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.875rem; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.9rem;
}

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

.hero { padding-block: clamp(3rem, 2rem + 5vw, 5.5rem); text-align: center; }

/* Wide enough for the one-line reassurance below it. Everything else in the
   hero is centred and carries its own width, so this changes nothing else. */
.hero .wrap { max-width: 74rem; }

.hero-icon {
  width: clamp(96px, 12vw, 160px);
  margin: 0 auto 2rem;
  border-radius: 22%;
  box-shadow: var(--shadow-md);
}

/*
 * Three hero lines with a set number of lines each, on a Mac. Widths come from
 * measuring the text on one line -- Windows font, Helvetica, Verdana -- and
 * allowing about 8% on top of Helvetica for Apple's SF Pro, which Safari uses.
 * All of them still wrap normally on a phone.
 */

/* TWO lines. Measured 1701px on one line in Helvetica (about 1840px in SF
   Pro), so anything between about 920px and 1700px gives exactly two; 66rem
   sits well inside that. Balance makes the two about the same length. */
.hero p.lead { margin-inline: auto; max-width: 66rem; text-wrap: balance; }

/* TWO lines. Measured 1183px on one line (about 1280px in SF Pro). Any width
   between half and all of that gives exactly two; 50rem sits well inside that
   range in every font measured. Balance evens the two lines out. */
.hero .buy-note { max-width: 50rem; text-wrap: balance; }

/* ONE line. Measured 879px in Helvetica, so about 950px in SF Pro. Holds on
   any browser window wider than about 1010px. */
.hero-assure {
  max-width: 66rem;
  margin: 2rem auto 0;
  font-size: 0.9375rem;
  color: var(--text-dim);
}
.hero .btn-row { justify-content: center; margin-top: 2rem; }

.buy-meta {
  font-size: 0.9375rem;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.3rem 0.7rem;
}
.buy-meta .sep { opacity: 0.45; }
.buy-meta .price { color: var(--text); font-weight: 600; }

.buy-note {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--text-dim);
  max-width: 32rem;
  margin-inline: auto;
}
.buy-terms { margin-top: 0.4rem; font-size: 0.8125rem; color: var(--text-dim); }
.hero .buy-terms, .page-intro .buy-terms { text-align: center; }
.buy-note strong { color: var(--text); }

/* --- cards -------------------------------------------------------------- */

.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  /* Capped and centred: three cards of two lines each, stretched across
     1900px, look stranded rather than generous. */
  max-width: 82rem;
  margin-inline: auto;
}
@media (min-width: 46rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--text-dim); margin: 0; font-size: 0.9375rem; }

/* The three fading dots from the app icon, reused as a card marker. */
.dots {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 0.9rem;
}
.dots i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--brand);
  display: block;
}
.dots i:nth-child(1) { opacity: 0.22; }
.dots i:nth-child(2) { opacity: 0.5; }

/* --- screenshots -------------------------------------------------------- */

.shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-raised);
  box-shadow: var(--shadow-md);
}
.shot img { width: 100%; }
.shot figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

.shot img, .shot video { width: 100%; height: auto; }

/* Video: a black ground while the poster loads, so the frame never flashes
   the page colour through the corners of a dark recording. */
.shot video { display: block; background: #000; }

/* The demo under the hero. Wide, because it is the page's best argument, and
   joined to the hero with no rule between them -- it is the hero's proof,
   not a separate section. */
.hero + .demo { border-top: 0; padding-top: 0; }
.demo .shot { max-width: 68rem; margin-inline: auto; }

/* The Apple Silicon graphic, between the lead and the Download button. */
.hero-badge { max-width: 704px; margin: 2rem auto 0; }

/* Two columns: a picture and what it shows. Stacks on a phone. */
.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  max-width: 72rem;
  margin-inline: auto;
}
@media (min-width: 52rem) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; }
}
.split h3 { margin-top: 1.75rem; }
.split h3:first-of-type { margin-top: 0; }
.split p { color: var(--text-dim); }

/* The menu bar capture is portrait; at full column width it towers. */
.shot-portrait { max-width: 26rem; margin-inline: auto; }

/*
 * A figure wider than the text column it sits in. A screenshot of a table
 * squeezed to 42rem is unreadable, while the paragraphs around it are the
 * right width -- so the figure steps out, centred on the column, and the text
 * stays where it is.
 *
 * 100vw - 2.5rem matches the phone gutters, so on a narrow screen this is
 * simply the column width. It cannot cause horizontal scroll: even with a
 * 17px Windows scrollbar counted in 100vw, 40px of margin is more than that.
 */
.breakout {
  width: min(var(--wide), 100vw - 2.5rem);
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* A screenshot that links to itself at full size. */
a.zoom { display: block; cursor: zoom-in; }
a.zoom:focus-visible { outline-offset: 4px; }

/* Two short clips side by side. */
.pair {
  display: grid;
  gap: 1.25rem;
  /* margin-block, not the margin shorthand: a shorthand would reset the
     margin-left that .breakout depends on, and the pair would slide half its
     own width off the left edge of the screen. */
  margin-block: 1.75rem;
}
@media (min-width: 40rem) {
  .pair { grid-template-columns: 1fr 1fr; }
}

/* Screenshots stacked inside a help topic. */
.stack-shots { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
.shot-small { max-width: 20rem; margin: 1rem 0 1.25rem; }

/* --- documentation layout ------------------------------------------------
   A contents rail beside the text, for pages long enough that scrolling to
   find something is the main cost. The rail sticks; the column is still a
   readable measure. Below 62rem it collapses to a plain list above the
   content, which is the right shape on a phone anyway.
   -------------------------------------------------------------------------- */

.doc { display: block; }

@media (min-width: 62rem) {
  .doc {
    display: grid;
    grid-template-columns: var(--doc-nav) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
  }
}

/* Left-justified: the text starts right after the contents rail, so the rail
   and the text read as one block from the left edge. */
.doc-body {
  max-width: var(--prose);
  min-width: 0;
  margin-inline: 0;
}
.doc-body > :first-child { margin-top: 0; }

/* Hidden on a phone. It would otherwise push the page's own <h1> below a list
   of links, and the collapsed topic sections already make the page short
   enough that a contents list earns nothing there. */
.doc-nav { display: none; }

@media (min-width: 62rem) {
  .doc-nav {
    display: block;
    font-size: 0.9375rem;
    position: sticky;
    top: calc(var(--logo) + 2.5rem);      /* clears the pinned site header */
    max-height: calc(100vh - var(--logo) - 4.5rem);
    overflow-y: auto;
  }
}

.doc-nav h2 {
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.doc-nav ul { list-style: none; margin: 0; padding: 0; }
.doc-nav li { margin-bottom: 0.15rem; }

.doc-nav a {
  display: block;
  padding: 0.3rem 0.6rem;
  border-radius: 7px;
  color: var(--text-dim);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.doc-nav a:hover {
  color: var(--text);
  background: var(--bg-raised);
  border-left-color: var(--brand);
}

/* --- collapsible topics --------------------------------------------------
   Everything past the first-run path is a closed section, so the page is a
   short list of headings rather than several screens of prose. No JavaScript:
   <details> does this natively, and keyboard and screen readers get it free.
   -------------------------------------------------------------------------- */

.topics { margin: 0 0 1rem; }

.topics details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  margin-bottom: 0.6rem;
}

.topics summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 2.5rem 0.9rem 1.1rem;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  position: relative;
  border-radius: var(--radius);
}
.topics summary::-webkit-details-marker { display: none; }
.topics summary:hover { color: var(--accent); }

.topics summary::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  top: 1.25rem;
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
.topics details[open] > summary::after { transform: rotate(-135deg); top: 1.5rem; }

.topics details[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }

.topics .topic-body { padding: 1.1rem 1.1rem 1.25rem; }
.topics .topic-body > :first-child { margin-top: 0; }
.topics .topic-body h3 { margin-top: 1.5rem; }
.topics .topic-body h3:first-child { margin-top: 0; }

/* --- FAQ ---------------------------------------------------------------- */

.faq { max-width: var(--prose); margin-inline: auto; }

/* Inside the documentation column it is already constrained. */
.doc-body .faq { max-width: none; margin-inline: 0; }

/* Home: heading and link centred over and under the list, all in one column.
   The questions stay left-aligned -- a centred list of questions is hard to scan. */
.home-faq { max-width: var(--prose); margin-inline: auto; }
.home-faq > h2,
.home-faq > .more { text-align: center; }
.home-faq > .more { margin-top: 1.75rem; }

.faq details { border-bottom: 1px solid var(--border); }
.faq details[open] { padding-bottom: 0.5rem; }

.faq summary {
  cursor: pointer;
  padding: 1rem 2rem 1rem 0;
  font-weight: 600;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 1.35rem;
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.6rem; }
.faq summary:hover { color: var(--accent); }
.faq .answer { color: var(--text-dim); padding-right: 1rem; }

/* --- callouts ----------------------------------------------------------- */

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1.75rem 0;
}
.callout h3 { margin-bottom: 0.35rem; }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-border); }

/* --- steps -------------------------------------------------------------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 1.75rem; height: 1.75rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* --- tables ------------------------------------------------------------- */

.table-scroll { overflow-x: auto; }

.specs { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.specs th, .specs td {
  text-align: left;
  padding: 0.7rem 0.75rem 0.7rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.specs th { font-weight: 600; width: 40%; }
.specs td { color: var(--text-dim); }

.data { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.data th, .data td {
  text-align: left;
  padding: 0.6rem 0.9rem 0.6rem 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data th { font-weight: 650; }
.data td.wrap-ok { white-space: normal; }
.data tbody tr:hover { background: var(--bg-raised); }
.num { font-variant-numeric: tabular-nums; }

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

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
}
.field .hint {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="number"], textarea, select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-firm);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}
textarea { min-height: 9rem; resize: vertical; }

input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* Honeypot. Hidden from people, left in the DOM for bots. */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.notice {
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-raised);
}
.notice-ok  { border-left: 3px solid var(--ok); }
.notice-bad { border-left: 3px solid var(--brand); }
.notice ul { margin: 0.5rem 0 0; padding-left: 1.2em; }

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-sunken);
  padding-block: 2.5rem;
  font-size: 0.9375rem;
  color: var(--text-dim);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.site-footer .footer-legal { display: block; margin-top: 1.5rem; }
.site-footer .footer-legal p { margin: 0 0 0.35rem; font-size: 0.875rem; color: var(--text-dim); }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

.theme-toggle {
  background: none;
  border: 1px solid var(--border-firm);
  border-radius: var(--radius);
  color: var(--text-dim);
  font: inherit;
  font-size: 0.875rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-dim); }

/* Shown only once the theme script has run. */
html:not(.js) .js-only { display: none; }

/* --- admin -------------------------------------------------------------- */

/* The admin's navigation. Deliberately loud: it is the only way around. */
.admin-bar {
  background: var(--bg-raised);
  border-top: 3px solid var(--brand);
  border-bottom: 1px solid var(--border-firm);
  padding-block: 0.6rem;
  font-size: 0.9375rem;
}
.admin-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.4rem;
  align-items: center;
}
.admin-bar .admin-title { margin-right: 0.6rem; }
.admin-bar .wrap > a {
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}
.admin-bar .wrap > a:hover { background: var(--bg-sunken); }
.admin-bar a[aria-current="page"] {
  background: var(--text);
  color: var(--bg);
  font-weight: 650;
}
.admin-bar .admin-bar-end {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
  font-size: 0.875rem;
}

/* Dashboard numbers. */
.dash {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.dash-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  color: var(--text);
  text-decoration: none;
}
.dash-card:hover { border-color: var(--text-dim); }
.dash-card .dash-n { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dash-card .dim { font-size: 0.8125rem; }

/* A form that looks like a link: log out, revert. POSTs, because they change things. */
.inline-form { display: inline; margin: 0; }
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.17em;
  cursor: pointer;
}

/* Admin forms */
.field-row { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.hint-block { font-size: 0.875rem; color: var(--text-dim); margin-top: -0.5rem; }

/* Image slots */
.slots { display: grid; gap: 1.25rem; }
.slot {
  display: grid;
  gap: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  padding: 1.25rem;
  scroll-margin-top: calc(var(--logo) + 3rem);
}
@media (min-width: 44rem) {
  .slot { grid-template-columns: 14rem minmax(0, 1fr); align-items: start; }
}
.slot h2 { font-size: 1.125rem; margin-bottom: 0.25rem; }
.slot-preview {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  padding: 0.5rem;
  min-height: 8rem;
}
.slot-preview img { max-height: 12rem; width: auto; object-fit: contain; }
.slot-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.75rem 0; }
.slot-form input[type="file"] { font: inherit; font-size: 0.875rem; max-width: 100%; }

.msg {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.msg.is-new { border-left: 3px solid var(--brand); }
.msg header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}
.msg header .who { font-weight: 650; }
.msg .body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--bg-sunken);
  border-radius: var(--radius);
  padding: 0.9rem;
  font-size: 0.9375rem;
  margin-bottom: 0.9rem;
}
.msg footer { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-firm);
  color: var(--text-dim);
}
.tag-new { border-color: var(--brand); color: var(--accent); }

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

.stack > * + * { margin-top: 1.25rem; }
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
