/* www.risksignal.eu (spec 6.13, 18e FR-227, 24b FR-274). The editorial look of ADR 0044:
   paper ground, Newsreader for headings and the wordmark, IBM Plex Sans for
   the text, hairlines instead of boxes, and the headline as plain text.
   Tokens as in docs/prototype/risk-signal-b.html, light here and dark
   by prefers-color-scheme. Every colour is a token in the two blocks below.
   No inline styles: the CSP forbids them (ADR 0020). */

/* Newsreader, IBM Plex Sans and IBM Plex Mono (all OFL-1.1, licences next
   to the files) come from the @fontsource packages and are served from this
   host, so the CSP keeps font-src 'self'. */

@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/newsreader-latin-ext-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens (ADR 0044): paper, ink in three steps, the hairlines, the four
   state colours and the highlighter. */

:root {
  --paper: #fbfaf7;
  --rail: #f2f0ea;
  --ink: #1c1b17;
  --ink-2: #57534a;
  --ink-3: #6f695e;
  --rule: #e2ddd1;
  --rule-strong: #1c1b17;
  --field: #8a8270;
  --hover: #f4f1ea;
  --critical: #b3261e;
  --critical-bg: #fbe9e6;
  --critical-ink: #ffffff;
  --high: #975300;
  --high-bg: #fdf0dc;
  --ok: #2f6b3a;
  --ok-bg: #e7f1e6;
  --info: #2b5c8a;
  --focus: #2b5c8a;
  --display: "Newsreader Variable", "Newsreader", "Iowan Old Style", "Georgia", serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161512;
    --rail: #1d1c18;
    --ink: #ece8de;
    --ink-2: #b9b3a5;
    --ink-3: #8f897c;
    --rule: #34312a;
    --rule-strong: #ece8de;
    --field: #757064;
    --hover: #221f1a;
    --critical: #f0705f;
    --critical-bg: #3a1a16;
    --critical-ink: #1a0a08;
    --high: #f0a840;
    --high-bg: #35260f;
    --ok: #7fbf86;
    --ok-bg: #1c2b1d;
    --info: #8ab8e3;
    --focus: #8ab8e3;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  text-wrap: balance;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header: the wordmark on the left, the language and the form on the right. */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--rule);
}

/* The wordmark: Newsreader 600 (spec 18e FR-224). */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}

.brand b {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

.bar nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.bar nav a:not(.small) {
  color: var(--ink-2);
  text-decoration: none;
}

.bar nav a:not(.small):hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Buttons: ink on paper, no colour (ADR 0044). */

.primary,
.small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
}

.small {
  min-height: 34px;
  padding: 0 14px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.primary:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
}

.small:hover {
  background: var(--hover);
}

/* Hero: the claim and the form on the left, the example on the right. */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 72px;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.lede {
  max-width: 34em;
  margin: 0 0 28px;
  color: var(--ink-2);
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.5;
}

/* The waitlist form */

.join {
  display: grid;
  gap: 10px;
  max-width: 460px;
}

.join label[for] {
  font-size: 14px;
  font-weight: 500;
}

.join input[type="email"] {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--field);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.join input[type="email"]:hover {
  border-color: var(--ink);
}

.join input[type="email"][aria-invalid="true"] {
  border-color: var(--critical);
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.45;
}

.consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

.join .primary {
  justify-self: start;
  margin-top: 4px;
}

/* Robots fill this in; people never see it. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.error {
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--critical);
  color: var(--critical);
  font-weight: 500;
}

/* The hero's example: one vulnerability followed from the CVE to the report.
   A figure with a strong rule on top, hairlines between the steps, no box;
   the step a stripe marks also says its level in words (spec 18e FR-231). */

.chain {
  margin: 0;
  padding: 14px 0 0;
  border-top: 4px solid var(--rule-strong);
}

.chain-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.chain-title {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
}

.chain-note {
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chain ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule-strong);
}

.chain li {
  display: grid;
  grid-template-columns: minmax(96px, 0.32fr) minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 12px 0 12px 14px;
  border-bottom: 1px solid var(--rule);
  border-left: 6px solid transparent;
}

.chain li.critical {
  border-left-color: var(--critical);
}

.chain li.high {
  border-left-color: var(--high);
}

.step {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chain b {
  display: block;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
}

.chain small {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.4;
}

.chain .mono {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
}

.chip {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  vertical-align: 3px;
}

.chip.kev {
  background: var(--critical);
  color: var(--critical-ink);
}

/* Features with screenshots from the app */

.section {
  padding-top: 56px;
  padding-bottom: 72px;
  border-top: 1px solid var(--rule-strong);
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
}

.intro {
  max-width: 40em;
  margin: 0 0 48px;
  color: var(--ink-2);
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.5;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}

.feature:last-child {
  margin-bottom: 0;
}

.feature p {
  margin: 0;
  color: var(--ink-2);
}

.shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--rail);
}

/* The build status (spec 24b, FR-274): the status in words with a small
   marker in the severity colours, never a colour per module (ADR 0044). A
   filled square runs in the pilot, an amber one is in progress, a hollow one
   is planned; a module with only some parts running gets a half-filled one. */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 4px 0;
  border-bottom: 2px solid var(--rule-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--high);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.status::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--ink-3);
}

.status.pilot::before {
  border-color: var(--ok);
  background: var(--ok);
}

.status.partly::before {
  border-color: var(--ok);
  background: linear-gradient(135deg, var(--ok) 50%, transparent 50%);
}

.status.building::before {
  border-color: var(--high);
  background: var(--high);
}

.module-status {
  color: var(--ink);
  font-weight: 600;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: -24px 0 40px;
  font-size: 13.5px;
}

.legend div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.legend dt,
.legend dd {
  margin: 0;
}

.legend dd {
  color: var(--ink-3);
}

.modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 48px;
}

.module {
  padding-top: 12px;
  border-top: 4px solid var(--rule-strong);
}

.core > .module {
  margin-bottom: 56px;
  border-top: 0;
  padding-top: 0;
}

.module-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 16px;
  margin-bottom: 10px;
}

.module-head h2,
.module-head h3 {
  margin: 0;
}

.thought {
  max-width: 40em;
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.45;
}

.vision,
.today,
.module-note {
  max-width: 44em;
  margin: 0 0 10px;
  color: var(--ink-2);
}

.today b {
  color: var(--ink);
  font-weight: 600;
}

.module-note {
  padding-left: 10px;
  border-left: 3px solid var(--rule);
  color: var(--ink-3);
  font-size: 14px;
}

.parts {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule-strong);
}

.part {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 16px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}

.part .status {
  justify-self: end;
}

.ref {
  grid-column: 2;
  justify-self: end;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
}

.core .parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
}

h3.how {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
}

h4 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

.prose code {
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 14px;
}

/* Made for audits: four facts, each under its own rule, as the figures in
   the app. */

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 24px;
  margin: 40px 0 0;
}

.facts div {
  padding: 12px 0 0;
  border-top: 4px solid var(--rule-strong);
}

.facts dt {
  margin-bottom: 6px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
}

.facts dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
}

/* Closing call to the form */

.closing {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.closing p {
  max-width: 34em;
  margin: 0;
  color: var(--ink-2);
}

/* Footer */

.foot {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 13.5px;
}

.foot a {
  color: var(--ink-3);
}

/* Text pages: privacy, waitlist answers, 404 */

.note,
.prose {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px var(--gutter) 96px;
}

.note h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.note p {
  color: var(--ink-2);
  font-family: var(--display);
  font-size: 19px;
}

.note p.error {
  font-family: var(--body);
  font-size: 16px;
}

.note form:not(.join) {
  margin-top: 28px;
}

.prose h1 {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-strong);
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.prose h2 {
  margin-top: 36px;
  font-size: 24px;
}

.prose p,
.prose li {
  color: var(--ink-2);
}

@media (max-width: 960px) {
  .hero,
  .feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
  }

  .modules,
  .core .parts {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 16px;
  }

  .hero {
    padding-top: 28px;
  }

  /* The form is right under the header on a phone. */
  .bar .small {
    display: none;
  }

  .chain li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .part {
    grid-template-columns: minmax(0, 1fr);
  }

  .part .status,
  .ref {
    grid-column: 1;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: no-preference) {
  main {
    animation: rise 0.35s ease-out;
  }

  @keyframes rise {
    from {
      transform: translateY(6px);
    }

    to {
      transform: none;
    }
  }
}
