@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;700;800&display=swap');

/* ── Tokens ───────────────────────────────────────────────────────────────
   Type comes from the Modernist design system (Archivo). Everything else is
   the NWSC brand palette the design layers on top of it. Modernist's own
   red accent and 0px radii are deliberately not used here — this page
   overrides them, exactly as the source design did. */
:root {
  --nwsc-blue: #0f3d78;
  --nwsc-blue-mid: #1f5fa8;
  --nwsc-blue-dark: #0a2c58;
  --nwsc-blue-tint: #eaf1fa;
  --nwsc-yellow: #f2c400;

  --font-heading: "Archivo", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;

  --ink: #17202b;
  --ink-2: #3c4756;
  --ink-3: #4a5563;
  --muted: #6b7684;
  --muted-2: #8b949f;
  --line: #e3e7ec;
  --line-2: #eef1f5;
  --line-3: #dbe1e8;
  --ground: #f6f7f9;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

img { display: block; max-width: 100%; }
a { color: var(--nwsc-blue); text-decoration: none; }
a:hover { color: var(--nwsc-blue-mid); text-decoration: underline; }

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

[hidden] { display: none !important; }

/* ── Top bar ──────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
/* The wordmark is a white knockout, so it must always sit on blue. */
.topbar__mark {
  display: flex; align-items: center;
  background: var(--nwsc-blue);
  padding: 7px 12px;
  border-radius: 4px;
}
.topbar__mark img { height: 30px; width: auto; }
.topbar__label {
  font-size: 12px; color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
}
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.chip-nfc {
  display: flex; align-items: center; gap: 6px;
  background: var(--nwsc-blue-tint); color: var(--nwsc-blue);
  font-size: 11.5px; font-weight: 600;
  padding: 6px 10px; border-radius: 999px;
}

.btn-toggle {
  background: #fff; border: 1px solid var(--line-3); border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  color: var(--ink-2); cursor: pointer;
}
.btn-toggle:hover { background: #f0f3f7; }

/* ── Layout ───────────────────────────────────────────────────────────── */
.wrap { max-width: 940px; margin: 0 auto; padding: 0 20px 64px; }
.wrap--card { max-width: 940px; margin: 0 auto; padding: 32px 20px 64px; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative; height: 210px; overflow: hidden;
  background: linear-gradient(115deg, var(--nwsc-blue) 0%, var(--nwsc-blue-mid) 100%);
  border-radius: 0 0 4px 4px;
}
.hero__dots {
  position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.28) 1.5px, transparent 1.6px);
  background-size: 18px 18px;
}
.hero__wave { position: absolute; right: 0; bottom: 0; height: 100%; width: 60%; opacity: .16; }
.hero__logo { position: absolute; left: 26px; top: 24px; height: 56px; width: auto; }
.hero__rule { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--nwsc-yellow); }

/* ── Identity row ─────────────────────────────────────────────────────── */
.identity {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  padding: 16px 8px 0;
}
.identity__photo {
  width: 140px; height: 140px; border-radius: 50%;
  background: #fff; padding: 5px; flex-shrink: 0; margin-top: -78px;
  box-shadow: 0 2px 10px rgba(16,32,56,.14);
}
.identity__photo img {
  width: 130px; height: 130px; border-radius: 50%; object-fit: cover;
}
.identity__main { flex: 1; min-width: 260px; padding-bottom: 6px; }
.identity__nameline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.identity__name {
  font-family: var(--font-heading); font-size: 31px; font-weight: 700;
  margin: 0; line-height: 1.1;
}
.identity__check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--nwsc-blue); color: #fff; flex-shrink: 0;
}
.identity__role { font-size: 16px; color: var(--ink-3); margin-top: 6px; }
.identity__meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--muted); margin-top: 10px;
}
.identity__meta span { display: flex; align-items: center; gap: 6px; }
.identity__actions { display: flex; gap: 10px; padding-bottom: 8px; flex-wrap: wrap; }

.btn {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600;
  padding: 11px 18px; border-radius: 999px;
}
.btn--primary { background: var(--nwsc-blue); color: #fff; }
.btn--primary:hover { background: var(--nwsc-blue-dark); color: #fff; text-decoration: none; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-3); }
.btn--ghost:hover { background: #f0f3f7; color: var(--ink); text-decoration: none; }

/* ── Status banner ────────────────────────────────────────────────────── */
.banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; margin-top: 26px; border-radius: 4px;
}
.banner__body { flex: 1; min-width: 220px; }
.banner__title { font-family: var(--font-heading); font-size: 16.5px; font-weight: 700; }
.banner__note { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.banner svg { flex-shrink: 0; }

.banner--verified { background: var(--nwsc-blue-tint); border-left: 5px solid var(--nwsc-blue); }
.banner--verified .banner__title { color: var(--nwsc-blue); }
.banner--expired { background: #fdf6e3; border-left: 5px solid var(--nwsc-yellow); }
.banner--expired .banner__title { color: #8a6d00; }
.banner--revoked { background: #fdecea; border-left: 5px solid #c62828; }
.banner--revoked .banner__title { color: #c62828; }

/* ── Stat + detail cards ──────────────────────────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-top: 14px;
}
.panels {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px; margin-top: 20px;
}
.card { background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.stat { padding: 16px 18px; }
.stat__label, .panel__label {
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600;
}
.stat__value { font-size: 17px; font-weight: 700; margin-top: 6px; }

.panel { padding: 20px; }
.panel__label { margin-bottom: 12px; }
.panel__list { display: grid; gap: 12px; font-size: 14px; }
.panel__key { color: var(--muted-2); font-size: 12.5px; }
.panel__val { font-weight: 600; margin-top: 2px; }

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-top: 34px; }
.tab {
  background: none; border: none; padding: 12px 2px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; color: var(--muted);
  border-bottom: 3px solid transparent;
}
.tab[aria-selected="true"] { color: var(--nwsc-blue); border-bottom-color: var(--nwsc-blue); }

/* ── Contact list ─────────────────────────────────────────────────────── */
.contact { margin-top: 20px; }
.contact__row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
}
.contact__row:last-child { border-bottom: none; }
.contact__row svg { flex-shrink: 0; }
.contact__body { flex: 1; min-width: 0; }
.contact__key { font-size: 12.5px; color: var(--muted-2); }
.contact__val { font-weight: 600; font-size: 14.5px; margin-top: 2px; }

.disclaimer {
  font-size: 12.5px; color: var(--muted-2); max-width: 62ch;
  margin: 26px 0 0; line-height: 1.6;
}

/* ── ID card view ─────────────────────────────────────────────────────── */
.cardview__title { font-family: var(--font-heading); font-size: 24px; font-weight: 700; margin: 0; }
.cardview__intro {
  font-size: 13.5px; color: var(--muted); max-width: 60ch;
  margin: 8px 0 32px; line-height: 1.6;
}
.cardview__row { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.cardview__col { display: flex; flex-direction: column; gap: 10px; }
.cardview__caption {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2);
}

.idcard {
  width: 270px; height: 428px; background: #fff;
  border-radius: 16px; box-shadow: 0 12px 34px rgba(16,32,56,.20);
  display: flex; flex-direction: column; overflow: hidden;
}
.idcard__dots {
  position: absolute; inset: 0; opacity: .45;
  background-image: radial-gradient(rgba(255,255,255,.3) 1.4px, transparent 1.5px);
  background-size: 14px 14px;
}

/* Front */
.idcard__head {
  position: relative; flex-shrink: 0; height: 80px;
  background: var(--nwsc-blue);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 16px 10px;
}
.idcard__slot {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.4);
}
.idcard__head img { height: 28px; width: auto; position: relative; }
.idcard__kicker {
  font-size: 7.5px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.85); position: relative;
}
.idcard__photo { position: relative; flex: 1; overflow: hidden; background: #e9edf2; }
.idcard__photo img { width: 100%; height: 100%; object-fit: cover; }
.idcard__plate {
  position: absolute; left: 0; bottom: 0; width: 84%;
  background: #fff; border-top-right-radius: 20px; padding: 14px 16px 12px;
}
.idcard__name {
  font-family: var(--font-heading); font-size: 19px; font-weight: 700;
  line-height: 1.12; color: var(--nwsc-blue);
}
.idcard__dash { width: 34px; height: 3px; background: var(--nwsc-yellow); margin-top: 8px; }
.idcard__foot {
  flex-shrink: 0; border-top: 3px solid var(--nwsc-yellow); padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.idcard__title {
  font-size: 7.5px; letter-spacing: .11em; text-transform: uppercase;
  color: var(--muted); line-height: 1.4;
}
.idcard__no {
  font-size: 8px; font-weight: 700; letter-spacing: .06em;
  color: var(--nwsc-blue); white-space: nowrap;
}

/* Back */
.idcard__backhead {
  position: relative; flex-shrink: 0; background: var(--nwsc-blue); padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.idcard__backhead img { height: 28px; width: auto; align-self: flex-end; position: relative; }
.idcard__qr { width: 150px; height: 150px; background: #fff; position: relative; }
.idcard__qr img { width: 100%; height: 100%; }
.idcard__tap { display: flex; align-items: center; gap: 7px; color: #fff; position: relative; }
.idcard__tap span { font-size: 8px; letter-spacing: .15em; text-transform: uppercase; }
.idcard__backbody { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.idcard__sign { height: 34px; border-bottom: 1px solid #cfd6de; display: flex; align-items: flex-end; }
.idcard__signcap {
  font-size: 7.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2); display: block; margin-top: 5px;
}
.idcard__legal { font-size: 8px; line-height: 1.65; color: var(--muted); margin: 0; }
.idcard__backfoot {
  margin-top: auto; display: flex; justify-content: space-between;
  align-items: flex-end; gap: 8px;
}
.idcard__url { font-size: 8px; color: var(--muted-2); }
.idcard__tel { font-size: 8px; font-weight: 700; color: var(--nwsc-blue); }

@media print {
  .topbar, .identity__actions, .tabs { display: none; }
  body { background: #fff; }
}
