/* FirstSignal website. Palette A (graphite) from docs/DESIGN_SYSTEM.md section 3.1.
   Red (flare) is a marker colour and is never used for text. No scripts, no web fonts. */

:root {
  color-scheme: light dark;
  --bg: #FBFBFC;
  --surface1: #F3F4F6;
  --surface2: #EAECEF;
  --divider: #DFE2E6;
  --dim: #C3C8CF;
  --text: #111317;
  --text2: #4A4F57;
  --text3: #5F656E;
  --flare: #C4282D;
  --key: #111317;
  --on-key: #FFFFFF;
  --carbon: #0E0F11;
  --paper: #FBFBFC;
  --measure: 40rem;
  --wide: 64rem;
  --gutter: 1.25rem;
  --radius: 1rem;
  --radius-key: 0.75rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0F11;
    --surface1: #16171A;
    --surface2: #1E2024;
    --divider: #25272B;
    --dim: #40444B;
    --text: #E8EAED;
    --text2: #A3A8B0;
    --text3: #8E949D;
    --flare: #F2555A;
    --key: #E8EAED;
    --on-key: #0E0F11;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text2: var(--text);
    --text3: var(--text);
    --divider: var(--text3);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 100%/1.6 var(--font);
  font-optical-sizing: auto;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.wrap-wide {
  max-width: calc(var(--wide) + 2 * var(--gutter));
}

/* Skip link: off screen until it has keyboard focus. */
.skip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  padding: 0.75rem 1rem;
  background: var(--key);
  color: var(--on-key);
  border-radius: var(--radius-key);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* Links: monochrome, always underlined, instant press feedback. */
a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--text3);
  text-decoration-thickness: 0.075em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--text);
}

a:active {
  opacity: 0.6;
}

a:focus-visible,
.shots-scroll:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 0.25rem;
  text-decoration-color: var(--text);
}

/* Top bar. Static, not sticky: nothing floats over the text. */
.bar {
  border-bottom: 1px solid var(--divider);
}

.bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1.5rem;
  padding-block: 0.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 3rem;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-block;
  padding-block: 0.75rem;
  color: var(--text2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-decoration-color: var(--text);
}

.nav a[aria-current="page"] {
  font-weight: 600;
}

/* Type */
h1 {
  margin: 0;
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0.75rem 0 0;
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.375rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.meta,
.small {
  color: var(--text2);
}

.small {
  font-size: 0.9375rem;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.875em;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

/* Home */
.hero {
  padding-block: 3rem 2rem;
}

.hero .mark {
  display: block;
  width: 5rem;
  height: 5rem;
  margin-bottom: 1.5rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 1.75rem 0 0;
}

.status {
  margin: 0;
  color: var(--text2);
  font-size: 0.9375rem;
}

/* Store availability: plain labels, not buttons, until a listing exists. */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.store {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.5rem 1.125rem;
  background: var(--surface1);
  border: 1px solid var(--divider);
  border-radius: var(--radius-key);
  line-height: 1.25;
}

.store-state {
  color: var(--text2);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.store-name {
  font-weight: 600;
}

/* The one primary key per page: monochrome, instant press feedback. */
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.625rem 1.25rem;
  background: var(--key);
  color: var(--on-key);
  border-radius: var(--radius-key);
  font-weight: 600;
  text-decoration: none;
  transition: transform 100ms ease-out;
}

.key:hover {
  color: var(--on-key);
}

.key:active {
  opacity: 1;
  transform: scale(0.97);
}

.key:focus-visible {
  outline-offset: 3px;
  border-radius: var(--radius-key);
}

/* Screenshots: a scroll strip on narrow screens, a row of three on wide ones. */
.gallery {
  padding-block: 0.5rem 1rem;
}

.shots-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62vw, 17rem);
  gap: 1rem;
  margin: 0;
  padding: 0.25rem 0 1rem;
  list-style: none;
}

.shots li {
  scroll-snap-align: start;
}

.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--surface1);
}

.shot figcaption {
  margin-top: 0.625rem;
  color: var(--text2);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.shot figcaption strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

@media (min-width: 48rem) {
  .shots-scroll {
    overflow: visible;
  }

  .shots {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-columns: auto;
    gap: 1.5rem;
  }

  .shots-two {
    grid-template-columns: repeat(2, minmax(0, 17rem));
  }
}

.points {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--divider);
}

.points li {
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--divider);
}

.points h2 {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.points p {
  margin: 0.375rem 0 0;
  color: var(--text2);
}

.note {
  margin: 1.5rem 0 0;
  color: var(--text2);
}

.contact {
  padding-block: 2.5rem 1rem;
}

.contact h2 {
  margin: 0;
}

.contact dl {
  margin: 1rem 0 0;
}

.contact dt {
  color: var(--text2);
  font-size: 0.9375rem;
}

.contact dd {
  margin: 0 0 1rem;
  font-weight: 500;
}

.contact dd a {
  display: inline-block;
  padding-block: 0.625rem;
}

/* Inner pages */
.page {
  padding-block: 2.5rem 2rem;
}

.page h1 {
  font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem);
}

.page h2 {
  margin: 2.75rem 0 0;
}

.page h3 {
  margin: 2rem 0 0;
}

.page p,
.page ul,
.page ol,
.page dl {
  margin: 0.75rem 0 0;
}

.page ul,
.page ol {
  padding-inline-start: 1.25rem;
}

.page li + li {
  margin-top: 0.5rem;
}

.page hr {
  margin: 2.5rem 0 0;
  border: 0;
  border-top: 1px solid var(--divider);
}

.page .gallery {
  margin-top: 1.5rem;
  padding: 0;
}

.page .shots,
.page .assets {
  padding-inline-start: 0;
}

.page .shots li {
  margin: 0;
}

.callout {
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  background: var(--surface1);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.75rem;
}

/* Lane glyphs, drawn as in the app: Priority a red beacon, This week a grey triangle,
   For awareness a hollow ring. The word always follows the glyph. */
.lanes {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--divider);
}

.page .lanes {
  padding-inline-start: 0;
}

.page .lanes li {
  margin: 0;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--divider);
}

.page .lane {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.glyph {
  flex: none;
  display: inline-block;
  width: 1rem;
  height: 1rem;
}

.glyph-priority {
  border: 2px solid var(--flare);
  border-radius: 50%;
  background: var(--flare);
  box-shadow: inset 0 0 0 0.1875rem var(--bg);
}

.glyph-week {
  background: var(--text2);
  clip-path: polygon(50% 6%, 100% 94%, 0 94%);
}

.glyph-aware {
  border: 2px solid var(--text3);
  border-radius: 50%;
}

.lanes p {
  color: var(--text2);
}

/* Exploitation track: one dot per signal on a timeline, the KEV line at the end. */
.track {
  position: relative;
  padding: 0;
  list-style: none;
}

.page .track {
  padding-inline-start: 0;
}

.page .track li {
  position: relative;
  margin: 0;
  padding: 0 0 1.25rem 2rem;
}

.track li::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: 0.3125rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--text);
}

.track li::after {
  content: "";
  position: absolute;
  top: 1.35em;
  bottom: 0;
  left: 0.5625rem;
  width: 2px;
  background: var(--text3);
}

.track li:last-child::after {
  display: none;
}

.track .first::before {
  top: 0.3em;
  left: 0.1875rem;
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid var(--flare);
  background: var(--flare);
  box-shadow: inset 0 0 0 0.1875rem var(--bg);
}

.track .kev::before {
  top: 0.15em;
  left: 0.5rem;
  width: 3px;
  height: 1.2em;
  border-radius: 1px;
  background: var(--text);
}

.track time,
.track .when {
  display: block;
  color: var(--text2);
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: -0.01em;
}

.track strong {
  font-weight: 600;
}

/* Definition lists on Support and Security */
.facts dt {
  margin-top: 1rem;
  font-weight: 600;
}

.facts dd {
  margin: 0.25rem 0 0;
  color: var(--text2);
}

/* Frequently asked questions: native disclosure, no script. */
.faq {
  margin-top: 1rem;
  border-top: 1px solid var(--divider);
}

.faq details {
  border-bottom: 1px solid var(--divider);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding-block: 0.875rem;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-inline-end: 0.25rem;
  border-right: 2px solid var(--text2);
  border-bottom: 2px solid var(--text2);
  transform: rotate(45deg) translateY(-0.15rem);
}

.faq details[open] > summary::after {
  transform: rotate(-135deg) translateY(-0.15rem);
}

.faq summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.faq details > :not(summary) {
  margin: 0 0 1rem;
  color: var(--text2);
}

/* Licence and attribution text: quoted as written, never paraphrased. */
.source {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--divider);
}

.sources {
  margin-top: 1rem;
  border-top: 1px solid var(--divider);
}

.page .source h3 {
  margin: 0;
}

.source p {
  color: var(--text2);
}

.licence {
  margin: 0.75rem 0 0;
  padding: 1rem 1.25rem;
  background: var(--surface1);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.55;
}

.licence p {
  margin: 0;
  color: var(--text);
}

.licence p + p {
  margin-top: 0.75rem;
}

/* Press kit */
.assets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.page .assets li {
  margin: 0;
}

.preview {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  padding: 1.25rem;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
}

.preview img {
  display: block;
  max-width: 100%;
  max-height: 7rem;
  width: auto;
  height: auto;
}

.on-carbon {
  background: var(--carbon);
}

.on-paper {
  background: var(--paper);
}

.asset-name {
  margin: 0.625rem 0 0;
  font-weight: 600;
}

.page .assets ul {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.page .assets ul li + li {
  margin-top: 0;
}

.assets ul a {
  display: inline-block;
  padding-block: 0.375rem;
}

/* Footer */
.foot {
  margin-top: 2.5rem;
  border-top: 1px solid var(--divider);
  color: var(--text3);
  font-size: 0.9375rem;
}

.foot .wrap {
  padding-block: 1.25rem 2rem;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot a {
  display: inline-block;
  padding-block: 0.75rem;
  color: var(--text2);
}

.foot p {
  margin: 0.5rem 0 0;
}

/* Padded links already have room around the text: keep their focus ring off the neighbours. */
.contact dd a:focus-visible,
.foot a:focus-visible,
.nav a:focus-visible,
.assets ul a:focus-visible,
.brand:focus-visible {
  outline-offset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .key {
    transition: none;
  }

  .key:active {
    transform: none;
    opacity: 0.8;
  }

  .shots-scroll {
    scroll-snap-type: none;
  }
}

@media print {
  .bar .nav,
  .skip,
  .foot ul {
    display: none;
  }
}
