:root {
    color-scheme: light;
    --ink: #172824;
    --muted: #576961;
    --line: #dfe6e1;
    --paper: #f2f5f1;
    --white: #fff;
    --pine: #142d25;
    --green: #286045;
    --mint: #ebf4ed;
    --gold: #edc080;
    --error: #a22f2a;
    --serif: Georgia, "Times New Roman", serif;
    font-family: "Avenir Next", Avenir, system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 290px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--green); }
:focus-visible { outline: 2px solid #aa6d29; outline-offset: 3px; }
h1, h2, p, dl, dd { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.desk { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { background: var(--pine); color: var(--white); min-height: 100vh; display: flex; flex-direction: column; gap: 42px; padding: 25px 17px 20px; position: sticky; top: 0; height: 100vh; }
.masthead { display: flex; align-items: center; gap: 11px; color: var(--white); }
.brand-mark { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border: 1px solid #826848; border-radius: 9px; color: var(--gold); font: bold 17px var(--serif); }
.masthead strong { display: block; font: bold 21px/1.05 var(--serif); letter-spacing: -.03em; }
.masthead small, .account small { display: block; color: #b4c6bb; font-size: 12px; margin-top: 4px; }

.navigation { display: grid; gap: 5px; }
.navigation button { text-align: left; padding: 10px 13px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #dce8df; font-size: 14px; font-weight: 600; }
.navigation button:hover { background: #203c31; }
.navigation button[aria-current] { background: #274638; color: #fff; border-color: #3a5b48; }

.account { position: relative; flex-shrink: 0; border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; }
.account-toggle { display: grid; width: 100%; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: inherit; text-align: start; }
.account-toggle:hover, .account-toggle[aria-expanded="true"] { background: var(--mint); }
.account strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.account-chevron { width: 7px; height: 7px; margin-inline-end: 3px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: translateY(2px) rotate(-45deg); }
.account-toggle[aria-expanded="true"] .account-chevron { transform: translateY(-2px) rotate(135deg); }
.account-menu { position: absolute; z-index: 10; inset-inline: 0; bottom: calc(100% + 6px); display: grid; gap: 2px; padding: 5px; }
.account-menu button { padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); text-align: start; font-size: 14px; font-weight: 650; }
.account-menu button:hover { background: var(--mint); }
.account-menu .signout { color: var(--error); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #1d352a; background: #d5e5d7; font-size: 12px; font-weight: 750; }
.text-button { border: 0; background: transparent; padding: 0; color: var(--green); text-align: left; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

.workspace { width: min(100%, 1530px); margin: 0 auto; padding: 36px clamp(20px, 3.4vw, 54px) 48px; min-width: 0; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 21px; }
h1 { font: 600 clamp(35px, 3.9vw, 54px)/1.02 var(--serif); letter-spacing: -.045em; }
.page-heading p { margin-top: 8px; }
.page-heading p, .hint, .empty, .story-context { color: var(--muted); font-size: 14px; line-height: 1.5; }

.button { background: var(--white); border: 1px solid #ccd9d0; color: var(--ink); border-radius: 7px; padding: 8px 12px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.button:hover { background: #f2f7f3; }
.primary { background: var(--green); border-color: var(--green); color: #fff; padding: 10px 15px; }
.primary:hover { background: #204c38; }
.surface { background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 4px #20342806; }

.pool-grid { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(300px, 1.5fr); gap: 18px; align-items: start; }
.inbox { min-width: 0; overflow: hidden; }
.inbox-controls { display: grid; grid-template-columns: 1fr minmax(0, 128px); gap: 8px; padding: 13px 13px 10px; }
.inbox-summary { padding: 0 13px 10px; min-height: 29px; color: var(--muted); font-size: 12px; font-weight: 600; }
input, select, textarea { width: 100%; min-width: 0; background: var(--white); color: var(--ink); border: 1px solid #cad8cf; padding: 9px 10px; border-radius: 7px; font-size: 14px; line-height: 1.35; }
textarea { resize: vertical; }
.search input, .source-filter select { height: 36px; font-size: 12px; }

.story-list { border-top: 1px solid var(--line); }
.story-row { display: flex; align-items: flex-start; width: 100%; gap: 10px; padding: 14px 13px 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: var(--white); text-align: left; }
.story-row:last-child { border-bottom: 0; }
.story-row:hover { background: #f7f9f6; }
.story-row[aria-current] { background: #eaf3ec; box-shadow: inset 3px 0 var(--green); }
.story-row img { width: 64px; height: 57px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.story-row-copy { display: grid; gap: 5px; min-width: 0; }
.story-row strong { color: var(--ink); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.story-row small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.pagination { display: flex; justify-content: space-between; padding: 12px 13px; border-top: 1px solid var(--line); }

.story { min-width: 0; min-height: 340px; padding: clamp(16px, 2.4vw, 29px); }
.story-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.pill { background: var(--mint); color: #235036; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 750; }
.story time { font-size: 12px; color: var(--muted); }
.story h2 { font: 600 clamp(23px, 2.35vw, 35px)/1.13 var(--serif); letter-spacing: -.03em; overflow-wrap: anywhere; }
.story-context { margin-top: 9px; overflow-wrap: anywhere; }
.story-media { margin-top: 17px; }
.media-stage { display: grid; place-items: center; min-height: 175px; border: 1px solid var(--line); border-radius: 8px; background: #eef2ed; overflow: hidden; }
.media-stage img, .media-stage video { display: block; width: 100%; max-height: min(38vh, 320px); object-fit: contain; background: #0d1815; }
.media-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.media-files button { white-space: normal; text-align: left; overflow-wrap: anywhere; }
.media-files button[aria-pressed=true] { background: var(--mint); border-color: var(--green); }
.story-body { margin-top: 17px; color: #344a40; font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.story-source { display: inline-block; margin-top: 12px; font-size: 13px; }
.empty { padding: 14px; }

.report-form { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(240px, 1fr); gap: 15px; align-items: start; max-width: 1050px; }
.form-card { display: grid; align-content: start; gap: 12px; padding: 19px; }
.form-card:first-child { grid-row: span 2; }
.form-card h2 { font: 600 24px/1.1 var(--serif); letter-spacing: -.015em; }
.form-card label, .auth-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; }
.location-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.drop-zone { text-align: center; background: #f6f9f6; border: 1px dashed #a7bdb0; border-radius: 8px; padding: 16px 10px; }
.drop-zone[data-active=true] { background: #e8f3e9; border-color: var(--green); }
.drop-zone p { margin: 7px 0 4px; font-size: 13px; color: var(--muted); }
.drop-zone small, .upload-list small { color: var(--muted); font-size: 11px; }
.upload-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.upload-list li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 12px; }
.upload-thumb { width: 42px; height: 36px; object-fit: cover; border-radius: 4px; background: var(--mint); }
.upload-type { display: grid; place-items: center; font-size: 10px; font-weight: 750; }
.upload-list strong { display: block; overflow-wrap: anywhere; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
progress { accent-color: var(--green); }
.feedback { padding: 8px 10px; background: var(--mint); color: #214b32; font-size: 13px; border-radius: 6px; }
.feedback[data-error=true] { background: #f9eeed; color: var(--error); }
#desk-feedback { margin-bottom: 10px; }
.profile-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 15px; }
.profile-fields dt { font-size: 12px; color: var(--muted); }
.profile-fields dd { margin-top: 5px; overflow-wrap: anywhere; font-size: 14px; }

.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(220px, 32%) minmax(0, 1fr); }
.auth-masthead { background: var(--pine); padding: 30px; }
.auth-body { padding: 36px 22px; display: grid; place-items: start center; }
.auth-form { display: grid; gap: 14px; margin-top: min(6vh, 48px); width: min(100%, 410px); }
.auth-form .primary, .auth-form .text-button { justify-self: start; }
.starting { padding: 28px; color: var(--muted); }

@media (max-width: 900px) {
    .desk { grid-template-columns: 170px minmax(0, 1fr); }
    .masthead strong { font-size: 17px; }
    .brand-mark { flex-basis: 34px; height: 34px; }
    .pool-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; }
    .inbox-controls { grid-template-columns: 1fr; }
    .report-form { grid-template-columns: 1fr; }
}
@media (max-width: 665px) {
    .desk, .pool-grid, .auth-screen { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; min-height: 0; gap: 12px; padding: 15px; }
    .navigation { display: flex; flex-wrap: wrap; }
    .navigation button { padding: 7px 9px; font-size: 13px; }
    .account { margin-top: 0; }
    .avatar { width: 31px; height: 31px; }
    .workspace { padding: 22px 14px; }
    .inbox-controls { grid-template-columns: minmax(0, 1fr) 112px; }
    .auth-masthead { padding: 18px; }
    .auth-body { padding-top: 16px; }
}
