/* Canonical copy: apps/web/public/styles.css — keep apps/admin/public/styles.css in sync (no build step to share). */

/* ===========================================================================
   Right to Care — design system  (v2, 2026 refresh)
   - single stylesheet, no build step, no framework
   - light + dark via prefers-color-scheme (every colour is a token)
   - government-portal styling: official masthead with the City of Iloilo
     seal, calm layered background, solid legible cards
   - honours prefers-reduced-motion; degrades cleanly without backdrop-filter
   =========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,500;8..60,600&display=swap");

:root {
  color-scheme: light dark;

  /* --- surface + ink --- */
  --page-bg: #eef2f1;
  --page-bg-2: #e3ebe8;
  --surface: #ffffff;
  --surface-muted: #f4f7f6;
  --surface-inset: #eef2f1;

  --ink: #16241f;
  --ink-soft: #4b5a54;
  --ink-faint: #71827b;
  --hairline: #d9e2de;
  --hairline-strong: #c4d0cb;

  /* --- brand --- */
  --brand: #0f6f54;          /* Iloilo GAD green */
  --brand-strong: #0b5642;
  --brand-tint: #e7f2ee;
  --navy: #1b3a5b;           /* formal secondary (from the seal's shield) */
  --gold: #c8a24a;           /* accent echoing the seal */
  --gold-tint: #f6efe0;

  --link: #0b6047;
  --link-hover: #084636;

  /* --- interactive --- */
  --accent: #0f6f54;
  --accent-2: #17916f;
  --accent-ink: #ffffff;
  --focus-ring: rgba(15, 111, 84, 0.35);

  --field-bg: #ffffff;
  --field-border: #c4d0cb;
  --field-border-hover: #9fb2ab;

  /* --- feedback --- */
  --ok-ink: #1b6e3b;
  --ok-bg: #e6f4ea;
  --danger-ink: #a32828;
  --danger-bg: #fbeaea;
  --warn-ink: #7a5a0d;
  --row-hover: rgba(15, 111, 84, 0.06);

  /* --- status badges --- */
  --badge-valid-bg: #dff3e5;      --badge-valid-ink: #15612f;   --badge-valid-brd: #a9dcbd;
  --badge-revoked-bg: #fbe4e4;    --badge-revoked-ink: #8f2323; --badge-revoked-brd: #eeb6b6;
  --badge-expired-bg: #faeecf;    --badge-expired-ink: #6f5209; --badge-expired-brd: #e6cf95;
  --badge-neutral-bg: #e9edeb;    --badge-neutral-ink: #45524d; --badge-neutral-brd: #cdd7d2;

  /* --- masthead --- */
  --masthead-bg: #0b3d30;
  --masthead-bg-2: #0e5040;
  --masthead-ink: #f1faf6;
  --masthead-ink-soft: rgba(241, 250, 246, 0.72);
  --gov-strip-bg: #082c23;
  --gov-strip-ink: rgba(241, 250, 246, 0.82);

  --shadow-sm: 0 1px 2px rgba(16, 36, 31, 0.06), 0 1px 3px rgba(16, 36, 31, 0.08);
  --shadow-md: 0 6px 16px -8px rgba(16, 36, 31, 0.22), 0 2px 6px rgba(16, 36, 31, 0.06);
  --shadow-lg: 0 24px 48px -24px rgba(11, 61, 48, 0.35);

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --maxw: 1080px;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #0b1512;
    --page-bg-2: #0f1c17;
    --surface: #14211d;
    --surface-muted: #182722;
    --surface-inset: #101b17;

    --ink: #e9f1ed;
    --ink-soft: #b0c0b9;
    --ink-faint: #869890;
    --hairline: #263630;
    --hairline-strong: #32463f;

    --brand: #37b58e;
    --brand-strong: #2b9576;
    --brand-tint: #14312a;
    --navy: #9cc0e0;
    --gold: #d9bd7c;
    --gold-tint: #2c2718;

    --link: #6fe0b8;
    --link-hover: #93ecc9;

    --accent: #1c9a76;
    --accent-2: #27b98e;
    --accent-ink: #04140f;
    --focus-ring: rgba(39, 185, 142, 0.4);

    --field-bg: #101b17;
    --field-border: #33463f;
    --field-border-hover: #4a6157;

    --ok-ink: #7fdba3;   --ok-bg: #123024;
    --danger-ink: #f2a3a3; --danger-bg: #35191a;
    --warn-ink: #ffd98a;
    --row-hover: rgba(255, 255, 255, 0.045);

    --badge-valid-bg: #123726;   --badge-valid-ink: #8ce8ad;  --badge-valid-brd: #1f5a3d;
    --badge-revoked-bg: #3a1d1d; --badge-revoked-ink: #ffb3b3; --badge-revoked-brd: #6a3232;
    --badge-expired-bg: #3a3016; --badge-expired-ink: #ffd98a; --badge-expired-brd: #6a5828;
    --badge-neutral-bg: #222f2a; --badge-neutral-ink: #c7d0cd; --badge-neutral-brd: #384a43;

    --masthead-bg: #08251e;
    --masthead-bg-2: #0c342a;
    --masthead-ink: #eafaf3;
    --masthead-ink-soft: rgba(234, 250, 243, 0.66);
    --gov-strip-bg: #061c17;
    --gov-strip-ink: rgba(234, 250, 243, 0.72);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 20px -10px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 28px 56px -28px rgba(0, 0, 0, 0.7);
  }
}

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

html {
  background: var(--page-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(60vw 60vw at 88% -10%, var(--brand-tint), transparent 60%),
    radial-gradient(50vw 50vw at -8% 12%, var(--gold-tint), transparent 55%),
    linear-gradient(180deg, var(--page-bg), var(--page-bg-2));
  background-attachment: fixed;
}

/* faint seal watermark, low in the page, non-distracting */
body::after {
  content: "";
  position: fixed;
  right: -8vmin;
  bottom: -8vmin;
  width: min(52vmin, 460px);
  height: min(52vmin, 460px);
  background: url("assets/iloilo-city-seal.png") center / contain no-repeat;
  opacity: 0.05;
  filter: grayscale(1);
  pointer-events: none;
  z-index: 0;
}
@media (prefers-color-scheme: dark) {
  body::after { opacity: 0.06; filter: grayscale(1) invert(1) brightness(1.6); }
}

main { position: relative; z-index: 1; }

h1, h2, h3, h4 {
  line-height: 1.2;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); margin: 0 0 0.5rem; }
h2 { font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.6rem); margin: 0 0 0.6rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.35rem; }

p { margin: 0 0 0.9rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); text-underline-offset: 2px; transition: color 0.12s ease; }
a:hover { color: var(--link-hover); }
a:has(.btn), a:has(button) { text-decoration: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--surface);
  color: var(--ink);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* =========================================================================
   government banner strip + masthead
   ========================================================================= */
.gov-strip {
  background: var(--gov-strip-bg);
  color: var(--gov-strip-ink);
  font-size: 0.76rem;
  letter-spacing: 0.01em;
}
.gov-strip__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.4rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.gov-strip__seal { width: 16px; height: 16px; flex: none; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  color: var(--masthead-ink);
  background: linear-gradient(120deg, var(--masthead-bg), var(--masthead-bg-2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.6);
}
.masthead__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.masthead__seal {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
.masthead__titles { display: flex; flex-direction: column; line-height: 1.25; margin-right: auto; }
.masthead__eyebrow {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--masthead-ink-soft);
}
.masthead__program {
  margin: 0.05rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.005em;
}
.masthead__office { margin: 0; font-size: 0.82rem; color: var(--masthead-ink-soft); }

.masthead__nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.masthead__nav a {
  color: var(--masthead-ink);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  opacity: 0.86;
  transition: background 0.12s ease, opacity 0.12s ease;
}
.masthead__nav a:hover { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.masthead__nav a[aria-current="page"] {
  opacity: 1;
  background: rgba(255, 255, 255, 0.16);
}
.masthead__whoami {
  align-self: center;
  font-size: 0.78rem;
  color: var(--masthead-ink-soft);
  padding-left: 0.4rem;
}
.masthead__nav a.signout {
  border: 1px solid rgba(255, 255, 255, 0.28);
}

@media (max-width: 640px) {
  .masthead__inner { gap: 0.75rem; }
  .masthead__seal { width: 44px; height: 44px; }
  .masthead__program { font-size: 1.12rem; }
  .masthead__nav { width: 100%; }
}

/* legacy <header> fallback (kept so any un-migrated page still looks intentional) */
body > header:not(.masthead) {
  position: sticky; top: 0; z-index: 20;
  padding: 1.1rem 1.5rem;
  color: var(--masthead-ink);
  background: linear-gradient(120deg, var(--masthead-bg), var(--masthead-bg-2));
}
body > header:not(.masthead) h1 { color: var(--masthead-ink); font-size: 1.15rem; }
body > header:not(.masthead) p { color: var(--masthead-ink-soft); font-size: 0.85rem; margin: 0.2rem 0 0; }
body > header:not(.masthead) nav { display: flex; gap: 1rem; margin-bottom: 0.5rem; }
body > header:not(.masthead) nav a { color: var(--masthead-ink); font-size: 0.82rem; }

/* =========================================================================
   layout
   ========================================================================= */
main {
  max-width: 680px;
  margin: 2.5rem auto;
  padding: 0 1.25rem 4rem;
}
main.wide { max-width: var(--maxw); }
main:has(> .hero) { max-width: var(--maxw); }

.section { margin: 2.75rem 0; }
.section > h2 { margin-bottom: 1.1rem; }
.center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--brand);
  margin: 0 0 0.6rem;
}
.lead { font-size: 1.08rem; color: var(--ink-soft); }

/* =========================================================================
   hero
   ========================================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem 0 1rem;
}
.hero__text h1 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.005em; }
.hero__text .lead { max-width: 46ch; }
.hero__art {
  justify-self: center;
  position: relative;
  width: min(320px, 78vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.hero__art::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--brand-tint), transparent 70%);
}
.hero__art img {
  position: relative;
  width: 82%;
  height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(11, 61, 48, 0.28));
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; text-align: center; }
  .hero__text .lead { margin-inline: auto; }
  .hero__art { order: -1; width: min(220px, 60vw); }
  .cta-row { justify-content: center; }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

/* =========================================================================
   buttons
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn--primary {
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn--ghost {
  color: var(--link);
  background: var(--surface);
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: var(--brand); background: var(--surface-muted); }

/* form / admin buttons (bare <button>) keep the primary look */
main button:not(.btn) {
  margin-top: 1.35rem;
  padding: 0.72rem 1.4rem;
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.12s ease, filter 0.12s ease;
}
main button:not(.btn):hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
main button:not(.btn):active:not(:disabled) { transform: translateY(0); }
main button:not(.btn):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main button:not(.btn):disabled { opacity: 0.55; cursor: not-allowed; }
.toolbar button { margin-top: 0 !important; }

/* =========================================================================
   cards / panels
   ========================================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.7rem;
  margin-bottom: 1.25rem;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

.card--brand {
  border-color: transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--brand), var(--gold)) border-box;
  border: 1px solid transparent;
}

.card--accent { border-left: 4px solid var(--brand); }

.banner {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1.05rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  background: var(--gold-tint);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
}
.banner::before { content: "\1F512"; font-size: 0.95rem; line-height: 1.4; }

/* =========================================================================
   "how it works" steps
   ========================================================================= */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.steps > li {
  counter-increment: step;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem 1.3rem 1.3rem;
}
.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.7rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* =========================================================================
   feature grid
   ========================================================================= */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}
.feature h3 { display: flex; align-items: center; gap: 0.5rem; }
.feature .ico {
  width: 1.6rem; height: 1.6rem; flex: none;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 0.95rem;
}
.feature p { font-size: 0.9rem; color: var(--ink-soft); margin: 0.4rem 0 0; }

/* =========================================================================
   forms
   ========================================================================= */
fieldset {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.35rem;
  margin: 0 0 1.25rem;
}
fieldset > legend {
  padding: 0 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand);
}

label {
  display: block;
  margin: 0.95rem 0 0.3rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}
label.inline,
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 500;
  line-height: 1.45;
}

input, select, textarea {
  width: 100%;
  padding: 0.62rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--field-border-hover); }
input[type="checkbox"], input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  margin-top: 0.12rem;
  padding: 0;
  accent-color: var(--brand);
}
textarea { resize: vertical; min-height: 3.4rem; }
::placeholder { color: var(--ink-faint); opacity: 1; }

input:focus, select:focus, textarea:focus,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.35rem;
}
.form-actions button { margin-top: 0 !important; }

/* scrollable legal / privacy-notice text */
.notice-box {
  max-height: 15rem;
  overflow-y: auto;
  margin: 0.5rem 0 0.9rem;
  padding: 0.9rem 1rem;
  white-space: pre-wrap;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-soft);
  background: var(--surface-inset);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
}
.notice-box:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* uploaded-file checklist (document upload page) */
.file-list {
  list-style: none;
  margin: 0.4rem 0 0.9rem;
  padding: 0;
  font-size: 0.9rem;
}
.file-list li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--hairline);
}
.file-list li:last-child { border-bottom: none; }
.file-list li.muted { color: var(--ink-faint); }

/* issued ID cards (admin application detail) */
.issued-card {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
}
.issued-card:last-child { border-bottom: none; }
.issued-card p { margin: 0 0 0.3rem; font-size: 0.9rem; }
/* QR must stay dark-on-light regardless of theme so it scans */
.qr {
  flex: 0 0 auto;
  width: 148px;
  height: 148px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
}
.qr svg { width: 100%; height: 100%; display: block; }

/* toolbar (admin) */
.toolbar {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.toolbar > div { flex: 1 1 12rem; min-width: 0; }
.toolbar label { margin-top: 0; }
.toolbar button { flex: 0 0 auto; }

/* small inline action buttons (e.g. per-row status changes) */
button.mini {
  margin: 0 0.15rem 0.15rem 0 !important;
  padding: 0.28rem 0.6rem !important;
  font-size: 0.78rem !important;
  font-weight: 600;
  color: var(--link) !important;
  background: var(--surface) !important;
  border: 1px solid var(--hairline-strong) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}
button.mini:hover:not(:disabled) {
  border-color: var(--brand) !important;
  background: var(--surface-muted) !important;
  transform: none !important;
}

/* =========================================================================
   text bits / feedback
   ========================================================================= */
.msg {
  margin: 0.7rem 0 0;
  font-size: 0.9rem;
  white-space: pre-line;
  min-height: 1.2em;
  color: var(--ink-soft);
}
.msg.error, .msg.ok {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.msg.error { color: var(--danger-ink); background: var(--danger-bg); border-color: var(--badge-revoked-brd); }
.msg.ok { color: var(--ok-ink); background: var(--ok-bg); border-color: var(--badge-valid-brd); }
.field-error { color: var(--danger-ink); font-size: 0.85rem; margin-top: 0.25rem; }
.muted { color: var(--ink-soft); font-size: 0.88rem; }
small.muted, .muted.small { font-size: 0.8rem; }

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-inset);
  border: 1px solid var(--hairline);
  padding: 0.08rem 0.35rem;
  border-radius: 5px;
}

/* key/value detail list (admin) */
.kv {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: 0.45rem 1.2rem;
  margin: 0;
}
.kv dt { font-weight: 600; font-size: 0.84rem; color: var(--ink-soft); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .kv { grid-template-columns: 1fr; gap: 0.15rem; }
  .kv dd { margin-bottom: 0.5rem; }
}

/* tables (admin) */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--hairline); }
thead th {
  position: sticky;
  top: 0;
  background: var(--surface-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--row-hover); }
.mono, td.mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* =========================================================================
   status badges + verification result
   ========================================================================= */
.status-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--badge-neutral-brd);
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-ink);
}
.status-valid    { background: var(--badge-valid-bg);   color: var(--badge-valid-ink);   border-color: var(--badge-valid-brd); }
.status-revoked  { background: var(--badge-revoked-bg); color: var(--badge-revoked-ink); border-color: var(--badge-revoked-brd); }
.status-expired  { background: var(--badge-expired-bg); color: var(--badge-expired-ink); border-color: var(--badge-expired-brd); }
.status-not_found{ background: var(--badge-neutral-bg); color: var(--badge-neutral-ink); border-color: var(--badge-neutral-brd); }

.verify-result { text-align: center; }
.verify-result__mark {
  width: 68px; height: 68px;
  margin: 0.25rem auto 0.9rem;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 2rem; font-weight: 700;
  border: 2px solid currentColor;
}
.verify-result.is-valid    .verify-result__mark { color: var(--badge-valid-ink);   background: var(--badge-valid-bg); }
.verify-result.is-revoked  .verify-result__mark { color: var(--badge-revoked-ink); background: var(--badge-revoked-bg); }
.verify-result.is-expired  .verify-result__mark { color: var(--badge-expired-ink); background: var(--badge-expired-bg); }
.verify-result.is-not_found .verify-result__mark { color: var(--badge-neutral-ink); background: var(--badge-neutral-bg); }
.verify-result h2 { margin-top: 0.5rem; }
.verify-names {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.6rem 0;
}
.verify-meta {
  display: inline-grid;
  grid-template-columns: max-content max-content;
  gap: 0.3rem 1rem;
  text-align: left;
  margin: 0.4rem auto 0.9rem;
  font-size: 0.92rem;
}
.verify-meta dt { color: var(--ink-soft); font-weight: 600; }
.verify-meta dd { margin: 0; font-family: var(--font-mono); font-size: 0.86rem; }

/* =========================================================================
   footer
   ========================================================================= */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--hairline);
  background: var(--surface-muted);
}
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.8rem 1.5rem 2.4rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.site-footer__seal { width: 46px; height: 46px; flex: none; opacity: 0.9; }
.site-footer p { margin: 0 0 0.3rem; font-size: 0.85rem; color: var(--ink-soft); }
.site-footer strong { color: var(--ink); }

/* =========================================================================
   motion / fallback
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
