/* Forever Guide setup page (start/). Loads after site.css and uses its tokens, buttons, nav and footer.
   Same rules: type scale steps only, spacing 0 2 4 8 12 16 24 32 40 48 64 80 96, radius 4 6 8 12 16 24 9999,
   one easing (var(--ease)). */

/* ---------- Which system: .js and data-os are set on <html> by start.js before the first paint ---------- */

.js-only { display: none !important; }
.js .js-only { display: revert !important; }
.js .flow-bar.js-only { display: flex !important; }
.js .tick.js-only, .js .copy.js-only { display: inline-flex !important; }
.js .restart.js-only { display: flex !important; }

.js[data-os="win"] .only-mac,
.js[data-os="mac"] .only-win { display: none; }
.js .os-tag, .js .os-pre { display: none; }
.os-pre { color: var(--gold); font-weight: 600; }

.k-win, .k-mac { display: none; }
.js[data-os="win"] .k-win, .js[data-os="mac"] .k-mac { display: inline; }
.js .k-any { display: none; }

/* ---------- Nav (no menu on this page: two small links) ---------- */

.start-links { display: flex; align-items: center; gap: 2px; margin-left: 4px; }
.start-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 9999px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
  transition: color 300ms var(--ease), background-color 300ms var(--ease), transform 300ms var(--ease);
}
.start-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.start-links a:active { transform: scale(0.98); }
.start-links a[aria-current] { color: var(--text); background: rgba(255, 255, 255, 0.08); }

/* ---------- Layout ---------- */

.start { padding: 96px 0 32px; }
.start-inner { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .start-inner { padding: 0 24px; } }
@media (min-width: 1024px) { .start { padding-top: 128px; } }

/* ---------- Hero ---------- */

.start-hero { display: flex; flex-direction: column; align-items: flex-start; padding-top: 24px; }
.start-hero .eyebrow { margin-bottom: 16px; }
.start-hero h1 {
  max-width: 680px;
  font-size: 36px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  padding-bottom: 4px;
  background: linear-gradient(90deg, #ffffff 0%, #9b9b9b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ffffff;
}
@media (min-width: 640px) { .start-hero h1 { font-size: 48px; line-height: 1; padding-bottom: 8px; } }
.start-lede { position: relative; align-self: stretch; padding-right: 112px; }
.start-art {
  position: absolute;
  right: 0;
  bottom: -8px;
  height: 184px;
  width: auto;
  max-width: none;
  filter: drop-shadow(0 0 32px rgba(217, 167, 96, 0.16));
  pointer-events: none;
  user-select: none;
}
@media (min-width: 640px) {
  .start-lede { padding-right: 176px; }
  .start-art { right: 24px; height: 296px; }
}
.start-sub { max-width: 680px; margin-top: 16px; font-size: 16px; line-height: 24px; color: var(--muted); }
@media (min-width: 640px) { .start-sub { margin-top: 24px; font-size: 18px; line-height: 28px; } }

.on-phone {
  margin-top: 24px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--raised-2);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}
.on-phone .addr { color: var(--text); font-family: var(--mono); overflow-wrap: anywhere; }
@media (min-width: 768px) { .on-phone { display: none; } }

/* ---------- Progress and system switch ---------- */

.flow-bar {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}
.progress { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); }
#done-count { color: var(--gold); font-weight: 600; }
.os-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid var(--line-strong);
  background: var(--raised);
}
.os-label-txt { padding: 0 8px 0 12px; font-size: 14px; line-height: 20px; color: var(--muted); }
.os-btn {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 9999px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--muted);
  transition: color 300ms var(--ease), background-color 300ms var(--ease), transform 300ms var(--ease);
}
.os-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.os-btn:active { transform: scale(0.98); }
.os-btn[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }

/* ---------- The four steps ---------- */

.flow { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; }
html:not(.js) .flow { margin-top: 32px; }
.step {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--raised);
  transition: border-color 300ms var(--ease), background-color 300ms var(--ease);
}
.step.next { border-color: rgba(217, 167, 96, 0.45); }
.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 0;
}
@media (min-width: 640px) { .step-head { padding: 24px 24px 0; gap: 16px; } }
.step-head h2 { flex: 1; min-width: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
@media (min-width: 640px) { .step-head h2 { font-size: 24px; line-height: 32px; } }
.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: 1px solid var(--line-strong);
  background: var(--raised-3);
  color: var(--gold);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  transition: background-color 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}
.step-num .tickmark { display: none; }
.step.done .step-num { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.step.done .step-num .num { display: none; }
.step.done .step-num .tickmark { display: block; }

.tick {
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 9999px;
  border: 1px solid var(--line-strong);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--muted);
  transition: color 300ms var(--ease), background-color 300ms var(--ease), border-color 300ms var(--ease), transform 300ms var(--ease);
}
.tick:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.tick:active { transform: scale(0.98); }
.tick .box {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--raised-3);
  color: transparent;
  transition: background-color 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}
.tick .box svg { width: 12px; height: 12px; }
.tick[aria-pressed="true"] { color: var(--gold); border-color: rgba(217, 167, 96, 0.45); }
.tick[aria-pressed="true"] .box { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

.step-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 24px 60px;
  font-size: 16px;
  line-height: 24px;
  color: var(--muted);
}
@media (max-width: 479px) { .step-body { padding-left: 16px; } }
@media (min-width: 640px) { .step-body { padding: 16px 24px 24px 72px; gap: 16px; } }
.step-body strong, .alt strong, .strip strong { color: var(--text); font-weight: 600; }
.step-body p.big { font-size: 18px; line-height: 28px; color: var(--text); }
.step.done .step-body { opacity: 0.72; }
.step-body .fine { margin-top: -4px; }

.btn-big { min-height: 48px; padding: 12px 16px 12px 12px; }
@media (max-width: 479px) { .btn-big { width: 100%; } }
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  white-space: normal;
  text-align: left;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); transform: translateY(-1px); }
.btn-ghost:active { transform: scale(0.98); }

/* Numbered sub steps inside a step */
.sub { display: flex; flex-direction: column; gap: 16px; counter-reset: sub; width: 100%; }
.sub > li { counter-increment: sub; position: relative; padding-left: 32px; min-width: 0; }
.sub > li::before {
  content: counter(sub);
  position: absolute;
  left: 0;
  top: 2px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: rgba(217, 167, 96, 0.14);
  color: var(--gold);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}
.sub.tight { gap: 8px; }
.sub > li > span { display: block; }
.js .sub > li > span.only-win, .js .sub > li > span.only-mac { display: block; }
.js[data-os="win"] .sub > li > span.only-mac, .js[data-os="mac"] .sub > li > span.only-win { display: none; }

/* The folder path with its Copy button */
.path {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--raised-3);
}
.os-tag { flex-basis: 100%; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--gold); }
.path-text {
  flex: 1 1 220px;
  min-width: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  overflow-wrap: break-word;
  user-select: all;
  -webkit-user-select: all;
}
.copy {
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--text);
  transition: background-color 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease), transform 300ms var(--ease);
}
.copy:hover { background: var(--raised-2); }
.copy:active { transform: scale(0.98); }
.copy.copied { color: var(--gold); border-color: rgba(217, 167, 96, 0.45); }
.copy.failed { color: #f0a08a; }
.tip { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--muted); }

kbd {
  display: inline-block;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--raised-3);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}

/* The Mac app alternative */
.alt {
  width: 100%;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--raised-2);
}
.alt h3 { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text); }
.alt p { font-size: 14px; line-height: 20px; }
.alt .path { align-self: stretch; margin-top: 0; }
.more { width: 100%; }
.more summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  border-radius: 4px;
  transition: color 300ms var(--ease);
}
.more summary::-webkit-details-marker { display: none; }
.more summary:hover { color: var(--gold); }
.more summary svg { color: var(--muted); transition: transform 700ms var(--ease); }
.more[open] summary svg { transform: rotate(180deg); color: var(--gold); }
.more > p, .more > ol { margin-top: 8px; font-size: 14px; line-height: 20px; }
.more .sub > li::before { top: 0; }

.note {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--raised-2);
  font-size: 14px;
  line-height: 20px;
}

/* Start over */
.restart { margin-top: 16px; align-items: center; gap: 12px; }
.text-btn {
  min-height: 44px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  border-radius: 4px;
  transition: color 300ms var(--ease);
}
.text-btn:hover { color: var(--text); }
.text-btn:active { transform: translateY(1px); }
.restart-note { font-size: 14px; line-height: 20px; color: var(--muted); }

/* ---------- Claude and ChatGPT strip ---------- */

.strip { margin-top: 64px; }
.strip h2, .stuck h2 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.02em; }
.strip-grid { margin-top: 16px; display: grid; gap: 16px; }
@media (min-width: 640px) { .strip-grid { grid-template-columns: 3fr 2fr; } }
.strip-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--raised);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}
@media (min-width: 640px) { .strip-card { padding: 24px; } }
.strip-card h3 { font-size: 18px; line-height: 28px; font-weight: 600; color: var(--text); }
.strip-card .btn { margin-top: 4px; font-size: 14px; line-height: 20px; }
.strip-card .text-link { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Stuck ---------- */

.stuck { margin-top: 64px; }
.stuck-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.stuck-list li {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--raised);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}
.stuck-list li strong { display: block; margin-bottom: 4px; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text); }
.tell { margin-top: 16px; font-size: 16px; line-height: 24px; color: var(--muted); }

.footer { padding-top: 32px; }
.footer .container { max-width: 720px; }

@media (prefers-reduced-motion: reduce) {
  .step, .step-num, .tick, .tick .box, .copy, .os-btn, .more summary svg { transition: none; }
}
.footer .container { padding: 0 16px; }
@media (min-width: 640px) { .footer .container { padding: 0 24px; } }
