/* Native Ghost surfaces reuse the publication tokens from /_brand/brand.css. */
.rv-system-page { box-sizing:border-box; width:100%; max-width:48rem; margin:clamp(2rem,7vw,5rem) auto; padding:0 1.25rem; }
.rv-system-card { background:var(--rv-surface,#fff); color:var(--rv-ink,#313131); border:1px solid var(--rv-line,#dadada); border-radius:var(--rv-radius,.5rem); padding:clamp(1.5rem,5vw,3rem); }
.rv-system-card h1 { font:700 clamp(1.75rem,4vw,2.75rem)/1.15 var(--rv-font,system-ui); letter-spacing:-.035em; margin:0 0 1rem; overflow-wrap:anywhere; }
.rv-system-card p { color:var(--rv-muted,#686868); line-height:1.6; margin:1rem 0; }
.rv-system-card .rv-system-code { color:var(--rv-primary,#005fe7); font:700 clamp(3rem,10vw,6rem)/1 var(--rv-font,system-ui); margin:0 0 1.5rem; }
.rv-system-actions { display:flex; gap:1rem; flex-wrap:wrap; margin-block-start:1.5rem; align-items:center; }
.rv-system-button,.rv-system-card .button { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; min-height:48px; padding:.75rem 1.25rem; border:1px solid var(--rv-primary,#005fe7); border-radius:.5rem; background:var(--rv-primary,#005fe7); color:var(--rv-on-primary,#fff)!important; font:600 1rem/1.5 var(--rv-font,system-ui); text-decoration:none!important; cursor:pointer; }
.rv-system-button:hover,.rv-system-card .button:hover { background:var(--rv-primary-hover,#004ed1); }
.rv-system-card a:not(.rv-system-button) { color:var(--rv-primary,#005fe7); text-underline-offset:.2em; }
.rv-system-card label { display:block; font-weight:600; margin-block:1rem .5rem; }
.rv-system-card input { box-sizing:border-box; width:100%; min-height:48px; padding:.75rem; font:inherit; font-size:max(1rem,1em); background:var(--rv-surface,#fff); color:var(--rv-ink,#313131); border:1px solid var(--rv-control-line,#878787); border-radius:.5rem; }
.rv-system-card :focus-visible { outline:3px solid var(--rv-primary,#005fe7); outline-offset:3px; }
.rv-system-card [role=alert] { border-inline-start:3px solid #b42318; padding:.75rem 1rem; }
.rv-private-page { margin:0; background:var(--rv-frame,#f6f6f6); color:var(--rv-ink,#313131); font:16px/1.6 var(--rv-font,system-ui); }
.rv-private-page .rv-system-page { max-width:34rem; }
.rv-private-brand { display:flex; gap:.75rem; align-items:center; color:var(--rv-ink,#313131); text-decoration:none; font-weight:700; margin-block-end:1.5rem; }
.rv-private-brand img { width:40px; height:40px; object-fit:contain; }
/* Core fallback/unsubscribe views keep Ghost's form and result behavior. */
body:not(.rv-publication):not(.rv-lab):not(.react-admin) { background:var(--rv-frame,#f6f6f6); color:var(--rv-ink,#313131); font-family:var(--rv-font,system-ui); }
.gh-flow-content { background:var(--rv-surface,#fff); border:1px solid var(--rv-line,#dadada); border-radius:.5rem; padding:2rem; color:var(--rv-ink,#313131); }
.gh-flow-content a,.unsubscribe-footer a { color:var(--rv-primary,#005fe7); }
/* Shade owns Admin layout and behavior; map its semantic tokens, not its editor content. */
body.react-admin,body.react-admin .shade-admin,body.react-admin [data-admin7-design] {
 --background:var(--rv-surface); --foreground:var(--rv-ink); --card:var(--rv-surface); --card-foreground:var(--rv-ink);
 --popover:var(--rv-surface); --popover-foreground:var(--rv-ink); --muted:var(--rv-soft); --muted-foreground:var(--rv-muted);
 --border:var(--rv-line); --input:var(--rv-control-line); --primary:var(--rv-primary); --primary-foreground:var(--rv-on-primary);
 --secondary:var(--rv-soft); --secondary-foreground:var(--rv-ink); --accent:var(--rv-soft); --accent-foreground:var(--rv-primary);
 --ring:var(--rv-primary); --focus-ring:var(--rv-primary); --surface-page:var(--rv-frame); --surface-panel:var(--rv-surface);
 --surface-panel-foreground:var(--rv-ink); --surface-elevated:var(--rv-surface); --surface-elevated-foreground:var(--rv-ink);
 --surface-overlay:var(--rv-surface); --surface-overlay-foreground:var(--rv-ink); --text-primary:var(--rv-ink); --text-secondary:var(--rv-muted);
 --border-subtle:var(--rv-line); --border-default:var(--rv-line); --border-strong:var(--rv-control-line); --surface-inverse:var(--rv-chrome); --surface-inverse-foreground:var(--rv-inverse-ink);
 --sidebar-background:var(--rv-chrome); --sidebar-foreground:var(--rv-inverse-ink); --sidebar-primary:var(--rv-frame-accent); --sidebar-primary-foreground:var(--rv-chrome); --sidebar-accent:var(--rv-frame-soft); --sidebar-accent-foreground:var(--rv-inverse-ink); --sidebar-border:var(--rv-frame-line); --sidebar-ring:var(--rv-frame-accent);
 --font-sans:var(--rv-font); --radius:.5rem; font-family:var(--rv-font);
}
body.react-admin #bootnode-staff-signin { display:block; text-align:center; margin:1rem 0; padding:.75rem 1rem; border:1px solid var(--rv-primary); border-radius:.5rem; color:var(--rv-primary); font-weight:600; text-decoration:none; }
body.react-admin #bootnode-staff-signin:focus-visible { outline:3px solid var(--rv-primary); outline-offset:3px; }

/* Core fallback errors remain readable when the normal theme cannot render. */
.error-content { max-width:48rem; margin:8vh auto; padding:2rem; background:var(--rv-surface,#fff); border:1px solid var(--rv-line,#dadada); border-radius:.5rem; }
.error-content .error-code { color:var(--rv-primary,#005fe7); font-size:clamp(3rem,10vw,6rem); }
.error-content .error-description { color:var(--rv-ink,#313131); font-size:clamp(1.5rem,4vw,2.5rem); overflow-wrap:anywhere; }
.error-content .error-link { color:var(--rv-primary,#005fe7); }

@media (prefers-color-scheme:dark) {
 .rv-private-page { color-scheme:dark; --rv-frame:#161616; --rv-surface:#242424; --rv-ink:#f3f3f3; --rv-muted:#bcbcbc; --rv-line:#4e4e4e; --rv-control-line:#969696; --rv-primary:#86b7ff; --rv-primary-hover:#b9d5ff; --rv-on-primary:#242424; }
}

/* The site title uses foreground rather than the sidebar semantic token. */
body.react-admin [data-sidebar="header"] .heading-font-features { color:var(--rv-inverse-ink,#fff); }
