/* DevOps Kit — Gemini "Mobile Design Spec" implementation.
   Tokens, type scale, radii and shadows per the spec. Zero heavy
   assets: inline SVG only, no raster images, no external fonts. */
:root {
  --ink: #14161a;
  --canvas: #F8FAFC;
  --card: #ffffff;
  --body: #242933;
  --muted: #525866;
  --hair: #e2e5ec;
  --blue: #0b5fff;
  --blue-dark: #0847c4;
  --amber: #f0b429;
  --green: #16a34a;
  --mint: #f0fdf4;
  --red: #ef4444;
  --red-soft: #fca5a5;
  --shadow-card: 0 1px 3px rgba(20, 22, 26, 0.06), 0 1px 2px rgba(20, 22, 26, 0.04);
  --shadow-float: 0 8px 24px rgba(20, 22, 26, 0.12);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--body); background: var(--canvas); line-height: 1.55; font-size: 15px; }
a { color: var(--blue); }
img { max-width: 100%; }
code { background: #f1f3f7; padding: 2px 5px; border-radius: 4px; font-size: 13.5px; font-family: var(--mono); color: var(--ink); overflow-wrap: anywhere; }
pre { overflow-x: auto; max-width: 100%; }
h2 { margin: 0 0 10px; font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
h3 { margin: 24px 0 8px; font-size: 16px; line-height: 1.35; font-weight: 700; color: var(--ink); }
hr { border: none; border-top: 1px solid var(--hair); margin: 2em 0; }
table { border-collapse: collapse; width: 100%; overflow-x: auto; display: block; }
td, th { border: 1px solid var(--hair); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: #f2f2f7; }

/* ---------- buttons (min-height 44px, radius 10px, 600, 14.5px) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: #fff; text-decoration: none; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 14.5px; text-align: center; min-height: 44px; border: 1px solid var(--blue); cursor: pointer; transition: transform 100ms cubic-bezier(0.2, 0, 0, 1), background 100ms ease; }
.btn:active { background: var(--blue-dark); transform: scale(0.985); }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid #d0d5dd; }
.btn.secondary:active { background: #f3f4f6; transform: scale(0.985); }
.btn.amber { background: var(--amber); color: var(--ink); border: 1px solid var(--amber); }
.btn.amber:active { background: #d99a06; transform: scale(0.985); }
.btn.disabled { background: #eef0f4; color: #667085; border: 1px dashed #cbd2df; cursor: not-allowed; opacity: 1; }
.btn.disabled:active { transform: none; }

/* ---------- sticky site header (56px, landing) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; background: rgba(250, 250, 250, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--hair); }
.site-header .wordmark { font-size: 16px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.site-header .wordmark small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.bill-pill { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); background: var(--amber); border-radius: 9999px; padding: 6px 10px; white-space: nowrap; }

/* ---------- hero ---------- */
.hero { padding: 24px 16px 32px; background: var(--canvas); background-image: radial-gradient(420px 220px at 8% 0%, rgba(11, 95, 255, 0.06), transparent 70%), radial-gradient(420px 260px at 96% 100%, rgba(240, 180, 41, 0.08), transparent 70%); }
.hero-inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.hero h1 { margin: 0; font-size: 32px; line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; color: var(--ink); }
.hero .subhead { margin: 0; font-size: 15px; line-height: 1.55; color: #424752; max-width: 62ch; }
.hero .cta { width: 100%; height: 48px; font-size: 15px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #fff; border: 1px solid var(--hair); color: var(--body); font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: 9999px; box-shadow: var(--shadow-card); }

/* animated terminal mockup (fixed 210px so layout never shifts) */
.hero-term { margin-top: 8px; border-radius: 12px; background: var(--ink); height: 210px; overflow: hidden; box-shadow: var(--shadow-float); }
.hero-term-chrome { height: 32px; background: #1e2128; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.hero-term-chrome .dot { width: 8px; height: 8px; border-radius: 50%; background: #4b5262; flex-shrink: 0; }
.hero-term-chrome .fname { flex: 1; text-align: center; font-family: var(--mono); font-size: 11px; color: #8b949e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-term-body { padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: #f3f4f6; height: 178px; overflow: hidden; }
.ht-line { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 20px; }
.ht-line .ht-prompt { color: var(--amber); }
.ht-line .ht-cmd { color: #f3f4f6; }
.ht-line .ht-muted { color: #9ca3af; }
.ht-line .ht-amber { color: var(--amber); }
.ht-line .ht-green { color: #34d399; }
.ht-line .ht-white { color: #f3f4f6; }
.ht-cursor { display: inline-block; width: 8px; height: 15px; background: var(--amber); vertical-align: -2px; animation: ht-blink 500ms steps(1) infinite; }
@keyframes ht-blink { 50% { opacity: 0; } }
.hero-term.fading .hero-term-body { opacity: 0; transition: opacity 300ms ease; }
.hero-term-body { transition: opacity 300ms ease; }

/* ---------- landing sections ---------- */
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.section { padding: 40px 0; }
.section > h2 { margin-bottom: 6px; }
.lead { color: var(--muted); font-size: 15px; margin: 0 0 16px; max-width: 62ch; }

/* how it works — vertical rail */
.rail { position: relative; margin: 20px 0 0; padding-left: 44px; }
.rail::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: var(--hair); }
.rail-step { position: relative; margin-bottom: 28px; }
.rail-step:last-child { margin-bottom: 0; }
.rail-num { position: absolute; left: -44px; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--ink); transition: border-color 180ms ease, box-shadow 180ms ease; }
.rail-step.active .rail-num { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11, 95, 255, 0.15); }
.rail-step b { display: block; font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.rail-step p { margin: 0; font-size: 15px; color: var(--body); }

/* skills grid */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
@media (min-width: 640px) { .skills { grid-template-columns: repeat(3, 1fr); } }
.skill { position: relative; background: #fff; border: 1px solid var(--hair); border-radius: 10px; padding: 14px 12px; overflow: hidden; box-shadow: var(--shadow-card); }
.skill::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--blue); }
.skill--data::before { background: var(--amber); }
.skill svg { width: 20px; height: 20px; stroke: var(--ink); margin-bottom: 8px; }
.skill b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.skill small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }

/* sim deck — dark full-bleed, horizontal scroll-snap */
.simdeck { background: var(--ink); color: #fff; padding: 40px 0; }
.simdeck h2 { color: #fff; }
.simdeck .lead { color: #c7cbd1; }
.simdeck-scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding: 4px 16px 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.simdeck-scroll::-webkit-scrollbar { display: none; }
.buygrid { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 640px) { .buygrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .buygrid { grid-template-columns: repeat(4, 1fr); } }
.buycard { background: #1f232b; border: 1px solid #343a45; border-radius: 14px; padding: 18px; }
.buycard .buytag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); background: var(--amber); border-radius: 9999px; padding: 5px 10px; }
.buycard:first-child .buytag { background: #fff; }
.buycard .buyprice { font-size: 26px; font-weight: 800; color: #fff; margin: 12px 0 4px; }
.buycard .buyprice small { font-size: 13px; font-weight: 600; color: #c7cbd1; }
.buycard ul { margin: 6px 0 0; padding: 0; list-style: none; }
.buycard ul li { padding: 5px 0 5px 26px; position: relative; font-size: 15px; color: #e5e7eb; }
.buycard ul li::before { content: "✓"; position: absolute; left: 2px; color: var(--amber); font-weight: 800; }
.buy-note { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 16px 0 0; max-width: 62ch; }
.simcard { min-width: 280px; scroll-snap-align: start; background: #1e2128; border: 1px solid #2e333f; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.simcard .steppill { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--amber); background: rgba(240, 180, 41, 0.12); border: 1px solid rgba(240, 180, 41, 0.3); border-radius: 9999px; padding: 4px 9px; }
.simcard .simpills { display: flex; gap: 6px; flex-wrap: wrap; }
.simcard .tierpill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--amber); background: rgba(240, 180, 41, 0.12); border: 1px solid rgba(240, 180, 41, 0.3); border-radius: 9999px; padding: 4px 9px; }
.simcard .tierpill.free { color: var(--green); background: rgba(22, 163, 74, 0.12); border-color: rgba(22, 163, 74, 0.3); }
.simcard h3 { margin: 0; color: #fff; font-size: 16px; }
.simcard p { margin: 0; color: #c7cbd1; font-size: 14px; line-height: 1.5; flex: 1; }
.simprog { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; font-family: var(--mono); font-size: 11px; color: #8b949e; }
.simprog i { width: 10px; height: 10px; background: #2e333f; border-radius: 2px; display: inline-block; }
.simprog i.on { background: var(--amber); }
.simcard .btn { width: 100%; }

/* phase cards */
.cards { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: #fff; border: 1px solid #d0d5dd; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; box-shadow: var(--shadow-card); }
.card.featured { border: 2px solid var(--ink); }
.card.bundle-wide { grid-column: 1 / -1; }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card .tagline { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.card .price { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--ink); margin: 4px 0; }
.card .price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.microbadge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--hair); border-radius: 9999px; padding: 4px 9px; margin-bottom: 10px; align-self: flex-start; }
.card ul { margin: 6px 0 16px; padding: 0; list-style: none; }
.card ul li { padding: 5px 0 5px 26px; position: relative; font-size: 15px; }
.card ul li::before { content: "✓"; position: absolute; left: 2px; color: var(--blue); font-weight: 800; }
.card .btn { width: 100%; margin-top: auto; }
.paynote { font-size: 12px; color: var(--muted); margin: 10px 0 0; text-align: center; }

/* curriculum */
details.curriculum { background: #fff; border: 1px solid var(--hair); border-radius: 16px; margin: 12px 0; overflow: hidden; box-shadow: var(--shadow-card); }
details.curriculum summary { cursor: pointer; padding: 16px 18px; font-weight: 800; font-size: 15px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 10px; align-items: center; min-height: 44px; }
details.curriculum summary::-webkit-details-marker { display: none; }
details.curriculum summary .meta { font-weight: 600; color: var(--muted); font-size: 13px; white-space: nowrap; }
details.curriculum summary .plus { font-size: 20px; font-weight: 400; color: var(--muted); transition: transform 180ms ease-out; flex-shrink: 0; }
details.curriculum[open ] summary .plus { transform: rotate(45deg); }
details.curriculum .cbody { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 200ms ease-out; }
details.curriculum[open ] .cbody { grid-template-rows: 1fr; }
details.curriculum .cbody-inner { overflow: hidden; min-height: 0; }
.lesson-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-top: 1px solid #f2f2f7; }
.lesson-row .n { font-family: var(--mono); font-size: 12px; color: #667085; padding-top: 2px; flex-shrink: 0; }
.lesson-row .lr-main { flex: 1; min-width: 0; }
.lesson-row a { font-weight: 600; text-decoration: none; color: var(--ink); font-size: 14px; }
.lesson-row a:hover { color: var(--blue); }
.lesson-row .sub { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.lesson-row .ptag { font-size: 11px; font-weight: 700; color: var(--blue); background: #eef4ff; border-radius: 9999px; padding: 3px 8px; white-space: nowrap; margin-top: 2px; }
.lesson-row .rowtags { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; flex-shrink: 0; }
.lesson-row .stag { font-size: 11px; font-weight: 700; color: #027a48; background: #ecfdf3; border-radius: 9999px; padding: 3px 8px; white-space: nowrap; margin-top: 2px; }
/* per-topic level ladders */
.ladder { background: #f8fafc; border: 1px solid var(--hair); border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.ladder .ladder-title { font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.ladder .ladder-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.ladder .step { font-size: 12px; font-weight: 700; border-radius: 9999px; padding: 4px 10px; background: #eef2f7; color: #475467; }
.ladder .step.done { background: #dcfce7; color: #027a48; }
.ladder .step.next { background: #fef3c7; color: #92400e; }
.ladder .step .here { font-weight: 800; color: #1d4ed8; }
.ladder .step-unit { display: inline-flex; align-items: center; gap: 6px; }
.ladder .ladder-arrow { color: var(--muted); font-weight: 800; align-self: center; }
.ladder .ladder-note { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.ladder .ladder-note b { color: var(--ink); }
.levels-grid { display: grid; gap: 12px; }
.level-topic { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 14px 16px; }
.level-topic h3 { font-size: 15px; margin: 0 0 8px; }
.level-topic .lv { font-size: 13px; line-height: 1.5; margin: 6px 0; }
.level-topic .lv b { font-size: 12px; }
.level-topic .lv .soon { color: #92400e; font-weight: 700; }
.level-topic .lv .can { color: var(--muted); }
.pill { display: inline-block; background: #e6f7e6; color: #1d7a1d; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 9999px; margin-top: 4px; }
.pill.sim { background: #eef4ff; color: var(--blue); }

/* sticky bottom bar (landing only) */
.stickybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 64px; padding: 8px 16px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--hair); display: flex; gap: 12px; align-items: center; justify-content: space-between; transform: translateY(110%); transition: transform .25s ease; }
.stickybar.show { transform: none; }
.stickybar .sb-prices { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.35; white-space: nowrap; }
.stickybar .sb-prices small { display: block; font-size: 11px; font-weight: 400; color: #667085; }
.stickybar .btn { height: 44px; min-height: 44px; padding: 0 16px; font-size: 13px; flex-shrink: 0; }
.has-sticky footer.site { padding-bottom: 110px; }
footer.site { border-top: 1px solid var(--hair); padding: 22px 18px 40px; color: var(--muted); font-size: 13px; text-align: center; }
footer.site b { color: var(--ink); }

/* ---------- lesson (teaching) pages ---------- */
.lesson-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 250, 250, 0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--hair); }
.lesson-header .lh-row { height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 16px; max-width: 640px; margin: 0 auto; }
.lesson-header .wordmark { font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.lesson-header .lh-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-progress { height: 4px; background: var(--hair); }
.lesson-progress span { display: block; height: 100%; background: var(--blue); width: 0; transition: width 120ms ease-out; }
.lesson-wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 80px; }
.lesson-wrap h1 { font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin: 8px 0 6px; }
.lesson-wrap h2 { font-size: 18px; line-height: 1.3; font-weight: 700; margin-top: 28px; }
.lesson-wrap p, .lesson-wrap li { font-size: 16px; line-height: 1.65; color: var(--body); max-width: 62ch; }
.lesson-wrap p { margin: 0 0 14px; }
.lesson-wrap ul, .lesson-wrap ol { padding-left: 22px; margin: 0 0 14px; }
.lesson-wrap li { margin-bottom: 6px; }
.lesson-wrap blockquote { margin: 18px 0; padding: 14px 16px; border-radius: 10px; border-left: 4px solid var(--blue); background: #f2f7ff; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.phasebadge { display: inline-block; background: #eef4ff; color: var(--blue); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 9999px; margin-bottom: 4px; }

/* callouts (exact spec) */
.callout { padding: 14px 16px; border-radius: 10px; border-left: 4px solid; margin: 18px 0; font-size: 14.5px; line-height: 1.55; }
.callout-title { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.callout--tip { background: #f2f7ff; border-color: var(--blue); color: var(--ink); }
.callout--tip .callout-title { color: var(--blue); }
.callout--warn { background: #fffbeb; border-color: var(--amber); color: var(--ink); }
.callout--warn .callout-title { color: #9a6700; }
.callout--try { background: var(--ink); border-color: var(--amber); color: #f3f4f6; }
.callout--try .callout-title { color: var(--amber); }

/* unified command + expected output block */
.codeblock { border-radius: 10px; overflow: hidden; margin: 16px 0; border: 1px solid #2e333f; }
.codeblock-head { background: #1e2128; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; }
.codeblock-head .cb-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8b949e; }
.codeblock-head .cb-copy { height: 36px; min-height: 36px; padding: 0 10px; font-size: 11px; font-weight: 600; border-radius: 6px; border: 1px solid #3a3f4b; background: #272b34; color: #e5e7eb; cursor: pointer; }
.codeblock-head .cb-copy:active { transform: scale(0.97); }
.codeblock pre { margin: 0; border-radius: 0; background: var(--ink); color: #f8fafc; padding: 12px 14px; font-size: 13px; font-family: var(--mono); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.codeblock pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.codeblock-out { background: #1c2028; border-top: 1px solid #2e333f; padding: 10px 14px; }
.codeblock-out .out-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #8b949e; display: block; margin-bottom: 6px; }
.codeblock-out pre { background: none; padding: 0; color: #a3aab8; font-size: 12.5px; }

/* flow diagram component (vertical <640px, horizontal >=640px) */
.flow-diagram { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #f8f9fb; border: 1px solid var(--hair); border-radius: 12px; padding: 16px; margin: 20px 0; }
.flow-node { width: 100%; max-width: 240px; background: #fff; border: 1.5px solid var(--ink); border-radius: 8px; padding: 10px 12px; text-align: center; }
.flow-node strong { display: block; font-size: 13.5px; color: var(--ink); }
.flow-node span { display: block; font-size: 11.5px; font-family: var(--mono); color: var(--muted); margin-top: 2px; }
.flow-arrow { font-size: 11px; font-family: var(--mono); color: var(--blue); font-weight: 600; padding: 2px 0; }
@media (min-width: 640px) {
  .flow-diagram { flex-direction: row; justify-content: space-between; }
  .flow-arrow { transform: rotate(-90deg); }
}

/* lesson pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--hair); }
.pager a { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; min-height: 48px; display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow-card); }
.pager a.next { background: var(--blue); border-color: var(--blue); color: #fff; justify-content: flex-end; text-align: right; }
.pager a:active { transform: scale(0.985); }

/* ---------- simulation pages: split mobile layout ---------- */
.sim-shell { height: var(--sim-h, 100dvh); display: flex; flex-direction: column; background: var(--canvas); overflow: hidden; }
.sim-topbar { height: 44px; flex-shrink: 0; background: var(--ink); display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.sim-topbar .exit { color: #9ca3af; text-decoration: none; font-size: 13px; white-space: nowrap; min-height: 44px; display: flex; align-items: center; }
.sim-topbar .sim-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-topbar .sim-prog-track { width: 72px; flex-shrink: 0; height: 4px; background: #2e333f; border-radius: 9999px; overflow: hidden; }
.sim-topbar .sim-prog-fill { display: block; height: 100%; background: var(--amber); width: 0; transition: width 200ms ease-out; }
.sim-about { flex-shrink: 0; margin: 0 12px; }
.sim-about summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 2px; min-height: 44px; display: flex; align-items: center; list-style: none; }
.sim-about summary::-webkit-details-marker { display: none; }
.sim-about .about-body { font-size: 14px; color: var(--body); padding: 0 2px 12px; }
.sim-about .about-body p { margin: 0 0 10px; }
.simnote { background: #fff3cd; border: 1px solid #e6c65a; border-radius: 10px; padding: 12px 14px; margin: 0 0 10px; font-weight: 600; font-size: 14px; }

/* flow map as a compact horizontal chip strip */
.flowmap { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 2px 12px 8px; flex-shrink: 0; scrollbar-width: none; }
.flowmap::-webkit-scrollbar { display: none; }
.mapbox { flex-shrink: 0; background: #fff; border: 2px solid #c9c2b2; border-radius: 10px; padding: 8px 10px; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink); transition: background 300ms ease, border-color 300ms ease; }
.mapbox small { display: block; font-weight: 400; color: #666; font-size: 11px; }
.mapbox.lit { background: #fff3cd; border-color: var(--amber); }
.maparrow { color: #999; font-size: 13px; flex-shrink: 0; }

/* pinned step card */
.stepcard { flex-shrink: 0; background: #fff; border: 2px solid var(--blue); border-radius: 12px; padding: 14px 16px; margin: 0 12px 8px; box-shadow: 0 4px 12px rgba(20, 22, 26, 0.08); }
.stepcard .step-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stepcount { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--blue); }
.hint-toggle { font-size: 12px; color: var(--muted); text-decoration: underline; background: none; border: none; cursor: pointer; padding: 6px 4px; min-height: 44px; }
.stepcard.hint-hidden .snote { display: none; }
#step-text { font-size: 14.5px; line-height: 1.45; color: var(--ink); margin-top: 6px; }
.stepcard .scmd { display: inline-block; font-family: var(--mono); background: #f1f3f7; padding: 6px 10px; border-radius: 6px; margin-top: 8px; font-size: 12.5px; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; word-break: break-all; }
.stepcard .scmd::after { content: "  ↧ tap to fill"; font-size: 11px; color: var(--blue); font-weight: 600; }
.stepcard .snote { display: block; font-size: 13.5px; color: #444; margin-top: 8px; line-height: 1.5; }
.stepcard .stepactions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.stepcard button, .termbar button { font-size: 14px; padding: 10px 16px; border-radius: 9px; border: none; background: var(--blue); color: #fff; font-weight: 600; cursor: pointer; min-height: 44px; }
.stepcard button.ghost, .termbar button.ghost { background: #e8e4db; color: #1a1a1a; }
/* "Skip this step" must not look like the primary action — only
   "Skip all" was ghost before, so Skip read as the main button. */
#btn-skip { background: #e8e4db; color: #1a1a1a; }
.stepcard button:disabled, .termbar button:disabled { opacity: 0.45; cursor: default; }
.step-done-badge { display: none; margin-top: 10px; font-size: 13px; font-weight: 700; color: #15803d; }
.stepcard.done-flash { border-color: var(--green); background: var(--mint); animation: step-pulse 260ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.stepcard.done-flash .step-done-badge { display: block; }
/* keyboard-open: collapse the lesson card so the terminal gets room
   while typing on a phone. The command pill (#step-text) stays
   visible — the user must see what to type. */
.sim-shell.kbd-open .sim-about { display: none; }
.sim-shell.kbd-open .stepcard { padding: 8px 12px; margin-bottom: 6px; }
.sim-shell.kbd-open .stepcard .step-head { display: none; }
.sim-shell.kbd-open .stepcard .snote { display: none; }
.sim-shell.kbd-open .stepcard .stepactions { display: none; }
.sim-shell.kbd-open .stepcard .step-done-badge { display: none; }
.sim-shell.kbd-open #step-text { margin-top: 0; }
.sim-shell.kbd-open .stepcard .scmd { margin-top: 6px; }
@keyframes step-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.015); } 100% { transform: scale(1); } }

/* free play banner — dark gold badge card */
.freebanner { flex-shrink: 0; background: #1e2128; border: 1.5px solid var(--amber); color: #f3f4f6; border-radius: 12px; padding: 14px 16px; margin: 0 12px 8px; }
.freebanner b { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--amber); margin-bottom: 4px; }
.freebanner span { font-size: 14px; line-height: 1.5; }

/* terminal pane */
.terminal { flex: 1; min-height: 0; margin: 0 12px 12px; background: var(--ink); border-radius: 12px; border: 1px solid #2e333f; display: flex; flex-direction: column; overflow: hidden; }
.term-chrome { height: 44px; flex-shrink: 0; background: #1b1e24; border-bottom: 1px solid #2e333f; display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.term-chrome .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.term-chrome .container-name { font-family: var(--mono); font-size: 11.5px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.term-chrome .quickkeys { display: flex; gap: 6px; flex-shrink: 0; }
.term-chrome .quickkeys button { height: 36px; min-width: 44px; padding: 0 8px; font-size: 12px; font-weight: 600; font-family: var(--mono); border-radius: 6px; border: none; background: #272b34; color: #e5e7eb; cursor: pointer; }
.term-chrome .quickkeys button:active { background: #3a3f4b; }
.term-chrome .quickkeys button:disabled { opacity: 0.45; }
.term-out { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; font-family: var(--mono); font-size: 13px; line-height: 1.55; color: #e5e7eb; }
.tline { white-space: pre-wrap; overflow-wrap: anywhere; animation: tline-in 120ms ease-out; }
@keyframes tline-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.tline.cmd { color: #fff; }
.tline.cmd .tprompt { color: var(--amber); }
.tline.err { color: var(--red-soft); border-left: 2px solid var(--red); padding-left: 8px; margin: 2px 0; }
.tline.hint { color: var(--amber); }
.term-input-row { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid #232730; background: #181b20; }
.term-input-row .tprompt { color: var(--amber); font-size: 14px; font-family: var(--mono); white-space: nowrap; }
#term-input { flex: 1; background: transparent; border: none; outline: none; color: #fff; font-family: var(--mono); font-size: 16px; line-height: 1.5; min-width: 0; }
.termbar { display: none; }
.termhint { display: none; }
.simfoot { padding: 0 16px 20px; font-size: 14px; color: var(--body); }
.simfoot p { margin: 0 0 10px; }

/* ---------- lesson sidebar (W3Schools-style) ---------- */
.sidebar-toggle { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--hair); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 700; font-family: var(--sans); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.lesson-sidebar { display: none; }
.lesson-sidebar .sb-head { padding: 4px 14px 10px; border-bottom: 1px solid var(--hair); margin-bottom: 8px; }
.lesson-sidebar .sb-head b { display: block; font-size: 14px; color: var(--ink); }
.lesson-sidebar .sb-head span { font-size: 12px; color: var(--muted); }
.lesson-sidebar .sb-group { margin-bottom: 12px; }
.lesson-sidebar .sb-group-title { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0 14px; margin-bottom: 4px; }
.lesson-sidebar a.sb-link { display: block; font-size: 14px; line-height: 1.4; color: var(--body); text-decoration: none; padding: 7px 14px 7px 17px; border-left: 3px solid transparent; }
.lesson-sidebar a.sb-link:hover { background: #f2f7ff; color: var(--ink); }
.lesson-sidebar a.sb-link.current { background: #eef4ff; color: var(--blue); font-weight: 700; border-left-color: var(--blue); }
@media (min-width: 1024px) {
  .sidebar-toggle { display: none; }
  .lesson-header .lh-row { max-width: 960px; }
  .lesson-wrap { max-width: 960px; display: flex; gap: 28px; align-items: flex-start; }
  .lesson-main { flex: 1; min-width: 0; }
  .lesson-sidebar { display: block; width: 240px; flex-shrink: 0; position: sticky; top: 64px; max-height: calc(100dvh - 80px); overflow-y: auto; }
}
@media (max-width: 1023px) {
  .lesson-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 85vw; z-index: 90; background: #fff; overflow-y: auto; padding: 16px 0; box-shadow: 0 0 40px rgba(0,0,0,0.25); }
  body.sidebar-open .lesson-sidebar { display: block; }
}

/* ---------- Try it Yourself (in-lesson, W3Schools-style) ---------- */
.tryit { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; background: #fffbeb; border: 1px solid #f2c94c; border-radius: 12px; padding: 14px 16px; margin: 18px 0; }
.tryit span { font-size: 14px; line-height: 1.5; color: var(--body); }

/* ---------- quick-check exercise (end of every lesson) ---------- */
.exercise { background: #f2f7ff; border: 1px solid #b9d0ff; border-radius: 14px; padding: 16px; margin: 28px 0 8px; }
.exercise h2 { margin-top: 0 !important; }
.exercise p { margin-bottom: 10px; }
.exercise code { font-family: var(--mono); background: #e8eefc; padding: 1px 5px; border-radius: 4px; font-size: 13.5px; white-space: pre-wrap; }
.exercise-answer summary { cursor: pointer; font-weight: 700; color: var(--blue); padding: 6px 0; min-height: 44px; }
.exercise-answer p { margin: 6px 0 0; }

/* ---------- motion: GPU only (transform / opacity) ---------- */
.btn, .pager a, .skill, .simcard { transition: transform 100ms cubic-bezier(0.2, 0, 0, 1); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .ht-cursor { animation: none; opacity: 1; }
}

/* --- Homepage redesign (devops-homepage-redesign): story boxes, roadmap,
   topic dropdowns, free-practice list, lab peek, FAQ. New classes only;
   existing live classes (.section, .wrap, .lead, .cards, .card, .rail,
   .rail-step, .simdeck, .buygrid) are reused unchanged. --- */
.term-note { color: var(--muted); font-size: 13px; margin: 0; }
.hero .cta + .cta { margin-top: 0; }
.story-box { background: var(--card); border: 1px solid #E2E8F0; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); padding: 18px; margin: 0 0 14px; }
.story-box:last-child { margin-bottom: 0; }
.story-tag { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.story-box p { margin: 0; font-size: 17px; line-height: 1.5; }
.buckets { margin-top: 20px; }
.buckets p { margin: 0 0 10px; }
.pathbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--mint); border: 1px solid #E2E8F0; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); padding: 12px 14px; margin: 0 0 18px; font-size: 13px; font-weight: 700; }
.pathbar-title { width: 100%; letter-spacing: .06em; font-size: 12px; text-transform: uppercase; }
/* Roadmap — soft guided-path cards (2026-11-30 phone-UI fix): one calm
   indigo, 1px soft borders, no heavy black offset shadows. A thin
   vertical line runs down the left gutter with one indigo dot per step,
   so the 10 steps read as a single path. Badges never wrap. */
.roadmap-steps { position: relative; margin-top: 20px; }
.roadmap-steps::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 24px; width: 2px; background: #CBD5E1; }
.roadmap-step { position: relative; background: var(--card); border: 1px solid #E2E8F0; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); padding: 16px; margin: 0 0 14px 32px; }
.roadmap-step:last-child { margin-bottom: 0; }
.roadmap-step::before { content: ""; position: absolute; left: -26px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: #4F46E5; border: 2px solid #fff; box-shadow: 0 0 0 1px #CBD5E1; }
.rm-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.rm-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; padding: 3px 8px; border-radius: 999px; }
.rm-badge.rm-step { background: #EEF2FF; color: #4F46E5; }
.rm-badge.rm-free { background: #ECFDF5; color: #059669; }
.rm-badge.rm-phase1 { background: #EEF2FF; color: #4F46E5; }
.rm-badge.rm-phase2 { background: #F1F5F9; color: #475569; }
.rm-body h3 { margin: 0 0 4px; font-size: 18px; line-height: 1.35; color: #0F172A; }
.rm-body p { margin: 0 0 6px; font-size: 14px; color: #475569; }
.rm-btn { display: block; width: 100%; margin-top: 12px; }
.btn.indigo { background: #4F46E5; border-color: #4F46E5; }
.btn.indigo:active { background: #4338CA; }
.freelist { margin: 0 0 20px; }
.freelink { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 2px dashed var(--hair); }
.freelink .go { white-space: nowrap; font-weight: 700; color: var(--blue); }
details.topic { background: var(--card); border: 1px solid #E2E8F0; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); padding: 16px; margin-bottom: 12px; }
details.topic > summary { cursor: pointer; font-weight: 700; font-size: 16px; line-height: 1.4; list-style: none; }
details.topic > summary::-webkit-details-marker { display: none; }
details.topic > summary::marker { content: ""; }
.topic-badges { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.topic-title { display: block; font-size: 18px; line-height: 1.35; color: #0F172A; }
.topic-analogy { display: block; font-size: 14px; font-weight: 400; line-height: 1.45; color: #475569; margin-top: 2px; }
details.topic p { margin: 10px 0 0; }
details.show-more { margin-top: 10px; }
details.show-more > summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.lab-peek { background: var(--ink); color: #f3f4f6; border-radius: 12px; padding: 14px 16px; font-family: var(--mono); font-size: 13px; line-height: 1.7; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 16px 0 0; }
.faq details { background: var(--card); padding: 14px 16px; margin-bottom: 12px; }
.faq details:last-child { margin-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 0; }

/* header sign-in slot */
.auth-slot { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.auth-btn { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--hair); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; font-family: var(--sans); cursor: pointer; white-space: nowrap; }
.auth-btn:active { background: #f1f3f7; }
.auth-chip { font-size: 13px; font-weight: 600; color: var(--muted); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-signout { border: none; background: none; color: var(--blue); font-size: 13px; font-weight: 600; font-family: var(--sans); cursor: pointer; padding: 4px; white-space: nowrap; }
.lesson-header .lh-row { display: flex; align-items: center; gap: 10px; }
.lesson-header .lh-meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-topbar .auth-slot { margin-left: auto; }
.sim-topbar .auth-btn { height: 32px; background: #272b34; color: #e5e7eb; border: none; }
.sim-topbar .auth-chip { color: #9ca3af; }
.sim-topbar .auth-signout { color: var(--amber); }

/* shared header nav: home icon + back link on every page */
.nav-home { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; flex-shrink: 0; color: var(--ink); text-decoration: none; border-radius: 8px; }
.nav-home svg { display: block; width: 22px; height: 22px; }
.nav-home:hover { background: rgba(0, 0, 0, 0.06); }
.nav-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; flex-shrink: 0; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; border-radius: 8px; }
.nav-back:hover { color: var(--ink); background: rgba(0, 0, 0, 0.06); }
/* dark sim topbar: light home icon */
.sim-topbar .nav-home { color: #9ca3af; }
.sim-topbar .nav-home:hover { background: #272b34; color: #e5e7eb; }

/* login modal */
.auth-modal { position: fixed; inset: 0; z-index: 100; background: rgba(20, 22, 26, 0.55); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; }
.auth-modal[hidden] { display: none; }
.auth-box { position: relative; width: 100%; max-width: 400px; background: var(--card); border-radius: 16px; padding: 24px 20px 20px; box-shadow: var(--shadow-float); margin-top: 8vh; }
.auth-box h2 { font-size: 20px; margin: 0 0 4px; }
.auth-sub { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.auth-x { position: absolute; top: 10px; right: 12px; border: none; background: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.auth-google { width: 100%; height: 44px; border-radius: 8px; border: 1px solid var(--hair); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 14px; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 0 0 14px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.auth-tabs { display: flex; gap: 4px; background: #f1f3f7; border-radius: 8px; padding: 4px; margin-bottom: 14px; }
.auth-tabs button { flex: 1; height: 36px; border: none; border-radius: 6px; background: transparent; font-size: 14px; font-weight: 600; font-family: var(--sans); color: var(--muted); cursor: pointer; }
.auth-tabs button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-card); }
.auth-box label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.auth-box input { display: block; width: 100%; height: 44px; margin-top: 4px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 8px; font-size: 15px; font-family: var(--sans); }
.auth-box input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.auth-error { color: var(--red); font-size: 13px; margin: 0 0 10px; }
.auth-error[hidden] { display: none; }
.auth-submit { width: 100%; }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.linklike { border: none; background: none; color: var(--blue); font-size: 13px; font-weight: 600; font-family: var(--sans); cursor: pointer; padding: 0; }
body.modal-open { overflow: hidden; }

/* lock screen (locked lesson / sim) */
.lock-screen { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 28px 20px; margin: 20px 0; text-align: center; box-shadow: var(--shadow-card); }
.lock-screen[hidden] { display: none; }
.lock-screen .lock-icon { font-size: 36px; line-height: 1; display: block; margin-bottom: 10px; }
.lock-screen h2 { margin: 0 0 6px; }
.lock-screen p { color: var(--muted); font-size: 14px; margin: 0 auto 16px; max-width: 420px; }
.lock-screen .btn { margin: 4px; }
.lock-screen .lock-back { display: block; margin-top: 14px; font-size: 13px; }
/* auth / state loading — while the sign-in state is unknown, never
   show a "Sign in" or buy button as if the user were signed out. */
.auth-btn[disabled] { opacity: .55; cursor: default; }
body.app-pending .pay-btn { opacity: .45; pointer-events: none; }
.lock-screen .lock-loading { display: none; color: var(--muted); font-size: 14px; margin: 0 auto; max-width: 420px; }
.lock-screen.loading .lock-icon, .lock-screen.loading h2, .lock-screen.loading p:not(.lock-loading), .lock-screen.loading .btn, .lock-screen.loading .lock-back { display: none; }
.lock-screen.loading .lock-loading { display: block; }
body.locked #lesson-content { display: none; }
body.locked .sim-shell > :not(#lock-screen) { display: none; }
body.locked #lock-screen { display: block; }
/* Locked sim: the lock card is the only visible child of the 100dvh
   flex-column shell, so auto vertical margins centre it instead of
   leaving it stuck at the top with empty space below. Scoped to the
   sim shell only — lesson pages keep their normal margin. */
body.locked .sim-shell > #lock-screen { margin-top: auto; margin-bottom: auto; }

/* continue banner (landing) */
.continue-banner { background: var(--mint); border: 1px solid #bbf7d0; border-radius: 12px; padding: 12px 16px; margin: 16px auto 0; max-width: 720px; font-size: 14px; color: var(--ink); }
.continue-banner[hidden] { display: none; }
.continue-banner a { font-weight: 700; }

/* curriculum row flags */
.row-flag { font-size: 12px; font-weight: 700; white-space: nowrap; }
.row-flag.done { color: var(--green); }
.row-flag.continue { color: var(--blue); }
.row-flag.locked { color: var(--muted); }
.lesson-row.row-done { background: var(--mint); }
.lesson-row.row-continue { background: #eff6ff; }

/* resume note (sim pages) */
.resume-note { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 10px 14px; margin: 10px 12px 0; font-size: 13px; color: var(--ink); }
.resume-note[hidden] { display: none; }

/* owned / download */
.owned-download[hidden] { display: none; }
.owned-note { color: var(--green); font-size: 13px; font-weight: 700; margin: 8px 0 0; }
.owned-note[hidden] { display: none; }
.pay-btn[hidden] { display: none; }
/* The sign-in button in a lock screen is a .btn (display: inline-flex),
   which beats the browser's built-in [hidden] rule — without this rule
   "Sign in to buy" stayed visible for signed-in users even after JS set
   hidden=true. Same for the sticky-bar "Continue learning" link. */
.lock-signin[hidden] { display: none; }
#sticky-continue[hidden] { display: none; }
/* The sticky-bar text spans: .sb-prices small is display:block in the
   author CSS, which beats the browser's built-in [hidden] rule — the
   same trap as #sticky-continue above. */
#sticky-anon[hidden], #sticky-owned[hidden], #sticky-sub[hidden] { display: none; }

/* mark-as-done (lesson pages) */
.mark-done { width: 100%; margin: 20px 0 0; }
.mark-done[hidden] { display: none; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 120; max-width: calc(100vw - 32px); background: var(--ink); color: #fff; font-size: 14px; line-height: 1.45; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-float); }
.toast[hidden] { display: none; }
@media (max-width: 480px) {
  .auth-chip { max-width: 80px; }
  .stickybar .btn { padding: 0 10px; font-size: 12px; }
  /* Landing header at phone width: wordmark + pill + Sign in button
     measured ~427px at 360px, so the button was cut off at the right
     edge. Hide the decorative pill and the "by PromptStudio" suffix
     (the hero carries the same message) so the full button fits. */
  .site-header { padding: 0 12px; gap: 8px; }
  .site-header .bill-pill { display: none; }
  .site-header .wordmark small { display: none; }
  .site-header .auth-slot { flex-shrink: 0; }
  .site-header .auth-btn { flex-shrink: 0; }
  /* Lesson rows stack at phone width: tags sit below the title, so a
     long stage pill can never squeeze the title into a sliver. */
  .lesson-row { flex-direction: column; gap: 6px; }
  .lesson-row .rowtags { align-self: flex-start; flex-direction: row; flex-wrap: wrap; margin-top: 2px; }
  /* Sticky bar at 320px: let the prices wrap to two lines and hide the
     small print, so the Buy button is never pushed off-screen. */
  .stickybar .sb-prices { white-space: normal; }
  .stickybar .sb-prices small { display: none; }
  /* Pager at phone width: stack each link's two lines so the lesson
     title never clips. */
  .pager a { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pager a.next { align-items: flex-end; text-align: right; }
  .pager a span:first-child { font-size: 12px; font-weight: 500; }
  /* Lesson header at phone width: tighter row so the crumb keeps room. */
  .lesson-header .lh-row { padding: 0 10px; gap: 4px; }
  #btn-sidebar { padding: 0 8px; min-width: 44px; justify-content: center; }
  .lesson-header .auth-btn { padding: 0 10px; }
  /* Header nav at phone width: the sidebar toggle and the back link
     go icon-only, so the row still fits at 320px with the home icon
     added (toggle 44 + home 44 + wordmark ~80 + back 44 + sign out
     ~60 + gaps/padding ~36 = ~308px). Labels stay on desktop. */
  #btn-sidebar .sb-label { display: none; }
  .nav-back { min-width: 44px; justify-content: center; padding: 0 6px; }
  .nav-back .nb-label { display: none; }
  /* Welcome-back banner: sits flush at 360px today. */
  .continue-banner { margin: 16px 12px 0; }
}
@media (max-width: 600px) {
  /* Signed-in header overflow: at ~500px the wordmark + "by PromptStudio"
     + "Zero Cloud Bill" pill + account chip + Sign out button sum to
     ~510px, wider than the screen, so the page gets a horizontal
     scrollbar. The 480px cut hides the pill and suffix, but the band
     481-600px still shows them. Hide them here too (the hero carries
     the same message) so the header fits at every phone width. */
  .site-header .bill-pill { display: none; }
  .site-header .wordmark small { display: none; }
  /* Lesson header overflow (owner's phone, 2026-11-22): the "☰ Lessons"
     button (~95px) plus wordmark (~80px) plus the signed-in name chip
     (~80px) plus "Sign out" (~64px) plus padding and gaps (~70px)
     sums to ~389px — wider than a 360px phone, so "Sign out" is cut
     off at the right edge. The name chip is decorative (the account
     is already known); hide it at phone width and keep "Sign out"
     fully visible. New total ~301px, fits down to a 320px screen.
     The Lessons button and the Sign out button stay. */
  .auth-chip { display: none; }
  /* Compact step card on phones: a tall card plus the keyboard leaves
     no room for terminal output. Cap the command line's height. */
  .stepcard { padding: 10px 12px; }
  .stepcard .stepactions { margin-top: 8px; }
  .stepcard .scmd { max-height: 72px; overflow-y: auto; }
}

/* a11y-additions */
:focus-visible{outline:3px solid #0b5fff;outline-offset:2px;border-radius:4px}
.terminal :focus-visible,.hero-term :focus-visible{outline-color:#f5a524}
.skip-link{position:absolute;left:8px;top:-60px;background:#0b5fff;color:#fff;padding:10px 14px;border-radius:6px;z-index:1000;font-weight:700;text-decoration:none}
.skip-link:focus{top:8px}
#main{outline:none}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media print{.site-header,.sim-topbar,.sticky-cta,.auth-slot,.sidebar-toggle{display:none!important}}

/* i18n */
.lang-switch{font:inherit;font-size:13px;padding:6px 8px;border-radius:8px;border:1px solid rgba(128,128,128,.4);background:transparent;color:inherit;margin-right:8px;max-width:110px;cursor:pointer}
.lang-switch option{color:#111;background:#fff}
.lang-floating{position:fixed;right:10px;bottom:10px;z-index:900;background:#fff;color:#111}
.lang-suggest{display:flex;gap:8px;align-items:center;justify-content:center;padding:8px 12px;background:#fff7e0;color:#4a3500;font-size:15px}
.lang-suggest button{font:inherit;border:0;border-radius:8px;padding:6px 12px;background:#14161b;color:#fff;cursor:pointer}
.lang-suggest .ls-x{background:transparent;color:inherit;font-size:20px;padding:0 8px}
html[lang=hi] body,html[lang=hi] h1,html[lang=hi] h2,html[lang=hi] h3,html[lang=hi] .btn{font-family:'Nirmala UI','Kohinoor Devanagari','Noto Sans Devanagari',Mangal,system-ui,sans-serif}
html[lang=te] body,html[lang=te] h1,html[lang=te] h2,html[lang=te] h3,html[lang=te] .btn{font-family:'Nirmala UI','Kohinoor Telugu','Noto Sans Telugu',Gautami,system-ui,sans-serif}
html[lang=ta] body,html[lang=ta] h1,html[lang=ta] h2,html[lang=ta] h3,html[lang=ta] .btn{font-family:'Nirmala UI','Tamil Sangam MN','Noto Sans Tamil',Latha,system-ui,sans-serif}
html[lang=hi] code,html[lang=te] code,html[lang=ta] code,html[lang=hi] .terminal,html[lang=te] .terminal,html[lang=ta] .terminal{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
html[lang=hi] body,html[lang=te] body,html[lang=ta] body{line-height:1.7}

.sim-topbar .lang-switch{color:#fff;border-color:rgba(255,255,255,.4);background:rgba(255,255,255,.08)}
.sim-topbar .lang-switch option{color:#111;background:#fff}
