/* HVG Authenticator Setup. Plain CSS, no build step, no inline styles (CSP). */

:root {
  --ink: #1b2430;
  --ink-soft: #4b5563;
  --line: #d9dee5;
  --paper: #ffffff;
  --ground: #f3f5f8;
  --brand: #2c3e5a;
  --brand-ink: #ffffff;
  --accent: #1a7f4b;
  --accent-soft: #e6f4ec;
  --warn: #b45309;
  --warn-soft: #fff4e5;
  --stop: #b91c1c;
  --stop-soft: #fdecec;
  --info-soft: #e8f0fb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 17px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--ground);
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #1d4ed8; }
a:focus-visible, button:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

code { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; background: #eef1f5; padding: 0 4px; border-radius: 4px; }

.wrap { width: min(100% - 2rem, 900px); margin-inline: auto; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }

/* Header: white so the HVG logo sits on its own background; the brand navy moves to the accent bar. */
.site-header { background: var(--paper); color: var(--ink); border-bottom: 4px solid var(--brand); }
.header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 10px 0; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand-logo { height: 56px; width: auto; display: block; }
.brand-name { font-size: 1.15rem; color: var(--brand); border-left: 2px solid var(--line); padding-left: 14px; line-height: 1.2; }
.nav-toggle { background: transparent; color: var(--brand); border: 1px solid var(--brand); border-radius: 8px; padding: 6px 12px; font: inherit; }
.site-nav { display: none; width: 100%; flex-wrap: wrap; gap: 4px 6px; padding-bottom: 8px; }
.site-nav.is-open { display: flex; }
.site-nav a { color: var(--brand); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 600; }
.site-nav a:hover, .site-nav a.is-active { background: var(--ground); }
@media (max-width: 480px) { .brand-logo { height: 44px; } .brand-name { font-size: 1rem; } }
@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; width: auto; padding-bottom: 0; }
}

main { padding: 20px 0 40px; }

/* Cards and typography */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 10px; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 0 0 8px; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 1.3em; }
li { margin-bottom: 4px; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }
.lead { font-size: 1.1rem; }
.loading { color: var(--ink-soft); padding: 24px 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { font-weight: 600; }
.kv dd { margin: 0; }

/* Notices */
.notice { border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; border: 1px solid transparent; }
.notice p:last-child { margin-bottom: 0; }
.notice-safety { background: var(--info-soft); border-color: #c7d7f2; }
.notice-warn { background: var(--warn-soft); border-color: #fcd9a8; }
.notice-stop { background: var(--stop-soft); border-color: #f5b5b5; }
.notice-ok { background: var(--accent-soft); border-color: #b9e3c9; }
.notice strong { display: block; margin-bottom: 2px; }

/* Buttons */
.btn { display: inline-block; background: var(--brand); color: #fff; text-decoration: none; padding: 10px 16px; border-radius: 10px; font-weight: 600; border: 1px solid var(--brand); font: inherit; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-secondary { background: #fff; color: var(--brand); }
.btn-stop { background: var(--stop); border-color: var(--stop); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }

/* Choice grid (decision tree and state pickers) */
.choice-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 12px 0 4px; }
@media (min-width: 620px) { .choice-grid { grid-template-columns: repeat(2, 1fr); } }
/* Choice cards are links styled as big tappable buttons: solid border in the brand color, a shadow, and a Select pill. */
.choice { text-align: left; background: #fff; border: 2px solid var(--brand); border-radius: var(--radius); padding: 14px; font: inherit; color: var(--ink); cursor: pointer; display: grid; gap: 8px; text-decoration: none; box-shadow: 0 2px 6px rgba(16, 24, 40, 0.12); position: relative; }
.choice:hover, .choice:focus-visible { background: #f5f8fc; box-shadow: 0 6px 16px rgba(16, 24, 40, 0.18); transform: translateY(-2px); }
.choice:active { transform: translateY(0); }
.choice-title { font-weight: 700; font-size: 1.1rem; color: var(--brand); }
.choice-desc { color: var(--ink-soft); font-size: 0.95rem; }
.choice-cta { justify-self: start; margin-top: 4px; display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; font-weight: 700; font-size: 0.95rem; padding: 9px 16px; border-radius: 999px; }
.choice-cta::after { content: "\203A"; font-size: 1.3em; line-height: 1; }
.choice:hover .choice-cta { filter: brightness(1.12); }
.choice-stop { border-color: var(--stop); }
.choice-stop .choice-title { color: var(--stop); }
.choice-stop .choice-cta { background: var(--stop); }
.choice-img { border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; padding: 8px; display: grid; place-items: center; }
.choice-img img { height: clamp(300px, 55vh, 460px); width: auto; max-width: 100%; object-fit: contain; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 12px; font-size: 0.95rem; }
.crumbs .chip { background: var(--accent-soft); color: #14532d; border-radius: 999px; padding: 3px 10px; }
.crumbs a { font-size: 0.9rem; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.step-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.step-num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }
.step-num.is-zero { background: var(--warn); }
.step-num.is-stop { background: var(--stop); }
.step-num.is-ok { background: var(--accent); }
.step-title { margin: 4px 0 0; font-size: 1.2rem; line-height: 1.25; }
.step-cond { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 2px 8px; margin-bottom: 6px; }
.step-body p:last-child { margin-bottom: 0; }
.paths { margin: 8px 0 12px; padding-left: 1.2em; }
.paths li { margin-bottom: 6px; }
.path { display: inline-block; background: #eef1f5; border-radius: 6px; padding: 2px 8px; font-weight: 600; }

/* Figures: real screenshots are never cropped or drawn on. Labels and captions sit outside the frame. */
.figures { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 12px 0 4px; }
/* Portrait phone shots sit two across; wide images (computer screens, HVG cards) always take the full row. */
@media (min-width: 620px) { .figures.two, .figures.three { grid-template-columns: repeat(2, 1fr); } .figure.is-wide { grid-column: 1 / -1; } }
.figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; padding: 10px; display: grid; gap: 8px; align-content: start; }
.figure-frame { display: grid; place-items: center; background: #fff; border-radius: 6px; padding: 6px; }
/* Portrait phone screenshots: size by height so they read at full size; never crop (object-fit: contain). */
.figure-frame img { height: clamp(420px, 75vh, 680px); width: auto; max-width: 100%; object-fit: contain; }
/* Wide images (computer screens, HVG cards): fill the width instead. */
.figure-frame.is-wide img { height: auto; width: 100%; max-width: 760px; }
.figure-caption { font-size: 0.95rem; color: var(--ink); }
.figure-source { font-size: 0.78rem; color: var(--ink-soft); }
.figure-source a { color: inherit; }

/* Home hero */
.hero { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.hero h1 { font-size: 1.9rem; }

/* Store links */
.store-row { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 10px; }
@media (min-width: 620px) { .store-row { grid-template-columns: repeat(2, 1fr); } }
.store { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; display: grid; gap: 8px; justify-items: start; }
.store img { width: 150px; height: 150px; }

table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.table-wrap { overflow-x: auto; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 16px 0; font-size: 0.9rem; color: var(--ink-soft); }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }

.hidden { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .choice, .btn { transition: border-color 120ms ease, filter 120ms ease, box-shadow 120ms ease, transform 120ms ease, background 120ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  .choice:hover, .choice:focus-visible { transform: none; }
}

@media print {
  .site-header, .site-footer, .btn-row, .nav-toggle { display: none; }
  .step, .card { box-shadow: none; break-inside: avoid; }
}

/* Compact recognition visual used by start-page questions. It is intentionally smaller than phone screenshots. */
.question-visual { margin: 12px 0 4px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; padding: 10px; display: grid; place-items: center; }
.question-visual img { width: min(100%, 640px); max-height: 230px; object-fit: contain; }
