:root {
  /* Dark is the default; [data-theme="light"] on <html> switches to light. */
  --bg: #14171c; --panel: #1c2027; --line: #2d333d; --text: #e6e9ef; --muted: #9aa3b2;
  --accent: #4f8cff; --accent-text: #0b0e14; --danger: #ff6b6b; --warn-bg: #3a3218; --warn-line: #8a6d1d;
  --error-bg: #3d1f1f; --ok: #4ac26b; --radius: 8px;
  color-scheme: dark;
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text); background: var(--bg);
}
:root[data-theme="light"] {
  --bg: #f6f7f9; --panel: #ffffff; --line: #e3e6eb; --text: #1d2330; --muted: #677085;
  --accent: #2563eb; --accent-text: #fff; --danger: #c62828; --warn-bg: #fff6db; --warn-line: #f0c94a;
  --error-bg: #fdecec; --ok: #1a7f37;
  color-scheme: light;
}
body { background: var(--bg); }
* { box-sizing: border-box; }
body { margin: 0; }
h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .5rem; }
h3 { font-size: .75rem; text-transform: capitalize; color: var(--muted); margin: .75rem 0 .35rem; font-weight: 600; }
a { color: var(--accent); }
button, .button, input, select, textarea { font: inherit; color: inherit; }
button, .button {
  display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .75rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); cursor: pointer; text-decoration: none; white-space: nowrap;
}
button:hover, .button:hover { border-color: var(--muted); }
button:disabled { opacity: .6; cursor: default; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.danger { color: var(--danger); }
button.link { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea {
  width: 100%; padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel);
}
input[type=checkbox], input[type=radio] { width: auto; }
input[type=radio] { padding: 0; }
input[type=color] { width: 2.5rem; padding: 0; height: 2.1rem; flex: none; }
input:user-invalid { border-color: var(--danger); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .8rem; margin: .25rem 0; }
.error { color: var(--danger); }
.warn-text { background: var(--warn-bg); border-left: 3px solid var(--warn-line); padding: .3rem .5rem; margin: .3rem 0; font-size: .85rem; }
.row { display: flex; gap: .5rem; align-items: center; }
.spacer { flex: 1; }
.center { display: grid; place-items: center; min-height: 100vh; gap: 1rem; align-content: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }

/* auth */
.auth { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.auth-card { width: min(380px, 100%); padding: 2rem; display: grid; gap: .8rem; }
.auth-card label { display: grid; gap: .3rem; font-weight: 500; }

/* sites */
.topbar { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; background: var(--panel); border-bottom: 1px solid var(--line); min-height: 52px; flex-wrap: wrap; }
.sites { max-width: 760px; margin: 2rem auto; padding: 0 1rem; }
.sites form { margin-bottom: 1rem; }
.sites form input { max-width: 360px; }
.site-list { list-style: none; padding: 0; display: grid; gap: .6rem; }
.site-list li { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; flex-wrap: wrap; }

/* editor layout */
.editor { display: grid; height: 100vh; grid-template-columns: 280px 1fr 310px; grid-template-rows: auto auto 1fr; }
.editor > .topbar { grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; }
.editor > .topbar select[aria-label="Current page"] { max-width: 13rem; }
.editor > .topbar .publish-state, .editor > .topbar .save-status { white-space: nowrap; }
.editor > .topbar > * { flex-shrink: 0; }
.editor > .topbar select { max-width: 12rem; }
.editor > .banner { grid-column: 1 / -1; }
.editor .left, .editor .right { background: var(--panel); overflow: auto; grid-row: 3; }
.editor .left { border-right: 1px solid var(--line); }
.editor .right { border-left: 1px solid var(--line); }
.stage { grid-row: 3; overflow: auto; display: flex; flex-direction: column; align-items: center; padding: 1rem; gap: .5rem; }
.frame-wrap { flex: 1; width: 100%; min-height: 0; position: relative; overflow: hidden; }
.frame-wrap iframe { border: 1px solid var(--line); border-radius: 6px; background: #fff; display: block; transform-origin: top left; }
.frame-scale { position: absolute; right: .5rem; bottom: .5rem; font-size: .7rem; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .5rem; }
.site-name { width: 14rem; font-weight: 600; }
label.inline { display: inline-flex; align-items: center; gap: .4rem; }
label.inline select { width: auto; max-width: 14rem; }
.segmented { display: inline-flex; }
.segmented button { border-radius: 0; margin-left: -1px; }
.segmented button:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.segmented button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.segmented button[aria-pressed=true], .segmented button[aria-selected=true] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); position: relative; }
.save-status { font-size: .85rem; color: var(--muted); }
.save-status.saved { color: var(--ok); }
.save-status.error, .save-status.conflict { color: var(--danger); font-weight: 600; }
.banner { padding: .6rem 1rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.banner.warn { background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); }
.banner.error { background: var(--error-bg); border-bottom: 1px solid var(--danger); }
.banner ul { margin: 0; padding-left: 1.2rem; flex-basis: 100%; }
.stage > .banner { width: 100%; border-radius: 6px; border: 1px solid var(--danger); }

/* panels */
.panel { padding: .9rem; border-bottom: 1px solid var(--line); }
.palette { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.palette-item { justify-content: flex-start; gap: .4rem; padding: .4rem .5rem; font-size: .85rem; cursor: grab; min-width: 0; white-space: normal; text-align: left; line-height: 1.2; }
/* Small outline icons in the muted text colour, so they help to find an element without adding noise. */
.palette-icon { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.palette-item:hover .palette-icon { stroke: currentColor; }
.palette-item:active { cursor: grabbing; }
.outline ul { list-style: none; padding: 0; margin: 0; }
.outline li button { width: 100%; border: 0; border-radius: 6px; background: none; justify-content: flex-start; padding-block: .3rem; overflow: hidden; }
.outline li button:hover { background: var(--bg); }
.outline li button.selected { background: var(--accent); color: var(--accent-text); }
.outline li button.selected .muted { color: inherit; opacity: .85; }
.outline .type { font-weight: 600; }
.fields { display: grid; gap: .75rem; margin-bottom: 1rem; }
.field { display: grid; gap: .3rem; }
.field > label, .field > .label { font-weight: 500; }
.field.check { grid-template-columns: auto 1fr; align-items: center; }
.field.check > .hint { grid-column: 1 / -1; }
.link-field { display: grid; gap: .35rem; }
.actions { flex-wrap: wrap; }
.image-field .thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); margin-bottom: .4rem; }
.image-field .thumb.empty { display: grid; place-items: center; color: var(--muted); background: var(--bg); }

/* asset picker */
.asset-picker { width: min(720px, 95vw); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); padding: 1rem 1.25rem; }
.asset-picker::backdrop { background: rgb(0 0 0 / .4); }
.asset-picker h2 { margin: 0; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.asset-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; max-height: 50vh; overflow: auto; }
.asset-grid button { flex-direction: column; width: 100%; padding: .4rem; }
.asset-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.asset-grid span { font-size: .75rem; color: var(--muted); }
.asset-grid li, .file-list li { position: relative; }
.file-list li { display: flex; align-items: center; gap: .5rem; }
.asset-tools { margin: .5rem 0; gap: .6rem; font-size: .85rem; }
.asset-usage { display: block; font-size: .7rem; padding: .1rem .3rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-usage.unused { color: var(--warn-line); }
.file-list .asset-usage { flex: none; max-width: 12rem; }
.asset-grid .asset-delete, .asset-delete { position: absolute; top: .3rem; right: .3rem; width: auto; padding: .1rem .4rem; font-size: .8rem; line-height: 1.3; color: var(--danger); background: var(--panel); }
.file-list .asset-delete { position: static; }

@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; grid-template-rows: auto auto auto 60vh auto; height: auto; }
  .editor .left, .editor .right, .stage { grid-row: auto; }
}

/* milestone 3: styles, themes */
.small { font-size: .8rem; }
.grow { flex: 1; min-width: 12rem; }
.badge { display: inline-block; font-size: .7rem; padding: .1rem .45rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); vertical-align: middle; }
.segmented.tabs { display: flex; margin: .5rem 0 .9rem; }
.segmented.tabs button, .segmented.small button { flex: 1; justify-content: center; }
.segmented.small { display: flex; margin-bottom: .5rem; }
.segmented.small button { padding: .3rem .4rem; font-size: .8rem; }
.style-group { border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .7rem .7rem; margin: 0 0 .75rem; display: grid; gap: .55rem; min-width: 0; }
.style-group legend { font-size: .75rem; font-weight: 600; color: var(--muted); padding: 0 .3rem; text-transform: uppercase; letter-spacing: .05em; }
.style-field label, .token-field label { font-weight: 500; font-size: .85rem; }
.style-field .row input:not([type=color]), .token-field .row input:not([type=color]) { flex: 1; min-width: 0; }
input[aria-invalid=true] { border-color: var(--danger); }
.error.small { margin: 0; }
.theme-editor { display: grid; height: 100vh; grid-template-columns: 360px 1fr; grid-template-rows: auto auto 1fr; }
.theme-editor > .topbar, .theme-editor > .banner { grid-column: 1 / -1; }
.theme-editor .left { grid-row: 3; overflow: auto; background: var(--panel); border-right: 1px solid var(--line); padding: .9rem; display: grid; gap: .75rem; align-content: start; }
.theme-editor .stage { grid-row: 3; }
.theme-form .segmented { display: flex; }
.theme-form .segmented button { flex: 1; justify-content: center; }
textarea.code { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; tab-size: 2; }
.css-errors { margin: 0; padding: .5rem .5rem .5rem 1.5rem; background: var(--error-bg); border-radius: 6px; color: var(--danger); font-size: .85rem; }
code { font: .85em ui-monospace, monospace; background: var(--bg); padding: .05rem .25rem; border-radius: 4px; }
@media (max-width: 900px) {
  .theme-editor { grid-template-columns: 1fr; height: auto; }
  .theme-editor .left, .theme-editor .stage { grid-row: auto; }
}
.icon-button { width: 2.2rem; justify-content: center; padding: .4rem 0; font-size: 1rem; line-height: 1; }
.auth-card h1 { margin: 0; }
/* rich text field */
.richtext-field { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.rt-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); }
.rt-toolbar button { padding: .2rem .45rem; font-size: .8rem; border-color: transparent; background: none; }
.rt-toolbar button:hover { border-color: var(--line); }
.rt-area { min-height: 8rem; max-height: 22rem; overflow: auto; padding: .5rem .65rem; outline: none; }
.rt-area:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.rt-area > * { margin: 0 0 .5em; }
.rt-area table { border-collapse: collapse; width: 100%; }
.rt-area th, .rt-area td { border: 1px solid var(--line); padding: .2rem .4rem; min-width: 3rem; text-align: left; }
.rt-area blockquote { border-left: 3px solid var(--accent); padding-left: .6rem; color: var(--muted); }
.rt-area code { font-family: ui-monospace, monospace; background: var(--bg); padding: 0 .2em; border-radius: 3px; }

/* milestone 5: history, publish, admin, checks */
.notice { background: var(--warn-bg); border-left: 3px solid var(--warn-line); padding: .5rem .7rem; margin: 0; }
.history .version-list { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: 2px; }
.history .version-list li { display: flex; align-items: center; gap: .3rem; border-radius: 6px; }
.history .version-list li.active { outline: 2px solid var(--accent); }
.history .version { flex: 1; flex-direction: column; align-items: flex-start; border: 0; background: none; text-align: left; white-space: normal; }
.history .version:hover { background: var(--bg); }
.history .viewing { padding: .75rem; margin-top: .75rem; }
.publish-state { white-space: nowrap; }
.modal { width: min(560px, 95vw); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); padding: 1rem 1.25rem; }
.modal::backdrop { background: rgb(0 0 0 / .5); }
.modal h2 { margin: 0; }
.new-page { width: min(640px, 95vw); }
.tpl-choices { border: 0; padding: 0; margin: 0; }
.tpl-choices legend { font-weight: 600; margin-bottom: .3rem; }
.tpl-choices h3 { text-transform: none; font-size: .8rem; margin: .8rem 0 .3rem; }
.tpl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; max-height: 40vh; overflow-y: auto; }
.tpl-option { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); }
.tpl-option.active { border-color: var(--accent); }
.tpl-option > label { display: flex; align-items: flex-start; justify-content: flex-start; gap: .55rem; flex: 1; min-width: 12rem; cursor: pointer; text-align: left; font-weight: normal; }
.tpl-option > label input[type=radio] { width: auto; flex: none; margin: .2rem 0 0; }
.tpl-option > label > span { display: grid; gap: .1rem; }
.tpl-option > select { flex: 1 1 100%; }
.tpl-option.editing > .fields { flex: 1; }
.tpl-actions { display: flex; gap: .6rem; font-size: .85rem; }
.page-actions { gap: .4rem; margin: .5rem 0 1rem; }
.status-box { padding: .6rem .8rem; border-radius: 8px; background: var(--bg); border-left: 3px solid var(--line); }
.status-box.approved { border-left-color: var(--ok); }
.status-box.rejected { border-left-color: var(--danger); }
.status-box.pending { border-left-color: var(--warn-line); }
.status-box p { margin: .4rem 0 0; }
.badge.pending { background: var(--warn-bg); border-color: var(--warn-line); color: var(--text); }
.badge.active, .badge.approved { color: var(--ok); }
.badge.disabled, .badge.rejected { color: var(--danger); }
.a11y .issues { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .85rem; }
.a11y .issues .link { text-align: left; white-space: normal; text-decoration: none; color: inherit; }
.a11y .issues .link:hover { text-decoration: underline; }
.visibility .check { gap: .3rem; font-size: .85rem; }
.admin { max-width: 1100px; margin: 1.5rem auto; padding: 0 1rem; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-table tr.status-pending { background: color-mix(in srgb, var(--warn-bg) 60%, transparent); }
input.tiny { width: 4.5rem; }
.request-msg { margin: .4rem 0 0; font-style: italic; }
/* Flex, not grid: optional banners must not shift the preview into another row. */
.review { display: flex; flex-direction: column; height: calc(100vh - 52px); }
.review .stage { flex: 1; min-height: 0; }
.decision { display: flex; gap: .75rem; align-items: flex-end; padding: .75rem 1rem; background: var(--panel); border-top: 1px solid var(--line); }
.decision label { display: grid; gap: .3rem; }

/* Account page */
.account { max-width: 760px; }
.usage-table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.usage-table th, .usage-table td { text-align: left; padding: .35rem .5rem .35rem 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.usage-table tbody th { font-weight: 600; white-space: nowrap; }
.usage-table thead th { font-size: .75rem; text-transform: uppercase; color: var(--muted); }
.use { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.use meter { width: 5rem; height: .6rem; }
.use.full { color: var(--danger); }
.limits h3 { margin: 1rem 0 .3rem; }
.section-card { padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; display: grid; gap: .75rem; justify-items: start; }
.section-card h2 { margin: 0; font-size: 1.15rem; text-transform: none; letter-spacing: 0; color: var(--text); display: flex; gap: .5rem; align-items: center; }
.section-card h3 { margin: .75rem 0 0; font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.section-card p { margin: 0; }
.section-card > .banner, .section-card > form, .section-card .recovery { width: 100%; }
.fields.narrow { max-width: 420px; width: 100%; margin: 0; }
.tfa-setup ol { margin: 0 0 .75rem; padding-left: 1.2rem; display: grid; gap: .3rem; }
.tfa-row { align-items: flex-start; flex-wrap: wrap; gap: 1.25rem; }
.tfa-row .fields { flex: 1; min-width: 240px; margin: 0; }
.tfa-row .fields input[readonly] { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: .8rem; }
.qr { background: #fff; padding: 8px; border-radius: 8px; image-rendering: pixelated; }
.secret { font-size: 1rem; letter-spacing: .05em; word-break: break-all; }
.codes { list-style: none; padding: 0; margin: .5rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .4rem; }
.codes code { font-size: .95rem; }
.recovery { display: grid; gap: .5rem; background: var(--warn-bg); border-left: 3px solid var(--warn-line); padding: .75rem 1rem; }
.sites.wide { max-width: 1200px; }
.audit td { vertical-align: top; font-size: .85rem; }
.nowrap { white-space: nowrap; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* CMS design: collections dialog, bindings, languages */
.collections { width: min(1000px, 96vw); max-height: 90vh; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); padding: 1rem 1.25rem; }
.collections h2 { margin: 0; text-transform: none; font-size: 1.15rem; color: var(--text); letter-spacing: 0; }
.collections h3 { margin: 1rem 0 .25rem; font-size: 1rem; }
.collections-body { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; margin-top: .75rem; }
.collection-list-nav ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .25rem; }
.collection-list-nav li button { width: 100%; text-align: left; display: flex; justify-content: space-between; }
.collection-list-nav li button[aria-current] { border-color: var(--accent); background: var(--accent-soft, var(--bg)); }
.collection-edit { min-width: 0; }
.fields.two { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.field-defs { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.field-def { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; display: grid; gap: .35rem; }
.field-def .row input:first-child { flex: 1; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.add-field { margin-top: .6rem; }
.add-field input { flex: 1; }
.prop { display: grid; gap: .25rem; }
.bind { gap: .4rem; }
.bind label { color: var(--muted); white-space: nowrap; }
.bind select { flex: 1; min-width: 0; }
.hint.bound { color: var(--accent); }
.lang-list { list-style: none; margin: 0 0 .4rem; padding: 0; display: grid; gap: .2rem; }
@media (max-width: 760px) { .collections-body, .fields.two { grid-template-columns: 1fr; } }

/* Content screen (CMS) */
.content-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 53px); }
.content-nav { border-right: 1px solid var(--line); padding: 1rem; background: var(--panel); }
.content-nav ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .2rem; }
.content-nav a { display: flex; justify-content: space-between; padding: .45rem .6rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.content-nav a:hover { background: var(--bg); }
.content-nav a[aria-current] { background: var(--accent); color: var(--accent-text); }
.content-nav a[aria-current] .muted { color: inherit; }
.content-main { padding: 1.25rem 1.5rem; max-width: 980px; display: grid; gap: 1rem; align-content: start; }
.content-main h1 { margin: 0; font-size: 1.4rem; }
.entry-editor { display: grid; gap: 1rem; }
.entry-fields { max-width: 760px; }
.row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: start; }
.publish-box { border: 1px solid var(--line); border-radius: 10px; padding: .75rem 1rem; max-width: 760px; display: grid; gap: .6rem; }
.gallery-field ul { list-style: none; margin: 0 0 .5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; }
.gallery-field img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--bg); }
.ref-list { display: flex; flex-wrap: wrap; gap: .25rem .9rem; max-height: 14rem; overflow: auto; }
.entry-preview { width: min(1200px, 96vw); height: 90vh; padding: .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); display: flex; flex-direction: column; gap: .5rem; }
.entry-preview[open] { display: flex; }
.entry-preview .stage { flex: 1; min-height: 0; }
.text-group { padding: 1rem 1.25rem; display: grid; gap: .75rem; }
.text-group h2 { margin: 0; text-transform: none; letter-spacing: 0; font-size: 1.05rem; color: var(--text); }
.text-node { border-top: 1px solid var(--line); padding-top: .6rem; margin: 0; }
.button.disabled { opacity: .5; pointer-events: none; }
@media (max-width: 760px) { .content-layout { grid-template-columns: 1fr; } .content-nav { border-right: 0; border-bottom: 1px solid var(--line); } .row.two-col { grid-template-columns: 1fr; } }
.stage-bar { display: flex; gap: .5rem; align-self: stretch; justify-content: center; }
.narrow-num { width: 6rem; }
.publish-panel { border-top: 1px solid var(--line); padding-top: .75rem; display: grid; gap: .45rem; }
.publish-panel h2 { margin: 0; }
.publish-panel textarea { width: 100%; }
.icon-preview { display: inline-flex; width: 1.25rem; height: 1.25rem; vertical-align: middle; }
.icon-preview svg { width: 100%; height: 100%; }
.icon-field > button { width: 100%; justify-content: flex-start; gap: .4rem; }
.icon-picker { margin-top: .35rem; border: 1px solid var(--line); border-radius: 8px; padding: .4rem; display: grid; gap: .4rem; background: var(--panel); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.25rem, 1fr)); gap: .25rem; max-height: 14rem; overflow: auto; }
.icon-grid button { padding: .35rem; justify-content: center; }
.icon-grid button[aria-selected=true] { background: var(--accent); color: var(--accent-text); }
.file-field .file-name { margin: 0 0 .35rem; word-break: break-all; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; max-height: 50vh; overflow: auto; }
.file-list button { width: 100%; justify-content: space-between; gap: 1rem; }
.passkey-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.passkey-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 8px; flex-wrap: wrap; }
label.button:focus-within { outline: 2px solid var(--focus, #5b8fd6); outline-offset: 2px; }
.state-ok { color: var(--ok); font-weight: 600; }
.state-warn { color: var(--danger); font-weight: 600; }
.token-box { overflow-x: auto; padding: .5rem .75rem; background: var(--panel); border: 1px solid var(--line, #333); border-radius: 6px; user-select: all; }
