/* Valerian. A dark theme plus "Legacy styling" (semi-light gray, diamond blue, tan), one radius scale
   (8px controls, 14px surfaces, 20px bands). Every colour is a token so the two themes stay in step. */

:root {
  --bg: #09090b;
  --bg-1: #0d0d10;
  --bg-2: #121216;
  --bg-3: #1a1a20;
  --bg-4: #24242c;
  --fg: #f2f2ef;
  --fg-2: #b1b1ba;
  --fg-3: #8d8d98;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --acc: #c6ff3d;
  --acc-ink: #0b0d05;
  --acc-soft: rgba(198, 255, 61, 0.12);
  --acc-hover: #d4ff6a;
  --acc-line: rgba(198, 255, 61, 0.6);
  --acc-text: var(--acc);                 /* accent used as text, icons or outlines */
  --acc-2: var(--acc);                    /* second accent; tan in Legacy styling */
  --acc-2-soft: var(--acc-soft);

  --nav-bg: rgba(9, 9, 11, 0.78);
  --tint: rgba(255, 255, 255, 0.015);
  --shimmer: rgba(255, 255, 255, 0.05);
  --fg-rich: #dedee3;
  --fg-prose: #d4d4da;
  --staff-bg: #12161c;
  --foot-mark: #131317;
  --thumb-hover: #33333d;
  --backdrop: rgba(0, 0, 0, 0.62);
  --key-bg: var(--bg-4);
  --key-fg: var(--fg-2);
  /* Background canvas, as r,g,b triplets read by core.js */
  --canvas-dot: 255, 255, 255;
  --canvas-dot-a: 0.055;
  --canvas-acc: 198, 255, 61;
  --canvas-acc-2: 198, 255, 61;

  /* Semantic colours: states only, never decoration. */
  --ok: #5fd38d;
  --ok-soft: rgba(95, 211, 141, 0.12);
  --warn: #f2b64c;
  --warn-soft: rgba(242, 182, 76, 0.12);
  --err: #ff7a7a;
  --err-soft: rgba(255, 122, 122, 0.12);
  --info: #86bdff;
  --info-soft: rgba(134, 189, 255, 0.12);

  --r-ctl: 8px;
  --r-surface: 14px;
  --r-band: 20px;

  --display: 'Archivo', system-ui, sans-serif;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --wrap: 1200px;
  --pad: clamp(18px, 4vw, 44px);
  --shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.35);
  --drawer-shadow: -24px 0 48px -12px rgba(0, 0, 0, 0.6);
}

/* Legacy styling: a soft gray (never bright white), diamond blue in place of the green, tan accents. */
html[data-theme='legacy'] {
  color-scheme: only light;
  --bg: #c9ccd1;
  --bg-1: #d2d5d9;
  --bg-2: #d6d9dd;
  --bg-3: #c1c5cb;
  --bg-4: #b3b8c0;
  --fg: #16191e;
  --fg-2: #383d45;
  --fg-3: #535963;
  --line: rgba(22, 25, 30, 0.1);
  --line-2: rgba(22, 25, 30, 0.2);

  --acc: #3db4ea;
  --acc-ink: #04202e;
  --acc-soft: rgba(19, 112, 163, 0.14);
  --acc-hover: #5cc2f0;
  --acc-line: #1478ad;
  --acc-text: #0b5f8c;
  --acc-2: #8a6634;
  --acc-2-soft: rgba(176, 140, 90, 0.24);

  --ok: #0c6b8f;
  --ok-soft: rgba(12, 107, 143, 0.13);
  --warn: #8a5a0c;
  --warn-soft: rgba(196, 140, 52, 0.2);
  --err: #a8292c;
  --err-soft: rgba(196, 50, 50, 0.13);
  --info: #3a4fb0;
  --info-soft: rgba(58, 79, 176, 0.12);

  --nav-bg: rgba(201, 204, 209, 0.82);
  --tint: rgba(22, 25, 30, 0.025);
  --shimmer: rgba(255, 255, 255, 0.35);
  --fg-rich: #23272d;
  --fg-prose: #272b31;
  --staff-bg: #d0d6dd;
  --foot-mark: #c1c4ca;
  --thumb-hover: #9ca2ab;
  --backdrop: rgba(30, 34, 40, 0.4);
  --key-bg: rgba(176, 140, 90, 0.26);
  --key-fg: #6b4c22;
  --canvas-dot: 30, 34, 40;
  --canvas-dot-a: 0.09;
  --canvas-acc: 20, 120, 173;
  --canvas-acc-2: 150, 112, 60;
  --shadow: 0 12px 30px -10px rgba(30, 34, 40, 0.35), 0 2px 6px rgba(30, 34, 40, 0.12);
  --drawer-shadow: -24px 0 48px -12px rgba(30, 34, 40, 0.35);
}

/* Base ------------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; scrollbar-color: var(--bg-4) var(--bg); }
/* "only" stops browsers with a force-dark option (Opera GX, Chrome's auto dark mode) from inverting the light theme. */
html[data-theme='legacy'] { color-scheme: only light; }
/* Switching themes recolours everything at once instead of fading each element on its own timer. */
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  caret-color: var(--acc-text);
  -webkit-tap-highlight-color: transparent;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--acc); color: var(--acc-ink); }
:focus-visible { outline: 2px solid var(--acc-text); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border: 3px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--thumb-hover); }
[hidden] { display: none !important; }

.i { width: 18px; height: 18px; flex: none; }
.i-sm { width: 15px; height: 15px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--fg-2); }
.faint { color: var(--fg-3); }
.inline-link { color: var(--fg); text-decoration: underline; text-decoration-color: var(--fg-3); text-underline-offset: 3px; transition: text-decoration-color 0.15s ease, color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .inline-link:hover { color: var(--acc-text); text-decoration-color: var(--acc-2); } }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--r-ctl); background: var(--acc); color: var(--acc-ink); font-weight: 600; }
.skip:focus { top: 12px; }

/* Interactive background (pointer-reactive dot grid), behind everything. */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Type ------------------------------------------------------------------------- */

.display { font-family: var(--display); font-stretch: 125%; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; }
.page-title { font-family: var(--display); font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: clamp(30px, 4.6vw, 52px); line-height: 0.98; letter-spacing: -0.01em; text-wrap: balance; }
.section-title { font-family: var(--display); font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: clamp(24px, 3.2vw, 38px); line-height: 1; letter-spacing: -0.005em; text-wrap: balance; }
.lede { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.5; color: var(--fg-2); max-width: 58ch; text-wrap: pretty; }
.label { font-size: 13px; font-weight: 600; color: var(--fg-2); }

/* Navigation ------------------------------------------------------------------- */

.nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); box-shadow: 0 1px 0 var(--line); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font: 800 17px/1 var(--display); font-stretch: 125%; letter-spacing: 0.02em; text-transform: uppercase; color: var(--fg); flex: none; }
.mark-glyph { width: 15px; height: 15px; color: var(--acc-2); }
.links { display: flex; gap: 4px; }
.links a { padding: 8px 12px; border-radius: var(--r-ctl); color: var(--fg-2); font-size: 14px; font-weight: 500; transition: color 0.15s ease, background-color 0.15s ease; }
.links a[aria-current='page'] { color: var(--fg); background: var(--bg-3); }
@media (hover: hover) and (pointer: fine) { .links a:hover { color: var(--fg); } }
.nav-account { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-link { padding: 8px 12px; border-radius: var(--r-ctl); color: var(--fg-2); font-size: 14px; font-weight: 500; transition: color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .nav-link:hover { color: var(--fg); } }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg); }

.menu { position: relative; }
.menu-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 12px; border: 0; border-radius: var(--r-ctl); background: var(--bg-3); color: var(--fg); font-size: 14px; font-weight: 500; transition: background-color 0.15s ease, transform 0.16s var(--ease-out); }
.menu-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .menu-btn:hover { background: var(--bg-4); } }
.menu-btn .i-sm { color: var(--fg-3); transition: transform 0.2s var(--ease-out); }
.menu-btn[aria-expanded='true'] .i-sm { transform: rotate(180deg); }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px; border-radius: 12px; background: var(--bg-3); box-shadow: var(--shadow), 0 0 0 1px var(--line); transform-origin: top right; transition: opacity 0.15s ease, transform 0.18s var(--ease-out); }
.menu-list[hidden] { display: block !important; opacity: 0; transform: scale(0.97) translateY(-4px); pointer-events: none; visibility: hidden; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: none; color: var(--fg-2); font-size: 14px; text-align: left; }
.menu-list a:focus-visible, .menu-list button:focus-visible { outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .menu-list a:hover, .menu-list button:hover { background: var(--bg-4); color: var(--fg); } }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.menu-head { padding: 8px 10px 6px; font-size: 13px; color: var(--fg-3); }

.mobile-menu { border-top: 1px solid var(--line); background: var(--bg); }
.mobile-menu nav { display: grid; padding-top: 8px; padding-bottom: 16px; }
.mobile-menu a { display: flex; align-items: center; min-height: 48px; font-size: 17px; font-weight: 500; color: var(--fg-2); border-bottom: 1px solid var(--line); }
.mobile-menu a[aria-current='page'] { color: var(--fg); }
.mobile-account { display: grid; }

@media (max-width: 760px) {
  .links, .nav-account { display: none; }
  .nav-toggle { display: inline-flex; }
}

.site-notice { background: var(--warn-soft); color: var(--fg); font-size: 14px; text-align: center; padding: 10px var(--pad); box-shadow: 0 1px 0 var(--line); }

/* Buttons ---------------------------------------------------------------------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--r-ctl); background: var(--acc); color: var(--acc-ink); font: 600 14px/1 var(--sans); white-space: nowrap; transition: background-color 0.15s ease, transform 0.16s var(--ease-out), opacity 0.15s ease; }
.btn:active:not(:disabled) { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover:not(:disabled) { background: var(--acc-hover); } }
.btn:disabled, .btn[aria-disabled='true'] { cursor: not-allowed; opacity: 0.55; }
.btn[aria-busy='true'] { cursor: progress; }
.btn-secondary { background: var(--bg-3); color: var(--fg); }
@media (hover: hover) and (pointer: fine) { .btn-secondary:hover:not(:disabled) { background: var(--bg-4); } }
.btn-ghost { background: transparent; color: var(--fg-2); padding: 0 12px; }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover:not(:disabled) { background: var(--bg-3); color: var(--fg); } }
.btn-danger { background: var(--err-soft); color: var(--err); }
@media (hover: hover) and (pointer: fine) { .btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--err) 22%, transparent); } }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.text-btn { padding: 0; border: 0; background: none; color: var(--fg-2); font-size: inherit; text-decoration: underline; text-decoration-color: var(--fg-3); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .text-btn:hover { color: var(--fg); } }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg-3); transition: color 0.15s ease, background-color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--bg-3); color: var(--fg); } }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); font-weight: 500; transition: color 0.15s ease; }
.link-arrow .i-sm { transition: transform 0.2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover { color: var(--fg); } .link-arrow:hover .i-sm { transform: translateX(2px); } }

/* Forms ------------------------------------------------------------------------ */

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field > label, .field > .label, legend.label { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.help { font-size: 13px; color: var(--fg-3); }
.field-error { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--err); }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--bg-1); color: var(--fg); font-size: 15px; transition: border-color 0.15s ease, background-color 0.15s ease; }
.textarea { min-height: 140px; line-height: 1.55; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--acc-line); background: var(--bg); }
.input[aria-invalid='true'], .select[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: var(--err); }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d8d98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--fg-2); line-height: 1.5; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--acc-text); flex: none; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-wrap .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.key-input { font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

/* Surfaces, notices and states --------------------------------------------------- */

.panel { background: var(--bg-2); border-radius: var(--r-surface); padding: clamp(20px, 3vw, 28px); }
.band { background: var(--bg-2); border-radius: var(--r-band); padding: clamp(24px, 5vw, 56px); }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--info-soft); color: var(--fg); font-size: 14px; line-height: 1.5; }
.notice .i { margin-top: 1px; color: var(--info); }
.notice-ok { background: var(--ok-soft); } .notice-ok .i { color: var(--ok); }
.notice-warn { background: var(--warn-soft); } .notice-warn .i { color: var(--warn); }
.notice-err { background: var(--err-soft); } .notice-err .i { color: var(--err); }
.notice a { text-decoration: underline; text-underline-offset: 3px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 4px; font: 600 11px/1.4 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; background: var(--bg-4); color: var(--fg-2); white-space: nowrap; }
.badge-accent { background: var(--acc-soft); color: var(--acc-text); }
.badge-key { background: var(--key-bg); color: var(--key-fg); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err); }

.empty { display: grid; justify-items: start; gap: 10px; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-surface); background: var(--bg-2); }
.empty .i { width: 22px; height: 22px; color: var(--fg-3); }
.empty h2, .empty h3 { font-size: 17px; font-weight: 600; }
.empty p { color: var(--fg-2); max-width: 52ch; }
.empty .btn { margin-top: 6px; }

.skeleton { position: relative; overflow: hidden; border-radius: 6px; background: var(--bg-3); }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--shimmer), transparent); animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; }
.sk-title { height: 18px; width: 55%; }
.sk-block { height: 120px; }
.sk-w1 { width: 46%; } .sk-w2 { width: 72%; } .sk-w3 { width: 58%; }

/* Lists of rows (forum, tickets, admin). Rows are separated by a 2px gap, not borders. */
.rows { display: grid; gap: 2px; border-radius: var(--r-surface); overflow: hidden; }
.row { display: grid; gap: 4px 20px; align-items: center; padding: 16px 20px; background: var(--bg-2); transition: background-color 0.15s ease; }
a.row:focus-visible { outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { a.row:hover { background: var(--bg-3); } }
.row-title { font-weight: 600; color: var(--fg); }
.row-meta { font-size: 13px; color: var(--fg-3); }
.row-meta a { color: var(--fg-2); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--fg-3); }
.pager-links { display: flex; gap: 6px; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 13px; color: var(--fg-3); }
.crumbs a { color: var(--fg-2); }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--fg); } }
.crumbs .i-sm { width: 13px; height: 13px; }

.page { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: clamp(22px, 3vw, 32px); }
.page-head .lede { margin-top: 12px; }
.section { padding: clamp(64px, 9vw, 120px) 0 0; }
.section:last-child { padding-bottom: clamp(64px, 9vw, 120px); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: clamp(22px, 3vw, 34px); }

/* Toasts --------------------------------------------------------------------------- */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--bg-4); color: var(--fg); font-size: 14px; box-shadow: var(--shadow); pointer-events: auto; transition: opacity 0.2s ease, transform 0.25s var(--ease-out); }
.toast .i { margin-top: 1px; }
.toast-ok .i { color: var(--ok); } .toast-err .i { color: var(--err); } .toast-info .i { color: var(--info); }
.toast[data-state='entering'], .toast[data-state='leaving'] { opacity: 0; transform: translateY(8px); }

/* Cookie notice ---------------------------------------------------------------------- */

.cookie-notice { position: fixed; left: 16px; bottom: 16px; z-index: 150; display: flex; gap: 14px; align-items: center; width: min(460px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 12px; background: var(--bg-3); box-shadow: var(--shadow), 0 0 0 1px var(--line); font-size: 14px; color: var(--fg-2); }
.cookie-notice a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* Footer ------------------------------------------------------------------------------ */

.foot { margin-top: auto; padding-top: 64px; overflow: hidden; background: var(--bg); box-shadow: 0 -1px 0 var(--line); }
.foot-in { display: grid; gap: 40px; }
@media (min-width: 860px) { .foot-in { grid-template-columns: 1fr 1.2fr; } }
.foot-brand { display: grid; justify-items: start; align-content: start; gap: 14px; }
.foot-mail { color: var(--fg); font-size: 14px; text-decoration: underline; text-decoration-color: var(--fg-3); text-underline-offset: 3px; }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.foot-cols h2 { font-size: 13px; font-weight: 600; color: var(--fg-3); margin-bottom: 14px; }
.foot-cols li + li { margin-top: 8px; }
.foot-cols a { color: var(--fg-2); font-size: 14px; transition: color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .foot-cols a:hover, .foot-mail:hover { color: var(--acc-text); } }
.foot-base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin-top: 48px; font-size: 13px; color: var(--fg-3); }
.foot-mark { font: 900 clamp(56px, 15vw, 220px)/0.8 var(--display); font-stretch: 125%; letter-spacing: -0.02em; text-transform: uppercase; text-align: center; color: var(--foot-mark); margin-top: 36px; transform: translateY(14%); white-space: nowrap; user-select: none; }

/* Home --------------------------------------------------------------------------------- */

.hero { position: relative; min-height: min(84vh, 760px); display: flex; align-items: center; padding: 96px 0 clamp(56px, 8vw, 96px); }
.hero-in { display: grid; justify-items: center; text-align: center; }
.hero h1 { font-family: var(--display); font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: clamp(46px, 11.4vw, 150px); line-height: 0.9; letter-spacing: -0.015em; white-space: nowrap; }
.hero h1 span { display: inline-block; }
.hero-line { margin-top: clamp(16px, 2.4vw, 26px); font-size: clamp(17px, 1.8vw, 21px); color: var(--fg-2); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(28px, 4vw, 44px); }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 16px; }
@media (max-width: 480px) { .hero-actions { flex-direction: column; width: 100%; max-width: 320px; } }
.js .hero-in > * { animation: rise 0.7s var(--ease-out) both; }
.js .hero-in > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-in > :nth-child(3) { animation-delay: 0.16s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* How it works: a bento of boxes, each with a small visual on top and its text at the bottom. */
.bento { display: grid; gap: 14px; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .box { min-height: 260px; } .box-4 { grid-column: span 2; } }
@media (min-width: 960px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .box-2 { grid-column: span 2; } .box-3 { grid-column: span 3; } .box-4 { grid-column: span 4; }
}
.box { display: flex; flex-direction: column; gap: 10px; padding: clamp(22px, 2.6vw, 30px); border-radius: var(--r-surface); background: var(--bg-2); overflow: hidden; }
.box h3 { margin-top: auto; padding-top: 22px; font-size: 18px; }
.box p { max-width: 50ch; color: var(--fg-2); font-size: 14.5px; }
.box-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--bg-3); color: var(--acc-2); }

.timeline { display: grid; gap: 10px; }
.timeline-track { display: flex; height: 52px; padding: 5px; gap: 5px; border-radius: 12px; background: var(--bg-3); }
.seg { display: flex; align-items: center; padding: 0 14px; border-radius: var(--r-ctl); font: 600 13px var(--mono); white-space: nowrap; overflow: hidden; }
.seg-a { flex: 30; background: var(--acc-soft); color: var(--acc-text); }
.seg-b { flex: 11; background: var(--acc-2-soft); color: var(--acc-2); }
.timeline-scale { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--fg-3); }

.mini-board { display: grid; gap: 2px; border-radius: 12px; overflow: hidden; }
.mini-board li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; background: var(--bg-3); font-size: 14px; }
.mini-board li > span:not(.badge):not(.dot) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-board .i-sm { color: var(--fg-3); }
.dot { width: 8px; height: 8px; margin: 0 3.5px; border-radius: 50%; background: var(--ok); flex: none; }

.who-demo { display: flex; align-items: center; gap: 10px; align-self: flex-start; padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--bg-3); font-weight: 600; }
.who-demo .avatar { width: 32px; height: 32px; border-radius: 9px; }

/* Scroll reveal (home page only): each piece rises in once, the first time it comes into view. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translate3d(0, 40px, 0); transition: opacity 0.8s var(--ease-out) var(--reveal-delay, 0ms), transform 1s var(--ease-out) var(--reveal-delay, 0ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  /* Covers settle from a slight zoom, the time bar fills, the board rows slide in. */
  .js .product-card[data-reveal] .art svg { transform: scale(1.08); transition: transform 1.6s var(--ease-out) var(--reveal-delay, 0ms); }
  .js .product-card[data-reveal].is-in .art svg { transform: none; }
  .js [data-reveal] .seg { clip-path: inset(0 100% 0 0 round 8px); transition: clip-path 1.2s var(--ease-out); }
  .js [data-reveal] .seg-a { transition-delay: calc(var(--reveal-delay, 0ms) + 250ms); }
  .js [data-reveal] .seg-b { transition-delay: calc(var(--reveal-delay, 0ms) + 1050ms); }
  .js [data-reveal].is-in .seg { clip-path: inset(0 0 0 0 round 8px); }
  .js [data-reveal] .mini-board li { opacity: 0; transform: translate3d(-16px, 0, 0); transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out); }
  .js [data-reveal] .mini-board li:nth-child(1) { transition-delay: calc(var(--reveal-delay, 0ms) + 300ms); }
  .js [data-reveal] .mini-board li:nth-child(2) { transition-delay: calc(var(--reveal-delay, 0ms) + 380ms); }
  .js [data-reveal] .mini-board li:nth-child(3) { transition-delay: calc(var(--reveal-delay, 0ms) + 460ms); }
  .js [data-reveal].is-in .mini-board li { opacity: 1; transform: none; }
}

.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; } }

.row-simple { grid-template-columns: minmax(0, 1fr); }
.row-simple h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.row-simple p { margin-top: 3px; font-size: 14px; color: var(--fg-2); }
.row-simple.is-gated h3 { color: var(--fg-2); }
.row-simple .mobile-meta { display: block; }

.faq { display: grid; gap: 22px; padding: clamp(24px, 4vw, 44px); }
@media (min-width: 900px) { .faq { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 56px; } }
.faq-side .faq-more { margin-top: 16px; max-width: 34ch; }
.faq details { box-shadow: 0 -1px 0 var(--line); }
.faq details:last-child { box-shadow: 0 -1px 0 var(--line), 0 1px 0 var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; font-size: 16px; font-weight: 500; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 14px; height: 14px; background: currentColor; color: var(--fg-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 0.2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--fg-2); max-width: 68ch; }


/* Product art and store ----------------------------------------------------------------- */

.art { position: relative; aspect-ratio: 16 / 11; border-radius: var(--r-surface); overflow: hidden; background: var(--bg-2); isolation: isolate; }
.art svg { width: 100%; height: 100%; }
/* Home page product cards: short, art behind, the lower half fading to black under the name and summary. */
.product-grid { display: grid; gap: 16px; }
@media (min-width: 620px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
.product-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 232px; border-radius: var(--r-surface); overflow: hidden; background: var(--bg-2); isolation: isolate; color: #fff; }
.product-card .art { position: absolute; inset: 0; z-index: -2; aspect-ratio: auto; border-radius: 0; transition: transform 0.6s var(--ease-out); }
.product-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0.7) 58%, #000 100%); }
/* Forum attachments: download cards under a post, and the attach field in composers. */
.attachments { display: grid; gap: 6px; margin-top: 16px; max-width: 520px; }
.attachment, .attach-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--bg-3); color: var(--fg); font-size: 14px; }
.attachment { text-decoration: none; transition: background-color 0.15s ease; }
.attachment .i-sm { color: var(--acc-text, var(--fg-2)); }
@media (hover: hover) and (pointer: fine) { .attachment:hover { background: var(--bg-4); } }
.attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.attachment-size { color: var(--fg-3); font: 13px var(--mono); font-variant-numeric: tabular-nums; }
.attach { display: grid; gap: 8px; }
.attach-list { display: grid; gap: 6px; }
.attach-list:empty { display: none; }
.attach-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.attach-item { grid-template-columns: auto minmax(0, 1fr) auto auto; position: relative; overflow: hidden; }
.attach-item.is-error { background: var(--err-soft); } .attach-item.is-error .i-sm, .attach-item.is-error .attachment-size { color: var(--err); }
.attach-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.attach-bar span { display: block; height: 100%; background: var(--acc); transform-origin: left; transition: transform 0.2s linear; }
.product-skel { height: 232px; border-radius: var(--r-surface); }
.product-card-body { display: grid; gap: 6px; padding: 16px 18px 18px; }
.product-card h3 { font: 750 18px/1.15 var(--display); font-stretch: 125%; text-transform: uppercase; color: #fff; }
.product-card p { color: rgba(255, 255, 255, 0.74); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .price { color: #fff; }
@media (hover: hover) and (pointer: fine) { .product-card:hover .art { transform: scale(1.04); } }

/* The hover preview beside a card. Its own scrollbar keeps long descriptions compact. */
.product-peek { position: absolute; z-index: 40; display: flex; flex-direction: column; width: 340px; max-height: min(400px, calc(100vh - 120px)); padding: 18px 6px 16px 18px; border-radius: var(--r-surface); background: var(--bg-3); box-shadow: var(--shadow); opacity: 0; transform: translateY(4px); visibility: hidden; pointer-events: none; transition: opacity 0.14s ease, transform 0.18s var(--ease-out), visibility 0s linear 0.18s; }
.product-peek[data-open] { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity 0.14s ease, transform 0.18s var(--ease-out), visibility 0s; }
.peek-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 12px; margin-bottom: 12px; }
.peek-head h3 { font: 750 16px/1.15 var(--display); font-stretch: 125%; text-transform: uppercase; }
.peek-scroll { display: grid; align-content: start; gap: 14px; overflow-y: auto; overscroll-behavior: contain; padding-right: 12px; font-size: 14px; color: var(--fg-2); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.peek-summary { color: var(--fg); }
.peek-section { display: grid; gap: 8px; }
.peek-list { display: grid; gap: 6px; padding-left: 18px; }
.peek-list strong { color: var(--fg); font-weight: 600; }
.peek-rows { display: grid; gap: 4px; }
.peek-rows div { display: flex; justify-content: space-between; gap: 12px; }
.peek-rows dt { color: var(--fg-3); }
.peek-rows dd { color: var(--fg); text-align: right; }
@media (prefers-reduced-motion: reduce) { .product-peek, .product-peek[data-open] { transform: none; } .product-card .art { transition: none; } }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font: 600 15px var(--mono); font-variant-numeric: tabular-nums; color: var(--fg); }

.tabs { position: relative; display: flex; gap: 4px; padding: 4px; margin-bottom: 28px; border-radius: 12px; background: var(--bg-2); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; z-index: 1; flex: none; min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: color 0.2s ease; }
.tab[aria-selected='true'] { color: var(--fg); }
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--fg); } }
.tab-indicator { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; border-radius: var(--r-ctl); background: var(--bg-4); transition: transform 0.25s var(--ease-out), width 0.25s var(--ease-out); }
.product-view { display: grid; gap: 32px; }
@media (min-width: 960px) { .product-view { grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; } .product-view .art { position: sticky; top: 92px; aspect-ratio: 1; } }
.product-view h2 { font: 800 clamp(28px, 3.6vw, 44px)/1 var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.01em; }
.product-view .lede { margin-top: 14px; }
.desc { display: grid; gap: 12px; margin-top: 22px; color: var(--fg-2); max-width: 62ch; }
.feature-list { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 640px) { .feature-list { grid-template-columns: 1fr 1fr; } }
.feature-list h3 { font-size: 15px; }
.feature-list p { margin-top: 4px; font-size: 14px; color: var(--fg-2); }
.specs { display: grid; gap: 0; margin-top: 28px; font-size: 14px; }
.specs div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; box-shadow: 0 -1px 0 var(--line); }
.specs dt { color: var(--fg-3); }
.specs dd { margin: 0; text-align: right; }
.buy-box { display: grid; gap: 14px; margin-top: 28px; padding: 20px; border-radius: var(--r-surface); background: var(--bg-2); }
.buy-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.buy-price { font: 800 34px/1 var(--display); font-stretch: 125%; }
.buy-note { font-size: 13px; color: var(--fg-3); }

/* Forum --------------------------------------------------------------------------------- */

.cat + .cat { margin-top: 36px; }
.cat-head { display: grid; grid-template-columns: minmax(0, 1fr) 80px 80px 230px; gap: 20px; align-items: end; padding: 0 20px 12px; font-size: 12px; font-weight: 600; color: var(--fg-3); }
.cat-head h2 { font-size: 15px; color: var(--fg); }
.cat-head .r { text-align: right; }
.board-row { grid-template-columns: minmax(0, 1fr) 80px 80px 230px; }
.board-row h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.board-row p { margin-top: 3px; font-size: 14px; color: var(--fg-2); }
.board-row .count { text-align: right; font: 500 14px var(--mono); color: var(--fg-2); font-variant-numeric: tabular-nums; }
.board-row.is-gated { color: var(--fg-2); }
.board-row.is-gated h3 { color: var(--fg-2); }
.last { display: grid; gap: 2px; min-width: 0; font-size: 13px; }
.last-title { color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.last-meta { color: var(--fg-3); }
.topic-row { grid-template-columns: minmax(0, 1fr) 80px 170px; }
.topic-row h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.topic-row h3 .i-sm { color: var(--fg-3); }
.mobile-meta { display: none; }
@media (max-width: 800px) {
  .cat-head { grid-template-columns: 1fr; }
  .cat-head .r { display: none; }
  .board-row, .topic-row { grid-template-columns: minmax(0, 1fr); }
  .board-row .count, .board-row .last, .topic-row .count, .topic-row .last { display: none; }
  .mobile-meta { display: block; margin-top: 6px; font-size: 13px; color: var(--fg-3); }
}

.composer { display: grid; gap: 14px; padding: 20px; border-radius: var(--r-surface); background: var(--bg-2); }
.format-help { font-size: 13px; color: var(--fg-3); }
.format-help code { font-family: var(--mono); color: var(--fg-2); }

.posts { display: grid; gap: 12px; }
.post { display: grid; grid-template-columns: 200px minmax(0, 1fr); border-radius: var(--r-surface); background: var(--bg-2); overflow: hidden; scroll-margin-top: 90px; }
.post-author { display: grid; align-content: start; gap: 10px; padding: 20px; background: var(--tint); }
.post-author .who { display: grid; gap: 6px; }
.post-author a.name { font-weight: 600; word-break: break-word; }
.post-author .badges { display: flex; flex-wrap: wrap; gap: 4px; }
.post-author .since { font-size: 12.5px; color: var(--fg-3); }
.avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; font: 600 15px var(--mono); background: var(--bg-3); }
.avatar svg { width: 100%; height: 100%; }
img.avatar { object-fit: cover; }
.avatar-none { color: var(--fg-3); }
.avatar-sm { width: 24px; height: 24px; border-radius: 7px; }
.avatar-lg { width: 72px; height: 72px; border-radius: 18px; }
.av-bg { fill: var(--av-bg); }
.av-a { fill: var(--av-a); }
.av-b { fill: var(--av-b); }
.av-line { fill: none; stroke: var(--av-a); stroke-width: 2.4; }
.avatar[data-tone='0'] { --av-bg: #1d2410; --av-a: #c6ff3d; --av-b: #56701f; }
.avatar[data-tone='1'] { --av-bg: #0f2421; --av-a: #5fe0c0; --av-b: #2a6e60; }
.avatar[data-tone='2'] { --av-bg: #0e1f29; --av-a: #6fd0ff; --av-b: #2c6a8a; }
.avatar[data-tone='3'] { --av-bg: #131a2e; --av-a: #93b2ff; --av-b: #3d518f; }
.avatar[data-tone='4'] { --av-bg: #1d1530; --av-a: #c3a2ff; --av-b: #5e4a94; }
.avatar[data-tone='5'] { --av-bg: #2a1420; --av-a: #ff9cc4; --av-b: #8a3d5d; }
.avatar[data-tone='6'] { --av-bg: #2b1712; --av-a: #ffa585; --av-b: #8f4a35; }
.avatar[data-tone='7'] { --av-bg: #272013; --av-a: #e8c58a; --av-b: #8a6d3d; }
html[data-theme='legacy'] .avatar[data-tone='0'] { --av-bg: #b7d6e6; --av-a: #12699a; --av-b: #6db0d4; }
html[data-theme='legacy'] .avatar[data-tone='1'] { --av-bg: #bccfd6; --av-a: #1c5f73; --av-b: #7ea7b4; }
html[data-theme='legacy'] .avatar[data-tone='2'] { --av-bg: #bfd7e5; --av-a: #0d6a97; --av-b: #7cb5d2; }
html[data-theme='legacy'] .avatar[data-tone='3'] { --av-bg: #c2c9e2; --av-a: #2c4996; --av-b: #8597cc; }
html[data-theme='legacy'] .avatar[data-tone='4'] { --av-bg: #cbc3de; --av-a: #573c94; --av-b: #a08fcc; }
html[data-theme='legacy'] .avatar[data-tone='5'] { --av-bg: #dcc5cd; --av-a: #8a2f54; --av-b: #c58aa2; }
html[data-theme='legacy'] .avatar[data-tone='6'] { --av-bg: #dfcabd; --av-a: #93462a; --av-b: #cf9a80; }
html[data-theme='legacy'] .avatar[data-tone='7'] { --av-bg: #ddd0b6; --av-a: #7a5a2b; --av-b: #bda277; }
.post-main { display: flex; flex-direction: column; min-width: 0; padding: 18px 22px 12px; }
.post-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 13px; color: var(--fg-3); }
.post-head a { color: var(--fg-3); }
.post-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; margin-top: auto; padding-top: 14px; }
.post-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--fg-3); font-size: 13px; transition: color 0.15s ease, background-color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .post-actions button:hover { background: var(--bg-3); color: var(--fg); } }
.post.is-deleted .post-main { color: var(--fg-3); font-style: italic; }
@media (max-width: 720px) {
  .post { grid-template-columns: minmax(0, 1fr); }
  .post-author { grid-template-columns: auto 1fr; align-items: center; padding: 14px 16px; }
  .post-main { padding: 14px 16px 10px; }
}

/* Rendered user text: escaped first, then a small safe subset of formatting. */
.rich { display: grid; gap: 12px; font-size: 15.5px; line-height: 1.65; color: var(--fg-rich); overflow-wrap: anywhere; max-width: 74ch; }
.rich a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--fg-3); text-underline-offset: 3px; }
.rich code { padding: 1px 5px; border-radius: 4px; background: var(--bg); font: 13.5px var(--mono); }
.rich pre { margin: 0; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--bg); overflow-x: auto; }
.rich pre code { padding: 0; background: none; color: var(--acc-text); }
.rich blockquote { padding: 2px 0 2px 14px; color: var(--fg-2); box-shadow: inset 2px 0 0 var(--acc-2-soft); }
.rich ul { display: grid; gap: 4px; padding-left: 20px; list-style: disc; }
.rich ul li::marker { color: var(--fg-3); }
.rich ol { display: grid; gap: 4px; padding-left: 22px; list-style: decimal; }
.rich ol li::marker { color: var(--fg-3); font-variant-numeric: tabular-nums; }
.rich h3 { margin-top: 10px; font-size: 19px; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; color: var(--fg); }
.rich h4 { margin-top: 4px; font-size: 16px; font-weight: 650; line-height: 1.35; color: var(--fg); }
.rich > :first-child { margin-top: 0; }
.rich hr { width: 100%; height: 1px; margin: 6px 0; border: 0; background: var(--line); }

/* Auth, account and tickets ----------------------------------------------------------------- */

.auth { display: grid; place-items: center; padding: clamp(32px, 7vw, 80px) var(--pad); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .page-title { font-size: clamp(28px, 4vw, 40px); }
.auth-card .lede { margin: 10px 0 24px; font-size: 15px; }
.auth-alt { margin-top: 18px; font-size: 14px; color: var(--fg-2); }

.account-grid { display: grid; gap: 24px; }
@media (min-width: 980px) { .account-grid { grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start; } }
.side-nav { display: flex; gap: 4px; overflow-x: auto; }
@media (min-width: 980px) { .side-nav { position: sticky; top: 92px; flex-direction: column; } }
.side-nav a { padding: 8px 12px; border-radius: var(--r-ctl); color: var(--fg-2); font-size: 14px; white-space: nowrap; }
.side-nav a[aria-current='true'] { background: var(--bg-3); color: var(--fg); }
.stack { display: grid; gap: 24px; }
.panel h2 { font-size: 18px; margin-bottom: 4px; }
.panel > .help:first-of-type { margin-bottom: 18px; }
.licence-row { grid-template-columns: minmax(0, 1fr) auto; }
.session-row { grid-template-columns: minmax(0, 1fr) auto; }
.connection-row { grid-template-columns: minmax(0, 1fr) auto; }
.connection-row .row-title { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.connection-row .form-actions { margin: 0; }
@media (max-width: 560px) { .connection-row { grid-template-columns: minmax(0, 1fr); } }
.keys-out { display: grid; gap: 6px; padding: 14px; border-radius: var(--r-ctl); background: var(--bg); font: 14px var(--mono); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status-open { color: var(--info); } .status-waiting { color: var(--warn); } .status-closed { color: var(--fg-3); }
.ticket-row { grid-template-columns: minmax(0, 1fr) 150px 120px; }
@media (max-width: 720px) { .ticket-row { grid-template-columns: minmax(0, 1fr); } }
.thread { display: grid; gap: 12px; }
.msg { padding: 16px 18px; border-radius: var(--r-surface); background: var(--bg-2); }
.msg.from-staff { background: var(--staff-bg); }
.msg.internal { background: var(--warn-soft); }
.msg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--fg-3); }
.msg-head strong { color: var(--fg); font-weight: 600; }

/* Legal ------------------------------------------------------------------------------------- */

.prose { max-width: 820px; margin: 0 auto; padding: clamp(24px, 5vw, 56px); border-radius: var(--r-band); background: var(--bg-2); }
.prose .page-title { margin: 6px 0 14px; }
.prose .updated { font-size: 13px; color: var(--fg-3); }
.prose h2 { margin: 44px 0 12px; font-size: 21px; scroll-margin-top: 90px; }
.prose h3 { margin: 24px 0 8px; font-size: 16px; }
.prose p, .prose li { color: var(--fg-prose); line-height: 1.7; }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { display: grid; gap: 8px; margin-top: 10px; padding-left: 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--fg-3); }
.prose a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--fg-3); text-underline-offset: 3px; }
.prose table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 10px 8px; text-align: left; vertical-align: top; box-shadow: 0 1px 0 var(--line); }
.prose th { color: var(--fg-2); font-weight: 600; }
.prose .toc { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 8px; font-size: 14px; }
.prose .toc a { color: var(--fg-2); text-decoration: none; }
.table-scroll { overflow-x: auto; }

/* Gate and error pages ------------------------------------------------------------------------- */

.center-page { display: grid; place-items: center; min-height: calc(100vh - 64px); padding: 48px var(--pad); text-align: center; }
.center-page .page-title { font-size: clamp(40px, 8vw, 88px); }
.center-page p { margin: 14px auto 26px; max-width: 44ch; color: var(--fg-2); }
.gate { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 32px var(--pad); }
.gate-card { width: 100%; max-width: 400px; }
.gate-card .mark { margin-bottom: 28px; }

/* Motion preferences ----------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .skeleton::after { display: none; }
}

/* Page pieces --------------------------------------------------------------------------------- */

.spacer { height: 16px; }
.center { justify-content: center; }
.stack.banners { margin-bottom: 24px; gap: 10px; }
.search-form { display: flex; gap: 8px; }
.search-form .input { min-width: 0; width: 240px; }
.search-form.wide { max-width: 640px; }
.search-form.wide .input { flex: 1; width: auto; }
.topic-title { font-family: var(--sans); font-stretch: normal; text-transform: none; font-weight: 700; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.topic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 14px; color: var(--fg-3); }
.member-head { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.member-head .avatar { width: 64px; height: 64px; border-radius: 16px; font-size: 20px; }
.menu-btn .avatar { margin-left: -4px; }
.avatar-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-bottom: 22px; }
.avatar-edit .form-actions { gap: 8px; }

/* Top-bar switches (Legacy styling): icons that open out to their name and state on hover or focus. */
.bar-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.bar-btn { display: inline-flex; align-items: center; height: 40px; padding: 0 11px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg-2); font-size: 13px; font-weight: 500; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, transform 0.16s var(--ease-out); }
.bar-btn:active { transform: scale(0.97); }
[data-theme-toggle][aria-checked='true'] { color: var(--acc-2); }
.bar-btn-text { display: inline-flex; align-items: center; gap: 8px; max-width: 0; overflow: hidden; opacity: 0; color: var(--fg); transition: max-width 0.28s var(--ease-out), margin-left 0.28s var(--ease-out), opacity 0.18s ease; }
.bar-state { padding: 1px 6px; border-radius: 4px; background: var(--bg-4); color: var(--fg-2); font: 600 11px/1.4 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; }
.bar-btn[aria-checked='true'] .bar-state { background: var(--acc-2-soft); color: var(--acc-2); }
.bar-btn:focus-visible .bar-btn-text, .bar-btn[data-peek] .bar-btn-text { max-width: 180px; margin-left: 9px; opacity: 1; }
.bar-btn:focus-visible, .bar-btn[data-peek] { background: var(--bg-3); }
@media (hover: hover) and (pointer: fine) {
  .bar-btn:hover { background: var(--bg-3); color: var(--fg); }
  [data-theme-toggle][aria-checked='true']:hover { color: var(--acc-2); }
  .bar-btn:hover .bar-btn-text { max-width: 180px; margin-left: 9px; opacity: 1; }
}
.nav-account { margin-left: 0; }
.nav-toggle { margin-left: 2px; }
/* Narrower screens have no room to widen the bar, so the label drops down under the icon instead. */
@media (max-width: 1000px) {
  .bar-btn { position: relative; }
  .bar-btn-text { position: absolute; top: calc(100% + 6px); right: 0; max-width: none; padding: 7px 10px; border-radius: var(--r-ctl); background: var(--bg-3); box-shadow: var(--shadow); transform: translateY(-4px); pointer-events: none; transition: opacity 0.18s ease, transform 0.2s var(--ease-out); }
  .bar-btn:focus-visible .bar-btn-text, .bar-btn[data-peek] .bar-btn-text { margin-left: 0; transform: none; }
}
@media (max-width: 1000px) and (hover: hover) and (pointer: fine) {
  .bar-btn:hover .bar-btn-text { margin-left: 0; transform: none; }
}

/* Store plans. */
.plans { display: grid; gap: 8px; }
.plan { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--bg-3); cursor: pointer; transition: background-color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .plan:hover { background: var(--bg-4); } }
.plan input { width: 18px; height: 18px; margin: 0; accent-color: var(--acc-text); }
.plan:has(input:checked) { background: var(--bg-4); }
.plan:has(input:focus-visible) { outline: 2px solid var(--acc-text); outline-offset: 2px; }
.plan-name { font-weight: 600; }
.plan-length { display: block; font-size: 13px; color: var(--fg-3); }
.plan .price { text-align: right; }
.access-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg-2); }
.access-line .i-sm { color: var(--ok); }
.licence-row .ends { font-size: 13px; color: var(--fg-3); }
.licence-row .ends.soon { color: var(--warn); }
.member-head .page-title { font-family: var(--sans); font-stretch: normal; text-transform: none; font-size: clamp(26px, 3vw, 36px); font-weight: 700; }
.member-bio { margin-bottom: 24px; }
.member-sub { margin: 8px 0 12px; }
.tab-skeleton { width: 120px; height: 40px; border-radius: var(--r-ctl); }
a.tab { display: inline-flex; align-items: center; }
.tab[aria-current='page'] { color: var(--fg); background: var(--bg-4); }
.redeem { margin-top: 22px; }
.redeem-row { display: flex; flex-wrap: wrap; gap: 8px; }
.redeem-row .input { flex: 1 1 260px; }
.privacy-actions { display: grid; gap: 22px; margin-top: 6px; }
@media (min-width: 700px) { .privacy-actions { grid-template-columns: 1fr 1fr; gap: 32px; } }
.privacy-actions h3 { font-size: 15px; }
.privacy-actions p { margin: 6px 0 14px; font-size: 14px; }
.sessions-title { margin: 30px 0 10px; }
.sessions-actions { margin-top: 10px; }
.profile-facts { margin: 6px 0 14px; }
.profile-note { margin-bottom: 16px; }
.textarea.short { min-height: 90px; }
.turnstile { min-height: 65px; }
.ticket-form { max-width: 860px; }
.panel h2 + .help { margin-bottom: 18px; }
.gate-card .page-title { font-size: clamp(32px, 6vw, 46px); margin-bottom: 10px; }
.gate-card .lede { margin-bottom: 26px; }

.dialog { width: min(480px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 16px; background: var(--bg-3); color: var(--fg); box-shadow: var(--shadow); }
.dialog::backdrop { background: var(--backdrop); }
.dialog h2 { font-size: 19px; }
.dialog[open] { animation: dialog-in 0.2s var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; transform: scale(0.97); } }
.plan[aria-disabled] { cursor: default; }
.avatar-xs { width: 18px; height: 18px; border-radius: 5px; }
.row-by { display: flex; align-items: center; gap: 7px; margin-top: 4px; }
