/* Shared design for all flasher.hybridproject.com pages. */

:root {
  --navy: #0f172a;
  --slate: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --amber-bg: #fffbeb;
  --amber-line: #fde68a;
  --amber-text: #92400e;
  --green: #22c55e;
  --red: #b91c1c;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  background:
    radial-gradient(1100px 500px at 50% -10%, #dbeafe 0%, transparent 60%),
    var(--bg);
  color: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  /* theme the esp-web-tools dialogs (Material 3 tokens; the dialogs are
     appended to <body>, so these inherit into their shadow DOM) */
  --md-ref-typeface-plain: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --md-ref-typeface-brand: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --roboto-font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --md-sys-color-primary: var(--blue);
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: var(--blue-soft);
  --md-sys-color-secondary: var(--slate);
  --md-sys-color-secondary-container: #e2e8f0;
  --md-sys-color-on-secondary-container: var(--navy);
  --md-sys-color-tertiary: var(--blue-dark);
  --md-sys-color-tertiary-container: #dbeafe;
  --md-sys-color-error: #b91c1c;
  --md-sys-color-on-error-container: #7f1d1d;
  --md-sys-color-surface: #ffffff;
  --md-sys-color-surface-container: #f8fafc;
  --md-sys-color-surface-container-high: #ffffff;
  --md-sys-color-surface-container-highest: var(--bg);
  --md-sys-color-on-surface: var(--navy);
  --md-sys-color-on-surface-variant: var(--slate);
  --md-sys-color-outline-variant: var(--line);
  --md-sys-color-scrim: var(--navy);
  --md-dialog-container-shape: 18px;
  --md-dialog-headline-weight: 500;
  --md-text-button-container-shape: 10px;
}

/* ---------- header ---------- */
header {
  padding: 20px clamp(20px, 5vw, 48px);
  display: flex;
  align-items: center;
}
a.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
a.brand:hover .brand-name { color: var(--blue-dark); }
.brand-tagline { margin-left: 6px; }
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  display: grid; place-items: center;
  font-size: 18px;
}
.brand-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}
.brand-name span { color: var(--muted); font-weight: 500; }

/* ---------- layout ---------- */
main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(12px, 4vh, 48px) 20px 48px;
}
.panel {
  width: 100%;
  max-width: 620px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 8px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  color: var(--navy);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}
.back-link:hover {
  color: var(--blue-dark);
  border-color: #bfdbfe;
  transform: translateX(-2px);
}

.hero { text-align: center; margin-bottom: 32px; }
.hero h1 {
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hero p {
  margin-top: 12px;
  color: var(--slate);
  font-size: 17px;
  line-height: 1.55;
}
.fw-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
}
.fw-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
}

/* ---------- card ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -12px rgba(15, 23, 42, 0.12);
  padding: clamp(24px, 5vw, 40px);
}

.steps { display: grid; gap: 4px; }
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 4px;
}
.step + .step { border-top: 1px solid var(--line); }
.step-num {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.step h3 { font-size: 15.5px; font-weight: 650; }
.step p { margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.step p a { color: var(--blue-dark); font-weight: 600; }
.step-zero .step-num {
  background: transparent;
  color: var(--slate);
  border: 1.5px dashed #cbd5e1;
}

/* ---------- primary flash button ---------- */
.flash-area {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
button.flash-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 650;
  color: #fff;
  background: var(--blue);
  padding: 16px 56px;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.35), 0 8px 20px -6px rgba(29, 78, 216, 0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
button.flash-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 2px 3px rgba(29, 78, 216, 0.35), 0 12px 26px -6px rgba(29, 78, 216, 0.55);
}
button.flash-btn:active { transform: translateY(0); }

.warning {
  background: var(--amber-bg);
  border: 1px solid var(--amber-line);
  color: var(--amber-text);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14.5px;
  line-height: 1.55;
  text-align: center;
  max-width: 420px;
}
.warning a { color: var(--amber-text); }

/* ---------- help ---------- */
.help-card {
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.help-card summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 22px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.help-card summary::-webkit-details-marker { display: none; }
.help-card summary::after {
  content: "";
  width: 9px; height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  margin-right: 4px;
}
.help-card[open] summary::after { transform: rotate(-135deg); }
.help-body {
  padding: 4px 22px 20px;
  color: var(--slate);
  font-size: 14.5px;
  line-height: 1.65;
  border-top: 1px solid var(--line);
}
.help-body ul { margin: 14px 0 0 18px; }
.help-body li + li { margin-top: 10px; }
.driver-box {
  margin-top: 16px;
  background: var(--blue-soft);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.driver-box .driver-text { font-size: 14px; color: var(--navy); }
.driver-box .driver-text strong { display: block; }
a.driver-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  transition: filter 0.12s ease;
}
a.driver-btn:hover { filter: brightness(1.25); }

footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
}
footer a { color: var(--slate); text-decoration: none; font-weight: 500; }
footer a:hover { color: var(--navy); }
