:root {
    color-scheme: dark;
    --bg: #131917;
    --surface: #1b2420;
    --edge: #38463e;
    --text: #f2f1e7;
    --muted: #b9c5b9;
    --accent: #c3dab7;
    --on-accent: #18241b;
    --gold: #f0cf89;
    --danger: #ffb7af;
    --hero-ink: #fff9eb;
    --hero-wash: linear-gradient(0deg, #0a1511 0%, #0a1511d9 15%, #0a151169 54%, transparent 78%);
    --radius: 16px;
    --display: Georgia, 'Times New Roman', serif;
    --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f6ef;
    --surface: #fdfff9;
    --edge: #ced8cb;
    --text: #1e2b22;
    --muted: #4d5f51;
    --accent: #365a3e;
    --on-accent: #fff;
    --gold: #875a0d;
    --danger: #9e2c25;
}
:root[data-theme="contrast"] {
    color-scheme: dark;
    --bg: #000;
    --surface: #000;
    --edge: #fff;
    --text: #fff;
    --muted: #fff;
    --accent: #f5ff6a;
    --on-accent: #000;
    --gold: #f5ff6a;
    --danger: #ff9d9d;
    --hero-ink: #fff;
    --hero-wash: none;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 1rem/1.6 var(--sans);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
img, video { display: block; max-width: 100%; height: auto; }
video { background: #080c0a; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
h1, h2, h3, .brand, .footer-brand {
    font-family: var(--display);
    font-weight: 500;
    line-height: 1.04;
}
time { display: block; color: var(--muted); font-size: .875rem; }
.shell { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
    position: fixed; z-index: 10; top: .5rem; left: .5rem;
    color: var(--on-accent); background: var(--accent); padding: .6rem;
}
.site-header { border-bottom: 1px solid var(--edge); }
.header-inner {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center;
    gap: .65rem; min-height: 4.25rem;
}
.brand {
    display: flex; align-items: center; gap: .65rem; color: var(--text);
    text-decoration: none; min-width: 0; font-size: 1.65rem;
}
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand img { border-radius: 9px; object-fit: contain; flex: 0 0 37px; height: 37px; }
.site-nav { display: flex; gap: .75rem; align-items: center; }
.site-nav a, .site-footer nav a {
    color: var(--muted); font-size: .875rem; padding-block: .7rem; text-decoration: none;
}
.site-nav a:hover, .site-footer nav a:hover, .site-nav [aria-current] { color: var(--accent); text-decoration: underline; }
.theme-picker { position: relative; z-index: 3; }
.theme-picker summary {
    width: 42px; height: 42px; display: grid; place-items: center; list-style: none;
    border: 1px solid var(--edge); border-radius: 50%; color: var(--text);
}
.theme-picker summary::-webkit-details-marker { display: none; }
.theme-picker summary:hover, .theme-picker[open] summary { border-color: var(--accent); }
.theme-icon { font-size: 1.2rem; line-height: 1; }
.theme-options {
    position: absolute; right: 0; top: calc(100% + .6rem); min-width: 10rem;
    padding: .35rem; border: 1px solid var(--edge); border-radius: 12px; background: var(--surface);
    box-shadow: 0 12px 25px #0004;
}
.theme-options button {
    display: block; width: 100%; text-align: left; border: 0; padding: .6rem .75rem;
    color: var(--text); background: transparent; border-radius: 7px; white-space: nowrap;
}
.theme-options button[aria-pressed="true"], .theme-options button:hover {
    background: var(--accent); color: var(--on-accent);
}
.intro { margin-block: 2.75rem 2rem; }
.intro.compact { margin-bottom: 2.5rem; }
.eyebrow, .section-label {
    font-size: .875rem; letter-spacing: .15em; color: var(--accent); font-weight: 650;
}
.eyebrow { display: flex; align-items: center; gap: .55rem; margin-bottom: .6rem; }
.eyebrow span { width: .45rem; height: .45rem; border-radius: 100%; background: var(--accent); }
.intro h1 { font-size: clamp(3.5rem, 11vw, 7.5rem); letter-spacing: -.077em; }
.title-dot { color: var(--accent); }
.intro > p:last-child:not(.eyebrow) { color: var(--muted); max-width: 48ch; margin-top: .8rem; font-size: clamp(1rem, 2vw, 1.15rem); overflow-wrap: anywhere; }
.section-label { display: flex; align-items: center; gap: 1rem; margin-bottom: .65rem; }
.section-label::after { content: ''; height: 1px; background: var(--edge); flex: 1; }
.feature {
    display: grid; position: relative; border-radius: var(--radius);
    overflow: hidden; isolation: isolate; border: 1px solid var(--edge); background: var(--surface);
}
.feature:not(.feature-video) > * { grid-area: 1 / 1; }
.feature-media img { width: 100%; height: 100%; aspect-ratio: 4 / 4.65; object-fit: cover; }
.feature-media video { max-height: 37rem; width: 100%; }
.feature:not(.feature-video)::after {
    content: ''; grid-area: 1 / 1; pointer-events: none; background: var(--hero-wash);
}
.feature-copy {
    align-self: end; z-index: 1; padding: 1.35rem; color: var(--hero-ink);
    max-width: 42rem;
}
.feature-video .feature-copy { color: var(--text); }
.feature-copy time { color: inherit; margin-bottom: .5rem; }
.feature-copy h2 { font-size: clamp(2.3rem, 6vw, 4.5rem); letter-spacing: -.05em; }
.feature-copy h2 a, .card h3 a, .card h2 a { color: inherit; text-decoration: none; }
.feature-copy h2 a:hover, .card h3 a:hover, .card h2 a:hover { text-decoration: underline; }
.feature-copy p { margin-block: .6rem .95rem; max-width: 43ch; }
.feature-link {
    display: inline-flex; min-height: 42px; align-items: center; border: 1px solid #ebece193;
    padding: .35rem .85rem; border-radius: 30px; color: inherit; text-decoration: none; font-weight: 600; font-size: .875rem;
}
.feature-link:hover { background: var(--hero-ink); color: #18241b; }
[data-theme="contrast"] .feature-copy { background: #000; max-width: none; }
.feature-rating {
    border-bottom: 1px solid var(--edge); padding: .35rem 0 .5rem;
}
.rating { display: flex; flex-wrap: wrap; column-gap: .8rem; align-items: center; }
.rating-stars { display: flex; align-items: center; }
.rating-stars button {
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px;
    background: transparent; color: var(--muted); font: 1.45rem/1 var(--sans);
}
.rating-stars button.filled, .rating-stars button:hover, .rating-stars button:focus-visible { color: var(--gold); }
@media (hover: hover) {
    .rating-stars:has(button:hover) button { color: var(--muted); }
    .rating-stars:has(button:hover) button:is(:hover, :has(~ button:hover)) { color: var(--gold); }
}
.rating-summary { color: var(--muted); font-size: .875rem; }
.rating-error { color: var(--danger); flex-basis: 100%; }
.feed-section { margin-top: 2.6rem; }
.section-head { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; margin-bottom: 1rem; }
.section-head h2 { font-size: clamp(1.65rem, 5vw, 2.45rem); }
.section-head a, .back-link { font-size: .9rem; }
.feed-grid { display: grid; gap: 1.15rem; }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; }
.card-media a { display: block; }
.card-media a:focus-visible { outline-offset: -5px; }
.card-media img, .card-media video { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card-media video { object-fit: contain; }
.card-body { padding: 1rem; }
.card h3, .card h2 { font-size: clamp(1.55rem, 4vw, 2.1rem); margin-block: .35rem; }
.card-body > p { color: var(--muted); }
.card .rating { margin-top: .6rem; border-top: 1px solid var(--edge); padding-top: .35rem; }
.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 2rem; }
.empty { border: 1px dashed var(--edge); padding: 2rem; border-radius: var(--radius); color: var(--muted); }
.empty p { margin-top: .5rem; }
.entry { margin-top: 2.25rem; }
.entry-header { max-width: 50rem; }
.entry-header time { margin-top: 1.25rem; }
.entry-header h1, .document h1 { font-size: clamp(2.35rem, 8vw, 5rem); letter-spacing: -.05em; margin-block: .4rem 1rem; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.entry-header p { max-width: 62ch; font-size: 1.1rem; }
.gallery { display: grid; gap: 2rem; margin-top: 1.8rem; }
.gallery figure { margin: 0; scroll-margin-top: 1rem; }
.entry-media { border: 1px solid var(--edge); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.entry-media img, .entry-media video { margin-inline: auto; max-height: 75vh; width: auto; max-width: 100%; object-fit: contain; }
.gallery figcaption { padding-block: .45rem; border-bottom: 1px solid var(--edge); }
.gallery figcaption > p { margin-block: .5rem; color: var(--muted); }
.site-footer { border-top: 1px solid var(--edge); margin-top: 3.3rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 1rem; padding-block: 1.25rem; }
.footer-brand { font-size: 1.55rem; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.document { max-width: 54rem; margin: 2.5rem auto 0; }
.document section, .document h2 { margin-top: 1.8rem; }
.document h2 { margin-bottom: .6rem; font-size: 1.65rem; }
.document.login { max-width: 28rem; }
.editor-top, .form-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: .75rem 1rem; }
.editor-top { justify-content: space-between; }
.form-actions { margin-top: .6rem; }
.editor-form { display: grid; gap: 1rem; }
.editor-form label:not(.checkbox) { display: grid; gap: .35rem; min-width: 0; }
.editor-form input:not([type="checkbox"]), .editor-form textarea {
    color: var(--text); background: var(--surface); border: 1px solid var(--edge); border-radius: 8px;
    min-width: 0; width: 100%; padding: .65rem;
}
.editor-form input[type="file"] { font-size: .875rem; }
.editor-form fieldset { margin: 0; min-width: 0; border: 1px solid var(--edge); border-radius: 10px; padding: .8rem; }
.editor-form fieldset > label + label { margin-top: 1rem; }
.editor-form legend { padding-inline: .35rem; color: var(--accent); }
.help { margin-bottom: .75rem; color: var(--muted); font-size: .875rem; }
.upload-fields { display: grid; gap: .6rem; padding-bottom: .65rem; }
.upload-slot { border-top: 1px solid var(--edge); padding-block: .35rem; }
.upload-slot summary { padding: .2rem 0; color: var(--accent); }
.edit-medium { display: grid; gap: .45rem; padding-block: .65rem; }
.edit-medium + .edit-medium { border-top: 1px solid var(--edge); }
.edit-medium img, .logo-preview { border-radius: 6px; object-fit: contain; }
.logo-preview { margin-bottom: .8rem; }
.checkbox { display: flex; align-items: center; gap: .4rem; min-height: 42px; }
.checkbox input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.button, .quiet-button { border-radius: 8px; border: 1px solid transparent; padding: .6rem .9rem; justify-self: start; display: inline-block; font-weight: 650; text-decoration: none; }
.button:hover, .quiet-button:hover { text-decoration: underline; }
.button:disabled { cursor: wait; opacity: .7; }
.primary { background: var(--accent); color: var(--on-accent); }
.danger, .quiet-button { background: var(--surface); border-color: var(--edge); color: var(--text); }
.danger-link, .danger { color: var(--danger); }
.alert, .notice { padding: .6rem .8rem; margin-bottom: .75rem; border: 1px solid currentColor; border-radius: 8px; }
.alert { color: var(--danger); }
.notice { color: var(--accent); }
.editor-list { list-style: none; padding: 0; }
.editor-list li { display: flex; gap: .5rem 1rem; flex-wrap: wrap; align-items: center; padding-block: .7rem; border-bottom: 1px solid var(--edge); }
.editor-list li > div { margin-right: auto; }
@media (min-width: 45rem) {
    .shell { width: min(100% - 5rem, 70rem); }
    .header-inner { min-height: 4.5rem; gap: 1.4rem; }
    .site-nav { gap: 1.4rem; }
    .site-nav a { font-size: .95rem; }
    .intro { margin-block: 3.35rem 2.45rem; }
    .feature-media img { height: 100%; aspect-ratio: 2.5; }
    .feature-copy { padding: 1.8rem 2rem; }
    .feature:not(.feature-video)::after {
        background: linear-gradient(90deg, #0b1510bb, transparent 75%), var(--hero-wash);
    }
    [data-theme="contrast"] .feature:not(.feature-video)::after { background: none; }
    .feature-rating { padding-inline: .7rem; }
    .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .upload-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .edit-medium { grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; }
}
@media (max-width: 23rem) {
    .header-inner { gap: .4rem; }
    .site-nav { gap: .45rem; }
    .brand { gap: .35rem; font-size: 1.2rem; }
    .brand img { height: 30px; width: 30px; flex-basis: 30px; }
}
@media (forced-colors: active) {
    .rating-stars button { border: 1px solid ButtonText; }
    .rating-stars button[aria-pressed="true"] { border: 3px solid Highlight; }
}
