:root {
  --ink: #17211e;
  --muted: #64716c;
  --paper: #f7f3ea;
  --panel: #fffdf8;
  --panel-strong: #ffffff;
  --field: #ffffff;
  --field-muted: #f8f6ef;
  --line: #d8d0bd;
  --green: #127a3d;
  --orange: #b65d00;
  --red: #b42318;
  --brand: #102d4e;
  --card-brand: #102d4e;
  --brand-contrast: #ffffff;
  --gold: #d9a441;
  --topbar-bg: rgba(247,243,234,.94);
  --shadow: rgba(23,33,30,.06);
  --shadow-strong: rgba(16,45,78,.16);
  --warm-band: #eee6d5;
  --success-bg: #e8f5ed;
  --warning-bg: #fff5df;
  --warning-text: #5f3d00;
  --focus: #d9a441;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --ink: #edf4ee;
  --muted: #a7b5af;
  --paper: #071321;
  --panel: #0d1d2d;
  --panel-strong: #12273a;
  --field: #0a1725;
  --field-muted: #102235;
  --line: #2b4357;
  --green: #3fc77a;
  --orange: #f2a74b;
  --red: #ff746b;
  --brand: #7fb5e8;
  --card-brand: #102d4e;
  --brand-contrast: #071321;
  --gold: #f0c96a;
  --topbar-bg: rgba(7,19,33,.94);
  --shadow: rgba(0,0,0,.28);
  --shadow-strong: rgba(0,0,0,.42);
  --warm-band: #102235;
  --success-bg: rgba(63,199,122,.13);
  --warning-bg: rgba(242,167,75,.14);
  --warning-text: #ffd791;
  --focus: #f0c96a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ink: #edf4ee;
    --muted: #a7b5af;
    --paper: #071321;
    --panel: #0d1d2d;
    --panel-strong: #12273a;
    --field: #0a1725;
    --field-muted: #102235;
    --line: #2b4357;
    --green: #3fc77a;
    --orange: #f2a74b;
    --red: #ff746b;
    --brand: #7fb5e8;
    --card-brand: #102d4e;
    --brand-contrast: #071321;
    --gold: #f0c96a;
    --topbar-bg: rgba(7,19,33,.94);
    --shadow: rgba(0,0,0,.28);
    --shadow-strong: rgba(0,0,0,.42);
    --warm-band: #102235;
    --success-bg: rgba(63,199,122,.13);
    --warning-bg: rgba(242,167,75,.14);
    --warning-text: #ffd791;
    --focus: #f0c96a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); overflow-x: hidden; }
a { color: inherit; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(18px, 4vw, 48px); background: var(--topbar-bg); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.brand { display: grid; grid-template-columns: 38px auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-decoration: none; line-height: 1; }
.brand img { grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 8px; }
.brand span { font-family: "JetBrains Mono", monospace; font-weight: 800; letter-spacing: 0; }
.brand small, .eyebrow { color: var(--muted); font: 700 12px/1.4 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: 0; }
nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
nav a, nav button, .pill { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: var(--panel); color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; }
.theme-toggle { gap: 7px; min-width: 104px; }
.theme-toggle span { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--gold); font-size: 12px; line-height: 1; }
.theme-toggle strong { font-size: 14px; font-weight: 800; }
main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 38px 0 64px; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.04; }
h1 { font: 700 64px/.95 "Crimson Text", serif; }
h2 { font-size: 24px; }
p { color: var(--muted); line-height: 1.65; }
.hero { min-height: 70vh; display: grid; grid-template-columns: 1fr minmax(280px, 420px); align-items: center; gap: 48px; }
.hero p { font-size: 18px; max-width: 650px; }
.actions, .row-actions, .tabs { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.button, button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; border: 0; border-radius: 8px; padding: 11px 16px; background: var(--brand); color: var(--brand-contrast); text-decoration: none; font-weight: 700; cursor: pointer; }
.button.secondary { background: transparent; color: var(--brand); border: 1px solid var(--line); }
button:disabled, .button[aria-disabled="true"] { cursor: not-allowed; opacity: .62; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 72%, transparent); outline-offset: 2px; }
.grid { display: grid; gap: 18px; margin: 24px 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel, .sample-card, .credential-card, .row { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 22px; box-shadow: 0 12px 30px var(--shadow); }
.control-link { display: block; color: inherit; text-decoration: none; }
.public-directory { margin-top: 44px; }
.profile-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.profile-directory-card { display: grid; gap: 8px; min-height: 188px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; text-decoration: none; box-shadow: 0 12px 30px var(--shadow); }
.profile-directory-card:hover { border-color: color-mix(in srgb, var(--brand) 58%, var(--line)); box-shadow: 0 18px 44px var(--shadow-strong); }
.profile-directory-card h3 { margin: 0; color: var(--brand); font-size: 24px; line-height: 1.08; overflow-wrap: anywhere; }
.profile-directory-card p { margin: 0; color: var(--ink); line-height: 1.4; }
.profile-directory-card small { color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.profile-directory-card strong { align-self: end; color: var(--gold); font: 800 12px/1.3 "JetBrains Mono", monospace; text-transform: uppercase; }
.sample-card, .credential-card { min-height: 260px; display: grid; align-content: space-between; background: var(--card-brand); color: var(--card-text, #fff); }
.sample-card p, .credential-card p, .credential-card .eyebrow { color: var(--card-muted, #f7eac5); }
.credential-card { position: relative; isolation: isolate; overflow: hidden; grid-template-columns: minmax(0, 1fr) 132px; gap: 20px; background: var(--card-brand); }
.credential-card > * { position: relative; z-index: 1; }
.credential-card a { color: var(--card-link, #fff); }
.credential-card h1 { font-size: 42px; }
.card-finish-classic { background: linear-gradient(135deg, var(--card-brand), #14385f 64%, #081c33); }
.card-finish-silver {
  --card-text: #152033;
  --card-muted: #485569;
  --card-link: #152033;
  background:
    linear-gradient(120deg, rgba(255,255,255,.74), transparent 22%, rgba(255,255,255,.5) 42%, transparent 62%),
    linear-gradient(135deg, #f7f9fb 0%, #c9d1dc 28%, #eef2f6 48%, #9daabd 72%, #f8fafc 100%);
}
.card-finish-chrome {
  --card-text: #101827;
  --card-muted: #38465a;
  --card-link: #101827;
  background:
    linear-gradient(108deg, transparent 0 17%, rgba(255,255,255,.88) 23%, transparent 31% 48%, rgba(36,52,78,.26) 56%, transparent 68%),
    linear-gradient(135deg, #eef4f8 0%, #8fa3b8 18%, #f8fbfd 34%, #52677d 52%, #e7edf2 70%, #a9b7c6 100%);
}
.card-finish-gold_shimmer {
  --card-text: #211a08;
  --card-muted: #53411a;
  --card-link: #211a08;
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,.72), transparent 19%),
    linear-gradient(112deg, transparent 0 24%, rgba(255,255,255,.52) 32%, transparent 42%),
    linear-gradient(135deg, #fff3be 0%, #d9a441 26%, #f8dc82 48%, #a87922 74%, #ffe7a3 100%);
}
.card-finish-silver::after, .card-finish-chrome::after, .card-finish-gold_shimmer::after {
  content: "";
  position: absolute;
  inset: -35% -20%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.42) 48%, transparent 63%);
  transform: rotate(8deg);
}
.card-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.card-identity > div { min-width: 0; }
.role-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.role-list span { display: inline-flex; max-width: 100%; overflow-wrap: anywhere; border: 1px solid rgba(255,255,255,.34); border-radius: 8px; padding: 4px 8px; background: rgba(0,0,0,.12); color: var(--card-text, #fff); font-size: 13px; line-height: 1.25; }
.organization-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.organization-list strong { display: inline-flex; max-width: 100%; overflow-wrap: anywhere; border: 1px solid rgba(255,255,255,.38); border-radius: 999px; padding: 4px 8px; background: rgba(255,255,255,.14); color: var(--card-text, #fff); font-size: 13px; line-height: 1.2; }
.profile-photo-preview { display: flex; align-items: center; gap: 14px; }
.profile-photo-preview img, .profile-photo { display: block; width: 72px; height: 72px; aspect-ratio: 1; flex: 0 0 72px; object-fit: cover; object-position: center; border: 2px solid var(--gold); border-radius: 999px; background: var(--panel); overflow: hidden; }
.profile-photo.preview { width: 132px; height: 132px; flex-basis: 132px; }
.profile-photo.large { width: 96px; height: 96px; flex-basis: 96px; }
.photo-editor { display: grid; width: max-content; max-width: 100%; gap: 8px; justify-items: center; }
.photo-editor-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.photo-editor-frame { position: relative; display: grid; place-items: center; width: 132px; height: 132px; border: 2px solid var(--gold); border-radius: 999px; overflow: hidden; background: var(--card-brand); color: #fff; cursor: pointer; box-shadow: 0 12px 28px var(--shadow); }
.photo-editor-frame .profile-photo.preview { width: 100%; height: 100%; flex-basis: auto; border: 0; border-radius: inherit; }
.photo-editor-placeholder { display: grid; place-items: center; width: 100%; height: 100%; padding: 18px; text-align: center; font-weight: 800; color: #f8f1dc; }
.photo-editor-action { position: absolute; inset: auto 0 0; min-height: 34px; display: grid; place-items: center; padding: 7px 10px; background: rgba(16,45,78,.88); color: #fff; font: 800 12px/1 "JetBrains Mono", monospace; text-transform: uppercase; }
.photo-editor-frame:hover .photo-editor-action, .photo-editor-frame:focus-within .photo-editor-action { background: rgba(217,164,65,.94); color: var(--ink); }
.photo-editor-remove { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 13px; cursor: pointer; }
.photo-editor-remove input { width: 18px; height: 18px; }
.qr { width: 132px; height: 132px; padding: 8px; background: #fff; border-radius: 8px; }
.qr svg { width: 100%; height: 100%; display: block; }
.public-profile { display: grid; gap: 18px; }
.public-profile .isid-profile-card { min-height: 340px; display: grid; grid-template-columns: 1fr; gap: 0; padding: 0; border-color: rgba(16,45,78,.24); box-shadow: 0 22px 70px var(--shadow-strong); }
.public-profile .isid-profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.16), transparent 16%, transparent 84%, rgba(0,0,0,.12)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 1px, transparent 1px 9px);
  opacity: .44;
}
.card-watermark { position: absolute; right: 30px; bottom: 24px; z-index: 0; color: var(--card-text, #fff); font: 800 96px/1 "JetBrains Mono", monospace; opacity: .055; pointer-events: none; }
.id-card-topline { display: flex; justify-content: space-between; gap: 18px; padding: 18px 24px 0; color: var(--card-muted, #f7eac5); font: 800 11px/1.3 "JetBrains Mono", monospace; text-transform: uppercase; }
.id-card-grid { display: grid; grid-template-columns: 124px minmax(0, 1fr) 190px; align-items: start; gap: 24px; padding: 22px 24px 20px; }
.id-photo-column { display: grid; justify-items: center; gap: 8px; }
.public-profile .profile-photo.large.id-photo { width: 104px; height: 126px; flex-basis: auto; border-radius: 8px; border-color: var(--accent); box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.id-photo-empty { display: grid; place-items: center; font: 800 18px/1 "JetBrains Mono", monospace; color: #fff; }
.id-photo-label { color: var(--card-muted, #f7eac5); font: 800 10px/1 "JetBrains Mono", monospace; text-transform: uppercase; }
.id-card-identity { min-width: 0; padding-top: 6px; }
.id-card-identity h1 { max-width: 720px; margin-bottom: 14px; color: var(--card-text, #fff); font-size: clamp(34px, 5vw, 56px); overflow-wrap: anywhere; }
.field-label { display: block; margin-bottom: 6px; color: var(--card-muted, #f7eac5); font: 800 10px/1 "JetBrains Mono", monospace; text-transform: uppercase; }
.role-cluster { display: grid; gap: 0; margin-top: 4px; }
.public-profile .role-list { gap: 8px; margin-top: 0; }
.public-profile .role-list span { border-color: color-mix(in srgb, var(--card-text, #fff) 32%, transparent); border-radius: 999px; padding: 5px 10px; background: color-mix(in srgb, var(--card-text, #fff) 13%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--card-text, #fff) 18%, transparent); font-size: 14px; font-weight: 800; }
.affiliation-block { display: grid; gap: 6px; margin-top: 16px; max-width: 640px; padding-left: 12px; border-left: 3px solid var(--accent); }
.affiliation-list { display: grid; gap: 4px; }
.affiliation-list span { display: block; max-width: 100%; color: var(--card-text, #fff); font: 800 13px/1.35 "JetBrains Mono", monospace; text-transform: uppercase; overflow-wrap: anywhere; }
.affiliation-list span::before { content: ""; display: inline-block; width: 14px; height: 2px; margin: 0 8px 3px 0; border-radius: 999px; background: var(--accent); opacity: .95; }
.dashboard-profile-card { min-height: 340px; grid-template-columns: 1fr; gap: 0; padding: 0; border-color: rgba(16,45,78,.24); box-shadow: 0 18px 54px var(--shadow-strong); }
.dashboard-profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.14), transparent 22%, transparent 82%, rgba(0,0,0,.11)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 1px, transparent 1px 9px);
  opacity: .42;
}
.dashboard-card-grid { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 18px; padding: 20px 22px 18px; }
.dashboard-card-identity { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.dashboard-card-identity > div { min-width: 0; }
.dashboard-card-identity h2 { color: var(--card-text, #fff); font-size: 30px; line-height: 1.02; overflow-wrap: anywhere; }
.dashboard-profile-card .role-list { gap: 7px; margin-top: 0; }
.dashboard-profile-card .role-list span { border-color: color-mix(in srgb, var(--card-text, #fff) 32%, transparent); border-radius: 999px; padding: 5px 9px; background: color-mix(in srgb, var(--card-text, #fff) 13%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--card-text, #fff) 18%, transparent); font-size: 13px; font-weight: 800; }
.dashboard-profile-card .affiliation-block { margin-top: 12px; max-width: 100%; }
.dashboard-photo { width: 82px; height: 98px; flex: 0 0 82px; border-radius: 8px; border-color: var(--accent); }
.dashboard-verify { display: grid; justify-items: center; align-content: start; gap: 8px; min-width: 0; padding: 10px; border: 1px solid rgba(255,255,255,.38); border-radius: 8px; background: rgba(255,255,255,.9); color: #102033; box-shadow: 0 14px 34px rgba(0,0,0,.13); }
.dashboard-verify span { color: #102033; font: 800 10px/1 "JetBrains Mono", monospace; text-transform: uppercase; }
.dashboard-verify .qr { width: 108px; height: 108px; padding: 6px; }
.dashboard-card-footer { grid-template-columns: minmax(0, 1fr) auto; padding: 13px 22px 16px; }
.dashboard-card-footer a { color: var(--card-text, #fff); font: 800 11px/1.3 "JetBrains Mono", monospace; text-transform: uppercase; text-decoration: none; }
.verification-panel { display: grid; justify-items: center; align-content: start; gap: 10px; min-width: 0; padding: 12px; border: 1px solid rgba(255,255,255,.38); border-radius: 8px; background: rgba(255,255,255,.9); color: #102033; box-shadow: 0 18px 44px rgba(0,0,0,.15); }
.verification-panel span { color: #102033; font: 800 11px/1 "JetBrains Mono", monospace; text-transform: uppercase; }
.verification-panel .qr { width: 146px; height: 146px; padding: 8px; box-shadow: none; }
.verification-panel small { max-width: 100%; color: #4a5a68; font: 700 10px/1.35 "JetBrains Mono", monospace; overflow-wrap: anywhere; text-align: center; }
.id-card-footer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 24px 18px; border-top: 1px solid color-mix(in srgb, var(--card-text, #fff) 22%, transparent); color: var(--card-muted, #f7eac5); font: 800 11px/1.3 "JetBrains Mono", monospace; text-transform: uppercase; }
.id-card-footer strong { color: var(--card-text, #fff); }
.public-profile-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--warm-band); }
.public-profile-link span { flex: 0 0 auto; color: var(--muted); font: 800 11px/1 "JetBrains Mono", monospace; text-transform: uppercase; }
.public-profile-link div { display: grid; gap: 4px; min-width: 0; }
.public-profile-link a { min-width: 0; color: var(--brand); font: 700 14px/1.4 "JetBrains Mono", monospace; overflow-wrap: anywhere; }
.public-records-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-top: 8px; }
.public-records-head h2 { margin: 0; font-size: 30px; }
.public-records-head p { max-width: 360px; margin: 0; text-align: right; }
.credential-record { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, auto); align-items: center; padding: 22px; border-left: 5px solid color-mix(in srgb, var(--brand) 72%, var(--gold)); }
.record-body { min-width: 0; }
.record-kicker { margin: 0 0 8px; color: var(--brand); font: 800 11px/1 "JetBrains Mono", monospace; text-transform: uppercase; }
.credential-record h3 { margin-bottom: 12px; font-size: 22px; line-height: 1.12; overflow-wrap: anywhere; }
.record-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; }
.record-meta div { min-width: min(210px, 100%); }
.record-meta dt { color: var(--muted); font: 800 10px/1.4 "JetBrains Mono", monospace; text-transform: uppercase; }
.record-meta dd { margin: 2px 0 0; color: var(--ink); overflow-wrap: anywhere; }
.record-note { max-width: 780px; margin: 14px 0 0; color: var(--muted); }
.record-actions { justify-content: end; }
.record-actions a { color: var(--brand); font-weight: 800; }
.narrow { max-width: 760px; margin: 0 auto; }
.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 700; }
label small { color: var(--muted); font-weight: 600; line-height: 1.4; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; background: var(--field); color: var(--ink); font: inherit; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); opacity: 1; }
input[type="file"] { min-width: 0; font-size: 15px; }
textarea { min-height: 110px; resize: vertical; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: auto; }
.list { display: grid; gap: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.row > div:first-child { min-width: 0; }
.row.tall { align-items: stretch; }
.review { display: grid; grid-template-columns: 150px 1fr 1fr auto; gap: 8px; min-width: min(680px, 100%); }
.user-review-groups { gap: 18px; }
.user-review-group { display: grid; gap: 14px; }
.user-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.user-review-head p { margin: 0; }
.compact-actions { flex: 0 0 auto; }
.compact-actions .button { min-height: 38px; padding: 8px 12px; }
.bulk-review { display: grid; gap: 14px; }
.bulk-review-controls { display: grid; grid-template-columns: 190px 1fr 1fr auto; gap: 8px; align-items: center; }
.credential-review-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.credential-group-list { gap: 10px; }
.credential-group-list .credential-review-row { box-shadow: none; }
.bulk-select { display: flex; align-items: flex-start; padding-top: 7px; }
.bulk-select input { width: 22px; height: 22px; }
.admin-tabs a { text-decoration: none; }
.admin-control { display: grid; gap: 10px; min-width: min(260px, 100%); }
.admin-table div { grid-template-columns: minmax(130px, 1fr) minmax(180px, 2fr) minmax(120px, auto); }
.email-template-grid { align-items: start; }
.email-template-form textarea { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; line-height: 1.5; }
.email-console-summary { align-items: stretch; margin-bottom: 18px; }
.smtp-status-panel { border-top: 4px solid var(--brand); }
.smtp-config-panel { margin: 0 0 18px; }
.compact-head { align-items: start; margin-bottom: 16px; }
.compact-head h2 { margin: 0; }
.compact-head .muted { max-width: 680px; margin: 0; line-height: 1.45; }
.smtp-config-form { gap: 16px; }
.smtp-config-grid { gap: 16px; }
.smtp-toggle-row { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 4px 0; }
.smtp-toggle-row .check { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field-muted); }
.smtp-warning-list { display: grid; gap: 8px; margin: 0 0 14px; }
.smtp-warning-list p { margin: 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--orange) 54%, var(--line)); border-radius: 8px; background: var(--warning-bg); color: var(--warning-text); font-weight: 700; line-height: 1.35; }
.email-preview { display: grid; gap: 10px; }
.email-preview h3 { margin: 0; overflow-wrap: anywhere; }
.email-preview pre { margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--field); color: var(--ink); font-size: .92rem; line-height: 1.5; }
.email-html-preview { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--field); color: var(--ink); overflow-wrap: anywhere; }
.status { display: inline-flex; border-radius: 999px; padding: 7px 10px; color: #fff; font: 700 12px/1 "JetBrains Mono", monospace; text-transform: uppercase; }
.status-approved { background: var(--green); }
.status-awaiting { background: var(--orange); }
.status-flagged { background: var(--red); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.table { display: grid; gap: 10px; }
.table div { display: grid; grid-template-columns: 190px 1fr minmax(120px, auto); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.flash { margin-bottom: 18px; padding: 12px 14px; border-radius: 8px; background: var(--success-bg); color: var(--green); }
.error { color: var(--red); }
.warning { color: var(--orange); }
.error-list { margin: 12px 0; }
.import-row { border-left: 5px solid var(--line); }
.import-row-valid { border-left-color: var(--green); }
.import-row-invalid { border-left-color: var(--red); }
code { display: block; overflow-wrap: anywhere; padding: 12px; border-radius: 8px; background: var(--warm-band); }
.inline { display: inline-flex; gap: 8px; margin: 0; }
.footer { border-top: 1px solid var(--line); padding: 24px clamp(18px, 4vw, 48px); text-align: center; }
.footer p { max-width: 900px; margin: 0 auto; font-size: 13px; }
@media (max-width: 980px) {
  h1 { font-size: 52px; }
  .hero { min-height: auto; padding: 24px 0; grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 820px) {
  .hero, .grid.two, .grid.three, .grid.four, .credential-card, .profile-directory-grid { grid-template-columns: 1fr; }
  .section-head, .row { align-items: stretch; flex-direction: column; }
  .review, .split, .table div, .bulk-review-controls, .credential-review-row { grid-template-columns: 1fr; }
  .smtp-toggle-row { display: grid; grid-template-columns: 1fr; }
  .user-review-head { align-items: stretch; flex-direction: column; }
  .bulk-select { padding-top: 0; }
  .topbar { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 40px; }
  .credential-card h1 { font-size: 34px; }
  .credential-card { min-height: 0; gap: 16px; }
  .id-card-grid { grid-template-columns: 110px minmax(0, 1fr); }
  .dashboard-card-grid { grid-template-columns: 1fr; }
  .dashboard-verify { justify-self: start; grid-template-columns: auto auto; align-items: center; justify-items: start; }
  .dashboard-card-footer { grid-template-columns: 1fr; }
  .verification-panel { grid-column: 1 / -1; justify-self: start; grid-template-columns: auto auto; align-items: center; justify-items: start; }
  .verification-panel small { grid-column: 1 / -1; text-align: left; }
  .public-records-head { align-items: start; flex-direction: column; }
  .public-records-head p { max-width: none; text-align: left; }
  .credential-record { grid-template-columns: 1fr; }
  .record-actions { justify-content: start; }
  .qr { width: 116px; height: 116px; justify-self: start; }
  .row-actions, .actions, .tabs { align-items: stretch; }
  .row-actions > *, .actions > *, .tabs > * { flex: 1 1 auto; }
  .table div > * { min-width: 0; overflow-wrap: anywhere; }
}
@media (max-width: 560px) {
  .topbar { gap: 12px; padding: 12px 16px; }
  .brand { grid-template-columns: 34px auto; max-width: 100%; }
  .brand img { width: 34px; height: 34px; }
  .brand span { font-size: 16px; }
  .brand small { font-size: 10px; }
  nav { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  nav a, nav button, nav .pill { width: 100%; min-height: 44px; padding: 10px 9px; text-align: center; }
  nav .inline { display: block; width: 100%; }
  main { width: min(100% - 24px, 1180px); padding: 22px 0 46px; }
  h1 { font-size: 34px; line-height: 1; }
  h2 { font-size: 21px; }
  h3 { font-size: 18px; }
  p { line-height: 1.55; }
  .hero p { font-size: 16px; }
  .panel, .sample-card, .credential-card, .row { padding: 16px; }
  .grid { gap: 12px; margin: 16px 0; }
  .section-head { gap: 12px; margin-bottom: 16px; }
  .section-head .button, .button, button { width: 100%; min-height: 46px; }
  .credential-card { border-radius: 8px; }
  .credential-card h1 { font-size: 30px; }
  .public-profile .isid-profile-card { min-height: 0; }
  .id-card-topline { align-items: flex-start; flex-direction: column; gap: 5px; padding: 16px 16px 0; }
  .id-card-grid { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .id-photo-column { justify-items: start; grid-template-columns: auto minmax(0, 1fr); align-items: end; }
  .id-photo-label { padding-bottom: 3px; }
  .public-profile .profile-photo.large.id-photo { width: 78px; height: 94px; }
  .dashboard-card-grid { padding: 16px; }
  .dashboard-card-identity { flex-direction: column; gap: 12px; }
  .dashboard-card-identity h2 { font-size: 28px; }
  .dashboard-photo { width: 78px; height: 94px; }
  .dashboard-verify { justify-self: stretch; grid-template-columns: 1fr; justify-items: center; }
  .dashboard-verify .qr { width: 126px; height: 126px; }
  .dashboard-card-footer { padding: 12px 16px 16px; }
  .id-card-identity { padding-top: 0; }
  .id-card-identity h1 { font-size: 32px; }
  .role-cluster { margin-top: 2px; }
  .affiliation-block { margin-top: 14px; padding-left: 10px; }
  .affiliation-list span { font-size: 12px; }
  .affiliation-list span::before { width: 12px; margin-right: 7px; }
  .verification-panel { justify-self: stretch; grid-template-columns: 1fr; justify-items: center; }
  .verification-panel .qr { width: 132px; height: 132px; justify-self: center; }
  .verification-panel small { text-align: center; }
  .id-card-footer { grid-template-columns: 1fr; padding: 12px 16px 16px; }
  .public-profile-link { align-items: flex-start; flex-direction: column; gap: 8px; }
  .public-records-head h2 { font-size: 24px; }
  .credential-record { padding: 16px; }
  .credential-record h3 { font-size: 19px; }
  .record-actions { display: grid; grid-template-columns: 1fr; }
  .card-identity { align-items: flex-start; gap: 12px; }
  .profile-photo { width: 60px; height: 60px; flex-basis: 60px; }
  .profile-photo.large { width: 76px; height: 76px; flex-basis: 76px; }
  .profile-photo.preview { width: 112px; height: 112px; flex-basis: 112px; }
  .photo-editor { width: 100%; justify-items: center; }
  .photo-editor-frame { width: 112px; height: 112px; }
  .profile-photo-preview { justify-content: center; padding: 4px 0; }
  .qr { width: 104px; height: 104px; }
  .public-profile .credential-card .qr { justify-self: center; }
  .row-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .status { justify-content: center; min-height: 34px; text-align: center; }
  input, textarea, select { min-height: 44px; font-size: 16px; }
  input[type="color"] { min-height: 48px; padding: 6px; }
  input[type="checkbox"] { width: 22px; height: 22px; }
  .check { align-items: flex-start; }
  code { padding: 10px; font-size: 13px; }
  .footer { padding: 20px 16px; }
  .footer p { font-size: 12px; }
}
