/* HQA Secure: one stylesheet for the demo and the owners' dashboard.
   HQA brand kit: ink, cream and gold, Barlow, a gold head rule on every page. The logo PNGs have solid
   backgrounds, so the header is white in light mode (#FFFFFF) and ink in dark mode (#141414). */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/barlow-700.woff2") format("woff2"); }

:root {
  --font: "Barlow", Arial, Calibri, system-ui, sans-serif;
  --head: #ffffff;          /* the logo's own background */
  --bg: #f7f4ed;            /* cream */
  --surface: #ffffff;
  --ink: #141414;
  --body: #2b2b2b;
  --muted: #6b6b70;
  --faint: #a1a1a6;
  --line: #e6e6e8;
  --track: #ebe6da;
  --gold: #b58900;
  --gold-deep: #8a6d00;
  --gold-soft: #f6edd2;
  --btn-ink: #141414;
  --btn-ink-text: #f7f4ed;
  --band: #141414;
  --band-text: #f7f4ed;
  --ok: #17663f;   --ok-bg: #e2f3e9;
  --wait: #8a6d00; --wait-bg: #fbf1cf;
  --bad: #a3271c;  --bad-bg: #fbe5e2;
  --idle: #55606b; --idle-bg: #eceef0;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 6px 24px rgba(20, 20, 20, 0.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --head: #141414; --bg: #0d0d0d; --surface: #1a1a1a; --ink: #f7f4ed; --body: #e4e1da; --muted: #a1a1a6;
    --faint: #75757a; --line: #2b2b2b; --track: #2a2a2a; --gold: #e8b040; --gold-deep: #e8b040; --gold-soft: #2e2512;
    --btn-ink: #f7f4ed; --btn-ink-text: #141414; --band: #1a1a1a; --band-text: #f7f4ed;
    --ok: #6fd39c; --ok-bg: #13281e; --wait: #f0b85a; --wait-bg: #33270f; --bad: #f2877c; --bad-bg: #3a1a17;
    --idle: #a9b4bf; --idle-bg: #24282c; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --head: #141414; --bg: #0d0d0d; --surface: #1a1a1a; --ink: #f7f4ed; --body: #e4e1da; --muted: #a1a1a6;
  --faint: #75757a; --line: #2b2b2b; --track: #2a2a2a; --gold: #e8b040; --gold-deep: #e8b040; --gold-soft: #2e2512;
  --btn-ink: #f7f4ed; --btn-ink-text: #141414; --band: #1a1a1a; --band-text: #f7f4ed;
  --ok: #6fd39c; --ok-bg: #13281e; --wait: #f0b85a; --wait-bg: #33270f; --bad: #f2877c; --bad-bg: #3a1a17;
  --idle: #a9b4bf; --idle-bg: #24282c; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font-family: var(--font); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.hidden { display: none !important; }

/* ---- header: gold head rule, lockup | product name, log in ---- */
.rule { height: 5px; background: var(--gold); }
.top { background: var(--head); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { height: 50px; width: auto; display: block; }
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .logo-light { display: none; } :root:not([data-theme="light"]) .brand .logo-dark { display: block; } }
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }
.brand .bar { width: 1px; height: 26px; background: var(--line); flex: none; }
.brand .product { font-weight: 600; font-size: 19px; color: var(--ink); white-space: nowrap; letter-spacing: 0.01em; }
.top .right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font: 600 15px var(--font); letter-spacing: 0.01em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform 0.12s ease, background-color 0.12s ease; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.gold { background: var(--gold); color: #141414; }
.btn.gold:hover { background: #c99a10; }
.btn.ink { background: var(--btn-ink); color: var(--btn-ink-text); }
.btn.line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.line:hover { background: var(--gold-soft); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* ---- demo hero ---- */
.hero { background: var(--head); padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; margin: 0 0 12px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
.hero .lede { font-size: clamp(17px, 1.9vw, 20px); color: var(--body); margin: 18px 0 26px; max-width: 34em; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.promise { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14.5px; color: var(--muted); }
.promise li { display: inline-flex; align-items: center; gap: 7px; }
.promise svg { width: 16px; height: 16px; color: var(--gold); flex: none; }

/* hero card: the grade, larger than life */
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); display: grid; gap: 16px; }
:root .hero-card { background: var(--bg); }
.hero-card .row { display: flex; align-items: center; gap: 20px; }
.hero-card .big { font-size: 112px; line-height: 0.85; font-weight: 700; letter-spacing: -0.04em; }
.hero-card .big sup { font-size: 0.42em; vertical-align: 0.95em; margin-left: 2px; }
.hero-card .quip { font-size: 22px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.hero-card .sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.hero-card ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.hero-card li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }

/* ---- sections ---- */
.band { padding: 56px 0; }
.band.alt { background: var(--head); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.band .intro { color: var(--muted); max-width: 46em; margin: 10px 0 0; font-size: 17px; }
.demo-flag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--gold-deep); background: var(--gold-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; }
.demo-flag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

.cards4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.band.alt .feature { background: var(--bg); box-shadow: none; }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-deep); display: grid; place-items: center; margin-bottom: 14px; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; }
.step-n { font-size: 13px; font-weight: 700; color: var(--gold-deep); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }

.quote { text-align: center; padding: 64px 0; }
.quote p { margin: 0 auto; max-width: 22em; font-size: clamp(26px, 3.6vw, 40px); font-weight: 700; color: var(--ink); line-height: 1.15; text-wrap: balance; }
.quote p span { color: var(--gold); }
.quote small { display: block; margin-top: 14px; color: var(--muted); font-size: 16px; }

.cta { background: var(--band); color: var(--band-text); padding: 56px 0; border-top: 5px solid var(--gold); }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.cta h2 { color: var(--band-text); font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; }
.cta p { margin: 8px 0 0; color: #a1a1a6; font-size: 17px; }

footer.foot { padding: 26px 0 40px; font-size: 13.5px; color: var(--muted); }
footer.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
footer.foot a { color: var(--gold-deep); text-decoration: none; }
footer.foot a:hover { text-decoration: underline; }

/* ---- the dashboard (shared by the demo and the real page) ---- */
.dash { display: grid; gap: 16px; margin-top: 26px; }
.dash-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; color: var(--muted); }
.dash-meta .stale { color: var(--wait); font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { font-size: 18px; font-weight: 600; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card h3 .note { font-size: 13px; font-weight: 500; color: var(--muted); text-align: right; }

.top-grid { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.6fr); gap: 16px; }
.grade-card { display: grid; gap: 10px; align-content: start; }
.grade-line { display: flex; align-items: center; gap: 18px; }
.grade { font-size: 96px; font-weight: 700; line-height: 0.85; letter-spacing: -0.04em; }
.grade sup { font-size: 0.42em; vertical-align: 0.95em; margin-left: 2px; }
.grade.t-ok, .big.t-ok { color: var(--ok); background: none; }
.grade.t-wait, .big.t-wait { color: var(--wait); background: none; }
.grade.t-bad, .big.t-bad { color: var(--bad); background: none; }
.grade.t-idle { color: var(--faint); background: none; }
.grade-side { display: grid; gap: 2px; }
.score { font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.next { font-size: 14px; color: var(--muted); }
.quip-line { font-size: 17px; font-weight: 600; color: var(--ink); }
.scorebars { display: grid; gap: 8px; margin-top: 8px; }
.scorebar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: 13.5px; }
.scorebar .track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; }
.scorebar .fill { height: 100%; border-radius: 99px; }
.fill.t-ok { background: var(--ok); } .fill.t-wait { background: var(--wait); } .fill.t-bad { background: var(--bad); }

.fixes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fixes li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 15px; }
.fixes li .txt { min-width: 0; }
.fixes li.later { color: var(--muted); }
.fixes .empty { color: var(--muted); }

.gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.gauge { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; }
.gauge svg { width: 76px; height: 76px; display: block; }
.gauge .trk { fill: none; stroke: var(--track); stroke-width: 9; }
.gauge .val { fill: none; stroke-width: 9; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 40px 40px; transition: stroke-dasharray 0.6s ease; }
.gauge .val.t-ok { stroke: var(--ok); } .gauge .val.t-wait { stroke: var(--wait); } .gauge .val.t-bad { stroke: var(--bad); } .gauge .val.t-idle { stroke: var(--faint); }
.gauge .num { fill: var(--ink); font: 600 18px var(--font); font-variant-numeric: tabular-nums; }
.gauge b { display: block; font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.gauge span { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 3px; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }

.rows { display: grid; }
.r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.r:first-child { border-top: 0; padding-top: 2px; }
.r .lbl { font-weight: 500; color: var(--ink); min-width: 0; }
.r .lbl small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.r .issues { grid-column: 1 / -1; margin: 0; padding: 0 0 0 2px; list-style: none; font-size: 13.5px; color: var(--muted); display: grid; gap: 2px; }
.r details { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); }
summary { cursor: pointer; color: var(--gold-deep); font-weight: 600; width: max-content; font-size: 14px; }
.r details ul { margin: 6px 0 2px; padding-left: 18px; display: grid; gap: 4px; }

.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 24px; font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 2px 10px 2px 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill svg { width: 12px; height: 12px; flex: none; }
.t-ok { color: var(--ok); background: var(--ok-bg); }
.t-wait { color: var(--wait); background: var(--wait-bg); }
.t-bad { color: var(--bad); background: var(--bad-bg); }
.t-idle { color: var(--idle); background: var(--idle-bg); }
.pill.flash { animation: flash 1.6s ease-in-out infinite; }
@keyframes flash { 50% { opacity: 0.55; } }

.threats { list-style: none; margin: 0; padding: 0; display: grid; }
.threats li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.threats li:first-child { border-top: 0; padding-top: 2px; }
.threats li > .pill { justify-self: start; }
.threats .v { font-weight: 600; color: var(--ink); }
.threats .t { font-size: 14.5px; }
.threats .do { font-size: 14px; color: var(--ink); margin-top: 4px; }
.threats .do b { color: var(--gold-deep); }
.threats .d { font-size: 13px; color: var(--muted); white-space: nowrap; }
.card .foot { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

.mac h3 .note { color: var(--muted); }
.muted { color: var(--muted); }

/* ---- app: sign-in screen and states ---- */
.gate { min-height: calc(100vh - 78px); display: grid; place-items: center; padding-top: 32px; padding-bottom: 32px; }
.gate .card { max-width: 440px; width: 100%; text-align: center; padding: 34px 28px; display: grid; gap: 14px; justify-items: center; }
.gate .q { width: 64px; height: auto; border-radius: 14px; }
.gate .q.dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gate .q.light { display: none; } :root:not([data-theme="light"]) .gate .q.dark { display: block; } }
:root[data-theme="dark"] .gate .q.light { display: none; }
:root[data-theme="dark"] .gate .q.dark { display: block; }
.gate h1 { font-size: 30px; font-weight: 700; }
.gate p { margin: 0; color: var(--muted); }
.gate .notice { font-size: 12.5px; color: var(--faint); }
.gate .back { font-size: 14px; color: var(--gold-deep); text-decoration: none; }
.msg { padding: 14px 16px; border-radius: 12px; font-size: 15px; }
.msg.t-bad, .msg.t-wait { font-weight: 500; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--track); border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- narrow screens ---- */
@media (max-width: 1100px) {
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 > :first-child { grid-row: span 2; }
}
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .cards4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid3, .cards3 { grid-template-columns: 1fr; }
  .grid3 > :first-child { grid-row: auto; }
}
@media (max-width: 560px) {
  .brand img { height: 40px; }
  .brand .product { font-size: 16px; }
  .brand .bar { height: 22px; }
  .top .wrap { min-height: 60px; }
  .who { display: none; }
  .hero { padding: 36px 0 34px; }
  .hero-card { padding: 18px; }
  .hero-card .big { font-size: 80px; }
  .hero-card .quip { font-size: 19px; }
  .cards4, .gauges { grid-template-columns: 1fr; }
  .gauge { grid-template-columns: 64px minmax(0, 1fr); }
  .gauge svg { width: 64px; height: 64px; }
  .band { padding: 42px 0; }
  .card { padding: 16px; }
  .grade { font-size: 80px; }
  .threats li { grid-template-columns: minmax(0, 1fr) auto; }
  .threats li .pill { grid-column: 1 / -1; width: max-content; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
