/* The advisories page (/advisories). Tokens live in base.css; pills, chips, the stats
   ticker and the inverted band come from app.css. */

.adv-page .d1 { --i: 1; }
.adv-page .d2 { --i: 2; }

/* ------------------------------------------------------------ hero */
.adv-hero {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 56px; align-items: center;
  padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 88px);
}
.adv-copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; }
.adv-copy .kicker { margin: 0; }
.adv-hero h1 { font-size: clamp(50px, 8.6cqi, 116px); }
.adv-hero h1 em { display: block; padding-left: 0.04em; }
.adv-hero .lede { font-size: clamp(16px, 1.5cqi, 19px); line-height: 1.65; color: var(--text); margin: 0; }
.adv-hero .lede a { color: var(--ink); }

/* subscribe: three feed rows, hairline ruled, a vermilion bar on hover */
.subscribe { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 620px; border-bottom: 1px solid var(--line); }
.feed { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); position: relative; }
.feed::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 1px; background: var(--signal);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.feed:hover::before, .feed:focus-within::before { transform: scaleX(1); }
.feed a { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 18px; padding: 15px 0; text-decoration: none; }
.feed .fk { font-family: var(--serif); font-size: 24px; font-weight: 300; letter-spacing: -0.015em; color: var(--ink); min-width: 4.6em; transition: color .3s; }
.feed a:hover .fk { color: var(--signal); }
.feed .fu { min-width: 0; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .fc {
  flex: none; height: 30px; padding: 0 12px; border: 1px solid var(--line-2); background: transparent; cursor: pointer;
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
  transition: border-color .25s, background-color .25s, color .25s;
}
.feed .fc:hover { border-color: var(--ink); }
.feed .fc.ok { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.sub-note { margin: -12px 0 0; font-size: 13.5px; color: var(--muted); }

/* the scope: one blip per advisory */
.scope-wrap { container-type: inline-size; min-width: 0; display: grid; justify-items: center; gap: 6px; }
.scope { width: 100%; max-width: 460px; height: auto; display: block; overflow: visible; }
.scope .ring { fill: none; stroke: var(--line-2); stroke-width: 1; }
.scope .ring-2 { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 6; }
.scope .axis { stroke: var(--line); stroke-width: 1; }
.scope .ticks line { stroke: var(--line-2); stroke-width: 1; }
.scope .arm { transform-origin: 200px 200px; animation: sweep 11s linear infinite; }
.scope .arm path { fill: url(#advfade); }
.scope .arm line { stroke: var(--ink); stroke-width: 1; opacity: 0.5; }
.scope .fade-0 { stop-color: var(--ink); stop-opacity: 0.11; }
.scope .fade-1 { stop-color: var(--ink); stop-opacity: 0; }
.scope .pt .dot { fill: var(--c, var(--unknown)); stroke: var(--bg); stroke-width: 1.5; transition: r .3s var(--ease); }
.scope .pt.cleared .dot { fill: var(--bg); stroke: var(--c); stroke-width: 1.25; }
.scope .pt:hover .dot, .scope .pt:focus .dot { r: 6; }
.scope .pt .ping { fill: none; stroke: var(--c); animation: ping 2.4s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
.scope .hub { fill: var(--bg); stroke: var(--line-2); stroke-width: 1; }
.scope .core-n { font-family: var(--serif); font-weight: 300; font-size: 24px; fill: var(--ink); letter-spacing: -0.02em; }
.scope-cap { margin: 0; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }

@media (max-width: 900px) {
  .adv-hero { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .scope-wrap { max-width: 380px; justify-self: center; width: 100%; }
}

/* ------------------------------------------------------------ stats */
.adv-stats > div.l-malicious .l::before,
.adv-stats > div.l-suspicious .l::before,
.adv-stats > div.l-benign .l::before,
.adv-stats > div.l-unknown .l::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c);
  margin-right: 8px; vertical-align: 1px;
}
.adv-stats > div.l-malicious .n { color: var(--malicious); }

/* ------------------------------------------------------------ the latest advisory (inverted band) */
.latest { margin-top: clamp(64px, 9vw, 112px); position: relative; scroll-margin-top: 72px; }
.latest::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--c, var(--signal));
}
.latest-in { max-width: var(--wide); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 0.32fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 96px); }
.latest-date { display: grid; align-content: start; gap: 6px; }
.latest-date .kicker { margin-bottom: 18px; }
.latest-date .big {
  margin: 0; font-family: var(--serif); font-weight: 200; font-size: clamp(96px, 14vw, 184px);
  line-height: 0.82; letter-spacing: -0.05em; color: var(--ink); font-variant-numeric: lining-nums;
}
.latest-date .mon { margin: 8px 0 16px; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.latest-body { display: grid; gap: 22px; align-content: start; min-width: 0; }
.latest-body h2 {
  margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.02; letter-spacing: -0.03em; color: var(--ink); text-wrap: balance;
}
.latest-body .text { margin: 0; font-size: clamp(16px, 1.4vw, 18.5px); line-height: 1.7; color: var(--text); }
.latest .perma { margin: 0; }
@media (max-width: 760px) {
  .latest-in { grid-template-columns: 1fr; }
  .latest-date { grid-template-columns: auto 1fr; align-items: end; column-gap: 18px; }
  .latest-date .kicker { grid-column: 1 / -1; }
  .latest-date .big { grid-row: span 2; }
  .latest-date .mon { margin: 0; }
}

/* ------------------------------------------------------------ archive */
.adv-list { margin-top: clamp(72px, 10vw, 128px); }
.list-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: end; margin-bottom: 36px; }
.list-head .kicker { grid-column: 1 / -1; margin: 0 0 -6px; }
.list-head h2 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 5cqi, 60px); letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.list-head .filters { margin: 0; }
.filters a.chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.filters .chip .n { color: var(--dim); }
.filters .chip.on .n { color: inherit; opacity: 0.6; }
.filters .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.filters .dot.l-cleared { --c: var(--benign); }
.filters .chip.split { margin-left: 14px; position: relative; }
.filters .chip.split::before { content: ""; position: absolute; left: -11px; top: 22%; bottom: 22%; width: 1px; background: var(--line-2); }
@media (max-width: 760px) { .list-head { grid-template-columns: 1fr; } }

.adv-timeline { list-style: none; margin: 0; padding: 0; }
.adv { display: grid; grid-template-columns: 104px 28px minmax(0, 1fr); column-gap: 18px; scroll-margin-top: 80px; }
.adv .when { padding-top: 4px; text-align: right; }
.adv time { display: grid; justify-items: end; gap: 4px; }
.adv .dd { font-family: var(--serif); font-weight: 300; font-size: 44px; line-height: 0.9; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: lining-nums; }
.adv .mm { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.adv .rail { position: relative; display: flex; justify-content: center; }
.adv .rail::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line); }
.adv:first-child .rail::before { top: 16px; }
.adv:last-child .rail::before { bottom: auto; height: 16px; }
.adv .pin {
  position: relative; flex: none; align-self: flex-start; margin-top: 10px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--c, var(--line-2));
}
.adv.l-malicious .pin { background: var(--c); }
.adv.l-malicious .pin::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--c);
  animation: ring 2.4s var(--ease) infinite;
}
.adv .card {
  display: grid; gap: 14px; padding: 2px 0 56px; min-width: 0;
}
.adv .rowline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.adv h3 {
  margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 3.2cqi, 38px);
  line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance;
}
.adv .text { margin: 0; font-size: 16px; line-height: 1.7; color: var(--text); }
.adv:target .card h3, .latest:target h2 { text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 1px; text-underline-offset: 8px; }
.perma { color: var(--dim); text-decoration: none; font-size: 11.5px; overflow-wrap: anywhere; }
.perma:hover { color: var(--ink); }
@media (max-width: 640px) {
  .adv { grid-template-columns: 18px minmax(0, 1fr); column-gap: 14px; }
  .adv .when { grid-column: 2; grid-row: 1; text-align: left; padding: 0 0 10px; }
  .adv time { justify-items: start; justify-content: start; grid-auto-flow: column; align-items: baseline; gap: 10px; }
  .adv .dd { font-size: 32px; }
  .adv .rail { grid-column: 1; grid-row: 1 / span 2; }
  .adv .card { grid-column: 2; padding-bottom: 44px; }
}

/* subjects: the exact commits an advisory names */
.subjects { display: grid; gap: 10px; }
.subjects .label { margin: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.subjects ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.subj {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 5px 10px; max-width: 100%;
  border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; transition: border-color .25s;
}
.subj:hover { border-color: var(--ink); }
.subj a { text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.subj .org { color: var(--muted); }
.subj .v { color: var(--dim); font-size: 11.5px; }
.subj .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.subjects .more summary { cursor: pointer; width: fit-content; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.subjects .more summary:hover { color: var(--ink); }
.subjects .more ul { margin-top: 8px; }

/* folds: how it was verified, evidence */
.fold { border-top: 1px solid var(--line); }
.fold + .fold { border-top-style: dashed; }
.fold summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  transition: color .2s;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: "+"; width: 10px; font-size: 14px; color: var(--ink); transition: transform .35s var(--ease); }
.fold[open] summary::before { transform: rotate(45deg); }
.fold summary:hover { color: var(--ink); }
.fold p { margin: 0 0 14px; font-size: 15px; line-height: 1.7; color: var(--text); }
.fold .adv-evidence { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.fold .adv-evidence li { display: grid; gap: 4px; padding-left: 14px; border-left: 1px solid var(--line-2); font-size: 14.5px; }
.fold .adv-evidence .rw { color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.adv-empty { margin: 0; padding: 32px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------ cleared: flags a person found wrong */
.adv-cleared { margin-top: clamp(40px, 6vw, 72px); padding-top: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line-2); scroll-margin-top: 72px; }
.adv-cleared .list-head { margin-bottom: 14px; }
.adv-cleared h2 { font-size: clamp(28px, 4cqi, 44px); }
.adv-cleared h2 .count { font-size: 13px; letter-spacing: 0.1em; color: var(--muted); vertical-align: 0.6em; margin-left: 6px; }
.adv-cleared .clr-feed { text-decoration: none; }
.clr-lede { margin: 0 0 28px; font-size: 15.5px; line-height: 1.65; color: var(--muted); }
.clr-lede b { font-weight: 500; color: var(--unknown); }
.clr-list { list-style: none; margin: 0; padding: 0; }
.clr {
  display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 46px;
  padding: 24px 0 8px; border-top: 1px solid var(--line); scroll-margin-top: 80px;
}
.clr time { padding-top: 5px; text-align: right; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.clr .card { display: grid; gap: 12px; min-width: 0; padding-bottom: 16px; }
.clr .rowline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.clr h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2.2cqi, 25px); line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.clr .text { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text); }
.clr:target h3 { text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 1px; text-underline-offset: 6px; }
@media (max-width: 640px) {
  .clr { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .clr time { text-align: left; padding: 0; }
}

/* ------------------------------------------------------------ how it works */
.adv-how { margin-top: clamp(56px, 8vw, 104px); }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 0 32px; }
.how-grid > div { padding: 22px 0 8px; border-top: 1px solid var(--line-2); position: relative; }
.how-grid > div::before { content: ""; position: absolute; top: -1px; left: 0; width: 32px; height: 1px; background: var(--signal); }
.how-grid h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: -0.01em; color: var(--ink); }
.how-grid p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
