/* ============================================================
   GTM Outreach Crash Course — guided, one-step-at-a-time UI
   Depends on tokens from /assets/anjela.css
   ============================================================ */

:root {
  --card-radius: 6px;
  --term: #0A0A0A;
}

/* ───────────── slim top bar (44px, replaces the site nav here) ───────────── */
.cbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  height: 46px; padding: 0 max(20px, calc((100% - 860px) / 2));
  background: rgba(251,251,249,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.cbrand {
  font-weight: 700; font-size: 16px; letter-spacing: -0.04em;
  text-decoration: none; color: var(--ink-0); flex: none;
}
.cbrand .dot { color: var(--magenta); }
.cchap {
  flex: 1; min-width: 0;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cnum {
  flex: none; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .06em; color: var(--ink-0);
}
.cmap {
  flex: none; width: 30px; height: 30px; padding: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; border-radius: 6px; transition: background .15s;
}
.cmap:hover { background: rgba(10,10,10,0.06); }
.cmap i { display: block; width: 15px; height: 1.5px; background: var(--ink-1); border-radius: 2px; }
.cprog {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
  background: var(--magenta);
  transition: width .45s cubic-bezier(.2,.7,.3,1);
}

/* ───────────── stage ───────────── */
.stage { max-width: 780px; margin: 0 auto; padding: 40px 24px 120px; }

.step {
  display: none;
  animation: rise .38s cubic-bezier(.2,.7,.3,1) both;
}
.step.is-active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* when JS is off, show everything as a plain document */
.no-js .step { display: block; margin-bottom: 64px; }
.no-js .course-bar, .no-js .navrow, .no-js .gate { display: none; }

.kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--magenta);
}
.kicker .num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 22px; padding: 0 7px;
  border: 1px solid var(--magenta); border-radius: 999px;
  font-size: 10px; letter-spacing: .06em;
}
.kicker .ch { color: var(--ink-2); }

.step h2 {
  font-size: clamp(30px, 4.6vw, 46px); font-weight: 700;
  letter-spacing: -0.04em; line-height: 1.05;
  margin: 18px 0 0; text-wrap: balance;
}
.step .lede {
  font-size: 20px; line-height: 1.5; color: var(--ink-1);
  margin: 18px 0 0; max-width: 42em; text-wrap: pretty;
}
.step p { max-width: 42em; }
.step h3 {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
  margin: 38px 0 0;
}
.step ul, .step ol { max-width: 42em; padding-left: 22px; }
.step li { margin: 9px 0; line-height: 1.55; }
.step li::marker { color: var(--ink-3); }
.step a[href] { color: var(--magenta); text-decoration: underline; text-underline-offset: 3px; }

/* outcome badge */
.outcome {
  display: flex; gap: 14px; align-items: flex-start;
  margin: 30px 0 0; padding: 18px 20px;
  background: rgba(74,114,100,0.07);
  border-left: 2px solid var(--jade);
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
}
.outcome .lb {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--jade); white-space: nowrap; padding-top: 4px;
}
.outcome p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink-1); }

/* callouts */
.note {
  margin: 26px 0 0; padding: 16px 20px; border-radius: var(--card-radius);
  background: var(--paper-2); border: 1px solid var(--line-2);
  font-size: 16px; line-height: 1.55; color: var(--ink-1);
}
.note b { color: var(--ink-0); }
.note.warn { background: rgba(220,48,143,0.06); border-color: rgba(220,48,143,0.22); }
.note.tip  { background: rgba(231,254,85,0.30); border-color: rgba(10,10,10,0.10); color: var(--ink-0); }
.note .tag {
  display: block; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase; margin-bottom: 7px; color: var(--ink-2);
}
.note.warn .tag { color: var(--magenta); }

/* ───────────── prompt / terminal blocks ───────────── */
.pbox { margin: 22px 0 0; border-radius: var(--card-radius); overflow: hidden; background: var(--term); }
.pbox-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.10);
}
.pbox-head .lbl {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(251,251,249,0.55);
  min-width: 0; overflow-wrap: anywhere;
}
.pcopy {
  flex: none;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; cursor: pointer;
  background: rgba(255,255,255,0.08); color: var(--paper);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 999px;
  padding: 6px 12px; transition: all .15s; white-space: nowrap;
}
.pcopy:hover { background: rgba(255,255,255,0.16); }
.pcopy.ok { background: var(--neon); color: var(--term); border-color: var(--neon); }
.pbox pre {
  margin: 0; padding: 16px 18px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.65;
  color: #EDEDE8; white-space: pre-wrap; word-break: break-word;
}
.pbox pre .v { color: var(--neon); }
.pbox.shell pre { color: #C9F3D8; }

/* ───────────── figures / diagrams ───────────── */
.fig { margin: 30px 0 0; padding: 0; }
.fig .scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line-2); border-radius: var(--card-radius); background: #fff;
}
.fig svg { display: block; width: 100%; height: auto; padding: 10px; }
.fig figcaption {
  margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2);
  max-width: 42em;
}

/* inline code */
.step code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--paper-2); border: 1px solid var(--line-2);
  border-radius: 4px; padding: 1px 5px;
}

/* ───────────── forms (ICP capture) ───────────── */
.fields { margin: 26px 0 0; display: grid; gap: 16px; }
.fields.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .fields.two { grid-template-columns: 1fr; } }
.field label {
  display: block; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 7px;
}
.field input, .field textarea {
  width: 100%; font-family: var(--font-display); font-size: 16px; color: var(--ink-0);
  background: #fff; border: 1px solid var(--line); border-radius: var(--card-radius);
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(220,48,143,0.10);
}
.field .hint { font-size: 13px; color: var(--ink-2); margin-top: 6px; line-height: 1.4; }

/* live preview under the ICP forms — shows where the typing goes */
.livewrap { margin: 30px 0 0; }
.livewrap .lvl {
  margin: 0 0 -4px; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--jade);
}
.livewrap .pbox pre { font-size: 13px; }
.pbox pre .v {
  color: var(--neon);
  animation: var-in .35s ease-out;
}
@keyframes var-in { from { background: rgba(231,254,85,.25); } to { background: transparent; } }

/* ───────────── branch chooser ───────────── */
.choices { display: grid; gap: 14px; margin: 28px 0 0; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .choices { grid-template-columns: 1fr; } }
.choice {
  text-align: left; cursor: pointer; background: #fff;
  border: 1px solid var(--line); border-radius: var(--card-radius);
  padding: 22px; transition: all .18s; font: inherit; color: inherit;
}
.choice:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.choice[aria-pressed="true"] {
  border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(220,48,143,0.10);
}
.choice .ct {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--magenta);
}
.choice h4 { margin: 10px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.choice p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-1); }
.choice .pick {
  display: inline-block; margin-top: 14px; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
}
.choice[aria-pressed="true"] .pick { color: var(--magenta); }
.choice[aria-pressed="true"] .pick::before { content: "✓ "; }

/* ───────────── gate + nav ───────────── */
.gate {
  margin: 40px 0 0; padding: 18px 20px;
  border: 1px dashed var(--line); border-radius: var(--card-radius);
  background: var(--paper-2);
}
.gate label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.gate input[type=checkbox] {
  appearance: none; flex: none; width: 22px; height: 22px; margin-top: 1px;
  border: 1.5px solid var(--ink-3); border-radius: 5px; background: #fff;
  cursor: pointer; transition: all .15s; position: relative;
}
.gate input[type=checkbox]:checked { background: var(--jade); border-color: var(--jade); }
.gate input[type=checkbox]:checked::after {
  content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg);
}
.gate .gt { font-size: 16.5px; line-height: 1.45; color: var(--ink-0); }
.gate .gs { display: block; font-size: 14px; color: var(--ink-2); margin-top: 4px; }

/* nav dock — in flow, Next centred so the next action is unmistakable */
.navdock {
  position: relative; display: flex; justify-content: center; align-items: center;
  margin: 52px 0 0; padding-top: 28px;
  border-top: 1px solid var(--line-2);
}
.ndot, .npill {
  font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; border-radius: 999px; border: 1px solid transparent;
  transition: background .18s, color .18s, opacity .18s, transform .18s;
}
.ndot {
  position: absolute; left: 0; top: 50%; margin-top: 14px; transform: translateY(-50%);
  width: 44px; height: 44px; font-size: 15px; line-height: 1;
  background: none; border-color: var(--line); color: var(--ink-2);
}
.ndot:hover:not(:disabled) { color: var(--ink-0); border-color: var(--ink-3); }
.ndot:disabled { opacity: 0; pointer-events: none; }
.npill {
  height: 52px; padding: 0 40px; font-size: 12.5px;
  background: var(--ink-0); color: var(--paper);
  box-shadow: 0 10px 26px -12px rgba(10,10,10,.5);
}
.npill:hover { background: var(--magenta); }
.npill.is-off {
  background: rgba(10,10,10,0.16); color: rgba(10,10,10,0.42);
  box-shadow: none;
}
.npill.is-off:hover { background: rgba(10,10,10,0.22); }

/* small standing credit, directly under the Next button */
.pagefoot {
  margin: 18px auto 0; text-align: center;
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.7;
  letter-spacing: .04em; color: var(--ink-3); max-width: 40em;
}
.pagefoot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line); }
.pagefoot a:hover { color: var(--magenta); border-bottom-color: var(--magenta); }

/* pulse the thing that is blocking Next */
@keyframes pulse-gate {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,48,143,0); }
  30%      { box-shadow: 0 0 0 5px rgba(220,48,143,0.20); }
}
.pulse {
  animation: pulse-gate .9s ease-out 2;
  border-color: var(--magenta) !important;
  border-style: solid !important;
}

/* ───────────── map (all steps) ───────────── */
.map-wrap { position: fixed; inset: 0; z-index: 90; display: none; }
.map-wrap.open { display: block; }
.map-wrap .scrim { position: absolute; inset: 0; background: rgba(10,10,10,0.42); backdrop-filter: blur(3px); }
.map {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 92vw);
  background: var(--paper); border-left: 1px solid var(--line);
  overflow-y: auto; padding: 26px 26px 60px;
  animation: slidein .3s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.map h3 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.map .sub { font-size: 14px; color: var(--ink-2); margin: 6px 0 20px; line-height: 1.45; }
.map .chp {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-2); margin: 22px 0 8px;
  padding-top: 14px; border-top: 1px solid var(--line-2);
}
.map button.jump {
  display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; font: inherit;
  padding: 8px 10px; border-radius: 5px; color: var(--ink-1); font-size: 15.5px; line-height: 1.35;
}
.map button.jump:hover { background: var(--paper-2); color: var(--ink-0); }
.map button.jump .st { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); flex: none; width: 16px; }
.map button.jump.done .st { color: var(--jade); }
.map button.jump.now { background: rgba(220,48,143,0.08); color: var(--ink-0); font-weight: 600; }
.map button.jump.locked { color: var(--ink-3); cursor: not-allowed; }
.map .closex {
  position: absolute; top: 18px; right: 20px; background: none; border: none;
  font-size: 26px; line-height: 1; color: var(--ink-2); cursor: pointer;
}
/* take-your-progress-with-you block in the map */
.map-save {
  margin: 28px 0 0; padding: 18px; border-radius: var(--card-radius);
  background: var(--paper-2); border: 1px solid var(--line-2);
}
.map-save .ms-t {
  margin: 0; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
}
.map-save .ms-d { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-1); }
.ms-btn {
  margin: 14px 0 0; padding: 10px 16px; cursor: pointer;
  background: var(--ink-0); color: var(--paper);
  border: 1px solid var(--ink-0); border-radius: 999px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; transition: background .18s;
}
.ms-btn:hover { background: var(--magenta); border-color: var(--magenta); }
.ms-btn.ok { background: var(--neon); color: var(--ink-0); border-color: var(--neon); }

/* optional cloud sync card — only rendered when sync is configured */
.sync {
  margin: 34px 0 0; padding: 24px 26px;
  border: 1px solid var(--line); border-left: 2px solid var(--jade);
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
  background: #fff; max-width: 42em;
}
.sync .sy-t {
  margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink-0);
}
.sync .sy-d { margin: 10px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-1); }
.sync .sy-row { display: flex; gap: 10px; margin: 18px 0 0; flex-wrap: wrap; }
.sync input {
  flex: 1; min-width: 200px; font-family: var(--font-display); font-size: 16px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--card-radius);
  background: #fff; color: var(--ink-0);
}
.sync input:focus {
  outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(74,114,100,.12);
}
.sy-btn {
  flex: none; padding: 12px 22px; cursor: pointer;
  background: var(--ink-0); color: var(--paper);
  border: 1px solid var(--ink-0); border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; transition: background .18s;
}
.sy-btn:hover { background: var(--jade); border-color: var(--jade); }
.sync .sy-fine { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.sync .sy-err { margin: 12px 0 0; font-size: 14px; color: var(--magenta); }

/* storage-unavailable warning */
.nostore {
  margin: 0 0 26px; padding: 16px 18px; border-radius: var(--card-radius);
  background: rgba(220,48,143,0.07); border: 1px solid rgba(220,48,143,0.28);
  font-size: 15px; line-height: 1.55; color: var(--ink-1);
}
.nostore b { color: var(--ink-0); }

.map-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line-2);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.map-foot a { color: var(--ink-2); text-decoration: none; }
.map-foot a:hover { color: var(--ink-0); }
.map-foot button {
  background: none; border: none; cursor: pointer; padding: 0;
  font: inherit; color: var(--ink-3);
}
.map-foot button:hover { color: var(--magenta); }

/* ───────────── finish screen ───────────── */
.trophy {
  margin: 30px 0 0; padding: 34px; border-radius: var(--card-radius);
  background: var(--term); color: var(--paper);
}
.trophy h3 { margin: 0; color: var(--paper); font-size: 26px; letter-spacing: -0.03em; }
.trophy p { color: rgba(251,251,249,0.72); margin: 12px 0 0; font-size: 17px; line-height: 1.5; }
.trophy .stats { display: flex; gap: 34px; flex-wrap: wrap; margin: 26px 0 0; }
.trophy .stat .n { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; color: var(--neon); }
.trophy .stat .l {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(251,251,249,0.55); margin-top: 4px;
}

/* reference tables */
.ref { margin: 24px 0 0; border: 1px solid var(--line); border-radius: var(--card-radius); overflow: hidden; }
.ref .row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  padding: 13px 18px; border-bottom: 1px solid var(--line-2); font-size: 16px; align-items: baseline;
}
.ref .row:last-child { border-bottom: none; }
.ref .row:nth-child(odd) { background: rgba(10,10,10,0.015); }
.ref .row .lb { min-width: 0; }          /* one grid child, so the value stays on its line */
.ref .row b { font-weight: 600; }
.ref .row code {
  font-family: var(--font-mono); font-size: 0.85em;
  background: rgba(10,10,10,0.05); border: 1px solid var(--line-2);
  border-radius: 4px; padding: 1px 5px;
}
.ref .row .val {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-1);
  text-align: right; white-space: nowrap;
}
@media (max-width: 560px) {
  .ref .row { grid-template-columns: 1fr; gap: 4px; }
  .ref .row .val { text-align: left; }
}
.ref .row .val.good { color: var(--jade); }
.ref .row .val.bad { color: var(--magenta); }

/* quiet author line — mentioned in passing, never competing with the lesson */
.byline-inline {
  margin: 36px 0 0; padding-top: 16px;
  border-top: 1px solid var(--line-2);
  font-size: 14.5px; line-height: 1.55; color: var(--ink-2); max-width: 42em;
}
.byline-inline a { color: var(--ink-1); text-decoration: underline; text-underline-offset: 3px; }
.byline-inline a:hover { color: var(--magenta); }

/* thank-you block — only on the final screen, where it is earned */
.thanks {
  margin: 44px 0 0; padding: 30px 30px 32px;
  border: 1px solid var(--line); border-radius: var(--card-radius);
  background: #fff; max-width: 42em;
}
.thanks .tl {
  margin: 0; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
}
.thanks h3 { margin: 10px 0 0; font-size: 24px; letter-spacing: -0.03em; }
.thanks p { margin: 14px 0 0; font-size: 16.5px; line-height: 1.55; color: var(--ink-1); }
.thanks a { color: var(--magenta); }
.thanks-cta {
  display: inline-block; margin: 22px 0 0; padding: 14px 22px;
  background: var(--ink-0); color: var(--paper) !important;
  border-radius: 999px; text-decoration: none !important;
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase; transition: background .18s;
}
.thanks-cta:hover { background: var(--magenta); }
@media (max-width: 640px) {
  .thanks { padding: 22px 20px 24px; }
  .thanks-cta { font-size: 10.5px; padding: 13px 16px; letter-spacing: .06em; }
}

@media (max-width: 640px) {
  .cbar { height: 44px; gap: 10px; padding: 0 16px; }
  .cchap { display: none; }              /* chapter name lives in the map on small screens */
  .cbrand { font-size: 15px; }
  .stage { padding: 26px 18px 96px; }
  .step h2 { font-size: clamp(26px, 8vw, 34px); }
  .step .lede { font-size: 18px; }
  .step p, .step li { font-size: 17px; }
  .pbox pre { font-size: 12.5px; padding: 14px; }
  .pbox-head { padding: 9px 12px; }
  .pbox-head .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pcopy { padding: 6px 10px; letter-spacing: .06em; }
  .navdock { margin-top: 42px; padding-top: 24px; }
  .ndot { width: 40px; height: 40px; margin-top: 12px; }
  .npill { height: 50px; padding: 0 32px; font-size: 12px; }
  .pagefoot { font-size: 10px; }
  .note, .outcome { padding: 14px 16px; }
  .gate { padding: 16px; margin-top: 30px; }
  /* keep diagram labels legible — swipe instead of shrinking to 7px type */
  .fig svg { min-width: 560px; }
  .fig.narrow svg { min-width: 0; }      /* this one is built to fit a phone */
  .fig.narrow .scroll::after { display: none; }
  .fig .scroll { position: relative; }
  .fig .scroll::after {
    content: ""; position: sticky; right: 0; top: 0; float: right;
    width: 26px; height: 100%; pointer-events: none;
    background: linear-gradient(90deg, rgba(255,255,255,0), #fff);
  }
}
