:root {
    --ink: #10151f;
    --muted: #5d6677;
    --line: #dfe4ec;
    --paper: #f6f4ef;
    --white: #ffffff;
    --accent: #0b7a75;
    --danger: #a12828;
    --shadow: 0 20px 60px rgba(16, 21, 31, 0.12);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 56px);
    background: rgba(246, 244, 239, 0.93);
    border-bottom: 1px solid rgba(16, 21, 31, 0.12);
    backdrop-filter: blur(16px);
}

.brand img {
    width: min(260px, 48vw);
    display: block;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
}

.top-nav a {
    padding: 10px 12px;
    border-radius: 999px;
}

.top-nav a[aria-current="page"],
.top-nav a:hover {
    background: var(--ink);
    color: var(--white);
}

.hero {
    min-height: calc(100svh - 77px);
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    align-items: end;
    gap: clamp(24px, 5vw, 72px);
    padding: clamp(48px, 8vw, 110px) clamp(18px, 5vw, 72px);
    background:
        linear-gradient(120deg, rgba(16, 21, 31, 0.95), rgba(16, 21, 31, 0.84)),
        radial-gradient(circle at 78% 26%, rgba(11, 122, 117, 0.8), transparent 32%),
        linear-gradient(135deg, #10151f, #1a2230);
    color: var(--white);
    overflow: hidden;
}

.hero h1,
.vertical-hero h1,
.community-hero h1,
.admin-hero h1,
.article-header h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 8vw, 112px);
    line-height: 0.92;
    letter-spacing: 0;
}

.hero p,
.vertical-hero p,
.community-hero p,
.admin-hero p {
    max-width: 760px;
    font-size: clamp(18px, 2vw, 24px);
    color: rgba(255, 255, 255, 0.82);
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.button.primary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--white);
}

.button.ghost {
    border-color: rgba(255, 255, 255, 0.38);
}

.button.danger {
    border-color: var(--danger);
    color: var(--danger);
}

.button.small {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.hero-panel {
    padding: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-panel span,
.desk-tile span,
.lead-story span,
.story-row span,
.draft-row span {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-panel strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    line-height: 1.08;
}

.signal-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 14px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.signal-grid b {
    font-size: 28px;
}

.signal-grid span {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    text-transform: none;
    letter-spacing: 0;
}

.section,
.lead-layout,
.desk-index,
.split-rail,
.ticker-layout,
.magazine-layout,
.ledger-layout,
.analysis-layout,
.pulse-layout,
.admin-grid,
.metric-row {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.section {
    padding: clamp(54px, 8vw, 96px) 0;
}

.section-head {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    margin-bottom: 32px;
    border-top: 2px solid var(--ink);
    padding-top: 18px;
}

.section-head h2,
.split-rail h2 {
    margin: 0;
    max-width: 820px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 5vw, 62px);
    line-height: 1;
}

.lead-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 1px;
    background: var(--line);
}

.lead-story,
.story-row,
.desk-tile,
.pulse-post,
.draft-row,
.research-stack,
.desk-method,
.composer,
.admin-grid aside,
.metric-row div {
    background: var(--white);
}

.lead-story {
    grid-row: span 4;
    padding: clamp(28px, 5vw, 56px);
}

.lead-story h3,
.story-row h3,
.desk-tile h3,
.article-body h2,
.mag-feature h2,
.analysis-list h2 {
    margin: 0 0 14px;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.02;
}

.lead-story h3 {
    font-size: clamp(34px, 5vw, 68px);
}

.story-row {
    padding: 24px;
}

.story-row h3 {
    font-size: 24px;
}

.desk-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
}

.desk-tile {
    min-height: 230px;
    padding: 28px;
    border-top: 4px solid var(--accent);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.desk-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.desk-tile h3 {
    font-size: 30px;
}

.split-rail {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(24px, 6vw, 80px);
    padding: clamp(54px, 8vw, 96px) 0;
    border-top: 1px solid var(--line);
}

.rail-list p {
    margin: 0;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
    font-size: 18px;
}

.vertical-hero,
.community-hero,
.admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: clamp(24px, 5vw, 64px);
    align-items: end;
    padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 72px);
    background: linear-gradient(135deg, var(--ink), #202938);
    color: var(--white);
}

.vertical-hero {
    border-bottom: 8px solid var(--accent);
}

.vertical-hero aside {
    display: flex;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
}

.vertical-hero aside strong {
    width: 100%;
    margin-bottom: 6px;
}

.badge {
    display: inline-flex;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
}

.ticker-layout,
.analysis-layout,
.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 54px 0;
}

.news-strip {
    display: grid;
    grid-template-columns: 130px minmax(0, 0.7fr) minmax(0, 1fr);
    gap: 18px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.news-strip a {
    font-weight: 900;
    font-size: 20px;
}

.news-strip p {
    margin: 0;
    color: var(--muted);
}

.research-stack,
.desk-method,
.admin-grid aside {
    align-self: start;
    padding: 24px;
    border-top: 4px solid var(--accent);
}

.research-stack p,
.run-note {
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.magazine-layout {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    margin-top: 54px;
    margin-bottom: 54px;
}

.mag-feature,
.mag-note,
.analysis-list article {
    background: var(--white);
    padding: 28px;
}

.mag-feature {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 420px;
}

.mag-feature h2 {
    font-size: clamp(34px, 5vw, 64px);
}

.ledger-layout {
    padding: 54px 0;
}

.ledger-head,
.ledger-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.ledger-head {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.ledger-row a {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    line-height: 1.08;
}

.ledger-row p {
    margin: 0;
}

.analysis-list {
    display: grid;
    gap: 1px;
    background: var(--line);
}

.analysis-list h2 {
    font-size: clamp(28px, 4vw, 48px);
}

.empty-state {
    text-align: center;
}

.article-shell {
    width: min(900px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(48px, 8vw, 96px) 0;
}

.article-header {
    padding-bottom: 34px;
    border-bottom: 4px solid var(--accent);
}

.article-header a {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--accent);
    font-weight: 900;
    text-transform: uppercase;
}

.article-header p {
    font-size: 22px;
    color: var(--muted);
}

.article-body {
    font-size: 19px;
}

.article-body h2 {
    margin-top: 42px;
    font-size: 34px;
}

.article-body a {
    color: var(--accent);
    font-weight: 800;
}

.article-body li {
    margin-bottom: 12px;
}

.source-note {
    margin-top: 40px;
    padding: 24px;
    background: var(--white);
    border-left: 4px solid var(--accent);
}

.source-note pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.community-hero,
.admin-hero {
    align-items: start;
}

.composer {
    padding: 24px;
    border-radius: 8px;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 13px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

textarea {
    resize: vertical;
}

.pulse-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    padding: 54px 0;
}

.pulse-nav {
    position: sticky;
    top: 94px;
    align-self: start;
    display: grid;
    gap: 8px;
}

.pulse-nav a {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-weight: 800;
}

.pulse-feed {
    display: grid;
    gap: 14px;
}

.pulse-post {
    padding: 22px;
    border-radius: 8px;
}

.pulse-post header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
}

.pulse-post header strong {
    color: var(--ink);
}

.pulse-post button {
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.admin-hero form {
    align-self: end;
}

.notice {
    width: min(1180px, calc(100% - 36px));
    margin: 24px auto 0;
    padding: 14px 18px;
    background: #e9f7ef;
    border-left: 4px solid #198754;
    font-weight: 800;
}

.form-error {
    margin: 0 0 14px;
    padding: 12px 14px;
    background: #fff2f2;
    border-left: 4px solid var(--danger);
    color: var(--danger);
    font-weight: 900;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    margin-top: 32px;
}

.metric-row div {
    padding: 22px;
}

.metric-row strong {
    display: block;
    font-size: 38px;
    line-height: 1;
}

.metric-row span {
    color: var(--muted);
    font-weight: 800;
}

.draft-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 20px;
    margin-bottom: 12px;
    border-left: 4px solid var(--accent);
}

.draft-row h3 {
    margin: 0;
}

.draft-row form {
    display: flex;
    gap: 8px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 32px clamp(18px, 5vw, 72px);
    background: var(--ink);
    color: var(--white);
}

.site-footer span {
    display: block;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.72);
}

.footer-links {
    display: flex;
    gap: 16px;
    font-weight: 800;
}

@media (max-width: 920px) {
    .hero,
    .vertical-hero,
    .community-hero,
    .admin-hero,
    .lead-layout,
    .split-rail,
    .ticker-layout,
    .analysis-layout,
    .pulse-layout,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .section-head,
    .news-strip,
    .ledger-head,
    .ledger-row {
        grid-template-columns: 1fr;
    }

    .desk-grid,
    .magazine-layout,
    .metric-row {
        grid-template-columns: 1fr 1fr;
    }

    .lead-story {
        grid-row: auto;
    }

    .pulse-nav {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-nav {
        width: 100%;
        overflow-x: auto;
    }

    .hero h1,
    .vertical-hero h1,
    .community-hero h1,
    .admin-hero h1,
    .article-header h1 {
        font-size: clamp(40px, 15vw, 64px);
    }

    .desk-grid,
    .magazine-layout,
    .metric-row,
    .pulse-nav,
    .draft-row {
        grid-template-columns: 1fr;
    }

    .mag-feature {
        grid-column: auto;
        grid-row: auto;
        min-height: auto;
    }

    .draft-row form {
        flex-wrap: wrap;
    }
}
