/* GoodHood CRM — one stylesheet (pass 13).
   "Unmistakably GoodHood, calm enough to work in all day."

   Rules this file keeps (tested in tests/test_pass13.py):
   - Brand tokens are exactly the site's: --gh-*. Everything else is derived from cream / ink / tan.
   - Orange (#FF9900) is only ever a background under INK text (--on-accent), never a text colour.
   - Green = booked / approved / success. Burnt orange = needs attention. Red = errors, opt-outs,
     destructive actions only.
   - Every text/background pair used here meets WCAG 2.1 AA (4.5:1; 3:1 for large text and UI edges).
   - Light is the default; dark follows the device (prefers-color-scheme).
   - No external requests: fonts, images and the one script (js/board.js, pass 15) are served from /static. */

/* ------------------------------------------------------------------ fonts (SIL OFL — see fonts/*-OFL.txt) */

@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans-Variable.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
  /* Brand (from goodhoodburgers.com — exact) */
  --gh-orange: #FF9900;
  --gh-burnt: #E34800;
  --gh-cream: #FFF8E6;
  --gh-tan: #E4D3B5;
  --gh-green: #31833B;
  --gh-red: #B60015;
  --gh-ink: #191718;

  /* Semantic — light (default) */
  --bg: var(--gh-cream);
  --bg-sunk: #F6EBD2;          /* cream deepened toward tan */
  --surface: #FFFFFF;
  --surface-2: #FFFCF4;        /* cream-white */
  --line: #EADCC2;             /* tan, lightened */
  --line-strong: #9A8466;      /* tan, deepened: field and control edges, 3:1+ on white and cream */
  --text: var(--gh-ink);
  --text-2: #4B4540;           /* ink on cream, 75% */
  --text-3: #685E54;           /* muted — still 5.5:1 on cream */
  --accent: var(--gh-orange);
  --accent-hover: #F28C00;
  --on-accent: var(--gh-ink);
  --attention: var(--gh-burnt);
  --attention-tint: #FCE8DD;
  --success: var(--gh-green);
  --on-success: #FFFFFF;
  --success-tint: #E5F1E3;
  --success-text: #256A2E;     /* green deepened for text on tints */
  --danger: var(--gh-red);
  --on-danger: #FFFFFF;
  --danger-tint: #FBE4E5;
  --danger-text: var(--gh-red);
  --danger-edge: var(--gh-red);   /* borders of danger controls; lightened in dark mode for 3:1 */
  --neutral: var(--gh-tan);
  --on-neutral: var(--gh-ink);
  --header-bg: var(--gh-ink);
  --header-text: var(--gh-cream);
  --nav-bg: #FFFFFF;
  --focus: var(--gh-ink);
  /* Pipeline stages (pass 15): ribbon fill + the text on it */
  --stage-new_inquiry: var(--gh-orange);  --on-stage-new_inquiry: var(--gh-ink);
  --stage-contacted: var(--gh-tan);       --on-stage-contacted: var(--gh-ink);
  --stage-quoted: #E64E00;                --on-stage-quoted: var(--gh-ink);   /* burnt, lifted a hair: ink on #E34800 is 4.41:1, on this 4.63 (AA) */
  --stage-booked: var(--gh-green);        --on-stage-booked: #FFFFFF;
  --stage-repeat: #CFE6CC;                --on-stage-repeat: #1F5A27;
  --stage-lost: var(--gh-ink);            --on-stage-lost: var(--gh-cream);
  --toast-bg: var(--gh-ink);              --toast-text: var(--gh-cream);
  --shadow: 0 1px 0 rgba(25, 23, 24, .04), 0 1px 3px rgba(25, 23, 24, .06);
  --shadow-lift: 0 2px 4px rgba(25, 23, 24, .06), 0 8px 24px rgba(25, 23, 24, .08);

  /* Shape + rhythm */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --tap: 44px;
  --gutter: 16px;
  --content: 1240px;
  --font-display: "DM Sans", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Semantic — dark: warm, ink-based */
    --bg: var(--gh-ink);
    --bg-sunk: #120F10;
    --surface: #221E1D;
    --surface-2: #2A2523;
    --line: #3A3330;
    --line-strong: #8A7C6F;
    --text: var(--gh-cream);
    --text-2: var(--gh-tan);
    --text-3: #BBAA91;
    --accent-hover: #FFAA2B;
    --attention-tint: #3B2419;
    --success-tint: #1D2C1F;
    --success-text: #8FD199;
    --danger-tint: #3A1A1D;
    --danger-text: #FF9DA2;
    --danger-edge: #FF6B73;
    --neutral: #4A413B;
    --on-neutral: var(--gh-cream);
    --header-bg: #0F0D0D;
    --header-text: var(--gh-cream);
    --nav-bg: #1D1A19;
    --focus: var(--gh-orange);
    --stage-repeat: #2B4A2E;                --on-stage-repeat: #CFEAD0;
    --stage-lost: #4A413B;                  --on-stage-lost: var(--gh-cream);
    --toast-bg: #2E2826;                    --toast-text: var(--gh-cream);
    --shadow: 0 1px 0 rgba(0, 0, 0, .3);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1440px) { :root { --content: 1360px; } }

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font-body);
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; width: 100%; max-width: var(--content); margin: 0 auto; padding: 24px var(--gutter) 48px; }
main:focus { outline: none; }

h1, h2, h3 { font-family: var(--font-display); text-transform: uppercase; margin: 0; color: var(--text);
  text-wrap: balance; }
/* pass 16: no lone last word ("…ask / Phil.") where the browser supports it; others ignore this */
p, li, dd, .lede, .hint, .sub, .title { text-wrap: pretty; }
h1 { font-weight: 900; font-size: clamp(1.55rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.08; letter-spacing: .01em; }
h2 { font-weight: 700; font-size: .95rem; letter-spacing: .07em; line-height: 1.3; }
h3 { font-weight: 700; font-size: .85rem; letter-spacing: .07em; }
p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }
a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--attention); }
strong { font-weight: 700; }
small, .small { font-size: .875rem; }
code, .mono { font-family: var(--font-mono); font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
img { max-width: 100%; }

.num, time, .count, .hash, .when { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.hint { color: var(--text-2); font-size: .92rem; }
.sr, .sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Visible focus, everywhere */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 50;
  background: var(--accent); color: var(--on-accent); padding: 12px 16px; border-radius: var(--radius-sm);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ header: the ribbon */

.site-head { background: var(--header-bg); color: var(--header-text); }
.site-head .bar {
  max-width: var(--content); margin: 0 auto; padding: 10px var(--gutter);
  display: flex; align-items: center; gap: 12px; min-height: 64px;
}
.ribbon {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--on-accent);
  padding: 9px 26px 9px 24px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%, 12px 50%);
  text-decoration: none; min-height: var(--tap);
}
.brand-link { display: inline-flex; text-decoration: none; border-radius: 4px; }
.brand-link:hover .ribbon { background: var(--accent-hover); color: var(--on-accent); }
.brand-link:focus-visible { outline: 3px solid var(--gh-cream); outline-offset: 3px; }
.ribbon img { display: block; height: 20px; width: auto; }
.ribbon .app-name {
  font-family: var(--font-display); font-weight: 900; font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; border-left: 2px solid var(--on-accent); padding-left: 9px; line-height: 1.1;
}
.site-head .who {
  margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--header-text);
}
.who .name { font-weight: 700; }
.who .role { color: var(--gh-tan); }
.who .role-sep { color: var(--gh-tan); }
.site-head form { margin: 0; }
.btn.on-dark { background: transparent; color: var(--header-text); border-color: rgba(255, 248, 230, .45); }
.btn.on-dark:hover { border-color: var(--gh-cream); background: rgba(255, 248, 230, .08); }
.btn.on-dark:focus-visible { outline-color: var(--gh-orange); }

@media (max-width: 599px) {
  .who .role, .who .role-sep { display: none; }
  .ribbon { padding-left: 20px; padding-right: 22px; }
  .ribbon img { height: 17px; }
}
@media (max-width: 479px) {
  .ribbon .app-name, .who .name { display: none; }
  .site-head .bar { gap: 8px; }
}

/* Demo marker (demo mode only) */
.demo-strip {
  background: var(--gh-tan); color: var(--gh-ink); text-align: center; font-size: .82rem; font-weight: 600;
  padding: 6px var(--gutter);
}

/* ------------------------------------------------------------------ nav */

.nav {
  background: var(--nav-bg); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.nav ul {
  list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: var(--content);
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity;
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}
.nav ul::-webkit-scrollbar { display: none; }
.nav li { flex: none; scroll-snap-align: start; }
.nav li.spacer { flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 12px;
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .92rem;
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.nav a:hover { color: var(--text); border-bottom-color: var(--line-strong); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.nav a:focus-visible { outline-offset: -3px; }
@media (min-width: 1100px) {
  .nav ul { mask-image: none; -webkit-mask-image: none; overflow: visible; flex-wrap: wrap; }   /* pass 17: more sections */
  .nav a { padding: 0 9px; }
}

/* ------------------------------------------------------------------ banners + flashes */

.paused-banner {
  background: var(--danger); color: var(--on-danger); text-align: center; font-weight: 600;
  padding: 10px var(--gutter); font-size: .95rem;
}
.paused-banner a { color: var(--on-danger); }
.paused-banner strong { font-family: var(--font-display); letter-spacing: .06em; font-weight: 900; }

.flash {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 20px;
  border: 1px solid var(--line); border-left-width: 5px; background: var(--surface); color: var(--text);
}
.flash::before { font-weight: 900; font-family: var(--font-display); flex: none; }
.flash.ok { background: var(--success-tint); border-color: var(--success); }
.flash.ok::before { content: "✓"; color: var(--success-text); }
.flash.error { background: var(--danger-tint); border-color: var(--danger-edge); }
.flash.error::before { content: "!"; color: var(--danger-text); }
.flash.attn { background: var(--attention-tint); border-color: var(--attention); }
.flash.attn::before { content: "●"; color: var(--attention); }
.flash.info { background: var(--surface-2); border-color: var(--gh-tan); }

/* ------------------------------------------------------------------ page heading */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin: 4px 0 22px; }
.page-head .titles { flex: 1 1 320px; min-width: 0; }
.page-head .lede { margin: 8px 0 0; color: var(--text-2); max-width: 64ch; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.eyebrow {
  display: block; margin-bottom: 6px; color: var(--text-3); font-size: .8rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.crumb { margin: 0 0 10px; font-size: .9rem; }
.crumb a { color: var(--text-2); display: inline-flex; align-items: center; min-height: 32px; }

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

.grid { display: grid; gap: 20px; }
@media (min-width: 900px) {
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.main-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .grid.main-side .side { position: sticky; top: 64px; }
}
@media (min-width: 1280px) {
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.main-side { grid-template-columns: minmax(0, 1fr) 400px; }
}
/* Draft page: on phones the decision panel follows the exact text; on desktop it sits alongside. */
.draft-layout { display: grid; gap: 20px; }
.draft-layout > * { min-width: 0; }
.draft-layout > .side { order: 1; }
.draft-layout > .more { order: 2; }
.draft-layout > .more > * + * { margin-top: 20px; }
@media (min-width: 900px) {
  .draft-layout { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "main side" "more side";
    grid-template-rows: auto 1fr; align-items: start; }
  .draft-layout > .main { grid-area: main; }
  .draft-layout > .side { grid-area: side; position: sticky; top: 64px; }
  .draft-layout > .more { grid-area: more; }
}
@media (min-width: 1280px) { .draft-layout { grid-template-columns: minmax(0, 1fr) 400px; } }
/* Contact page: details first on phones. */
@media (max-width: 899px) { .side-first > .side { order: -1; } }
.stack > * + * { margin-top: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }

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

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); min-width: 0;
}
.card + .card, .card + section, section + .card { margin-top: 20px; }
.grid > .card { margin-top: 0; }
@media (min-width: 768px) { .card { padding: 22px 24px; } }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { flex: 1; }
.card-head .link-more { font-size: .9rem; font-weight: 600; }
.card.accent { border-top: 5px solid var(--accent); }
.card.attn { border-left: 5px solid var(--attention); }
.card.ok { border-left: 5px solid var(--success); }
.card.danger { border-left: 5px solid var(--danger-edge); }
.card.sunk { background: var(--surface-2); box-shadow: none; }

.count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px;
  padding: 0 8px; border-radius: var(--radius-pill); background: var(--bg-sunk); color: var(--text);
  font: 700 .8rem/1 var(--font-body); letter-spacing: 0; text-transform: none; vertical-align: middle;
}
.nav .count { background: var(--accent); color: var(--on-accent); min-width: 22px; height: 20px; font-size: .75rem; }

/* ------------------------------------------------------------------ rows (lists inside cards) */

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { padding: 12px 0; border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; padding-top: 2px; }
.rows > li:last-child { padding-bottom: 2px; }
.row-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.row-title { font-weight: 700; color: var(--text); }
a.row-title { text-decoration: none; }
a.row-title:hover { text-decoration: underline; }
.row-meta { color: var(--text-3); font-size: .88rem; margin-top: 3px; display: flex; flex-wrap: wrap; align-items: baseline; }
/* pass 16: each item is one unit, and its "·" follows it — a line never starts with a dot */
.row-meta > * { white-space: nowrap; }
.row-meta > .rm-to { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.row-meta > *:not(:last-child)::after { content: "·"; display: inline-block; margin: 0 6px; color: var(--text-3);
  text-decoration: none; }
.row-body { color: var(--text-2); margin-top: 4px; overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.row-actions form { margin: 0; }
.linkrow {
  display: block; color: inherit; text-decoration: none; border-radius: var(--radius-sm);
  margin: -6px -8px; padding: 6px 8px;
}
.linkrow:hover { background: var(--surface-2); }
.linkrow:hover .row-title { text-decoration: underline; }
.snippet { color: var(--text-2); display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.quote {
  margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--gh-tan); background: var(--surface-2);
  color: var(--text-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* ------------------------------------------------------------------ pills, tags */

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill); font: 600 .78rem/1 var(--font-body); white-space: nowrap;
  background: var(--neutral); color: var(--on-neutral); border: 1px solid transparent; vertical-align: middle;
}
.pill.orange { background: var(--accent); color: var(--on-accent); }
.pill.attn { background: var(--attention-tint); color: var(--text); border-color: var(--attention); }
.pill.attn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--attention); }
.pill.ok { background: var(--success); color: var(--on-success); }
.pill.ok-soft { background: var(--success-tint); color: var(--success-text); border-color: var(--success); }
.pill.danger { background: var(--danger); color: var(--on-danger); }
.pill.quiet { background: transparent; color: var(--text-2); border: 1px dashed var(--line-strong); }
.pill.ink { background: var(--text); color: var(--bg); }
.pill.private { background: var(--text); color: var(--bg); }          /* TikTok: private until the app is approved */
.pill .ico { width: 12px; height: 12px; }

/* Stages — the same pill everywhere a stage appears */
.stage-new_inquiry { background: var(--accent); color: var(--on-accent); }
.stage-contacted { background: var(--neutral); color: var(--on-neutral); }
.stage-quoted { background: var(--attention-tint); color: var(--text); border-color: var(--attention); }
.stage-booked { background: var(--success); color: var(--on-success); }
.stage-repeat { background: var(--success-tint); color: var(--success-text); border-color: var(--success); }
.stage-lost { background: transparent; color: var(--text-2); border: 1px dashed var(--line-strong); }

.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px;
  background: var(--bg-sunk); color: var(--text); font: 600 .78rem/1 var(--font-mono);
  text-decoration: none; white-space: nowrap;
}
a.tag:hover { background: var(--gh-tan); color: var(--gh-ink); }
.stars { color: var(--text); letter-spacing: 1px; font-size: 1rem; white-space: nowrap; }
.stars .off { color: var(--line-strong); }
.stars .on { color: var(--gh-burnt); }

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

.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border-radius: var(--radius-sm);
  font: 700 .95rem/1.1 var(--font-body); text-decoration: none; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1.5px solid var(--line-strong);
  transition: background-color .12s ease, border-color .12s ease, transform .05s ease;
  -webkit-appearance: none; appearance: none; text-align: center;
}
.btn:hover { border-color: var(--text); text-decoration: none; }
.btn.small { white-space: nowrap; }          /* short labels: one line; their rows wrap between buttons (pass 16) */
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); color: var(--on-accent); border-color: var(--text); }
.btn.danger { background: var(--danger); color: var(--on-danger); border-color: var(--danger-edge); }
.btn.danger:hover { border-color: var(--text); }
.btn.quiet { background: transparent; border-color: transparent; padding: 0 10px; font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: .2em; }
.btn.quiet:hover { background: var(--surface-2); text-decoration-thickness: 2px; }
.btn.quiet.danger-text, .btn.danger-text { color: var(--danger-text); background: transparent; border-color: transparent; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.rows .btn.small, .row-actions .btn { min-height: var(--tap); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

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

.form .field, .field { display: block; margin: 0 0 16px; }
.field > .label, label.field { font-weight: 700; font-size: .92rem; color: var(--text); }
.field .label + input, .field .label + textarea, .field .label + select { margin-top: 6px; }
label.field > input, label.field > textarea, label.field > select { margin-top: 6px; }
.help { display: block; font-weight: 400; color: var(--text-3); font-size: .86rem; margin-top: 6px; }
.field-error { display: block; color: var(--danger-text); font-weight: 600; font-size: .88rem; margin-top: 6px; }
.field-error::before { content: "! "; font-weight: 900; }
input, textarea, select {
  display: block; width: 100%; min-height: var(--tap);
  font: 400 1rem/1.45 var(--font-body); color: var(--text);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 12px;
}
textarea { resize: vertical; min-height: 96px; }
select { padding-right: 36px; }
input:hover, textarea:hover, select:hover { border-color: var(--text-3); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--text); }
[aria-invalid="true"] { border-color: var(--danger); }
input[type="checkbox"], input[type="radio"] {
  width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; accent-color: var(--gh-ink); flex: none;
}
@media (prefers-color-scheme: dark) { input[type="checkbox"], input[type="radio"] { accent-color: var(--gh-orange); } }
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 1; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px 4px; margin: 0 0 16px; }
legend { font-weight: 700; font-size: .92rem; padding: 0 6px; }
label.check {
  display: flex; align-items: center; gap: 12px; min-height: var(--tap); font-weight: 600; cursor: pointer;
}
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.code-input { font: 700 1.5rem/1 var(--font-mono); letter-spacing: .3em; text-align: center; max-width: 240px; }
@media (min-width: 768px) {
  .form .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
}

/* ------------------------------------------------------------------ definition lists */

dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; }
dl.facts dt { color: var(--text-3); font-size: .88rem; font-weight: 600; padding-top: 2px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  dl.facts { grid-template-columns: 1fr; gap: 2px; }
  dl.facts dd { margin-bottom: 8px; }
}

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

.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th {
  text-align: left; font: 700 .74rem/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); padding: 8px 10px; border-bottom: 1.5px solid var(--line-strong); white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
/* pass 16: a row's buttons line up with its first line of text (44 px targets centre their label lower) */
@media (min-width: 641px) { .table td > .row-actions { margin-top: -12px; margin-bottom: -12px; } }
.table tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .table.stacks thead { position: absolute; left: -9999px; }
  .table.stacks, .table.stacks tbody, .table.stacks tr, .table.stacks td { display: block; width: 100%; }
  .table.stacks tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table.stacks td { border: 0; padding: 2px 4px; }
  .table.stacks td[data-label]::before {
    content: attr(data-label) " "; color: var(--text-3); font-size: .8rem; font-weight: 700; margin-right: 4px;
  }
}

/* ------------------------------------------------------------------ empty states */

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 8px 8px; }
.empty .cat {
  width: 72px; height: 72px; border-radius: 50%; background: var(--gh-tan); display: grid; place-items: center;
  margin-bottom: 10px;
}
.empty .cat img { width: 48px; height: auto; }
.empty .title { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.empty .sub { color: var(--text-3); font-size: .92rem; margin-top: 2px; max-width: 40ch; }
.empty.compact { flex-direction: row; text-align: left; gap: 12px; padding: 6px 0; }
.empty.compact .cat { width: 44px; height: 44px; margin: 0; }
.empty.compact .cat img { width: 30px; }

/* ------------------------------------------------------------------ Today */

/* as many columns as fit the strip's own width (pass 16: a narrow container no longer squeezes the labels) */
.stat-strip { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 136px), 1fr));
  margin-bottom: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  text-decoration: none; color: var(--text); box-shadow: var(--shadow); display: block;
}
a.stat:hover { border-color: var(--line-strong); }
.stat .n { font: 900 2rem/1 var(--font-display); font-variant-numeric: tabular-nums; display: block; }
.stat .l { font-size: .85rem; color: var(--text-2); font-weight: 600; margin-top: 6px; display: block; }
.stat.attn { border-left: 5px solid var(--attention); }
.stat.ok { border-left: 5px solid var(--success); }
.stat.danger { border-left: 5px solid var(--danger-edge); }

.meter { height: 10px; border-radius: var(--radius-pill); background: var(--bg-sunk); overflow: hidden; margin: 8px 0 4px; }
.meter > span { display: block; height: 100%; background: var(--success); border-radius: inherit; }
.meter.high > span { background: var(--attention); }
.meter.full > span { background: var(--danger); }
.w0 { width: 0; } .w1 { width: 10%; } .w2 { width: 20%; } .w3 { width: 30%; } .w4 { width: 40%; } .w5 { width: 50%; }
.w6 { width: 60%; } .w7 { width: 70%; } .w8 { width: 80%; } .w9 { width: 90%; } .w10 { width: 100%; }

/* ------------------------------------------------------------------ drafts */

.draft-row { display: flex; gap: 12px; align-items: flex-start; }
.draft-row .pick { flex: none; display: flex; align-items: center; justify-content: center; width: var(--tap);
  min-height: var(--tap); margin: -6px 0 0 -10px; cursor: pointer; }
.draft-row .linkrow { flex: 1; min-width: 0; }
.batchbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; padding-top: 14px;
  border-top: 1.5px solid var(--line-strong);
}
.batchbar .hint { flex: 1 1 260px; margin: 0; }

.exact .headers { margin-bottom: 14px; }
pre.body {
  white-space: pre-wrap; overflow-wrap: anywhere; margin: 0;
  font: 400 1rem/1.6 var(--font-body); color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px;
}
pre.body.outside { background: var(--bg-sunk); border-style: dashed; }
.hashline { margin-top: 12px; font-size: .82rem; color: var(--text-3); overflow-wrap: anywhere; }
.hashline code { color: var(--text-2); }
.flag {
  display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--attention-tint); border-left: 4px solid var(--attention); color: var(--text); font-size: .92rem;
  overflow-wrap: anywhere;
}
.decide { border-top: 5px solid var(--accent); }
.decide .primary-action { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.decide details { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.decide details:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
summary {
  cursor: pointer; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; gap: 8px;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::before { content: "›"; font-weight: 900; transition: transform .12s; display: inline-block; width: 1em; text-align: center; }
details[open] > summary::before { transform: rotate(90deg); }
.tagline > span { white-space: nowrap; }              /* "Good Hood" is never split (pass 16) */
.sum-who { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }   /* "— name" moves as one piece */
.history li { font-size: .9rem; }

/* step-up */
.stepup .confirm-list { list-style: none; margin: 14px 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.stepup .confirm-list li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: start;
  padding: 12px; border-top: 1px solid var(--line);
}
.stepup .confirm-list li:first-child { border-top: 0; }
.stepup .confirm-list .desc { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.stepup .confirm-list .hash { color: var(--text-3); font-size: .8rem; padding-top: 3px; }
@media (max-width: 479px) {           /* pass 16: the tag sits above, so an address gets the full width */
  .stepup .confirm-list li { grid-template-columns: minmax(0, 1fr); }
  .stepup .confirm-list .tag { justify-self: start; }
  .stepup .confirm-list .hash { grid-column: 1; padding-top: 0; }
}
.stepup .lock-mark {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; margin-bottom: 12px;
}
.stepup .lock-mark img { width: 36px; }

/* request status */
.status-card { text-align: center; }
.status-card .state { font: 900 1.4rem/1.2 var(--font-display); text-transform: uppercase; margin: 8px 0; }
.status-card .result { white-space: pre-wrap; text-align: left; max-width: 60ch; margin: 12px auto; overflow-wrap: anywhere; }
.spinner {
  width: 40px; height: 40px; border-radius: 50%; margin: 6px auto; border: 4px solid var(--bg-sunk);
  border-top-color: var(--accent); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } * { transition: none !important; } }

/* ------------------------------------------------------------------ pipeline: the Kanban board (pass 15) */

body.wide main { max-width: none; }
@media (min-width: 1440px) { body.wide main { padding-left: 32px; padding-right: 32px; } }

.board-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin: 0 0 18px; }
.board-filters .field.inline { margin: 0; font-weight: 700; font-size: .88rem; }
.board-filters select { margin-top: 4px; min-width: 150px; }
.board-filters .check { min-height: var(--tap); }
.board-filters .form-actions { margin: 0; }

.kanban {
  display: flex; gap: 14px; align-items: stretch;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 18px; scroll-padding-inline: var(--gutter);
}
.kcol {
  flex: 0 0 min(82vw, 320px); scroll-snap-align: start;
  display: flex; flex-direction: column; min-width: 0;
  background: var(--bg-sunk); border-radius: 16px; padding-bottom: 12px;
  --stage: var(--line-strong); --on-stage: var(--text);
}
@media (min-width: 600px) { .kcol { flex-basis: 296px; } }
@media (min-width: 1200px) { .kcol { flex: 1 0 0; min-width: 196px; } }
.kcol-new_inquiry { --stage: var(--stage-new_inquiry); --on-stage: var(--on-stage-new_inquiry); }
.kcol-contacted { --stage: var(--stage-contacted); --on-stage: var(--on-stage-contacted); }
.kcol-quoted { --stage: var(--stage-quoted); --on-stage: var(--on-stage-quoted); }
.kcol-booked { --stage: var(--stage-booked); --on-stage: var(--on-stage-booked); }
.kcol-repeat { --stage: var(--stage-repeat); --on-stage: var(--on-stage-repeat); }
.kcol-lost { --stage: var(--stage-lost); --on-stage: var(--on-stage-lost); }

.kcol-head { padding: 12px 0 0; }
.kribbon {
  margin: 0 -6px; padding: 12px 22px 11px; text-align: center;
  background: var(--stage); color: var(--on-stage);
  font: 900 .92rem/1.1 var(--font-display); letter-spacing: .07em; text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 11px) 50%, 100% 100%, 0 100%, 11px 50%);
  transition: filter .15s ease;
}
.kcol-meta {
  margin: 8px 12px 10px; text-align: center; font-size: .84rem; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.ktotal { font-weight: 800; color: var(--text); }

.kcards { list-style: none; margin: 0; padding: 0 10px; display: flex; flex-direction: column; gap: 10px; flex: 1;
  min-height: 110px; }
.kcard {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-left: 4px solid var(--stage); border-radius: 12px;
  padding: 11px 12px 8px 13px;
  box-shadow: 0 1px 2px rgba(25, 23, 24, .05), 0 3px 10px rgba(122, 78, 22, .09);
  cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: box-shadow .15s ease, transform .15s ease;
}
.kcard:hover { box-shadow: 0 2px 4px rgba(25, 23, 24, .07), 0 8px 20px rgba(122, 78, 22, .14); }
.kcard-link { font-weight: 800; color: var(--text); text-decoration: none; overflow-wrap: anywhere; line-height: 1.3; }
.kcard-link::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.kcard-link:focus-visible { outline: none; }
.kcard-link:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.kcard-co { color: var(--text-2); font-size: .86rem; overflow-wrap: anywhere; }
.kchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.kchip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: var(--radius-pill);
  background: var(--bg-sunk); color: var(--text); font-size: .76rem; font-weight: 600; white-space: nowrap;
}
.ktype { background: var(--neutral); color: var(--on-neutral); }
.kquote { font-weight: 800; }
.kfoot { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 5px; font-size: .78rem; color: var(--text-3); }
.kfoot > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; max-width: 100%; }
/* Pass 16: a chip, pill or foot item is one unit — rows wrap between them, never inside one. Free text
   (an owner's name) is cut with an ellipsis; its full value is in the title. */
.kchip, .kbadges .pill, .kdue { white-space: nowrap; flex: none; }
.kowner { min-width: 0; }
.ktxt { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kdue.overdue {
  color: var(--text); background: var(--attention-tint); border: 1px solid var(--attention);
  border-radius: var(--radius-pill); padding: 1px 7px; font-weight: 700;
}
.kdue.overdue .ico { color: var(--attention); }
.kbadges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.kbadges .pill { height: 22px; font-size: .72rem; }
.kmove { position: relative; z-index: 2; margin-top: 4px; }
.kmove summary {
  min-height: var(--tap); font-size: .8rem; font-weight: 700; color: var(--text-2); padding: 4px 0; gap: 5px;
}
.kmove summary::before { content: none; }
.kmove summary:hover { color: var(--text); }
.kmove[open] summary { color: var(--text); }
.kmove-form { display: grid; gap: 6px; padding: 6px 0 4px; cursor: auto; -webkit-user-select: text; user-select: text; }
.kmove-form .field { margin: 0; font-size: .82rem; }
.kmove-form input, .kmove-form select { min-height: 40px; padding: 7px 10px; font-size: .9rem; }
.kempty[hidden] { display: none; }
.kempty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 8px;
  color: var(--text-3); font-size: .9rem; text-align: center; }
.kempty img { width: 46px; height: 46px; object-fit: contain; padding: 8px; border-radius: 50%;
  background: var(--neutral); opacity: .7; }

/* icons: self-hosted SVGs used as masks, so they take the text colour */
.ico { width: 14px; height: 14px; flex: none; display: inline-block; background: currentColor;
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain; }
.ico-calendar { -webkit-mask-image: url("icons/calendar.svg"); mask-image: url("icons/calendar.svg"); }
.ico-people { -webkit-mask-image: url("icons/people.svg"); mask-image: url("icons/people.svg"); }
.ico-dollar { -webkit-mask-image: url("icons/dollar.svg"); mask-image: url("icons/dollar.svg"); }
.ico-task { -webkit-mask-image: url("icons/task.svg"); mask-image: url("icons/task.svg"); }
.ico-user { -webkit-mask-image: url("icons/user.svg"); mask-image: url("icons/user.svg"); }
.ico-draft { -webkit-mask-image: url("icons/draft.svg"); mask-image: url("icons/draft.svg"); }
.ico-move { -webkit-mask-image: url("icons/move.svg"); mask-image: url("icons/move.svg"); transform: rotate(90deg); }
/* pass 17: platforms and the social pages (generic glyphs, not the platforms' logos; the name is always shown or read) */
.ico-instagram { -webkit-mask-image: url("icons/instagram.svg"); mask-image: url("icons/instagram.svg"); }
.ico-facebook { -webkit-mask-image: url("icons/facebook.svg"); mask-image: url("icons/facebook.svg"); }
.ico-tiktok { -webkit-mask-image: url("icons/tiktok.svg"); mask-image: url("icons/tiktok.svg"); }
.ico-video { -webkit-mask-image: url("icons/video.svg"); mask-image: url("icons/video.svg"); }
.ico-upload { -webkit-mask-image: url("icons/upload.svg"); mask-image: url("icons/upload.svg"); }
.ico-lock { -webkit-mask-image: url("icons/lock.svg"); mask-image: url("icons/lock.svg"); }
.ico-retry { -webkit-mask-image: url("icons/retry.svg"); mask-image: url("icons/retry.svg"); }
.ico-external { -webkit-mask-image: url("icons/external.svg"); mask-image: url("icons/external.svg"); }

/* dragging (board.js) */
body.k-dragging, body.k-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.kcard.k-placeholder { opacity: .35; border-style: dashed; box-shadow: none; }
.kghost {
  position: fixed; z-index: 100; pointer-events: none; margin: 0; list-style: none;
  transform: rotate(-1.5deg) scale(1.03);
  box-shadow: 0 6px 12px rgba(25, 23, 24, .12), 0 22px 44px rgba(122, 78, 22, .28);
}
.kdrop-line { list-style: none; height: 4px; border-radius: 2px; background: var(--accent); color: var(--on-accent); margin: -3px 2px;
  box-shadow: 0 0 0 3px rgba(255, 153, 0, .25); }
.kcol.k-target { background: var(--attention-tint); }
.kcol.k-target .kribbon { filter: brightness(1.12) saturate(1.1); }
.kcard.k-settle { animation: k-settle .24s ease-out; }
@keyframes k-settle { from { transform: scale(1.04); } to { transform: none; } }
.kcard.k-saving { opacity: .75; }

/* the Lost reason prompt and the toast */
.lost-dialog {
  border: 0; border-radius: 16px; padding: 22px 22px 18px; max-width: 420px; width: calc(100% - 32px);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lift); border-top: 5px solid var(--stage-lost);
}
.lost-dialog::backdrop { background: rgba(25, 23, 24, .45); }
.lost-dialog h2 { font-size: 1.05rem; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px);
  padding: 10px 20px 10px 10px; border-radius: var(--radius-pill);
  background: var(--toast-bg); color: var(--toast-text); box-shadow: var(--shadow-lift);
  font-weight: 700;
}
.toast[hidden] { display: none; }
.toast img { width: 40px; height: 40px; object-fit: contain; padding: 6px; border-radius: 50%; background: var(--gh-orange); color: var(--gh-ink); flex: none; }
.toast.booked .toast-text { font: 900 1.1rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .06em; }
.toast.error { background: var(--danger); color: var(--on-danger); padding-left: 20px; border-radius: 16px; }
.toast.error img { display: none; }
.toast.show { animation: k-toast .32s cubic-bezier(.2, .9, .3, 1.25); }
@keyframes k-toast { from { transform: translate(-50%, 16px) scale(.9); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .kcard, .kribbon { transition: none; }
  .kcard.k-settle, .toast.show { animation: none; }
  .kghost { transform: none; }
}

/* ------------------------------------------------------------------ contact + timeline */

.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.ev { position: relative; padding: 0 0 18px 34px; }
.ev:last-child { padding-bottom: 0; }
.ev::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--line-strong);
}
.ev-inbound::before { border-color: var(--accent); background: var(--accent); }
.ev-draft::before { border-color: var(--gh-tan); background: var(--surface); }
.ev-approval::before { border-color: var(--success); background: var(--surface); }
.ev-send::before { border-color: var(--success); background: var(--success); }
.ev-optout::before { border-color: var(--danger); background: var(--danger); }
.ev-note::before { border-color: var(--text); background: var(--surface); }
.ev-task::before { border-color: var(--attention); background: var(--surface); border-radius: 4px; }
.ev-stage::before { border-color: var(--accent); background: var(--surface); transform: rotate(45deg); border-radius: 3px; }
.ev-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ev-type { font: 700 .72rem/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.ev-title { font-weight: 700; }
.ev .when { color: var(--text-3); font-size: .85rem; }
.ev .subject { font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; }
.ev .body { margin-top: 4px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--text-3); margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 2px solid var(--line-strong); }
.legend .lg-inbound { border-color: var(--accent); background: var(--accent); }
.legend .lg-draft { border-color: var(--gh-tan); }
.legend .lg-approval { border-color: var(--success); }
.legend .lg-send { border-color: var(--success); background: var(--success); }
.legend .lg-note { border-color: var(--text); }
.legend .lg-task { border-color: var(--attention); border-radius: 2px; }
.legend .lg-optout { border-color: var(--danger); background: var(--danger); }
.flash.spaced { margin-top: 14px; margin-bottom: 0; }

/* ------------------------------------------------------------------ calendar */

.day { display: grid; gap: 4px; }
.day-head { display: flex; align-items: baseline; gap: 10px; }
.post {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line);
}
.post:first-of-type { border-top: 0; }
.post .t { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ sign-in + auth pages */

body.auth {
  /* The orange diamond pattern — sign-in pages only. */
  background: var(--gh-orange) url("brand/diamonds.svg") repeat;
  background-size: 56px 56px;
  color: var(--gh-ink);
}
@media (prefers-color-scheme: dark) {
  body.auth { background: #231709 url("brand/diamonds-dark.svg") repeat; background-size: 56px 56px; }
}
body.auth main { display: flex; align-items: center; justify-content: center; padding-top: 40px; }
.auth-card {
  width: 100%; max-width: 440px; background: var(--surface); color: var(--text); border-radius: 18px;
  padding: 28px 24px; box-shadow: 0 2px 0 var(--gh-ink), 0 20px 50px rgba(25, 23, 24, .25); border: 2px solid var(--gh-ink);
}
@media (min-width: 480px) { .auth-card { padding: 36px 36px 32px; } }
.auth-card .brandmark { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 22px; text-align: center; }
.auth-card .brandmark .cat { width: 64px; height: auto; }
.auth-card .brandmark .ribbon { pointer-events: none; }
.auth-card h1 { font-size: 1.35rem; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--text-2); margin-bottom: 20px; }
.tagline {
  font: 900 .78rem/1.3 var(--font-display); letter-spacing: .16em; text-transform: uppercase; text-align: center;
}
body.auth .tagline { color: var(--gh-ink); margin-top: 22px; }
@media (prefers-color-scheme: dark) { body.auth .tagline { color: var(--gh-cream); } }
.secret code { font-size: 1.15rem; letter-spacing: .08em; overflow-wrap: anywhere; }
.codes { columns: 2; column-gap: 32px; padding-left: 1.4em; font-family: var(--font-mono); }
.codes li { margin-bottom: 6px; }
.steps { padding-left: 1.3em; }
.steps li { margin-bottom: 14px; }

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

.site-foot { border-top: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); font-size: .85rem; }
.site-foot .in { max-width: var(--content); margin: 0 auto; padding: 18px var(--gutter) 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.site-foot .tagline { color: var(--text-2); }
.site-foot .note { flex: 1 1 280px; }
body.auth .site-foot { background: transparent; border: 0; color: var(--gh-ink); text-align: center; }
body.auth .site-foot .in { justify-content: center; }
@media (prefers-color-scheme: dark) { body.auth .site-foot { color: var(--gh-cream); } }

/* ------------------------------------------------------------------ styleguide */

.swatches { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.swatch { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); font-size: .82rem; }
.swatch .chip { height: 64px; display: flex; align-items: flex-end; padding: 8px; font-weight: 700; }
.swatch .meta { padding: 8px; }
.chip-orange { background: var(--gh-orange); color: var(--gh-ink); }
.chip-burnt { background: var(--gh-burnt); color: var(--gh-ink); }
.chip-cream { background: var(--gh-cream); color: var(--gh-ink); }
.chip-tan { background: var(--gh-tan); color: var(--gh-ink); }
.chip-green { background: var(--gh-green); color: #FFFFFF; }
.chip-red { background: var(--gh-red); color: #FFFFFF; }
.chip-ink { background: var(--gh-ink); color: var(--gh-cream); }
/* ------------------------------------------------------------------ pass 17: library, content bank, calendar */

.plat { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: .82rem; white-space: nowrap;
  color: var(--text); }
.plat .ico { width: 16px; height: 16px; color: var(--plat, var(--text)); }
.plat-instagram, .plat-edge-instagram { --plat: var(--gh-burnt); }
.plat-facebook, .plat-edge-facebook { --plat: var(--line-strong); }
.plat-tiktok, .plat-edge-tiktok { --plat: var(--text); }

.tag-pick { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.tag-pick legend { width: 100%; }
.lib-upload { align-items: start; margin-bottom: 18px; }
.lib-upload .card-head h2, .h-icon { display: inline-flex; align-items: center; gap: 8px; }
.lib-upload input[type="file"] { width: 100%; min-height: var(--tap); }
.lib-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.lib-filter a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; font-weight: 700; font-size: .88rem;
  white-space: nowrap; background: var(--surface); }
.lib-filter a[aria-current] { background: var(--text); color: var(--bg); border-color: var(--text); }
.lib-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.lib-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(25, 23, 24, .05), 0 3px 10px rgba(122, 78, 22, .08); display: flex; flex-direction: column; }
.lib-link { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--bg-sunk); }
.lib-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-badge { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px;
  background: var(--toast-bg); color: var(--toast-text); border-radius: var(--radius-pill); padding: 3px 9px;
  font-size: .74rem; font-weight: 700; white-space: nowrap; }
.lib-meta { padding: 8px 10px 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px; }
.lib-meta .kchips { margin-top: 0; }
.lib-uses { font-size: .76rem; color: var(--text-3); white-space: nowrap; }
.media-preview img { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--bg-sunk); }
.media-preview .hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.up-name { overflow-wrap: anywhere; }

.bank-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  align-items: start; }
.bank-rows .kchips { margin-top: 6px; }
.bank-title { overflow-wrap: anywhere; }
.bank-add { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.bank-add .form { padding-top: 6px; }
.field-row { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: flex-end; }
.field-row .field { flex: 1 1 160px; }

.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 12px; }
.seg { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); overflow: hidden; }
.seg a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; font-weight: 700; color: var(--text);
  text-decoration: none; white-space: nowrap; }
.seg a[aria-current] { background: var(--text); color: var(--bg); }
.cal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cal-range { font-size: 1rem; margin: 0 4px; white-space: nowrap; }
.cal-counts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; align-items: center; }
.cal-counts .num { font-weight: 800; margin-right: 6px; }
.acct-strip { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.acct-strip li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; font-size: .84rem;
  background: var(--success-tint); color: var(--text); border: 1px solid var(--success); max-width: 100%; }
.acct-strip li.bad { background: var(--danger-tint); border-color: var(--danger-edge); }
.acct-strip li span:last-child { overflow-wrap: anywhere; min-width: 0; }
.cal-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .cal-layout { grid-template-columns: minmax(0, 1fr) 330px; } }
.cal-week { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); align-items: start; }
.cal-day { background: var(--bg-sunk); border-radius: 16px; padding: 10px 10px 12px; min-width: 0; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day-h { display: flex; align-items: baseline; gap: 8px; font-size: .9rem; margin: 2px 4px 10px; }
.cal-day-h .dnum { color: var(--text-2); font-weight: 700; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.cal-none { color: var(--text-3); font-size: .86rem; margin: 4px; }
.cal-post { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--plat); border-radius: 12px;
  padding: 9px 10px 8px 11px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(25, 23, 24, .05);
  display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal-post-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-time { font-weight: 800; font-size: .84rem; white-space: nowrap; }
.cal-post-mid { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.cal-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: var(--bg-sunk); }
.cal-thumb.none { display: inline-block; }
.cal-post-text { min-width: 0; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.cal-snip { margin: 0; font-size: .84rem; color: var(--text-2); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cal-why { margin: 0; font-size: .8rem; color: var(--text-2); background: var(--bg-sunk); border-radius: 8px; padding: 5px 8px;
  overflow-wrap: anywhere; }
.cal-post-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cal-post-foot form { margin: 0; }
.cal-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .84rem; white-space: nowrap; }
.cal-side .rows.compact li { padding: 6px 0; }
.approve-week p { margin-bottom: 10px; }
.consent { font-size: .84rem; }
.tt-who { margin-bottom: 10px; }
.tiktok-set .flash .ico { vertical-align: -2px; }
.cal-month { display: grid; gap: 6px; }
.cal-mhead, .cal-mweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-mhead span { font: 700 .74rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2);
  text-align: center; padding: 4px 0; }
.cal-mday { display: flex; flex-direction: column; gap: 3px; min-height: 104px; min-width: 0; padding: 6px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.cal-mday:hover { border-color: var(--line-strong); }
.cal-mday.out { background: transparent; color: var(--text-3); }
.cal-mday.today { box-shadow: inset 0 0 0 2px var(--accent); }
.mnum { font-weight: 800; font-size: .84rem; }
.mpost { display: flex; align-items: center; gap: 4px; font-size: .74rem; border-radius: 6px; padding: 1px 4px 1px 3px; min-width: 0;
  background: var(--bg-sunk); white-space: nowrap; }
.mpost .plat .ico { width: 13px; height: 13px; }
.mtime { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mmore { font-size: .74rem; color: var(--text-3); }
.mpost::before, .dot { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--line-strong); }
.st-attn::before, .dot.st-attn { background: var(--attention); }
.st-ok::before, .dot.st-ok { background: var(--success); }
.st-ok-soft::before, .dot.st-ok-soft { background: var(--success-tint); box-shadow: inset 0 0 0 1.5px var(--success); }
.st-private::before, .dot.st-private { background: var(--text); }
.st-danger::before, .dot.st-danger { background: var(--danger-edge); }
.st-orange::before, .dot.st-orange { background: var(--accent); color: var(--on-accent); }
.cal-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem;
  color: var(--text-2); }
.cal-legend li { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 699px) {
  .cal-mhead { display: none; }
  .cal-mweek { display: block; }
  .cal-mday { min-height: 0; margin-bottom: 6px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .cal-mday.empty, .cal-mday.out { display: none; }
  .mnum { width: 100%; }
}
.draft-thumb { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 10px; margin-bottom: 6px; }
.draft-media { display: block; max-width: min(100%, 360px); height: auto; border-radius: 10px; margin-bottom: 4px;
  border: 1px solid var(--line); }
.media-name { overflow-wrap: anywhere; word-break: break-all; }
.publish-state .card-head h2 .plat { font-size: inherit; }
.pick-photo { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-photo legend, .pick-photo .help { width: 100%; }
.pick { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 6px; border: 1.5px solid var(--line);
  border-radius: 12px; cursor: pointer; background: var(--surface); }
.pick:has(input:checked) { border-color: var(--text); box-shadow: 0 0 0 2px var(--accent); }
.pick img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.pick.none span { font-weight: 700; font-size: .88rem; padding: 0 6px; }

.sg-section { margin-top: 28px; }
.sg-cal { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); align-items: start; }
.sg-cell { padding: 8px 8px 0; }
.sg-tiles { max-width: 520px; }
.lib-ph { position: absolute; inset: 0; background: repeating-linear-gradient(45deg,
  var(--bg-sunk), var(--bg-sunk) 10px, var(--line) 10px, var(--line) 20px); }
/* the style guide's Kanban section (pass 16): real board markup, laid out as a specimen sheet */
.sg-sub { margin: 18px 0 10px; color: var(--text-2); }
.sg-ribbons { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 12px 16px; }
.sg-ribbons .kcol, .sg-kanban .kcol { flex: none; min-width: 0; }
.sg-ribbons .kcol { padding-bottom: 2px; }
.sg-kanban { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px;
  align-items: start; }
.sg-kanban .kcol { padding: 10px 0; }
.sg-fig { margin: 0; min-width: 0; }
.sg-fig figcaption { margin: 6px 4px 0; font-size: .8rem; font-weight: 700; color: var(--text-3); }
.sg-lift { padding: 14px 6px 18px; }
.kghost.sg-static { position: relative; left: auto; top: auto; z-index: auto; }
.lost-dialog.sg-static { display: block; position: static; width: auto; max-width: none; margin: 0; }
.sg-dialog-h { font-size: 1.05rem; text-transform: uppercase; }
.sg-toasts { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.toast.sg-static { position: static; transform: none; max-width: 100%; }
.sg-section > h2 { margin-bottom: 12px; }
.type-sample .d900 { font: 900 2rem/1.1 var(--font-display); text-transform: uppercase; }
.type-sample .d700 { font: 700 1.2rem/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .06em; }

/* ------------------------------------------------------------------ print (contact page and others) */

@media print {
  :root { --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #FFFFFF; --text: #000000; --text-2: #222222; --text-3: #444444; --line: #BBBBBB; }
  body { background: #FFFFFF; color: #000000; font-size: 11pt; }
  .site-head, .nav, .paused-banner, .site-foot, .skip, .demo-strip, .no-print, form, .row-actions, .page-head .actions { display: none !important; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #BBBBBB; break-inside: avoid; }
  .grid { display: block; }
  a { text-decoration: none; }
  .print-head { display: block !important; margin-bottom: 12pt; font: 900 10pt var(--font-display); letter-spacing: .12em; text-transform: uppercase; }
  .ev { break-inside: avoid; }
}
.print-head { display: none; }

/* ------------------------------------------------------------------ small additions */
.status-line { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 14px; }
.auth-card form + form { margin-top: 8px; }
.auth-card .btn.block + .hint, .auth-card form + .hint { margin-top: 16px; }
.auth-card .codes { margin: 16px 0 20px; }
@media (prefers-color-scheme: dark) {
  /* The ink cat needs a light ground on dark surfaces. */
  .auth-card .brandmark .cat { background: var(--gh-tan); border-radius: 50%; padding: 14px; width: 84px; height: 84px;
    object-fit: contain; }
  .auth-card { border-color: var(--gh-orange); }
}
.auth-card .ribbon .app-name { display: inline; }

/* ------------------------------------------------------------------ pass 18: the email list and newsletters */

/* The sign-up honeypot: off-screen for people (and screen readers: aria-hidden), there for bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.public-card .brandmark .ribbon img { width: 160px; height: auto; }
label.check.consent-check { align-items: flex-start; line-height: 1.45; margin: 4px 0 16px; }
label.check.consent-check input { margin-top: 4px; flex: none; }
dl.kv { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 8px 16px; margin: 0; }
dl.kv dt { color: var(--text-2); font-weight: 600; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { dl.kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } dl.kv dd { margin-bottom: 10px; } }
.poster-thumb { display: block; }
.poster-thumb img { display: block; width: 100%; max-width: 255px; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
pre.email-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: .86rem; line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 12px; max-width: 100%; }
.plain-list { list-style: none; padding: 0; margin: 8px 0 0; max-height: 18rem; overflow-y: auto; }
.plain-list li { padding: 4px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.decide form + .hint { margin: 6px 0 14px; }

/* ------------------------------------------------------------------ pass 23: the guided tour and Help */

/* The ? button sits in the header bar next to the name. Round, so it reads as "ask", not "do". */
.btn.tour-help {
  width: 34px; min-width: 34px; padding: 0; border-radius: 50%; font-weight: 800; font-size: 1rem;
  font-family: var(--font-display); line-height: 1;
}

/* The soft spotlight: one dimmed sheet with a hole cut in it by a giant shadow, so the thing we are
   pointing at keeps its real colours and everything else steps back. Clicks pass through. */
.tour-dim { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.tour-hole {
  position: fixed; border-radius: var(--radius-sm); border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px rgba(25, 23, 24, .55); transition: all .18s ease;
}
@media (prefers-color-scheme: dark) { .tour-hole { box-shadow: 0 0 0 9999px rgba(0, 0, 0, .68); } }

.tour-bubble {
  position: absolute; z-index: 81; width: min(340px, calc(100vw - 24px));
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-top: 4px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow-lift); padding: 16px 18px 14px;
}
.tour-count { margin: 0 0 4px; font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3); }
.tour-title { margin: 0 0 6px; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; line-height: 1.25; }
.tour-body { margin: 0 0 14px; font-size: .92rem; line-height: 1.5; color: var(--text-2); }
.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-actions .btn.quiet { margin-right: auto; padding-left: 0; }

/* The arrow: a plain CSS triangle in the accent, pointing from the bubble back at the thing it
   describes. (A rotated square reads as a diamond where it overlaps the bubble; a triangle doesn't.) */
.tour-arrow { position: absolute; width: 0; height: 0; border: 9px solid transparent; margin-left: -9px; }
.tour-bubble[data-placement="bottom"] .tour-arrow { top: -18px; border-bottom-color: var(--accent); }
.tour-bubble[data-placement="top"] .tour-arrow { bottom: -18px; border-top-color: var(--accent); }
.tour-bubble[data-placement="left"] .tour-arrow { right: -18px; left: auto; top: 20px;
  border-left-color: var(--accent); margin-left: 0; }
.tour-bubble[data-placement="right"] .tour-arrow { left: -18px; top: 20px;
  border-right-color: var(--accent); margin-left: 0; }

/* Phone: the bubble docks to the bottom of the screen rather than floating over the thing it describes. */
.tour-bubble.docked {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%;
  border-radius: var(--radius) var(--radius) 0 0; border-left: 0; border-right: 0; border-bottom: 0;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
.tour-bubble.docked .tour-arrow { display: none; }

@media (prefers-reduced-motion: reduce) { .tour-hole { transition: none; } }

/* ---- the Help page (the user guide, in the app) */

.help-layout { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 899px) { .help-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.help-toc { position: sticky; top: 16px; }
@media (max-width: 899px) { .help-toc { position: static; } }
.help-toc h2 { font-family: var(--font-display); font-size: .78rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); margin: 0 0 8px; }
.help-toc ol { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.help-toc li { margin: 0 0 2px; }
.help-toc li.level-3 { padding-left: 12px; }
.help-toc li.level-4 { padding-left: 24px; }
.help-toc li.level-3 a, .help-toc li.level-4 a { font-size: .84rem; color: var(--text-3); }
.help-toc a { display: block; padding: 4px 8px; border-radius: var(--radius-sm); color: var(--text-2);
  text-decoration: none; border-left: 2px solid transparent; }
.help-toc a:hover { background: var(--surface-2); color: var(--text); border-left-color: var(--accent); }

.guide { max-width: 68ch; }
.guide h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.2;
  margin: 34px 0 10px; padding-top: 10px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.guide h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.guide h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; margin: 22px 0 6px; scroll-margin-top: 16px; }
.guide h4 { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin: 18px 0 4px; scroll-margin-top: 16px; }
.guide p, .guide li { line-height: 1.6; }
.guide p { margin: 0 0 12px; }
.guide ul, .guide ol { margin: 0 0 12px; padding-left: 22px; }
.guide li { margin-bottom: 4px; }
.guide code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
.guide pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; overflow-x: auto; margin: 0 0 14px; }
.guide pre code { background: none; border: 0; padding: 0; font-size: .84rem; line-height: 1.5; }
.guide blockquote { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--accent);
  background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.guide blockquote p:last-child { margin-bottom: 0; }
.guide hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.guide img { display: inline-block; vertical-align: top; max-width: 100%; height: auto; margin: 4px 8px 16px 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.guide img.phone { max-width: 300px; }          /* a picture of a phone, at about the size of one */
.guide a { color: var(--text); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 2px; }

/* The styleguide shows the bubble standing still, in the flow of the page. */
.tour-bubble.sg-still { position: relative; top: auto; left: auto; margin-top: 10px; }
.sg-still-head { display: inline-flex; padding: 10px 14px; border-radius: var(--radius-sm); }
