/* NetVoiX Share — design "D" (2026-10-01): light first, one blue accent, soft white cards.
   Light is the default for everyone; dark applies only when the user picks it with the header toggle
   (theme.js sets data-theme and remembers it). The OS dark-mode setting is deliberately NOT followed:
   that is what made every page look dark before. */

/* Plus Jakarta Sans, served from this origin (CSP font-src 'self'; browsers never contact Google).
   Latin subset, one variable file for weights 400-700. SIL Open Font License: OFL-plus-jakarta-sans.txt. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/static/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #F6F7F9; --surface: #FFFFFF; --field: #FAFBFC;
  --ink: #141821; --ink-2: #2B3446; --muted: #5B6372;
  --rule: #DCE1E8; --rule-soft: #EEF0F4;
  /* Form-field outline: at least 3:1 against the card and the field fill (WCAG 1.4.11; --rule is 1.3:1). */
  --field-border: #7D8696;
  --placeholder: #687181; /* 4.75:1 on the field fill (WCAG 1.4.3 text contrast; #8A93A3 was 2.99:1) */
  --accent: #2457D6; --accent-hover: #1A42A8; --accent-soft: #EEF2FC; --on-accent: #FFFFFF;
  --amber-ink: #6B4A12; --amber-soft: #FFF6E5;
  --green: #1F7A4D; --green-soft: #DDF3E6; --red: #B4261F; --red-soft: #FBE4E2; --code: #EEF0F4;
  --shadow: 0 1px 2px rgba(20, 24, 33, 0.04), 0 8px 24px rgba(20, 24, 33, 0.06);
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 18px; --radius-field: 12px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0F1317; --surface: #171C23; --field: #12171D;
  --ink: #E6E9EE; --ink-2: #C9CFD8; --muted: #9AA3AF;
  --rule: #2A313A; --rule-soft: #222932;
  --field-border: #667080;
  --placeholder: #8A93A3; /* 5.8:1 on the dark field fill */
  --accent: #7C9FEA; --accent-hover: #A3BCF2; --accent-soft: #1C2740; --on-accent: #0F1317;
  --amber-ink: #F0C77A; --amber-soft: #33280F;
  --green: #4CBB84; --green-soft: #143324; --red: #E5675F; --red-soft: #3D1A18; --code: #1C222A;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
/* The hidden attribute must win over any display set by a class (.row, .stack and .grid3 are flex or grid). */
[hidden] { display: none !important; }
body { min-height: 100vh; display: flex; flex-direction: column; margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 10px; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
code { font-family: var(--mono); background: var(--code); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }

.banner-dev { background: #B9741B; color: #1A1200; font-weight: 600; font-size: 13px; text-align: center; padding: 6px 12px; }

/* ---- header ------------------------------------------------------------------------------- */
header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  min-height: 68px; padding: 12px 40px; background: var(--surface); border-bottom: 1px solid var(--rule-soft); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.logo { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
header.top .right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; }
header nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; white-space: nowrap; }
header nav a:hover { color: var(--ink); background: var(--rule-soft); }
header nav a.active { color: var(--accent); background: var(--accent-soft); }
.sep { width: 1px; height: 22px; background: var(--rule-soft); margin: 0 6px; }
.who { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.role { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 14px; padding: 8px 6px; }
button.link:hover { color: var(--ink); }
.theme-toggle { font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--rule); color: var(--muted); white-space: nowrap; cursor: pointer; }
.theme-toggle:hover { color: var(--ink); border-color: var(--accent); }

/* ---- page layout ---------------------------------------------------------------------------- */
/* minmax(0,1fr): a grid track defaults to min-width:auto and would grow to fit a no-wrap table,
   pushing the card past the centred column; with 0 the table scrolls inside .tablewrap instead. */
/* align-content:start: the wrap grows to push the footer down, but its rows (cards) keep their natural height. */
.wrap { flex: 1 0 auto; align-content: start; width: 100%; max-width: 1120px; margin: 0 auto; padding: 44px 40px 72px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.wrap.wide { max-width: 1280px; }
/* A flex column, not a grid: an empty .status line pulls the next item up with a negative margin,
   which a grid row ignores (the track never goes below zero). */
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stack > * { min-width: 0; }
.split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 56px; align-items: start; }
.after-eyebrow { margin-top: 12px; }
.links { margin: 16px 0 0; font-size: 14px; }
.fineprint { font-size: 13.5px; margin: 14px 0 0; }
.card .eyebrow + h1, .card .eyebrow + h2 { display: block; }
.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 0; }

.card { min-width: 0; background: var(--surface); border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow); }
:root[data-theme="dark"] .card { border: 1px solid var(--rule); }
.card.narrow { max-width: 520px; margin: 0 auto; width: 100%; }
.card.prose { max-width: 680px; margin: 0 auto; width: 100%; }
.prose h2 { font-size: 17px; margin: 24px 0 6px; }
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.card > :last-child { margin-bottom: 0; }

.eyebrow { align-self: flex-start; display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 5px 11px; border-radius: 999px; }

/* "how it works" rail on the create page */
.intro { display: flex; flex-direction: column; gap: 26px; padding-top: 4px; }
.intro h1 { font-size: 34px; margin: 12px 0 0; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; font-size: 14.5px; color: var(--ink-2); }
.steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; }
.steps .n { width: 30px; height: 30px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule);
  color: var(--accent); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.steps .t { padding-top: 4px; }

/* ---- forms ---------------------------------------------------------------------------------- */
label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
label .opt { font-weight: 400; color: var(--muted); }
.field { display: flex; flex-direction: column; min-width: 0; }
.field + .field, form > .field + * { margin-top: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), textarea, select {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--field); border: 1px solid var(--field-border);
  border-radius: var(--radius-field); padding: 11px 14px; width: 100%; min-width: 0; }
/* opacity: 1 because some browsers dim placeholders by default, which would undo the contrast. */
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
textarea { font-family: var(--mono); font-size: 14px; line-height: 1.5; resize: vertical; min-height: 150px; padding: 14px 16px; }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.form { display: flex; flex-direction: column; gap: 22px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 14px; color: var(--ink-2); margin: 0; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px 16px; flex-wrap: wrap;
  border-top: 1px solid var(--rule-soft); padding-top: 22px; }
.row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.row > .field { flex: 1 1 200px; }
.row > input { flex: 1 1 320px; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status { min-height: 1.4em; margin: 0; font-size: 14px; }
/* An empty status line takes no room, but stays in the DOM so screen readers still announce it (aria-live). */
.form > .status:empty { min-height: 0; margin-top: -22px; }
.stack > .status:empty { min-height: 0; margin-top: -18px; }
.card > .status:empty { min-height: 0; }

/* ---- buttons -------------------------------------------------------------------------------- */
button { font: inherit; font-size: 15px; font-weight: 600; border: 1px solid var(--rule); background: var(--surface);
  color: var(--ink); border-radius: var(--radius-field); padding: 11px 18px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent);
  border-color: var(--accent); color: var(--on-accent); padding: 13px 22px; }
button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.block { width: 100%; padding: 15px; font-size: 16px; }
button:disabled { opacity: 0.6; cursor: wait; }

/* ---- notes and messages ----------------------------------------------------------------------- */
.warn, .note { color: var(--amber-ink); background: var(--amber-soft); padding: 12px 14px; border-radius: var(--radius-field);
  font-size: 14px; line-height: 1.5; margin: 0; }
.error { color: var(--red); background: var(--red-soft); padding: 10px 14px; border-radius: var(--radius-field); font-size: 14px; }
p.error { margin: 0 0 14px; }

/* ---- facts (expiry, views, PIN) ---------------------------------------------------------------- */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 14.5px; margin: 14px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.facts-card { padding: 4px 20px; }
.facts.rows { display: flex; flex-direction: column; gap: 0; margin: 0; }
.facts.rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--rule-soft); }
.facts.rows > div:last-child { border-bottom: 0; }
.facts.rows dd { text-align: right; font-weight: 600; }

/* ---- the revealed secret -------------------------------------------------------------------------- */
pre.secret { font-family: var(--mono); font-size: 15px; background: var(--field); border: 1px solid var(--rule);
  border-radius: var(--radius-field); padding: 16px; white-space: pre-wrap; word-break: break-all; margin: 0 0 14px; min-height: 56px; }
pre.secret.masked { letter-spacing: 0.15em; color: var(--muted); user-select: none; }

/* ---- recipient page ---------------------------------------------------------------------------- */
.recipient .wrap { max-width: 560px; padding-top: 40px; }
.recipient .stack { gap: 18px; }
.recipient h1 { font-size: 28px; margin: 0; letter-spacing: -0.01em; }
.sender-name { display: block; color: var(--accent); margin-bottom: 2px; }
.ip { font-family: var(--mono); font-size: 13px; }
.small { font-size: 12.5px; }

/* ---- admin and lists ------------------------------------------------------------------------------ */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.tile { border: 1px solid var(--rule-soft); border-radius: 14px; padding: 16px 18px; background: var(--field); }
.tile-n { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile-l { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 6px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--rule-soft); border-radius: 14px; margin-top: 18px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; white-space: nowrap; }
th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--field); }
tr:last-child td { border-bottom: 0; }
td button { padding: 6px 12px; font-size: 13px; border-radius: 999px; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; padding: 3px 10px; border-radius: 999px; }
.chip.active { color: var(--accent); background: var(--accent-soft); }
.chip.viewed { color: var(--green); background: var(--green-soft); }
.chip.expired { color: var(--muted); background: var(--code); }
.chip.revoked { color: var(--red); background: var(--red-soft); }

/* ---- footer -------------------------------------------------------------------------------- */
.foot { text-align: center; font-size: 12.5px; color: var(--muted); padding: 18px 16px 24px; }

/* ---- small screens ---------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .intro h1 { font-size: 28px; }
}
@media (max-width: 680px) {
  header.top { padding: 12px 16px; }
  .wrap { padding: 24px 16px 56px; }
  .card { padding: 22px 18px; }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 26px; }
  .form-foot button.primary { width: 100%; }
}
