:root {
  --ink: 19 39 47%;
  --ink-soft: 30 42 45%;
  --muted: 31 20 47%;
  --paper: 42 42 96%;
  --paper-deep: 40 32 92%;
  --panel: 42 44 99%;
  --line: 35 19 84%;
  --teal: 174 56 31%;
  --teal-dark: 178 47 24%;
  --teal-pale: 165 37 91%;
  --copper: 23 52 47%;
  --danger: 3 57 48%;
  --font-body: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-display: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --shadow: 0 18px 50px hsl(190 20% 23% / .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: hsl(var(--paper)); }
body { margin: 0; color: hsl(var(--ink)); font-family: var(--font-body); font-size: 14px; background: hsl(var(--paper)); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: hsl(var(--teal-dark)); }
.app-shell { min-height: 100dvh; }

.workspace { min-height: 100dvh; }
.topbar { height: 62px; display: flex; align-items: center; gap: 24px; padding: 0 30px; background: hsl(42 44% 99%); border-bottom: 1px solid hsl(var(--line)); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 186px; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px 8px 8px 2px; color: hsl(0 0% 100%); background: hsl(var(--teal-dark)); font: 800 15px var(--font-display); }
.brand-copy { display: flex; flex-direction: column; font: 700 10px/1.15 var(--font-mono); letter-spacing: .12em; }
.brand-copy strong { font-size: 11px; letter-spacing: .18em; }
.brand-copy span { color: hsl(var(--muted)); font-size: 9px; }
.topbar-status { margin-left: auto; display: flex; align-items: center; gap: 8px; color: hsl(var(--muted)); font: 500 10px var(--font-mono); letter-spacing: .035em; }
.secure-dot, .status-led { width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--teal)); box-shadow: 0 0 0 3px hsl(var(--teal-pale)); }
.workspace-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100dvh - 62px); }
.sidebar { display: flex; flex-direction: column; padding: 26px 14px 16px; border-right: 1px solid hsl(var(--line)); background: hsl(39 34% 94%); }
.sidebar-label, .rail-heading { display: flex; align-items: center; gap: 9px; }
.sidebar-label { padding: 0 9px 14px; color: hsl(var(--muted)); font: 500 10px var(--font-mono); letter-spacing: .1em; }
.count-pill { display: inline-grid; min-width: 21px; height: 20px; padding: 0 6px; place-items: center; border-radius: 5px; background: hsl(var(--paper-deep)); color: hsl(var(--ink-soft)); font: 500 10px var(--font-mono); }
.sidebar-label .count-pill { margin-left: auto; }
.portal-list { display: grid; gap: 5px; }
.portal-link { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px; text-align: left; border: 1px solid transparent; border-radius: 7px; background: transparent; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.portal-link:hover { background: hsl(var(--panel)); transform: translateX(2px); }
.portal-link.is-active { background: hsl(var(--panel)); border-color: hsl(var(--line)); box-shadow: 0 3px 8px hsl(var(--ink) / .035); }
.portal-glyph { flex: 0 0 33px; width: 33px; height: 33px; display: grid; place-items: center; border: 1px solid hsl(174 30% 78%); border-radius: 6px; background: hsl(var(--teal-pale)); color: hsl(var(--teal-dark)); font: 500 10px var(--font-mono); }
.portal-link-copy { min-width: 0; display: grid; gap: 4px; }
.portal-link-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.portal-link-copy small { color: hsl(var(--muted)); font-size: 10px; }
.sidebar-foot { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 15px 9px 2px; border-top: 1px solid hsl(var(--line)); color: hsl(var(--muted)); font-size: 11px; }
.main-panel { min-width: 0; padding: 0 30px 30px; }
.portal-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0 21px; }
.breadcrumb, .eyebrow { color: hsl(var(--muted)); font: 500 10px var(--font-mono); letter-spacing: .11em; }
.title-line { display: flex; align-items: center; gap: 12px; margin-top: 5px; }
.title-line h1 { margin: 0; font: 700 25px/1.15 var(--font-display); letter-spacing: -.04em; }
.sequence-tag { padding: 5px 7px; border: 1px solid hsl(var(--line)); border-radius: 4px; color: hsl(var(--muted)); font: 10px var(--font-mono); }
.portal-heading-copy > p { margin: 7px 0 0; color: hsl(var(--muted)); font-size: 12px; }
.view-switch { display: inline-flex; flex: 0 0 auto; padding: 3px; background: hsl(var(--paper-deep)); border: 1px solid hsl(var(--line)); border-radius: 6px; }
.view-option { min-width: 76px; padding: 7px 11px; border: 0; border-radius: 4px; color: hsl(var(--muted)); background: transparent; font-size: 11px; cursor: pointer; }
.view-option.is-current { background: hsl(var(--panel)); color: hsl(var(--ink)); box-shadow: 0 1px 4px hsl(var(--ink) / .12); font-weight: 700; }
.workspace-tabs { display: flex; align-items: center; gap: 21px; height: 42px; border-bottom: 1px solid hsl(var(--line)); }
.tab-button { height: 100%; padding: 0 1px; border: 0; border-bottom: 2px solid transparent; color: hsl(var(--muted)); background: transparent; cursor: pointer; font-size: 12px; }
.tab-button:hover, .tab-button.is-active { color: hsl(var(--ink)); }
.tab-button.is-active { border-color: hsl(var(--teal)); font-weight: 700; }
.tab-meta { margin-left: auto; color: hsl(var(--muted)); font: 10px var(--font-mono); letter-spacing: .07em; }
.content-layout { display: grid; grid-template-columns: minmax(205px, 25%) minmax(0, 1fr); min-height: 520px; }
.content-rail { padding: 18px 17px 20px 0; border-right: 1px solid hsl(var(--line)); }
.rail-heading { flex-wrap: wrap; min-height: 31px; margin-bottom: 13px; color: hsl(var(--muted)); font: 500 10px var(--font-mono); letter-spacing: .1em; }
.rail-heading .button { margin-left: auto; }
.content-list { display: grid; gap: 5px; }
.content-list-item { width: 100%; display: flex; align-items: center; gap: 9px; padding: 10px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; }
.content-list-item:hover { background: hsl(42 44% 99%); }
.content-list-item.is-active { border-color: hsl(var(--line)); background: hsl(42 44% 99%); }
.document-icon { flex: 0 0 27px; width: 27px; height: 31px; display: grid; place-items: center; border: 1px solid hsl(var(--line)); border-radius: 4px; background: hsl(var(--panel)); color: hsl(var(--teal-dark)); font: 10px var(--font-mono); }
.content-list-copy { min-width: 0; display: grid; gap: 5px; }
.content-list-copy strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.content-list-copy small { color: hsl(var(--muted)); font: 9px var(--font-mono); }
.item-chevron { margin-left: auto; color: hsl(var(--muted)); font-size: 19px; }
.rail-empty { padding: 30px 13px 18px; color: hsl(var(--muted)); }
.rail-empty strong { display: block; margin: 13px 0 6px; color: hsl(var(--ink)); font: 600 13px var(--font-display); }
.rail-empty p { margin: 0 0 14px; font-size: 11px; line-height: 1.55; }
.empty-mark { display: inline-grid; width: 30px; height: 30px; place-items: center; border: 1px solid hsl(var(--line)); border-radius: 50%; color: hsl(var(--teal-dark)); font: 15px var(--font-mono); }
.reading-pane { min-width: 0; padding: 22px 0 30px 25px; }
.document-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 15px; border-bottom: 1px solid hsl(var(--line)); }
.state-badge { padding: 5px 7px; border-radius: 3px; font: 500 9px var(--font-mono); letter-spacing: .07em; }
.state-internal { background: hsl(var(--teal-pale)); color: hsl(var(--teal-dark)); }
.state-draft { background: hsl(29 44% 91%); color: hsl(var(--copper)); }
.revision-info { color: hsl(var(--muted)); font: 10px var(--font-mono); }
.document-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.document-title { margin: 22px 0 5px; font: 700 24px/1.2 var(--font-display); letter-spacing: -.035em; }
.document-byline { padding-bottom: 20px; color: hsl(var(--muted)); font-size: 11px; }
.document-blocks { display: grid; gap: 12px; }
.content-heading { margin: 12px 0 0; font: 700 17px/1.35 var(--font-display); }
.content-paragraph { max-width: 780px; margin: 0; color: hsl(var(--ink-soft)); line-height: 1.75; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.structured-block { border: 1px solid hsl(var(--line)); border-radius: 7px; background: hsl(42 47% 98%); }
.block-kicker { padding: 11px 13px; border-bottom: 1px solid hsl(var(--line)); color: hsl(var(--muted)); font: 500 9px var(--font-mono); letter-spacing: .11em; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 13px; color: hsl(var(--muted)); background: hsl(var(--paper-deep)); font: 500 9px var(--font-mono); letter-spacing: .04em; }
td { padding: 10px 13px; border-top: 1px solid hsl(var(--line)); color: hsl(var(--ink-soft)); font-size: 11px; }
.metric-list { padding: 0 13px; }
.metric-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid hsl(var(--line)); }
.metric-row:last-child { border-bottom: 0; }
.metric-copy { display: grid; gap: 3px; }
.metric-copy span { font-size: 12px; font-weight: 600; }
.metric-copy small { color: hsl(var(--muted)); font-size: 10px; }
.metric-value { color: hsl(var(--teal-dark)); font: 700 18px var(--font-display); }
.diagram-nodes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 14px; list-style: none; }
.diagram-node { display: grid; gap: 5px; min-width: 120px; padding: 10px 12px; border: 1px solid hsl(174 28% 77%); border-radius: 5px; background: hsl(var(--teal-pale)); color: hsl(var(--teal-dark)); font-size: 11px; }
.node-id { font: 9px var(--font-mono); opacity: .75; }
.diagram-edges { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0 14px 14px; list-style: none; }
.diagram-edges li { display: flex; align-items: center; gap: 6px; color: hsl(var(--muted)); font-size: 10px; }
.diagram-edges small { padding-left: 4px; font-style: italic; }
.edge-from, .edge-to { color: hsl(var(--ink-soft)); font: 10px var(--font-mono); }
.edge-arrow { color: hsl(var(--teal)); }
.attachment-block { display: flex; align-items: center; gap: 12px; padding: 11px 13px; }
.attachment-icon { padding: 5px; background: hsl(var(--paper-deep)); color: hsl(var(--muted)); font: 9px var(--font-mono); }
.attachment-label { flex: 1; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.block-empty { padding: 15px; border-left: 2px solid hsl(var(--line)); color: hsl(var(--muted)); font-size: 12px; }
.reading-empty { display: grid; justify-items: start; align-content: center; min-height: 380px; padding: 28px; }
.reading-empty h2 { margin: 13px 0 5px; font: 700 19px var(--font-display); }
.reading-empty p { max-width: 330px; margin: 0; color: hsl(var(--muted)); font-size: 12px; line-height: 1.6; }
.editor { display: grid; gap: 15px; }
.editor-heading h2 { margin: 4px 0; font: 700 21px var(--font-display); }
.field { min-width: 0; display: grid; gap: 7px; }
.field-label { color: hsl(var(--ink-soft)); font-size: 11px; font-weight: 700; }
.field input, .field textarea, .field select, .compact-select select { width: 100%; min-width: 0; border: 1px solid hsl(var(--line)); border-radius: 5px; outline: none; padding: 10px 11px; background: hsl(var(--panel)); color: hsl(var(--ink)); }
.field input:focus, .field textarea:focus, .field select:focus, .compact-select select:focus { border-color: hsl(var(--teal)); box-shadow: 0 0 0 3px hsl(var(--teal-pale)); }
.field-hint { color: hsl(var(--muted)); font-size: 10px; }
.json-editor { width: 100%; min-height: 260px; resize: vertical; border: 1px solid hsl(var(--line)); border-radius: 5px; padding: 13px; outline: none; background: hsl(190 22% 17%); color: hsl(165 42% 89%); font: 11px/1.65 var(--font-mono); tab-size: 2; }
.json-editor:focus { border-color: hsl(var(--teal)); box-shadow: 0 0 0 3px hsl(var(--teal-pale)); }
.block-help { border: 1px solid hsl(var(--line)); border-radius: 5px; background: hsl(var(--panel)); }
.block-help summary { padding: 9px 11px; cursor: pointer; color: hsl(var(--teal-dark)); font-size: 11px; font-weight: 700; }
.block-help-body { padding: 0 11px 10px; }
.block-help-body > p { margin: 0 0 9px; color: hsl(var(--muted)); font-size: 10px; }
.schema-line { display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 8px; padding: 5px 0; border-top: 1px solid hsl(var(--line)); font-size: 10px; }
.schema-line code { overflow-wrap: anywhere; color: hsl(var(--ink-soft)); font: 9px/1.5 var(--font-mono); }
.upload-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px dashed hsl(var(--line)); border-radius: 5px; }
.upload-row > div { margin-right: auto; font-size: 11px; font-weight: 700; }
.upload-row small { flex-basis: 100%; color: hsl(var(--muted)); font-size: 10px; }
.file-input { display: none; }
.editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.editor-error { color: hsl(var(--danger)); font-size: 11px; }
.button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 12px; border: 1px solid transparent; border-radius: 5px; text-decoration: none; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; font-size: 11px; font-weight: 700; white-space: nowrap; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button-primary { background: hsl(var(--teal-dark)); color: hsl(0 0% 100%); }
.button-primary:hover:not(:disabled) { background: hsl(var(--teal)); }
.button-secondary { border-color: hsl(var(--line)); background: hsl(var(--panel)); color: hsl(var(--ink-soft)); }
.button-secondary:hover:not(:disabled) { border-color: hsl(var(--teal)); color: hsl(var(--teal-dark)); }
.button-quiet { min-height: 30px; padding: 5px 8px; color: hsl(var(--muted)); background: transparent; }
.button-quiet:hover:not(:disabled) { background: hsl(var(--paper-deep)); color: hsl(var(--ink)); }
.button-small { min-height: 28px; padding: 5px 8px; font-size: 10px; }
.button-danger { border-color: hsl(3 42% 81%); background: hsl(3 64% 97%); color: hsl(var(--danger)); }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.data-section { max-width: 1000px; padding: 25px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.data-section h2 { margin: 5px 0 0; font: 700 22px var(--font-display); letter-spacing: -.03em; }
.section-intro { margin: 8px 0 18px; color: hsl(var(--muted)); font-size: 12px; line-height: 1.6; }
.compact-select { min-width: 180px; display: grid; gap: 4px; color: hsl(var(--muted)); font: 9px var(--font-mono); }
.compact-select select { padding: 7px 9px; font: 11px var(--font-body); }
.timeline { display: grid; }
.timeline-item { display: grid; grid-template-columns: 13px minmax(0,1fr) auto; align-items: start; gap: 13px; padding: 15px 0; border-top: 1px solid hsl(var(--line)); }
.timeline-dot { width: 9px; height: 9px; margin-top: 4px; border: 2px solid hsl(var(--teal)); border-radius: 50%; background: hsl(var(--paper)); }
.timeline-copy { min-width: 0; }
.timeline-top { font: 500 11px var(--font-mono); }
.timeline-copy p { margin: 5px 0 0; color: hsl(var(--muted)); font-size: 11px; }
.empty-panel { display: grid; justify-items: start; gap: 8px; padding: 23px; border: 1px dashed hsl(var(--line)); border-radius: 6px; background: hsl(42 43% 98%); }
.empty-panel strong { font: 600 14px var(--font-display); }
.empty-panel p { margin: 0; color: hsl(var(--muted)); font-size: 11px; }
.audit-table { min-width: 720px; }
.audit-table th, .audit-table td { padding: 11px; }
.audit-table td { font-size: 10px; }
.security-note { display: grid; gap: 5px; margin: 17px 0; padding: 12px 14px; border-left: 3px solid hsl(var(--copper)); background: hsl(29 50% 94%); }
.security-note strong { color: hsl(var(--copper)); font-size: 11px; }
.security-note span { color: hsl(var(--ink-soft)); font-size: 11px; line-height: 1.5; }
.credential-form { display: grid; grid-template-columns: 1.3fr 1.2fr .7fr auto; align-items: end; gap: 10px; padding: 17px; border: 1px solid hsl(var(--line)); border-radius: 6px; background: hsl(var(--panel)); }
.credential-form .field input { font-size: 11px; }
.token-panel { display: grid; justify-items: start; gap: 8px; margin-top: 14px; padding: 15px; border: 1px solid hsl(174 31% 74%); border-radius: 6px; background: hsl(var(--teal-pale)); }
.token-panel > strong { font: 600 13px var(--font-display); }
.token-panel p { margin: 0; color: hsl(var(--muted)); font-size: 11px; }
.token-value { width: 100%; padding: 10px; border: 1px solid hsl(174 30% 75%); border-radius: 4px; background: hsl(42 44% 99%); color: hsl(var(--teal-dark)); overflow-wrap: anywhere; font: 11px/1.5 var(--font-mono); user-select: all; }
.revoke-form { display: grid; grid-template-columns: minmax(220px,1fr) auto; align-items: end; gap: 9px; margin-top: 24px; padding-top: 18px; border-top: 1px solid hsl(var(--line)); }
.revoke-form h3, .revoke-form p { grid-column: 1/-1; margin: 0; }
.revoke-form h3 { font: 700 14px var(--font-display); }
.revoke-form p { margin-top: -4px; color: hsl(var(--muted)); font-size: 11px; }
.permission-note { color: hsl(var(--muted)); font-size: 11px; }
.notice-line { margin: 12px 0 0; padding: 8px 11px; border-left: 2px solid hsl(var(--teal)); background: hsl(var(--teal-pale)); color: hsl(var(--teal-dark)); font-size: 11px; }
.inline-alert { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; margin-top: 20px; padding: 12px; border: 1px solid hsl(3 42% 82%); border-radius: 5px; background: hsl(3 60% 97%); color: hsl(var(--danger)); }
.inline-alert span { color: hsl(var(--ink-soft)); font-size: 11px; }
.main-loading { padding-top: 30px; }
.skeleton { height: 13px; margin: 13px 0; border-radius: 4px; background: linear-gradient(90deg, hsl(var(--paper-deep)), hsl(38 25% 88%), hsl(var(--paper-deep))); background-size: 200% 100%; animation: skeleton 1.5s ease infinite; }
.skeleton-title { width: 34%; height: 22px; }
.skeleton-short { width: 53%; }
.skeleton-panel { height: 130px; flex: 1; }
.skeleton-row { display: flex; gap: 15px; }
@keyframes skeleton { to { background-position: -200% 0; } }
.state-page { min-height: 100dvh; display: grid; place-items: center; padding: 28px; background: radial-gradient(ellipse at 84% 12%, hsl(165 30% 90%) 0, transparent 37%), hsl(var(--paper)); }
.state-card, .loading-card { width: min(100%, 540px); padding: 33px; border: 1px solid hsl(var(--line)); border-radius: 9px; background: hsl(var(--panel)); box-shadow: var(--shadow); }
.state-card .brand, .loading-card .brand { margin-bottom: 42px; }
.state-card .eyebrow { display: block; margin-bottom: 9px; }
.state-card h1 { margin: 0 0 12px; font: 800 30px/1.1 var(--font-display); letter-spacing: -.045em; }
.state-card > p { max-width: 430px; margin: 0; color: hsl(var(--muted)); font-size: 13px; line-height: 1.65; }
.state-card .button { margin-top: 22px; }
.state-card .fine-print { margin-top: 17px; font-size: 11px; }
.state-card .fine-print a { font-weight: 700; }
.loading-card { width: min(100%, 750px); }

@media (min-width: 1400px) {
  .main-panel { padding-left: 42px; padding-right: 42px; }
  .content-layout { grid-template-columns: 280px minmax(0,1fr); }
  .reading-pane { padding-left: 34px; }
}

@media (max-width: 900px) {
  .topbar { padding: 0 18px; }
  .workspace-layout { grid-template-columns: 205px minmax(0,1fr); }
  .main-panel { padding: 0 20px 25px; }
  .portal-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .content-layout { grid-template-columns: 185px minmax(0,1fr); }
  .reading-pane { padding-left: 17px; }
  .credential-form { grid-template-columns: 1fr 1fr; }
  .credential-form .button { grid-column: 1/-1; }
}

@media (max-width: 650px) {
  .topbar { height: 56px; padding: 0 13px; gap: 10px; }
  .brand { min-width: 0; }
  .topbar-status { margin-left: auto; font-size: 8px; }
  .topbar-status .secure-dot { width: 6px; height: 6px; }
  .topbar .button { padding: 5px 6px; }
  .workspace-layout { display: flex; flex-direction: column; min-height: calc(100dvh - 56px); }
  .sidebar { padding: 10px 11px 9px; border-right: 0; border-bottom: 1px solid hsl(var(--line)); }
  .sidebar-label { padding: 0 3px 7px; }
  .portal-list { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: thin; }
  .portal-link { flex: 0 0 190px; padding: 7px; }
  .portal-glyph { flex-basis: 29px; width: 29px; height: 29px; }
  .sidebar-foot { display: none; }
  .main-panel { padding: 0 13px 24px; }
  .portal-heading { padding: 18px 0 14px; }
  .title-line h1 { font-size: 22px; }
  .title-line { flex-wrap: wrap; }
  .portal-heading-copy > p { font-size: 11px; }
  .workspace-tabs { gap: 18px; height: 39px; }
  .tab-meta { font-size: 8px; }
  .content-layout { display: flex; flex-direction: column; min-height: unset; }
  .content-rail { padding: 12px 0 10px; border-right: 0; border-bottom: 1px solid hsl(var(--line)); }
  .rail-heading { margin-bottom: 6px; }
  .content-list { display: flex; overflow-x: auto; gap: 6px; }
  .content-list-item { flex: 0 0 225px; }
  .rail-empty { padding: 13px 5px; }
  .rail-empty strong { margin-top: 7px; }
  .reading-pane { padding: 15px 0 20px; }
  .document-title { font-size: 22px; }
  .document-toolbar { gap: 7px; }
  .document-actions { flex-basis: 100%; margin-left: 0; }
  .structured-block { max-width: 100%; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .compact-select { width: 100%; }
  .timeline-item { grid-template-columns: 12px minmax(0,1fr); }
  .timeline-item .button { grid-column: 2; justify-self: start; }
  .credential-form { grid-template-columns: 1fr; }
  .credential-form .button { grid-column: auto; }
  .revoke-form { grid-template-columns: 1fr; }
  .revoke-form .button { justify-self: start; }
  .inline-alert { grid-template-columns: 1fr auto; }
  .inline-alert span { grid-column: 1/-1; grid-row: 2; }
  .inline-alert .button { grid-column: 2; grid-row: 1; }
  .state-page { padding: 15px; }
  .state-card, .loading-card { padding: 24px 20px; }
  .state-card .brand, .loading-card .brand { margin-bottom: 32px; }
  .state-card h1 { font-size: 27px; }
  .schema-line { grid-template-columns: 1fr; gap: 3px; }
}

@media (max-width: 390px) {
  .topbar-status span:last-child { display: none; }
  .workspace-tabs { gap: 13px; }
  .tab-meta { display: none; }
}

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