:root {
    color-scheme: light;
    --ink: #19182a;
    --muted: #626378;
    --line: #e3e4ee;
    --paper: #fff;
    --canvas: #f5f6fa;
    --accent: #4935c4;
    --tint: #ebe8ff;
    --radius: 16px;
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #a894ff; outline-offset: 3px;
}
h1, h2, h3 { margin-block: 0 .55em; line-height: 1.13; }
h1 { font-size: clamp(1.85rem, 4vw, 2.8rem); letter-spacing: -.045em; }
h2 { font-size: 1.15rem; letter-spacing: -.02em; }
p { line-height: 1.6; }
small { display: block; margin-top: .25rem; color: var(--muted); }
.skip { position: fixed; inset-inline-start: 1rem; inset-block-start: -10rem; z-index: 4; padding: .6rem 1rem; background: white; }
.skip:focus { inset-block-start: .5rem; }
.admin { min-height: 100vh; display: grid; grid-template-columns: 225px minmax(0, 1fr); }
.rail { padding: 1.4rem 1rem; background: #17162b; color: white; }
.brand { display: inline-flex; gap: .65rem; align-items: center; font-weight: 750; text-decoration: none; color: inherit; }
.brand b { display: grid; place-items: center; width: 2rem; height: 2rem; background: #6853ed; color: white; border-radius: .55rem; font-size: 1.25rem; }
.rail nav { display: grid; gap: .2rem; margin-top: 1.6rem; }
.rail nav a { color: #dedbf3; text-decoration: none; padding: .62rem .75rem; border-radius: .65rem; font-size: .93rem; overflow-wrap: anywhere; }
.rail nav a:hover, .rail nav a[aria-current] { background: #35305d; color: white; }
.rail nav a[aria-current] { box-shadow: inset 3px 0 #a895ff; }
.rail-label { color: #aeabcb; font-size: .74rem; font-weight: 700; margin: .95rem .75rem .2rem; }
.topbar { min-height: 68px; padding: .7rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line); background: var(--paper); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem; }
.workspace main { max-width: 1460px; margin-inline: auto; padding: clamp(1rem, 4vw, 3rem); }
.heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.2rem; }
.heading h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
button, .button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; padding: .63rem .9rem; border-radius: .65rem; font: inherit; font-weight: 650; text-decoration: none; background: var(--accent); color: white; cursor: pointer; }
button:hover, .button:hover { filter: brightness(.92); }
button:disabled { opacity: .5; cursor: default; }
.quiet { background: var(--paper); color: var(--ink); border-color: var(--line); }
.danger { color: #9b213b; background: #fff0f3; }
.card { padding: clamp(1rem, 2vw, 1.5rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.metrics, .media-grid, .inbox { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.metric { display: grid; gap: .6rem; }
.metric span, .muted { color: var(--muted); }
.metric strong { font-size: 2.25rem; letter-spacing: -.06em; color: var(--accent); }
.editor { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-bottom: 1rem; }
.stack { display: grid; gap: 1rem; align-content: start; }
.stack button { justify-self: start; }
.stack h2, .stack p { margin: 0; }
.narrow { max-width: 650px; }
label { display: grid; gap: .4rem; font-size: .94rem; font-weight: 650; min-width: 0; }
input, select, textarea { border: 1px solid var(--line); border-radius: .58rem; font: inherit; color: var(--ink); background: var(--paper); padding: .6rem .7rem; width: 100%; min-width: 0; }
input[type="checkbox"], input[type="radio"] { width: 1rem; accent-color: var(--accent); }
textarea { resize: vertical; line-height: 1.55; }
.check, .theme-option { display: flex; gap: .62rem; align-items: center; }
.filters { align-items: end; margin-bottom: 1rem; }
.filters label { flex: 1 1 180px; }
fieldset { border: 1px solid var(--line); border-radius: .7rem; display: grid; gap: .6rem; margin: 0; padding: .8rem; }
.swatch { display: inline-block; width: 1.7rem; height: 1.1rem; border-radius: .3rem; }
.swatch.classic { background: linear-gradient(110deg,#faf1e3 50%,#764326 50%); }
.swatch.modern { background: linear-gradient(110deg,#e5e2ff 50%,#4935c4 50%); }
.swatch.velocity { background: linear-gradient(110deg,#171c17 50%,#c9f361 50%); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: start; }
th, td { text-align: start; padding: .72rem .7rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th { color: var(--muted); font-size: .8rem; }
.pill { display: inline-block; border-radius: 999px; background: var(--canvas); color: var(--muted); padding: .25rem .6rem; font-size: .78rem; }
.pill.live { background: #daf6e6; color: #176341; }
.notice { padding: .7rem 1rem; background: var(--tint); color: var(--ink); border-radius: .7rem; margin: 0 0 1rem; }
.notice.error { background: #ffe8ec; color: #851b2c; }
.notice ul { margin: .25rem 0; padding-inline-start: 1.2rem; }
.rows { list-style: none; margin: 0 0 1rem; padding: 0; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: .65rem 0; overflow-wrap: anywhere; }
.pagination { margin-block: 1rem .2rem; }
.media-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .7rem; }
.inbox { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
dt { font-weight: 700; margin-top: .75rem; }
dd { margin-inline-start: 0; }
.compact { font-size: .86rem; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login main { width: min(100%, 430px); padding: 2rem; }
.login h1 { margin-top: 1.25rem; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.site { background: var(--paper); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
.site main { flex: 1; }
.site-shell { width: min(1100px, 92%); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header .site-shell { display: flex; align-items: center; gap: 1rem 1.65rem; padding: 1rem 0; flex-wrap: wrap; }
.site-brand { color: var(--ink); font-weight: 800; font-size: 1.25rem; text-decoration: none; }
.site-nav, .site-langs { display: flex; flex-wrap: wrap; gap: .65rem 1rem; }
.site-nav a, .site-langs a { text-decoration: none; }
.site-langs { margin-inline-start: auto; font-size: .86rem; }
.site-langs a[aria-current] { font-weight: 750; text-decoration: underline; }
.hero { background: var(--tint); padding: clamp(2.75rem, 8vw, 7rem) 0; }
.hero h1 { font-size: clamp(2.3rem, 7.5vw, 5.75rem); margin: 0; overflow-wrap: anywhere; }
.hero p { max-width: 55ch; font-size: 1.2rem; }
.cover { display: block; width: min(100%, 870px); max-height: 500px; object-fit: cover; margin-top: 2rem; border-radius: var(--radius); }
.site-body { padding-block: 2rem 4rem; }
.site-body h2 { font-size: 1.6rem; }
.article { max-width: 72ch; margin-bottom: 2rem; }
.site-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.site-cards article { background: var(--canvas); border-radius: var(--radius); border: 1px solid var(--line); padding: 1.25rem; }
.site-cards h3 { overflow-wrap: anywhere; }
.site-footer { border-top: 1px solid var(--line); padding: 1.2rem 0; color: var(--muted); }
.site.theme-classic { --paper: #fffdf8; --ink: #32261f; --muted: #685144; --accent: #795037; --line: #e6d9cc; --tint: #f5ede0; --canvas: #faf5eb; --radius: 2px; }
.theme-classic .hero { text-align: center; }
.theme-classic .hero :is(h1,p,img) { margin-inline: auto; }
.theme-classic :is(h1,h2,h3,.site-brand) { font-family: Georgia, serif; letter-spacing: -.035em; font-weight: 500; }
.theme-classic .site-cards { display: block; }
.theme-classic .site-cards article { border-width: 0 0 1px; padding-inline: 0; background: transparent; }
.site.theme-velocity { color-scheme: dark; --paper: #141913; --ink: #f4fbe9; --muted: #b7c7b1; --accent: #c6f66a; --line: #3e4c37; --tint: #212c1d; --canvas: #1b2319; --radius: 3px; }
.theme-velocity .hero { border-bottom: 4px solid var(--accent); background: linear-gradient(120deg,#141913,var(--tint)); }
.theme-velocity .hero h1 { font-weight: 900; letter-spacing: -.065em; }
.theme-velocity button { color: #172013; }
@media (max-width: 780px) {
    .admin { display: block; }
    .rail { padding: .85rem 1rem; }
    .rail nav { display: flex; overflow-x: auto; margin-top: .6rem; }
    .rail nav a { white-space: nowrap; }
    .rail-label { display: none; }
    .editor { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
    .site-nav { order: 3; width: 100%; }
    .site-langs { margin-inline-start: 0; }
}
