/* Vulnsift, the app. The landing page's colours and type; no framework, no script, nothing
   loaded from elsewhere. */

:root {
  color-scheme: light dark;

  --bg: #f8f7f2;
  --surface: #ffffff;
  --sunk: #f0eee6;
  --ink: #14171a;
  --soft: #3a4148;
  --muted: #5f6770;
  --rule: #dfdcd2;
  --accent: #0b6b53;
  --accent-strong: #08553f;
  --accent-soft: #e2f0eb;
  --on-accent: #ffffff;
  --dot: rgb(20 23 26 / 26%);
  --header: rgb(248 247 242 / 86%);

  /* A priority has a solid colour for a mark and a tinted pair for a chip. */
  --critical: #c2352b;
  --critical-ink: #8f1d15;
  --critical-bg: #fce9e5;
  --high: #d9741a;
  --high-ink: #8a4706;
  --high-bg: #fdeeda;
  --medium: #cfa81f;
  --medium-ink: #6b5300;
  --medium-bg: #faf2cc;
  --low: #98a1ab;
  --low-ink: #4c5660;
  --low-bg: #eceef0;

  --shadow: 0 1px 2px rgb(20 23 26 / 6%), 0 18px 40px -18px rgb(20 23 26 / 22%);
  --shadow-small: 0 1px 2px rgb(20 23 26 / 6%), 0 6px 16px -10px rgb(20 23 26 / 18%);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0f11;
    --surface: #14181b;
    --sunk: #101315;
    --ink: #ecebe6;
    --soft: #c8ccd0;
    --muted: #969ea7;
    --rule: #272c31;
    --accent: #5fd1aa;
    --accent-strong: #7fe0bd;
    --accent-soft: #12261f;
    --on-accent: #06251c;
    --dot: rgb(236 235 230 / 26%);
    --header: rgb(12 15 17 / 84%);

    --critical: #f0685c;
    --critical-ink: #ffb4a8;
    --critical-bg: #3a1613;
    --high: #f29a45;
    --high-ink: #ffc58f;
    --high-bg: #38230f;
    --medium: #e3c350;
    --medium-ink: #f0d97c;
    --medium-bg: #30280c;
    --low: #6f7882;
    --low-ink: #b4bcc4;
    --low-bg: #1f2428;

    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 22px 48px -20px rgb(0 0 0 / 75%);
    --shadow-small: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 20px -12px rgb(0 0 0 / 70%);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ul,
form {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

h1 {
  font-size: 1.5rem;
  font-weight: 680;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.stack {
  display: grid;
  gap: 1rem;
}

.hint {
  color: var(--muted);
  font-size: 0.92rem;
}

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

/* The mark */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.1rem;
  font-weight: 680;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

.mark-noise {
  fill: currentColor;
  opacity: 0.3;
}

.mark-sieve {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.mark-kept {
  fill: var(--accent);
}

/* Buttons, fields and chips */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 620;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-strong);
  color: var(--on-accent);
}

.button-quiet {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: transparent;
  color: var(--soft);
  font-size: 0.88rem;
  font-weight: 560;
}

.button-quiet:hover {
  border-color: var(--muted);
  background: var(--sunk);
  color: var(--ink);
}

.button-danger:hover {
  border-color: var(--critical);
  background: var(--critical-bg);
  color: var(--critical-ink);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 620;
}

input,
select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
}

input:hover,
select:hover {
  border-color: var(--muted);
}

input:focus-visible,
select:focus-visible {
  outline-offset: 1px;
  border-color: var(--accent);
  border-radius: 10px;
}

.chip {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--low-bg);
  color: var(--low-ink);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

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

.chip-high {
  background: var(--high-bg);
  color: var(--high-ink);
}

.chip-medium {
  background: var(--medium-bg);
  color: var(--medium-ink);
}

.chip-admin {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* The door: the pages a person sees before they are signed in */

.door {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 1.75rem;
  min-height: 100vh;
  padding: clamp(2.5rem, 12vh, 7rem) 1rem 3rem;
}

.card {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  max-width: 26rem;
  padding: 2rem;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

/* The header of a signed-in page */

.bar {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  min-height: 3.75rem;
  padding-block: 0.5rem;
}

.bar-org {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--soft);
  font-weight: 560;
}

.bar-org select {
  width: auto;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  font-size: 0.92rem;
}

.bar-nav {
  display: flex;
  gap: 1.25rem;
  margin-right: auto;
}

.bar-nav a {
  padding-block: 0.25rem;
  color: var(--soft);
  font-weight: 560;
  text-decoration: none;
}

.bar-nav a:hover,
.bar-nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.bar-who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* A signed-in page */

.page {
  display: grid;
  gap: 1.5rem;
  padding-block: 2rem 4rem;
}

.notice {
  padding: 0.7rem 1rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
}

.notice-refused {
  border-left-color: var(--critical);
}

.panel {
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.mono {
  font-family: var(--mono);
  font-size: 0.88rem;
  white-space: nowrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
  padding: 1.1rem 1rem;
}

.inline-form .field {
  flex: 1 1 14rem;
}

.inline-form .field-narrow {
  flex: 0 0 9rem;
}

.empty {
  padding: 2rem 1rem;
  color: var(--muted);
  text-align: center;
}
