/* Kollektive member web. Dark neutral surfaces, restrained gold; creative material supplies the colour. */
:root {
  color-scheme: dark;
  --bg: #141512; --surface: #1b1d19; --raised: #232620; --sunken: #10110f;
  --line: #393c33; --line-strong: #4b4f44;
  --text: #f0eee6; --muted: #b3b3a5; --faint: #7f8073;
  --gold: #ccae68; --gold-soft: #b89b58; --focus: #edcc7f; --on-gold: #15140f;
  --danger: #dd8c79; --danger-soft: #f3c4b8; --ok: #9fc89a;
  --radius: 4px; --gutter: clamp(1rem, 4vw, 3rem);
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; font-size: 16px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
a:hover { color: var(--focus); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
img, video { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 0.8rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; top: -4rem; left: 1rem; z-index: 50; background: var(--gold); color: var(--on-gold); padding: 0.7rem 1rem; }
.skip:focus { top: 1rem; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.88rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; font-weight: 700; color: var(--gold); margin: 0 0 0.7rem; }

/* Shell */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px);
  min-height: 64px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem; border-bottom: 1px solid var(--line); padding: 0 var(--gutter); }
.wordmark { font-size: 1.05rem; font-weight: 750; letter-spacing: 0.16em; text-decoration: none; white-space: nowrap; }
.wordmark span { color: var(--gold); }
.primary-nav { display: flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.8rem); }
.primary-nav a { font-size: 0.92rem; text-decoration: none; color: var(--muted); white-space: nowrap; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.primary-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }
.header-tools { display: flex; align-items: center; gap: 0.6rem; }
.tool { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--muted); text-decoration: none; cursor: pointer; }
.tool:hover, .tool[aria-expanded="true"] { color: var(--text); border-color: var(--line-strong); }
.tool .glyph { display: block; }
.tool .count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--on-gold); font-size: 0.7rem; font-weight: 700; line-height: 18px; text-align: center; }
.avatar-button { display: inline-flex; align-items: center; gap: 0.5rem; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.7rem 0.25rem 0.25rem; cursor: pointer; color: var(--text); max-width: 200px; }
.avatar-button:hover, .avatar-button[aria-expanded="true"] { border-color: var(--gold-soft); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--raised); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--gold); font-size: 0.85rem; overflow: hidden; flex: none; }
.avatar img, .avatar video { width: 100%; height: 100%; object-fit: cover; }
.avatar-button .handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.menu-anchor { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.4rem; display: flex; flex-direction: column; z-index: 30; box-shadow: 0 12px 30px rgb(0 0 0 / 0.4); }
.menu a, .menu button { text-align: left; background: none; border: 0; padding: 0.55rem 0.8rem; border-radius: 3px; text-decoration: none; color: var(--text); cursor: pointer; font-size: 0.93rem; }
.menu a:hover, .menu button:hover { background: var(--surface); color: var(--focus); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 0.3rem 0; }
main { width: min(100%, 1320px); margin: 0 auto; padding: clamp(1.6rem, 4vw, 3.2rem) var(--gutter) 5rem; flex: 1; }
.site-footer { border-top: 1px solid var(--line); padding: 1.6rem var(--gutter) 2.4rem; font-size: 0.82rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }
.site-footer a { text-decoration: none; }

/* Page scaffolding */
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.6rem; }
.page-head .lead { max-width: 60ch; color: var(--muted); margin: 0.5rem 0 0; font-size: 1.05rem; }
.page-head .actions { margin: 0; }
.tabs { display: flex; gap: 0.2rem; border-bottom: 1px solid var(--line); margin: 0 0 1.4rem; overflow-x: auto; }
.tabs a, .tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 0.7rem 0.9rem; color: var(--muted); text-decoration: none; white-space: nowrap; cursor: pointer; }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; margin-bottom: 1.4rem; }
.toolbar label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.toolbar input[type="search"] { min-width: 14rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { border: 1px solid var(--line-strong); background: transparent; color: var(--muted); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.85rem; cursor: pointer; text-decoration: none; }
.chip[aria-pressed="true"], .chip[aria-current="true"] { border-color: var(--gold); color: var(--gold); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 2.5vw, 1.6rem); }
.panel + .panel { margin-top: 1rem; }
.panel h2 { margin-bottom: 0.8rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack > .panel + .panel { margin-top: 0; }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.notice { color: var(--muted); padding: 0.85rem 1rem; border-left: 2px solid var(--gold); background: var(--raised); border-radius: 0 var(--radius) var(--radius) 0; max-width: 72ch; margin: 0 0 1rem; }
.notice.error { border-color: var(--danger); color: var(--danger-soft); }
.notice.ok { border-color: var(--ok); }
.notice.quiet { border-color: var(--line-strong); }
.notice:last-child { margin-bottom: 0; }
.empty { color: var(--muted); padding: 2.5rem 1rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.loading { color: var(--faint); padding: 1rem 0; }
.end-mark { color: var(--faint); text-align: center; padding: 1.4rem 0; font-size: 0.88rem; }
.pager { margin-top: 1rem; text-align: center; }

/* Buttons and forms */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 42px; padding: 0.55rem 1.1rem; background: var(--gold); color: var(--on-gold);
  border: 1px solid var(--gold); border-radius: var(--radius); font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button:hover { background: var(--focus); border-color: var(--focus); color: var(--on-gold); }
.button:disabled, .button[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.button.subtle { background: transparent; color: var(--text); border-color: var(--line-strong); font-weight: 550; }
.button.subtle:hover { border-color: var(--gold); color: var(--focus); background: var(--raised); }
.button.quiet { background: transparent; border-color: transparent; color: var(--muted); font-weight: 500; padding-inline: 0.6rem; }
.button.quiet:hover { color: var(--focus); background: var(--raised); }
.button.danger { background: transparent; border-color: var(--danger); color: var(--danger-soft); }
.button.small { min-height: 34px; padding: 0.3rem 0.8rem; font-size: 0.88rem; }
.text-link { color: var(--gold); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; align-items: center; }
input, select, textarea { background: var(--sunken); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.65rem 0.8rem; min-width: 0; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; min-height: 7rem; }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; margin: 0; }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.field > span, .field > label { font-size: 0.9rem; color: var(--muted); }
.field .hint { font-size: 0.82rem; color: var(--faint); }
.check { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0.4rem 0; }
.check input { margin-top: 0.2rem; flex: none; }
.form-feedback { min-height: 1.4rem; margin: 0.5rem 0 0; color: var(--muted); }
.inline-form { display: flex; gap: 0.6rem; align-items: stretch; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 12rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.2rem; }
legend { font-size: 0.9rem; color: var(--muted); padding: 0; margin-bottom: 0.5rem; }

/* Cards and grids */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; position: relative; }
.card:hover { border-color: var(--line-strong); }
.card.selected { border-color: var(--gold); }
.thumb { aspect-ratio: 1 / 1; background: var(--sunken); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--faint); position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.sound { background: radial-gradient(circle at 50% 60%, #2a2d25, var(--sunken) 70%); flex-direction: column; gap: 0.6rem; }
.wave { display: flex; align-items: center; gap: 3px; height: 42px; }
.wave i { display: block; width: 3px; background: var(--gold-soft); border-radius: 2px; opacity: 0.8; }
.thumb.intent { background: repeating-linear-gradient(135deg, var(--sunken) 0 10px, #171814 10px 20px); border-bottom: 1px dashed var(--line-strong); }
.thumb.intent .intent-text { padding: 1rem; font-family: var(--serif); font-size: 1.05rem; color: var(--muted); text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; margin: 0; }
.card .body { padding: 0.8rem 0.9rem 0.9rem; display: flex; flex-direction: column; gap: 0.25rem; }
.card .title { font-family: var(--serif); font-size: 1.08rem; line-height: 1.25; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .title::after { content: ""; position: absolute; inset: 0; }
.card .meta { font-size: 0.82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.3rem 0.6rem; align-items: center; }
.card .meta a { position: relative; z-index: 1; text-decoration: none; }
.card .meta a:hover { text-decoration: underline; }
.card > .pill { position: absolute; top: 0.6rem; left: 0.6rem; z-index: 1; }
.pill { display: inline-block; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.25rem 0.5rem; border-radius: 3px; background: color-mix(in srgb, var(--bg) 80%, transparent); border: 1px solid var(--line-strong); color: var(--muted); }
.pill.gold { color: var(--gold); border-color: var(--gold-soft); }
.pill.dashed { border-style: dashed; }
.pill.ok { color: var(--ok); }
.pill.danger { color: var(--danger-soft); border-color: var(--danger); }
.card.pending { border-style: dashed; }
.kollektive-card .preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; aspect-ratio: 3 / 2; background: var(--sunken); }
.kollektive-card .preview > * { background: var(--raised); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 0.8rem; min-width: 0; }
.kollektive-card .preview .thumb { width: 100%; height: 100%; aspect-ratio: auto; }

/* Work page */
.work-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
.work-media { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; min-height: 240px; overflow: hidden; }
.work-media img { max-height: 78vh; width: auto; max-width: 100%; object-fit: contain; }
.work-media.audio, .work-media.sound, .work-media.music { padding: clamp(1.5rem, 5vw, 4rem); flex-direction: column; gap: 1.2rem; }
.work-media audio { width: min(100%, 560px); }
.work-media .instructions { padding: 2rem; }
.big-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 120px; width: 100%; }
.big-wave i { display: block; width: 4px; background: var(--gold-soft); border-radius: 2px; opacity: 0.75; }
.work-side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 1rem; }
.work-side h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.byline { color: var(--muted); font-size: 0.95rem; }
.byline a { color: var(--text); text-decoration: none; }
.byline a:hover { color: var(--focus); }
.detail-sections { margin-top: 2rem; display: grid; gap: 1.2rem; }
.detail-sections section { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.detail-sections h2 { font-size: 1.15rem; margin-bottom: 0.7rem; }
.detail-sections h3 { margin: 1.2rem 0 0.6rem; color: var(--muted); }
.instructions { font-family: var(--serif); font-size: 1.12rem; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 70ch; }
.relation-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.8rem; }
.relation { display: grid; grid-template-columns: 72px 1fr; gap: 0.7rem; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem; text-decoration: none; background: var(--surface); min-width: 0; position: relative; }
.relation:hover { border-color: var(--gold-soft); }
.relation.pending { border-style: dashed; }
.relation.selected { border-color: var(--gold); }
.relation .thumb { width: 72px; height: 72px; aspect-ratio: auto; border-radius: 3px; }
.relation .thumb.intent .intent-text { font-size: 0.7rem; padding: 0.3rem; -webkit-line-clamp: 3; }
.relation .what { font-size: 0.8rem; color: var(--muted); }
.relation .who { font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.details { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 1rem; margin-top: 1rem; }
details.details summary { cursor: pointer; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; font-size: 0.85rem; margin: 0.8rem 0 0.4rem; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; }
.object-menu { position: relative; display: inline-block; }

/* Connections */
.connections { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.2rem; align-items: start; }
.connections h2 { font-size: 1rem; color: var(--muted); margin-bottom: 0.6rem; }
.connections .centre { width: min(300px, 40vw); padding-top: 2rem; }
.connections .column { display: flex; flex-direction: column; gap: 0.6rem; }
.connection-preview { margin-top: 1.4rem; }
.connection-preview .work-media { max-height: 50vh; }

/* Creation state */
.state { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--muted); }
.state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.state.waiting::before { background: var(--gold-soft); animation: pulse 2.2s ease-in-out infinite; }
.state.review::before { background: var(--gold); }
.state.published::before { background: var(--ok); }
.state.failed::before { background: var(--danger); }
.state.pending::before { background: transparent; border: 1.5px dashed var(--gold-soft); }
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.panel > .state { font-size: 1rem; color: var(--text); margin-bottom: 0.5rem; }
.history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; color: var(--muted); }
.history li { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.history time { color: var(--faint); min-width: 10rem; }
.dependency { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 0.8rem 1rem; display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }

/* Playground */
.playground { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.playground .side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 1rem; }
.step { border-top: 1px solid var(--line); padding: 1.2rem 0; }
.step h2 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.step .step-lead { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.8rem; }
.source-list { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 0.8rem; }
.source-chip { display: grid; grid-template-columns: 56px 1fr auto; gap: 0.6rem; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.4rem; max-width: 100%; width: 340px; background: var(--surface); }
.source-chip.pending { border-style: dashed; }
.source-chip .thumb { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 3px; }
.source-chip .thumb.intent .intent-text { font-size: 0.6rem; padding: 0.2rem; -webkit-line-clamp: 3; }
.source-chip .name { font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; text-decoration: none; }
.source-chip .uses { font-size: 0.8rem; color: var(--muted); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.choice { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); padding: 0.8rem; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 0.2rem; }
.choice[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.choice:disabled { opacity: 0.45; cursor: not-allowed; }
.choice .medium { font-weight: 650; }
.choice .ops { font-size: 0.8rem; color: var(--muted); }
.summary-box { font-size: 0.92rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.4rem; }
.summary-box p { margin: 0; }
.summary-box strong { color: var(--text); font-weight: 600; }

/* Side panel (basket, pickers) */
.side-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); border-left: 1px solid var(--line-strong); z-index: 40; padding: 1.2rem; overflow-y: auto; box-shadow: -20px 0 50px rgb(0 0 0 / 0.5); display: flex; flex-direction: column; gap: 1rem; }
.side-panel .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.side-panel h2 { font-size: 1.3rem; }
.basket-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 0.7rem; align-items: center; border-bottom: 1px solid var(--line); padding: 0.7rem 0; }
.basket-item .thumb { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 3px; }
.basket-item .thumb.intent .intent-text { font-size: 0.6rem; padding: 0.2rem; -webkit-line-clamp: 3; }
.basket-item .name { font-size: 0.93rem; }
.basket-item .creator { font-size: 0.8rem; color: var(--muted); }
.basket-item .amount { font-weight: 650; white-space: nowrap; text-align: right; }
.basket-item .changed { color: var(--danger-soft); font-size: 0.78rem; display: block; }
.basket-totals { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; font-size: 0.92rem; color: var(--muted); }
.basket-totals .total { color: var(--text); font-weight: 650; font-size: 1.05rem; }
.picker-list { display: flex; flex-direction: column; gap: 0.4rem; }
.picker-list button { text-align: left; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.9rem; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; width: 100%; }
.picker-list button:hover { border-color: var(--gold-soft); }
.picker-list button:disabled { opacity: 0.55; cursor: default; }

/* Work picker inside the side panel */
.picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.pick-card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; display: flex; flex-direction: column; }
.pick-card:hover, .pick-card:focus-within { border-color: var(--gold-soft); }
.pick { background: transparent; border: 0; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; min-width: 0; width: 100%; }
.pick .thumb { width: 100%; }
.pick-text { padding: 0.5rem 0.6rem 0.15rem; display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.85rem; }
.pick-title { font-family: var(--serif); font-size: 0.98rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-creator { color: var(--muted); padding: 0 0.6rem 0.6rem; font-size: 0.85rem; text-decoration: none; }
.side-panel .toolbar { margin-bottom: 0; }

/* Lists */
.plain-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.plain-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1rem; align-items: center; }
.plain-list li:last-child { border-bottom: 0; }
.ordered { list-style: none; padding: 0; margin: 0 0 1.5rem; counter-reset: item; display: flex; flex-direction: column; gap: 0.5rem; }
.ordered li { counter-increment: item; display: grid; grid-template-columns: 2rem 72px 1fr auto; gap: 0.7rem; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem; background: var(--surface); }
.ordered li::before { content: counter(item); color: var(--faint); text-align: center; font-variant-numeric: tabular-nums; }
.ordered .thumb { width: 72px; height: 72px; aspect-ratio: auto; border-radius: 3px; }
.ordered .reorder { display: flex; gap: 0.3rem; }
.notification { display: grid; grid-template-columns: 10px 1fr auto; gap: 0.8rem; align-items: start; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.notification .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 0.5rem; }
.notification.read .dot { background: transparent; }
.notification time { font-size: 0.8rem; color: var(--faint); white-space: nowrap; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat { background: var(--raised); border-radius: var(--radius); padding: 0.9rem 1rem; }
.stat .value { font-family: var(--serif); font-size: 1.7rem; }
.stat .label { font-size: 0.82rem; color: var(--muted); }
.prose { max-width: 70ch; }
.prose h2 { margin: 2rem 0 0.6rem; font-size: 1.4rem; }
.prose h3 { margin: 1.4rem 0 0.4rem; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2rem; }
.terms-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; color: var(--muted); max-width: 80ch; }
.status-ok { color: var(--ok); }
.status-bad { color: var(--danger-soft); }
.proof-box { min-height: 65px; margin-bottom: 0.8rem; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--raised); border: 1px solid var(--line-strong); color: var(--text); padding: 0.7rem 1.1rem; border-radius: var(--radius); z-index: 60; box-shadow: 0 10px 30px rgb(0 0 0 / 0.4); max-width: calc(100vw - 2rem); }
.profile-head { display: flex; align-items: center; gap: 1rem; }
.profile-head .avatar { width: 64px; height: 64px; font-size: 1.6rem; }

@media (max-width: 900px) {
  .work-layout, .playground { grid-template-columns: 1fr; }
  .work-side, .playground .side { position: static; }
  /* On a Creation the recorded state is what the member came for; show it first on small screens. */
  .creation-layout > .work-side { order: -1; }
  .connections { grid-template-columns: 1fr; }
  .connections .centre { width: 100%; padding-top: 0; }
}
@media (max-width: 720px) {
  .site-header { grid-template-columns: 1fr auto; row-gap: 0.2rem; padding-top: 0.5rem; padding-bottom: 0.4rem; }
  .primary-nav { grid-column: 1 / -1; order: 3; gap: 1.2rem; overflow-x: auto; }
  .primary-nav a { padding: 0.45rem 0; }
  .avatar-button .handle { display: none; }
  .avatar-button { padding: 0.25rem; }
  main { padding-top: 1.4rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .grid.wide { grid-template-columns: 1fr; }
  .card .body { padding: 0.6rem 0.65rem 0.7rem; }
  .card .title { font-size: 0.98rem; }
  .ordered li { grid-template-columns: 1.5rem 56px 1fr; }
  .ordered .reorder { grid-column: 2 / -1; }
  .source-chip { width: 100%; }
  .side-panel { width: 100vw; }
  .history time { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .state.waiting::before { animation: none; } }


/* Journey surfaces retain the same layout at narrow widths. */
.creation-group { margin-block: 1.5rem; }
.draft-resume { margin-block: 1.25rem; }
.notification-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.notification > div { min-width: 0; overflow-wrap: anywhere; }
.source-review textarea { width: 100%; }
@media (max-width: 520px) {
  .notification { grid-template-columns: 8px minmax(0, 1fr); }
  .notification-actions { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .source-chip { grid-template-columns: minmax(0, 1fr) auto; }
  .source-chip .thumb { display: none; }
}

.source-chip.unresolved { grid-template-columns: minmax(0, 1fr) auto; }
.choice.unavailable { opacity: 0.55; }
.choice.unavailable .ops { font-style: italic; }
.thumb.music { background: radial-gradient(circle at 50% 60%, #2b2630, var(--sunken) 70%); flex-direction: column; gap: 0.6rem; }
.thumb.video video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.thumb.\33 d { background: radial-gradient(circle at 50% 40%, #26302c, var(--sunken) 70%); flex-direction: column; gap: 0.6rem; }
.cube { display: block; width: 28px; height: 28px; border: 2px solid var(--gold-soft); transform: rotate(45deg) skew(10deg, 10deg); opacity: 0.8; }
.cube.big { width: 72px; height: 72px; margin: 2rem auto 1rem; }
.work-media video { max-height: 78vh; width: 100%; max-width: 100%; background: #000; }
.work-media.\33 d { padding: clamp(1.5rem, 5vw, 4rem); flex-direction: column; gap: 1rem; text-align: center; }
.work-media.\33 d img { max-height: 50vh; }
.instructions.lyrics { white-space: pre-wrap; }
