/* WomoNET.core Flasher — visual identity mirrors the marketing site and wiki:
   dark navy base, magenta accent, Open Sauce One, glassy panels. */

:root {
  --bg: #000b1e;
  --magenta: #c730d1;
  --magenta-50: #dd80e3;
  --magenta-25: #eebff2;
  --gold: #c8a45f;
  --white: #ffffff;
  --text-dim: rgba(255,255,255,.74);
  --text-faint: rgba(255,255,255,.42);
  --line: rgba(199,48,209,.22);
  --line-soft: rgba(255,255,255,.07);
  --panel: rgba(255,255,255,.028);
  --bg-medium: #141f38;
  --bg-dark: #0e182b;
  --ok: #3fb56b;
  --danger: #e5484d;
  --info: #4b9fff;
  --serif: 'Open Sauce One','Segoe UI',Tahoma,sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: .012em;
  min-height: 100vh;
  background:
    radial-gradient(1200px 900px at 85% -10%, rgba(199,48,209,.20), transparent 60%),
    radial-gradient(1000px 850px at -10% 20%, rgba(199,48,209,.12), transparent 60%),
    radial-gradient(1100px 950px at 110% 90%, rgba(199,48,209,.14), transparent 60%),
    var(--bg);
  color: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 780px; margin: 0 auto; padding: 0 24px; }
code { font-family: Monaco, Menlo, 'Ubuntu Mono', monospace; font-size: .88em; color: var(--magenta-25); }
.hidden { display: none !important; }

/* === Header / top navigation (shared with the marketing site) === */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0,11,30,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  height: 80px;
}
/* Nav spans the site's full width even though the wizard below is narrower. */
header .container { max-width: 1100px; }
nav { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.nav-logo { height: 34px; width: auto; filter: drop-shadow(0 0 8px rgba(199,48,209,.4)); }
.wordmark { font-weight: 700; font-size: 18px; letter-spacing: .02em; color: var(--white); }
.wordmark b { color: var(--magenta); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-weight: 400;
  font-size: .88rem; letter-spacing: .06em; text-transform: uppercase; transition: color .2s;
}
.nav-links a:hover { color: var(--magenta); }
.nav-right { display: flex; align-items: center; gap: 1.75rem; }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; padding: 4px 10px; border-radius: 999px;
  color: var(--text-dim); font-size: .78rem; font-weight: 700; letter-spacing: .05em;
  text-decoration: none; transition: color .2s, background .2s;
}
.lang-btn:hover { color: var(--white); }
.lang-btn.active { background: var(--magenta); color: #fff; }
@media (max-width: 600px) { .nav-links { display: none; } }

/* === Step rail === */
.steprail {
  display: flex; gap: 8px; list-style: none;
  margin: 32px 0 24px; padding: 0; flex-wrap: wrap;
}
.steprail li {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--text-faint);
  padding: 6px 14px 6px 6px; border-radius: 999px;
  border: 1px solid var(--line-soft);
}
.steprail li span {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--line-soft);
  font-size: .74rem; font-weight: 700;
}
.steprail li.active { color: var(--white); border-color: var(--line); }
.steprail li.active span { background: var(--magenta); border-color: var(--magenta); }
.steprail li.complete { color: var(--text-dim); }
.steprail li.complete span { background: rgba(63,181,107,.16); border-color: var(--ok); color: var(--ok); }

/* === Cards / screens === */
main { padding-bottom: 64px; }
.card {
  background: var(--panel);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 28px rgba(0,0,0,.3);
}
.screen { animation: reveal .4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }

.kicker { color: var(--gold); text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; font-weight: 700; margin-bottom: 10px; }
h1 { font-weight: 700; font-size: 1.7rem; line-height: 1.15; margin-bottom: 12px; }
.lead { color: var(--text-dim); margin-bottom: 22px; }
.lead.warn { color: var(--gold); }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.8rem; font-family: var(--serif); font-weight: 700;
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 8px; cursor: pointer; border: 2px solid transparent;
  transition: all .25s; margin-top: 8px;
}
.btn-primary { background: var(--magenta); color: #fff; border-color: var(--magenta); }
.btn-primary:hover { background: transparent; color: var(--magenta); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(199,48,209,.3); }
.btn-outline { background: transparent; color: var(--white); border-color: var(--line); }
.btn-outline:hover { color: var(--magenta); border-color: var(--magenta); transform: translateY(-2px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* === Dropzone === */
.dropzone {
  display: block; border: 1.5px dashed var(--line);
  border-radius: 14px; padding: 40px; text-align: center; cursor: pointer;
  transition: border-color .25s, background .25s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--magenta); background: rgba(199,48,209,.06); }
.dropzone-inner { display: grid; gap: 6px; justify-items: center; color: var(--text-dim); }
.dropzone-icon { font-size: 2.4rem; color: var(--magenta); line-height: 1; }
.dropzone-inner strong { color: var(--white); font-weight: 700; }

/* Release-channel cards: one per channel, each showing its latest build. A
   coloured accent bar distinguishes the channels and doubles as the hover/active
   cue; the version is the visual hero. */
.channel-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 4px; }
.channel-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; text-align: left;
  padding: 20px 18px; font: inherit; color: var(--white); cursor: pointer;
  border: 1px solid var(--line-soft); border-radius: 14px; background: var(--bg-dark);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.channel-card[data-channel="stable"]  { --accent: var(--ok); }
.channel-card[data-channel="beta"]    { --accent: var(--gold); }
.channel-card[data-channel="preview"] { --accent: var(--magenta); }
.channel-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent); opacity: .9;
}
.channel-card:hover:not(:disabled) {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,.38);
}
.channel-card.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.channel-card:disabled { cursor: progress; }
.channel-card.error { cursor: not-allowed; opacity: .5; }
.channel-card-name { font-weight: 700; font-size: 1.1rem; }
.channel-card-sub { color: var(--text-faint); font-size: .78rem; margin: 2px 0 16px; }
.channel-card-meta { margin-top: auto; display: flex; flex-direction: column; }
.channel-card-meta b {
  color: var(--white); font-weight: 700; font-size: 1.1rem; line-height: 1.2; word-break: break-word;
}
.channel-card-meta small { color: var(--text-faint); font-size: .78rem; margin-top: 4px; }
.channel-card.error .channel-card-meta { color: var(--text-faint); font-size: .82rem; }
@media (max-width: 560px) { .channel-cards { grid-template-columns: 1fr; } }

.divider-or {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-dim); font-size: .85rem; margin: 20px 0;
}
.divider-or::before, .divider-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* === Progress === */
.progress { margin-top: 22px; }
.progress-bar { height: 8px; border-radius: 999px; background: var(--bg-dark); overflow: hidden; border: 1px solid var(--line-soft); }
.progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--magenta), var(--magenta-50)); transition: width .2s ease; }
.progress-label { display: block; margin-top: 8px; font-size: .82rem; color: var(--text-dim); }

/* === Bundle info === */
.bundle-info { margin-top: 22px; display: grid; gap: 16px; }
.bundle-meta { color: var(--text-dim); font-size: .9rem; margin-top: 4px; }
.bundle-meta b { color: var(--white); font-weight: 700; }

/* === Callouts === */
.callout {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; border-radius: 14px;
  border: 1px solid var(--line-soft); background: var(--bg-dark);
}
.callout p { color: var(--text-dim); font-size: .92rem; margin-top: 2px; }
.callout-icon {
  flex: none; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px; font-weight: 700;
}
.callout-info { border-color: rgba(75,159,255,.3); }
.callout-info .callout-icon { background: rgba(75,159,255,.16); color: var(--info); }
.callout-success { border-color: rgba(63,181,107,.3); }
.callout-success .callout-icon { background: rgba(63,181,107,.16); color: var(--ok); }
.callout-danger { border-color: rgba(229,72,77,.35); }
.callout-danger .callout-icon { background: rgba(229,72,77,.16); color: var(--danger); }
.callout .btn { margin-top: 12px; }

/* === Guide list === */
.guide-list { margin: 0 0 22px 0; padding-left: 0; list-style: none; counter-reset: g; display: grid; gap: 12px; }
.guide-list li { counter-increment: g; position: relative; padding-left: 40px; color: var(--text-dim); }
.guide-list li::before {
  content: counter(g); position: absolute; left: 0; top: -2px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(199,48,209,.14); border: 1px solid var(--line); color: var(--magenta-25);
  font-size: .8rem; font-weight: 700;
}
.guide-list strong { color: var(--white); }

/* === Boot-switch thumbnail + lightbox === */
.boot-thumb {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px 0; padding: 8px 14px 8px 8px;
  background: var(--bg-dark); border: 1px solid var(--line-soft); border-radius: 12px;
  color: var(--text-dim); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s;
}
.boot-thumb:hover { border-color: var(--line); }
/* When embedded in a guide step, drop onto its own line with tighter spacing. */
.guide-list .boot-thumb { display: flex; margin: 12px 0 4px; }
.boot-thumb img {
  width: 76px; height: 76px; flex: none; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line-soft);
}
.boot-thumb-label { display: grid; gap: 4px; }
.boot-thumb-title { font-size: .9rem; }
.boot-thumb-title strong { color: var(--white); }
.boot-thumb-hint { font-size: .8rem; color: var(--magenta-25); }

.lightbox-inner { position: relative; display: grid; gap: 12px; justify-items: center; max-width: 94vw; }
.lightbox-inner img {
  max-width: 94vw; max-height: 76vh; width: auto; height: auto;
  border-radius: 12px; border: 1px solid var(--line);
}
.lightbox-caption { margin: 0; font-size: .9rem; color: var(--text-dim); text-align: center; }
.lightbox-close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0,6,16,.6); border: 1px solid var(--line); color: var(--white);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}

/* === Flash step list === */
.step-list { list-style: none; display: grid; gap: 10px; margin: 8px 0 20px; }
.step-row {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--bg-dark);
  transition: border-color .25s;
}
.step-row.active { border-color: var(--line); }
.step-row.done { border-color: rgba(63,181,107,.3); }
.step-row.error { border-color: rgba(229,72,77,.35); }
.step-status {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-soft); font-size: .78rem; font-weight: 700; color: var(--text-faint);
}
.step-row.active .step-status { border-color: var(--magenta); color: var(--magenta); animation: pulse 1.2s ease-in-out infinite; }
.step-row.done .step-status { background: rgba(63,181,107,.16); border-color: var(--ok); color: var(--ok); }
.step-row.error .step-status { background: rgba(229,72,77,.16); border-color: var(--danger); color: var(--danger); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.step-body { min-width: 0; }
.step-label { font-size: .95rem; }
.step-mini { height: 5px; margin-top: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.step-mini i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--magenta), var(--magenta-50)); transition: width .2s ease; }
.step-pct { font-size: .78rem; color: var(--text-faint); margin-top: 4px; }

/* Modal popup (second device-selection gate) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(0, 6, 16, .72);
  backdrop-filter: blur(6px);
  animation: reveal .25s ease both;
}
.modal-overlay .modal {
  max-width: 460px; width: 100%;
  display: grid; gap: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  border-color: var(--line);
}
.modal h2 { font-weight: 700; font-size: 1.2rem; }

/* === Done === */
#screen-done { text-align: center; }
.done-badge {
  width: 68px; height: 68px; margin: 4px auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2rem; color: var(--ok);
  background: rgba(63,181,107,.14); border: 1px solid var(--ok);
}
#screen-done .callout { text-align: left; margin-top: 18px; }

/* === Footer === */
footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; border-top: 1px solid var(--line-soft); max-width: 980px;
}
.foot-dim { color: var(--text-faint); font-size: .82rem; }
footer .wordmark { font-size: 15px; }

@media (max-width: 560px) {
  .card { padding: 22px; }
  h1 { font-size: 1.4rem; }
  .steprail li { font-size: 0; padding: 6px; }
  .steprail li span { width: 26px; height: 26px; }
}
