:root {
  color-scheme: dark;
  --base: #080711;
  --ink: #f5f2fc;
  --muted: #beb8ce;
  --line: #28243b;
  --panel: #110f1d;
  --iris: #bb8fff;
  --accent: var(--iris);
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
  font-family: "Avenir Next", system-ui, sans-serif;
  color: var(--ink);
  background: var(--base);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
a, button { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #cdadff; outline-offset: 4px; }
.shell { width: min(1080px, calc(100% - 84px)); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; z-index: 4; top: 8px; left: 8px; padding: 8px; background: var(--panel); transform: translateY(-150%); }
.skip:focus { transform: none; }

.header {
  display: grid; place-items: center; min-height: 94px;
  background: radial-gradient(ellipse 258px 128px at 50% 0%, #3e1a6b80, transparent);
  border-bottom: 1px solid #211931;
}
.brand { margin: 0; color: #f7efff; font-size: 2.55rem; line-height: 1; font-weight: 760; letter-spacing: -.095em; }
.brand span { color: #bb8dff; text-shadow: 0 0 23px #a15cffaa; }

main {
  background: radial-gradient(ellipse 700px 580px at 50% 0%, #1c103066, transparent);
}
.archive { padding-block: 23px 40px; min-height: 460px; scroll-margin-top: 12px; }
.toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-bottom: 17px; border-bottom: 1px solid #292138; margin-bottom: 13px;
}
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; border: 0; padding: 0; min-inline-size: 0; }
.filters label { position: relative; cursor: pointer; }
.filters input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filters span {
  min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 5px 12px;
  border: 1px solid #2f2743; border-radius: 8px; color: var(--muted);
  font-size: .875rem; font-weight: 610; background: #13101e;
}
.filters label[data-kind] span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent), transparent 40%);
}
.filters label:hover span { border-color: #77628e; color: var(--ink); }
.filters input:checked + span { border-color: #9a62df; color: #f3e7ff; background: #311c4e; }
.filters input:focus-visible + span { outline: 2px solid #c3a5ff; outline-offset: 3px; }
[data-kind="attack"] { --accent: #ff7082; --tint: #2a111e; }
[data-kind="vulnerability"] { --accent: #c59bff; --tint: #201433; }
[data-kind="outage"] { --accent: #79c7ff; --tint: #112439; }

.search {
  color: var(--muted); display: flex; align-items: center; gap: 12px;
  min-height: 42px; width: min(100%, 248px);
  border-radius: 8px; border: 1px solid var(--line); background: #12101d; padding-inline: 13px;
}
.search:focus-within { border-color: #b497e8; }
.search input { width: 100%; min-width: 0; padding-block: 8px; border: 0; outline: none; background: transparent; color: var(--ink); font-size: .94rem; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search-icon { position: relative; flex: 0 0 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; margin-right: 2px; }
.search-icon::after { position: absolute; content: ""; width: 5px; height: 1.5px; background: currentColor; right: -4px; bottom: -2px; transform: rotate(45deg); }

.timeline {
  --timeline-columns: 2;
  --card-width: calc(50% - clamp(76px, 11vw, 132px));
  position: relative;
  isolation: isolate;
}
.timeline:has(.timeline-row) {
  background:
    radial-gradient(ellipse 480px 780px at 52% 360px, #21143c80, transparent),
    radial-gradient(ellipse 380px 690px at 23% 660px, #17274645, transparent);
}
.events { position: relative; z-index: 1; margin: 0; padding: 0; list-style: none; }
.timeline-row { position: absolute; top: 0; left: 0; width: var(--card-width); }
.timeline-row[data-side="right"] { left: auto; right: 0; }
.laser { position: absolute; inset: 0 auto auto 0; display: block; width: 100%; pointer-events: none; }

.event-card {
  position: relative; display: block; min-width: 0; padding: 13px 46px 14px 16px;
  text-decoration: none; border: 1px solid color-mix(in srgb, var(--accent), #191426 78%); border-radius: 11px;
  background: linear-gradient(255deg, var(--tint), var(--panel) 76%);
  transition: border-color .18s, box-shadow .18s;
}
.timeline-row[data-side="right"] .event-card { background: linear-gradient(105deg, var(--tint), var(--panel) 76%); }
.event-card:hover, .event-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent), transparent 82%);
}
.event-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: center; font-size: .85rem; color: var(--muted); }
.kind {
  display: inline-flex; align-items: center; width: fit-content;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 60%);
  border-radius: 5px; padding: 2px 7px; color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 91%); font-weight: 650;
}
.event-card h2 { margin: 7px 0 4px; font-size: clamp(1.13rem, 2.1vw, 1.32rem); line-height: 1.2; letter-spacing: -.027em; }
.event-card p { margin: 0; line-height: 1.48; color: #c9c2d5; font-size: 1rem; }
.event-cve { font: .76rem var(--mono); color: #d9c8f1; }
.card-open {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  display: grid; place-items: center; width: 26px; height: 26px;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 65%);
  border-radius: 6px; color: var(--accent); font: 1.13rem var(--mono);
}
.feed-state { padding: 22px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.feed-end { margin-top: 16px; text-align: center; }
.action { border: 1px solid #5e4881; border-radius: 8px; background: #211833; padding: 9px 14px; cursor: pointer; }
.action:hover { border-color: var(--iris); }

dialog {
  color: var(--ink); width: min(690px, calc(100% - 24px)); max-height: calc(100% - 24px);
  border: 1px solid #5c4876; border-radius: 16px; padding: 0; background: #14111f;
  box-shadow: 0 8px 75px #000a, 0 0 38px #8b5cf631; overscroll-behavior: contain;
}
dialog::backdrop { background: #080611bc; backdrop-filter: blur(6px); }
body:has(dialog[open]) { overflow: hidden; }
.close {
  position: sticky; top: 12px; float: right; z-index: 1; margin: 12px 12px 0 0;
  width: 38px; height: 38px; line-height: 1; font-size: 1.55rem; cursor: pointer;
  border: 1px solid #5e4881; border-radius: 8px; background: #211833;
}
.event-detail { padding: 30px clamp(16px, 5vw, 38px) 33px; }
.event-detail h2 { clear: both; margin: 10px 0; line-height: 1.08; letter-spacing: -.035em; font-size: clamp(1.65rem, 4vw, 2.45rem); }
.event-detail h3 { margin: 20px 0 4px; font-size: 1rem; }
.event-detail p { margin: 0; line-height: 1.6; color: #c7bfd5; }
.event-detail .detail-date { padding-right: 40px; margin: 7px 0 0; }
.detail-links { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 0; padding: 0; list-style: none; }
.detail-links a { display: inline-block; padding: 6px 9px; border: 1px solid #4b3b65; border-radius: 6px; color: #e3ceff; font-size: .88rem; text-underline-offset: 3px; overflow-wrap: anywhere; }
.detail-links a:hover { background: #2b1e40; }

@media (max-width: 740px) {
  .shell { width: calc(100% - 32px); }
  .header { min-height: 75px; }
  .brand { font-size: 2.2rem; }
  .archive { padding-top: 15px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; padding-bottom: 12px; }
  .search { width: 100%; order: -1; }
  .filters { gap: 5px; }
  .filters span { min-height: 36px; padding-inline: 8px; }
  .timeline { --timeline-columns: 1; --card-width: calc(100% - 48px); }
  .timeline:has(.timeline-row) {
    background: radial-gradient(ellipse 240px 680px at 25px 330px, #26163d87, transparent);
  }
  .event-card { padding-inline: 12px 37px; }
  .card-open { right: 9px; width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .event-card { transition: none; }
}
