/* ============================================================
   Canvas Downloader - macOS Setup Wizard
   Shared interactive setup assistant (thanks-mac.html + mac-setup.html)
   Self-contained, .mw- prefixed to avoid clashes with host pages.
   ============================================================ */

.mw {
  --mw-bg:      #10111e;
  --mw-surf:    #15172a;
  --mw-surf2:   #191b30;
  --mw-border:  rgba(255, 255, 255, 0.11);
  --mw-sub:     rgba(255, 255, 255, 0.06);
  --mw-txt:     #e8edf3;
  --mw-txt2:    #b8cad8;
  --mw-txt3:    #8899a8;
  --mw-cyan:    #38bdf8;
  --mw-green:   #34d399;
  --mw-amber:   #fbbf24;

  max-width: 640px;
  margin: 0 auto;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mw * { box-sizing: border-box; }

/* ── Card shell ─────────────────────────────────────────── */
.mw-card {
  background: var(--mw-bg);
  border: 1px solid var(--mw-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.5);
}

/* ── Progress segments ──────────────────────────────────── */
.mw-progress {
  display: flex;
  gap: 6px;
  padding: 20px 28px 0;
}
.mw-seg {
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
  transition: background 0.35s ease;
}
.mw-seg.done    { background: var(--mw-green); }
.mw-seg.current { background: var(--mw-cyan); }

/* ── Header ─────────────────────────────────────────────── */
.mw-head {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--mw-border);
}
.mw-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mw-cyan);
  margin-bottom: 9px;
}
.mw-title {
  font-size: clamp(24px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--mw-txt);
  margin: 0 0 10px;
  line-height: 1.25;
}
.mw-sub {
  font-size: 14.5px;
  color: var(--mw-txt2);
  margin: 0;
  line-height: 1.6;
}

/* ── Body ───────────────────────────────────────────────── */
.mw-body {
  padding: 24px 28px;
  animation: mw-fade 0.3s ease;
}
@keyframes mw-fade {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Footer / nav buttons ───────────────────────────────── */
.mw-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-top: 1px solid var(--mw-border);
  background: rgba(0, 0, 0, 0.1);
}
.mw-btn {
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, color 0.15s, transform 0.08s;
}
.mw-btn:active { transform: scale(0.98); }
.mw-btn-primary {
  background: var(--mw-cyan);
  color: #04121d;
}
.mw-btn-primary:hover { background: #5ecbfb; }
.mw-btn-ghost {
  background: transparent;
  color: var(--mw-txt3);
  padding: 11px 6px;
  border-color: transparent;
}
.mw-btn-ghost:hover { color: var(--mw-txt2); }
.mw-foot-spacer { flex: 1; }

/* ── Media (videos / YouTube) ───────────────────────────── */
.mw-media {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--mw-border);
  margin: 0 0 18px;
  background: #000;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}
.mw-media video,
.mw-media img { display: block; width: 100%; height: auto; }
.mw-media.ratio { position: relative; aspect-ratio: 16 / 9; }
.mw-media.ratio iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}
.mw-media-cap {
  font-size: 12px;
  color: var(--mw-txt3);
  text-align: center;
  margin: -8px 0 18px;
}

/* ── Numbered steps (position-based - no flex on li to avoid anonymous flex items) */
.mw-steps {
  list-style: none; margin: 0; padding: 0;
  counter-reset: mws;
}
.mw-steps li {
  counter-increment: mws;
  position: relative;
  padding-left: 38px;
  font-size: 14px; color: var(--mw-txt2);
  margin-bottom: 15px; line-height: 1.6;
}
.mw-steps li:last-child { margin-bottom: 0; }
.mw-steps li::before {
  content: counter(mws);
  position: absolute;
  left: 0; top: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--mw-surf2);
  border: 1px solid var(--mw-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--mw-cyan);
}
.mw-steps strong { color: var(--mw-txt); font-weight: 600; }

/* Spacing when a note or hint directly follows the steps list */
.mw-steps + .mw-note  { margin-top: 20px; }
.mw-steps + .mw-hint  { margin-top: 18px; }

/* ── Callout notes ──────────────────────────────────────── */
.mw-note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 10px;
  font-size: 13.5px; line-height: 1.6;
  margin: 0 0 18px;
}
.mw-note-ico {
  flex-shrink: 0;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.mw-note-ico svg { display: block; }
.mw-note.cyan {
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #c2e8fb;
}
.mw-note.cyan .mw-note-ico { color: var(--mw-cyan); }
.mw-note.amber {
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: #fde08a;
}
.mw-note.amber .mw-note-ico { color: var(--mw-amber); }
.mw-note strong { color: #fff; font-weight: 600; }

/* Trailing hint under steps */
.mw-hint {
  font-size: 12.5px; color: var(--mw-txt3);
  margin: 16px 0 0; line-height: 1.6;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--mw-border);
  border-radius: 8px;
}
.mw-hint strong { color: var(--mw-txt2); }

/* ── Version option cards (intro) ───────────────────────── */
.mw-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.mw-opt {
  display: flex; align-items: center; gap: 14px;
  text-align: left; width: 100%;
  background: var(--mw-surf);
  border: 1px solid var(--mw-border);
  border-radius: 13px;
  padding: 14px 18px;
  cursor: pointer; color: var(--mw-txt);
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.mw-opt:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: var(--mw-surf2);
}
.mw-opt:active { transform: scale(0.99); }
.mw-opt-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--mw-surf2);
  border: 1px solid var(--mw-border);
  border-radius: 10px;
  color: var(--mw-txt3);
  transition: color 0.15s, border-color 0.15s;
}
.mw-opt:hover .mw-opt-icon {
  color: var(--mw-cyan);
  border-color: rgba(56, 189, 248, 0.35);
}
.mw-opt-main { flex: 1; min-width: 0; }
.mw-opt-title { display: block; font-size: 14px; font-weight: 700; color: var(--mw-txt); }
.mw-opt-desc  { display: block; font-size: 12px; color: var(--mw-txt3); margin-top: 2px; }
.mw-opt-arrow {
  display: flex; align-items: center;
  color: var(--mw-txt3); flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}
.mw-opt:hover .mw-opt-arrow { transform: translateX(2px); color: var(--mw-txt2); }

/* ── "Not sure which version?" help card ────────────────── */
.mw-help-card {
  margin-top: 10px;
  border-radius: 13px;
  border: 1px solid var(--mw-border);
  background: var(--mw-surf);
  overflow: hidden;
}
.mw-help-card summary {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px;
  cursor: pointer; list-style: none;
  user-select: none;
  transition: background 0.15s;
}
.mw-help-card summary::-webkit-details-marker { display: none; }
.mw-help-card summary:hover { background: var(--mw-surf2); }
.mw-help-card[open] > summary { border-bottom: 1px solid var(--mw-border); }
.mw-help-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--mw-surf2);
  border: 1px solid var(--mw-border);
  border-radius: 10px;
  color: var(--mw-cyan);
}
.mw-help-text {
  flex: 1; min-width: 0;
  font-size: 14px; font-weight: 600; color: var(--mw-txt);
}
.mw-help-chevron {
  display: flex; align-items: center;
  color: var(--mw-txt3);
  transition: transform 0.2s;
}
.mw-help-card[open] .mw-help-chevron { transform: rotate(90deg); }
.mw-help-body {
  padding: 16px 18px 18px;
  background: var(--mw-surf2);
}
.mw-help-body p {
  font-size: 13.5px; color: var(--mw-txt2); line-height: 1.65; margin: 0;
}
/* Sibling-only, so the single-paragraph case is unchanged and no margin can
   land against the card's own padding. The card gained a second paragraph (the
   macOS 14 floor) and without this the two ran together as one block. */
.mw-help-body p + p { margin-top: 10px; }
.mw-help-body strong { color: var(--mw-txt); }

/* ── Permission checklist (first download) ──────────────── */
.mw-perms { margin: 0 0 4px; }
.mw-perm {
  display: flex; gap: 14px; align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--mw-sub);
}
.mw-perm:first-child { padding-top: 0; }
.mw-perm:last-child  { border-bottom: none; padding-bottom: 0; }
.mw-perm-ico {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 9px;
  background: var(--mw-surf2);
  border: 1px solid var(--mw-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--mw-txt2);
}
.mw-perm-ico svg { display: block; }
.mw-perm-body { flex: 1; min-width: 0; }
.mw-perm-name {
  font-size: 15.5px; font-weight: 600; color: var(--mw-txt);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.mw-perm-desc { font-size: 13px; color: var(--mw-txt3); margin-top: 2px; }
.mw-perm-allow {
  flex-shrink: 0;
  font-size: 11px; font-weight: 700;
  color: var(--mw-green);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 6px; padding: 3px 10px;
}
.mw-tag-15 {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--mw-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 4px; padding: 1px 6px;
}

/* ── Done screen ────────────────────────────────────────── */
.mw-done { text-align: center; padding: 10px 0 6px; }
.mw-done-emoji { font-size: 52px; line-height: 1; }
.mw-done h2 {
  font-size: 26px; font-weight: 900; letter-spacing: -0.03em;
  color: var(--mw-txt); margin: 16px 0 10px;
}
.mw-done p {
  font-size: 14.5px; color: var(--mw-txt2);
  margin: 0 auto 26px; max-width: 420px; line-height: 1.6;
}
.mw-done-actions {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 320px; margin: 0 auto;
}
.mw-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  padding: 11px 18px; border-radius: 10px;
  color: var(--mw-txt2);
  background: var(--mw-surf);
  border: 1px solid var(--mw-border);
  transition: color 0.15s, border-color 0.15s;
}
.mw-link:hover { color: var(--mw-txt); border-color: rgba(255, 255, 255, 0.22); }
.mw-link.primary { background: var(--mw-cyan); color: #04121d; border-color: transparent; }
.mw-link.primary:hover { background: #5ecbfb; color: #04121d; }
.mw-restart {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 12px; color: var(--mw-txt3);
  margin-top: 8px; text-decoration: underline; text-underline-offset: 3px;
}
.mw-restart:hover { color: var(--mw-txt2); }

@media (max-width: 560px) {
  .mw-head, .mw-body, .mw-foot, .mw-progress { padding-left: 18px; padding-right: 18px; }
  .mw-btn { padding: 10px 16px; font-size: 13px; }
  .mw-opt { padding: 12px 14px; gap: 12px; }
  .mw-opt-icon { width: 34px; height: 34px; }
}
