/* ============================================================
   D M Breault, Inc. — shared site styles
   Futuristic / professional dark theme
   ============================================================ */

:root {
  --bg:        #070b18;
  --bg-2:      #0b1224;
  --surface:   rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border:    rgba(255, 255, 255, 0.10);
  --text:      #e8ecf6;
  --text-dim:  #99a3bd;
  --accent:    #22d3ee;   /* cyan  */
  --accent-2:  #7c5cff;   /* violet */
  --accent-3:  #ff5a3c;   /* brand ember (nod to the original) */
  --radius:    16px;
  --maxw:      1120px;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ambient background: deep gradient + subtle grid + glow blobs */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 60rem at 12% -10%, rgba(124, 92, 255, 0.20), transparent 60%),
    radial-gradient(50rem 50rem at 100% 0%, rgba(34, 211, 238, 0.16), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
}

h1, h2, h3, .brand {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

main { flex: 1 0 auto; }

section { padding: 84px 0; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

/* ---------- header / nav ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 24, 0.66);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-size: 21px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand .mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--grad);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.45);
  display: inline-block;
}
.brand small { display: block; font-size: 11px; letter-spacing: 0.14em; color: var(--text-dim); text-transform: uppercase; font-family: "Inter", sans-serif; font-weight: 500; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: var(--grad);
  color: #06121a;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); color: #06121a; box-shadow: 0 14px 40px rgba(124, 92, 255, 0.4); }
.note a.btn-primary, .note a.btn-primary:hover { color: #06121a; }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); color: #fff; transform: translateY(-2px); }

/* ---------- hero ---------- */
.hero { padding: 110px 0 70px; text-align: center; }
.hero h1 { font-size: clamp(40px, 6vw, 76px); margin: 0 0 22px; }
.hero p.lead {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 34px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- section heading ---------- */
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 14px; }
.section-head p { color: var(--text-dim); margin: 0; font-size: 18px; }

/* ---------- cards grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.2s ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.card:hover { transform: translateY(-4px); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card .ico {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid var(--border);
  font-size: 22px;
  margin-bottom: 18px;
}
.card h3 { font-size: 20px; margin: 0 0 8px; color: #fff; }
.card p { color: var(--text-dim); margin: 0; font-size: 15.5px; }
.card .card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-weight: 600; font-size: 14.5px;
}
a.card { color: inherit; }
a.card:hover h3 { color: var(--accent); }

.badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(124, 92, 255, 0.16);
  color: #c9bcff;
  border: 1px solid rgba(124, 92, 255, 0.35);
  margin-left: 8px;
  vertical-align: middle;
}

/* ---------- product / app layout ---------- */
.product {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.product .shot {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 26px;
  display: grid;
  place-items: center;
}
.product .shot img { width: 210px; height: 210px; border-radius: 26px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.product h2 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 16px; }
.product p { color: var(--text-dim); }
.store-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* ---------- demo video + screenshots ---------- */
.demo { margin-top: 64px; }
.demo-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.demo-head h3 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 10px; color: #fff; }
.demo-head p { color: var(--text-dim); margin: 0; }

.demo-video {
  max-width: 300px;
  margin: 0 auto 14px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: #000;
  padding: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 40px rgba(34,211,238,0.12);
}
.demo-video video, .demo-video img { width: 100%; display: block; border-radius: 22px; }
.demo-caption { text-align: center; color: var(--text-dim); font-size: 14px; margin: 0 0 52px; }

.shots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 780px;
  margin: 0 auto;
}
.shots-grid img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.shots-grid img:hover { transform: translateY(-4px); border-color: rgba(34,211,238,0.5); }

@media (max-width: 620px) {
  .shots-grid { grid-template-columns: 1fr; max-width: 300px; }
}

/* ---------- contact ---------- */
.contact-card {
  max-width: 560px; margin: 0 auto; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 48px 40px;
}
.contact-email {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(22px, 3.4vw, 34px);
  margin: 18px 0 8px;
}

/* contact form */
.contact-form { text-align: left; margin-top: 22px; }
.cf-field { margin-bottom: 16px; }
.cf-field label {
  display: block;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .btn { margin-top: 6px; width: 100%; }

/* honeypot — visually hidden, off-screen (not display:none, so bots still fill it) */
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cf-banner {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  border: 1px solid var(--border);
}
.cf-banner.ok  { border: 2px solid #eab308; background: rgba(234, 179, 8, 0.15); color: #fef08a; font-weight: 600; box-shadow: 0 0 22px rgba(234, 179, 8, 0.4); }
.cf-banner.err { border-color: rgba(255, 90, 60, 0.5);  background: rgba(255, 90, 60, 0.10);  color: #ffd8cf; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.contact-form select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.contact-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}
.contact-card.wide { max-width: 720px; }
@media (max-width: 560px) { .cf-row { grid-template-columns: 1fr; } }

/* ---------- legal pages ---------- */
.legal { max-width: 780px; margin: 0 auto; }
.legal .updated { color: var(--text-dim); font-size: 14px; margin: -6px 0 34px; }
.legal h2 {
  font-size: 22px;
  color: #fff;
  margin: 40px 0 12px;
  padding-top: 8px;
}
.legal h2:first-of-type { margin-top: 8px; }
.legal p, .legal li { color: var(--text-dim); font-size: 16px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--accent); }
.legal a:hover { color: #fff; }
.legal .note {
  margin-top: 44px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14.5px;
}

/* ---------- free tools (interactive widgets) ---------- */
.tool {
  max-width: 780px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.tool label { display: block; font-size: 14px; color: var(--text-dim); margin: 0 0 6px; }
.tool textarea, .tool input, .tool select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.tool textarea { resize: vertical; min-height: 110px; }
.tool textarea:focus, .tool input:focus, .tool select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}
.tool .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.04em; }
.tool-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 18px; }
.tool-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.tool-actions .btn { padding: 10px 20px; }
.tool-out {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; min-height: 52px; word-break: break-word;
}
.tool-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tool-stats div { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.tool-stats b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 24px; color: #fff; }
.tool-stats span { font-size: 13px; color: var(--text-dim); }
.tool-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tool-table th, .tool-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tool-table th { color: #fff; font-weight: 600; }
.tool-table td { color: var(--text-dim); }
.table-wrap { overflow-x: auto; }
.choice {
  display: block; width: 100%; text-align: left; margin: 0 0 10px;
  padding: 12px 16px; border-radius: 12px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 16px;
}
.choice:hover { border-color: var(--accent); }
.choice.right { border-color: #22c55e; background: rgba(34, 197, 94, 0.14); }
.choice.wrong { border-color: var(--accent-3); background: rgba(255, 90, 60, 0.12); }

/* ---------- footer ---------- */
footer.site {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 34px 0;
  color: var(--text-dim);
  font-size: 14px;
}
footer.site .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
footer.site a { color: var(--text-dim); }
footer.site a:hover { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .nav { flex-wrap: wrap; row-gap: 4px; }           /* phone: links drop under the brand instead of overflowing */
  .nav-links { gap: 14px; flex-wrap: wrap; }
  .nav-links a { font-size: 14px; }
  .nav-links a.hide-sm { display: none; }
  .product { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
}

/* ---------- guides: quotable short answer under the byline ---------- */
.legal .tldr {
  margin: 0 0 28px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}

/* ---------- free tools: embed-this-tool section ---------- */
.embed-box { margin-top: 18px; }
.embed-box iframe {
  display: block; width: 100%; max-width: 720px; border: 0; border-radius: 12px;
  margin-bottom: 16px; background: var(--bg-2);
}
.embed-box label { display: block; font-size: 14px; color: var(--text-dim); margin: 0 0 6px; }
.embed-box textarea {
  width: 100%; min-height: 96px; padding: 12px 14px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); font-size: 13px; line-height: 1.5; resize: vertical;
}

/* ---------- exam study pages (generated by tools/build_exam_pages.py) ---------- */
.exam-hero h1 { font-size: clamp(24px, 3.4vw, 38px); }
.exam-hero .eyebrow a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); }
.exam-q #result { margin: 8px 0 0; color: var(--text-dim); }
.exam-hint { margin: 14px 0 0; font-size: 14px; color: var(--text-dim); }
.exam-ref, .exam-source { font-size: 14px; }
.share-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.share-row span { font-size: 14px; color: var(--text-dim); }
.exam-cta { margin-top: 32px; }
.exam-cta .store-row { margin-top: 14px; }
.exam-nav { display: flex; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-top: 30px; font-size: 15px; }
.exam-list { padding-left: 22px; }
.exam-list li { margin-bottom: 14px; }
.exam-list a { color: var(--text); }
.exam-list a:hover { color: var(--accent); }
.exam-list .ans { display: block; color: var(--text-dim); font-size: 14.5px; margin-top: 2px; }
.exam-groups .ans { display: inline; margin-left: 6px; }
.exam-related li { margin-bottom: 8px; }
.exam-quiz-row { margin: -6px 0 10px; font-size: 15px; }
/* practice tests and subelement quizzes (exam/*-practice-test.html, exam/*-quiz.html) */
.ptest[hidden] { display: none; }
.ptest-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-dim); margin-bottom: 8px; }
.ptest-track { height: 6px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 18px; }
.ptest-bar { height: 100%; width: 0; background: var(--grad); transition: width 0.3s; }
.ptest-q { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: clamp(18px, 2.4vw, 24px); line-height: 1.35; color: #fff; margin: 0 0 16px; min-height: 1.4em; }
.ptest .tool-actions { margin: 16px 0 0; }
.ptest .tool-stats { margin: 18px 0 22px; }
.ptest h3 { margin: 10px 0 10px; }
.ptest-pass { color: #22c55e; }
.ptest-fail { color: var(--accent-3); }
@media print {
  header.site, footer.site, .exam-cta, .exam-nav, .exam-hint, .exam-related, .share-row { display: none !important; }
  html, body, main, body::before, body::after { background: #fff !important; background-image: none !important; color: #000; }
  body::before, body::after { display: none; }
  .exam-hero h1, .legal h2, .legal p, .legal li, .exam-list .ans, .exam-q .choice { color: #000; }
  .tool, .choice { background: #fff; border-color: #bbb; }
}

/* ---------- practice tests: challenge a friend (added 2026-10-29) ---------- */
.ptest-challenge { background: rgba(124, 92, 255, 0.14); border: 1px solid var(--accent); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; color: #fff; font-weight: 600; }
.ptest-challenge[hidden], .ptest-vs[hidden] { display: none; }
.ptest-vs { margin: 0 0 6px; }

/* ---------- band conditions page (generated hourly by tools/build_band_conditions.py, added 2026-10-30) ---------- */
.bc-tool { max-width: 1000px; }
.bc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.bc-head .eyebrow { margin: 0; }
.bc-hf { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 15px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); color: #fff; }
.bc-hf.bc-excellent, .bc-hf.bc-good { background: rgba(34, 197, 94, 0.16); border-color: rgba(34, 197, 94, 0.5); }
.bc-hf.bc-fair { background: rgba(245, 185, 66, 0.16); border-color: rgba(245, 185, 66, 0.5); }
.bc-hf.bc-poor { background: rgba(255, 138, 112, 0.16); border-color: rgba(255, 138, 112, 0.5); }
.bc-stats.tool-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.bc-stats div.bc-good { border-color: rgba(34, 197, 94, 0.45); }
.bc-stats div.bc-fair { border-color: rgba(245, 185, 66, 0.45); }
.bc-stats div.bc-poor { border-color: rgba(255, 138, 112, 0.45); }
.bc-stats div.bc-good b { color: #22c55e; }
.bc-stats div.bc-fair b { color: #f5b942; }
.bc-stats div.bc-poor b { color: #ff8a70; }
.bc-stats span em { font-style: normal; display: block; color: var(--text); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }
.bc-table td b { color: #fff; }
.bc-table td.bc-good { color: #22c55e; font-weight: 600; }
.bc-table td.bc-fair { color: #f5b942; font-weight: 600; }
.bc-table td.bc-poor { color: #ff8a70; font-weight: 600; }
.bc-table th.bc-now { color: var(--accent); }
.bc-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 0 0 8px; }
.bc-kp { text-align: center; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 4px; }
.bc-kp b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 18px; color: #fff; }
.bc-kp span { font-size: 11px; color: var(--text-dim); }
.bc-kp.bc-good { border-color: rgba(34, 197, 94, 0.45); } .bc-kp.bc-good b { color: #22c55e; }
.bc-kp.bc-fair { border-color: rgba(245, 185, 66, 0.45); } .bc-kp.bc-fair b { color: #f5b942; }
.bc-kp.bc-poor { border-color: rgba(255, 138, 112, 0.45); } .bc-kp.bc-poor b { color: #ff8a70; }
@media (max-width: 560px) { .bc-strip { grid-template-columns: repeat(4, 1fr); } }

/* ---------- exam review loop: exam/review.html + notes on the tests (added 2026-10-30) ---------- */
.ptest-review { background: rgba(245, 185, 66, 0.12); border: 1px solid rgba(245, 185, 66, 0.5); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; color: #fff; font-size: 15px; }
.ptest-review[hidden] { display: none; }
/* study streak (2026-11-01) */
.ptest-streak { background: rgba(255, 90, 60, 0.10); border: 1px solid rgba(255, 90, 60, 0.45); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; color: #fff; font-size: 15px; }
.ptest-streak[hidden] { display: none; }
.hero .ptest-streak { display: inline-block; margin: 18px 0 0; }
.hero .ptest-streak[hidden] { display: none; }
.streak-flame { display: inline-block; width: 12px; height: 16px; margin: 0 8px -2px 0; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: linear-gradient(180deg, #ffd166, #ff5a3c 70%); box-shadow: 0 0 10px rgba(255, 90, 60, 0.6); }
#review-saved { margin-top: 4px; }
#dash-switch a { color: var(--text-dim); }
#dash-switch a:hover { color: var(--accent); }
.rv-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 52px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.rv-label a { color: var(--text); text-decoration: none; }
.rv-label a:hover { color: var(--accent); }
.rv-label span { display: block; color: var(--text-dim); font-size: 13.5px; margin-top: 2px; }
.rv-track { height: 8px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.rv-bar { height: 100%; border-radius: 6px; }
.rv-bar.rv-good { background: #22c55e; } .rv-bar.rv-fair { background: #f5b942; } .rv-bar.rv-poor { background: #ff8a70; }
b.rv-good { color: #22c55e; } b.rv-fair { color: #f5b942; } b.rv-poor { color: #ff8a70; }
.rv-row b { font-family: "Space Grotesk", sans-serif; font-size: 18px; text-align: right; }
#dash h3 { margin: 22px 0 10px; }
@media (max-width: 560px) { .rv-row { grid-template-columns: minmax(0, 1fr) 90px 44px; } }

/* ---------- fasting window calculator (fasting-window-calculator.html, es/, added 2026-10-30) ---------- */
.fw-stage { margin: 16px 0 0; padding: 12px 14px; background: rgba(124, 92, 255, 0.12); border: 1px solid var(--border); border-radius: 12px; color: #fff; font-size: 15px; }
.tool #custom-wrap[hidden] { display: none; }

/* ---------- laser-etched brand mark (added 2026-11-03, Doug; per-letter version the same day) ----------
   Pure CSS, plays once per page load: the laser cuts the rounded square (conic ring with a white-hot leading edge)
   and sweeps the gradient fill in (2.75 s timeline); then each DMBI letter's cyan outline is wiped on in turn behind a
   zigzagging laser dot, a raster scan line burns the word in white, the outlines fade and the letters pulse three
   times (4.6 s timeline). The letter keyframes use px positions measured for Space Grotesk 600 at 21 px; they were
   generated by make_preview_opt2.py (Webster's scratchpad, 2026-11-03). Ends exactly on the old static logo.
   No animated SVG image on purpose: an image's own animation clock does not restart on reload or a new page. Every page shares this
   markup: <a class="brand"><span class="mark"></span><span>DMBI</span></a>. Reduced-motion users get the static logo. */
@property --etch-cut  { syntax: '<angle>'; inherits: false; initial-value: 360deg; }
@property --etch-fill { syntax: '<percentage>'; inherits: false; initial-value: 115%; }

.brand .mark { position: relative; background: transparent; box-shadow: none; animation: etch-mark-glow 2.75s ease-out both; }
.brand .mark::before {          /* the cut: a ring drawn clockwise from the top, white-hot at the laser head */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from 0deg, #9ff3ff 0deg, #9ff3ff calc(var(--etch-cut) - 28deg), #fff calc(var(--etch-cut) - 4deg), transparent var(--etch-cut));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: drop-shadow(0 0 3px #22d3ee) drop-shadow(0 0 6px rgba(34, 211, 238, .8));
  animation: etch-cut 2.75s linear both;
}
.brand .mark::after {           /* the fill sweep, with a bright beam line at its edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, transparent 0 calc(var(--etch-fill) - 3px), rgba(255, 255, 255, .95) calc(var(--etch-fill) - 1px), transparent var(--etch-fill)), var(--grad);
  clip-path: inset(0 calc(100% - var(--etch-fill)) 0 0 round 9px);
  animation: etch-fill 2.75s linear both;
}
@property --etch-wipe { syntax: '<length>'; inherits: false; initial-value: 62.09px; }
@property --etch-scan { syntax: '<length>'; inherits: false; initial-value: 27.52px; }
.brand .mark + span {          /* the outline layer: cyan stroke, wiped on letter by letter */
  position: relative; display: inline-block; white-space: nowrap; color: transparent;
  -webkit-text-stroke: .7px transparent;
  clip-path: inset(-8px calc(100% - var(--etch-wipe) - 1.5px) -8px -8px);
  animation: etch-wipe 4.6s linear both, etch-outline 4.6s linear both;
}
.brand .mark + span::before {   /* the white letters, burned in by the scan, then pulsed */
  content: "DMBI"; position: absolute; left: 0; top: 0; color: #fff; -webkit-text-stroke: 0 transparent;
  clip-path: inset(-10px -10px calc(100% - var(--etch-scan)) -10px);
  animation: etch-scan 4.6s linear both, etch-pulse 4.6s ease-in-out both;
}
.brand .mark + span::after {    /* the laser dot while tracing, then the scan line */
  content: ""; position: absolute; border-radius: 2px; background: #fff; pointer-events: none;
  box-shadow: 0 0 3px #fff, 0 0 6px #9ff3ff, 0 0 10px #22d3ee;
  animation: etch-laser 4.6s linear both;
}
@keyframes etch-wipe {
  0%, 32.61% { --etch-wipe: -3px; }
  38.48% { --etch-wipe: 13.53px; }
  44.35% { --etch-wipe: 31.56px; }
  50.22% { --etch-wipe: 45.06px; }
  56.09% { --etch-wipe: 50.09px; }
  56.30%, 100% { --etch-wipe: 62.09px; }
}
@keyframes etch-laser {
  0%, 32.39% { left: -1.20px; top: 2.96px; width: 2.4px; height: 2.4px; opacity: 0; }
  32.61% { left: -1.20px; top: 2.96px; width: 2.4px; height: 2.4px; opacity: 1; }
  35.54% { left: 5.57px; top: 16.26px; width: 2.4px; height: 2.4px; opacity: 1; }
  38.48% { left: 12.33px; top: 2.96px; width: 2.4px; height: 2.4px; opacity: 1; }
  41.41% { left: 21.35px; top: 16.26px; width: 2.4px; height: 2.4px; opacity: 1; }
  44.35% { left: 30.36px; top: 2.96px; width: 2.4px; height: 2.4px; opacity: 1; }
  47.28% { left: 37.11px; top: 16.26px; width: 2.4px; height: 2.4px; opacity: 1; }
  50.22% { left: 43.86px; top: 2.96px; width: 2.4px; height: 2.4px; opacity: 1; }
  53.15% { left: 46.38px; top: 16.26px; width: 2.4px; height: 2.4px; opacity: 1; }
  56.09% { left: 48.89px; top: 2.96px; width: 2.4px; height: 2.4px; opacity: 1; }
  56.41% { left: 48.89px; top: 2.96px; width: 2.4px; height: 2.4px; opacity: 0; }
  56.85% { left: -3px; top: 2.96px; width: 56.09px; height: 1.5px; opacity: 0; }
  57.39% { left: -3px; top: 2.96px; width: 56.09px; height: 1.5px; opacity: 1; }
  65.65% { left: -3px; top: 19.86px; width: 56.09px; height: 1.5px; opacity: 1; }
  66.74%, 100% { left: -3px; top: 19.86px; width: 56.09px; height: 1.5px; opacity: 0; }
}
@keyframes etch-scan {
  0%, 56.96% { --etch-scan: 2.96px; }
  66.09%, 100% { --etch-scan: 27.52px; }
}
@keyframes etch-outline {
  0%, 66.09% { -webkit-text-stroke-color: #9ff3ff; text-shadow: 0 0 3px rgba(34, 211, 238, .95), 0 0 7px rgba(34, 211, 238, .55); }
  73.70%, 100% { -webkit-text-stroke-color: transparent; text-shadow: none; }
}
@keyframes etch-pulse {
  0%, 71.52% { text-shadow: 0 0 0 rgba(159, 243, 255, 0), 0 0 0 rgba(34, 211, 238, 0), 0 0 0 rgba(124, 92, 255, 0); }
  74.72% { text-shadow: 0 0 6px rgba(159, 243, 255, .95), 0 0 14px rgba(34, 211, 238, .8), 0 0 22px rgba(124, 92, 255, .55); }
  80.65% { text-shadow: 0 0 0 rgba(159, 243, 255, 0), 0 0 0 rgba(34, 211, 238, 0), 0 0 0 rgba(124, 92, 255, 0); }
  83.85% { text-shadow: 0 0 6px rgba(159, 243, 255, .95), 0 0 14px rgba(34, 211, 238, .8), 0 0 22px rgba(124, 92, 255, .55); }
  89.78% { text-shadow: 0 0 0 rgba(159, 243, 255, 0), 0 0 0 rgba(34, 211, 238, 0), 0 0 0 rgba(124, 92, 255, 0); }
  92.98% { text-shadow: 0 0 6px rgba(159, 243, 255, .95), 0 0 14px rgba(34, 211, 238, .8), 0 0 22px rgba(124, 92, 255, .55); }
  98.91% { text-shadow: 0 0 0 rgba(159, 243, 255, 0), 0 0 0 rgba(34, 211, 238, 0), 0 0 0 rgba(124, 92, 255, 0); }
  100% { text-shadow: 0 0 0 rgba(159, 243, 255, 0), 0 0 0 rgba(34, 211, 238, 0), 0 0 0 rgba(124, 92, 255, 0); }
}


@keyframes etch-cut       { 0%, 4% { --etch-cut: 0deg; opacity: 1; } 40% { --etch-cut: 360deg; opacity: 1; } 52% { opacity: .9; } 70%, 100% { --etch-cut: 360deg; opacity: 0; } }
@keyframes etch-fill      { 0%, 41% { --etch-fill: 0%; } 52% { --etch-fill: 100%; } 55%, 100% { --etch-fill: 115%; } }
@keyframes etch-mark-glow { 0%, 45% { box-shadow: none; } 60% { box-shadow: 0 0 30px rgba(34, 211, 238, .85); } 100% { box-shadow: 0 0 22px rgba(34, 211, 238, .45); } }

@media (prefers-reduced-motion: reduce) {
  .brand .mark, .brand .mark::before, .brand .mark::after, .brand .mark + span, .brand .mark + span::before, .brand .mark + span::after { animation: none; }
  .brand .mark { background: var(--grad); box-shadow: 0 0 22px rgba(34, 211, 238, 0.45); }
  .brand .mark::before, .brand .mark + span::before, .brand .mark + span::after { display: none; }
  .brand .mark + span { color: #fff; clip-path: none; -webkit-text-stroke: 0 transparent; }
}

/* Open-on-your-phone QR handoff (tools/build_qr_handoff.py, 2026-11-24): desktops only */
.qr-handoff { display: none; }
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .qr-handoff { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 12px 16px 12px 12px;
    background: var(--card); border: 1px solid var(--border); border-radius: 14px; max-width: 520px; }
  .qr-handoff img { flex: none; width: 120px; height: 120px; background: #fff; border-radius: 8px; }
  .qr-handoff p { margin: 0; font-size: 15px; color: var(--muted, #99a3bd); }
  .qr-handoff strong { color: #fff; }
}
@media print { .qr-handoff { display: none !important; } }
