:root {
  --sky: #e3e9ec;
  --field: #eef2f4;
  --ink: #1e2830;
  --muted: #5c6a74;
  --wire: #2a343d;
  --rule: #c3cdd3;
  --signal: #a3305a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: #161c21;
    --field: #1e252b;
    --ink: #d9e0e4;
    --muted: #8f9ca5;
    --wire: #6f7d87;
    --rule: #2e383f;
    --signal: #e57a9c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --sky: #161c21;
    --field: #1e252b;
    --ink: #d9e0e4;
    --muted: #8f9ca5;
    --wire: #6f7d87;
    --rule: #2e383f;
    --signal: #e57a9c;
    color-scheme: dark;
  }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Schibsted Grotesk", system-ui, sans-serif;
  font-feature-settings: "kern", "liga";
  min-height: 100vh;
}

a { color: inherit; text-decoration-line: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--signal); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.wrap { box-sizing: content-box; max-width: 38rem; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 2.5rem; } }
/* Reading column for posts: room for code and tables, still under ~80 characters of prose. */
.wrap.article { max-width: 44rem; }
.wrap.wide { max-width: 52rem; }
.wrap.narrow { max-width: 22rem; padding-top: 18vh; }

.intro { margin: clamp(2.5rem, 9vh, 5.5rem) 0 2.5rem; }
.name {
  font-size: clamp(3rem, 10vw, 5.75rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .92;
  margin: 0;
}
.name.small { font-size: clamp(2rem, 6vw, 2.75rem); letter-spacing: -.03em; margin: 2rem 0 1.25rem; }
.tagline { margin: .9rem 0 0; color: var(--muted); font-size: 1.1875rem; }

.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0 0 1.1em; }
.prose h2, .prose h3, .prose h4 { line-height: 1.25; letter-spacing: -.01em; margin: 2em 0 .6em; }
.prose h2 { font-size: 1.375rem; font-weight: 600; }
.prose h3 { font-size: 1.125rem; font-weight: 600; }
.prose h4 { font-size: 1rem; font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .3em; }
.prose blockquote { margin-left: 0; padding-left: 1rem; border-left: 2px solid var(--wire); color: var(--muted); }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em; background: var(--field); padding: .1em .3em; border-radius: 3px; }
.prose pre { background: var(--field); padding: .9rem 1rem; overflow-x: auto; border-radius: 4px; line-height: 1.45; }
.prose pre code { background: none; padding: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 3px; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.about { max-width: 34rem; }

.block { margin-top: 3.25rem; }
.block h2 { font-size: 1rem; font-weight: 600; color: var(--muted); margin: 0 0 .75rem; letter-spacing: 0; }

.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.posts li { border-bottom: 1px solid var(--rule); }
.posts a { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: .7rem 0; text-decoration: none; }
.posts .t { font-weight: 500; }
.posts time { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.posts a:hover time { color: inherit; }
@media (max-width: 480px) { .posts a { flex-direction: column; gap: .1rem; } }

.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.links a { font-weight: 500; }

.foot { margin-top: 5rem; padding-bottom: 2.5rem; color: var(--muted); font-size: .9375rem; }
.foot p { margin: 0; }

/* single post */
.post-head { margin: clamp(2rem, 7vh, 4rem) 0 2rem; }
.post-head h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; margin: 0; text-wrap: balance; }
/* Long titles (common for advisories) step down so the post starts above the fold. */
.post-head h1.medium { font-size: clamp(1.75rem, 4.5vw, 2.4rem); letter-spacing: -.03em; line-height: 1.1; }
.post-head h1.long { font-size: clamp(1.3rem, 3.4vw, 1.95rem); letter-spacing: -.02em; line-height: 1.18; text-wrap: pretty; }
.meta { color: var(--muted); margin: .75rem 0 0; font-size: .9375rem; }
.draft { margin-left: .75rem; color: var(--signal); }

/* admin */
.admin { padding-bottom: 4rem; }
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); font-weight: 500; }
.admin-nav form { margin-left: auto; }
.admin .block { margin-top: 2.5rem; }
.inline { display: inline; margin: 0; }
.flash { margin: 1.25rem 0 0; padding: .6rem .9rem; background: var(--field); border-left: 3px solid var(--wire); }
.error { color: var(--signal); font-weight: 500; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-weight: 400; font-size: .875rem; }

.stack { display: grid; gap: 1.1rem; }
.stack > button { justify-self: start; }
label { display: grid; gap: .35rem; font-weight: 500; font-size: .9375rem; }
label.check { display: flex; align-items: center; gap: .5rem; }
input, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]), textarea {
  width: 100%; padding: .55rem .7rem; background: var(--field); border: 1px solid var(--rule); border-radius: 4px; font-weight: 400;
}
input:focus, textarea:focus { border-color: var(--wire); outline: none; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
textarea { resize: vertical; line-height: 1.5; }
textarea.body { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9375rem; }
input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--wire); }

button {
  cursor: pointer; padding: .5rem 1rem; border-radius: 4px; border: 1px solid var(--ink); background: var(--ink); color: var(--sky); font-weight: 500;
}
button:hover { background: var(--wire); border-color: var(--wire); }
button.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
button.ghost:hover { border-color: var(--ink); }
button.danger { color: var(--signal); }
button.danger:hover { border-color: var(--signal); }
button:disabled { opacity: .35; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .2em; }
.link-btn:hover { background: none; color: var(--signal); }

.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row input { flex: 1 1 8rem; width: auto; min-width: 0; }
.link-rows { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .5rem; }
.pair { display: grid; grid-template-columns: 1fr 11rem; gap: 1rem; }
@media (max-width: 560px) { .pair { grid-template-columns: 1fr; } }

.list { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.list th { text-align: left; font-weight: 600; color: var(--muted); padding: 0 .75rem .5rem 0; }
.list td { padding: .6rem .75rem .6rem 0; border-top: 1px solid var(--rule); }
.list .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.list .actions { text-align: right; }
.list .empty { color: var(--muted); padding: 1rem 0; }
.danger-zone { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }

.uploader { margin-top: -.5rem; }
.file-btn { display: inline-block; cursor: pointer; padding: .4rem .9rem; border: 1px solid var(--rule); border-radius: 4px; font-size: .9375rem; }
.file-btn:hover { border-color: var(--ink); }
.file-btn:focus-within { outline: 2px solid var(--signal); outline-offset: 2px; }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
textarea.dragging { border-color: var(--signal); }

.more { margin: .75rem 0 0; font-weight: 500; }
.list .actions { white-space: nowrap; }
.list .actions > * + * { margin-left: 1rem; }
.link-btn.danger { color: var(--signal); }
.posts-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.posts-head .file-btn { text-decoration: none; font-weight: 500; }
.filters { justify-content: space-between; margin-bottom: 1.25rem; gap: 1rem; }
.tabs { display: flex; gap: 1.25rem; font-weight: 500; }
.tabs a { text-decoration: none; color: var(--muted); padding-bottom: .2rem; border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.search { flex: 0 1 20rem; flex-wrap: nowrap; }
.search button { padding: .5rem .9rem; }
.edit-link { margin-left: .75rem; }
@media (max-width: 640px) {
  .list thead { display: none; }
  .list tr { display: grid; grid-template-columns: 1fr auto; padding: .6rem 0; border-top: 1px solid var(--rule); }
  .list td { border: 0; padding: .1rem 0; }
  .list td:first-child { grid-column: 1 / -1; font-weight: 500; }
  .list .actions { grid-column: 1 / -1; text-align: left; padding-top: .35rem; }
}
.list .link-btn { font-weight: 400; }

/* writeups: code, tables, tags */
:root { --hl-keyword: #8a2f55; --hl-string: #2f6b4f; --hl-number: #8a5a12; --hl-title: #1f4f7a; --hl-comment: #6f7c86; --hl-meta: #5b4a8a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --hl-keyword: #f08fb1; --hl-string: #8fd3ad; --hl-number: #e8bc78; --hl-title: #8cc4f2; --hl-comment: #7d8a94; --hl-meta: #b9a6f0; }
}
:root[data-theme="dark"] { --hl-keyword: #f08fb1; --hl-string: #8fd3ad; --hl-number: #e8bc78; --hl-title: #8cc4f2; --hl-comment: #7d8a94; --hl-meta: #b9a6f0; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-built_in, .hljs-type { color: var(--hl-keyword); }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-template-tag { color: var(--hl-string); }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-variable, .hljs-template-variable { color: var(--hl-number); }
.hljs-title, .hljs-section, .hljs-name, .hljs-selector-id, .hljs-selector-class, .hljs-attr { color: var(--hl-title); }
.hljs-comment, .hljs-quote, .hljs-deletion { color: var(--hl-comment); font-style: italic; }
.hljs-meta, .hljs-doctag { color: var(--hl-meta); }
.hljs-deletion { font-style: normal; color: var(--signal); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

.code-wrap { position: relative; margin: 0 0 1.1em; }
.code-wrap pre { margin: 0; }
.prose pre { font-size: .875rem; }
.prose pre[data-lang]::before { content: attr(data-lang); display: block; color: var(--muted); font-family: "Schibsted Grotesk", system-ui, sans-serif; font-size: .75rem; margin-bottom: .35rem; }
button.copy {
  position: absolute; top: .45rem; right: .45rem; padding: .15rem .55rem; font-size: .8125rem; font-weight: 500;
  background: var(--sky); color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; opacity: 0; transition: opacity .15s;
}
.code-wrap:hover button.copy, button.copy:focus-visible { opacity: 1; }
@media (hover: none) { button.copy { opacity: 1; } }
button.copy:hover { background: var(--sky); color: var(--ink); border-color: var(--ink); }

.prose .table { overflow-x: auto; margin: 0 0 1.1em; }
.prose table { border-collapse: collapse; font-size: .9375rem; min-width: 60%; }
.prose th, .prose td { text-align: left; padding: .45rem 1rem .45rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-weight: 600; border-bottom-color: var(--wire); }
.prose .center { text-align: center; }
.prose .right { text-align: right; font-variant-numeric: tabular-nums; }
.prose h2[id], .prose h3[id], .prose h4[id] { scroll-margin-top: 1.5rem; }

.topics, .post-tags { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0 0 1rem; font-size: .9375rem; }
.topics a, .post-tags a { color: var(--muted); }
.topics a:hover, .post-tags a:hover { color: var(--signal); }
.post-tags { margin: .6rem 0 0; }

.tips { margin: 0; display: grid; gap: .6rem; }
.tips div { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
.tips dt { font-weight: 500; min-width: 3rem; }
.tips dd { margin: 0; min-width: 0; max-width: 100%; }
.tips code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .875rem; background: var(--field); padding: .2em .45em; border-radius: 3px; overflow-wrap: anywhere; }
.tips button.copy { position: static; opacity: 1; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.subhead { font-size: 1rem; font-weight: 600; margin: 1rem 0 -.25rem; }
.tips div { display: grid; grid-template-columns: minmax(3rem, auto) 1fr; }
.tips dd { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.tips code { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 520px) {
  .tips div { grid-template-columns: 1fr; }
  .tips code { font-size: .75rem; white-space: normal; overflow-wrap: anywhere; }
}

/* top bar */
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.5rem 0 0; }
.top .site { font-weight: 600; text-decoration: none; letter-spacing: -.01em; }
.top nav { display: flex; gap: 1.25rem; font-weight: 500; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }

/* advisories */
.cves { margin-left: .75rem; }
.cves a { color: var(--muted); font-variant-numeric: tabular-nums; }
.cves a:hover { color: var(--signal); }
.adv-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .75rem 1.5rem; margin-bottom: 1rem; }
.adv-controls .tabs { flex-wrap: wrap; gap: .25rem 1.25rem; }
.count { margin: 0; color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.advisories { width: 100%; border-collapse: collapse; }
.advisories th { text-align: left; font-weight: 600; font-size: .9375rem; padding: 0 1.5rem .6rem 0; border-bottom: 1px solid var(--wire); }
.advisories th a { text-decoration: none; color: var(--muted); }
.advisories th a:hover, .advisories th[aria-sort] a { color: var(--ink); }
.advisories .arrow { margin-left: .3rem; }
.advisories td { padding: .7rem 1.5rem .7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.advisories td:last-child, .advisories th:last-child { padding-right: 0; }
.advisories td.num { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9375rem; }
.advisories td.cve { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .9375rem; }
.advisories td.title a { font-weight: 500; }
.empty-note { color: var(--muted); }
@media (max-width: 640px) {
  .advisories thead { display: none; }
  .advisories tr { display: grid; grid-template-columns: auto 1fr; gap: .1rem 1rem; padding: .75rem 0; border-bottom: 1px solid var(--rule); }
  .advisories td { border: 0; padding: 0; }
}

/* admin additions */
.pill { display: inline-block; margin-left: .4rem; padding: 0 .45rem; font-size: .8125rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--muted); }
.advisory-fields { border: 1px solid var(--rule); border-radius: 4px; padding: .9rem 1rem 1rem; margin: 0; display: grid; gap: .9rem; }
.advisory-fields legend { font-weight: 600; font-size: .9375rem; padding: 0 .35rem; }

/* home: two columns */
.frame { max-width: 74rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .frame { padding: 0 2.5rem; } }
.home-grid { display: grid; grid-template-columns: minmax(0, 25rem) minmax(0, 1fr); margin-top: clamp(2.5rem, 8vh, 5rem); padding-bottom: 3rem; }
.identity { padding-right: clamp(2rem, 5vw, 5rem); }
.identity .intro { margin: 0 0 2rem; }
.identity .name { font-size: clamp(3rem, 6.2vw, 4.75rem); overflow-wrap: anywhere; }
.identity .block { margin-top: 2.5rem; }
.identity .foot { margin-top: 4rem; padding-bottom: 0; }
.stream { border-left: 1px solid var(--rule); padding-left: clamp(2rem, 5vw, 5rem); min-height: 60vh; }
.stream > h2 { font-size: 1rem; font-weight: 600; color: var(--muted); margin: .6rem 0 .9rem; }
.entries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); max-width: 46rem; }
.entry { padding: 1.15rem 0 1.2rem; border-bottom: 1px solid var(--rule); }
.entry-link { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; text-decoration: none; }
.entry-link .t { font-size: 1.1875rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.35; }
.entry-link time { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry-link:hover time { color: inherit; }
.excerpt { margin: .4rem 0 0; color: var(--muted); font-size: .9375rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 40rem; }
.entry-cves { margin: .4rem 0 0; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 880px) {
  .home-grid { grid-template-columns: 1fr; margin-top: 2rem; }
  .identity { padding-right: 0; display: contents; }
  .identity .intro, .identity .about { order: 0; }
  .stream { border-left: 0; padding-left: 0; min-height: 0; margin-top: 2.5rem; order: 1; }
  .identity .block { order: 2; }
  .identity .foot { order: 3; margin-top: 3rem; padding-bottom: 2.5rem; }
}
@media (max-width: 480px) { .entry-link { flex-direction: column; gap: .15rem; } }
.top.frame { padding-top: 1.5rem; }
.identity .name { font-size: clamp(2.75rem, 4.4vw, 4.25rem); }
.identity .tips div { grid-template-columns: 1fr; gap: .3rem; }
.identity .tips code { white-space: normal; overflow-wrap: anywhere; font-size: .8125rem; }
@media (max-width: 880px) { .identity .name { font-size: clamp(3rem, 12vw, 4.25rem); } }
.identity .tips code { font-size: .75rem; letter-spacing: -.01em; }
.topics-label { color: var(--muted); }

/* advisory labels */
:root { --sev-critical: #9e1f45; --sev-high: #b0471d; --sev-medium: #8a6a0c; --sev-low: #2f6690; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --sev-critical: #f07a9b; --sev-high: #f0a070; --sev-medium: #e0c060; --sev-low: #7fb6e6; }
}
:root[data-theme="dark"] { --sev-critical: #f07a9b; --sev-high: #f0a070; --sev-medium: #e0c060; --sev-low: #7fb6e6; }
.sev { font-weight: 600; }
.sev::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; margin-right: .4rem; vertical-align: .08em; }
.sev-critical { color: var(--sev-critical); }
.sev-high { color: var(--sev-high); }
.sev-medium { color: var(--sev-medium); }
.sev-low { color: var(--sev-low); }
.sev-info, .sev-none { color: var(--muted); }
.score { color: inherit; font-weight: 500; }
.advisories td.severity, .advisories td.status, .advisories td.class { white-space: nowrap; font-size: .9375rem; }
/* Same content width as .frame (74rem minus its 2.5rem side padding), so edges line up with the top bar. */
.wide-page .wrap.wide { max-width: 69rem; }
select { font: inherit; color: inherit; width: 100%; padding: .5rem .6rem; background: var(--field); border: 1px solid var(--rule); border-radius: 4px; font-weight: 400; }
.quad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 720px) { .quad { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .advisories tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; }
  .advisories td.title { order: -1; flex-basis: 100%; padding: 0 0 .2rem; }
  .advisories td.cve { white-space: normal; }
  .advisories td.cve .cve-id { display: inline; margin-right: .6rem; }
}
.quad input, .quad select { height: 2.6rem; padding-top: 0; padding-bottom: 0; }
.advisories td.cve .cve-id { display: block; }

/* theme switch */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; margin: -.35rem -.35rem -.35rem 0; background: none; border: 0; border-radius: 50%; color: var(--muted); cursor: pointer; }
.theme-toggle:hover { background: var(--field); color: var(--ink); border: 0; }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.top nav { align-items: center; }
.admin-nav .theme-toggle { margin: 0; }

.advisories th:not(:has(a)) { color: var(--muted); }
.advisories td.affected { font-size: .9375rem; min-width: 7rem; }
.advisories th { vertical-align: bottom; white-space: nowrap; }
@media (max-width: 640px) { .advisories td.affected { min-width: 0; } }

.advisories td .t-plain { font-weight: 500; }
.fieldset-note { margin: -.35rem 0 0; }
