:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5e6a7f;
  --line: #dce3ee;
  --paper: #f7f9fc;
  --card: #ffffff;
  --blue: #2457d6;
  --blue-dark: #1742ae;
  --blue-soft: #eaf0ff;
  --orange: #ee9a3d;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, #e9efff 0, transparent 34rem),
    linear-gradient(180deg, #f9fbff 0%, var(--paper) 54%, #f1f5fb 100%);
}

body::before {
  content: "";
  position: fixed;
  width: 180px;
  height: 180px;
  right: -66px;
  top: 48px;
  border: 28px solid rgba(238, 154, 61, .18);
  border-radius: 50%;
  pointer-events: none;
}

.page-shell {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 56px 0 28px;
}

.hero { margin-bottom: 24px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 630px;
  margin-bottom: 16px;
  font-size: clamp(2.15rem, 6vw, 4.35rem);
  line-height: .98;
  letter-spacing: -.055em;
}

h2 {
  margin-bottom: 18px;
  font-size: 1.25rem;
  letter-spacing: -.02em;
}

.intro {
  max-width: 570px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.card {
  position: relative;
  margin-bottom: 20px;
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid rgba(220, 227, 238, .88);
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 55px rgba(30, 52, 92, .09);
}

button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(36, 87, 214, .25);
  outline-offset: 2px;
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}

button, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

button:hover, .button-link:hover { transform: translateY(-1px); }

.primary-button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(36, 87, 214, .18);
}

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

.secondary-button {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.repository-link-wrap {
  overflow-wrap: anywhere;
  margin: 20px 0;
  padding: 14px;
  border-radius: 12px;
  background: #f2f5fa;
}

.repository-link-wrap a { color: var(--blue-dark); font-weight: 700; }

.notice {
  display: grid;
  gap: 5px;
  margin: 18px 0 22px;
  padding: 14px 16px;
  border-left: 4px solid var(--orange);
  color: #634214;
  background: #fff7ea;
  line-height: 1.45;
}

.notice strong { color: #4a2b08; }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

.instructions {
  padding: 18px 4px 10px;
  color: var(--muted);
}

.instructions h2 { color: var(--ink); margin-bottom: 12px; }

.instructions ul,
.instructions ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  line-height: 1.55;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

@media (max-width: 520px) {
  .page-shell { width: min(100% - 24px, 760px); padding-top: 34px; }
  .card { border-radius: 18px; }
  .button-row > * { width: 100%; }
  footer { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* ---------------------------------------------------------------- walkthrough */

/* The guidance sections read as cards too, so the page is one consistent stack
   instead of styled cards followed by bare text. */
.card.instructions {
  padding: clamp(22px, 5vw, 38px);
  color: var(--ink);
}

.card.instructions > p,
.card.instructions ul,
.card.instructions ol {
  color: var(--muted);
}

.instructions h3 {
  margin: 30px 0 6px;
  font-size: 1.02rem;
  letter-spacing: -.01em;
}

.instructions h3:first-of-type { margin-top: 22px; }

.option-note {
  margin-bottom: 18px;
  font-size: .95rem;
  line-height: 1.6;
}

/* Step chips: A1, B2, ... */
.step {
  display: inline-block;
  min-width: 26px;
  margin-right: .5rem;
  padding: .16rem .5rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
}

/* Figures are SVG so the red pointers stay sharp at any width and cropping is
   just a viewBox -- there is no image-editing step to redo. */
.shot { margin: 0 0 1.5rem; }

.shot svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(30, 52, 92, .08);
}

.shot figcaption {
  margin-top: .7rem;
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.55;
}

/* ------------------------------------------------------------------ terminal */

/* Deliberately dark in every colour scheme -- a terminal that turns white stops
   reading as a terminal. */
.terminal {
  margin: 1rem 0;
  border-radius: 14px;
  overflow: hidden;
  background: #1b2130;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .22);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem .85rem;
  background: #262e3f;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.terminal-bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
}

.terminal-bar .dot.r { background: #ff5f57; }
.terminal-bar .dot.y { background: #febc2e; }
.terminal-bar .dot.g { background: #28c840; }

.terminal-title {
  margin-left: .45rem;
  color: rgba(255, 255, 255, .5);
  font-size: .78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.copy-btn {
  min-height: 30px;
  margin-left: auto;
  padding: .3rem .7rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .09);
  font-size: .78rem;
  font-weight: 650;
}

.copy-btn:hover { transform: none; background: rgba(255, 255, 255, .17); }
.copy-btn.copied { color: #0f2417; background: #3fb950; }

.terminal pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  color: #e6edf3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .87rem;
  line-height: 1.7;
}

.terminal code { background: none; color: inherit; padding: 0; }

.terminal .c  { color: #78839a; }
.terminal .o  { color: #aab6c6; }
.terminal .ok { color: #56d364; font-weight: 700; }

/* Shown, but never copied, so the block stays paste-safe. */
.terminal .p {
  color: #6cb6ff;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 520px) {
  .terminal pre { font-size: .8rem; }
  .terminal-title { display: none; }
}
