/* Article and listing styles for the blog, learn, research and exploited-CVE pages.
   Loaded before styles.css, so every rule here is scoped by a class to win over element rules there.
   Colours, type and the dashed frame come from the tokens in styles.css. */

/* ---------- Listing pages: head, bar, counts */
.rows-head.list-head { padding-block: clamp(48px, 6vw, 96px) clamp(32px, 4vw, 56px); }
.list-head .list-count { margin-top: 16px; }
.list-head .actions { margin-top: 12px; }
.list-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding: 20px var(--pad); border-bottom: var(--dash); }
.list-more { display: flex; justify-content: center; padding: 32px var(--pad); }
.list-more[hidden], .filters[hidden] { display: none; }
.list-foot { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 24px var(--pad) 40px; }
.filters { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.filters button { min-height: 40px; padding: 0 12px; background: none; border: 0; border-radius: 2px; color: var(--muted); font-size: 0.9375rem; cursor: pointer; transition: color 160ms ease, background-color 160ms ease; }
.filters button span { margin-left: 4px; font-variant-numeric: tabular-nums; }
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.filters button:active { transform: scale(0.97); }

/* ---------- Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); overflow: hidden; }
@media (min-width: 1000px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.card { margin: 0 -1px -1px 0; border-right: var(--dash); border-bottom: var(--dash); }
.card[hidden] { display: none; }
.card a { display: flex; flex-direction: column; height: 100%; padding: var(--pad); color: inherit; text-decoration: none; transition: background-color 200ms ease; }
.card-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); border-radius: 2px; }
.card-media img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; transition: transform 480ms var(--ease-out); }
.card-meta { display: block; margin-top: 20px; color: var(--muted); font-size: 0.875rem; }
.card-title { margin-top: 8px; font-size: 1.3125rem; line-height: 1.25; letter-spacing: -0.016em; font-weight: 500; text-wrap: balance; transition: color 180ms ease; }
.card-desc { display: block; margin-top: 10px; font-size: 0.9375rem; line-height: 1.5; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: auto; padding-top: 18px; color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .card a:hover { background: color-mix(in srgb, var(--paper-2) 55%, var(--paper)); }
  .card a:hover .card-title { color: var(--violet-deep); }
  .card a:hover .card-media img { transform: scale(1.03); }
}
.featured .card { margin: 0; border: 0; }
@media (min-width: 901px) {
  .featured .card a { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto auto 1fr; column-gap: clamp(32px, 4vw, 72px); align-content: center; padding-block: clamp(32px, 4vw, 64px); }
  .featured .card-media { grid-row: 1 / -1; align-self: center; }
  .featured .card-meta { margin-top: 0; align-self: end; }
  .featured .card-title { font-size: clamp(1.625rem, 1rem + 1.3vw, 2.25rem); line-height: 1.1; letter-spacing: -0.028em; font-weight: 450; }
  .featured .card-desc { font-size: 1.0625rem; max-width: 34em; }
  .featured .card-foot { margin-top: 0; align-self: start; }
}

.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); font-size: 0.8125rem; line-height: 1; text-decoration: none; white-space: nowrap; }
.badge--critical { background: var(--ink); box-shadow: none; color: var(--paper); }
.badge--high { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
a.badge--link { font-variant-numeric: tabular-nums; transition: box-shadow 160ms ease, color 160ms ease; }
a.badge--link:hover { box-shadow: inset 0 0 0 1px var(--violet); color: var(--violet-deep); }

/* ---------- Article: head */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); font-size: 0.9375rem; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--rule); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.post-head { padding: clamp(40px, 5vw, 80px) var(--pad) clamp(32px, 4vw, 56px); }
.post-title { margin-top: 20px; max-width: 24em; font-size: clamp(1.75rem, 1.05rem + 2.6vw, 3.75rem); line-height: 1.06; letter-spacing: -0.032em; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 24px; color: var(--muted); font-size: 0.9375rem; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* ---------- Article: layout. Contents on the left, a readable measure in the middle, key facts on the right. */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.post-lead, .post-body { min-width: 0; padding-inline: var(--pad); }
.post-lead { padding-top: clamp(28px, 3vw, 48px); }
.post-body { padding-block: clamp(28px, 3vw, 44px) clamp(56px, 6vw, 96px); }
.post-side { min-width: 0; padding: clamp(28px, 3vw, 48px) var(--pad) 0; }
.post-toc { min-width: 0; padding: 24px var(--pad) 0; }
.stick { max-width: 460px; }
@media (min-width: 860px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); grid-template-areas: "lead side" "toc side" "body side"; grid-template-rows: auto auto 1fr; }
  .post-lead { grid-area: lead; } .post-toc { grid-area: toc; } .post-body { grid-area: body; }
  .post-side { grid-area: side; border-left: var(--dash); padding-bottom: 48px; }
  .stick { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin; }
}
@media (min-width: 1240px) {
  .post-layout { grid-template-columns: minmax(220px, 1fr) minmax(0, 47rem) minmax(320px, 1.4fr); grid-template-areas: "toc lead side" "toc body side"; grid-template-rows: auto 1fr; }
  .post-toc { border-right: var(--dash); padding-block: clamp(28px, 3vw, 48px) 48px; }
  .post-toc details { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin; }
  .post-toc summary { pointer-events: none; min-height: 0; }
  .post-layout .post-toc summary::after { content: none; }
}
.post-layout--plain { grid-template-areas: "lead side" "body side"; }

.answer { padding: 24px 28px 28px; background: var(--paper-2); border-radius: 2px; }
.answer h2, .glance h2, .share h2, .post-toc summary { color: var(--ink); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0; }
.answer p { margin-top: 10px; color: var(--ink); font-size: 1.0625em; line-height: 1.5; }
.answer p + p { margin-top: 12px; }
.answer a, .glance a, .post-faq a, .sources a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }

.post-toc summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; list-style: none; cursor: pointer; }
.post-toc summary::after { content: "+"; font-size: 1.25rem; font-weight: 300; transition: transform 220ms var(--ease-out); }
.post-toc details[open] summary::after { transform: rotate(45deg); }
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc ol { margin-top: 12px; display: grid; gap: 2px; }
.post-toc a { display: block; padding: 5px 0 5px 12px; border-left: 1px solid var(--rule); color: var(--muted); font-size: 0.9375rem; line-height: 1.35; text-decoration: none; transition: color 160ms ease, border-color 160ms ease; }
.post-toc a:hover, .post-toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--ink); }

.glance table { width: 100%; min-width: 0; margin-top: 8px; font-size: 0.9375rem; }
.glance th, .glance td { padding: 10px 0; }
.glance th { width: 34%; padding-right: 12px; color: var(--muted); font-weight: 400; }
.glance td { width: auto; color: var(--ink); overflow-wrap: anywhere; }
.glance ul { margin-top: 8px; }
.glance li { padding: 10px 0; border-bottom: var(--dash); font-size: 0.9375rem; line-height: 1.35; }
.glance li a { text-decoration: none; } .glance li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.glance li span { color: var(--ink); font-weight: 500; }
.share { margin-top: 28px; }
.share ul { display: flex; flex-wrap: wrap; gap: 0 10px; margin-top: 4px; }
.share a, .share button { display: inline-flex; align-items: center; min-height: 40px; padding: 0; background: none; border: 0; color: var(--ink-2); font-size: 0.9375rem; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; cursor: pointer; }
.share a:hover, .share button:hover { color: var(--violet-deep); text-decoration-color: currentColor; }

.post-faq h2, .sources h2 { font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2rem); line-height: 1.15; letter-spacing: -0.022em; scroll-margin-top: 100px; }

/* ---------- Article: body typography */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.1em; font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2rem); line-height: 1.15; letter-spacing: -0.022em; scroll-margin-top: 100px; }
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.012em; font-weight: 500; scroll-margin-top: 100px; }
.prose h4 { margin-top: 1.6em; font-size: 1.0625rem; font-weight: 500; }
.prose > :first-child { margin-top: 0; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.7em; }
.prose strong, .post-faq strong { color: var(--ink); font-weight: 500; }
.prose a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; overflow-wrap: anywhere; transition: text-decoration-color 180ms ease, color 180ms ease; }
.prose a:hover, .answer a:hover, .glance a:hover, .post-faq a:hover, .sources a:hover { color: var(--violet-deep); text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li + li, .prose li > ul, .prose li > ol { margin-top: 0.45em; }
.prose li::marker { color: var(--muted); }
.prose ul.checklist { list-style: none; padding-left: 0; }
.prose .checklist li { position: relative; padding-left: 1.8em; }
.prose .checklist li::before { content: ""; position: absolute; left: 0; top: 0.32em; width: 0.9em; height: 0.9em; box-shadow: inset 0 0 0 1px var(--ink-2); border-radius: 2px; }
.prose code, .post-faq code, .glance code, .answer code, .finding code { padding: 0.1em 0.35em; background: var(--paper-2); border-radius: 2px; color: var(--ink); font: 0.875em/1.4 var(--mono); overflow-wrap: anywhere; }
.answer code { background: var(--paper); }
.prose pre { margin-top: 1.15em; padding: 18px 20px; font-size: 0.8125rem; tab-size: 2; }
.prose pre code { padding: 0; background: none; font: inherit; overflow-wrap: normal; white-space: pre; }
.prose blockquote { margin-inline: 0; padding-left: 1.1em; border-left: 2px solid var(--ink); color: var(--ink); }
.prose img { width: 100%; border-radius: 2px; }
.prose figure { margin-inline: 0; }
.prose figcaption { margin-top: 8px; color: var(--muted); font-size: 0.875rem; }
.prose hr { border: 0; border-top: var(--dash); margin-block: 2em; }
.prose .table-wrap { margin-top: 1.15em; }
.prose table { min-width: 480px; font-size: 0.9375rem; }
.prose th, .prose td { width: auto; padding: 10px 14px 10px 0; }
.prose thead th { font-size: 0.9375rem; }
.prose tbody th { color: var(--ink); font-weight: 500; }

.post-faq, .sources { max-width: 72ch; margin-top: 56px; padding-top: 40px; border-top: var(--dash); }
.post-faq h3 { margin-top: 28px; font-size: 1.1875rem; line-height: 1.3; font-weight: 500; }
.post-faq p { margin-top: 8px; }
.sources ol { margin-top: 16px; padding-left: 1.6em; list-style: decimal; font-size: 0.9375rem; }
.sources li + li { margin-top: 6px; }
.sources li::marker { color: var(--muted); }
.sources a { overflow-wrap: anywhere; }
.post-foot { max-width: 72ch; margin-top: 40px; padding-top: 20px; border-top: var(--dash); color: var(--muted); font-size: 0.9375rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 72ch; margin-top: 56px; padding-top: 28px; border-top: var(--dash); }
.pager a { display: grid; gap: 4px; text-decoration: none; }
.pager a:last-child { text-align: right; }
.pager span { color: var(--muted); font-size: 0.875rem; }
.pager strong { color: var(--ink); font-weight: 500; line-height: 1.3; transition: color 160ms ease; }
.pager a:hover strong { color: var(--violet-deep); }

/* ---------- Research */
.orgs { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border-top: var(--dash); }
@media (min-width: 700px) { .orgs { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1300px) { .orgs { grid-template-columns: repeat(8, 1fr); } }
.orgs li { display: grid; justify-items: center; align-content: center; gap: 12px; min-height: clamp(104px, 10vw, 136px); margin: 0 -1px -1px 0; padding: 16px 8px; border-right: var(--dash); border-bottom: var(--dash); color: var(--ink); font-size: 0.9375rem; text-align: center; }
.orgs img { height: 30px; width: auto; max-width: min(132px, 80%); object-fit: contain; filter: grayscale(1) contrast(1.1); opacity: 0.7; transition: filter 240ms ease, opacity 240ms ease; }
.orgs li:hover img { filter: none; opacity: 1; }
.finding, .wide-table { margin-top: 0; padding: 0 var(--pad) 8px; border-top: var(--dash); }
.finding table { min-width: 0; font-size: 1rem; }
.finding th { width: 11em; color: var(--ink); font-weight: 500; padding-block: 22px; }
.finding td { width: auto; padding-block: 22px; color: var(--ink-2); max-width: 60em; }
@media (max-width: 620px) { .finding tr { display: grid; } .finding th { padding-bottom: 0; border-bottom: 0; width: auto; } .finding td { padding-top: 6px; } }
.wide-table table { font-size: 0.9375rem; }
.wide-table td { width: auto; color: var(--ink-2); }
.wide-table tbody th { width: 26%; color: var(--ink); font-weight: 500; }
.wide-table td:nth-child(2), .wide-table td:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Exploited CVEs */
.defs div { display: grid; gap: 6px 32px; padding: 22px 0; border-top: var(--dash); }
.defs div:last-child { border-bottom: var(--dash); }
.defs dt { color: var(--ink); font-weight: 500; } .defs dd { margin: 0; }
@media (min-width: 761px) { .defs div { grid-template-columns: minmax(140px, 1fr) 2fr; } }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-top: var(--dash); }
@media (min-width: 901px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { margin: 0 -1px -1px 0; padding: 28px var(--pad) 32px; border-right: var(--dash); border-bottom: var(--dash); }
.stats { overflow: hidden; }
.stat b { display: block; color: var(--ink); font-weight: 400; font-size: clamp(2.25rem, 1.5rem + 2.4vw, 4rem); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 10px; font-size: 0.9375rem; max-width: 16em; }
.kev-week { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.kev-week li { scroll-snap-align: start; border-right: var(--dash); }
.kev-week li.muted { padding: 24px var(--pad); border: 0; }
.kev-week a { display: grid; align-content: start; gap: 4px; height: 100%; padding: 20px var(--pad) 24px; text-decoration: none; transition: background-color 180ms ease; }
.kev-week a:hover { background: var(--paper-2); }
.kev-week b { color: var(--ink); font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kev-week span { font-size: 0.9375rem; line-height: 1.35; }
.kev-week small { color: var(--muted); font-size: 0.8125rem; }

.kev-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px var(--pad); border-bottom: var(--dash); }
.kev-controls[hidden] { display: none; }
.kev-controls label { display: grid; gap: 6px; color: var(--muted); font-size: 0.8125rem; }
.kev-controls .kev-search { grid-column: 1 / -1; }
.kev-controls input, .kev-controls select { width: 100%; min-height: 44px; padding: 0 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; color: var(--ink); font: inherit; font-size: 0.9375rem; }
.kev-controls input::placeholder { color: var(--muted); }
.kev-controls input:hover, .kev-controls select:hover { border-color: var(--ink-2); }
.kev-controls .kev-reset { align-self: end; justify-self: start; background: none; border: 0; cursor: pointer; }
.kev-controls .kev-reset::after { content: none; }
@media (min-width: 1100px) { .kev-controls { grid-template-columns: minmax(240px, 2fr) repeat(5, minmax(0, 1fr)) auto; } .kev-controls .kev-search { grid-column: auto; } }

.kev-head, .kev summary { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 6.5rem 6.5rem 4rem 6.5rem 11rem 1rem; gap: 0 20px; align-items: start; padding-inline: var(--pad); }
.kev-head { padding-block: 12px; border-bottom: var(--dash); color: var(--muted); font-size: 0.8125rem; }
.kev-item { border-bottom: var(--dash); scroll-margin-top: 80px; }
.kev summary { padding-block: 18px; list-style: none; cursor: pointer; font-size: 0.9375rem; transition: background-color 180ms ease; }
.kev summary::-webkit-details-marker { display: none; }
.kev summary::after { content: "+"; color: var(--ink); font-size: 1.25rem; font-weight: 300; line-height: 1.1; transition: transform 220ms var(--ease-out); }
.kev details[open] summary::after { transform: rotate(45deg); }
.kev summary:hover, .kev details[open] summary { background: var(--paper-2); }
.kev-id { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kev-what strong { display: block; color: var(--ink); font-weight: 500; line-height: 1.35; }
.kev-what span { display: -webkit-box; margin-top: 2px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--ink-2); line-height: 1.45; }
.kev-num { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kev-num small { color: var(--muted); font-size: 0.8125rem; }
.kev-flags { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.kev-flag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); font-size: 0.75rem; white-space: nowrap; }
.kev-flag--hot { background: var(--ink); box-shadow: none; color: var(--paper); }
.kev-flag--brief { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.kev-detail { display: grid; gap: 20px; padding: 8px var(--pad) 32px calc(var(--pad) + 9.5rem + 20px); background: var(--paper-2); font-size: 0.9375rem; }
.kev-detail > p:first-child { max-width: 72ch; color: var(--ink); }
.kev-detail dl { display: grid; gap: 0; margin: 0; max-width: 72ch; }
.kev-detail dl div { display: grid; grid-template-columns: 12em minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px dashed var(--rule); }
.kev-detail dt { color: var(--muted); } .kev-detail dd { margin: 0; color: var(--ink); }
.kev-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.kev-links .arrow { min-height: 44px; flex-basis: 100%; }
.kev-note { padding: 0 var(--pad) 32px; }
@media (max-width: 1099px) {
  .kev-head { display: none; }
  .kev summary { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .kev summary::after { grid-area: 1 / 2; }
  .kev-id { grid-area: 1 / 1; }
  .kev-what, .kev-flags { grid-column: 1 / -1; }
  .kev-num { grid-column: 1 / -1; color: var(--ink-2); }
  .kev-num::before { content: attr(data-l) " "; color: var(--muted); }
  .kev summary { display: flex; flex-wrap: wrap; position: relative; padding-right: calc(var(--pad) + 28px); }
  .kev summary::after { position: absolute; right: var(--pad); top: 16px; }
  .kev-id, .kev-what, .kev-flags { flex: 0 0 100%; }
  .kev-num { flex: none; }
  .kev-detail { padding-left: var(--pad); }
  .kev-detail dl div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .card-media img, .kev summary::after { transition: none; }
}

/* ---------- Article head with its engraving */
@media (min-width: 900px) { .post-head--art { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 30%); gap: clamp(32px, 4vw, 72px); align-items: center; } }
.post-head-art { display: flex; justify-content: center; margin-top: 28px; }
.post-head-art .ink { width: min(100%, 300px); }
.post-head-art .ink img { max-height: 300px; object-fit: contain; }
@media (min-width: 900px) { .post-head-art { margin-top: 0; } .post-head-art .ink { width: min(100%, 380px); } .post-head-art .ink img { max-height: 340px; } }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.head-spot { flex: none; width: auto; height: clamp(72px, 8vw, 128px); max-width: 30%; object-fit: contain; object-position: bottom; }
.empty { display: grid; justify-items: center; gap: 16px; padding: 64px var(--pad); color: var(--muted); }

/* ---------- Components writers can use in a post */
.prose .anchor { margin-left: 0.4em; color: var(--rule); font-weight: 400; text-decoration: none; opacity: 0; transition: opacity 160ms ease, color 160ms ease; }
.prose :is(h2, h3, h4):hover .anchor, .prose .anchor:focus-visible { opacity: 1; color: var(--muted); }
@media (hover: none) { .prose .anchor { opacity: 1; } }
.answer--inline { margin-top: 1.4em; }
.answer-label, .callout-title { color: var(--ink); font-size: 0.9375rem; font-weight: 500; }
.glance--inline table { min-width: 0; }
.callout { margin-top: 1.4em; padding: 18px 22px 20px; border-left: 2px solid var(--ink-2); background: var(--paper-2); border-radius: 0 2px 2px 0; }
.callout > * + * { margin-top: 0.6em; }
.callout--warning { border-left-color: var(--ink); border-left-width: 4px; }
.callout--fix { border-left-style: dashed; }
.prose .mdx-steps { list-style: none; padding-left: 0; counter-reset: step; margin-top: 1.4em; }
.mdx-steps > li { position: relative; padding: 0 0 26px 3.2em; counter-increment: step; }
.mdx-steps > li + li { margin-top: 0; }
.mdx-steps > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0.15em; color: var(--muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.mdx-steps > li::after { content: ""; position: absolute; left: 0.6em; top: 2em; bottom: 6px; border-left: var(--dash); }
.mdx-steps > li:last-child::after { content: none; }
.mdx-steps h3 { margin-top: 0; }
.mdx-steps > li > * + * { margin-top: 0.6em; }
.code { position: relative; margin-top: 1.15em; }
.code pre { margin-top: 0; padding: 18px 20px; background: var(--paper-2); font: 0.8125rem/1.7 var(--mono); overflow-x: auto; border-radius: 2px; tab-size: 2; }
.code pre code { display: block; width: max-content; min-width: 100%; padding: 0; background: none; font: inherit; white-space: pre; overflow-wrap: normal; }
.code .line.hl { display: inline-block; width: 100%; margin-inline: -20px; padding-inline: 20px; background: color-mix(in srgb, var(--ink) 9%, transparent); box-shadow: inset 2px 0 0 var(--ink); }
.code-name { margin: 0; padding: 8px 20px; border-bottom: var(--dash); background: var(--paper-2); color: var(--muted); font: 0.8125rem/1.5 var(--mono); border-radius: 2px 2px 0 0; }
.code--named pre { border-radius: 0 0 2px 2px; }
.code-copy { display: none; position: absolute; top: 6px; right: 6px; z-index: 1; min-height: 32px; padding: 0 10px; background: var(--paper); border: 0; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); font-size: 0.8125rem; cursor: pointer; opacity: 0; transition: opacity 160ms ease, transform 160ms var(--ease-out); }
.js .code-copy { display: inline-flex; align-items: center; }
.code:hover .code-copy, .code-copy:focus-visible { opacity: 1; }
.code-copy:active { transform: scale(0.97); }
@media (hover: none) { .code-copy { opacity: 1; min-height: 44px; } .code pre { padding-top: 56px; } .code--named pre { padding-top: 18px; } .code--named .code-copy { top: 0; } }
.compare table { min-width: 420px; }
.compare td, .compare th { text-align: center; } .compare tbody th { text-align: left; }
.mark { width: 22px; height: 22px; margin-inline: auto; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mark--no { stroke: var(--muted); stroke-width: 1.4; }
.attack-chain { margin: 1.4em 0 0; }
.attack-chain svg { width: 100%; height: auto; }
.attack-chain .chain-v { max-width: 340px; }
.chain-notes { display: grid; gap: 0; margin-top: 12px; padding: 0; list-style: none; border-top: var(--dash); }
@media (min-width: 620px) { .prose .chain-notes { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } .chain-notes li + li { border-left: var(--dash); padding-left: 14px; } }
.prose .chain-notes { padding-left: 0; }
.chain-notes li { display: grid; align-content: start; gap: 2px; margin: 0; padding: 12px 10px 12px 0; border-bottom: var(--dash); font-size: 0.9375rem; line-height: 1.4; }
.chain-notes li + li { margin-top: 0; }
.chain-notes li span:first-child { color: var(--muted); font-size: 0.8125rem; }
.figure { margin: 1.4em 0 0; }
.cta-box { margin-top: 2em; padding: 28px; background: var(--paper-2); border-radius: 2px; }
.cta-box h2 { margin-top: 0; font-size: 1.5rem; }
.cta-box .actions { margin-top: 20px; }
.prose a.cve { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prose .footnotes { margin-top: 3em; padding-top: 1.5em; border-top: var(--dash); font-size: 0.9375rem; }
.prose sup a { padding: 0 2px; text-decoration: none; font-variant-numeric: tabular-nums; }

/* ---------- Vendor lists and CVE tables */
.vendors { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); overflow: hidden; border-top: var(--dash); }
.vendors li { display: grid; align-content: start; gap: 4px; margin: 0 -1px -1px 0; padding: 16px var(--pad); border-right: var(--dash); border-bottom: var(--dash); font-size: 0.9375rem; }
.vendors li > a { display: grid; gap: 4px; min-height: 44px; align-content: center; text-decoration: none; }
.vendors li > a:hover strong { color: var(--violet-deep); }
.vendors strong { color: var(--ink); font-weight: 500; font-size: 1rem; transition: color 160ms ease; }
.vendors span { color: var(--muted); font-variant-numeric: tabular-nums; }
.vendors span a { display: inline-block; margin-right: 10px; padding-block: 6px; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.kev-table { padding-inline: 0; }
.kev-table table { min-width: 760px; }
.kev-table th, .kev-table td { padding-inline: var(--pad) 0; }
.kev-table tbody th { width: 11rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kev-table td:nth-child(3) { min-width: 18rem; }
.kev-table td:nth-child(n + 4) { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* On narrow screens a wide table scrolls sideways and its first column stays in view. */
@media (max-width: 900px) {
  .wide-table { padding-inline: 0; }
  .wide-table table th:first-child { position: sticky; left: 0; z-index: 1; padding-left: var(--pad); background: var(--paper); box-shadow: 1px 0 0 var(--rule); }
  .wide-table tbody th { width: auto; max-width: 42vw; white-space: normal; }
  .wide-table td { padding-left: 14px; }
}
/* At phone width the shared styles turn every table into a stack of cards. */
@media (max-width: 760px) {
  .wide-table table th:first-child { position: static; max-width: none; padding-left: 0; box-shadow: none; }
  .wide-table.table-wrap table tbody tr, .finding.table-wrap table tbody tr { padding-inline: var(--pad); }
  .wide-table.table-wrap td:nth-child(n), .wide-table.table-wrap tbody th { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
}
.post--cve .post-title { font-size: clamp(1.625rem, 1rem + 2vw, 3rem); }

/* ---------- Phones and touch: readable text, 44 px targets, the contents list as a drawer */
.crumbs a, .post-meta a, .list-foot .arrow, .kev-links a, .pager a, .glance li a, .filters button, .share a, .share button { min-height: 44px; }
.crumbs li { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs a, .post-meta a, .kev-links a, .glance li a { display: inline-flex; align-items: center; }
.crumbs a, .share a, .share button, .kev-links a { min-width: 44px; justify-content: center; }
.wide-table :is(td, th) a, .post-head .lede a, .kev-note a, .glance td a, .defs dd a { display: inline-block; padding-block: 11px; }
@media (pointer: coarse) { .prose td a { display: inline-block; padding-block: 11px; } }
.wide-table :is(td, th) { vertical-align: middle; }
.post-meta { align-items: center; }
a.badge--link { min-height: 44px; padding-inline: 12px; }
.sources li a, .vendors span a { display: inline-block; padding-block: 11px; }
.sources li + li { margin-top: 0; }
@media (max-width: 1239px) {
  .post-toc { position: sticky; top: 64px; z-index: 5; margin-top: 20px; padding: 0 var(--pad); background: var(--paper); border-block: var(--dash); }
  .post-toc details[open] ol { max-height: min(60vh, 420px); overflow-y: auto; padding-bottom: 16px; }
  .post-toc a { min-height: 44px; display: flex; align-items: center; }
}
@media (max-width: 900px) {
  .list-head .list-count { font-size: 1rem; }
  .card-desc, .card-meta, .card-foot, .list-bar .small, .cell .small, .kev-note, .vendors span, .glance table, .glance li, .kev summary, .kev-detail, .sources ol, .wide-table table, .prose table, .post-toc a, .vendors li, .chain-notes li, .attack li, .post-foot, .post-meta, .share a, .share button, .filters button, .stat span, .kev-week span, .defs, .list-count { font-size: 1rem; }
  .kev-controls label, .kev-flag, .badge { font-size: 0.875rem; }
  .code pre { font-size: 0.875rem; }
  .post-title { font-size: clamp(1.625rem, 1rem + 3.2vw, 2.25rem); }
  .kev-controls select, .kev-controls input { min-height: 48px; font-size: 1rem; }
  .kev summary { padding-block: 20px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .post-toc { position: static; }
  .stick { position: static; max-height: none; }
}

/* Listing and reference titles: the display heading's shape without its line-by-line reveal,
   so the title is painted with the first frame. */
.list-title { font-size: clamp(2.25rem, 0.9rem + 3.2vw, 4.75rem); line-height: 1.02; letter-spacing: -0.038em; }

/* Research page: fact line, annotated hero drawing, the sample finding as four drawn steps, and the briefings table. */
.facts { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.facts li { padding: 7px 12px; border: 1px dashed var(--ink); border-radius: 3px 7px 4px 8px; color: var(--ink-2); font-size: 0.875rem; }
.facts li:nth-child(odd) { transform: rotate(-1deg); }
.facts li:nth-child(even) { transform: rotate(0.8deg); }
.facts strong { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.mark-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.mark-svg path { fill: none; stroke: var(--violet); stroke-width: 5; stroke-linecap: round; opacity: 0.9; }
.mark-svg .lead { stroke: var(--ink); stroke-width: 2; opacity: 1; }
.mark-label { position: absolute; left: 69%; top: 10.5%; padding: 2px 0; border-bottom: 2px solid var(--violet); color: var(--violet-deep); font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.mark-label::before { content: "✓ "; }
.flow { display: grid; gap: 40px 0; margin: 0; padding: clamp(32px, 4vw, 56px) 0 8px; border-top: var(--dash); list-style: none; }
.flow li { position: relative; padding: 0 var(--pad); }
.flow-art { display: flex; align-items: flex-end; height: 112px; }
.flow-art .sketch { width: 150px; }
.flow-arrow { display: none; }
.flow-step { margin-top: 22px; color: var(--ink); font-weight: 500; }
.flow-step span { margin-right: 10px; color: var(--muted); font-weight: 400; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.flow-key { margin-top: 10px; }
.flow-key code { display: inline-block; padding: 4px 9px; border: 1px dashed var(--ink); border-radius: 3px 6px 4px 7px; background: none; color: var(--ink); font: 500 0.8125rem/1.4 var(--mono); }
.flow-key--ok code { border-color: var(--violet); border-style: solid; color: var(--violet-deep); }
.flow li > p:last-child { margin-top: 12px; color: var(--ink-2); font-size: 0.9375rem; max-width: 34em; }
.flow li > p:last-child code { padding: 0.1em 0.35em; background: var(--paper-2); border-radius: 2px; font: 0.875em/1.4 var(--mono); }
@media (min-width: 941px) {
  .flow { grid-template-columns: repeat(4, 1fr); }
  .flow li + li { border-left: var(--dash); }
  .flow-arrow { display: block; position: absolute; top: 46px; right: -22px; z-index: 1; width: 44px; padding: 0 2px; background: var(--paper); }
}
@media (min-width: 621px) and (max-width: 940px) { .flow { grid-template-columns: repeat(2, 1fr); } }
.briefs tbody tr { background: linear-gradient(color-mix(in srgb, var(--violet) 7%, transparent), color-mix(in srgb, var(--violet) 7%, transparent)) no-repeat 0 0 / 0% 100%; transition: background-size 380ms var(--ease-out); }
.briefs .vend { display: flex; align-items: center; gap: 14px; }
.briefs .vend b { display: block; font-weight: 500; }
.briefs .vend small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.8125rem; font-weight: 400; }
.briefs .tile { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1.5px solid var(--ink); border-radius: 4px 8px 5px 9px; color: var(--ink); font-weight: 500; transform: rotate(-4deg); transition: transform 240ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.briefs tr:nth-child(even) .tile { transform: rotate(3deg); border-radius: 8px 4px 9px 5px; }
.briefs tr:nth-child(3n) .tile { transform: rotate(-1.5deg); }
.briefs .chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: 17em; white-space: normal; }
.briefs .chip { display: inline-block; padding: 4px 8px; border: 1px dashed var(--rule); border-color: color-mix(in srgb, var(--ink) 45%, transparent); border-radius: 3px 6px 4px 7px; color: var(--ink); font: 500 0.75rem/1.4 var(--mono); text-decoration: none; transition: transform 200ms var(--ease-out), border-color 200ms ease; }
.briefs a.chip:hover, .briefs a.chip:focus-visible { border-style: solid; border-color: var(--violet); color: var(--violet-deep); transform: translateY(-2px) rotate(-1.5deg); }
.briefs .chip--none { border-style: dotted; color: var(--muted); }
.briefs .brief-link { display: inline-block; padding-block: 11px; color: var(--ink); text-decoration: none; background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 calc(100% - 9px) / 0% 1.5px; transition: background-size 320ms var(--ease-out); }
.briefs .go { display: inline-block; margin-left: 8px; opacity: 0; transform: translateX(-6px); transition: opacity 200ms ease, transform 240ms var(--ease-out); }
@media (hover: hover) {
  .briefs tbody tr:hover { background-size: 100% 100%; }
  .briefs tbody tr:hover .tile { transform: rotate(0) scale(1.08); background: var(--ink); color: var(--paper); }
  .briefs tbody tr:hover .brief-link { background-size: 100% 1.5px; }
  .briefs tbody tr:hover .go { opacity: 1; transform: none; }
}
.briefs .brief-link:focus-visible .go { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .briefs tbody tr, .briefs .tile, .briefs .chip, .briefs .go, .briefs .brief-link { transition: none; } }
