/* =====================================================================
   Brightnest · Totalförsvarsnytt — Public stylesheet
   ===================================================================== */

:root {
    /* Brand */
    --bn-ink:        #0f1b2d;     /* deep navy — primary text + brand */
    --bn-ink-2:      #1c2a3f;
    --bn-paper:      #f6f4ee;     /* warm paper — bg */
    --bn-paper-2:    #efece3;
    --bn-card:       #ffffff;
    --bn-line:       #d9d3c4;
    --bn-line-soft:  #e6e1d3;
    --bn-muted:      #5a6477;
    --bn-muted-2:    #8a8676;
    --bn-accent:     #8c2d2a;     /* oxide red — Brightnest accent */
    --bn-accent-2:   #b8453f;
    --bn-gold:       #b08a3e;
    --bn-green:      #2f5d3a;
    --bn-amber:      #c98a2b;
    --bn-red:        #a3322f;

    /* Density */
    --d-pad: 20px;
    --d-row: 22px;
    --d-gap: 24px;
    --d-rad: 4px;

    --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
    --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="dark"] {
    --bn-ink:       #e8e3d4;
    --bn-ink-2:     #cfc9b9;
    --bn-paper:     #0e1622;
    --bn-paper-2:   #131d2c;
    --bn-card:      #16202f;
    --bn-line:      #25324a;
    --bn-line-soft: #1c2738;
    --bn-muted:     #8b97ac;
    --bn-muted-2:   #6a7588;
    --bn-accent:    #d76a64;
    --bn-accent-2:  #e88a85;
    --bn-gold:      #d2a85a;
    --bn-green:     #6fb37e;
    --bn-amber:     #e0a350;
    --bn-red:       #e07a76;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--sans);
    background: var(--bn-paper);
    color: var(--bn-ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}
a { color: var(--bn-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--bn-ink); color: var(--bn-paper); }

/* ——— Beta / pre-launch notice ——— */
.beta-bar {
    background: var(--bn-amber);
    color: #1a1304;
    font-size: 12px;
    font-weight: 500;
}
.beta-bar-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 8px 32px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.4;
}
.beta-tag {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    background: rgba(0,0,0,0.18);
    padding: 3px 8px;
    border-radius: 2px;
    flex-shrink: 0;
}
@media (max-width: 820px) {
    .beta-bar-inner { padding: 8px 16px; }
}

/* ——— Top utility bar ——— */
.util {
    background: var(--bn-ink);
    color: var(--bn-paper);
    font-size: 12px;
    letter-spacing: 0.02em;
}
.util-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 8px 32px;
    display: flex;
    gap: 24px;
    align-items: center;
}
.util-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--bn-green);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--bn-green) 25%, transparent);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { opacity: 1; }
    50% { opacity: 0.55; }
}
.util-spacer { flex: 1; }
.util a { color: inherit; text-decoration: none; opacity: 0.78; }
.util a:hover { opacity: 1; }
.util-sep { opacity: 0.3; }

/* ——— Masthead ——— */
.masthead {
    background: var(--bn-paper);
    border-bottom: 1px solid var(--bn-line);
}
.mast-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 22px 32px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    align-items: center;
}
.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    justify-self: start;
}
.brand-logo {
    height: 38px;
    width: auto;
    flex-shrink: 0;
}
.brand-logo path,
.brand-logo rect,
.brand-logo polygon { fill: var(--bn-ink); }
.brand-sub {
    display: block;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--bn-muted);
    line-height: 1;
}
.mast-title {
    text-align: center;
    justify-self: center;
}
.mast-title h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 40px;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1;
}
.mast-title .tag {
    margin-top: 8px;
    font-size: 12px;
    letter-spacing: 0.01em;
    color: var(--bn-muted);
    font-style: italic;
    font-family: var(--serif);
}
.mast-title .tag .gold { color: var(--bn-gold); font-style: normal; margin-right: 2px; }
.mast-meta {
    text-align: right;
    font-size: 11px;
    color: var(--bn-muted);
    line-height: 1.6;
    letter-spacing: 0.04em;
}
.mast-meta b {
    color: var(--bn-ink);
    font-weight: 600;
    font-family: var(--mono);
    font-size: 12px;
}

/* ——— Nav strip ——— */
.nav {
    background: var(--bn-paper);
    border-bottom: 1px solid var(--bn-line);
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: saturate(140%) blur(8px);
    background: color-mix(in oklab, var(--bn-paper) 92%, transparent);
}
.nav-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: stretch;
    gap: 4px;
}
.nav a {
    padding: 14px 16px;
    color: var(--bn-ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    display: flex; align-items: center; gap: 8px;
    transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--bn-accent); }
.nav a.is-active {
    color: var(--bn-ink);
    border-bottom-color: var(--bn-accent);
}
.nav-spacer { flex: 1; }
.search {
    align-self: center;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bn-card);
    border: 1px solid var(--bn-line);
    border-radius: 2px;
    padding: 7px 10px;
    width: 320px;
    transition: border-color .15s, box-shadow .15s;
}
.search:focus-within {
    border-color: var(--bn-ink);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--bn-ink) 8%, transparent);
}
.search svg { color: var(--bn-muted); flex-shrink: 0; }
.search input {
    flex: 1;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 13px;
    outline: 0;
    color: inherit;
}
.search kbd {
    font-family: var(--mono);
    font-size: 10px;
    background: var(--bn-paper-2);
    border: 1px solid var(--bn-line);
    border-radius: 2px;
    padding: 1px 5px;
    color: var(--bn-muted);
}

/* ——— Layout ——— */
.wrap {
    max-width: 1480px;
    margin: 0 auto;
    padding: 28px 32px 80px;
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) minmax(280px, 320px);
    gap: var(--d-gap);
    align-items: start;
}
@media (max-width: 1180px) {
    .wrap { grid-template-columns: minmax(200px, 240px) minmax(0, 1fr); }
    .rail {
        grid-column: 1 / -1;
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--d-gap);
    }
}
@media (max-width: 820px) {
    .wrap { grid-template-columns: minmax(0, 1fr); padding: 20px 20px 60px; }
    .side { position: static; }
    .mast-inner {
        padding: 16px 20px;
        grid-template-columns: 1fr;
        gap: 14px;
        text-align: center;
    }
    .brand { justify-self: center; align-items: center; }
    .brand-logo { height: 28px; }
    .mast-title { justify-self: center; }
    .mast-title h1 { font-size: 28px; }
    .mast-title .tag { font-size: 11px; }
    .mast-meta { text-align: center; font-size: 11px; justify-self: center; }
    .nav-inner { padding: 0 20px; overflow-x: auto; }
    .search { width: 200px; }
    .sit-stats { grid-template-columns: repeat(2, 1fr); gap: 14px 0; }
    .article { grid-template-columns: 60px 1fr; }
    .a-side { grid-column: 2; flex-direction: row; align-items: center; }
}
@media (max-width: 480px) {
    .mast-title h1 { font-size: 24px; }
    .brand-logo { height: 24px; }
}

/* ——— Sidebar ——— */
.side {
    position: sticky;
    top: 64px;
    font-size: 13px;
}
.side-h {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--bn-muted);
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bn-line-soft);
}
.side-block { margin-bottom: 28px; }
.side ul { list-style: none; padding: 0; margin: 0; }
.side li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 2px;
    cursor: pointer;
    color: var(--bn-ink-2);
    transition: background .12s;
}
.side li:hover { background: var(--bn-paper-2); }
.side li.is-active {
    background: var(--bn-paper-2);
    color: var(--bn-ink);
    font-weight: 500;
}
.side a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; flex: 1; }
.side a:hover { text-decoration: none; }
.side .check {
    width: 14px; height: 14px;
    border: 1px solid var(--bn-line);
    border-radius: 2px;
    background: var(--bn-card);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.side li.is-active .check {
    background: var(--bn-ink);
    border-color: var(--bn-ink);
    color: var(--bn-paper);
}
.side .count {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--bn-muted);
}
.side .src-tick {
    width: 3px;
    height: 14px;
    border-radius: 1px;
    background: var(--src);
    flex-shrink: 0;
}

/* "Mest relevant" — highlight period list at top of sidebar */
.highlight-block {
    background: var(--bn-card);
    border: 1px solid var(--bn-line);
    border-left: 3px solid var(--bn-accent);
    border-radius: var(--d-rad);
    padding: 14px 14px 10px;
    margin-bottom: 28px;
}
.highlight-block .side-h {
    color: var(--bn-accent);
    border-bottom: none;
    padding-bottom: 4px;
    margin-bottom: 4px;
    font-weight: 700;
}
.period-list { list-style: none; padding: 0; margin: 0; }
.period-list li {
    display: block;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid var(--bn-line-soft);
    background: transparent;
}
.period-list li:last-child { border-bottom: 0; }
.period-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    color: var(--bn-ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color .12s, padding .12s;
}
.period-list li a:hover {
    color: var(--bn-accent);
    text-decoration: none;
    padding-left: 8px;
}
.period-list li.is-active a {
    color: var(--bn-accent);
    font-weight: 600;
    padding-left: 8px;
}
.period-list li.is-active a::before {
    content: "→";
    margin-right: 2px;
}
.period-list .period-label { flex: 1; }
.period-list .count {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--bn-muted);
    font-weight: 400;
}
.period-list li.is-active .count { color: var(--bn-accent); }
.period-list .period-clear a {
    font-size: 11px;
    color: var(--bn-muted);
    font-weight: 400;
    padding-top: 8px;
    padding-bottom: 4px;
}

.date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}
.date-pill {
    padding: 6px 10px;
    background: var(--bn-card);
    border: 1px solid var(--bn-line);
    border-radius: 2px;
    font-size: 11px;
    color: var(--bn-ink);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all .12s;
    font-family: var(--sans);
}
.date-pill:hover { border-color: var(--bn-ink); text-decoration: none; }
.date-pill.is-active {
    background: var(--bn-ink);
    border-color: var(--bn-ink);
    color: var(--bn-paper);
}

/* ——— Main column ——— */
.main { min-width: 0; }

/* ——— Daily situation card ——— */
.situation {
    background: var(--bn-card);
    border: 1px solid var(--bn-line);
    border-top: 3px solid var(--bn-ink);
    border-radius: var(--d-rad);
    padding: var(--d-pad) calc(var(--d-pad) + 4px);
    margin-bottom: var(--d-gap);
}
.sit-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bn-line-soft);
}
.sit-eyebrow {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--bn-accent);
    font-weight: 600;
}
.sit-eyebrow::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--bn-accent);
    margin-right: 8px;
    vertical-align: 1px;
}
.sit-time {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--bn-muted);
}
.sit-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 22px;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
    line-height: 1.25;
}
.sit-lede {
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.55;
    color: var(--bn-ink-2);
    margin: 0 0 16px;
    text-wrap: pretty;
    max-width: 60ch;
}
.sit-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--bn-line-soft);
    padding-top: 14px;
}
.sit-stat {
    padding: 0 16px;
    border-right: 1px solid var(--bn-line-soft);
}
.sit-stat:first-child { padding-left: 0; }
.sit-stat:last-child { border-right: 0; padding-right: 0; }
.sit-stat-label {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--bn-muted);
    margin-bottom: 4px;
}
.sit-stat-value {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
}
.sit-stat-trend {
    font-size: 11px;
    font-family: var(--mono);
    color: var(--bn-muted);
    margin-left: 6px;
}
.sit-stat-trend.up { color: var(--bn-amber); }

/* ——— Section bar / filters ——— */
.section-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 6px;
    border-bottom: 2px solid var(--bn-ink);
}
.section-bar h2 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 18px;
    margin: 0;
    letter-spacing: -0.01em;
}
.section-bar .count {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--bn-muted);
}
.section-bar .spacer { flex: 1; }
.chip-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
    font-size: 11px;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid var(--bn-line);
    border-radius: 100px;
    color: var(--bn-ink-2);
    cursor: pointer;
    white-space: nowrap;
    transition: all .12s;
    font-family: var(--sans);
    text-decoration: none;
}
.chip:hover { border-color: var(--bn-ink); text-decoration: none; }
.chip.is-active {
    background: var(--bn-ink);
    border-color: var(--bn-ink);
    color: var(--bn-paper);
}
.sort-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid var(--bn-line);
    border-radius: 2px;
    font-size: 11px;
    color: var(--bn-ink-2);
    cursor: pointer;
    font-family: var(--sans);
    text-decoration: none;
}
.sort-btn:hover { border-color: var(--bn-ink); text-decoration: none; }

/* ——— Article list ——— */
.feed { display: flex; flex-direction: column; }
.article {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 18px;
    padding: var(--d-row) 6px;
    border-bottom: 1px solid var(--bn-line-soft);
    cursor: pointer;
    transition: background .12s;
    position: relative;
    text-decoration: none;
    color: inherit;
}
.article:hover { background: var(--bn-paper-2); text-decoration: none; }
.article.is-selected { background: var(--bn-paper-2); }
.article.is-selected::before {
    content: "";
    position: absolute;
    left: -8px; top: 0; bottom: 0;
    width: 2px;
    background: var(--bn-accent);
}
.a-time {
    text-align: right;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--bn-muted);
    padding-top: 3px;
    line-height: 1.5;
}
.a-time b {
    display: block;
    color: var(--bn-ink);
    font-weight: 500;
    font-size: 12px;
}
.a-body { min-width: 0; }
.a-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 11px;
    flex-wrap: wrap;
}
.src-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bn-ink);
}
.src-tag::before {
    content: "";
    width: 8px; height: 8px;
    background: var(--src, var(--bn-ink));
    display: inline-block;
    border-radius: 1px;
}
.a-cat {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bn-muted);
}
.a-cat::before { content: "·"; margin-right: 10px; opacity: 0.5; }
.a-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
    color: var(--bn-ink);
    text-wrap: pretty;
}
.article:hover .a-title { color: var(--bn-accent); }
.a-summary {
    font-family: var(--serif);
    font-size: 14px;
    line-height: 1.5;
    color: var(--bn-muted);
    margin: 0;
    text-wrap: pretty;
    max-width: 70ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.a-foot {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    color: var(--bn-muted);
    flex-wrap: wrap;
}
.a-foot .tag {
    background: var(--bn-paper-2);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 10px;
    color: var(--bn-ink-2);
    letter-spacing: 0.02em;
}
.a-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding-top: 2px;
}

/* Severity / Relevance */
.sev {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 2px;
    border: 1px solid currentColor;
    line-height: 1;
    white-space: nowrap;
}
.sev-info  { color: var(--bn-muted); border-color: var(--bn-line); }
.sev-watch { color: var(--bn-gold); }
.sev-elev  { color: var(--bn-amber); }
.sev-crit  { color: var(--bn-red); background: color-mix(in oklab, var(--bn-red) 8%, transparent); }

/* ——— Right rail ——— */
.rail {
    position: sticky;
    top: 64px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.rail-card {
    background: var(--bn-card);
    border: 1px solid var(--bn-line);
    border-radius: var(--d-rad);
    padding: 18px 18px 16px;
}
.rail-h {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bn-line-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rail-h .h-meta {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--bn-muted);
    font-weight: 400;
    letter-spacing: 0.04em;
}
.rail-card p {
    font-family: var(--serif);
    font-size: 14px;
    line-height: 1.55;
    color: var(--bn-ink-2);
    margin: 0 0 12px;
}

/* ——— Newsletter form ——— */
.subscribe-form { display: grid; gap: 8px; }
.subscribe-form input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bn-card);
    border: 1px solid var(--bn-line);
    border-radius: 2px;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--bn-ink);
    transition: border-color .12s;
}
.subscribe-form input:focus {
    outline: 0;
    border-color: var(--bn-ink);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--bn-ink) 8%, transparent);
}
.subscribe-form .legal {
    font-size: 11px;
    color: var(--bn-muted);
    line-height: 1.5;
    margin-top: 4px;
}

/* ——— Buttons ——— */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: var(--bn-card);
    border: 1px solid var(--bn-line);
    border-radius: 2px;
    font: inherit;
    font-size: 13px;
    color: var(--bn-ink);
    cursor: pointer;
    text-decoration: none;
    transition: all .12s;
    font-family: var(--sans);
}
.btn:hover { border-color: var(--bn-ink); text-decoration: none; }
.btn.primary {
    background: var(--bn-ink);
    border-color: var(--bn-ink);
    color: var(--bn-paper);
}
.btn.primary:hover { background: var(--bn-ink-2); }
.btn-block { width: 100%; justify-content: center; }

/* ——— Detail drawer ——— */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: color-mix(in oklab, var(--bn-ink) 35%, transparent);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 50;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(720px, 96vw);
    background: var(--bn-paper);
    border-left: 1px solid var(--bn-line);
    transform: translateX(100%);
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
    z-index: 51;
    overflow-y: auto;
    box-shadow: -20px 0 40px -20px rgba(0,0,0,0.2);
}
.drawer.is-open { transform: translateX(0); }
.drawer-bar {
    position: sticky;
    top: 0;
    background: color-mix(in oklab, var(--bn-paper) 92%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--bn-line);
    padding: 12px 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}
.drawer-bar .icon-btn {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 2px;
    color: var(--bn-muted);
    cursor: pointer;
    transition: all .12s;
}
.drawer-bar .icon-btn:hover {
    background: var(--bn-card);
    border-color: var(--bn-line);
    color: var(--bn-ink);
}
.drawer-bar .crumbs {
    flex: 1;
    font-size: 12px;
    color: var(--bn-muted);
    font-family: var(--mono);
    letter-spacing: 0.04em;
}
.drawer-body { padding: 28px 36px 80px; }
.drawer-eyebrow {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    font-size: 11px;
}
.drawer h1 {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
    text-wrap: pretty;
    max-width: 30ch;
}
.drawer-byline {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--bn-line-soft);
    border-bottom: 1px solid var(--bn-line-soft);
    margin-bottom: 22px;
    font-size: 12px;
    color: var(--bn-muted);
    flex-wrap: wrap;
}
.drawer-byline b { color: var(--bn-ink); font-weight: 500; }
.drawer-byline .sep { opacity: 0.4; }
.drawer-lede {
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.5;
    color: var(--bn-ink);
    margin: 0 0 22px;
    text-wrap: pretty;
    font-weight: 500;
    max-width: 62ch;
}
.drawer-content p {
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.65;
    color: var(--bn-ink-2);
    margin: 0 0 16px;
    text-wrap: pretty;
    max-width: 62ch;
}
.drawer-content h1, .drawer-content h2, .drawer-content h3 {
    font-family: var(--serif);
    font-weight: 600;
    margin: 28px 0 10px;
    letter-spacing: -0.01em;
}
.drawer-content h2 { font-size: 20px; }
.drawer-content h3 { font-size: 17px; }
.drawer-content ul, .drawer-content ol {
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.6;
    color: var(--bn-ink-2);
    padding-left: 22px;
    margin: 0 0 18px;
}
.drawer-content li { margin-bottom: 6px; }
.drawer-content a { color: var(--bn-accent); }
.drawer-analysis {
    background: var(--bn-card);
    border: 1px solid var(--bn-line);
    border-left: 3px solid var(--bn-accent);
    border-radius: var(--d-rad);
    padding: 16px 20px;
    margin: 22px 0;
}
.drawer-analysis-h {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--bn-accent);
    font-weight: 600;
    margin: 0 0 8px;
}
.drawer-sources {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid var(--bn-line);
}
.drawer-sources-h {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--bn-muted);
    margin: 0 0 14px;
}
.drawer-sources-item {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--bn-line-soft);
    color: inherit;
    text-decoration: none;
}
.drawer-sources-item:hover { color: var(--bn-accent); text-decoration: none; }
.drawer-sources-item:last-child { border-bottom: 0; }
.drawer-sources-item .src-name { color: var(--bn-muted); font-size: 11px; }

.reader-loading { color: var(--bn-muted); font-size: 13px; padding: 40px 0; text-align: center; }

/* ——— Load more button ——— */
.load-more-wrap {
    padding: 24px 0 8px;
}
#load-more-btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bn-card);
    border: 1px solid var(--bn-line);
    color: var(--bn-ink);
    cursor: pointer;
    border-radius: var(--d-rad);
    transition: all .12s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
}
#load-more-btn:hover { border-color: var(--bn-ink); background: var(--bn-paper-2); }
#load-more-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.load-more-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--bn-muted);
}

/* ——— Source list (scrollable when long) ——— */
.side-h .side-meta {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--bn-muted);
    font-weight: 400;
}
.side-h { display: flex; align-items: baseline; }
.src-list {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}
.src-list::-webkit-scrollbar { width: 6px; }
.src-list .src-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* ——— Pagination ——— */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 30px 0;
}
.pagination a, .pagination span {
    font-size: 12px;
    color: var(--bn-muted);
    text-decoration: none;
    font-family: var(--mono);
}
.pagination a:hover { color: var(--bn-accent); text-decoration: none; }

/* ——— Empty state ——— */
.empty {
    text-align: center;
    color: var(--bn-muted);
    padding: 60px 20px;
    font-family: var(--serif);
    font-size: 15px;
}

/* ——— Alerts ——— */
.alert {
    padding: 14px 18px;
    border-radius: var(--d-rad);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.alert-success {
    background: color-mix(in oklab, var(--bn-green) 10%, transparent);
    border: 1px solid color-mix(in oklab, var(--bn-green) 30%, transparent);
    color: var(--bn-green);
}
.alert-error {
    background: color-mix(in oklab, var(--bn-red) 8%, transparent);
    border: 1px solid color-mix(in oklab, var(--bn-red) 25%, transparent);
    color: var(--bn-red);
}

/* ——— Subscribe page ——— */
.subscribe-page {
    max-width: 560px;
    margin: 60px auto;
    padding: 0 24px;
    text-align: center;
}
.subscribe-page h1 {
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}
.subscribe-page p {
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.6;
    color: var(--bn-ink-2);
    margin: 0 0 32px;
}
.subscribe-page .subscribe-form {
    text-align: left;
    background: var(--bn-card);
    border: 1px solid var(--bn-line);
    border-radius: var(--d-rad);
    padding: 24px;
}

/* ——— Footer ——— */
.foot {
    border-top: 1px solid var(--bn-line);
    background: var(--bn-paper-2);
    margin-top: 60px;
    padding: 32px 32px 40px;
    font-size: 11px;
    color: var(--bn-muted);
}
.foot-inner {
    max-width: 1480px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: end;
}
.foot b { color: var(--bn-ink); font-weight: 600; }
.foot a { color: inherit; }

@media (max-width: 820px) {
    .foot-inner { grid-template-columns: 1fr; text-align: left !important; }
    .foot-inner > div:last-child { text-align: left !important; }
}

/* ——— Reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bn-line); border-radius: 100px; border: 2px solid var(--bn-paper); }
::-webkit-scrollbar-thumb:hover { background: var(--bn-muted-2); }
