/* ibm-verify.facenition.com. Mobile first. */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --ink: #0f1729;
  --ink-2: #4a5468;
  --ink-3: #7a8396;
  --line: #e2e5ea;
  --accent: #1f5eff;
  --accent-ink: #ffffff;
  --accent-soft: #e8efff;
  --ok: #12805c;
  --ok-soft: #e3f5ee;
  --warn: #a15c00;
  --warn-soft: #fff2de;
  --err: #c0262d;
  --err-soft: #fde8e8;
  --code-bg: #f3f4f7;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17;
    --surface: #131a26;
    --surface-2: #1a2231;
    --ink: #e8ecf3;
    --ink-2: #a9b2c3;
    --ink-3: #7c8699;
    --line: #253043;
    --accent: #5b8cff;
    --accent-ink: #0b0f17;
    --accent-soft: #1b2a4d;
    --ok: #3ccf95;
    --ok-soft: #12352a;
    --warn: #f0a640;
    --warn-soft: #3a2a12;
    --err: #ff6b70;
    --err-soft: #3d1a1d;
    --code-bg: #0f1520;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: 16px 16px 48px; outline: none; }
a { color: var(--accent); }
code { font-family: var(--mono); font-size: .86em; background: var(--code-bg); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
pre { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; margin: 8px 0 0; white-space: pre; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--ink-2); }
.fine { color: var(--ink-3); font-size: .85rem; margin-top: 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header and footer */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: .98rem; }
.brand .x { color: var(--ink-3); font-weight: 450; }
.logo { height: 30px; width: auto; display: block; flex: none; }
@media (prefers-color-scheme: dark) {
  /* The logo is dark blue on transparent; give it a light plate so it stays legible. */
  .logo { background: #fff; border-radius: 8px; padding: 3px 6px; box-sizing: content-box; height: 26px; }
}
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .93rem; }
.nav a.on { color: var(--ink); background: var(--surface-2); font-weight: 600; }
.foot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); color: var(--ink-3); font-size: .82rem; border-top: 1px solid var(--line); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--ink-3); }
.btn:focus-visible, .tabs button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.wide { width: 100%; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .88rem; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: default; }

/* home and docs */
.hero { padding: 28px 0 8px; }
.hero.small { padding-top: 16px; }
.eyebrow { color: var(--accent); font-weight: 650; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .6em; }
.hero h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 62ch; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cta .btn { flex: 1 1 180px; }
.block { margin-top: 32px; scroll-margin-top: 80px; }
.block.two { display: grid; gap: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel h3 { margin-bottom: .6em; }

.flow { list-style: none; padding: 0; margin: 0; counter-reset: f; display: grid; gap: 10px; }
.flow li { counter-increment: f; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 52px; display: grid; gap: 2px; }
.flow li::before { content: counter(f); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.flow span { color: var(--ink-2); font-size: .95rem; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.ticks.no li::before { width: 12px; height: 2.5px; border: 0; background: var(--err); transform: none; top: .7em; }

.toc { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 2px; margin-top: 12px; scrollbar-width: none; }
.toc a { flex: none; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: .88rem; }

.hosts { display: grid; gap: 0; justify-items: stretch; margin-bottom: 14px; }
.host { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; align-content: start; }
.host b { font-family: var(--mono); font-size: .92rem; overflow-wrap: anywhere; }
.host span { color: var(--ink-2); font-size: .92rem; }
.host.accent { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.arrow { height: 22px; width: 2px; background: var(--line); justify-self: center; position: relative; }
.arrow::after { content: ""; position: absolute; bottom: -1px; left: -4px; border: 5px solid transparent; border-top-color: var(--ink-3); border-bottom: 0; }

.steps { padding-left: 1.3em; margin: 0; display: grid; gap: 8px; }
.steps.compact { gap: 6px; }
.steps li::marker { color: var(--accent); font-weight: 700; }

.group { margin-top: 22px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag { font-size: .72rem; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.ep { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }
.ep summary { cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; list-style: none; }
.ep summary::-webkit-details-marker { display: none; }
.ep summary code { background: none; padding: 0; font-size: .9rem; }
.ep > p, .ep > pre { margin: 0 14px 12px; }
.ep > pre { margin-top: 0; }
.m { font: 700 .7rem var(--mono); padding: 3px 7px; border-radius: 6px; letter-spacing: .03em; }
.m.post { background: var(--accent-soft); color: var(--accent); }
.m.get { background: var(--ok-soft); color: var(--ok); }

.table-wrap { overflow-x: auto; }
.kv { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .93rem; }
.kv th, .kv td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv thead th { background: var(--surface-2); font-size: .8rem; color: var(--ink-2); }
.kv tr:last-child td { border-bottom: 0; }

/* card and tabs */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-top: 12px; overflow: hidden; }
.card.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.card-head { padding: 20px 18px 6px; }
.card-head h1 { font-size: 1.4rem; margin-bottom: .25em; }
.card-head p { margin: 0; }
.tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar, .toc::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; min-height: 46px; padding: 0 12px; border: 0; background: none; cursor: pointer;
  font: 600 .93rem var(--sans); color: var(--ink-3); border-bottom: 2.5px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.panel-body { padding: 18px; }

/* form */
.form { display: grid; gap: 8px; max-width: 460px; }
.form label { font-weight: 600; font-size: .93rem; }
.form input {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 16px var(--sans);
}
.hint { color: var(--ink-3); font-size: .87rem; margin: 0 0 6px; }
.note { min-height: 0; margin: 4px 0 6px; font-size: .93rem; color: var(--ink-2); }
.note:empty { display: none; }
.note.err { color: var(--err); background: var(--err-soft); padding: 10px 12px; border-radius: 10px; }

/* scanner */
.scanner { max-width: 460px; margin: 0 auto; }
.stage {
  position: relative; aspect-ratio: 3 / 4; width: 100%; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 30%, var(--surface-2), var(--bg)); border: 1px solid var(--line);
}
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); opacity: 0; transition: opacity .25s; }
.stage[data-state="live"] video, .stage[data-state="busy"] video { opacity: 1; }
.oval {
  position: absolute; left: 50%; top: 46%; width: 62%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%);
  border-radius: 50%; border: 3px dashed color-mix(in srgb, var(--ink-3) 70%, transparent);
  box-shadow: 0 0 0 999px color-mix(in srgb, #000 28%, transparent);
  opacity: 0; transition: opacity .25s;
}
.stage[data-state="live"] .oval, .stage[data-state="busy"] .oval { opacity: 1; }
.stage[data-state="live"] .oval { border-color: rgba(255,255,255,.85); }
.stage-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; color: var(--ink-2); font-size: .93rem; }
.stage[data-state="live"] .stage-msg, .stage[data-state="busy"] .stage-msg { display: none; }
.cam-icon { width: 56px; height: 42px; border: 3px solid var(--ink-3); border-radius: 10px; position: relative; }
.cam-icon::before { content: ""; position: absolute; width: 16px; height: 16px; border: 3px solid var(--ink-3); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.busy { position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: 10px; color: #fff; font-weight: 600; background: rgba(0,0,0,.35); }
.stage[data-state="busy"] .busy { display: grid; }
.spinner { width: 36px; height: 36px; border: 3.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.actions { display: grid; gap: 8px; margin-top: 12px; }
.timer { text-align: center; font: 600 .9rem var(--mono); color: var(--ink-2); margin-bottom: 10px; }

/* result states */
.done { text-align: center; max-width: 460px; margin: 0 auto; padding: 12px 0; }
.badge { display: inline-block; width: 56px; height: 56px; border-radius: 50%; position: relative; margin-bottom: 10px; }
.badge.ok { background: var(--ok-soft); }
.badge.ok::after { content: ""; position: absolute; left: 18px; top: 18px; width: 20px; height: 11px; border-left: 3.5px solid var(--ok); border-bottom: 3.5px solid var(--ok); transform: rotate(-45deg); }
.badge.bad { background: var(--err-soft); }
.badge.bad::before, .badge.bad::after { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 3.5px; background: var(--err); border-radius: 2px; }
.badge.bad::before { transform: translate(-50%, -50%) rotate(45deg); }
.badge.bad::after { transform: translate(-50%, -50%) rotate(-45deg); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.facts dt { color: var(--ink-3); font-size: .87rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* how it works */
.howto { max-width: 62ch; }
.howto .steps { margin-bottom: 14px; }

/* advanced */
.adv-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.adv-bar p { margin: 0; font-size: .92rem; }
.adv-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 22px 0 8px; }
.evs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ev { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); display: grid; gap: 4px; min-width: 0; }
.ev.nested { margin-left: 14px; border-left: 3px solid var(--accent-soft); background: var(--surface-2); }
.ev-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; }
.route { font-weight: 600; color: var(--ink-2); }
.pill { font: 700 .72rem var(--mono); padding: 2px 7px; border-radius: 6px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.pill.skip { background: var(--surface-2); color: var(--ink-3); }
.ms { color: var(--ink-3); font-size: .8rem; margin-left: auto; }
.ev-title { background: none; padding: 0; font-size: .86rem; overflow-wrap: anywhere; }
.ev time { color: var(--ink-3); font: .75rem var(--mono); }
.ev details summary { cursor: pointer; font-size: .84rem; color: var(--accent); padding: 4px 0; }
.jb { margin-top: 6px; }
.jb-label { font-size: .75rem; color: var(--ink-3); font-weight: 600; }
.op { font: 700 .7rem var(--mono); padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.op.insert { background: var(--ok-soft); color: var(--ok); }
.op.update { background: var(--warn-soft); color: var(--warn); }
table.row { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 4px; }
table.row th, table.row td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.row th { font: 600 .76rem var(--mono); color: var(--ink-3); white-space: nowrap; width: 1%; }
table.row td { font-family: var(--mono); overflow-wrap: anywhere; word-break: break-word; }
table.row tr.chg th, table.row tr.chg td { background: var(--accent-soft); color: var(--ink); }
.null { color: var(--ink-3); font-style: italic; }

/* wider screens */
@media (min-width: 640px) {
  main { padding: 24px 24px 64px; }
  .block.two { grid-template-columns: 1fr 1fr; }
  .card-head { padding: 24px 24px 8px; }
  .tabs { padding: 0 16px; }
  .panel-body { padding: 24px; }
  .hosts { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; }
  .arrow { width: 22px; height: 2px; align-self: center; }
  .arrow::after { bottom: auto; left: auto; right: -1px; top: -4px; border: 5px solid transparent; border-left-color: var(--ink-3); border-right: 0; }
  .stage { aspect-ratio: 4 / 3; }
  .oval { width: 40%; }
}
