/* Algae Audio: the one stylesheet every page on the site uses, tools included.
   A tool adds its own stylesheet for its own controls (Page::style), built on
   these tokens, so the whole site keeps one look. */

/* Bricolage Grotesque (SIL Open Font License, fonts/OFL.txt), served from
   here rather than a font CDN: no third-party request on any page. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url("fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url("fonts/bricolage-grotesque-latin-ext-standard-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f2f5f1;          /* pond: the page */
  --surface: #ffffff;
  --ink: #132a21;         /* deep green-black: text */
  --muted: #55675e;
  --line: #d5dfd8;
  --accent: #1d6b57;      /* spirulina: links, primary actions */
  --accent-ink: #ffffff;
  --accent-soft: #dcebe4;
  --bloom: #c6dd5a;       /* chartreuse: the filaments, and nothing else */
  /* The filament palette: blues, greens and teals (see filaments.rs). */
  --wave-deep: #1d6b57;
  --wave-green: #3f9b6e;
  --wave-teal: #2a9d8f;
  --wave-blue: #4a7fd0;
  --wave-sky: #7fb2e5;
  --wave-lavender: #8a6fd1; /* beside the blue, as bright: a second voice */
  --haze-green: #b8e2b0;  /* the hazy wash behind every page */
  --haze-blue: #b4cdf2;
  --haze-teal: #9edbd2;
  --grain: 0.5;
  --danger: #b3261e;
  --danger-soft: #f9e3e1;
  --radius: 10px;
  --bar: 1120px;
  --gutter: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1a16;
    --surface: #16241f;
    --ink: #e3ece6;
    --muted: #93a69c;
    --line: #26372f;
    --accent: #6cc3a2;
    --accent-ink: #0f1a16;
    --accent-soft: #1d332b;
    --danger: #f2a39c;
    --danger-soft: #3a1f1c;
    --wave-deep: #6cc3a2;
    --wave-green: #5fbf86;
    --wave-teal: #58cfc0;
    --wave-blue: #7fa8ec;
    --wave-sky: #a5c9f2;
    --wave-lavender: #b39cf0;
    --haze-green: #1d4a33;
    --haze-blue: #1b3360;
    --haze-teal: #11504d;
    --grain: 0.65;
    color-scheme: dark;
  }
}


* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The haze: soft green, blue and teal light, fixed behind every page. Blurred
   so no edge shows; the page colour underneath keeps text contrast. Six
   patches, each a size, a place and a colour: these are the defaults, and the
   page frame (site-kit page.rs, `haze`) draws new ones on every page load. */
body {
  --hz1-size: 42vmax 34vmax; --hz1-at: 12% 8%;  --hz1-c: var(--haze-green);
  --hz2-size: 46vmax 38vmax; --hz2-at: 88% 18%; --hz2-c: var(--haze-blue);
  --hz3-size: 30vmax 26vmax; --hz3-at: 40% 38%; --hz3-c: var(--haze-teal);
  --hz4-size: 50vmax 40vmax; --hz4-at: 62% 78%; --hz4-c: var(--haze-teal);
  --hz5-size: 34vmax 28vmax; --hz5-at: 96% 62%; --hz5-c: var(--haze-green);
  --hz6-size: 36vmax 30vmax; --hz6-at: 8% 92%;  --hz6-c: var(--haze-blue);
}
body::before {
  content: ""; position: fixed; inset: -10vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(var(--hz1-size) at var(--hz1-at), var(--hz1-c), transparent 70%),
    radial-gradient(var(--hz2-size) at var(--hz2-at), var(--hz2-c), transparent 70%),
    radial-gradient(var(--hz3-size) at var(--hz3-at), var(--hz3-c), transparent 72%),
    radial-gradient(var(--hz4-size) at var(--hz4-at), var(--hz4-c), transparent 70%),
    radial-gradient(var(--hz5-size) at var(--hz5-at), var(--hz5-c), transparent 72%),
    radial-gradient(var(--hz6-size) at var(--hz6-at), var(--hz6-c), transparent 70%);
  filter: blur(64px) saturate(1.15);
}

/* The grain: film-like noise over the haze (an inline SVG, no request), so the
   wash reads as a soft photograph rather than a smooth vector gradient. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2.4' intercept='-.7'/%3E%3CfeFuncG type='linear' slope='2.4' intercept='-.7'/%3E%3CfeFuncB type='linear' slope='2.4' intercept='-.7'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: var(--grain);
}

main { flex: 1; width: 100%; max-width: var(--bar); margin: 0 auto; padding: 0 var(--gutter) 72px; }

[hidden] { display: none !important; }

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

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

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 650; margin: 0; }
h1 { font-size: clamp(34px, 5vw, 50px); }
h2 { font-size: clamp(23px, 3vw, 28px); }
h3 { font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0; }

.lede { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 58ch; }
.lede a { color: var(--ink); }
.muted { color: var(--muted); font-weight: 400; }

.skip {
  position: absolute; left: var(--gutter); top: -48px;
  background: var(--surface); padding: 8px 12px; border-radius: var(--radius); z-index: 10;
}
.skip:focus { top: 12px; }

/* ---------- frame ---------- */

.bar {
  max-width: var(--bar); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 12px 32px;
}

.site-header .bar { min-height: 76px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 650; font-size: 18px; letter-spacing: -0.01em;
}
/* The mark's colours are set in the SVG itself: the same in light and dark. */
.logo { width: 32px; height: 32px; flex: none; }

.site-nav { display: flex; gap: 24px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 4px 0; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

.account { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 15px; }
.account .quiet { color: var(--muted); text-decoration: none; font-weight: 500; }
.account .quiet:hover { color: var(--ink); }
.account .who {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600; max-width: 32ch;
}
.account .who .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Credits, always in view: a small line under the name. */
.account .who-stack { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.account .credits-left {
  font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.account .credits-left:hover { color: var(--accent); }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
/* Brand, links, contact: three columns, so the links sit in the middle
   whatever the width of either side. One column on a phone. */
.site-footer .bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px 24px;
  min-height: 72px; padding-top: 12px; padding-bottom: 12px;
}
.site-footer .brand-small { justify-self: start; }
.footer-contact { justify-self: end; display: inline-flex; align-items: center; gap: 10px; }
@media (max-width: 640px) {
  .site-footer .bar { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .site-footer .brand-small, .footer-contact { justify-self: center; }
}
.brand-small { display: inline-flex; align-items: center; gap: 8px; }
.brand-small .logo { width: 22px; height: 22px; }
.site-footer a { color: var(--muted); }
.footer-links { display: inline-flex; gap: 18px; }
.footer-social { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.footer-social:hover { color: var(--accent); background: var(--accent-soft); }
.footer-social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.footer-social svg .dot { fill: currentColor; stroke: none; }

/* ---------- controls ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); text-decoration: none;
}
.button:hover { border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.primary:hover { filter: brightness(1.08); }
.button.small { min-height: 34px; padding: 0 14px; font-size: 14px; }
.button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

.pill {
  display: inline-block; font-size: 13px; font-weight: 600; line-height: 1;
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
  color: var(--muted); border: 1px solid var(--line);
}
.pill.pending { color: var(--accent); border-color: transparent; background: var(--accent-soft); }
.pill.approved { color: var(--accent-ink); border-color: transparent; background: var(--accent); }
.pill.denied { color: var(--danger); border-color: transparent; background: var(--danger-soft); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 15px; font-weight: 600; }
.field small { color: var(--muted); font-size: 14px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="date"], textarea, select {
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; width: 100%; min-width: 0;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

.form-error {
  color: var(--danger); background: var(--danger-soft);
  border-radius: var(--radius); padding: 10px 14px; font-size: 15px;
}
/* Something just worked. */
.notice {
  margin-top: 20px; color: var(--ink); background: var(--accent-soft);
  border-radius: var(--radius); padding: 10px 14px; font-size: 15px;
}
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.button.danger { color: var(--danger); border-color: var(--danger); }
.button.danger:hover { background: var(--danger-soft); }
.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;
}
form.stack { display: flex; flex-direction: column; gap: 16px; }
form.stack .button { align-self: flex-start; }

/* An email address: plain text, never a mail link. One click selects all of it. */
.address {
  user-select: all; -webkit-user-select: all;
  font-weight: 600; color: var(--ink);
  background: var(--accent-soft); border-radius: 6px; padding: 1px 6px;
  overflow-wrap: anywhere;
}
.contact-line { margin-top: 20px; }
.site-footer .address { background: none; padding: 0; font-weight: 500; color: var(--muted); }

/* A surface for a tool's working area. */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px;
}

/* ---------- home ---------- */

.hero { padding: 64px 0 8px; }
.hero h1 { font-size: clamp(46px, 9vw, 104px); line-height: 0.95; letter-spacing: -0.025em; font-weight: 700; }
.hero .lede { margin-top: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.filament-band {
  /* Edge to edge, whatever the column width. */
  width: 100vw; margin: 28px 0 0 calc(50% - 50vw);
  height: clamp(100px, 15vw, 190px);
}
.filaments { display: block; width: 100%; height: 100%; overflow: visible; }
.filaments path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.filaments .w-deep { stroke: var(--wave-deep); }
.filaments .w-green { stroke: var(--wave-green); }
.filaments .w-teal { stroke: var(--wave-teal); }
.filaments .w-blue { stroke: var(--wave-blue); }
.filaments .w-sky { stroke: var(--wave-sky); }
.filaments .w-bloom { stroke: var(--bloom); }
@media (prefers-reduced-motion: no-preference) {
  .filaments { animation: render-in 1.6s cubic-bezier(0.3, 0.6, 0.2, 1) 0.15s both; }
}
@keyframes render-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.tools { padding-top: 40px; scroll-margin-top: 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-bottom: 20px; }
.section-head p { color: var(--muted); font-size: 15px; max-width: 60ch; }

.tool-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.tool-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.tool-list h3 { font-size: clamp(21px, 2.6vw, 26px); }
.tool-list h3 a { color: var(--ink); text-decoration: none; }
.tool-list h3 a:hover { color: var(--accent); }
.tool-list p { color: var(--muted); margin-top: 4px; max-width: 62ch; }
.tool-status { flex: none; }

.band {
  margin-top: 64px; padding: 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.band p { color: var(--muted); margin-top: 8px; max-width: 60ch; }

/* ---------- Music and Voice ---------- */

.section-page { padding-top: 56px; }
.section-page .lede { margin-top: 16px; }
/* One tool per row, full width: wide and short. */
.tool-sections { display: flex; flex-direction: column; gap: 14px; margin-top: 36px; }
.tool-section {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 26px;
}
.tool-section p { max-width: 75ch; }
.tool-section h2 { font-size: clamp(22px, 2.6vw, 26px); }
.tool-section h2 a { color: var(--ink); text-decoration: none; }
.tool-section h2 a:hover { color: var(--accent); }
.tool-section p { color: var(--muted); }
.tool-section .tool-action { margin-top: auto; padding-top: 8px; }
/* Not here yet: muted, with a banner. */
.tool-section.soon { background: transparent; border-style: dashed; }
.tool-section.soon h2, .tool-section.soon p { opacity: 0.6; }
.soon-badge {
  align-self: flex-start;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 5px 10px; margin-bottom: 4px;
}
.section-page .aside { margin-top: 28px; color: var(--muted); font-size: 15px; display: flex; flex-direction: column; gap: 6px; }

/* Feedback. */
.choice { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.choice legend { font-size: 15px; font-weight: 600; margin-bottom: 10px; padding: 0; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.feedback-list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.feedback-list li { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.feedback-list li.new .meta strong { color: var(--accent); }
.feedback-list .meta { font-size: 14px; color: var(--muted); }
.feedback-list .meta strong { color: var(--ink); }
.feedback-list .message { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 75ch; }
.feedback-list .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.feedback-list form { margin: 0; }

/* ---------- reading pages ---------- */

.prose { max-width: 68ch; padding-top: 56px; }
.prose h1 { margin-bottom: 20px; }
.prose h2 { margin: 48px 0 12px; }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 20px; margin: 12px 0 0; }
.prose li + li { margin-top: 10px; }
.prose li::marker { color: var(--accent); }
.legal .effective { color: var(--muted); margin-top: -8px; }
.legal h2 { font-size: 1.15rem; margin-top: 36px; }

.facts { margin: 16px 0 0; display: grid; grid-template-columns: minmax(150px, 13rem) 1fr; border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 650; padding-right: 20px; }
.facts dd { color: var(--muted); }

/* ---------- forms and account ---------- */

.form-page { max-width: 460px; padding-top: 56px; }
.form-page .lede { margin-top: 12px; font-size: 17px; }
.form-page form { display: flex; flex-direction: column; gap: 18px; margin-top: 32px; }
.form-page form .button { align-self: flex-start; }
.form-page .aside { margin-top: 24px; color: var(--muted); font-size: 15px; }

.status { margin-top: 28px; padding: 18px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.status p + p { margin-top: 8px; }
.status.ok { border-color: var(--accent); }
.status.pending { background: var(--accent-soft); border-color: transparent; }
.status.denied { background: var(--danger-soft); border-color: transparent; }
.plain { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* The account page. */
.account-page { max-width: 720px; padding-top: 56px; }
.account-page .lede { margin-top: 12px; font-size: 17px; overflow-wrap: anywhere; }
.account-section { margin-top: 48px; }
.account-section h2 { margin-bottom: 12px; }
.account-section > .muted { font-size: 15px; margin-top: 4px; }
.account-section form.stack { max-width: 460px; margin-top: 8px; }
.sign-out { margin-top: 48px; }
.big-number { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.big-number .unit { font-size: 17px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.ledger { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.ledger th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 0; border-bottom: 1px solid var(--line); }
.ledger td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger .when { white-space: nowrap; color: var(--muted); }
.ledger .num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger .plus { color: var(--accent); font-weight: 600; }

.purchases { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.purchases li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.purchases .what { font-weight: 600; }
.purchases .muted { font-size: 14px; }
.purchases code { font-size: 12px; overflow-wrap: anywhere; }

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

.admin { padding-top: 56px; max-width: 860px; }
.admin .lede { margin-top: 12px; }
.admin h2 { margin: 40px 0 8px; display: flex; align-items: center; gap: 10px; }
.count { font-size: 14px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 2px 9px; letter-spacing: 0; }
.empty { color: var(--muted); }
.accounts { list-style: none; margin: 0; padding: 0; }
/* One line an account: name and email, when and credits, then what to do. */
.accounts li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px;
  padding: 6px 0; border-bottom: 1px solid var(--line); min-height: 48px;
  scroll-margin-top: 120px;
}
.accounts .who-col { min-width: 0; flex: 1 1 300px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accounts .name { display: inline-block; vertical-align: bottom; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; color: var(--ink); text-decoration: none; }
.accounts .name:hover { color: var(--accent); text-decoration: underline; }
.accounts .addr { color: var(--muted); font-size: 14.5px; }
.accounts li.changed { opacity: 0.7; }
.accounts .row-error { flex-basis: 100%; margin: 0; }
.accounts .meta { color: var(--muted); font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.accounts .actions { display: flex; align-items: center; gap: 6px; margin: 0 0 0 auto; }
.accounts form { margin: 0; }
.accounts form.approve { display: flex; gap: 6px; align-items: center; }
.accounts .approve input { width: 72px; padding: 4px 8px; font-size: 14px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 24px 0 8px; }
.pager { flex-wrap: wrap; }
.pager-where { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; flex-basis: 100%; text-align: center; }
.pager-pages { display: inline-flex; align-items: center; gap: 4px; }
.pager-page {
  display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px;
  border-radius: 999px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--muted); text-decoration: none; border: 1px solid transparent;
}
a.pager-page:hover { color: var(--ink); border-color: var(--line); }
.pager-page[aria-current="page"] { color: var(--ink); background: var(--surface); border-color: var(--line); }
.pager-gap { color: var(--muted); padding: 0 2px; }
.button.disabled { opacity: 0.45; pointer-events: none; }

/* A staff list's bar: search, sort, rows per page, in one form. */
.list-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 28px; }
.list-controls input[type="search"] { flex: 1 1 240px; max-width: 420px; padding: 7px 12px; }
.list-controls .inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.list-controls select { width: auto; padding: 6px 10px; font-size: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 16px 0 8px; }
.tabs a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--muted); text-decoration: none; border: 1px solid transparent;
}
.tabs a:hover { color: var(--ink); border-color: var(--line); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--surface); border-color: var(--line); }
.tab-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.admin-detail { max-width: 1040px; }
.admin-detail .lede { overflow-wrap: anywhere; }
.crumb { font-size: 15px; margin-bottom: 12px; }
.crumb a { color: var(--muted); }
.small-note { margin-top: 16px; font-size: 15px; }
.summary {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 24px;
  margin: 24px 0 0; border-top: 1px solid var(--line);
}
.summary > div { padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.summary .wide { grid-column: 1 / -1; }
.summary dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.summary dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 28px; align-items: start; }
.panels .panel { padding: 22px; min-width: 0; }
.panels .panel.wide { grid-column: 1 / -1; }
.admin .panels h2 { margin: 0 0 14px; font-size: 21px; }
.panel > .muted { font-size: 15px; margin-bottom: 14px; }
.panel .big-number { font-size: 34px; margin-bottom: 16px; }
.history { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line); }
.history li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.history li.note { background: var(--accent-soft); margin: 0 -10px; padding: 10px; border-radius: 8px; border-bottom-color: transparent; }
.history .meta { font-size: 13px; color: var(--muted); }
.history .meta strong { color: var(--ink); }
.danger-zone { border-color: var(--danger-soft); }

/* The staff pages' own navigation. */
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 28px; font-size: 15px; font-weight: 600; }
.admin-nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.admin-nav a:hover { color: var(--ink); }
.admin-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.admin-wide { max-width: 1040px; }

/* Outreach. */
.add-contact { margin-top: 24px; }
.add-contact > summary { list-style: none; display: inline-flex; }
.add-contact > summary::-webkit-details-marker { display: none; }
.add-contact[open] > summary { margin-bottom: 16px; }
.add-contact form { max-width: 720px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.due { color: var(--danger); font-weight: 600; }
.unsubscribe-form { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.unsubscribe-form .muted { font-size: 14px; margin-bottom: 10px; }
.outreach-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.outreach-actions + .add-contact { margin-top: 12px; }
.compose-pick { max-width: 720px; margin-top: 8px; }
.compose { margin-top: 24px; }
.compose textarea, .panel textarea[name="body"] { font-size: 15px; }
/* Subscription lists: a checkbox each, with what it means. */
fieldset.lists { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
/* An import's preview: a row a line, problems marked. */
.import-form { max-width: 720px; margin-top: 24px; }
.import-table { overflow-x: auto; margin-top: 20px; }
.import-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.import-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.import-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.import-table tr.problem td { background: var(--danger-soft); }
.form-error-text { color: var(--danger); font-weight: 600; }
/* A tool's page while its services restart. */
.restarting h1 { margin-bottom: 12px; }
/* An account given no name at sign-up. */
.no-name { color: var(--muted); font-style: italic; }
.template-body { white-space: pre-wrap; font: inherit; font-size: 15px; line-height: 1.55; margin: 0; }
#stage > form:first-of-type { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
#stage .small-note { margin-top: 8px; font-size: 14px; }

/* Settings and email previews. */
.settings-panel { max-width: 560px; margin-top: 24px; }
.settings-panel h2 { margin: 0 0 8px; }
.settings-panel .muted { margin-bottom: 16px; font-size: 15px; }
.email-sample { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.email-meta h2 { font-size: 21px; margin: 0; }
.email-meta .muted { font-size: 14px; margin-top: 6px; }
.email-sample iframe { display: block; width: 100%; max-width: 640px; height: 640px; margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f2f5f1; }
.email-sample details { margin-top: 10px; max-width: 640px; }
.email-sample summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.email-sample pre { white-space: pre-wrap; font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-wrap: anywhere; }

/* ---------- phones ---------- */

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .site-header .bar { flex-wrap: wrap; min-height: 0; padding-top: 14px; padding-bottom: 10px; }
  /* The page itself offers Request access where it matters; the bar keeps to one row. */
  .account .button { display: none; }
  .site-nav { order: 3; width: 100%; gap: 6px 12px; flex-wrap: wrap; }
  .site-nav a { font-size: 14px; }
  .account { gap: 12px; }
  .account .quiet { font-size: 14px; }
  .account .who { max-width: 18ch; }
  .hero { padding-top: 36px; }
  .tool-list li { flex-direction: column; align-items: flex-start; }
  .band { flex-direction: column; align-items: flex-start; padding: 24px; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
  .facts dd { padding-top: 4px; }
  .prose, .form-page, .admin, .account-page, .section-page { padding-top: 36px; }
  .panels { grid-template-columns: 1fr; }
  .accounts .who-col { white-space: normal; overflow-wrap: anywhere; }
  .ledger td { padding-right: 8px; }
}
