/* MartialQuest — design system and components.
   Fonts are self-hosted (SIL OFL, see static/fonts/*.txt). */

@font-face { font-family: "Archivo"; font-weight: 400; font-display: swap; src: url("fonts/archivo-latin-400-normal.9246d621d7f0.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 500; font-display: swap; src: url("fonts/archivo-latin-500-normal.562c73adab45.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 600; font-display: swap; src: url("fonts/archivo-latin-600-normal.7ab89eedd1b0.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 700; font-display: swap; src: url("fonts/archivo-latin-700-normal.8574a5d7eebc.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.ba4513495282.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.e1180918b873.woff2") format("woff2"); }

:root {
  --ground: #F3F3F1;
  --surface: #FFFFFF;
  --surface-sunk: #FAFAF8;
  --ink: #121316;
  --ink-2: #2E3137;
  --muted: #5B5F66;
  --muted-2: #4A4E55;
  --line: #E2E2DE;
  --line-strong: #D5D5D0;
  --accent: #B42318;
  --accent-hover: #8F1C13;
  --accent-soft: #FBEAE8;
  --accent-line: #F0C7C2;
  --avatar: #E8E7E2;
  --placeholder-1: #D9D8D3;
  --placeholder-2: #CFCFC9;
  --placeholder-3: #DEDCD5;
  --placeholder-4: #C9CAC5;
  --success-bg: #E7F4EC; --success-ink: #1D5E36;
  --error-bg: var(--accent-soft); --error-ink: #8F1C13;
  --info-bg: #E9EEF8; --info-ink: #1F3F86;

  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 14px;
  --max: 1280px;
  --gutter: 24px;
  --tap: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }

.display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1;
}
.page-title { font-size: 48px; }
.muted { color: var(--muted); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.page { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 72px; }
.page-narrow { max-width: 640px; margin: 0 auto; padding: 32px var(--gutter) 72px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 22px; height: 22px; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-nav { max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand:hover { color: var(--ink); }
/* Logo image; the brand's bright red stays in the logo, text and buttons use --accent. */
.brand-mark { display: block; width: auto; height: 38px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: 0.06em; }
.nav-links { display: flex; gap: 4px; }
.nav-link { display: flex; align-items: center; min-height: var(--tap); padding: 0 14px; border-radius: var(--radius-sm); font-weight: 500; font-size: 15px; color: var(--muted-2); }
.nav-link[aria-current="page"] { background: var(--ground); color: var(--ink); font-weight: 600; }
.nav-search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; height: var(--tap); padding: 0 14px; min-width: 0; background: var(--ground); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.nav-search:focus-within { border-color: var(--ink); }
.nav-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-button:hover { background: var(--ground); color: var(--ink); }
.icon-button[aria-current="page"] { background: var(--ground); }
.count-badge { position: absolute; top: 5px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* Dropdowns built on <details> so they work without JS. */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(18, 19, 22, 0.14); padding: 8px; z-index: 30; }
.menu-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; }
.menu-panel-head h2 { font-size: 15px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: none; text-align: left; font-size: 14px; cursor: pointer; }
.menu-item:hover { background: var(--ground); color: var(--ink); }
.menu-empty { padding: 16px 10px 20px; color: var(--muted); font-size: 14px; }
.notice { display: flex; align-items: center; gap: 4px; border-radius: var(--radius-sm); }
.notice:hover { background: var(--ground); }
.notice > a { flex: 1; display: flex; gap: 10px; align-items: center; padding: 8px 10px; font-size: 14px; min-width: 0; }
.notice time { display: block; font-size: 12px; color: var(--muted); }
.notice .icon-button { width: 36px; height: 36px; flex: none; color: var(--muted-2); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border: 1px solid transparent; border-radius: 999px; font-weight: 600; font-size: 15px; line-height: 1; cursor: pointer; text-align: center; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2A2C31; color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: var(--surface); border-color: var(--accent-line); color: var(--accent); }
.btn-danger:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn-danger-solid { background: var(--accent); color: #fff; }
.btn-danger-solid:hover { background: var(--accent-hover); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { color: var(--ink); background: #ECECEA; }
.btn-ghost-light { background: transparent; border-color: #5B5F66; color: #fff; }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.text-button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--muted-2); cursor: pointer; }
.text-button:hover { color: var(--accent); }
.text-button[aria-pressed="true"] { color: var(--accent); }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-size: 15px; font-weight: 600; color: var(--muted-2); }

/* ---------- Flash messages ---------- */
.flash-stack { max-width: var(--max); margin: 16px auto 0; padding: 0 var(--gutter); display: grid; gap: 8px; }
.flash { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px; border-radius: var(--radius-sm); font-size: 15px; background: var(--info-bg); color: var(--info-ink); }
.flash p { flex: 1; }
.flash-success { background: var(--success-bg); color: var(--success-ink); }
.flash-error, .flash-warning { background: var(--error-bg); color: var(--error-ink); }
.flash .icon-button { width: 36px; height: 36px; color: inherit; }
.flash .icon-button:hover { background: rgba(0, 0, 0, 0.06); }

/* ---------- Toolbar: chips, density, sort ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head p { margin-top: 8px; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.toolbar-group { display: flex; align-items: center; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; }
.segmented button, .segmented a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; font-weight: 600; color: var(--muted-2); cursor: pointer; }
.segmented [aria-pressed="true"], .segmented [aria-current="true"] { background: var(--ink); color: #fff; }
.density-toggle[hidden] { display: none; }

/* ---------- Avatars and belts ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 999px; background: var(--avatar); color: var(--ink); font-size: 12px; font-weight: 700; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 28px; height: 28px; font-size: 11px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 44px; height: 44px; font-size: 14px; }
.avatar-xl { width: 132px; height: 132px; font-size: 44px; font-family: var(--font-display); background: #2A2C31; color: #fff; border: 4px solid #fff; }
.avatar-dark { background: var(--ink); color: #fff; }

.belt { --belt: #F5F5F2; --belt-ink: var(--ink); --bar: #121316; display: inline-flex; align-items: stretch; height: 26px; border-radius: 4px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.18); vertical-align: middle; }
.belt-label { display: flex; align-items: center; padding: 0 10px; background: var(--belt); color: var(--belt-ink); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.belt-bar { display: flex; align-items: center; justify-content: flex-end; gap: 3px; min-width: 26px; padding: 0 4px; background: var(--bar); }
.belt-stripe { width: 3px; height: 16px; background: #fff; border-radius: 1px; }
.belt-sm { height: 20px; }
.belt-sm .belt-label { padding: 0 7px; font-size: 10px; }
.belt-sm .belt-bar { min-width: 18px; }
.belt-sm .belt-stripe { height: 12px; width: 2px; }
.belt-white  { --belt: #F5F5F2; }
.belt-grey   { --belt: #8A8D91; --belt-ink: #fff; }
.belt-yellow { --belt: #E7B416; }
.belt-orange { --belt: #E07B24; }
.belt-green  { --belt: #2F7D46; --belt-ink: #fff; }
.belt-blue   { --belt: #1F4FB8; --belt-ink: #fff; }
.belt-purple { --belt: #6B3FA0; --belt-ink: #fff; }
.belt-brown  { --belt: #6E4423; --belt-ink: #fff; }
.belt-black  { --belt: #000; --belt-ink: #fff; --bar: var(--accent); border-color: #5B5F66; }

/* ---------- Gallery grid with density ---------- */
.gallery { columns: 4 260px; column-gap: 20px; }
.gallery[data-density="compact"] { columns: 6 180px; column-gap: 12px; }
.gallery[data-density="large"] { columns: 3 400px; column-gap: 28px; }
.card { break-inside: avoid; margin: 0 0 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery[data-density="compact"] .card { margin-bottom: 12px; border-radius: var(--radius-sm); }
.gallery[data-density="large"] .card { margin-bottom: 28px; }
.card-media { display: block; background: var(--placeholder-1); }
.card-media img { width: 100%; height: auto; }
.card-body { display: block; padding: 14px 16px 4px; }
.card-body:hover { color: var(--ink); }
.card-body:hover .card-title { color: var(--accent); }
.card-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.gallery[data-density="large"] .card-title { font-size: 18px; }
.card-tags { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--accent); }
.card-meta { display: flex; align-items: center; gap: 10px; padding: 8px 16px 12px; }
.card-author { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 14px; font-weight: 500; }
.card-author span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.like-small { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 6px; border: 0; background: none; font-size: 13px; color: var(--muted); cursor: pointer; border-radius: var(--radius-sm); }
.like-small:hover { color: var(--accent); }
.like-small[aria-pressed="true"] { color: var(--accent); }
.like-small[aria-pressed="true"] .icon { fill: var(--accent); }
.gallery[data-density="compact"] .card-body { padding: 8px 10px 10px; }
.gallery[data-density="compact"] .card-title { font-size: 13px; }
.gallery[data-density="compact"] .card-tags,
.gallery[data-density="compact"] .card-meta { display: none; }

.empty-state { padding: 64px 16px; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--ink); font-size: 20px; margin-bottom: 8px; }
.empty-state .btn { margin-top: 20px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 28px; font-size: 14px; color: var(--muted); }

/* ---------- Photo detail ---------- */
.photo-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; margin-top: 8px; }
.photo-stage { flex: 999 1 560px; min-width: 0; display: flex; align-items: center; justify-content: center; min-height: 360px; background: var(--ink); border-radius: var(--radius-lg); overflow: hidden; }
.photo-stage img { max-height: 80vh; width: auto; }
.photo-panel { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel-author { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-author > a { display: flex; align-items: center; gap: 12px; flex: 1 1 200px; min-width: 0; }
.panel-author strong { display: block; font-size: 15px; }
.panel-author small { display: block; font-size: 13px; color: var(--muted); }
.photo-title { font-size: 34px; line-height: 1.05; }
.photo-description { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.tag-link { color: var(--accent); font-weight: 600; }
.tag-link:hover { color: var(--accent-hover); text-decoration: underline; }
.photo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.like-button { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 15px; cursor: pointer; }
.like-button:hover { border-color: var(--ink); }
.like-button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.like-button[aria-pressed="true"] .icon { fill: var(--accent); }
.photo-actions .report-link { margin-left: auto; }

.comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.comment { display: flex; gap: 10px; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { font-size: 14px; }
.comment-head a { font-weight: 600; }
.comment-head time { color: var(--muted); }
.comment-text { margin: 4px 0 2px; font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.comment-tools { display: flex; flex-wrap: wrap; gap: 14px; }
.comment-tools .delete { color: var(--accent); }
.replies { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.reply-form { display: flex; gap: 8px; margin-top: 6px; }
.reply-form[hidden] { display: none; }
.reply-form input { flex: 1; min-width: 0; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; }
.comment-form { display: flex; flex-direction: column; gap: 8px; }
.comment-form .btn { align-self: flex-end; }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.form-card > h1 { font-size: 40px; margin-bottom: 6px; }
.form-card > .lede { color: var(--muted); margin-bottom: 24px; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-size: 14px; font-weight: 600; }
.field fieldset { border: 0; margin: 0; padding: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="search"],
.field input[type="date"], .field input[type="number"], .field input[type="url"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 16px; color: var(--ink);
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18, 19, 22, 0.12); }
.field input[type="file"] { font-size: 14px; }
.field input[type="file"]::file-selector-button { margin-right: 12px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-weight: 600; cursor: pointer; }
.field .help { font-size: 13px; color: var(--muted); }
.field .help ul { margin: 4px 0 0; padding-left: 18px; }
.field .errors { margin: 0; padding: 0; list-style: none; font-size: 13px; font-weight: 600; color: var(--error-ink); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--accent); }
.field-radio-list { display: flex; flex-direction: column; gap: 6px; }
.field-radio-list label { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; font-weight: 500; cursor: pointer; }
.field-radio-list label:has(input:checked) { border-color: var(--ink); background: var(--ground); }
.field-radio-list input { accent-color: var(--accent); width: 18px; height: 18px; }
.field-check { flex-direction: row; align-items: center; gap: 10px; }
.form-errors { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--error-bg); color: var(--error-ink); font-size: 14px; font-weight: 600; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.current-image { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.current-image img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); }
.confirm-preview { display: flex; gap: 16px; align-items: center; padding: 16px; margin-bottom: 20px; background: var(--ground); border-radius: var(--radius); }
.confirm-preview img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); }
.confirm-preview blockquote { margin: 0; font-size: 15px; color: var(--ink-2); }

/* ---------- Profile ---------- */
.profile-hero { background: var(--ink); color: #fff; }
.profile-hero-inner { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.profile-info { flex: 999 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.profile-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.profile-name { font-size: 52px; }
.profile-handle { color: #C9CBD0; font-size: 15px; }
.profile-bio { max-width: 640px; color: #E6E7EA; line-height: 1.55; white-space: pre-line; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 4px; font-size: 14px; color: #C9CBD0; }
.profile-facts span { display: inline-flex; align-items: center; gap: 6px; }
.profile-cta { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-left: auto; }
.tabs-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border-bottom: 3px solid transparent; font-weight: 500; font-size: 15px; color: var(--muted-2); white-space: nowrap; }
.tab[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 700; }
.tab .tab-count { font-size: 13px; color: var(--muted); font-weight: 500; }
.tabs-row .toolbar { padding-bottom: 8px; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tile-grid[data-density="compact"] { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.tile-grid[data-density="large"] { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 24px; }
.tile { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--placeholder-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.tile:hover img { transform: scale(1.03); }
.tile-caption { position: absolute; inset: auto 0 0 0; padding: 28px 14px 12px; background: linear-gradient(to top, rgba(18, 19, 22, 0.78), rgba(18, 19, 22, 0)); color: #fff; font-size: 14px; font-weight: 600; }
.tile-grid[data-density="large"] .tile-caption { font-size: 17px; }
.tile-grid[data-density="compact"] .tile { border-radius: 6px; }
.tile-grid[data-density="compact"] .tile-caption { display: none; }

/* ---------- Search ---------- */
.search-hero { display: flex; gap: 10px; margin: 0 0 20px; }
.search-hero .nav-search { height: 52px; background: var(--surface); font-size: 16px; }
.member-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.member { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.member:hover { border-color: var(--ink); color: var(--ink); }
.member-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.member-text strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-text small { font-size: 13px; color: var(--muted); }
.member-text .belt { align-self: flex-start; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list .chip small { margin-left: 6px; color: var(--muted); font-weight: 500; }

/* ---------- Inbox ---------- */
.inbox { display: flex; flex-wrap: wrap; min-height: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.inbox-list { flex: 1 1 300px; min-width: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.inbox-list-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.inbox-list-head h1 { font-size: 32px; }
.threads { list-style: none; margin: 0; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.thread-link { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; }
.thread-link:hover { background: var(--ground); color: var(--ink); }
.thread-link[aria-current="page"] { background: var(--ground); }
.thread-link strong { flex: 1; font-size: 15px; }
.unread-dot { width: 10px; height: 10px; flex: none; border-radius: 999px; background: var(--accent); }
.inbox-pane { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; }
.pane-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.pane-head a { font-weight: 600; }
.pane-head small { display: block; color: var(--muted); font-size: 13px; }
.message-list { flex: 1; list-style: none; margin: 0; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-sunk); overflow-y: auto; max-height: 64vh; }
.message { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.message.mine { align-items: flex-end; }
.bubble { max-width: min(70%, 520px); padding: 10px 14px; border-radius: 16px; border-bottom-left-radius: 4px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.message.mine .bubble { background: var(--ink); border-color: var(--ink); color: #fff; border-radius: 16px; border-bottom-right-radius: 4px; }
.bubble img { margin-top: 8px; border-radius: 10px; max-height: 280px; }
.message time { font-size: 11px; color: var(--muted); padding: 0 4px; }
.composer { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.composer input[type="text"] { flex: 1; min-width: 0; min-height: var(--tap); padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 15px; }
.attach { position: relative; overflow: hidden; border: 1px solid var(--line-strong); }
.attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.attach.has-file { border-color: var(--accent); color: var(--accent); }
.pane-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px 24px; text-align: center; color: var(--muted); }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--surface); }
.auth-brand { flex: 1 1 420px; min-height: 320px; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; background: var(--ink); color: #fff; }
.auth-brand .brand, .auth-brand .brand:hover { color: #fff; }
.auth-brand .brand-mark { height: 48px; }
.auth-brand .brand-name { font-size: 30px; }
.auth-photo { flex: 1; min-height: 200px; border-radius: var(--radius-lg); background: #2A2C31 center / cover no-repeat; }
.auth-brand .auth-tagline { margin: 0; font-size: 56px; line-height: 0.95; color: #fff; }
.auth-brand p:not(.auth-tagline) { margin-top: 14px; max-width: 460px; color: #C9CBD0; line-height: 1.55; }
.auth-main { flex: 1 1 420px; padding: 48px var(--gutter); display: flex; align-items: center; justify-content: center; }
.auth-form { width: 100%; max-width: 400px; }
.auth-form h2 { font-size: 40px; }
.auth-form .lede { margin: 6px 0 24px; color: var(--muted); }
.auth-form a { color: var(--accent); font-weight: 600; }
.auth-form a:hover { color: var(--accent-hover); }
.auth-alt { margin-top: 18px; text-align: center; font-size: 15px; color: var(--muted-2); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }

/* ---------- Settings ---------- */
.settings-list { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 14px 24px; }
.settings-list dt { font-weight: 600; color: var(--muted-2); }
.settings-list dd { margin: 0; overflow-wrap: anywhere; }
.settings-email { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.settings-email h2 { margin-bottom: 12px; font-size: 18px; }
.settings-toggle { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.settings-toggle p { margin-top: 2px; font-size: 14px; }

/* ---------- Error pages ---------- */
.error-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px var(--gutter); text-align: center; }
.error-page .display { font-size: 96px; color: var(--accent); }

/* ---------- Batch upload ---------- */
.js-only { display: none; }
.has-js .js-only { display: revert; }
.has-js .btn.js-only { display: inline-flex; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 20px; border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface-sunk); text-align: center; color: var(--muted-2); transition: border-color 0.15s, background 0.15s; }
.dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.has-error { border-color: var(--accent); }
.dropzone-title { font-size: 17px; color: var(--ink); }
.dropzone .help { font-size: 13px; color: var(--muted); }
.has-js .dropzone-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dropzone-input input[type="file"] { font-size: 14px; max-width: 100%; }
.dropzone:has(input:focus-visible) .btn { outline: 3px solid var(--accent); outline-offset: 2px; }
.upload-count { font-size: 14px; font-weight: 600; color: var(--muted-2); }
.upload-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.upload-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.upload-item img { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: var(--radius-sm); background: var(--placeholder-1); }
.upload-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.upload-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-status { font-size: 13px; color: var(--muted); }
.upload-item.is-done .upload-status { color: var(--success-ink); font-weight: 600; }
.upload-item.is-failed { border-color: var(--accent-line); background: var(--accent-soft); }
.upload-item.is-failed .upload-status { color: var(--error-ink); font-weight: 600; }
.upload-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.upload-bar > span { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.15s; }
.upload-item.is-done .upload-bar > span { background: var(--success-ink); }
.upload-item.is-failed .upload-bar { display: none; }
.upload-item .icon-button { width: 40px; height: 40px; color: var(--muted-2); }
.upload-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--success-bg); color: var(--success-ink); font-weight: 600; }
.upload-summary.has-failures { background: var(--error-bg); color: var(--error-ink); }
.upload-summary p { flex: 1 1 220px; }
.upload-details { display: flex; flex-direction: column; gap: 18px; min-width: 0; margin: 0; padding: 0; border: 0; }
.upload-details[disabled] { opacity: 0.6; }
.upload-list[hidden], .upload-summary[hidden], .upload-item .icon-button[hidden] { display: none; }

/* ---------- Albums ---------- */
.album-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 4px 12px; border-radius: 999px; background: var(--ground); font-size: 13px; font-weight: 600; color: var(--muted-2); }
.album-link:hover { background: var(--accent-soft); color: var(--accent); }
.album-description { margin-top: 10px; max-width: 680px; color: var(--ink-2); white-space: pre-line; }
.album-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.album-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.album-card:hover { border-color: var(--ink); color: var(--ink); }
.album-cover { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--placeholder-2); color: var(--muted-2); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-meta { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.album-meta strong { font-size: 16px; }
.album-meta small { font-size: 13px; color: var(--muted); }

/* ---------- Blog ---------- */
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 16px; font-size: 14px; font-weight: 600; color: var(--muted-2); }
.empty-state { padding: 48px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); text-align: center; color: var(--muted); }
.empty-state h2 { margin-bottom: 8px; font-size: 20px; color: var(--ink); }
.empty-state .btn { margin-top: 16px; }
.blog-staff { display: flex; flex-wrap: wrap; gap: 8px; }
.post-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); }
.post-card:hover { border-color: var(--line-strong); color: var(--ink); }
.post-card:hover .post-card-title { color: var(--accent); }
.post-cover { display: block; aspect-ratio: 16 / 9; background: var(--placeholder-1); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-cover-blank { display: flex; align-items: flex-end; height: 100%; padding: 16px; background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 60%, var(--accent) 140%); color: #fff; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 28px; text-transform: uppercase; letter-spacing: 0.02em; }
.post-card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 16px 18px 18px; }
.post-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.post-card-title { font-size: 18px; line-height: 1.3; }
.post-card-summary { font-size: 14px; color: var(--muted); }
.post-meta { margin-top: auto; padding-top: 4px; font-size: 13px; color: var(--muted); }
@media (min-width: 960px) {
  .post-grid > li:has(.is-featured) { grid-column: 1 / -1; }
  .post-card.is-featured { flex-direction: row; }
  .post-card.is-featured .post-cover { flex: 0 0 58%; aspect-ratio: auto; min-height: 340px; }
  .post-card.is-featured .post-card-body { justify-content: center; padding: 32px; }
  .post-card.is-featured .post-card-title { font-size: 30px; }
  .post-card.is-featured .post-card-summary { font-size: 16px; }
  .post-card.is-featured .post-meta { margin-top: 8px; }
}
.post { max-width: 760px; margin: 0 auto; padding: 32px var(--gutter) 48px; }
.post-draft-note { margin-bottom: 20px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info-ink); font-size: 14px; }
.post-header { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 24px; }
.post-header .back-link { margin-bottom: 4px; }
.post-title { font-size: 52px; line-height: 1; }
.post-summary { font-size: 20px; line-height: 1.5; color: var(--ink-2); }
.post-header .post-meta { margin: 0; padding: 0; font-size: 14px; }
.post-cover-full { margin: 0 0 28px; }
.post-cover-full img { width: 100%; border-radius: var(--radius-lg); }
.post-cover-full figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.prose { font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.8em; font-size: 26px; line-height: 1.25; color: var(--ink); }
.prose h3 { margin-top: 1.5em; font-size: 21px; color: var(--ink); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { padding-left: 18px; border-left: 4px solid var(--accent); color: var(--ink); font-style: italic; }
.prose img { border-radius: var(--radius); }
.prose pre { overflow-x: auto; padding: 16px; border-radius: var(--radius-sm); background: var(--ground); font-size: 15px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.prose + .prose { margin-top: 1.1em; }
.prose.is-locked { position: relative; max-height: none; }
.prose.is-locked::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(to bottom, rgba(243, 243, 241, 0), var(--ground)); pointer-events: none; }
.paywall { margin-top: 8px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-align: center; }
.paywall h2 { font-size: 24px; }
.paywall p { margin: 8px auto 0; max-width: 460px; color: var(--muted); }
.paywall-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.share { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.share h2 { margin-bottom: 12px; font-size: 16px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-buttons .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.share-buttons [hidden] { display: none; }
.share-status { min-height: 1.4em; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--success-ink); }
.share-staff { margin-top: 12px; padding: 12px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); font-size: 14px; }
.share-staff summary { cursor: pointer; font-weight: 600; color: var(--muted-2); }
.share-staff textarea { display: block; width: 100%; margin: 12px 0 8px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; resize: vertical; }
.post-ai-note { margin-top: 32px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.post-sources { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.post-sources h2 { font-size: 16px; margin-bottom: 10px; }
.post-sources ol { padding-left: 1.3em; font-size: 14px; color: var(--muted); }
.post-sources li + li { margin-top: 6px; }
.post-sources a { color: var(--ink-2); overflow-wrap: anywhere; }
.post-related { padding-top: 8px; }
.post-related h2 { font-size: 28px; margin-bottom: 16px; }

/* ---------- Landing page ---------- */
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ground); color: var(--ink); }
.soon { display: inline-flex; align-items: center; margin-left: 6px; padding: 3px 10px; border-radius: 999px; background: var(--info-bg); color: var(--info-ink); font-family: var(--font-body, inherit); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; white-space: nowrap; }
.landing { background: var(--surface); }
.lp-wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.lp-section { padding-top: 80px; padding-bottom: 40px; }
.lp-h2 { font-size: 48px; line-height: 1; margin-bottom: 12px; }
.lp-sub { margin-bottom: 36px; max-width: 640px; font-size: 18px; color: var(--muted-2); }
.lp-hero { background: var(--ground); }
.lp-hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 80px; }
.lp-hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.lp-eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.lp-hero-title { font-size: clamp(44px, 6vw, 76px); line-height: 0.95; }
.lp-lede { max-width: 560px; font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.lp-assurance { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted-2); }
.lp-hero-art { flex: 1 1 420px; min-width: 0; position: relative; min-height: 460px; display: flex; align-items: center; justify-content: center; }
.lp-hero-logo { position: absolute; right: 0; top: 0; width: 300px; height: auto; }
.lp-hero-card { position: relative; width: 300px; margin: 120px 120px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 18px 40px rgba(18, 19, 22, 0.14); }
.lp-hero-photo { height: 180px; display: flex; align-items: flex-end; padding: 14px 16px; background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 55%, var(--accent) 150%); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 26px; text-transform: uppercase; }
.lp-hero-card-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; }
.lp-hero-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.lp-hero-meta .muted { flex: 1; }
.lp-belt { display: inline-flex; height: 20px; border-radius: 4px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.18); }
.lp-belt span:first-child { display: flex; align-items: center; padding: 0 7px; background: #1F4FB8; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
.lp-belt span:last-child { width: 18px; background: var(--ink); }
.lp-styles { background: var(--ink); color: #fff; }
.lp-styles-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding-top: 36px; padding-bottom: 36px; }
.lp-styles h2 { font-size: 26px; flex: none; }
.lp-styles ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 520px; }
.lp-styles li { padding: 8px 14px; border: 1px solid var(--muted-2); border-radius: 999px; font-size: 14px; }
.lp-styles .muted-light { color: #C9CBD0; }
.lp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.lp-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.lp-card h3 { font-size: 21px; }
.lp-card ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.lp-card-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 36px 40px; }
.lp-feature { display: flex; gap: 16px; }
.lp-feature > .icon { flex: none; width: 28px; height: 28px; }
.lp-feature h3 { margin-bottom: 6px; font-size: 19px; }
.lp-feature p { color: var(--ink-2); }
.lp-how { margin-top: 60px; background: var(--ground); }
.lp-how .lp-section { padding-bottom: 80px; }
.lp-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.lp-steps li { display: flex; flex-direction: column; gap: 10px; padding: 28px; background: var(--surface); border-radius: var(--radius-lg); }
.lp-steps h3 { font-size: 20px; }
.lp-steps p { color: var(--ink-2); }
.lp-step-num { font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 1; color: var(--accent); }
.lp-founder { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; padding: 36px; border: 1px solid var(--line); border-radius: 18px; }
.lp-founder-mark { flex: none; width: 104px; height: auto; padding: 8px; }
.lp-founder > div { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lp-founder h2 { font-size: 34px; line-height: 1.05; }
.lp-founder p { font-size: 17px; color: var(--ink-2); }
.lp-blog-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.lp-ea { margin-top: 60px; background: var(--ink); color: #fff; scroll-margin-top: 72px; }
.lp-ea-inner { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 80px; padding-bottom: 80px; }
.lp-ea-copy { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.lp-ea-copy h2 { font-size: 52px; line-height: 0.95; }
.lp-ea-copy p { font-size: 18px; color: #E6E7EA; }
.lp-ea-panel { flex: 1 1 520px; min-width: 0; padding: 32px; border-radius: 18px; background: var(--surface); color: var(--ink); }
.lp-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
fieldset.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-chip { position: relative; display: inline-flex; }
.lp-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lp-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; }
.lp-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.lp-chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.lp-ea .field-radio-list { flex-direction: row; flex-wrap: wrap; }
.lp-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lp-fineprint { font-size: 13px; color: var(--muted-2); }
.lp-fineprint a { color: var(--accent); text-decoration: underline; }
.lp-ea-done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 0; outline: none; }
.lp-ea-done h3 { font-size: 24px; }
.lp-ea-done p { color: var(--ink-2); }
.lp-ea-check { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 999px; background: var(--success-bg); color: var(--success-ink); }
.lp-faq { max-width: 860px; margin: 0 auto; padding: 88px var(--gutter); }
.lp-faq-list { margin-top: 28px; border-top: 1px solid var(--line); }
.lp-faq details { padding: 18px 0; border-bottom: 1px solid var(--line); }
.lp-faq summary { min-height: 32px; font-size: 18px; font-weight: 600; cursor: pointer; }
.lp-faq details p { margin-top: 12px; color: var(--ink-2); }
.site-footer { border-top: 1px solid var(--line); background: var(--ground); }
.site-footer-inner { max-width: 1200px; margin: 0 auto; padding: 32px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; font-size: 14px; color: var(--muted-2); }
.site-footer-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer a { padding: 8px 0; color: var(--muted-2); }
.site-footer a:hover { color: var(--accent); }
.legal .prose h2 { font-size: 22px; }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }
.mobile-only { display: none !important; }

@media (max-width: 719px) {
  :root { --gutter: 16px; }
  body { padding-bottom: 76px; }
  .site-nav { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .brand-name { font-size: 22px; }
  .brand-mark { height: 32px; }
  .nav-links, .nav-search, .nav-actions .hide-mobile { display: none; }
  .page, .page-narrow { padding-top: 20px; }
  .post { padding-top: 20px; }
  .post-title { font-size: 38px; }
  .post-summary { font-size: 18px; }
  .prose { font-size: 17px; }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .public-nav .btn { min-height: 38px; padding: 0 12px; font-size: 14px; }
  .lp-section { padding-top: 56px; padding-bottom: 24px; }
  .lp-h2 { font-size: 36px; }
  .lp-hero-inner { padding-top: 40px; padding-bottom: 48px; gap: 32px; }
  .lp-hero-art { min-height: 340px; }
  .lp-hero-logo { width: 200px; }
  .lp-hero-card { width: 250px; margin: 110px 60px 0 0; }
  .lp-features { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .lp-ea-copy h2 { font-size: 40px; }
  .lp-ea-inner { padding-top: 56px; padding-bottom: 56px; gap: 28px; }
  .lp-ea-panel { padding: 22px 18px; }
  .lp-founder { padding: 24px; gap: 20px; }
  .lp-faq { padding-top: 56px; padding-bottom: 56px; }
  .page-title { font-size: 34px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 0 var(--gutter); }
  .chip { flex: none; }
  .toolbar .density-label, .toolbar .segmented span { display: none; }
  .segmented button { width: var(--tap); justify-content: center; padding: 0; }

  /* On phones the density levels mean 3, 2 or 1 photos per row. */
  .gallery { columns: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gallery[data-density="compact"] { columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .gallery[data-density="large"] { columns: auto; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .gallery .card, .gallery[data-density] .card { margin: 0; }
  .gallery:not([data-density="large"]) .card-media { aspect-ratio: 4 / 5; }
  .gallery[data-density="compact"] .card-media { aspect-ratio: 1; }
  .gallery:not([data-density="large"]) .card-media img { height: 100%; object-fit: cover; }
  .gallery:not([data-density="large"]) .card-meta, .gallery:not([data-density="large"]) .card-tags { display: none; }
  .gallery:not([data-density="large"]) .card-body { padding: 8px 10px 10px; }
  .gallery:not([data-density="large"]) .card-title { font-size: 13px; }
  .gallery[data-density="compact"] .card { border: 0; border-radius: 4px; }
  .gallery[data-density="compact"] .card-body { display: none; }

  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile-grid[data-density="compact"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .tile-grid[data-density="large"] { grid-template-columns: minmax(0, 1fr); gap: 16px; }

  .photo-stage { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; }
  .photo-panel { padding: 18px; }
  .photo-title { font-size: 28px; }
  .profile-hero-inner { padding-top: 28px; gap: 18px; }
  .avatar-xl { width: 96px; height: 96px; font-size: 32px; }
  .profile-name { font-size: 38px; }
  .profile-cta { justify-content: flex-start; }
  .inbox { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; border-left: 0; border-right: 0; }
  .inbox-list { border-right: 0; }
  .inbox.is-thread .inbox-list { display: none; }
  .inbox:not(.is-thread) .inbox-pane { display: none; }
  .message-list { max-height: none; }
  .auth-brand { padding: 28px var(--gutter); min-height: 0; }
  .auth-photo { display: none; }
  .auth-brand .auth-tagline { font-size: 40px; }
  .form-card { padding: 20px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }

  .mobile-only { display: inline-flex !important; }
  .tabbar { position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; font-size: 11px; font-weight: 500; color: var(--muted-2); }
  .tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; }
  .tabbar .tab-upload span { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 999px; background: var(--accent); color: #fff; }
  .tabbar .count-badge { top: 2px; right: calc(50% - 22px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
