/* Securo Cert — design system.
   Tokens first, then layout primitives, then components.
   No inline styles anywhere: the CSP forbids them. */

:root {
  --ink:      #0B1B33;
  --slate:    #1E2E47;
  --grey:     #64748B;
  --hairline: #E2E8F0;
  --paper:    #F7F9FC;
  --stock:    #FBFAF7;
  --brass:    #B08D57;
  --brass-dim:#8E6F42;

  --valid:     #1F7A5A;
  --suspended: #B45309;
  --withdrawn: #9B1C1C;
  --expired:   #64748B;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans:  Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;

  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2rem;     --s7: 3rem;    --s8: 4.5rem; --s9: 6rem;

  --measure: 68ch;
  --gutter: clamp(1rem, 4vw, 3rem);
  --wrap: 1200px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.15;
  margin: 0 0 var(--s4);
}

h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; font-family: var(--sans); font-weight: 650; }

p { margin: 0 0 var(--s4); max-width: var(--measure); }

a { color: var(--slate); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brass-dim); }

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

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: var(--s6) 0;
}

/* ---------- Layout primitives ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(3.5rem, 6vw, 6rem); }
.section--tight { padding-block: clamp(2.5rem, 4vw, 3.75rem); }
.section--ink { background: var(--ink); color: var(--stock); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--stock); }
.section--ink a { color: var(--brass); }
.section--rule { border-top: 1px solid var(--hairline); }

.grid { display: grid; gap: var(--s6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: clamp(2rem, 5vw, 4rem); }

@media (max-width: 860px) {
  .grid--split { grid-template-columns: 1fr; }
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 var(--s3);
}

.section--ink .eyebrow { color: var(--brass); }

.lede { font-size: 1.12rem; color: var(--slate); max-width: 60ch; }
.section--ink .lede { color: #C8D2E0; }

.muted { color: var(--grey); }
.small { font-size: 0.85rem; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0.01em; }

/* ---------- Header / footer ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  border-bottom: 1px solid rgba(176, 141, 87, 0.35);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: 62px;
}

.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; }
.brand__seal { flex: 0 0 auto; }
.brand__text { font-family: var(--serif); color: var(--stock); font-size: 1.06rem; letter-spacing: 0.01em; }
.brand__text b { font-weight: 650; }
.brand__text span { font-weight: 400; color: var(--brass); }

.nav { margin-left: auto; display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.nav a {
  color: #C8D2E0;
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  padding-block: var(--s2);
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--stock); border-bottom-color: var(--brass); }
.nav a.nav__verify {
  border: 1px solid var(--brass);
  color: var(--brass);
  padding: 6px 14px;
  border-radius: 2px;
}
.nav a.nav__verify:hover { background: var(--brass); color: var(--ink); }

@media (max-width: 780px) {
  .masthead__inner { flex-wrap: wrap; padding-block: var(--s3); }
  .nav { width: 100%; margin-left: 0; gap: var(--s4); }
}

.colophon { background: var(--ink); color: #9FADC0; padding-block: var(--s8) var(--s6); }
.colophon a { color: #C8D2E0; text-decoration: none; }
.colophon a:hover { color: var(--brass); }
.colophon h4 { color: var(--stock); font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: var(--s3); }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin-bottom: var(--s2); font-size: 0.88rem; }
.colophon__legal {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: var(--s6);
  padding-top: var(--s4);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* ---------- Buttons and forms ---------- */

.btn {
  display: inline-block;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 12px 22px;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--stock);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--slate); border-color: var(--slate); color: var(--stock); }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--stock); }
.btn--brass { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.btn--brass:hover { background: var(--brass-dim); border-color: var(--brass-dim); color: var(--stock); }

/* Ghost buttons also sit inside dark ink sections (the hero CTAs), where a dark
   label on a dark ground would all but vanish. Invert them there: a light
   hairline and light label, filling light on hover. */
.section--ink .btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--stock);
}
.section--ink .btn--ghost:hover {
  background: var(--stock);
  border-color: var(--stock);
  color: var(--ink);
}

.field { display: block; margin-bottom: var(--s4); }
.field > span {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: var(--s2);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  padding: 11px 13px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brass); }
.field--mono input { font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.field__hint { font-size: 0.82rem; color: var(--grey); margin-top: var(--s2); }

.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s2) var(--s4); }
.checks label { display: flex; align-items: center; gap: var(--s2); font-size: 0.9rem; }

.form-row { display: flex; gap: var(--s3); align-items: flex-end; flex-wrap: wrap; }
.form-row .field { flex: 1 1 220px; margin-bottom: 0; }

/* ---------- Lookup panel ---------- */

.lookup {
  background: var(--stock);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--brass);
  border-radius: 2px;
  padding: var(--s6);
}
.section--ink .lookup { border-color: rgba(255,255,255,0.14); border-top-color: var(--brass); background: #0F2340; }
.section--ink .lookup .field > span { color: #9FADC0; }
.section--ink .lookup input { background: #071528; border-color: rgba(255,255,255,0.18); color: var(--stock); }
.section--ink .lookup .field__hint { color: #8496AC; }

/* ---------- Delivery mode badge ----------
   A disclosure, not a trust signal. Deliberately neutral: no green, no shield.
   If this ever starts looking like a badge of honour it is doing the wrong job. */

.mode {
  display: block;
  border-left: 3px solid var(--grey);
  padding: var(--s2) 0 var(--s2) var(--s3);
  margin-block: var(--s3);
  background: transparent;
}
.mode__label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  display: block;
}
.mode__text { font-size: 0.88rem; color: var(--slate); margin: 2px 0 0; max-width: 62ch; }
.mode--direct { border-left-color: var(--slate); }
.mode--joint { border-left-color: var(--brass); }
.mode--managed { border-left-color: var(--brass-dim); }
/* The non-accredited flag is a disclosure, not an alarm. It states a fact the
   reader needs — the Securo Cert document is not itself accredited — in neutral
   type, so it reads as information rather than a warning. Only the positive
   "accredited" confirmation carries a colour. */
.mode__flag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--s2);
  padding: 3px 8px;
  border: 1px solid var(--hairline);
  color: var(--grey);
  border-radius: 2px;
}
.mode__flag--accredited { border-color: var(--valid); color: var(--valid); }

/* ---------- Scheme cards ---------- */

.card {
  display: block;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: var(--s6);
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.card:hover { border-color: var(--brass); color: inherit; box-shadow: 0 6px 20px rgba(11, 27, 51, 0.06); }
.card h3 { margin-bottom: var(--s1); font-size: 1.15rem; }
.card__sub { font-size: 0.86rem; color: var(--grey); margin: 0 0 var(--s3); }
.card__deliverable {
  font-size: 0.8rem;
  color: var(--slate);
  border-top: 1px solid var(--hairline);
  padding-top: var(--s3);
  margin-top: var(--s3);
}
.card__deliverable b { font-weight: 650; }

/* ---------- Tables ---------- */

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td {
  text-align: left;
  padding: var(--s3) var(--s3) var(--s3) 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  border-bottom-color: var(--ink);
}
.table tr:hover td { background: var(--stock); }
.table--data td:first-child {
  color: var(--grey);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 42%;
  font-weight: 650;
}
.table-scroll { overflow-x: auto; }

/* ---------- Status ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid currentColor;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--valid { color: var(--valid); }
.status--suspended { color: var(--suspended); }
.status--withdrawn { color: var(--withdrawn); }
.status--expired { color: var(--expired); }
.status--none { color: var(--grey); }

/* ---------- The security plate ----------
   The signature element. A verification result is rendered as the same
   engraved object as the printed document, so the reader compares two plates
   rather than reading a coloured tick. */

.plate {
  position: relative;
  background: var(--stock);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  overflow: hidden;
  isolation: isolate;
}
.plate__guilloche {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}
.plate__seal {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: min(360px, 62%);
  transform: translate(-50%, -50%);
  opacity: 0.045;
  pointer-events: none;
}
.plate__body { position: relative; z-index: 1; padding: clamp(1.25rem, 4vw, 2.75rem); }

.plate__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s4);
  border-bottom: 1px solid var(--brass);
  padding-bottom: var(--s3);
  margin-bottom: var(--s5);
  flex-wrap: wrap;
}
.plate__kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-dim);
  margin: 0;
}

/* Entity name is the largest thing on the plate. The status badge is not.
   Transplant forgery works precisely when a reader checks the colour and
   not the name. */
.plate__entity {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s3);
  max-width: 22ch;
}
.plate__address { font-size: 0.92rem; color: var(--slate); margin: 0 0 var(--s4); white-space: pre-line; max-width: 44ch; }

.microtext {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 3.4px;
  line-height: 1.4;
  letter-spacing: 0.5px;
  color: var(--brass);
  opacity: 0.72;
  user-select: none;
  margin-bottom: var(--s4);
}

.plate__scope {
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--ink);
  background: rgba(255,255,255,0.72);
  padding: var(--s5);
  margin-bottom: var(--s5);
}
.plate__scope h4 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: var(--s2);
}
.plate__scope p { margin: 0; font-size: 0.95rem; }

/* Comparison panel — the anti-transplant control */
.compare {
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: #fff;
  padding: var(--s5);
  margin-block: var(--s5);
}
.compare h4 { margin-bottom: var(--s2); }
.compare > p { font-size: 0.88rem; color: var(--slate); }
.compare__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s4);
  margin-top: var(--s4);
}
.compare__item { border-top: 2px solid var(--brass); padding-top: var(--s3); }
.compare__key {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: var(--s2);
}
.compare__value {
  font-family: var(--mono);
  font-size: 0.98rem;
  word-break: break-all;
  color: var(--ink);
}

.dual {
  border: 1px solid var(--brass);
  background: rgba(176, 141, 87, 0.07);
  border-radius: 2px;
  padding: var(--s5);
  margin-block: var(--s5);
}
.dual h4 { margin-bottom: var(--s2); }
.dual p { font-size: 0.9rem; margin-bottom: var(--s3); }

.callout {
  border-left: 3px solid var(--ink);
  padding: var(--s3) 0 var(--s3) var(--s5);
  margin-block: var(--s5);
}
.callout--warn { border-left-color: var(--suspended); }
.callout--stop { border-left-color: var(--withdrawn); }
.callout p:last-child { margin-bottom: 0; }
.callout h4 { margin-bottom: var(--s2); }

/* ---------- Process ---------- */

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: var(--s4);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--hairline);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--brass);
  padding-top: 3px;
}
.steps h4 { margin-bottom: var(--s1); }
.steps p { margin: 0; font-size: 0.92rem; color: var(--slate); }
.section--ink .steps li { border-bottom-color: rgba(255,255,255,0.12); }
.section--ink .steps p { color: #B8C4D4; }

/* ---------- Filters / register ---------- */

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s4);
  align-items: end;
  padding: var(--s5);
  background: var(--stock);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  margin-bottom: var(--s6);
}
.filters .field { margin-bottom: 0; }

.pager { display: flex; gap: var(--s3); align-items: center; margin-top: var(--s5); font-size: 0.9rem; }


/* ---------- Estimator ---------- */

.result {
  background: var(--ink);
  color: var(--stock);
  border-radius: 2px;
  padding: var(--s5);
}
.result h3 { color: var(--stock); }
.result .table th { color: #8496AC; border-bottom-color: var(--brass); }
.result .table td { border-bottom-color: rgba(255,255,255,0.12); color: #DCE3EC; }
.result__figure { font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--brass); }

/* ---------- Utilities ---------- */

.stack > * + * { margin-top: var(--s4); }
.flow > * + * { margin-top: var(--s6); }
.inline-list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s4); flex-wrap: wrap; font-size: 0.88rem; }
.cta-row { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }
.skip {
  position: absolute; left: -9999px;
}
.skip:focus {
  position: fixed; left: var(--s4); top: var(--s4); z-index: 100;
  background: var(--brass); color: var(--ink); padding: 10px 16px; border-radius: 2px;
}

/* ---------- Code / snippet block ----------
   External class rather than an inline style: the CSP forbids inline styles,
   so nothing renders style="" attributes. */

.codeblock {
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: var(--s4);
  background: #fff;
  color: var(--ink);
  margin: 0 0 var(--s4);
}

/* ---------- Long-form / legal pages ---------- */

.prose { max-width: 74ch; }
.prose h2 { margin-top: var(--s7); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--s5); }
.prose ul, .prose ol { margin: 0 0 var(--s4); padding-left: var(--s5); max-width: var(--measure); }
.prose li { margin-bottom: var(--s2); }
.prose li::marker { color: var(--brass); }
.prose__updated {
  font-size: 0.82rem;
  color: var(--grey);
  border-top: 1px solid var(--hairline);
  padding-top: var(--s3);
  margin-top: var(--s7);
}

/* ---------- Footer legal row ---------- */

.colophon__contact { margin-top: var(--s3); }
.colophon__contact a { color: var(--brass); }
.colophon__bar {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: var(--s6);
  padding-top: var(--s5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}
.colophon__nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); }
.colophon__nav a { color: #9FADC0; text-decoration: none; }
.colophon__nav a:hover { color: var(--brass); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  .masthead, .colophon, .cta-row, .filters { display: none; }
  body { background: #fff; }
  .plate { border-color: #000; }
}

