:root {
  --bg: #0d0e0c;
  --surface: #151713;
  --surface-raised: #1b1d18;
  --surface-soft: #20231d;
  --border: #35392f;
  --border-strong: #4b5142;
  --text: #f1f2eb;
  --text-soft: #c3c7ba;
  --muted: #949b8c;
  --accent: #d9be62;
  --accent-hover: #e7cd74;
  --accent-ink: #201b0b;
  --danger: #e27a71;
  --danger-soft: #3b211f;
  --warning: #e1a85d;
  --warning-soft: #332719;
  --success: #76bd91;
  --success-soft: #183024;
  --info: #83aecd;
  --focus: #f1d875;
  --radius: 8px;
  --radius-small: 5px;
  --shadow: 0 12px 34px rgb(0 0 0 / 24%);
  --content-width: 1180px;
  --font: Inter, "Liberation Sans", Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--font);
  color-scheme: dark;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
p, h1, h2, h3 { overflow-wrap: anywhere; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .45rem; font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.14; letter-spacing: -.025em; }
h2 { margin-bottom: .7rem; font-size: 1.15rem; line-height: 1.25; }
h3 { font-size: 1rem; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; }
hr { margin: 1.5rem 0; border: 0; border-top: 1px solid var(--border); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .65rem .85rem;
  border-radius: var(--radius-small);
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgb(13 14 12 / 96%);
  backdrop-filter: blur(9px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  width: min(100% - 2rem, var(--content-width));
  min-height: 62px;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .62rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover { color: var(--text); }
.brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: -.03em;
}

.brand__name, .brand__group { display: block; line-height: 1.15; }
.brand__name { font-size: .98rem; letter-spacing: -.01em; }
.brand__group { margin-top: .18rem; color: var(--muted); font-size: .71rem; font-weight: 500; }

.main-nav {
  display: flex;
  flex: 1 1 auto;
  align-self: stretch;
  align-items: stretch;
  gap: .15rem;
}

.main-nav a {
  display: flex;
  align-items: center;
  padding: 0 .65rem;
  border-bottom: 2px solid transparent;
  color: var(--text-soft);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}

.main-nav a:hover { color: var(--text); background: var(--surface); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }

.account-menu { display: flex; flex: 0 0 auto; align-items: center; gap: .65rem; }
.account-menu form { margin: 0; }
.account-menu__identity { max-width: 130px; overflow: hidden; color: var(--text-soft); font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle { display: none; }

.page {
  width: min(100% - 2rem, var(--content-width));
  min-height: calc(100vh - 128px);
  margin-inline: auto;
  padding: 2rem 0 3.5rem;
}

.page:focus { outline: 0; }
.page-header, .record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}

.page-header > div:first-child, .record-header > div:first-child { max-width: 760px; }
.page-header p, .record-header p { margin-bottom: 0; color: var(--text-soft); }
.page-header--compact { margin-bottom: 1.1rem; }
.eyebrow { margin-bottom: .35rem !important; color: var(--accent) !important; font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.muted { color: var(--muted) !important; }
.count { color: var(--muted); font-size: .85em; font-weight: 500; }

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem .85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover { border-color: #626b57; background: #282b24; color: var(--text); }
.button--primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.button--primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: var(--accent-ink); }
.button--quiet { border-color: transparent; background: transparent; color: var(--text-soft); }
.button--quiet:hover { border-color: var(--border); background: var(--surface); }
.button--danger { border-color: #854c47; background: var(--danger-soft); color: #ffd6d2; }
.button--danger:hover { border-color: var(--danger); background: #4b2825; color: #fff; }
.button--small { min-height: 32px; padding: .35rem .6rem; font-size: .8rem; }
.button--full { width: 100%; }
.button[disabled], .button.is-disabled { cursor: not-allowed; opacity: .5; pointer-events: none; }
.button-row, .form-actions, .action-menu { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.action-menu { justify-content: flex-end; }
.action-menu form { margin: 0; }
.text-action, .link-button { font-size: .86rem; font-weight: 700; }
.link-button { padding: 0; border: 0; background: transparent; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.link-button--danger { color: var(--danger); }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin: -.35rem 0 1.25rem;
  color: var(--muted);
  font-size: .83rem;
}

.breadcrumbs a { color: var(--text-soft); }

.site-footer {
  display: flex;
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
  padding: 1.1rem 0 1.5rem;
  border-top: 1px solid var(--border);
  justify-content: space-between;
  color: var(--muted);
  font-size: .75rem;
}

.flash-stack {
  position: relative;
  z-index: 20;
  display: grid;
  gap: .5rem;
  width: min(100% - 2rem, var(--content-width));
  margin: 1rem auto -1rem;
}

.flash, .notice {
  padding: .75rem .9rem;
  border: 1px solid var(--border-strong);
  border-left-width: 4px;
  border-radius: var(--radius-small);
  background: var(--surface-raised);
}

.flash p:last-child, .notice p:last-child { margin-bottom: 0; }
.flash--success { border-left-color: var(--success); }
.flash--error, .flash--danger { border-left-color: var(--danger); }
.flash--warning, .notice--warning { border-left-color: var(--warning); }
.flash--info, .notice { border-left-color: var(--info); }

.update-banner {
  position: fixed;
  z-index: 60;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  max-width: min(560px, calc(100% - 2rem));
  align-items: center;
  gap: 1rem;
  padding: .85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.update-banner[hidden] { display: none; }
.update-banner strong, .update-banner span { display: block; }
.update-banner span { color: var(--text-soft); font-size: .83rem; }

.toast-region { position: fixed; z-index: 80; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; width: min(360px, calc(100% - 2rem)); pointer-events: none; }
.toast { padding: .72rem .85rem; border: 1px solid var(--border-strong); border-radius: var(--radius-small); background: var(--surface-raised); box-shadow: var(--shadow); color: var(--text); }

.form-stack { display: grid; gap: 1rem; }
.form-panel { max-width: 820px; padding: 1.15rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.form-panel--narrow { max-width: 600px; }
.field { display: grid; gap: .32rem; min-width: 0; }
.field > label { color: var(--text); font-size: .86rem; font-weight: 700; }
.optional { color: var(--muted); font-size: .8rem; font-weight: 500; }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea,
.inline-form select {
  width: 100%;
  min-height: 42px;
  padding: .58rem .68rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  background: #10120f;
  color: var(--text);
  line-height: 1.35;
}

.field textarea { min-height: 150px; resize: vertical; }
.compact-form .field textarea { min-height: 90px; }
.field input::placeholder, .field textarea::placeholder { color: #737a6c; opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #646b59; }
.field input:disabled, .field select:disabled, .field textarea:disabled { cursor: not-allowed; opacity: .55; }
.field input[type="checkbox"], .field input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.field__help { color: var(--muted); font-size: .78rem; }
.field__help ul { margin: .25rem 0 0; padding-left: 1.2rem; }
.field__errors, .form-errors { color: #ffaaa2; font-size: .82rem; }
.field__errors p, .form-errors p { margin: .15rem 0 0; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--danger); }
.form-errors { padding: .65rem .75rem; border-left: 3px solid var(--danger); background: var(--danger-soft); }
.form-actions { margin-top: .25rem; }
.form-actions--sticky { position: sticky; bottom: 0; z-index: 5; margin: .35rem -1.15rem -1.15rem; padding: .8rem 1.15rem; border-top: 1px solid var(--border); background: rgb(21 23 19 / 96%); }
.form-note { margin: -.25rem 0 0; color: var(--muted); font-size: .79rem; }
.save-state { min-height: 1.2em; color: var(--muted); font-size: .78rem; }
.save-state.is-dirty { color: var(--warning); }
.filter-bar { display: flex; align-items: flex-end; gap: .7rem; margin-bottom: 1rem; padding: .8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.field--inline { min-width: 190px; }
.filter-bar__grow { flex: 1 1 360px; }
.inline-form { display: flex; align-items: center; gap: .4rem; margin: 0; }

.auth-page .topbar { position: static; }
.auth-page .topbar__inner { justify-content: center; }
.auth-page .page { display: grid; min-height: calc(100vh - 63px); place-items: start center; padding-top: clamp(2rem, 7vh, 5rem); }
.auth-shell { width: min(100%, 430px); padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.auth-shell--wide { width: min(100%, 570px); }
.auth-heading { margin-bottom: 1.2rem; }
.auth-heading p:last-child { margin-bottom: 0; color: var(--text-soft); }
.auth-form { margin-top: 1rem; }
.auth-footnote { margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--text-soft); font-size: .82rem; }
.attempt-counter { display: flex; justify-content: space-between; gap: 1rem; padding: .62rem .7rem; border: 1px solid var(--border); border-radius: var(--radius-small); background: #10120f; color: var(--text-soft); }
.attempt-counter strong { color: var(--text); font-size: 1rem; }
.loading-text { color: var(--muted); }
.loading-text::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .4rem; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }

.login-warning { display: none; margin-bottom: 1rem; padding: .8rem; border: 1px solid var(--danger); border-radius: var(--radius-small); background: var(--danger-soft); }
.login-warning.is-visible { display: block; }
.login-warning p { margin-bottom: .45rem; }
.login-warning p:last-child { margin-bottom: 0; }
.login-warning__stop { color: #ffd0cc; font-weight: 800; }
.login-warning [data-warning-ip] { color: var(--text-soft); }
.login-warning [data-warning-ip] strong { color: var(--text); }
.warning-window .topbar { display: none; }
.warning-window .page { display: grid; width: 100%; min-height: 100vh; padding: 1rem; place-items: center; }
.warning-window__panel { display: block; width: min(100%, 520px); margin: 0; padding: 1.25rem; }
.warning-window__panel h1 { color: #ffd0cc; font-size: 1.4rem; }
.setup-secret, .recovery-codes, .one-time-secret { margin: 1rem 0; padding: .85rem; border: 1px solid var(--warning); border-radius: var(--radius-small); background: var(--warning-soft); }
.setup-secret code { display: block; max-width: 100%; padding: .65rem; overflow-wrap: anywhere; background: #151109; color: #ffe0aa; user-select: all; }
.recovery-codes ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.recovery-codes li { padding: .4rem; background: #151109; text-align: center; }
.copy-row { display: flex; align-items: stretch; gap: .6rem; }
.copy-row code { flex: 1; padding: .55rem .65rem; overflow-wrap: anywhere; border: 1px solid var(--border-strong); background: #10120f; user-select: all; }

.content-list { border-top: 1px solid var(--border); }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 1.2rem; padding: 1rem .55rem; border-bottom: 1px solid var(--border); }
.list-row:hover { background: rgb(255 255 255 / 1.5%); }
.list-row--unread { border-left: 3px solid var(--accent); padding-left: .75rem; }
.list-row__main h2 { margin: .22rem 0 .3rem; font-size: 1.05rem; }
.list-row__main h2 a { color: var(--text); text-decoration: none; }
.list-row__main h2 a:hover { color: var(--accent); text-decoration: underline; }
.list-row__main p { margin: 0; color: var(--text-soft); font-size: .88rem; }
.list-row__meta { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; color: var(--muted); font-size: .75rem; text-align: right; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem; color: var(--muted); font-size: .76rem; }
.unread-label { color: var(--accent); font-weight: 800; }
.empty-state { padding: 2.2rem 1rem; color: var(--text-soft); text-align: center; }
.empty-state h2 { color: var(--text); }
.empty-state p:last-child { margin-bottom: 0; }
.empty-inline { color: var(--muted); font-style: normal; }

.status-chip { display: inline-flex; width: fit-content; align-items: center; padding: .13rem .42rem; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-soft); font-size: .7rem; font-weight: 750; line-height: 1.45; white-space: nowrap; }
.status-chip--accent, .status-chip--confirmed, .status-chip--verified, .status-chip--approved { border-color: #6f6537; background: #2a2617; color: #f4d979; }
.status-chip--unverified, .status-chip--possible, .status-chip--pending { border-color: #775935; background: var(--warning-soft); color: #f2c17e; }
.status-chip--opinion, .status-chip--comment { border-color: #46657a; background: #172630; color: #a9d2ee; }
.status-chip--revoked, .status-chip--blocked, .status-chip--failed { border-color: #7b403c; background: var(--danger-soft); color: #ffb6b0; }
.tag-list, .tags-cell { display: flex; flex-wrap: wrap; gap: .3rem; }
.tag { display: inline-block; padding: .12rem .38rem; border-radius: 3px; background: var(--surface-soft); color: var(--text-soft); font-size: .7rem; }

.discussion { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.discussion__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--border); }
.discussion__header h1 { margin: .3rem 0; font-size: 1.45rem; }
.byline, .edit-note { margin-bottom: 0; color: var(--muted); font-size: .78rem; }
.prose { white-space: normal; overflow-wrap: anywhere; }
.discussion > .prose { min-height: 90px; padding: 1.15rem; }
.prose p:last-child { margin-bottom: 0; }
.pending-inline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .75rem; padding: .55rem .7rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-small); color: var(--text-soft); font-size: .78rem; }
.pending-inline strong { color: var(--warning); letter-spacing: .03em; }
.replies { margin-top: 1.6rem; }
.reply { padding: .95rem 0; border-top: 1px solid var(--border); }
.reply > header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.reply > header a { color: var(--muted); font-size: .76rem; text-decoration: none; }
.reply__actions { display: flex; gap: .7rem; margin-top: .55rem; }
.reply__actions form { margin: 0; }
.composer { max-width: 820px; margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }

.record-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .84rem; }
.data-table th, .data-table td { padding: .68rem .75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table th { position: sticky; top: 0; z-index: 1; background: var(--surface-soft); color: var(--text-soft); font-size: .72rem; letter-spacing: .025em; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgb(255 255 255 / 1.5%); }
.row-title { display: block; color: var(--text); font-weight: 750; text-decoration: none; }
.row-title:hover { color: var(--accent); text-decoration: underline; }
.row-subtitle { display: block; max-width: 480px; margin-top: .18rem; color: var(--muted); font-size: .75rem; }
.row-action { text-align: right !important; }

.record-alias { color: var(--text-soft) !important; }
.record-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.5rem; align-items: start; }
.record-main { min-width: 0; border-top: 1px solid var(--border); }
.record-section { padding: 1.15rem 0; border-bottom: 1px solid var(--border); }
.record-section > h2, .section-heading h2 { font-size: 1rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.record-sidebar { display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.record-sidebar > section { padding: .9rem; border-bottom: 1px solid var(--border); }
.record-sidebar > section:last-child { border-bottom: 0; }
.record-sidebar h2 { margin-bottom: .55rem; color: var(--text-soft); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.detail-list, .compact-details { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: minmax(120px, 25%) 1fr; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.detail-list > div:first-child { border-top: 0; }
.detail-list dt, .compact-details dt { color: var(--muted); font-size: .78rem; }
.detail-list dd, .compact-details dd { margin: 0; }
.compact-details > div { display: flex; justify-content: space-between; gap: .8rem; padding: .26rem 0; }
.compact-details dd { text-align: right; font-size: .8rem; }
.pending-block strong { color: var(--warning); font-size: .78rem; }
.link-list, .comment-list { margin: 0; padding: 0; list-style: none; }
.link-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--border); }
.link-list li p { margin: .2rem 0 0; color: var(--muted); font-size: .78rem; }
.comment-list li { padding: .75rem 0; border-top: 1px solid var(--border); }
.comment-list header { display: flex; justify-content: space-between; gap: .8rem; margin-bottom: .3rem; }
.comment-list time { color: var(--muted); font-size: .75rem; }
.compact-form { margin-top: 1rem; padding: .85rem; border: 1px solid var(--border); background: var(--surface); }
.duplicate-notice { margin-top: 1.4rem; padding: .85rem; border-left: 3px solid var(--warning); background: var(--warning-soft); }
.duplicate-notice p, .duplicate-notice li { color: var(--text-soft); font-size: .85rem; }
.duplicate-notice ul { margin-bottom: 0; }

.pagination { display: flex; align-items: center; justify-content: center; gap: .85rem; margin-top: 1.2rem; color: var(--muted); font-size: .78rem; }
.history-list { position: relative; max-width: 820px; margin: 0; padding: 0; list-style: none; }
.history-list::before { content: ""; position: absolute; top: .4rem; bottom: .4rem; left: 7px; width: 1px; background: var(--border-strong); }
.history-list > li { position: relative; display: grid; grid-template-columns: 16px 1fr; gap: .8rem; padding: 0 0 1.25rem; }
.history-list__marker { z-index: 1; width: 15px; height: 15px; margin-top: .18rem; border: 3px solid var(--bg); border-radius: 50%; background: var(--accent); }
.history-list h2 { margin-bottom: .2rem; font-size: .95rem; }
.history-list p { margin-bottom: .3rem; }
.history-snapshot { margin: .5rem 0; padding: .65rem .75rem; border-left: 2px solid var(--border-strong); background: var(--surface); color: var(--text-soft); }
.history-fields { margin: .5rem 0; }
.history-fields > div { display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: .7rem; padding: .3rem 0; }
.history-fields dt { color: var(--muted); font-size: .78rem; }
.history-fields dd { margin: 0; }
.row-actions { display: flex; align-items: center; gap: .7rem; }
.row-actions form { margin: 0; }
.error-page { max-width: 620px; margin: clamp(1rem, 8vh, 5rem) auto; padding: 1.25rem 0; }
.error-page > p:not(.eyebrow) { color: var(--text-soft); }

.module-status { flex: 0 0 auto; padding: .32rem .58rem; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-soft); font-size: .75rem; font-weight: 800; }
.module-status--pending { border-color: #755735; background: var(--warning-soft); color: #f0bc75; }
.pending-view { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 1rem; max-width: 760px; padding: 1.2rem 0; }
.pending-view__symbol { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--warning); font-weight: 900; letter-spacing: .12em; }
.pending-view h2 { margin-bottom: .35rem; color: var(--warning); }
.pending-view p { color: var(--text-soft); }
.admin-dependency { margin: .8rem 0; padding: .65rem .75rem; border-left: 3px solid var(--warning); background: var(--warning-soft); color: var(--text-soft); }

.subnav { display: flex; gap: .2rem; margin: -0.2rem 0 1.3rem; overflow-x: auto; border-bottom: 1px solid var(--border); }
.subnav a { flex: 0 0 auto; padding: .55rem .72rem; border-bottom: 2px solid transparent; color: var(--text-soft); font-size: .83rem; font-weight: 700; text-decoration: none; }
.subnav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }
.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 1.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.summary-strip > div { padding: .85rem 1rem; border-right: 1px solid var(--border); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip dt { color: var(--muted); font-size: .75rem; }
.summary-strip dd { margin: .15rem 0 0; font-size: 1.4rem; font-weight: 750; }
.admin-links > h2, .admin-form-section > h2, section > h2 { margin-top: 1.4rem; }
.admin-links ul { margin: 0; padding: 0; border-top: 1px solid var(--border); list-style: none; }
.admin-links li { border-bottom: 1px solid var(--border); }
.admin-links a { display: grid; grid-template-columns: 170px 1fr; gap: 1rem; padding: .8rem .35rem; color: var(--text); text-decoration: none; }
.admin-links a:hover { background: var(--surface); }
.admin-links span { color: var(--text-soft); font-size: .85rem; }
.one-time-secret { max-width: 720px; }
.admin-table-gap { margin-top: .85rem; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 930px) {
  .topbar__inner { flex-wrap: wrap; min-height: 58px; }
  .nav-toggle {
    display: grid;
    width: 38px;
    height: 38px;
    margin-left: auto;
    padding: 9px;
    place-content: center;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface);
  }
  .nav-toggle span:not(.sr-only) { display: block; width: 17px; height: 2px; background: var(--text-soft); }
  .main-nav { display: none; order: 4; width: 100%; flex-basis: 100%; flex-wrap: wrap; padding: .4rem 0 .65rem; border-top: 1px solid var(--border); }
  .main-nav.is-open { display: flex; }
  .main-nav a { min-height: 38px; padding: .4rem .7rem; border: 1px solid transparent; border-radius: var(--radius-small); }
  .main-nav a[aria-current="page"] { border-color: var(--border); background: var(--surface); }
  .account-menu__identity { display: none; }
  .record-layout { grid-template-columns: minmax(0, 1fr) 240px; }
}

@media (max-width: 700px) {
  body { font-size: 14px; }
  .topbar__inner, .page, .site-footer, .flash-stack { width: min(100% - 1rem, var(--content-width)); }
  .page { padding-top: 1.25rem; }
  .page-header, .record-header { flex-direction: column; gap: .85rem; }
  .page-header > .button { width: 100%; }
  .record-header .action-menu { justify-content: flex-start; }
  .filter-bar { display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
  .filter-bar .field { grid-column: 1 / -1; }
  .list-row { grid-template-columns: 1fr; gap: .5rem; }
  .list-row__meta { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: .25rem .7rem; text-align: left; }
  .discussion__header { flex-direction: column; }
  .record-layout { grid-template-columns: 1fr; }
  .record-sidebar { order: -1; }
  .detail-list > div { grid-template-columns: 1fr; gap: .15rem; }
  .summary-strip { grid-template-columns: 1fr; }
  .summary-strip > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .summary-strip > div:last-child { border-bottom: 0; }
  .admin-links a { grid-template-columns: 1fr; gap: .2rem; }
  .update-banner { align-items: stretch; flex-direction: column; }
  .site-footer { gap: .7rem; flex-direction: column; }

  .record-table-wrap { overflow: visible; border: 0; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .data-table tr { margin-bottom: .7rem; padding: .45rem .65rem; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface); }
  .data-table td { display: grid; grid-template-columns: minmax(95px, 34%) 1fr; gap: .6rem; padding: .38rem 0; border: 0; text-align: left !important; }
  .data-table td::before { content: attr(data-label); color: var(--muted); font-size: .73rem; font-weight: 700; }
  .data-table td[colspan] { display: block; }
  .data-table td[colspan]::before { content: none; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .row-subtitle { max-width: none; }
}

@media (max-width: 440px) {
  .account-menu .button { padding-inline: .45rem; }
  .brand__group { display: none; }
  .auth-shell { padding: 1rem; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar > * { grid-column: 1; width: 100%; }
  .form-panel { padding: .9rem; }
  .form-actions--sticky { margin-inline: -.9rem; padding-inline: .9rem; }
  .form-actions > .button { flex: 1 1 auto; }
  .reply > header, .comment-list header { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .pagination { justify-content: space-between; gap: .35rem; }
  .pagination > span:not(.button) { font-size: .72rem; text-align: center; }
  .pending-view { grid-template-columns: 1fr; }
  .recovery-codes ul { grid-template-columns: 1fr; }
  .copy-row { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .status-chip, .module-status, .button, .flash, .notice { forced-color-adjust: none; }
}
