/* PwnSpectrum — daily brief.
   Newsroom identity: cool white paper, Inter Tight headlines, one ink-blue
   accent. Light by default; dark follows the system or the toggle.
   Colour carries meaning only: severity, green for actions, blue for links
   and the brand. */

:root {
    --paper: #ffffff;
    --surface: #f5f6f8;
    --ink: #0e1116;
    --ink-2: #2f3540;
    --muted: #5b6472;
    --faint: #8a919c;
    --rule: #e3e6ea;
    --rule-strong: #c8cdd5;
    --hover: rgba(14, 17, 22, 0.04);
    --accent: #1546c6;
    --accent-ink: #1240b4;
    --accent-soft: rgba(21, 70, 198, 0.07);
    --brand: #1546c6;
    --act: #0b7a3b;
    --act-soft: rgba(11, 122, 59, 0.07);
    --crit: #c2342b;
    --high: #a55300;
    --med: #806300;
    --med-dot: #d4a72c;
    --info: #8a919c;
    --focus: #1546c6;

    --display: "Inter Tight", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --serif: Newsreader, Charter, "Iowan Old Style", Georgia, serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --bar-h: 52px;
    --col: 41rem;
    --rail: 12.5rem;
    --aside: 16.5rem;
    --gutter: max(1.15rem, env(safe-area-inset-left), env(safe-area-inset-right));
    --radius: 4px;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --paper: #0d1014;
    --surface: #151a20;
    --ink: #e7eaee;
    --ink-2: #c3c9d1;
    --muted: #8f98a4;
    --faint: #69727e;
    --rule: #232a32;
    --rule-strong: #343c46;
    --hover: rgba(255, 255, 255, 0.04);
    --accent: #82a4ff;
    --accent-ink: #9db7ff;
    --accent-soft: rgba(130, 164, 255, 0.1);
    --brand: #82a4ff;
    --act: #4ade80;
    --act-soft: rgba(74, 222, 128, 0.08);
    --crit: #ff6b61;
    --high: #ffa04d;
    --med: #e2c14c;
    --med-dot: #e2c14c;
    --info: #7d8691;
    --focus: #9db7ff;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #0d1014;
        --surface: #151a20;
        --ink: #e7eaee;
        --ink-2: #c3c9d1;
        --muted: #8f98a4;
        --faint: #69727e;
        --rule: #232a32;
        --rule-strong: #343c46;
        --hover: rgba(255, 255, 255, 0.04);
        --accent: #82a4ff;
        --accent-ink: #9db7ff;
        --accent-soft: rgba(130, 164, 255, 0.1);
        --brand: #82a4ff;
        --act: #4ade80;
        --act-soft: rgba(74, 222, 128, 0.08);
        --crit: #ff6b61;
        --high: #ffa04d;
        --med: #e2c14c;
        --med-dot: #e2c14c;
        --info: #7d8691;
        --focus: #9db7ff;
        color-scheme: dark;
    }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
    background: var(--paper);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--bar-h) + 1rem);
    scrollbar-color: var(--rule-strong) transparent;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
    line-height: 1.6;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "cv11" 1;
}
::selection { background: var(--accent); color: var(--paper); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
kbd {
    font: 500 0.72em/1 var(--mono); padding: 0.2em 0.42em; border: 1px solid var(--rule-strong);
    border-bottom-width: 2px; border-radius: 3px; background: var(--surface); color: var(--ink-2);
}
.mono { font-family: var(--mono); font-size: 0.86em; }
.nw { white-space: nowrap; }
[hidden] { display: none !important; }
svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
    position: absolute; left: var(--gutter); top: -3rem; z-index: 100; padding: 0.5rem 0.8rem;
    background: var(--ink); color: var(--paper); border-radius: var(--radius); text-decoration: none; font-size: 0.9rem;
}
.skip:focus { top: 0.6rem; }

/* Small uppercase labels used across the page. */
.label, .kicker, .small-label, .glance-h, .g-label, .when, .facts dt, .t-date, .video-type, .cve-table th, .done-kicker {
    font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}

/* ---------- Top bar ---------- */
.bar {
    position: sticky; top: 0; z-index: 30;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding-top: env(safe-area-inset-top);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .bar { background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
}
.bar-inner {
    height: var(--bar-h); display: flex; align-items: center; gap: 1rem;
    max-width: calc(var(--rail) + var(--col) + var(--aside) + 6rem); margin: 0 auto; padding: 0 var(--gutter);
}
.wordmark {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font: 800 1.12rem/1 var(--display); letter-spacing: -0.035em; text-decoration: none; color: var(--ink);
    white-space: nowrap;
}
.wordmark::before { content: ""; width: 0.62rem; height: 0.62rem; background: var(--brand); flex: none; }
.wordmark:hover { color: var(--ink); }
.wordmark.small { font-size: 1rem; }
.bar-meta {
    flex: 1; min-width: 0; display: flex; gap: 0.9rem; align-items: baseline; justify-content: center;
    font: 500 0.78rem/1 var(--sans); color: var(--muted); white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.bar-read { color: var(--ink-2); }
.bar-actions { display: flex; align-items: center; gap: 0.15rem; margin-right: -0.5rem; }
.icon-btn {
    width: 2.5rem; height: 2.5rem; display: inline-grid; place-items: center; border-radius: var(--radius); color: var(--muted);
    -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { color: var(--ink); background: var(--hover); }
.icon-btn[aria-expanded="true"] { color: var(--accent-ink); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .i-sun { display: block; }
    :root:not([data-theme="light"]) .i-moon { display: none; }
}
.scroll-line { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.scroll-line span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform 0.35s ease; }

.search { border-top: 1px solid var(--rule); }
.search-inner {
    display: flex; align-items: center; gap: 0.6rem; height: 3.1rem; color: var(--muted);
    max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter);
}
.search input {
    flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink);
    font: 400 1rem var(--sans); outline: none;
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-count { font: 500 0.75rem var(--sans); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.text-btn {
    font: 500 0.8rem var(--sans); color: var(--muted); text-decoration: none; padding: 0.35rem 0.5rem; border-radius: var(--radius);
    display: inline-flex; align-items: center; min-height: 2rem;
}
.text-btn:hover { color: var(--ink); background: var(--hover); }

/* ---------- Layout ----------
   < 900px   one column; the glance box sits after the front page.
   >= 900px  brief + glance column (sticky).
   >= 1280px section rail on the left as well. */
.page { padding: 0 var(--gutter); }
.layout { max-width: var(--col); margin: 0 auto; }
.rail { display: none; }
@media (min-width: 900px) {
    .layout:not(.layout-single) { max-width: calc(var(--col) + var(--aside) + 3rem); }
    .layout:not(.layout-single) .brief {
        display: grid; grid-template-columns: minmax(0, 1fr) var(--aside); column-gap: 3rem; align-items: start;
    }
    .brief > * { grid-column: 1; }
    .brief > .masthead { grid-column: 1 / -1; }
    .brief > .glance {
        grid-column: 2; grid-row: 2 / span 60; align-self: start;
        position: sticky; top: calc(var(--bar-h) + 1.6rem); margin-top: 1.6rem;
    }
}
@media (min-width: 1280px) {
    .layout:not(.layout-single) {
        max-width: calc(var(--rail) + var(--col) + var(--aside) + 6rem);
        display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); column-gap: 3rem;
    }
    .layout-single { max-width: var(--col); }
    .rail {
        display: block; position: sticky; top: calc(var(--bar-h) + 1.6rem); align-self: start;
        max-height: calc(100vh - var(--bar-h) - 3rem); overflow-y: auto; padding-top: 12.5rem;
    }
    .index { display: none !important; }
}
.rail-list { list-style: none; display: grid; gap: 0.05rem; border-left: 1px solid var(--rule); }
.rail-list a {
    display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.32rem 0 0.32rem 0.9rem; margin-left: -1px;
    border-left: 2px solid transparent; font-size: 0.84rem; color: var(--muted); text-decoration: none; line-height: 1.35;
}
.rail-list a:hover { color: var(--ink); }
.rail-list a.active { color: var(--ink); border-left-color: var(--accent); font-weight: 600; }
.rail .n, .label .n, .index .n { font: 500 0.72rem var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.rail-hint { margin-top: 1.4rem; font-size: 0.74rem; color: var(--muted); line-height: 1.9; padding-left: 0.9rem; }
.only-fine { display: none; }
@media (hover: hover) and (pointer: fine) { .only-fine { display: inline-grid; } .rail-hint.only-fine { display: block; } }

/* ---------- Masthead (nameplate between a double rule) ---------- */
.masthead {
    margin-top: clamp(1.4rem, 0.9rem + 2vw, 2.4rem); padding: 3px 0 1.1rem;
    border-top: 3px solid var(--ink); border-bottom: 1px solid var(--rule-strong);
}
.np-top {
    display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
    border-top: 1px solid var(--ink); padding-top: 0.7rem;
}
.kicker { font-size: 0.72rem; color: var(--ink-2); }
.issue { font: 600 0.78rem/1 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.date {
    margin-top: 0.55rem;
    font: 800 clamp(2.15rem, 1.5rem + 2.9vw, 3.5rem)/1.04 var(--display); letter-spacing: -0.026em;
    text-wrap: balance;
}
.dateline {
    margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0; font-size: 0.86rem; color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.dateline span:not(:last-child)::after { content: "·"; margin: 0 0.55rem; color: var(--faint); }
.crit-count { color: var(--crit); font-weight: 600; }
.new-banner {
    margin-top: 0.8rem; font-size: 0.86rem; color: var(--accent-ink); display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap;
}
.new-banner::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--accent); transform: translateY(-0.08em); flex: none; }

/* ---------- Section labels ---------- */
.label {
    display: flex; align-items: baseline; gap: 0.6rem;
    font-size: 0.76rem; line-height: 1; color: var(--ink);
    padding-top: 0.7rem; padding-bottom: 0.2rem; border-top: 2px solid var(--ink);
}
.sec { padding-top: 2.8rem; scroll-margin-top: calc(var(--bar-h) + 0.6rem); }

/* ---------- Front page: lead story + two seconds ---------- */
.top3 { padding-top: 1.6rem; scroll-margin-top: calc(var(--bar-h) + 0.6rem); }
.top3-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); }
.top3-item { display: grid; gap: 0.45rem; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
.top3-item:hover .top3-head { color: var(--accent-ink); }
.top3-head { font-family: var(--display); text-wrap: balance; transition: color 0.15s; }
.top3-tldr { color: var(--ink-2); text-wrap: pretty; }
.top3-do { font-size: 0.9rem; color: var(--ink-2); }
.top3-do b, .do b {
    font: 700 0.68rem var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--act); margin-right: 0.4rem;
}
.top3-more { font: 600 0.84rem var(--sans); color: var(--accent-ink); margin-top: 0.2rem; }
.top3-list li.is-read .top3-head { color: var(--muted); }

/* Lead */
.top3-list > li:first-child { padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule-strong); }
.top3-list > li:first-child .top3-head {
    font-weight: 800; font-size: clamp(1.8rem, 1.35rem + 2vw, 2.6rem); line-height: 1.08; letter-spacing: -0.022em;
}
.top3-list > li:first-child .top3-tldr { font-size: clamp(1.05rem, 1rem + 0.25vw, 1.15rem); line-height: 1.55; max-width: 38rem; }
.top3-list > li:first-child .top3-num { display: none; }

/* Seconds */
.top3-list > li:not(:first-child) { padding: 1.2rem 0 1.3rem; border-bottom: 1px solid var(--rule); }
.top3-list > li:not(:first-child) .top3-item { grid-template-columns: 2rem minmax(0, 1fr); column-gap: 0.4rem; }
.top3-list > li:not(:first-child) .top3-body { display: grid; gap: 0.4rem; min-width: 0; }
.top3-list > li:not(:first-child) .top3-head { font-weight: 700; font-size: 1.2rem; line-height: 1.22; letter-spacing: -0.018em; }
.top3-list > li:not(:first-child) .top3-tldr { font-size: 0.94rem; line-height: 1.55; }
.top3-list > li:not(:first-child) .top3-more { display: none; }
.top3-num { font: 800 1.5rem/1.1 var(--display); color: var(--rule-strong); letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; }
.top3-list > li:first-child .top3-body { display: grid; gap: 0.6rem; }
@media (min-width: 640px) {
    .top3-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
    .top3-list > li:first-child { grid-column: 1 / -1; }
    .top3-list > li:not(:first-child) .top3-item { grid-template-columns: minmax(0, 1fr); }
    .top3-list > li:not(:first-child) .top3-num { font-size: 1.25rem; }
    .top3-list > li:nth-child(3) { position: relative; }
    .top3-list > li:nth-child(3)::before { content: ""; position: absolute; left: -1rem; top: 1.2rem; bottom: 1.3rem; border-left: 1px solid var(--rule); }
}

/* ---------- At a glance ---------- */
.glance {
    margin-top: 1.6rem; padding: 0.7rem 0 0.2rem; border-top: 2px solid var(--ink);
    display: grid; gap: 0;
}
.glance-h { font-size: 0.76rem; line-height: 1; color: var(--ink); padding-bottom: 0.2rem; }
.g-block { padding: 0.95rem 0; border-bottom: 1px solid var(--rule); display: grid; gap: 0.45rem; }
.g-block:last-child { border-bottom: 0; }
.g-label { font-size: 0.66rem; color: var(--muted); }
.nod-value {
    font: 800 clamp(2.4rem, 2rem + 1.6vw, 3.1rem)/0.95 var(--display); letter-spacing: -0.03em; color: var(--ink);
    font-variant-numeric: lining-nums;
}
.nod-cap { font-size: 0.9rem; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.nod-src { font-size: 0.78rem; color: var(--muted); text-decoration: none; }
.nod-src:hover { color: var(--accent-ink); text-decoration: underline; }

.meter { display: flex; align-items: center; gap: 0.7rem; font: 600 0.9rem/1 var(--sans); color: var(--ink); }
.meter-bar { display: inline-flex; gap: 3px; }
.meter-bar i { width: 1.5rem; height: 0.4rem; background: var(--rule-strong); }
.meter-value { text-transform: capitalize; }
.meter-LOW .meter-bar i:nth-child(-n+1),
.meter-GUARDED .meter-bar i:nth-child(-n+2),
.meter-ELEVATED .meter-bar i:nth-child(-n+3),
.meter-HIGH .meter-bar i:nth-child(-n+4),
.meter-SEVERE .meter-bar i:nth-child(-n+5) { background: var(--meter, var(--accent)); }
.meter-LOW, .meter-dot.meter-LOW { --meter: var(--act); }
.meter-GUARDED, .meter-dot.meter-GUARDED { --meter: var(--info); }
.meter-ELEVATED, .meter-dot.meter-ELEVATED { --meter: var(--med-dot); }
.meter-HIGH, .meter-dot.meter-HIGH { --meter: var(--high); }
.meter-SEVERE, .meter-dot.meter-SEVERE { --meter: var(--crit); }
.spark { display: grid; gap: 0.2rem; }
.spark svg { width: 100%; height: 2.4rem; stroke: var(--ink-2); stroke-width: 1.5; overflow: visible; }
.spark svg .spark-now { fill: var(--meter, var(--accent)); stroke: var(--paper); stroke-width: 2; }
.spark svg .spark-base { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 3; }
.spark-axis { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--muted); }

.mix-bar { display: flex; gap: 2px; height: 0.5rem; }
.mix-bar i { min-width: 3px; background: var(--info); }
.mix-bar .sev-Critical { background: var(--crit); }
.mix-bar .sev-High { background: var(--high); }
.mix-bar .sev-Medium { background: var(--med-dot); }
.mix-bar .sev-Info { background: var(--rule-strong); }
.mix-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; font-size: 0.78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mix-legend li { display: inline-flex; align-items: center; gap: 0.35rem; }
.mix-legend b { font-weight: 600; color: var(--ink); }

#you-text { font-size: 0.86rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.g-you b { color: var(--ink); font-weight: 600; }
.you-bar { height: 3px; background: var(--rule); }
.you-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.35s ease; }

@media (max-width: 899px) {
    .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
    .glance-h { grid-column: 1 / -1; }
    .g-nod { grid-column: 1 / -1; }
    .g-you { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .glance { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- From the editor ---------- */
.lede { padding-top: 2.6rem; }
.note {
    margin-top: 0.9rem;
    font: italic 400 clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem)/1.5 var(--serif); color: var(--ink); letter-spacing: -0.003em;
    font-optical-sizing: auto; text-wrap: pretty;
}
.byline { display: flex; align-items: center; gap: 0.7rem; margin-top: 1rem; font-size: 0.84rem; color: var(--muted); line-height: 1.3; }
.byline img { width: 2.25rem; height: 2.25rem; border-radius: 50%; object-fit: cover; background: var(--rule); flex: none; }
.byline b { display: block; color: var(--ink); font-weight: 600; }

/* ---------- Pull quote ---------- */
.pullquote { margin: 2.8rem 0 0; padding: 1.4rem 0 1.3rem; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }
.pullquote blockquote p {
    font: italic 500 clamp(1.35rem, 1.2rem + 0.8vw, 1.75rem)/1.35 var(--serif); letter-spacing: -0.01em; text-wrap: balance;
}
.pullquote blockquote p::before { content: "\201C"; color: var(--accent); margin-right: 0.05em; }
.pullquote blockquote p::after { content: "\201D"; color: var(--accent); margin-left: 0.03em; }
.pullquote figcaption { margin-top: 0.7rem; font-size: 0.82rem; color: var(--muted); }
.pullquote figcaption a { color: var(--ink-2); }

/* ---------- Mobile/tablet section index ---------- */
.index {
    display: flex; gap: 0.35rem 1.1rem; flex-wrap: nowrap; overflow-x: auto; padding: 1.6rem 0 0;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.index::-webkit-scrollbar { display: none; }
.index a { white-space: nowrap; font-size: 0.85rem; color: var(--muted); text-decoration: none; padding: 0.35rem 0; }
.index a:hover { color: var(--ink); }

/* ---------- Story rows ---------- */
.stories { list-style: none; }
.story { border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--bar-h) + 0.6rem); }
.story > details > summary {
    list-style: none; cursor: pointer; display: grid; grid-template-columns: 0.55rem minmax(0, 1fr) 1.4rem; gap: 0.9rem;
    align-items: start; padding: 1.05rem 0.25rem 1.1rem 0; -webkit-tap-highlight-color: transparent; border-radius: var(--radius);
}
.story > details > summary::-webkit-details-marker { display: none; }
.story > details > summary::marker { content: ""; }
@media (hover: hover) { .story > details > summary:hover .s-head { color: var(--accent-ink); } }
.story > details > summary:focus-visible { outline-offset: 2px; }
.kbd .story.kb-focus > details > summary { background: var(--hover); box-shadow: -0.6rem 0 0 var(--hover), 0.6rem 0 0 var(--hover); }
.dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; display: inline-block; margin-top: 0.5em; background: var(--info); flex: none; }
.dot.sev-Critical { background: var(--crit); }
.dot.sev-High { background: var(--high); }
.dot.sev-Medium { background: var(--med-dot); }
.dot.sev-Info { background: transparent; box-shadow: inset 0 0 0 1.5px var(--info); }
.top3 .dot, .mix-legend .dot { margin: 0 0.45rem 0 0; width: 0.5rem; height: 0.5rem; }
.mix-legend .dot { margin: 0; }
.s-main { display: grid; gap: 0.3rem; min-width: 0; }
.s-head { font: 600 1.12rem/1.3 var(--display); letter-spacing: -0.014em; text-wrap: pretty; transition: color 0.15s; }
.meta {
    display: flex; flex-wrap: wrap; align-items: center; row-gap: 0.15rem;
    font: 500 0.76rem/1.5 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums;
}
.meta .sep { margin: 0 0.45rem; color: var(--faint); }
.sev-text { font: 700 0.7rem/1.5 var(--display); text-transform: uppercase; letter-spacing: 0.07em; }
.sev-text.sev-Critical { color: var(--crit); }
.sev-text.sev-High { color: var(--high); }
.sev-text.sev-Medium { color: var(--med); }
.sev-text.sev-Info { color: var(--muted); }
.b-kev, .b-exploit, .b-ransom { color: var(--ink-2); font-weight: 600; }
.tag {
    display: none; margin-left: 0.55rem; padding: 0.05rem 0.4rem; border-radius: 2px; font: 700 0.62rem/1.5 var(--display);
    text-transform: uppercase; letter-spacing: 0.07em;
}
.tag-dev { display: inline-block; color: var(--accent-ink); background: var(--accent-soft); }
.story.is-new .tag-new, .top3-list li.is-new .tag-new { display: inline-block; color: var(--paper); background: var(--accent); }
.story.is-read .tag-read { display: inline-block; color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.story.is-read .s-head { color: var(--muted); }
.story.is-read .tag-new { display: none; }
.s-tldr { color: var(--ink-2); font-size: 0.95rem; line-height: 1.55; text-wrap: pretty; }
.chev { width: 1.25rem; height: 1.25rem; color: var(--faint); margin-top: 0.15rem; transition: transform 0.2s ease; }
details[open] > summary .chev { transform: rotate(180deg); color: var(--ink-2); }
details[open] > summary .s-tldr { color: var(--ink); }

.s-body {
    display: grid; gap: 0.85rem; padding: 0.1rem 0 1.5rem calc(0.55rem + 0.9rem);
    font-size: 0.98rem; line-height: 1.68; color: var(--ink); text-wrap: pretty;
}
@media (prefers-reduced-motion: no-preference) {
    details[open] > .s-body { animation: reveal 0.22s ease-out; }
    @keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}
.s-body b { font-weight: 600; }
.do { padding: 0.7rem 0.9rem; background: var(--act-soft); border-left: 2px solid var(--act); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.3rem 1rem; font-size: 0.9rem; }
.facts dt { font-size: 0.66rem; line-height: 2; color: var(--muted); }
.facts dd { color: var(--ink-2); overflow-wrap: anywhere; }
.timeline { list-style: none; display: grid; gap: 0.3rem; font-size: 0.88rem; color: var(--ink-2); border-left: 2px solid var(--rule-strong); padding-left: 0.9rem; }
.t-date { font-size: 0.66rem; color: var(--muted); margin-right: 0.6rem; }
.s-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding-top: 0.2rem; }
.source-link {
    display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.4rem; padding: 0 1rem; border-radius: var(--radius);
    background: var(--ink); color: var(--paper); text-decoration: none; font-size: 0.86rem; font-weight: 600;
}
.source-link:hover { color: #fff; background: var(--accent); }
.share { display: flex; gap: 0.1rem; margin-right: -0.5rem; }
.also { font-size: 0.84rem; color: var(--muted); }
.also a { color: var(--ink-2); }
.debug { font: 0.68rem/1.5 var(--mono); color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
body.debug .debug { display: block !important; }
.no-results { padding: 2rem 0; color: var(--muted); text-align: center; }

/* ---------- Worth watching ---------- */
.videos { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1.25rem; padding-top: 1.3rem; }
.video { display: grid; gap: 0.65rem; align-content: start; min-width: 0; }
.video-thumb {
    position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius);
    background: var(--rule); -webkit-tap-highlight-color: transparent;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.video-thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); pointer-events: none; }
.play {
    position: absolute; left: 0.7rem; bottom: 0.7rem; width: 2.5rem; height: 2.5rem; border-radius: 50%;
    display: grid; place-items: center; background: rgba(12, 12, 12, 0.72); color: #fff;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background 0.2s, transform 0.2s;
}
.play svg { width: 1rem; height: 1rem; fill: currentColor; stroke: none; margin-left: 2px; }
@media (hover: hover) {
    .video-thumb:hover img { transform: scale(1.03); }
    .video-thumb:hover .play { background: #e5322d; transform: scale(1.06); }
}
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-info { display: grid; gap: 0.25rem; min-width: 0; }
.video-type { font-size: 0.64rem; color: var(--accent-ink); }
.video-title {
    font: 700 1rem/1.3 var(--display); letter-spacing: -0.01em; text-decoration: none; color: var(--ink); overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.video-title:hover { color: var(--accent-ink); }
.video-meta { font-size: 0.76rem; color: var(--muted); }
@media (max-width: 420px) {
    .videos { gap: 1.3rem 0.9rem; }
    .video-title { font-size: 0.93rem; }
    .play { width: 2.1rem; height: 2.1rem; left: 0.5rem; bottom: 0.5rem; }
}

/* ---------- CVE table ---------- */
.cve-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.cve-table th {
    font-size: 0.64rem; color: var(--muted);
    text-align: left; padding: 0.8rem 0.6rem 0.5rem 0; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
.cve-table td { padding: 0.85rem 0.6rem 0.85rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.cve-table .num { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 0.84rem; }
.cve-table th:last-child, .cve-table td:last-child { padding-right: 0; }
.cve-table td:first-child a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.cve-table th:first-child, .cve-table td:first-child { padding-right: 1.1rem; }
.cve-table td:first-child a:hover { text-decoration: underline; }
.cve-product { display: block; font-weight: 600; color: var(--ink); }
.cve-desc { display: block; color: var(--muted); font-size: 0.82rem; line-height: 1.45; margin-top: 0.15rem; }
.score { font-weight: 600; }
.score.s-crit { color: var(--crit); }
.score.s-high { color: var(--high); }
.score.s-med { color: var(--med); }
.cve-table .kev { display: block; font-weight: 600; color: var(--crit); white-space: nowrap; }
.cve-table .due, .cve-table .ransom, .cve-table .muted { display: block; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.cve-table .ransom { color: var(--crit); }
@media (max-width: 640px) {
    .cve-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .cve-table, .cve-table tbody, .cve-table tr { display: block; }
    .cve-table tr { display: grid; grid-template-columns: 1fr auto auto; column-gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
    .cve-table td { display: block; border: 0; padding: 0; text-align: left !important; }
    .cve-table td[data-label="CVE"] { grid-column: 1; grid-row: 1; }
    .cve-table td[data-label="CVSS"] { grid-column: 2; grid-row: 1; font-size: 0.82rem; }
    .cve-table td[data-label="EPSS"] { grid-column: 3; grid-row: 1; font-size: 0.82rem; }
    .cve-table td[data-label="CVSS"]::before, .cve-table td[data-label="EPSS"]::before {
        content: attr(data-label) " "; font: 700 0.6rem var(--display); color: var(--muted); letter-spacing: 0.06em;
    }
    .cve-table td[data-label="Affects"], .cve-table td[data-label="Status"] { grid-column: 1 / -1; margin-top: 0.35rem; }
    .cve-table .kev, .cve-table .due, .cve-table .ransom, .cve-table .muted { display: inline; margin-right: 0.6rem; }
}

/* ---------- Quiz ---------- */
.quiz-sec { display: grid; gap: 0; }
.reveal, .quiz { padding: 1.3rem 0 0.2rem; }
.reveal { padding-bottom: 1.3rem; border-bottom: 1px solid var(--rule); }
.small-label { font-size: 0.66rem; color: var(--muted); margin-bottom: 0.5rem; }
.q { font: 700 1.15rem/1.35 var(--display); letter-spacing: -0.012em; text-wrap: pretty; }
.answer { margin-top: 0.55rem; font-weight: 600; color: var(--act); }
.check { margin-right: 0.3rem; }
.explain { margin-top: 0.35rem; color: var(--ink-2); font-size: 0.93rem; }
.result-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin-top: 0.7rem; }
.result { font: 500 0.84rem var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.copy-result { margin-left: -0.5rem; color: var(--accent-ink); }
.options { list-style: none; display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.option {
    width: 100%; display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); align-items: start; gap: 0.5rem;
    text-align: left; padding: 0.8rem 0.95rem; border: 1px solid var(--rule-strong); border-radius: var(--radius);
    background: var(--paper); font-size: 0.97rem; line-height: 1.45; color: var(--ink);
    transition: border-color 0.15s, background 0.15s; -webkit-tap-highlight-color: transparent;
}
.option:hover:not(:disabled) { border-color: var(--ink); }
.option:disabled { cursor: default; opacity: 0.55; }
.option.chosen { opacity: 1; border-color: var(--accent); background: var(--accent-soft); }
.opt-key { font: 700 0.8rem/1.8 var(--display); color: var(--muted); }
.option.chosen .opt-key { color: var(--accent-ink); }
.locked, .score { margin-top: 0.8rem; font-size: 0.88rem; color: var(--muted); }
.locked { color: var(--accent-ink); font-weight: 500; }

/* ---------- Tomorrow / week ahead ---------- */
.radar { list-style: none; }
.radar li { display: grid; gap: 0.15rem; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); font-size: 0.97rem; }
.when { font-size: 0.66rem; line-height: 1.6; color: var(--muted); }
.radar-deadline .when { color: var(--crit); }
.radar-patch_tuesday .when { color: var(--accent-ink); }
.what a { text-decoration: none; }
.what a:hover { text-decoration: underline; }

/* ---------- Week in review ---------- */
.week { list-style: none; counter-reset: wk; }
.week li { border-bottom: 1px solid var(--rule); }
.week a { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 0.2rem 1rem; padding: 0.85rem 0; text-decoration: none; color: inherit; }
.week a:hover .w-head { color: var(--accent-ink); }
.w-day { font: 700 0.68rem/1.9 var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.w-head { font: 600 1.02rem/1.35 var(--display); letter-spacing: -0.01em; }
@media (max-width: 480px) { .week a { grid-template-columns: 1fr; } }

/* ---------- Also worth your time ---------- */
.tabs {
    display: flex; gap: 1.3rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--rule); margin-top: 0.4rem;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    position: relative; padding: 0.85rem 0 0.75rem; font-size: 0.88rem; color: var(--muted); white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.panel-title { display: none; }
.side-list { list-style: none; }
.side-list li { display: grid; gap: 0.15rem; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.side-list li:last-child { border-bottom: 0; }
.side-list a { font-weight: 500; text-decoration: none; line-height: 1.4; overflow-wrap: anywhere; }
.side-list a:hover { text-decoration: underline; }
.side-meta { font-size: 0.76rem; color: var(--muted); }
.side-desc { font-size: 0.86rem; color: var(--ink-2); }
/* Without JS every panel shows, each with its own heading. */
html:not(.js) .tabs { display: none; }
html:not(.js) .panel-title { display: block; font: 700 0.72rem var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-top: 1.2rem; }
html.js .panel:not(.active) { display: none; }

/* ---------- And finally ---------- */
.finally { padding-top: 2.8rem; }
.finally-body { padding-top: 1rem; display: grid; gap: 0.5rem; }
.finally-head { font: 700 1.3rem/1.25 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.finally-head a { text-decoration: none; }
.finally-head a:hover { color: var(--accent-ink); }
.finally-blurb { font: italic 400 1.1rem/1.55 var(--serif); color: var(--ink-2); text-wrap: pretty; }
.finally-src { font-size: 0.8rem; color: var(--muted); }
.finally-src a { color: var(--ink-2); }

/* ---------- End of brief ---------- */
.done { margin: 3.6rem 0 1rem; padding: 2.4rem 0 0.5rem; border-top: 3px solid var(--ink); text-align: center; position: relative; }
.done::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid var(--ink); }
.done-kicker { font-size: 0.7rem; color: var(--muted); }
.done-title { margin-top: 0.4rem; font: 800 clamp(1.7rem, 1.4rem + 1.2vw, 2.3rem)/1.1 var(--display); letter-spacing: -0.02em; }
.done.all-read .done-title::before { content: "✓ "; color: var(--act); }
.done-sum { margin-top: 0.55rem; color: var(--ink-2); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.done-next {
    margin: 1.5rem auto 0; max-width: 30rem; padding: 0.9rem 1rem; background: var(--surface); text-align: left;
    display: grid; gap: 0.2rem; font-size: 0.92rem; color: var(--ink-2);
}
.done-next b { font: 700 0.66rem var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-ink); }
.done-next span { color: var(--ink); font-weight: 500; }
.done-sub { margin-top: 1rem; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.subscribe { display: flex; gap: 0.5rem; max-width: 26rem; margin: 1.4rem auto 0; }
.subscribe input {
    flex: 1; min-width: 0; height: 2.7rem; padding: 0 0.85rem; border: 1px solid var(--rule-strong); border-radius: var(--radius);
    background: var(--paper); color: var(--ink); font: 400 1rem var(--sans);
}
.subscribe input:focus-visible { outline-offset: 1px; }
.subscribe button { height: 2.7rem; padding: 0 1.1rem; border-radius: var(--radius); background: var(--ink); color: var(--paper); font-weight: 600; font-size: 0.9rem; }
.subscribe button:hover { background: var(--accent); color: #fff; }
.edition-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; margin-top: 2rem; font-size: 0.88rem; }
.edition-nav [rel="next"] { justify-self: end; }
.edition-nav a { color: var(--ink-2); text-decoration: none; padding: 0.4rem 0; }
.edition-nav a:hover { color: var(--accent-ink); }

/* ---------- Archive ---------- */
.archive-list { list-style: none; }
.archive-list a {
    display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.2rem 1rem; padding: 0.9rem 0;
    border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit;
}
.archive-list a:hover .a-head { color: var(--accent-ink); }
.a-date { font: 700 0.7rem/1.9 var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; grid-row: span 2; }
.a-head { font: 600 1.04rem/1.35 var(--display); letter-spacing: -0.01em; }
.a-meta { font-size: 0.76rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; font-variant-numeric: tabular-nums; }
.cap { text-transform: capitalize; }
.meter-dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--meter, var(--info)); display: inline-block; }
.legacy > summary { cursor: pointer; list-style: none; }
.legacy-toggle { margin-left: auto; font-weight: 600; letter-spacing: 0.06em; color: var(--accent-ink); }
.legacy-toggle::after { content: "Show"; }
.legacy[open] .legacy-toggle::after { content: "Hide"; }
.legacy > summary::-webkit-details-marker { display: none; }
.legacy-list { list-style: none; columns: 2 12rem; column-gap: 2rem; padding-top: 0.9rem; font-size: 0.88rem; }
.legacy-list li { padding: 0.2rem 0; break-inside: avoid; }
.legacy-list a { color: var(--ink-2); text-decoration: none; }
.legacy-list a:hover { color: var(--accent-ink); text-decoration: underline; }
@media (max-width: 480px) { .archive-list a { grid-template-columns: 1fr; } .a-date { grid-row: auto; } }

/* ---------- Footer, back to top, dialog ---------- */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--rule); padding: 2.2rem var(--gutter) calc(2.6rem + env(safe-area-inset-bottom)); }
.footer-inner { max-width: var(--col); margin: 0 auto; display: grid; gap: 0.9rem; font-size: 0.82rem; color: var(--muted); }
.footer-inner > p { max-width: var(--col); }
/* On an edition, line the footer up with the brief column. */
@media (min-width: 900px) { body[data-edition] .footer-inner { max-width: calc(var(--col) + var(--aside) + 3rem); } }
@media (min-width: 1280px) { body[data-edition] .footer-inner { max-width: calc(var(--rail) + var(--col) + var(--aside) + 6rem); padding-left: calc(var(--rail) + 3rem); } }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.footer-nav a { color: var(--ink-2); text-decoration: none; }
.footer-nav a:hover { color: var(--accent-ink); }

.to-top {
    position: fixed; z-index: 20; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom));
    width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--paper); color: var(--ink-2); border: 1px solid var(--rule-strong); box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--ink); border-color: var(--ink-2); }

dialog.keys {
    margin: auto; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--paper); color: var(--ink);
    padding: 1.4rem 1.5rem 1rem; width: min(24rem, calc(100vw - 2rem)); box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}
dialog.keys::backdrop { background: rgba(10, 12, 16, 0.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
dialog.keys h2 { font: 700 1.05rem var(--display); letter-spacing: -0.01em; margin-bottom: 1rem; }
dialog.keys dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.1rem; align-items: center; font-size: 0.9rem; }
dialog.keys dd { color: var(--ink-2); }
dialog.keys form > button { display: block; margin: 1.1rem 0 0 auto; }

/* ---------- Small screens & landscape phones ---------- */
@media (max-width: 600px) {
    :root { --bar-h: 50px; }
    .bar-meta .bar-date { display: none; }
    .bar-meta { justify-content: flex-end; }
    .story > details > summary { gap: 0.75rem; grid-template-columns: 0.5rem minmax(0, 1fr) 1.25rem; }
    .s-body { padding-left: 0; }
    .s-actions { flex-direction: column; align-items: stretch; }
    .source-link { justify-content: center; min-height: 2.75rem; }
    .share { justify-content: center; margin-right: 0; }
}
@media (max-height: 480px) and (orientation: landscape) {
    :root { --bar-h: 44px; }
    .masthead { margin-top: 1rem; }
}

/* ---------- Print ---------- */
@media print {
    .bar, .rail, .index, .to-top, .share, .tabs, .edition-nav, .subscribe, .g-you, dialog { display: none !important; }
    body { background: #fff; color: #000; font-size: 11pt; }
    .layout, .brief { max-width: none; display: block !important; }
    .glance { position: static !important; }
    .panel { display: block !important; }
    .panel-title { display: block !important; }
    .story { break-inside: avoid; }
    a { text-decoration: underline; }
    .chev { display: none; }
}
