/* Dovrsign setup guide.
   Palette tracks the app's brand colours (lib/constants/AppColors.dart). */

:root {
  --orange: #f67952;
  --orange-dark: #d95f39;
  --ink: #200e32;
  --blue: #386fa4;
  --bg: #fbfbfd;
  --card: #ffffff;
  --line: #e6e4ea;
  --muted: #6b6577;
  --shadow: 0 1px 2px rgba(32, 14, 50, 0.06), 0 8px 24px rgba(32, 14, 50, 0.06);
  --radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- masthead ---------- */

.masthead {
  background: linear-gradient(160deg, #2a1340 0%, var(--ink) 55%, #14071f 100%);
  color: #fff;
  padding: 44px 0 52px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--orange);
  margin-bottom: 18px;
}

.masthead h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}

/* ---------- sections ---------- */

main { padding: 40px 0 8px; }

.section { margin-bottom: 44px; }

.section h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.hint {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

a { color: var(--blue); }

/* ---------- device picker ---------- */

.picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.picker button {
  appearance: none;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.picker button:hover {
  border-color: #cfc9d8;
  transform: translateY(-1px);
}

.picker button[aria-selected="true"] {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(246, 121, 82, 0.16);
}

.picker .p-label {
  display: block;
  font-weight: 650;
  font-size: 16px;
}

.picker .p-sub {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

/* ---------- video ---------- */

.video {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #17091f;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video .video-missing {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  padding: 24px;
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 18px 62px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-content: center;
}

.steps h4 {
  margin: 2px 0 6px;
  font-size: 16px;
  letter-spacing: -0.005em;
}

.steps p {
  margin: 0;
  color: #3f3750;
  font-size: 15px;
}

/* ---------- gate section ----------
   A used Chromebox locked into another vendor's kiosk software can't do
   anything else on the page until this is cleared, so it reads as a stop sign
   rather than as the next item in a list. */

#sec-gate > h2 { color: var(--ink); }

#sec-gate .stage-note.when {
  background: #fff1ea;
  border-left: 4px solid var(--orange);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  color: #5d3a28;
  font-size: 15px;
}

/* ---------- stages ---------- */

.stage { margin-bottom: 34px; }
.stage:last-child { margin-bottom: 0; }

.stage h3 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 17px;
  letter-spacing: -0.005em;
  margin: 0 0 10px;
}

.stage-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
}

.tag {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f1eef6;
  border-radius: 20px;
  padding: 3px 10px;
}

.stage-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14.5px;
}

.stage-note.when {
  background: #fff6f2;
  border-left: 3px solid var(--orange);
  border-radius: 0 9px 9px 0;
  padding: 10px 14px;
  color: #6b4636;
}

.stage .video { margin-bottom: 14px; }

.credit {
  margin: -6px 0 14px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- install-method toggle ---------- */

.variants {
  display: flex;
  gap: 6px;
  background: #f1eef6;
  border-radius: 11px;
  padding: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.variants button {
  appearance: none;
  flex: 1;
  min-width: 140px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.variants button[aria-selected="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(32, 14, 50, 0.12);
}

/* ---------- device prerequisites ---------- */

#prereqs { margin-top: 22px; }

#prereqs h3 {
  font-size: 15px;
  margin: 0 0 10px;
}

.prereqs {
  margin: 0;
  padding-left: 22px;
  color: #3f3750;
  font-size: 15px;
}

.prereqs li { margin-bottom: 6px; }

/* ---------- credentials ---------- */

.creds-section .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.creds-section p { margin: 0 0 14px; font-size: 15px; }
.creds-section p:last-child { margin-bottom: 0; }

.retailer {
  font-weight: 650;
  font-size: 15px;
  margin-bottom: 14px;
}

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.field .row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.field code {
  flex: 1;
  min-width: 0;
  background: #f6f4f9;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  overflow-x: auto;
  white-space: nowrap;
}

button.primary,
button.copy,
button.ghost {
  appearance: none;
  font: inherit;
  cursor: pointer;
  border-radius: 9px;
  transition: background 0.15s, border-color 0.15s;
}

button.primary {
  background: var(--orange);
  border: 0;
  color: #fff;
  font-weight: 650;
  padding: 12px 20px;
}

button.primary:hover { background: var(--orange-dark); }

button.primary[disabled] {
  background: #cfc9d8;
  cursor: default;
}

button.copy {
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  padding: 0 16px;
  white-space: nowrap;
}

button.copy:hover { border-color: var(--orange); }
button.copy.done { border-color: #2e9e6b; color: #2e9e6b; }

button.ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
}

button.ghost:hover { border-color: var(--orange); }

.warn {
  color: var(--muted);
  font-size: 13.5px;
}

.error {
  color: #b03a2e;
  font-size: 15px;
}

/* ---------- faq ---------- */

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}

.faq summary {
  cursor: pointer;
  font-weight: 620;
  font-size: 15px;
}

.faq summary::marker { color: var(--orange); }

.faq p {
  margin: 10px 0 2px;
  font-size: 15px;
  color: #3f3750;
}

/* ---------- help / footer ---------- */

.help p { font-size: 15px; }

.print-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.print-hint span { color: var(--muted); font-size: 13.5px; }

.foot {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 22px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- print ----------
   Credentials are deliberately omitted: a printout of the steps gets left on
   a shelf in the store, and the secret should not be on it. */

@media print {
  .masthead {
    background: none;
    color: var(--ink);
    padding: 0 0 18px;
  }
  .lede { color: var(--muted); }
  .picker, .video, .variants, .creds-section, .print-hint, .foot { display: none !important; }
  .stage h3 { break-after: avoid; }
  .steps li, .faq details {
    box-shadow: none;
    break-inside: avoid;
  }
  body { background: #fff; }
}
