/* MakerCurrent design system.
   Voice: a clean workshop. Teal "current" for actions, filament orange for what's hot,
   layer-line texture from 3D-printed surfaces. Type chosen for legibility first:
   Atkinson Hyperlegible (Braille Institute) for reading, Archivo for headings. */

:root {
  --paper: #f2f6f5;
  --surface: #ffffff;
  --surface-2: #e8efee;
  --surface-3: #dce6e5;
  --ink: #0f2229;
  --ink-2: #384e55;
  --ink-3: #566a70;
  --line: #cbd8d7;
  --line-strong: #9fb3b3;
  --brand: #0a6870;
  --brand-strong: #06525a;
  --brand-soft: #d5ebeb;
  --brand-ink: #ffffff;
  --accent: #f26b21;
  --accent-strong: #c24f10;
  --accent-soft: #fde4d4;
  --accent-ink: #1d1006;
  --good: #1c7339;
  --good-soft: #dcf0e2;
  --warn: #875600;
  --warn-soft: #fbeccb;
  --bad: #b3261e;
  --bad-soft: #fbe0dd;
  --info: #1d5bb0;
  --info-soft: #dde8f8;
  --focus: #f26b21;
  --shadow: 0 1px 2px rgba(15, 34, 41, .06), 0 4px 16px rgba(15, 34, 41, .06);
  --shadow-lg: 0 10px 40px rgba(15, 34, 41, .16);
  --radius: 14px;
  --radius-sm: 9px;
  --plate: #e4ecea;
  --plate-line: rgba(10, 104, 112, .07);
  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 3.2vw, 32px);
  --max: 1220px;
  --header-h: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a1417;
    --surface: #101e22;
    --surface-2: #16282d;
    --surface-3: #1d343a;
    --ink: #e2eded;
    --ink-2: #b4c6c8;
    --ink-3: #93a8ab;
    --line: #25393e;
    --line-strong: #3b5358;
    --brand: #4fc1c8;
    --brand-strong: #7fd5da;
    --brand-soft: #113a3f;
    --brand-ink: #04272a;
    --accent: #ff8a4c;
    --accent-strong: #ffa575;
    --accent-soft: #3a2116;
    --accent-ink: #1d1006;
    --good: #5fcf85;
    --good-soft: #143322;
    --warn: #f2bd52;
    --warn-soft: #362a10;
    --bad: #ff8a80;
    --bad-soft: #3d1a17;
    --info: #86b4ff;
    --info-soft: #172a47;
    --focus: #ff9d66;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
    --plate: #13262a;
    --plate-line: rgba(79, 193, 200, .07);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0a1417;
  --surface: #101e22;
  --surface-2: #16282d;
  --surface-3: #1d343a;
  --ink: #e2eded;
  --ink-2: #b4c6c8;
  --ink-3: #93a8ab;
  --line: #25393e;
  --line-strong: #3b5358;
  --brand: #4fc1c8;
  --brand-strong: #7fd5da;
  --brand-soft: #113a3f;
  --brand-ink: #04272a;
  --accent: #ff8a4c;
  --accent-strong: #ffa575;
  --accent-soft: #3a2116;
  --accent-ink: #1d1006;
  --good: #5fcf85;
  --good-soft: #143322;
  --warn: #f2bd52;
  --warn-soft: #362a10;
  --bad: #ff8a80;
  --bad-soft: #3d1a17;
  --info: #86b4ff;
  --info-soft: #172a47;
  --focus: #ff9d66;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
  --plate: #13262a;
  --plate-line: rgba(79, 193, 200, .07);
  color-scheme: dark;
}

@media (prefers-contrast: more) {
  :root { --line: #6f8587; --ink-3: #3b5056; --ink-2: #22363c; }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; }
html[data-text-size="large"] { font-size: 118.75%; }
html[data-text-size="xlarge"] { font-size: 131.25%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--brand-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); font-stretch: 112%; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.45rem); font-weight: 820; }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.65rem); font-weight: 780; }
h3 { font-size: 1.12rem; font-weight: 740; }
h4 { font-size: 1rem; font-weight: 720; }
p { margin: 0; }
p + p { margin-top: .75em; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); color: var(--ink); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 1rem); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, .75rem); }
.row.nowrap { flex-wrap: nowrap; }
.spread { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--ink-3); }
.small { font-size: .88rem; }
.tiny { font-size: .78rem; }
.strong { font-weight: 700; }
.nums { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prose { max-width: 68ch; }
.prose p, .prose li { color: var(--ink); }
.prewrap { white-space: pre-line; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

/* ------------------------------------------------------------- the shell */

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: clamp(.6rem, 1.6vw, 1.25rem); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); flex: none; border-radius: 10px; }
.brand svg { width: 36px; height: 36px; }
.brand-name { font-family: var(--font-display); font-weight: 850; font-stretch: 125%; font-size: 1.12rem; letter-spacing: -.02em; }
.brand-name b { color: var(--brand); font-weight: inherit; }
.header-search { flex: 1 1 auto; min-width: 0; max-width: 640px; }
.searchbox { display: flex; align-items: stretch; background: var(--surface-2); border: 2px solid transparent; border-radius: 999px; transition: border-color .15s, background .15s; }
.searchbox:focus-within { border-color: var(--brand); background: var(--surface); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--ink); padding: .62rem 0 .62rem 1.05rem; outline: none; }
.searchbox input::placeholder { color: var(--ink-3); }
.searchbox button { border: 0; background: var(--brand); color: var(--brand-ink); border-radius: 999px; margin: 4px; padding: 0 1rem; display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 700; cursor: pointer; }
.searchbox button:hover { background: var(--brand-strong); }
.header-actions { display: flex; align-items: center; gap: .35rem; flex: none; }
.header-actions .btn-ghost { padding-inline: .7rem; }
.avatar-btn { border: 0; background: none; padding: 3px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); font: inherit; }
.avatar-btn:hover { background: var(--surface-2); }
.menu { position: relative; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; max-width: min(320px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: .4rem; z-index: 40;
}
.menu-panel a, .menu-panel button { display: flex; width: 100%; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 9px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); }
.menu-panel .sep { height: 1px; background: var(--line); margin: .35rem .2rem; }
.menu-panel .who { padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .35rem; }

.section-nav { border-top: 1px solid var(--line); }
.section-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; }
.section-nav ul::-webkit-scrollbar { display: none; }
.section-nav a {
  display: inline-flex; align-items: center; gap: .45rem; padding: .7rem .9rem; color: var(--ink-2); text-decoration: none;
  font-weight: 650; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.section-nav a:hover { color: var(--ink); }
.section-nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.count-badge { display: inline-grid; place-items: center; min-width: 1.35em; height: 1.35em; padding: 0 .35em; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 800; line-height: 1; }

main { display: block; padding-block: clamp(1.25rem, 3vw, 2.25rem) 5.5rem; min-height: 60vh; }
main:focus { outline: none; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: none;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem .2rem .45rem; color: var(--ink-3); text-decoration: none; font-size: .74rem; font-weight: 700; position: relative; }
.bottom-nav a .icon { width: 1.45rem; height: 1.45rem; }
.bottom-nav a[aria-current="page"] { color: var(--brand); }
.bottom-nav .count-badge { position: absolute; top: 3px; left: calc(50% + 6px); }
.bottom-nav .create a { color: var(--accent-strong); }

@media (max-width: 760px) {
  .bottom-nav { display: block; }
  .section-nav { display: none; }
  .header-row { flex-wrap: wrap; padding-block: .55rem; gap: .55rem; min-height: 0; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .brand-name { font-size: 1rem; }
  .header-actions .hide-sm { display: none; }
  main { padding-bottom: 6.5rem; }
}

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 2rem 6rem; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.5rem; }
.site-footer h2 { font-size: .95rem; margin-bottom: .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.site-footer a { color: var(--ink-2); }
.display-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* --------------------------------------------------------------- buttons */
.btn {
  --b: var(--surface); --c: var(--ink); --bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .55rem 1.05rem; border-radius: 999px; border: 1.5px solid var(--bd);
  background: var(--b); color: var(--c); font: inherit; font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { --b: var(--surface-2); color: var(--c); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { --b: var(--brand); --c: var(--brand-ink); --bd: var(--brand); }
.btn-primary:hover { --b: var(--brand-strong); --bd: var(--brand-strong); }
.btn-accent { --b: var(--accent); --c: var(--accent-ink); --bd: var(--accent); }
.btn-accent:hover { --b: var(--accent-strong); --bd: var(--accent-strong); --c: #fff; }
.btn-ghost { --b: transparent; --bd: transparent; }
.btn-ghost:hover { --b: var(--surface-2); }
.btn-danger { --c: var(--bad); --bd: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn-danger:hover { --b: var(--bad-soft); }
.btn-sm { min-height: 36px; padding: .35rem .8rem; font-size: .9rem; }
.btn-lg { min-height: 52px; padding: .75rem 1.5rem; font-size: 1.08rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn[aria-pressed="true"] { color: var(--accent-strong); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }

/* ----------------------------------------------------------------- forms */
.field { display: grid; gap: .35rem; }
.field > label, .label { font-weight: 700; }
.field .hint, .hint { color: var(--ink-3); font-size: .88rem; }
.field .error, .form-error { color: var(--bad); font-weight: 650; font-size: .92rem; }
.form-error:empty { display: none; }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: .62rem .8rem; min-height: 46px;
}
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); }
input[type="checkbox"], input[type="radio"] { width: 1.2rem; height: 1.2rem; accent-color: var(--brand); margin: 0; flex: none; }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.check input { margin-top: .2rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem 1.2rem; margin: 0; display: grid; gap: 1rem; background: var(--surface); }
.fieldset > legend { font-family: var(--font-display); font-stretch: 112%; font-weight: 760; font-size: 1.05rem; padding: 0 .4rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.choice span { display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-weight: 650; min-height: 44px; }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.kind-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.kind-card { display: grid; gap: .3rem; padding: 1rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.kind-card:hover { border-color: var(--brand); color: var(--ink); }
.kind-card .icon { width: 1.6rem; height: 1.6rem; color: var(--brand); }

/* who-can-see switch */
.vis { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.vis label { position: relative; display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .75rem; font-size: .86rem; font-weight: 700; cursor: pointer; color: var(--ink-2); min-height: 36px; }
.vis input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.vis label:has(input:checked) { background: var(--ink); color: var(--paper); }
.vis label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -3px; }

.seg { display: inline-flex; flex-wrap: wrap; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 2px; }
.seg a, .seg button { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: none; color: var(--ink-2); padding: .45rem .8rem; border-radius: 9px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; min-height: 38px; }
.seg a[aria-current="page"], .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg .icon { width: 1.1rem; height: 1.1rem; }

/* ----------------------------------------------------------- page chrome */
.page-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.page-head p { color: var(--ink-2); margin-top: .35rem; max-width: 62ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .88rem; color: var(--ink-3); margin-bottom: .6rem; }
.crumbs a { color: var(--ink-2); }
.section { margin-top: 2.5rem; }
.section-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; }
.section-head a { font-weight: 700; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 1.25rem; scrollbar-width: thin; }
.tabs a { padding: .6rem .9rem; color: var(--ink-2); text-decoration: none; font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; gap: .4rem; align-items: center; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
.two-col.wide-side { grid-template-columns: minmax(0, 1fr) 380px; }
.side-col { display: grid; gap: 1rem; position: sticky; top: calc(var(--header-h) + 60px); }
@media (max-width: 980px) { .two-col, .two-col.wide-side { grid-template-columns: 1fr; } .side-col { position: static; } }
.layout-sidebar { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.75rem; align-items: start; }
@media (max-width: 860px) { .layout-sidebar { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; }
.panel-tight { padding: .85rem 1rem; }
.panel h2, .panel h3 { margin-bottom: .6rem; }
.notice { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--radius-sm); background: var(--info-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); }
.notice .icon { color: var(--info); margin-top: .1rem; }
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.notice.warn .icon { color: var(--warn); }
.notice.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.notice.good .icon { color: var(--good); }
.notice.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.notice.bad .icon { color: var(--bad); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.kv.nums dd { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ home */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--brand-soft);
  background-image: repeating-linear-gradient(0deg, var(--plate-line) 0 2px, transparent 2px 7px);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.hero h1 { max-width: 20ch; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 52ch; margin-top: .6rem; }
.hero .searchbox { margin-top: 1.4rem; background: var(--surface); border-color: var(--line); max-width: 720px; }
.hero .searchbox input { padding-block: .95rem; font-size: 1.1rem; }
.hero .searchbox button { padding-inline: 1.3rem; font-size: 1.02rem; }
.try { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; align-items: center; }
.try .muted { margin-right: .2rem; }
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.door { display: grid; gap: .45rem; align-content: start; padding: 1.2rem 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.door:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-2px); }
.door .icon { width: 2rem; height: 2rem; color: var(--accent-strong); }
.door h2 { font-size: 1.2rem; }
.door p { color: var(--ink-2); }
.whatsnew { border-radius: var(--radius); border: 2px solid var(--ink); background: var(--surface); overflow: hidden; }
.whatsnew-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem 1rem; background: var(--ink); color: var(--paper); }
.whatsnew-head h2 { font-size: 1rem; letter-spacing: .02em; }
.whatsnew-head a { color: var(--paper); font-weight: 700; font-size: .9rem; }
.whatsnew ol { list-style: none; margin: 0; padding: .4rem 1rem 1rem; display: grid; }
.whatsnew li { padding: .75rem 0; border-bottom: 1px dashed var(--line); }
.whatsnew li:last-child { border-bottom: 0; }
.whatsnew li h3 { font-size: 1rem; }

/* ---------------------------------------------------------------- chips */
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .75rem; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink); font-weight: 650; font-size: .9rem; text-decoration: none; cursor: pointer; font-family: inherit; min-height: 36px; }
.chip:hover { border-color: var(--brand); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip.soft { background: var(--surface-2); border-color: transparent; }
.chip-x { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 12%, transparent); font-size: .8rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { display: inline-flex; padding: .12rem .55rem; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: .82rem; font-weight: 650; text-decoration: none; }
a.tag:hover { background: var(--brand-soft); color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 6px; font-size: .76rem; font-weight: 800; letter-spacing: .02em; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); }
.badge.accent { background: var(--accent-soft); color: var(--accent-strong); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.ink { background: var(--ink); color: var(--paper); }
.badge .icon { width: 1em; height: 1em; }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .65rem; border-radius: 999px; font-size: .82rem; font-weight: 750; background: var(--surface-2); color: var(--ink-2); }
.pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.brand { background: var(--brand-soft); color: var(--brand-strong); }
.swatch { display: inline-block; width: .95rem; height: .95rem; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); vertical-align: -.15em; }

/* ------------------------------------------------------------ avatars */
.avatar { --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-stretch: 112%; color: #fff; font-size: calc(var(--s) * .42); overflow: hidden; background: var(--brand); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { --s: 28px; }
.avatar.lg { --s: 64px; }
.avatar.xl { --s: 104px; }
.by { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink-2); text-decoration: none; font-weight: 650; min-width: 0; }
.by:hover { color: var(--ink); }

/* ---------------------------------------------------------- result views */
.results { display: grid; gap: 1rem; }
.results.grid { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.results.visual { grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 1.25rem; }
.results.compact { grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: .6rem; }
.results.list { grid-template-columns: 1fr; gap: .6rem; }

.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card .stretched { position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.card .stretched:focus-visible { outline-offset: -3px; }
.card .above { position: relative; z-index: 2; }
.thumb { position: relative; aspect-ratio: 4 / 3; background: var(--plate); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); background-image: repeating-linear-gradient(0deg, var(--plate-line) 0 2px, transparent 2px 7px); }
.thumb .placeholder .icon { width: 2.4rem; height: 2.4rem; opacity: .7; }
.thumb .corner { position: absolute; top: .55rem; left: .55rem; display: flex; gap: .3rem; flex-wrap: wrap; }
.thumb .corner-r { position: absolute; top: .55rem; right: .55rem; }
.card-body { display: grid; gap: .35rem; padding: .8rem .9rem .9rem; align-content: start; flex: 1; }
.card-title { font-family: var(--font-display); font-stretch: 106%; font-weight: 730; font-size: 1.02rem; line-height: 1.25; color: var(--ink); }
.card .spec { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: .15rem .6rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .25rem; }
.price { font-family: var(--font-display); font-stretch: 112%; font-weight: 820; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.price.free { color: var(--good); }
.stat { display: inline-flex; align-items: center; gap: .25rem; color: var(--ink-3); font-size: .84rem; font-variant-numeric: tabular-nums; }
.stat .icon { width: 1rem; height: 1rem; }

.results.compact .card-body { padding: .5rem .6rem .6rem; gap: .15rem; }
.results.compact .card-title { font-size: .9rem; }
.results.compact .spec, .results.compact .by, .results.compact .card-foot .stat { display: none; }
.results.compact .thumb { aspect-ratio: 1; }
.results.visual .thumb { aspect-ratio: 16 / 11; }
.results.visual .card-title { font-size: 1.15rem; }
.results.list .card { flex-direction: row; align-items: stretch; }
.results.list .thumb { width: clamp(96px, 22vw, 150px); aspect-ratio: 4 / 3; flex: none; }
.results.list .card-body { padding: .7rem .9rem; }
.results.list .summary-line { display: block; }
.summary-line { display: none; color: var(--ink-2); font-size: .92rem; }
.results.visual .summary-line { display: block; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); background: var(--surface-2); font-weight: 800; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .thumb-sm { width: 56px; height: 42px; border-radius: 8px; overflow: hidden; background: var(--plate); display: block; }
.table .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }

.person-card .card-body { grid-template-columns: auto 1fr; align-items: center; column-gap: .8rem; }
.person-card .person-meta { grid-column: 1 / -1; display: grid; gap: .35rem; }
.tag-card { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 700; }
.tag-card:hover { border-color: var(--brand); color: var(--ink); }

/* ---------------------------------------------------------- search page */
.search-head { display: grid; gap: .9rem; margin-bottom: 1.25rem; }
.search-head h1 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
.understood { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; padding: .6rem 0; border-block: 1px solid var(--line); margin-bottom: 1.1rem; }
.toolbar .row { gap: .5rem; }
.toolbar select { width: auto; min-height: 40px; padding-block: .35rem; }
.filters { display: grid; gap: 1.1rem; }
.filters details { border-bottom: 1px solid var(--line); padding-bottom: .9rem; }
.filters summary { cursor: pointer; font-weight: 750; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary::after { content: "+"; font-size: 1.2rem; color: var(--ink-3); }
.filters details[open] summary::after { content: "–"; }
.filters .opts { display: grid; gap: .45rem; margin-top: .6rem; }
.filters-toggle { display: none; }
@media (max-width: 860px) {
  .filters-toggle { display: inline-flex; }
  .filters-panel { display: none; }
  .filters-panel.open { display: block; }
}
.pager { display: flex; justify-content: center; gap: .6rem; margin-top: 1.75rem; }

/* ------------------------------------------------------------ item page */
.item-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 980px) { .item-layout { grid-template-columns: 1fr; } }
.viewer { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--plate); aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.viewer canvas { width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.viewer .viewer-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viewer-bar { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; justify-content: space-between; margin-top: .65rem; }
.viewer-status { position: absolute; left: .75rem; bottom: .75rem; background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: 10px; padding: .35rem .65rem; font-size: .85rem; font-weight: 650; }
.viewer .dims-tag { position: absolute; right: .75rem; bottom: .75rem; font-family: var(--font-mono); font-size: .8rem; background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: 8px; padding: .25rem .55rem; }
.color-swatches { display: flex; gap: .3rem; flex-wrap: wrap; }
.color-swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line-strong); cursor: pointer; padding: 0; }
.color-swatches button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
.item-title h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.buy-box { display: grid; gap: .9rem; }
.license-box { border: 2px solid var(--ink); border-radius: var(--radius); padding: 1rem 1.1rem; background: var(--surface); }
.license-box h3 { display: flex; justify-content: space-between; gap: .5rem; align-items: center; flex-wrap: wrap; }
.license-box ul { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .3rem; }
.license-box li { display: flex; gap: .5rem; align-items: flex-start; }
.license-box li .icon { margin-top: .12rem; }
.license-box .yes .icon { color: var(--good); }
.license-box .must .icon { color: var(--info); }
.license-box .no .icon { color: var(--bad); }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.file-list li { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.file-ext { font-family: var(--font-mono); font-weight: 700; font-size: .75rem; background: var(--ink); color: var(--paper); border-radius: 6px; padding: .2rem .45rem; flex: none; }
.maker-row { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.maker-row:last-child { border-bottom: 0; }
@media (max-width: 520px) { .maker-row { grid-template-columns: auto 1fr; } .maker-row > :last-child { grid-column: 1 / -1; } }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: .45rem 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.spec-table th { color: var(--ink-3); font-weight: 600; width: 42%; }
.spec-table td { font-weight: 650; }
.stars { display: inline-flex; gap: 1px; color: var(--accent); vertical-align: -.1em; }
.stars .icon { width: 1.05em; height: 1.05em; }
.stars .off { color: var(--line-strong); }
.review { padding: 1rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .4rem; }
.review:last-child { border-bottom: 0; }

/* ---------------------------------------------------------- seller stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; }
.stat-tile { background: var(--surface-2); border-radius: var(--radius-sm); padding: .7rem .8rem; display: grid; gap: .1rem; }
.stat-tile b { font-family: var(--font-display); font-stretch: 112%; font-size: 1.35rem; font-weight: 820; font-variant-numeric: tabular-nums; }
.stat-tile span { color: var(--ink-3); font-size: .82rem; font-weight: 650; }
.no-history { display: flex; gap: .6rem; align-items: center; padding: .75rem .9rem; border-radius: var(--radius-sm); background: var(--info-soft); font-weight: 650; }

/* ------------------------------------------------------------- profile */
.profile-head { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center; padding: 1.5rem; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--brand-soft), var(--brand-soft) 70px, transparent 70px); }
.profile-head .avatar { box-shadow: 0 0 0 5px var(--surface); }
.profile-head h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.handle { font-family: var(--font-mono); color: var(--ink-3); font-weight: 600; }
@media (max-width: 620px) { .profile-head { grid-template-columns: 1fr; } }

/* -------------------------------------------------------- order tracker */
.tracker { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); gap: .35rem; counter-reset: stage; }
.tracker li { display: grid; gap: .45rem; font-size: .84rem; font-weight: 700; color: var(--ink-3); text-align: center; }
.tracker li::before { content: ""; height: 10px; border-radius: 999px; background: var(--surface-3);
  background-image: repeating-linear-gradient(90deg, transparent 0 5px, color-mix(in srgb, var(--surface) 55%, transparent) 5px 7px); }
.tracker li.done::before { background-color: var(--brand); }
.tracker li.now::before { background-color: var(--accent); }
.tracker li.done, .tracker li.now { color: var(--ink); }
.tracker li.now { color: var(--accent-strong); }
@media (max-width: 560px) {
  .tracker { grid-template-columns: 1fr; }
  .tracker li { grid-template-columns: 14px 1fr; text-align: left; align-items: center; }
  .tracker li::before { height: 14px; width: 14px; }
}
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.timeline li { display: grid; grid-template-columns: 12px 1fr; gap: .75rem; }
.timeline li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; margin-top: .35rem; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.before-you-buy { border: 2px solid var(--accent); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.before-you-buy header { background: var(--accent-soft); padding: .75rem 1.1rem; display: flex; gap: .5rem; align-items: center; }
.before-you-buy .kv { padding: 1rem 1.1rem; }
.total-line { border-top: 2px solid var(--ink); padding-top: .5rem; margin-top: .25rem; }

/* ------------------------------------------------------------ messages */
.inbox { display: grid; grid-template-columns: 330px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; min-height: 520px; }
@media (max-width: 860px) { .inbox { grid-template-columns: 1fr; } .inbox.has-thread .inbox-list { display: none; } .inbox:not(.has-thread) .inbox-thread { display: none; } }
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 72vh; }
.inbox-list a { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); align-items: center; }
.inbox-list a:hover { background: var(--surface-2); }
.inbox-list a[aria-current="page"] { background: var(--brand-soft); }
.inbox-thread { display: flex; flex-direction: column; min-height: 520px; }
.thread-head { padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.thread { flex: 1; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; overflow-y: auto; max-height: 56vh; }
.bubble { max-width: min(78%, 560px); padding: .6rem .85rem; border-radius: 16px; background: var(--surface-2); align-self: flex-start; white-space: pre-line; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.bubble:not(.mine) { border-bottom-left-radius: 4px; }
.bubble .meta { display: block; font-size: .75rem; opacity: .8; margin-top: .2rem; }
.composer { border-top: 1px solid var(--line); padding: .8rem 1rem; display: flex; gap: .6rem; align-items: flex-end; }
.composer textarea { min-height: 46px; height: 46px; }

/* ---------------------------------------------------------------- misc */
.empty { text-align: center; padding: 2.5rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); display: grid; gap: .6rem; justify-items: center; }
.empty .icon { width: 2.4rem; height: 2.4rem; color: var(--ink-3); }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.loading-card { height: 250px; }
.tree { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tree ul { list-style: none; margin: 0; padding-left: 1.1rem; display: grid; gap: 2px; }
.tree a { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border-radius: 9px; text-decoration: none; color: var(--ink); font-weight: 650; }
.tree a:hover { background: var(--surface-2); }
.tree a[aria-current="page"] { background: var(--brand-soft); }
.progress { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: grid; gap: .5rem; width: min(520px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: var(--paper); padding: .8rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: .7rem; align-items: center; font-weight: 650; animation: toast-in .2s ease; }
.toast.bad { background: var(--bad); color: #fff; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
dialog.dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.dialog::backdrop { background: rgba(8, 20, 24, .55); }
.dialog-body { padding: 1.3rem 1.4rem; display: grid; gap: 1rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.help-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.help-list section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.help-list ul { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .45rem; }
.privacy-class { border-left: 5px solid var(--c, var(--brand)); padding-left: .9rem; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: grid; gap: .15rem; }
.metric b { font-family: var(--font-display); font-stretch: 112%; font-weight: 820; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.metric span { color: var(--ink-3); font-weight: 650; font-size: .88rem; }
.metric.attn { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.panel.attn { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.dev-banner { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: .9rem 1.1rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.dev-banner a { color: var(--paper); }
.ledger-amt.neg { color: var(--bad); }
.ledger-amt.pos { color: var(--good); }
.balance-card { display: grid; gap: .5rem; }
.balance-card .big { font-family: var(--font-display); font-stretch: 112%; font-weight: 850; font-size: 2rem; font-variant-numeric: tabular-nums; }
.split-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; }
.split-bar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .88rem; }
.legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-right: .35rem; vertical-align: -.05em; }
.review-prompt { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .9rem 1.1rem; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); margin-bottom: 1.25rem; }
@media (max-width: 600px) { .review-prompt { grid-template-columns: 1fr; } }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: var(--line-strong); font-size: 2rem; line-height: 1; padding: 0 .1rem; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--accent); }
.star-input input:focus-visible + label { outline: 3px solid var(--focus); border-radius: 6px; }
.blueprint-frame { background: #0b3a5c; border-radius: var(--radius); padding: .5rem; }
.blueprint-frame img { display: block; width: 100%; }
.video-frame { border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.video-frame video { width: 100%; height: 100%; display: block; object-fit: contain; }
.drop { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 1.25rem; text-align: center; background: var(--surface); display: grid; gap: .5rem; justify-items: center; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.row-actions summary { list-style: none; }
.row-actions summary::-webkit-details-marker { display: none; }
.row-actions-panel { display: grid; gap: 2px; margin-top: .4rem; min-width: 230px; }
.row-actions-panel button { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.row-actions-panel button:hover { background: var(--surface-3); }
/* The pill search box owns its own styling (must come after the generic input rules). */
.searchbox input[type="search"], .searchbox input[type="text"] { border: 0; background: transparent; min-height: 0; border-radius: 0; box-shadow: none; padding: .62rem 0 .62rem 1.05rem; }
.hero .searchbox input[type="search"] { padding-block: .95rem; font-size: 1.1rem; }
.searchbox input:focus { box-shadow: none; }
.hero h1 { max-width: 24ch; }
/* Grids and fieldsets must be allowed to shrink on small screens. */
fieldset { min-width: 0; }
.grid-4 { display: grid; gap: 1rem; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-4 > :first-child { grid-column: 1 / -1; } }
@media (max-width: 980px) { .two-col, .two-col.wide-side, .item-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .layout-sidebar, .inbox { grid-template-columns: minmax(0, 1fr); } }
.file-list li > .grow { min-width: 0; }
.empty h1 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.file-list { grid-template-columns: minmax(0, 1fr); }
.file-list li { flex-wrap: wrap; }
/* Route headings receive focus so screen readers announce the new page; no ring needed. */
#page-title:focus, h1[tabindex="-1"]:focus { outline: none; }
.choice span { display: inline; padding: 0; border: 0; min-height: 0; background: none; }
.choice > span { display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-weight: 650; min-height: 44px; }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.card-foot { flex-wrap: wrap; row-gap: .25rem; }
.card-foot > .row { flex-wrap: nowrap; }
.icon-link { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--ink-2); }
.icon-link:hover { background: var(--surface-2); color: var(--ink); }
.icon-link[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.icon-link .count-badge { position: absolute; top: 2px; right: 0; }
@media (max-width: 760px) { .icon-link.hide-sm { display: none; } }
.profile-head { background-image: linear-gradient(to bottom, var(--brand-soft), var(--brand-soft) 56px, transparent 56px); }
.meter { display: block; height: 8px; margin-top: .35rem; max-width: 260px; border-radius: 999px; background: linear-gradient(to right, var(--brand) var(--p, 0%), var(--surface-3) var(--p, 0%)); }
.first-light { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; border-left: 6px solid var(--accent); }
.first-light > .stack { max-width: 640px; }
.home-news { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; align-items: start; }
/* On narrow screens long button labels wrap instead of pushing the page sideways. */
@media (max-width: 480px) { .btn { white-space: normal; text-align: center; max-width: 100%; } }
