:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #63716c;
  --paper: #f5f3ed;
  --panel: #fffdf8;
  --line: #d8ddd8;
  --green: #0f6b50;
  --green-dark: #094535;
  --amber: #d9902f;
  --red: #a23d35;
  --blue: #255e75;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
header {
  min-height: 310px;
  padding: 64px max(6vw, 24px) 52px;
  color: white;
  background:
    radial-gradient(circle at 82% 12%, rgba(231, 176, 84, .33), transparent 28%),
    linear-gradient(128deg, #082e26, #0f6049 64%, #164c5f);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
h1 { margin: 8px 0 12px; max-width: 900px; font-family: Georgia, serif; font-size: clamp(42px, 7vw, 82px); line-height: .94; font-weight: 500; }
h2 { margin: 3px 0 24px; font-family: Georgia, serif; font-size: clamp(27px, 3vw, 38px); font-weight: 500; }
.eyebrow, .step { margin: 0; font-size: 12px; letter-spacing: .18em; font-weight: 800; text-transform: uppercase; }
.step { color: var(--green); }
.lede { max-width: 720px; margin: 0; color: #dbe8e2; font-size: 17px; }
.status { border: 1px solid rgba(255,255,255,.35); border-radius: 99px; padding: 10px 15px; white-space: nowrap; }
.status.ok { background: rgba(255,255,255,.13); }
.status.error { background: var(--red); }
main { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 80px; }
section { margin: 0 0 28px; padding: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 40px rgba(20, 45, 36, .05); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.two-column section { margin-bottom: 0; }
.service-grid, .credential-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 4px 0 28px; }
.service, .credential { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.service strong, .credential strong { display: block; margin-bottom: 6px; }
.service small, .mono { display: block; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 10px; border-top: 1px solid var(--line); text-align: left; font-size: 14px; }
th { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 99px; background: #e4f2eb; color: var(--green); font-size: 12px; font-weight: 700; }
.badge:not(.active) { color: var(--red); background: #f8e5e2; }
form { display: grid; gap: 16px; }
label, legend { color: #36423e; font-size: 13px; font-weight: 700; }
input:not([type="checkbox"]), select { display: block; width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid #bbc5c0; border-radius: 7px; background: white; color: var(--ink); font: inherit; }
fieldset { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.check { display: flex; gap: 9px; align-items: center; font-weight: 600; }
.check span { color: var(--red); font-size: 11px; }
.consent { padding: 12px; background: #edf5f1; border-radius: 7px; }
button { padding: 11px 16px; border: 0; border-radius: 7px; background: var(--green); color: white; font: inherit; font-weight: 800; cursor: pointer; }
button:hover { background: var(--green-dark); }
button:disabled { opacity: .5; cursor: wait; }
button.secondary { background: transparent; border: 1px solid var(--green); color: var(--green); }
button.danger { padding: 8px 11px; background: transparent; border: 1px solid var(--red); color: var(--red); font-size: 12px; }
.hint { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.credential-grid { grid-template-columns: repeat(3, 1fr); }
.credential { border-top: 4px solid var(--blue); }
.claims { margin: 14px 0; display: grid; gap: 7px; }
.claim { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 7px; border-bottom: 1px dotted var(--line); font-size: 13px; }
.claim span:first-child { color: var(--muted); }
.audit { max-height: 340px; overflow: auto; border-top: 1px solid var(--line); }
.audit-row { display: grid; grid-template-columns: 190px 170px 90px 1fr; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 12px; }
.audit-row .failure { color: var(--red); font-weight: 800; }
.audit-row .success { color: var(--green); font-weight: 800; }
#toast { position: fixed; right: 22px; bottom: 22px; max-width: 430px; padding: 14px 18px; border-radius: 8px; background: var(--ink); color: white; box-shadow: 0 15px 50px rgba(0,0,0,.25); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }
#toast.show { opacity: 1; transform: translateY(0); }
#toast.error { background: var(--red); }
.empty { color: var(--muted); font-style: italic; }
@media (max-width: 900px) {
  header { align-items: flex-start; flex-direction: column; }
  .two-column { grid-template-columns: 1fr; }
  .service-grid, .credential-grid { grid-template-columns: 1fr 1fr; }
  .audit-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  main { width: min(100% - 24px, 1240px); }
  section { padding: 20px; }
  .service-grid, .credential-grid { grid-template-columns: 1fr; }
}
