/* into ADHD forum.
   Board view: an old-school bulletin board, made warm and easy on the eyes. Everything sits in a box,
   every box has a header bar, rows alternate so the eye never loses its line.
   Focus view: the same pages as one quiet reading column.
   Yellow means "new to you", in both views. */

/* fonts:start */
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/atkinson-hyperlegible-next-roman-latin.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: italic; font-weight: 200 800; font-display: swap; src: url("fonts/atkinson-hyperlegible-next-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("fonts/literata-roman-latin.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("fonts/literata-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "OpenDyslexic"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/opendyslexic-400-normal.woff2") format("woff2"); }
@font-face { font-family: "OpenDyslexic"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/opendyslexic-400-italic.woff2") format("woff2"); }
@font-face { font-family: "OpenDyslexic"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/opendyslexic-700-normal.woff2") format("woff2"); }
/* fonts:end */

:root {
  color-scheme: light;

  /* from the blog */
  --paper: #f5f6f2;
  --ink: #1d2327;
  --link: #1f3fbf;
  --marker: #ffe14d;
  --marker-ink: #1d2327;

  /* the board: warm boxes on the blog's paper */
  --ink-2: #3b444a;        /* secondary text: still dark, never pale grey */
  --box: #fffefb;          /* the boxes: warm white paper */
  --box-alt: #f9f7f1;      /* every other row */
  --box-hover: #f3f0e7;
  --bar: #edeadf;          /* header bars: stone, not sand */
  --bar-text: #1d2327;
  --side: #f7f5ee;         /* author column */
  --edge: #d8d3c4;         /* box borders */
  --edge-soft: #e8e4d9;    /* lines between rows */
  --field: #ffffff;
  --field-line: #8e897b;
  --admin: #a3261b;
  --mod: #17703a;
  --warn: #a3261b;
  --ok: #1f6b45;
  --code: #2b6b47;

  /* names the Administration panel and the preview builder use */
  --surface: var(--box);
  --panel: var(--box);
  --bar-a: var(--bar);
  --bar-b: var(--bar);
  --bar-ink: var(--bar-text);
  --bar-soft: var(--ink-2);
  --row1: var(--box);
  --row2: var(--box-alt);
  --row-hover: var(--box-hover);
  --strip: var(--bar);
  --line: var(--edge);
  --rule: var(--edge-soft);
  --btn-a: var(--box);
  --btn-b: var(--box-alt);
  --head: var(--ink);
  --hover: #14308f;
  --icon-line: var(--field-line);
  --ink-soft: var(--ink-2);

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, Tahoma, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --read: var(--sans);

  --page: 1100px;
  --measure: 700px;
  --pad: clamp(10px, 2.5vw, 24px);
  --r: 4px;
  --r-small: 3px;
  /* the highlighter stroke from the blog's wordmark */
  --hl: 0.14em 0.3em 0.16em 0.26em;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --paper: #14181b;
  --ink: #ece9df;
  --link: #a9b8ff;
  --marker: #f0cf3c;
  --marker-ink: #14181b;

  --ink-2: #cdc9bc;
  --box: #1b1f22;
  --box-alt: #212528;
  --box-hover: #282c2e;
  --bar: #262a2c;
  --bar-text: #ece9df;
  --side: #1e2224;
  --edge: #3a3f42;
  --edge-soft: #2c3032;
  --field: #111518;
  --field-line: #7d7765;
  --admin: #ff9a8c;
  --mod: #7fd39a;
  --warn: #ff9a8c;
  --ok: #7fd3a6;
  --code: #8fd4a8;
  --hover: #c9d3ff;
}

/* reader preferences (set on <html> by prefs.js / forum.js) */
:root[data-size="s"] { font-size: 93.75%; }
:root[data-size="l"] { font-size: 112.5%; }
:root[data-size="xl"] { font-size: 125%; }
:root[data-font="serif"] { --read: var(--serif); }
:root[data-font="dyslexic"] { --sans: "OpenDyslexic", "Comic Sans MS", Verdana, sans-serif; --serif: "OpenDyslexic", "Comic Sans MS", Verdana, sans-serif; --read: var(--sans); }
:root[data-font="dyslexic"] body { word-spacing: -0.22em; letter-spacing: -0.01em; }
:root[data-width="narrow"] { --measure: 600px; }
:root[data-width="wide"] { --measure: 820px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
:root[data-motion="off"] { scroll-behavior: auto; }
:root[data-motion="off"] * { transition: none !important; animation: none !important; }

body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--sans); overflow-wrap: break-word; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.16em; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
form { margin: 0; }
code { font: 0.92em var(--mono); }
b, strong { font-weight: 700; }

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 8px; background: var(--box); color: var(--ink); padding: 8px 12px; border: 2px solid var(--ink); border-radius: var(--r-small); z-index: 40; }
.only-focus { display: none; }
.only-narrow { display: none; }

/* ---------- page frame: a boxed header with its menu bar attached ---------- */

.wrap { max-width: calc(var(--page) + 2 * var(--pad)); margin: 0 auto; padding: 16px var(--pad) 28px; }

.masthead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; padding: 16px 18px; background: var(--box); border: 1px solid var(--edge); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; }
.brand { min-width: 0; }
.site-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; line-height: 1.1; }
.wordmark { font: 400 1.875rem/1.1 var(--serif); letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.wordmark:hover { text-decoration: none; }
.wordmark .into { font-style: italic; margin-right: 0.1em; }
.wordmark .adhd { font-family: var(--sans); font-weight: 600; font-size: 0.86em; color: var(--marker-ink); background: var(--marker); padding: 0.02em 0.22em 0.06em; border-radius: var(--hl); }
.site-title .section { font: 600 1.25rem/1.1 var(--sans); color: var(--ink); }
.site-title .section:hover { text-decoration: none; }
.site-desc { margin-top: 6px; font-size: 0.9375rem; color: var(--ink-2); }

.tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tool { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: 0 0.85em; font: 600 0.9375rem/1 var(--sans); color: var(--ink); background: var(--box); border: 1px solid var(--edge); border-radius: var(--r-small); cursor: pointer; white-space: nowrap; }
.tool:hover { background: var(--box-hover); text-decoration: none; }
.tool[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.head-search { display: flex; }
.head-search .field { width: 12.5rem; min-height: 2.5rem; padding: 0 0.7em; border-radius: var(--r-small) 0 0 var(--r-small); border-right: 0; font-size: 0.9375rem; }
.head-search .tool { border-radius: 0 var(--r-small) var(--r-small) 0; border-color: var(--field-line); }

.navbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: stretch; gap: 0 20px; padding: 0 10px; background: var(--bar); border: 1px solid var(--edge); border-radius: 0 0 var(--r) var(--r); font-size: 0.9375rem; }
.navbar ul { display: flex; flex-wrap: wrap; align-items: stretch; }
.navbar li { display: flex; align-items: center; }
.navbar a, .navbar .linklike { display: inline-flex; align-items: center; gap: 7px; min-height: 2.75rem; padding: 0 9px; font-weight: 600; color: var(--bar-text); border-bottom: 3px solid transparent; border-top: 3px solid transparent; }
.navbar a:hover, .navbar .linklike:hover { text-decoration: none; background: color-mix(in srgb, var(--box) 45%, transparent); }
.navbar a[aria-current] { border-bottom-color: var(--ink); }
.navbar .me .avatar { width: 24px; height: 24px; padding: 3px; margin: 0; border-radius: 3px; }
.navbar form { display: flex; }
.navbar .uname.is-admin, .navbar .uname.is-mod { color: var(--bar-text); }

.crumbs { margin: 14px 2px 0; font-size: 0.9375rem; color: var(--ink-2); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; }
.crumbs li + li::before { content: "\203A"; margin: 0 0.5em; color: var(--ink-2); font-weight: 600; }
.crumbs a { font-weight: 600; }

main { display: block; margin-top: 14px; }

.footbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; margin-top: 24px; padding: 12px 16px; background: var(--bar); border: 1px solid var(--edge); border-radius: var(--r); font-size: 0.9375rem; }
.footbar ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footbar a { font-weight: 600; color: var(--bar-text); }
.colophon { font-size: 0.875rem; color: var(--ink-2); }
.colophon .note { margin-top: 2px; max-width: 70ch; }

.linklike { font: inherit; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.linklike:hover { text-decoration: underline; text-underline-offset: 0.16em; }

.uname { font-weight: 600; color: var(--ink); }
a.uname { color: var(--link); }
.uname.is-admin { color: var(--admin); }
.uname.is-mod { color: var(--mod); }

.flash { margin: 14px 0 0; padding: 11px 16px; border-radius: var(--r); background: var(--box); border: 1px solid var(--edge); border-left: 4px solid var(--ok); font-weight: 600; }
.flash.err { border-left-color: var(--warn); }
.flash ul { padding-left: 1.2em; list-style: disc; font-weight: 400; }

/* ---------- page headings ---------- */

.page-head { margin: 0 0 14px; }
.page-title { margin: 0 0 4px; font: 600 clamp(1.5rem, 1.25rem + 1vw, 1.875rem)/1.2 var(--sans); letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.page-title a { color: inherit; }
.page-title a:hover { text-decoration: none; }
.page-intro { max-width: 66ch; font-size: 1.0625rem; color: var(--ink-2); }
.page-intro + .bar-row { margin-top: 14px; }

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

.button, .btn.main { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 2.75rem; padding: 0 1.1em; font: 600 1rem/1 var(--sans); color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: var(--r-small); cursor: pointer; white-space: nowrap; }
.button:hover, .btn.main:hover { color: var(--paper); text-decoration: none; background: color-mix(in srgb, var(--ink) 84%, var(--paper)); }
.button span { display: none; }
.button.quiet { color: var(--ink); background: var(--box); border-color: var(--field-line); }
.button.quiet:hover { color: var(--ink); background: var(--box-hover); }
.button.locked { color: var(--ink-2); background: var(--box-alt); border: 1px dashed var(--field-line); cursor: default; filter: none; }
.button.small { min-height: 2.25rem; font-size: 0.9375rem; padding: 0 0.9em; }
.btn, .editor-tools button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.25rem; padding: 0 0.8em; font: 600 0.9375rem/1 var(--sans); color: var(--ink); background: var(--box); border: 1px solid var(--edge); border-radius: var(--r-small); cursor: pointer; white-space: nowrap; }
.btn:hover, .editor-tools button:hover { background: var(--box-hover); border-color: var(--field-line); color: var(--ink); text-decoration: none; }
.btn.main { min-height: 2.75rem; font-size: 1rem; }
.btn.danger { color: var(--warn); }

/* ---------- status marks: yellow means new ---------- */

.bicon { display: inline-block; width: 22px; height: 22px; vertical-align: middle; flex: none; }
.bicon .i-fill { fill: var(--box); stroke: var(--ink-2); stroke-width: 1.5; stroke-linejoin: round; }
.bicon .i-line { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.unread .bicon .i-fill { fill: var(--marker); stroke: color-mix(in srgb, var(--ink) 55%, var(--marker)); stroke-width: 1.5; }
.unread .bicon .i-line { stroke: var(--ink); }
.bicon.mini { width: 14px; height: 14px; vertical-align: -2px; }

.newcount { display: inline-block; margin-left: 8px; padding: 0.12em 0.4em 0.16em; font: 600 0.8125rem/1.15 var(--sans); color: var(--marker-ink); background: var(--marker); border-radius: 2px; white-space: nowrap; vertical-align: 0.1em; }
.tag { display: inline-block; margin-right: 6px; padding: 0.1em 0.45em; font: 600 0.75rem/1.25 var(--sans); color: var(--ink-2); background: transparent; border: 1px solid var(--edge); border-radius: 2px; vertical-align: 0.15em; white-space: nowrap; }

/* ---------- forum and topic lists: boxed tables ---------- */

.forumbg { margin: 0 0 16px; background: var(--box); border: 1px solid var(--edge); border-radius: var(--r); overflow: hidden; }
.grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.grid th { padding: 9px 12px; background: var(--bar); border-bottom: 1px solid var(--edge); font: 600 0.875rem/1.2 var(--sans); color: var(--bar-text); text-align: center; vertical-align: middle; }
.grid th.c-main { text-align: left; font-size: 1.0625rem; }
.grid th.c-last { text-align: left; }
.grid td { padding: 11px 12px; border-top: 1px solid var(--edge-soft); vertical-align: middle; }
.grid tbody tr:first-child td { border-top: 0; }
.grid tbody tr:nth-child(even) td { background: var(--box-alt); }
.grid tbody tr:hover td { background: var(--box-hover); }
.grid .c-icon { width: 46px; padding-right: 0; text-align: center; line-height: 0; }
.grid .c-main { padding-left: 10px; }
.grid th.c-icon { padding: 0; }
.grid .c-num { width: 5.75rem; text-align: center; font-variant-numeric: tabular-nums; }
.grid td.c-num { font-size: 1rem; color: var(--ink); }
.grid .c-last { width: 15.5rem; font-size: 0.9375rem; color: var(--ink-2); line-height: 1.4; }
.grid .c-last .line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid .c-last .lp-title { font-weight: 600; }
.grid .goto { display: none; }
.grid .empty { padding: 24px 12px; text-align: center; color: var(--ink-2); }
.grid tr:has(.empty):hover td { background: none; }

.item-title { font: 600 1.0938rem/1.3 var(--sans); color: var(--link); }
.item-title:hover { text-decoration: underline; }
.item-desc { margin-top: 2px; max-width: 66ch; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }
.item-short { display: none; }
.item-meta { margin-top: 3px; font-size: 0.9375rem; color: var(--ink-2); }
.minipages { display: inline-flex; gap: 3px; margin-left: 8px; font-size: 0.8125rem; vertical-align: 0.12em; }
.minipages a, .minipages i { display: inline-block; min-width: 1.7em; padding: 0.1em 0.35em; text-align: center; background: var(--box); border: 1px solid var(--edge); border-radius: 4px; font-style: normal; font-weight: 600; }
.minipages a:hover { border-color: var(--field-line); text-decoration: none; }
.minipages i { border: 0; background: none; padding: 0.1em 0; min-width: 0; }

.board-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; margin: 0 0 12px; }

.bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; }
.bar-row .pagination { margin-left: auto; font-size: 0.9375rem; color: var(--ink-2); }
.bar-row > span:empty { margin-right: auto; }
.pager { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font: 600 0.9375rem/1 var(--sans); }
.bar-row .button + .pager { margin-left: auto; }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; min-height: 2.25rem; padding: 0 0.6em; border: 1px solid var(--edge); border-radius: var(--r-small); background: var(--box); color: var(--link); }
.pager a:hover { border-color: var(--field-line); background: var(--box-hover); text-decoration: none; }
.pager .current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pager .gap { border: 0; background: none; min-width: 0; padding: 0 2px; color: var(--ink-2); }

/* ---------- boxes with header bars ---------- */

.panel { margin: 0 0 16px; padding: 14px 18px 16px; background: var(--box); border: 1px solid var(--edge); border-radius: var(--r); }
.panel h3 { margin: -14px -18px 12px; padding: 9px 18px; background: var(--bar); border-bottom: 1px solid var(--edge); border-radius: var(--r) var(--r) 0 0; font: 600 1.0625rem/1.3 var(--sans); color: var(--bar-text); }
.board-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: 4px; background: var(--box); border: 1px solid var(--edge); border-radius: var(--r); overflow: hidden; }
.stat-block { padding: 0 0 14px; border-left: 1px solid var(--edge-soft); }
.stat-block:first-child { border-left: 0; }
.stat-block h3 { margin-bottom: 10px; padding: 9px 18px; background: var(--bar); border-bottom: 1px solid var(--edge); font: 600 1.0625rem/1.3 var(--sans); color: var(--bar-text); }
.stat-block p { padding: 0 18px; font-size: 0.9375rem; line-height: 1.6; color: var(--ink); }
.stat-block em { font-style: normal; color: var(--ink-2); }
.searchform { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.searchform .field { width: auto; flex: 1 1 16rem; }
.searchform .hint { flex-basis: 100%; }
.hint { font-size: 0.9375rem; color: var(--ink-2); }

.below { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; margin: 16px 0 0; font-size: 1rem; }
.below a { font-weight: 600; }
.below.split { padding: 10px 14px; background: var(--box); border: 1px solid var(--edge); border-radius: var(--r); }
.jumpbox { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 0.9375rem; font-weight: 600; }
.jumpbox .field { width: auto; min-height: 2.25rem; padding: 0 0.6em; font-size: 0.9375rem; font-weight: 400; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; font-size: 0.9375rem; color: var(--ink); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend .bicon { width: 18px; height: 18px; }
.perms { display: none; }

/* ---------- a topic ---------- */

.topic-head { margin: 0 0 14px; }
.topic-title { font: 600 clamp(1.5rem, 1.2rem + 1.3vw, 2rem)/1.2 var(--sans); letter-spacing: -0.012em; text-wrap: balance; }
.topic-title a { color: var(--ink); }
.topic-title a:hover { text-decoration: none; }
.topic-title .tag { vertical-align: 0.3em; }
.topic-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-top: 6px; font-size: 0.9375rem; color: var(--ink-2); }
.topic-info form { display: inline; }
.topic-info .linklike { font-weight: 600; }
.short { margin-top: 12px; max-width: 50rem; padding: 12px 16px 14px; background: var(--box); border: 1px solid var(--edge); border-left: 4px solid var(--marker); border-radius: var(--r); }
.short h3 { margin-bottom: 4px; font: 600 0.9375rem/1.3 var(--sans); color: var(--ink-2); }
.short p { font: 400 1.125rem/1.65 var(--read); }
.short mark { color: var(--marker-ink); background: var(--marker); padding: 0.06em 0.2em; -webkit-box-decoration-break: clone; box-decoration-break: clone; border-radius: 0.14em; }

.modbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; padding: 9px 12px; background: var(--box-alt); border: 1px dashed var(--field-line); border-radius: var(--r); font-size: 0.9375rem; }
.modbar b { margin-right: 4px; }
.modbar form { display: inline-flex; gap: 6px; align-items: center; }
.modbar .field { width: auto; min-height: 2.25rem; padding: 0 0.6em; font-size: 0.9375rem; }

.posts { margin-bottom: 12px; }
.post { position: relative; display: grid; grid-template-columns: 11rem minmax(0, 1fr); margin: 0 0 12px; background: var(--box); border: 1px solid var(--edge); border-radius: var(--r); overflow: hidden; scroll-margin-top: 12px; }
.post::before { content: ""; position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; pointer-events: none; }
.post.unread { border-color: color-mix(in srgb, var(--ink) 35%, var(--edge)); }
.post.unread::before { background: var(--marker); }
.post:target, :root[data-spotlight="on"] .post.current { outline: 3px solid var(--ink-2); outline-offset: -1px; }
.post-author { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 14px 14px 16px; background: var(--side); border-right: 1px solid var(--edge-soft); font-size: 0.9375rem; color: var(--ink-2); }
.post.unread .post-author { padding-left: 20px; }
.post-author .avatar { order: -1; margin-bottom: 8px; }
.post-author .name { font-size: 1.0625rem; line-height: 1.3; }
.post-author .rank { display: block; }
.post-author dl { margin-top: 8px; display: grid; grid-template-columns: auto 1fr; gap: 1px 6px; font-size: 0.875rem; color: var(--ink); }
.post-author dt { color: var(--ink-2); }
.op-tag { order: 5; margin-top: 8px; }
.avatar { display: block; width: 60px; height: 60px; padding: 8px; background: var(--box); border: 1px solid var(--edge); border-radius: 3px; shape-rendering: crispEdges; }
.avatar.small { display: inline-block; width: 24px; height: 24px; padding: 3px; margin: 0 6px 0 0; border-radius: 3px; vertical-align: middle; }

.post-main { display: flex; flex-direction: column; min-width: 0; padding: 10px 18px 14px; }
.post-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--edge-soft); font-size: 0.9375rem; color: var(--ink-2); }
.post-top a { color: var(--ink-2); }
.post-top .num { font-weight: 600; font-variant-numeric: tabular-nums; }
.post-top .newcount { margin-left: 10px; }
.post-body { flex: 1; max-width: 46rem; font: 400 1.0625rem/1.65 var(--read); }
.post-edited { margin-top: 12px; font-size: 0.875rem; font-style: italic; color: var(--ink-2); }
.post-sig { margin-top: 16px; padding-top: 8px; max-width: 46rem; border-top: 1px dashed var(--edge); font-size: 0.875rem; color: var(--ink-2); }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--edge-soft); }
.post-actions form { display: inline-flex; }
.post-actions .btn { min-height: 2.125rem; font-size: 0.875rem; }
.post-actions .totop { order: 9; margin-left: auto; font-size: 0.875rem; font-weight: 600; }

.prose > * + * { margin-top: 0.85em; }
.prose a { text-decoration: underline; text-underline-offset: 0.16em; }
.prose blockquote { margin: 1em 0; padding: 9px 14px 11px; background: var(--box-alt); border: 1px solid var(--edge); border-left: 4px solid var(--field-line); border-radius: var(--r-small); font-size: 0.9375em; }
.prose blockquote cite { display: block; margin-bottom: 3px; font: 600 0.875rem/1.4 var(--sans); font-style: normal; color: var(--ink); }
.prose pre { margin: 1em 0; padding: 10px 12px; font: 0.875rem/1.5 var(--mono); border: 1px solid var(--edge); border-radius: var(--r-small); overflow-x: auto; background: var(--box-alt); color: var(--code); }
.prose ul { margin: 0.85em 0; padding-left: 1.4em; list-style: disc; }
.prose li + li { margin-top: 0.3em; }
.post-body.clipped { max-height: 22rem; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.more { align-self: flex-start; margin-top: 10px; }

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

.form { display: grid; gap: 16px; max-width: 48rem; }
.form.narrow { max-width: 28rem; }
.form label, .form legend { display: block; margin-bottom: 5px; font: 600 1rem/1.3 var(--sans); }
.form .hint { margin-top: 5px; }
.form fieldset { margin: 0; padding: 0; border: 0; }
.form .check { display: flex; gap: 8px; align-items: baseline; font-weight: 400; }
.form .check input { flex: none; width: 1.1em; height: 1.1em; accent-color: var(--link); }
.form .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
main > .form { padding: 18px; background: var(--box); border: 1px solid var(--edge); border-radius: var(--r); }
.field { width: 100%; min-height: 2.75rem; font: 400 1rem/1.4 var(--sans); color: var(--ink); background: var(--field); border: 1px solid var(--field-line); border-radius: var(--r-small); padding: 0.55em 0.75em; }
.field:focus { outline: 3px solid color-mix(in srgb, var(--link) 35%, transparent); outline-offset: 0; border-color: var(--link); }
textarea.field { min-height: 12rem; resize: vertical; display: block; line-height: 1.6; font-family: var(--read); font-size: 1.0625rem; }
textarea.field.low { min-height: 6rem; }
select.field { width: auto; max-width: 100%; }
.hp { position: absolute; left: -9999px; }
.editor-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.editor-tools button { min-width: 2.25rem; padding: 0 0.6em; }
.draft-note { font-size: 0.9375rem; color: var(--ink-2); }
.preview { margin-top: 10px; padding: 12px 16px; border: 1px dashed var(--field-line); border-radius: var(--r-small); background: var(--box); font: 400 1.0625rem/1.65 var(--read); }
.excerpt { margin-bottom: 16px; max-width: 48rem; }
.reply-box { margin-top: 16px; }
.reply-box .form { max-width: none; }
.pagebody { max-width: 48rem; padding: 16px 20px; background: var(--box); border: 1px solid var(--edge); border-radius: var(--r); font-size: 1.0625rem; line-height: 1.65; }
.pagebody.prose ul { padding-left: 1.4em; }
.back-link { margin: 14px 0 0; font-weight: 600; }

.profile { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0; background: var(--box); border: 1px solid var(--edge); border-radius: var(--r); overflow: hidden; }
.profile > div { padding: 14px 18px 18px; }
.profile .post-author { border-right: 1px solid var(--edge-soft); }
.profile .bio { margin: 8px 0; max-width: 46rem; font-size: 1.0625rem; }
.profile .panel { margin: 16px 0 0; }
.listing li { padding: 10px 0; border-top: 1px solid var(--edge-soft); }
.listing li:first-child { border-top: 0; padding-top: 2px; }
.fine { font-size: 0.875rem; color: var(--ink-2); }

.setup { max-width: 46rem; }
.setup .page-intro { margin-bottom: 14px; }
.setup .form { margin: 0 0 12px; }

/* ---------- reading aids ---------- */

.progress { position: fixed; inset: 0 0 auto 0; height: 5px; z-index: 30; display: none; background: var(--bar); }
.progress i { display: block; height: 100%; width: 0; background: var(--ink); }
.where { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 30; display: none; gap: 6px; align-items: center; padding: 5px 5px 5px 14px; background: var(--box); border: 1px solid var(--field-line); border-radius: 999px; box-shadow: 0 2px 8px rgb(0 0 0 / 0.08); font: 600 0.9375rem/1 var(--sans); font-variant-numeric: tabular-nums; }
.where button { width: 2.375rem; height: 2.375rem; font: 600 1rem/1 var(--sans); border-radius: 50%; border: 1px solid var(--edge); background: var(--box-alt); color: var(--ink); cursor: pointer; }
.where button:hover { border-color: var(--field-line); }

/* ---------- display options dialog ---------- */

.options { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--edge); border-radius: var(--r); background: var(--box); color: var(--ink); font: 400 1rem/1.5 var(--sans); box-shadow: 0 20px 60px rgb(0 0 0 / 0.2); }
.options::backdrop { background: rgb(20 24 27 / 0.5); }
.options-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; position: sticky; top: 0; z-index: 1; background: var(--bar); border-bottom: 1px solid var(--edge); }
.options-head h2 { font: 600 1.125rem/1.2 var(--sans); color: var(--bar-text); }
.options-body { padding: 2px 16px 16px; }
.opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; align-items: center; padding: 12px 0; border-top: 1px solid var(--edge-soft); }
.opt:first-child { border-top: 0; }
.opt > div:first-child > b { display: block; }
.opt small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 0.9375rem; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--field-line); border-radius: var(--r-small); overflow: hidden; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 0.5em 0.8em; font: 600 0.9375rem/1.2 var(--sans); background: var(--box); border-left: 1px solid var(--edge); }
.seg label:first-child span { border-left: 0; }
.seg label:hover span { background: var(--box-hover); }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 3px solid var(--link); outline-offset: -3px; }
.seg .f-dys { font-family: "OpenDyslexic", sans-serif; font-weight: 400; }
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--box-alt); border: 1px solid var(--field-line); transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--field-line); transition: left 0.15s; }
.switch input:checked + span { background: var(--ink); border-color: var(--ink); }
.switch input:checked + span::after { left: 23px; background: var(--paper); }
.switch input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 2px; }
.keys { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--edge-soft); color: var(--ink-2); font-size: 0.9375rem; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.options-foot { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 0.9375rem; color: var(--ink-2); }
kbd { display: inline-block; min-width: 1.6em; text-align: center; font: 600 0.8125rem/1 var(--sans); padding: 3px 5px; border: 1px solid var(--field-line); border-bottom-width: 2px; border-radius: 4px; color: var(--ink); background: var(--box); }

/* ---------- preferences that apply in both views ---------- */

:root[data-avatars="off"] .avatar { display: none; }
:root[data-sigs="off"] .post-sig { display: none; }
:root[data-counts="off"] .grid .c-num,
:root[data-counts="off"] .post-author dl,
:root[data-counts="off"] .stats-panel,
:root[data-counts="off"] .item-meta .count,
:root[data-counts="off"] .bar-row .pagination { display: none; }
:root[data-spacing="relaxed"] .post-body,
:root[data-spacing="relaxed"] .short p,
:root[data-spacing="relaxed"] .preview,
:root[data-spacing="relaxed"] .pagebody { line-height: 1.95; letter-spacing: 0.012em; word-spacing: 0.06em; }
:root[data-spotlight="on"] .post { transition: opacity 0.15s; }
:root[data-spotlight="on"] .posts.has-current .post:not(.current) { opacity: 0.4; }
:root[data-spotlight="on"] .posts.has-current .post:not(.current):hover { opacity: 0.85; }

/* ---------- FOCUS VIEW ----------
   One column, bigger type, no boxes inside the conversation. Same pages, same links, same colours. */

:root[data-view="focus"] .wrap { max-width: calc(var(--measure) + 2 * var(--pad)); }
:root[data-view="focus"] .only-classic,
:root[data-view="focus"] .board-foot,
:root[data-view="focus"] .legend,
:root[data-view="focus"] .jumpbox,
:root[data-view="focus"] .post-author dl,
:root[data-view="focus"] .post-author .rank,
:root[data-view="focus"] .post-sig,
:root[data-view="focus"] .colophon .note { display: none; }
:root[data-view="focus"] .only-focus { display: inline; }
:root[data-view="focus"] p.only-focus { display: block; }
:root[data-view="focus"] .masthead { padding: 12px 14px; }
:root[data-view="focus"] .wordmark { font-size: 1.5rem; }
:root[data-view="focus"] .site-title .section { font-size: 1.125rem; }
:root[data-view="focus"] .progress { display: block; }
:root[data-view="focus"] .where.on { display: flex; }
:root[data-view="focus"] .bar-row .pager { margin-left: auto; }

/* lists become plain stacks of titles */
:root[data-view="focus"] .forumbg { margin-bottom: 20px; }
:root[data-view="focus"] .grid,
:root[data-view="focus"] .grid thead,
:root[data-view="focus"] .grid tbody,
:root[data-view="focus"] .grid tr,
:root[data-view="focus"] .grid th,
:root[data-view="focus"] .grid td { display: block; width: auto; }
:root[data-view="focus"] .grid th { display: none; }
:root[data-view="focus"] .grid th.c-main { display: block; }
:root[data-view="focus"] .grid td { border: 0; padding: 0; background: none !important; }
:root[data-view="focus"] .grid .c-icon,
:root[data-view="focus"] .grid .c-num,
:root[data-view="focus"] .grid .c-last { display: none; }
:root[data-view="focus"] .grid tbody tr { position: relative; padding: 14px 16px 14px 42px; border-top: 1px solid var(--edge-soft); }
:root[data-view="focus"] .grid tbody tr:first-child { border-top: 0; }
:root[data-view="focus"] .grid tbody tr:nth-child(even) { background: var(--box-alt); }
:root[data-view="focus"] .grid tbody tr:has(.empty) { padding-left: 16px; }
:root[data-view="focus"] .grid tbody tr::before { content: ""; position: absolute; left: 16px; top: 1.3em; width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--ink-2); background: var(--box); }
:root[data-view="focus"] .grid tbody tr.unread::before { background: var(--marker); border-color: var(--ink); }
:root[data-view="focus"] .grid tbody tr:has(.empty)::before { content: none; }
:root[data-view="focus"] .item-title { font-size: 1.25rem; }
:root[data-view="focus"] .item-desc { margin-top: 4px; font-size: 1.0625rem; }
:root[data-view="focus"] .item-short { display: block; margin-top: 6px; font: 400 1.0625rem/1.6 var(--read); color: var(--ink); }
:root[data-view="focus"] .item-meta { margin-top: 6px; }

/* a topic reads like an article with replies under it */
:root[data-view="focus"] .short p { font-size: 1.1875rem; line-height: 1.7; }
:root[data-view="focus"] .posts { background: var(--box); border: 1px solid var(--edge); border-radius: var(--r); overflow: hidden; }
:root[data-view="focus"] .post { display: block; margin: 0; padding: 20px 22px 18px; border: 0; border-top: 1px solid var(--edge); border-radius: 0; overflow: visible; background: none; }
:root[data-view="focus"] .post:first-child { border-top: 0; }
:root[data-view="focus"] .post.current::before { background: var(--ink); width: 3px; }
:root[data-view="focus"] .post-author { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 10px; padding: 0; background: none; border: 0; font-size: 1rem; }
:root[data-view="focus"] .post.unread .post-author { padding-left: 0; }
:root[data-view="focus"] .post-author .avatar { width: 34px; height: 34px; padding: 4px; margin: 0; border-radius: 3px; }
:root[data-view="focus"] .op-tag { order: 3; margin: 0; }
:root[data-view="focus"] .post-main { padding: 0; }
:root[data-view="focus"] .post-top { margin: 4px 0 12px 44px; padding: 0; border: 0; }
:root[data-view="focus"] .post-top .num { display: none; }
:root[data-view="focus"][data-avatars="off"] .post-top { margin-left: 0; }
:root[data-view="focus"] .post-body { max-width: none; font: 400 1.1875rem/1.7 var(--read); }
:root[data-view="focus"] .post-actions { padding-top: 0; border-top: 0; }
:root[data-view="focus"] .profile { grid-template-columns: 1fr; }
:root[data-view="focus"] .profile .post-author { padding: 14px 18px 0; }

/* ---------- medium screens ---------- */

@media (max-width: 1000px) {
  .grid .c-num + .c-num { display: none; }
  .grid .c-last { width: 13rem; }
  .post { grid-template-columns: 9.5rem minmax(0, 1fr); }
}

/* ---------- small screens: rows stack, authors sit in a strip above their posts ---------- */

@media (max-width: 760px) {
  .only-narrow { display: flex; }
  .wrap { padding-top: 10px; }
  .masthead { padding: 12px 14px; }
  .wordmark { font-size: 1.5rem; }
  .site-title .section { font-size: 1.125rem; }
  .site-desc, .head-search { display: none; }
  .tool { min-height: 2.75rem; padding: 0 0.75em; }

  /* the menu bar scrolls sideways instead of wrapping into a block */
  .navbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 4px; gap: 0 12px; }
  .navbar::-webkit-scrollbar { display: none; }
  .navbar ul { flex-wrap: nowrap; }
  .navbar li { white-space: nowrap; }
  .navbar .me .avatar { display: none; }

  .grid, .grid thead, .grid tbody, .grid tr, .grid th, .grid td { display: block; width: auto; }
  .grid th { display: none; }
  .grid th.c-main { display: block; }
  .grid td { border: 0; padding: 0; background: none !important; }
  .grid tbody tr { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 8px; padding: 12px 12px; border-top: 1px solid var(--edge-soft); }
  .grid tbody tr:first-child { border-top: 0; }
  .grid tbody tr:nth-child(even) { background: var(--box-alt); }
  .grid td.c-icon { width: auto; padding-top: 2px; }
  .grid td.c-main { padding: 0; }
  .grid .c-num, .grid .c-last { display: none; }
  .grid tbody tr:has(.empty) { display: block; }
  .item-title { font-size: 1.0625rem; }
  .minipages { display: none; }
  .item-meta.only-focus, .item-meta .only-focus { display: inline; }
  p.item-meta.only-focus { display: block; }

  .bar-row .pagination { display: none; }
  .bar-row .pager { margin-left: auto; }

  .post { display: block; }
  .post-author { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 10px; padding: 9px 12px; border-right: 0; border-bottom: 1px solid var(--edge-soft); }
  .post.unread .post-author { padding-left: 18px; }
  .post-author .avatar { width: 34px; height: 34px; padding: 4px; margin: 0; border-radius: 3px; }
  .post-author .rank { font-size: 0.875rem; }
  .post-author dl { display: none; }
  .op-tag { order: 3; margin: 0; }
  .post-main { padding: 10px 12px 12px; }
  .post.unread .post-main { padding-left: 18px; }
  .post-actions .totop { display: none; }
  .post-actions .btn { min-height: 2.5rem; padding: 0 0.9em; }
  :root[data-view="focus"] .post { padding: 16px 14px 14px; }
  :root[data-view="focus"] .post.unread .post-main { padding-left: 0; }

  .below { flex-direction: column; align-items: flex-start; }
  .jumpbox { margin-left: 0; }
  .profile { grid-template-columns: 1fr; }
  .profile .post-author { border-right: 0; }
  .opt { grid-template-columns: 1fr; }
  .panel { padding: 12px 14px 14px; }
  .panel h3 { margin: -12px -14px 10px; padding: 9px 14px; }
  main > .form { padding: 14px; }
  .form .actions .button { flex: 1 1 auto; }
  .stat-block { border-left: 0; }
}

@media (max-width: 420px) {
  .tools { width: 100%; }
  .tools .tool { flex: 1 1 0; }
}

@media (pointer: coarse) {
  .btn, .editor-tools button, .pager a, .pager span { min-height: 2.75rem; min-width: 2.75rem; }
}

@media print {
  .tools, .navbar, .post-actions, .reply-box, .where, .progress, .modbar, .below, .bar-row, .footbar { display: none !important; }
  body { background: #fff; }
}

/* ======================================================================
   Page tints, chosen by each reader. Light mode only, except high contrast.
   ====================================================================== */

:root:not([data-theme="dark"])[data-tint="blue"] { --paper: #eef2f5; --box: #f8fafc; --box-alt: #ebf1f6; --box-hover: #e0e9f0; --bar: #d5e1eb; --side: #e8eff5; --edge: #a8bccc; --edge-soft: #d3dfe8; }
:root:not([data-theme="dark"])[data-tint="green"] { --paper: #eff3ec; --box: #f9fbf6; --box-alt: #edf3e7; --box-hover: #e2ebda; --bar: #d6e4ca; --side: #e9f0e1; --edge: #aec59f; --edge-soft: #d6e3cc; }
:root:not([data-theme="dark"])[data-tint="peach"] { --paper: #f7f2ed; --box: #fffaf5; --box-alt: #fbefe4; --box-hover: #f6e4d5; --bar: #f2dbc6; --side: #f9ebde; --edge: #d9b699; --edge-soft: #ecdac8; }
:root:not([data-theme="dark"])[data-tint="contrast"] { --paper: #ffffff; --ink: #000000; --ink-2: #1a1a1a; --box: #ffffff; --box-alt: #f0f0f0; --box-hover: #e4e4e4; --bar: #e4e4e4; --bar-text: #000000; --side: #f0f0f0; --edge: #000000; --edge-soft: #8a8a8a; --link: #0030c0; --field-line: #000000; }
:root[data-theme="dark"][data-tint="contrast"] { --paper: #000000; --ink: #ffffff; --ink-2: #e8e8e8; --box: #000000; --box-alt: #121212; --box-hover: #1f1f1f; --bar: #1f1f1f; --bar-text: #ffffff; --side: #121212; --edge: #ffffff; --edge-soft: #6e6e6e; --link: #b8c6ff; --field-line: #ffffff; }

/* small colour samples for the tint choices: fixed colours, whatever tint is active */
.sw-cream { --s1: #fffdf6; --s2: #ebe2c3; }
.sw-blue { --s1: #f8fafc; --s2: #d5e1eb; }
.sw-green { --s1: #f9fbf6; --s2: #d6e4ca; }
.sw-peach { --s1: #fffaf5; --s2: #f2dbc6; }
.sw-contrast { --s1: #ffffff; --s2: #000000; }
.seg .dot { display: inline-block; width: 0.8em; height: 0.8em; margin-right: 0.4em; border-radius: 50%; vertical-align: -0.05em; background: linear-gradient(135deg, var(--s1) 50%, var(--s2) 50%); border: 1px solid var(--field-line); }

/* ---------- pictures ---------- */

img.avatar.photo { padding: 0; object-fit: cover; background: var(--box-alt); }
.post-author img.avatar.photo { width: 60px; height: 60px; }

/* ---------- signing up and logging in ---------- */

.journey { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 10px; font-size: 0.9375rem; color: var(--ink-2); }
.journey li { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 5px; background: var(--box); border: 1px solid var(--edge); border-radius: var(--r-small); }
.journey b { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--bar); color: var(--bar-text); font-size: 0.875rem; }
.journey .now { color: var(--ink); font-weight: 600; border-color: var(--field-line); }
.journey .now b { background: var(--ink); color: var(--paper); }
.journey-of { display: none; font-weight: 400; color: var(--ink-2); }

.signup { display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); gap: 16px; align-items: start; }
.signup .panel { margin: 0; }
.signup-form .form { max-width: none; }
.signup-switch { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--edge-soft); }
.signup-why { background: var(--box-alt); }
.ticks li { position: relative; padding: 0 0 12px 26px; }
.ticks li::before { content: none; }
.ticks li::after { content: ""; position: absolute; left: 5px; top: 0.3em; width: 6px; height: 11px; border: solid var(--ink-2); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.note-line { margin-bottom: 14px; padding: 10px 14px; background: var(--box-alt); border: 1px solid var(--edge); border-left: 4px solid var(--link); border-radius: var(--r-small); }
.button.google { width: 100%; gap: 12px; color: var(--ink); background: var(--field); border-color: var(--field-line); }
.button.google:hover { color: var(--ink); background: var(--box-hover); }
.g-mark { width: 20px; height: 20px; flex: none; }
.signup-form > .hint { margin-top: 6px; }
.or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--ink-2); font-size: 0.9375rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--edge); }

/* ---------- welcome questions ---------- */

.welcome { max-width: 52rem; }
.welcome .panel h2 { margin: -14px -18px 14px; padding: 11px 18px; background: var(--bar); border-bottom: 1px solid var(--edge); border-radius: var(--r) var(--r) 0 0; font: 600 1.25rem/1.3 var(--sans); color: var(--bar-text); }
.welcome .panel h2:focus { outline: none; }
.welcome .panel .hint { margin: 0 0 12px; }
.welcome .step > h2 + .opt { border-top: 0; padding-top: 0; }
.welcome .sub { margin: 18px 0 8px; font: 600 1.0625rem/1.3 var(--sans); }
.optional { font-weight: 400; color: var(--ink-2); }
.steps-meter { display: none; align-items: center; gap: 12px; margin-top: 12px; font-weight: 600; font-size: 0.9375rem; }
.steps-meter i { flex: 1; height: 8px; background: var(--box); border: 1px solid var(--edge); border-radius: 999px; overflow: hidden; }
.steps-meter b { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.2s; }
.has-steps .steps-meter { display: flex; }
.wizard-nav { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--paper) 30%); }
.wizard-nav [data-wizard] { display: none; }
.has-steps .wizard-nav [data-wizard]:not([hidden]) { display: inline-flex; }
.wizard-nav .skip-rest { margin-left: auto; font-weight: 600; }

.cards { display: grid; gap: 10px; margin-bottom: 12px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.tints { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--box); border: 1px solid var(--edge); border-radius: var(--r); cursor: pointer; }
.card:hover { background: var(--box-hover); }
.card input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.card:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--box); }
.card:has(input:checked)::after { content: ""; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink) no-repeat center / 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.card:has(input:focus-visible) { outline: 3px solid var(--link); outline-offset: 2px; }
.card b { font-size: 1rem; }
.card small { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.4; }

.mock { display: grid; gap: 5px; height: 92px; margin-bottom: 6px; padding: 8px; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--r-small); }
.mock i { display: block; border-radius: 3px; }
.mock-board { grid-template-rows: 14px repeat(3, 1fr); }
.mock-board i { background: var(--box-alt); border: 1px solid var(--edge); }
.mock-board i:first-child { background: var(--bar); }
.mock-focus { grid-template-rows: 10px 1fr 1fr; padding: 8px 22%; }
.mock-focus i { background: var(--box); border: 1px solid var(--edge-soft); }
.mock-focus i:first-child { background: var(--ink-2); border: 0; width: 70%; }

.swatch { display: grid; grid-template-rows: 1fr 2fr; height: 54px; margin-bottom: 4px; border: 1px solid var(--field-line); border-radius: var(--r-small); overflow: hidden; }
.swatch i:first-child { background: var(--s2); }
.swatch i:last-child { background: var(--s1); }
.sample { display: block; min-height: 3.4em; padding-right: 26px; margin-bottom: 4px; font-size: 1.0625rem; line-height: 1.5; color: var(--ink); }
.f-sans { font-family: "Atkinson Hyperlegible Next", Verdana, sans-serif; }
.f-serif { font-family: "Literata", Georgia, serif; }
.f-dyslexic { font-family: "OpenDyslexic", "Comic Sans MS", sans-serif; font-size: 0.95rem; }

/* ---------- choosing a picture ---------- */

.avatar-pick { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-start; }
.avatar-pick > div:last-child { flex: 1 1 18rem; }
.avatar-now .avatar { width: 96px; height: 96px; }
.avatar-now svg.avatar { padding: 12px; }
.avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file-button:has(input:focus-visible) { outline: 3px solid var(--link); outline-offset: 2px; }

.me-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
.me-links a, .me-links .linklike { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 0.9em; background: var(--box-alt); border: 1px solid var(--edge); border-radius: var(--r-small); font-weight: 600; }
.me-links .linklike { color: var(--warn); }
.me-links a:hover, .me-links .linklike:hover { background: var(--box-hover); text-decoration: none; }
.actions-row { margin-top: 10px; }
.signed-google { margin: -8px 0 16px; }

.install p + p, .install ol { margin-top: 8px; }
.install ol { padding-left: 1.3em; list-style: decimal; }
.install li + li { margin-top: 4px; }
.opt-wide { grid-template-columns: 1fr; }
.opt-wide .seg { justify-self: start; }

/* ---------- the phone tab bar ---------- */

.tabbar { display: none; }

@media (max-width: 760px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .masthead { border-bottom: 1px solid var(--edge); border-radius: var(--r); }
  .navbar { display: none; }
  .crumbs { margin-top: 12px; }
  .tabbar { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px max(4px, env(safe-area-inset-left, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-right, 0px)); background: var(--box); border-top: 1px solid var(--edge); box-shadow: 0 -2px 10px rgb(0 0 0 / 0.06); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border-radius: var(--r-small); color: var(--ink-2); font-size: 0.8125rem; font-weight: 600; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a[aria-current] { color: var(--ink); background: var(--bar); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .tab-avatar { display: block; width: 26px; height: 26px; }
  .tabbar .tab-avatar .avatar { width: 26px; height: 26px; padding: 3px; border-radius: 3px; }
  .tabbar .tab-avatar img.avatar { padding: 0; }
  .tabbar .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 1.4rem; padding: 1px 5px; font-size: 0.75rem; line-height: 1.25; text-align: center; color: var(--marker-ink); background: var(--marker); border: 0; border-radius: 999px; }
  .where { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }

  .signup { grid-template-columns: 1fr; }
  .cards.two { grid-template-columns: 1fr 1fr; }
  .cards.three { grid-template-columns: 1fr; }
  .cards.tints { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mock { height: 72px; }
  .welcome .panel h2 { margin: -12px -14px 12px; padding: 10px 14px; font-size: 1.125rem; }
  .wizard-nav { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); padding-bottom: 10px; }
  .wizard-nav .skip-rest { margin-left: 0; flex-basis: 100%; }
  .wizard-nav .button { flex: 1 1 auto; }
  .journey li:not(.now) { display: none; }
  .journey-of { display: inline; }
}

/* inside the installed app there is no browser bar, so leave room for the phone's status bar */
.is-app body { padding-top: env(safe-area-inset-top, 0px); }

/* ======================================================================
   Forum pictures: a calm tile that turns yellow when there is something new.
   ====================================================================== */

.ficon { position: relative; display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; color: var(--ink-2); background: var(--box); border: 1px solid var(--edge); border-radius: 4px; line-height: 0; vertical-align: middle; }
.ficon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.unread .ficon { color: var(--marker-ink); background: var(--marker); border-color: color-mix(in srgb, var(--ink) 28%, var(--marker)); }
.ficon-lock { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 20px; height: 20px; background: var(--box); border: 1px solid var(--ink-2); border-radius: 50%; }
.ficon-lock svg { width: 12px; height: 12px; stroke-width: 2.2; }
.grid.forums .c-icon { width: 64px; }
.grid.forums td.c-icon { padding-left: 12px; }
.page-title.with-icon { display: flex; align-items: center; gap: 12px; }
.page-title .ficon { width: 40px; height: 40px; }
.page-title .ficon svg { width: 23px; height: 23px; }

/* admin: choosing a forum's picture */
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 6px; }
.icon-choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; margin: 0 !important; white-space: normal !important; text-align: center; border: 1px solid transparent; border-radius: var(--r-small); cursor: pointer; }
.icon-choice:hover { background: var(--box-hover); }
.icon-choice input { position: absolute; opacity: 0; }
.icon-choice:has(input:checked) { border-color: var(--ink); background: var(--box-alt); }
.icon-choice:has(input:checked) .ficon { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.icon-choice:has(input:focus-visible) { outline: 3px solid var(--link); outline-offset: 1px; }
.icon-choice small { font-size: 0.8125rem; line-height: 1.2; color: var(--ink-2); }
.ficon.none { background: repeating-linear-gradient(45deg, var(--box-alt) 0 6px, var(--box) 6px 12px); }

/* Focus view keeps the pictures: they are how people recognise a forum at a glance */
:root[data-view="focus"] .grid.forums tbody tr { padding-left: 70px; min-height: 76px; }
:root[data-view="focus"] .grid.forums tbody tr:has(.ficon)::before { content: none; }
:root[data-view="focus"] .grid.forums td.c-icon:has(.ficon) { display: block; position: absolute; left: 14px; top: 16px; padding: 0; }
:root[data-view="focus"] .grid.forums tbody tr:not(:has(.ficon)) { padding-left: 42px; }

@media (max-width: 760px) {
  .grid.forums tbody tr { grid-template-columns: 48px minmax(0, 1fr); gap: 0 10px; }
  .grid.forums td.c-icon { padding: 0; }
  .ficon { width: 36px; height: 36px; }
  .page-title .ficon { width: 36px; height: 36px; }
}

/* ======================================================================
   Topic flair: quiet coloured labels. Never yellow, which means "new".
   ====================================================================== */

.fl-slate { --fc: #4f5b63; } .fl-blue { --fc: #2d5a8a; } .fl-green { --fc: #2f6e4c; } .fl-teal { --fc: #1f6b6b; }
.fl-plum { --fc: #6e4577; } .fl-rose { --fc: #983e54; } .fl-rust { --fc: #974d29; } .fl-olive { --fc: #5c6623; }
.fl-all, .fl-none { --fc: var(--ink-2); }
:root[data-theme="dark"] .fl-slate { --fc: #b6c0c7; } :root[data-theme="dark"] .fl-blue { --fc: #9fc2ea; } :root[data-theme="dark"] .fl-green { --fc: #95d0ab; } :root[data-theme="dark"] .fl-teal { --fc: #8ed1cf; }
:root[data-theme="dark"] .fl-plum { --fc: #d4abde; } :root[data-theme="dark"] .fl-rose { --fc: #eca6b7; } :root[data-theme="dark"] .fl-rust { --fc: #e9b192; } :root[data-theme="dark"] .fl-olive { --fc: #c9d18c; }
:root[data-tint="contrast"] .flair { --fc: var(--ink); }

.flair { display: inline-block; margin-right: 8px; padding: 0.12em 0.5em 0.16em; font: 600 0.8125rem/1.2 var(--sans); color: var(--fc); background: color-mix(in srgb, var(--fc) 10%, var(--box)); border: 1px solid color-mix(in srgb, var(--fc) 32%, var(--box)); border-radius: 2px; white-space: nowrap; vertical-align: 0.14em; }
a.flair:hover { text-decoration: none; border-color: var(--fc); }
.topic-title .flair { font-size: 0.875rem; vertical-align: 0.3em; }

.flair-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 2px; }
.flair-filter > span { margin-right: 4px; font-size: 0.9375rem; font-weight: 600; color: var(--ink-2); }
.flair-filter .flair { margin: 0; padding: 0.35em 0.65em; font-size: 0.875rem; vertical-align: baseline; }
.flair-filter .flair[aria-current] { color: var(--box); background: var(--fc); border-color: var(--fc); }
.page-intro + .flair-filter + .bar-row, .flair-filter + .bar-row { margin-top: 14px; }

.flair-pick { margin: 0; padding: 0; border: 0; }
.flair-pick legend { margin-bottom: 2px; }
.flair-pick .hint { margin: 0 0 8px; }
.flair-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 6px; }
.flair-option { position: relative; display: flex !important; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0 !important; padding: 9px 10px; font-weight: 400 !important; background: var(--box); border: 1px solid var(--edge); border-radius: var(--r-small); cursor: pointer; }
.flair-option:hover { background: var(--box-hover); }
.flair-option input { position: absolute; opacity: 0; }
.flair-option .flair { margin: 0; }
.flair-option small { font-size: 0.875rem; line-height: 1.35; color: var(--ink-2); }
.flair-option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.flair-option:has(input:focus-visible) { outline: 3px solid var(--link); outline-offset: 2px; }

.flair-table td { vertical-align: middle; }
.flair-table .flair { margin: 0; }

/* the label's promise, said to the people replying */
.reply-note { margin: 0 0 12px; padding: 10px 14px; font-size: 0.9688rem; line-height: 1.5; color: var(--ink); background: color-mix(in srgb, var(--fc) 7%, var(--box)); border: 1px solid color-mix(in srgb, var(--fc) 28%, var(--box)); border-left: 4px solid var(--fc); border-radius: var(--r-small); }
.reply-note b { color: var(--fc); }
main > .reply-note { max-width: 48rem; }
.flair-texts label { display: block; margin: 0 0 2px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.flair-texts input + label { margin-top: 6px; }
