@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Sora:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
/* Debo Labs design tokens + page ground. Direction: calm and technical. A deep emerald-black ground with a soft green gradient wash,
   hairline rules, one brand gradient (emerald to teal to lime) used for a few accents, a geometric sans for display and Inter for the interface. */
:root {
  --bg: #04100c; --panel: #071a13; --panel2: #0a2219;
  --text: #e9f5ef; --muted: #8fa89c; --faint: #5d7569;
  --rule: rgba(160, 255, 210, .09); --rule2: rgba(160, 255, 210, .2);
  --brand: #10b981; --brand2: #2dd4bf; --brand3: #a3e635;
  --grad: linear-gradient(100deg, #34d399 0%, #2dd4bf 55%, #a3e635 100%);
  --warn: #fbbf24; --ok: #4ade80; --bad: #f87171;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --display: 'Sora', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --topbar-h: 64px;
  --c: var(--brand);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; color: var(--text); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
/* the gradient wash: two soft green lights over the dark ground, fixed so it does not scroll with the page */
body {
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(16, 185, 129, .17), transparent 62%),
    radial-gradient(760px 480px at -6% 34%, rgba(45, 212, 191, .09), transparent 60%),
    radial-gradient(700px 400px at 70% 105%, rgba(163, 230, 53, .06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: inherit; text-decoration-color: var(--rule2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
::selection { background: rgba(16, 185, 129, .4); }
code, pre, .mono { font-family: var(--mono); }
code { background: rgba(160, 255, 210, .08); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
pre { background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; overflow: auto; }
pre code { background: none; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.025em; }
/* Shared components. Restraint is the rule: hairlines instead of fills, accents only as thin rules, small rings
   and small text. Anything colourful on a page should be earning its place. */

/* ---- header: translucent over the gradient, with the turtle mark ---- */
.topbar { display: flex; align-items: center; gap: 28px; height: var(--topbar-h); padding: 0 28px; background: rgba(4, 16, 12, .72); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-mark { height: 34px; width: auto; object-fit: contain; flex-shrink: 0; }
.logo-word { font: 600 17px var(--display); letter-spacing: -.03em; } .logo-word .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.chip-env { font: 11px var(--mono); color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.btn-site { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--rule2); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 13px; transition: border-color .2s, color .2s; }
.btn-site:hover { border-color: var(--brand); color: #fff; }

/* ---- layout + type ---- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 56px 28px 96px; }
.eyebrow { display: block; font: 500 11.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.page-title { font: 600 clamp(1.9rem, 3.6vw, 2.7rem)/1.1 var(--display); letter-spacing: -.035em; }
.lede { color: var(--muted); font-size: 1.05rem; line-height: 1.65; max-width: 36em; margin: 14px 0 0; }
.rule { height: 1px; background: var(--rule); border: 0; margin: 40px 0; }
.meta { color: var(--muted); font-size: 13px; }
.note { color: var(--muted); font-size: 13px; border-top: 1px solid var(--rule); padding-top: 14px; }
.warn { border: 1px solid var(--bad); border-radius: 10px; padding: 10px 14px; margin: 14px 0; font-size: 13px; color: #fecaca; }

/* ---- buttons ---- */
.btn-primary { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; background: var(--grad); color: #04130d; text-decoration: none; font: 600 14px var(--sans); transition: filter .2s, transform .2s; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); } .btn-primary span { transition: transform .2s; } .btn-primary:hover span { transform: translateX(3px); }
.btn-quiet { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 14px; padding: 12px 4px; transition: color .2s; }
.btn-quiet:hover { color: var(--text); }
.btn { font: inherit; border-radius: 999px; border: 1px solid var(--rule2); background: transparent; color: var(--text); padding: 8px 16px; cursor: pointer; transition: border-color .2s, background .2s; }
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--grad); color: #04130d; border-color: transparent; font-weight: 600; } .btn.primary:hover { filter: brightness(1.1); } .btn.primary:disabled { opacity: .55; cursor: wait; }
.btn.link { border: none; background: none; color: var(--muted); padding: 8px 6px; } .btn.link:hover { color: var(--text); }
.btn.danger { color: var(--bad); border-color: rgba(248, 113, 113, .4); } .btn.danger:hover { border-color: var(--bad); }

/* ---- station: a hairline ring with a dot ---- */
.stn-dot { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--c, var(--muted)); background: var(--bg); transition: transform .25s; }
.stn-dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--muted)); transition: opacity .25s; }
[data-status='live'] .stn-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 14%, transparent); }

/* ---- the prompt mark (symbol defined once in the page frame) ---- */
.mk { width: 1em; height: 1em; display: inline-block; vertical-align: -.12em; }

/* ---- breadcrumb ---- */
.crumb { font: 500 12px var(--mono); letter-spacing: .06em; color: var(--muted); margin: 0 0 18px; }
.crumb a { text-decoration: none; } .crumb a:hover { color: var(--text); } .crumb i { font-style: normal; color: var(--faint); margin: 0 8px; }

/* ---- a route: vertical list of stations joined by a thin line (track page) ---- */
.route { list-style: none; margin: 0; padding: 0; }
.route > li { position: relative; padding: 0 0 0 38px; }
.route > li::before { content: ''; position: absolute; left: 8.25px; top: 0; bottom: 0; width: 1px; background: var(--rule2); }
.route > li:first-child::before { top: 14px; } .route > li:last-child::before { bottom: calc(100% - 14px); }
.route .stn-dot { position: absolute; left: 0; top: 5px; }
.route a, .route .item { display: block; padding: 4px 0 18px; text-decoration: none; }
.route b { display: block; font: 500 15px/1.35 var(--sans); letter-spacing: -.01em; }
.route small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.route a:hover b { text-decoration: underline; text-decoration-color: var(--c); text-underline-offset: 4px; }
.route a:hover .stn-dot { transform: scale(1.2); }
.route a.is-done .stn-dot::after { background: var(--ok); opacity: 1; } .route a.is-done .stn-dot { border-color: var(--ok); }

/* ---- small shared bits ---- */
.open { color: var(--text); font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--rule2); padding-bottom: 1px; } .open:hover { border-color: var(--text); }

/* ---- track page ---- */
.track-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin: 22px 0 34px; }
.route.labs { max-width: 640px; } .route.labs b { font-size: 16px; } .route.labs small { margin-top: 3px; }

/* ---- disclosure ---- */
details > summary { cursor: pointer; list-style: none; color: var(--muted); font-size: 13px; } details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '+'; display: inline-block; width: 1.1em; color: var(--faint); } details[open] > summary::before { content: '\2212'; }

/* ---- quiet versions of the older list/card classes, until each page is migrated ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 26px 0; }
.card { display: block; border: 1px solid var(--rule); border-radius: 14px; padding: 22px; text-decoration: none; color: var(--text); transition: border-color .25s; }
.card:hover { border-color: var(--rule2); } .card h2 { font-size: 1.15rem; margin: 0 0 6px; } .card p { color: var(--muted); margin: 0 0 12px; }
.rows { display: flex; flex-direction: column; margin-top: 22px; border-top: 1px solid var(--rule); }
.row { display: flex; align-items: center; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--text); transition: background .2s; }
.row:hover { background: rgba(160, 255, 210, .04); } .row small { color: var(--muted); } .grow { flex: 1; }
.num { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rule2); display: grid; place-items: center; font: 12px var(--mono); color: var(--muted); }
.badge { font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tick { width: 20px; text-align: center; } .row.is-done .tick::after { content: '\2713'; color: var(--ok); } .row.is-done .num { border-color: var(--ok); color: var(--ok); }
.status { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); } .status.is-live { color: var(--ok); }
.chip { font: 600 10.5px var(--sans); color: var(--muted); border: 1px solid var(--rule2); border-radius: 99px; padding: 1px 8px; }
.pill { font: 11px var(--mono); padding: 1px 9px; border-radius: 99px; border: 1px solid var(--rule2); color: var(--muted); }
.pill.live { color: var(--ok); border-color: rgba(74, 222, 128, .5); } .pill.ended { color: var(--bad); border-color: rgba(248, 113, 113, .5); }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 18px; gap: 4px 14px; }
  .wrap { padding: 36px 18px 72px; }
}

/* accounts (only rendered when the server runs with LAB_AUTH=on) */
.auth-slot { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.auth-slot a, .auth-out { color: var(--text); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration-color: var(--rule2); }
.auth-out { color: var(--muted); } .auth-out:hover { color: var(--text); }
.auth-wrap { max-width: 460px; }
.auth-tabs { display: flex; gap: 20px; margin: 28px 0 8px; border-bottom: 1px solid var(--rule); }
.auth-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 0; color: var(--muted); font: 500 14px var(--sans); cursor: pointer; }
.auth-tabs button[aria-selected="true"] { color: var(--text); border-color: var(--brand); }
.auth-form { display: grid; gap: 16px; margin-top: 20px; }
.auth-form [hidden] { display: none; }
.auth-form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-form input { background: var(--panel); border: 1px solid var(--rule2); border-radius: 8px; padding: 10px 12px; color: var(--text); font: 15px var(--sans); }
.auth-form input:focus { outline: none; border-color: var(--brand); }
.auth-form .btn-primary { justify-self: start; border: 0; cursor: pointer; }
.auth-error { min-height: 1.4em; margin: 0; color: var(--bad); font-size: 13px; }
/* The lab page: instructions on the left, a real terminal on the right. Same quiet language as the rest of the site;
   the brand green colours a few thin details (progress, rings) and nothing else. */
.lab-shell { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; height: calc(100vh - var(--topbar-h) - 64px); }
.tasks-pane { padding: 26px 28px 22px; border-right: 1px solid var(--rule); overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.tasks-pane .crumb { margin: 0; }
.tasks-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lab-title { font: 600 1.6rem/1.15 var(--display); letter-spacing: -.035em; }
.lab-timer { font: 12px var(--mono); color: var(--faint); letter-spacing: .04em; white-space: nowrap; } .lab-timer.is-low { color: var(--bad); }

/* progress: a thin route with the prompt mark riding it */
.journey { position: relative; height: 40px; margin: 6px 4px 0; }
.jline { position: absolute; left: 0; right: 0; top: 28px; height: 1px; background: var(--rule2); }
.jline i { position: absolute; left: 0; top: -0.5px; height: 2px; width: var(--p, 0%); background: var(--c); border-radius: 2px; transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.jticks { position: absolute; left: 0; right: 0; top: 21px; display: flex; justify-content: space-between; }
.jt { position: relative; width: 14px; height: 14px; padding: 0; border-radius: 50%; border: 1.5px solid var(--faint); background: var(--bg); cursor: pointer; transition: border-color .2s, background .2s; }
.jt:hover { border-color: var(--text); }
.jt.is-done { border-color: var(--c); background: var(--c); }
.jt.is-active { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.jt.is-active::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--c); }
.jmark { position: absolute; top: -9px; left: var(--p, 0%); width: 26px; height: 26px; margin-left: -6px; color: var(--brand); font-size: 26px; transition: left .6s cubic-bezier(.2, .7, .2, 1); pointer-events: none; }
.journey.launch .jmark { animation: launch 1.5s cubic-bezier(.5, 0, .9, .4) forwards; }
@keyframes launch { 0% { opacity: 1; } 100% { left: 118%; opacity: 0; } }

.step-counter { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.step-card { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.step-title { font: 600 1.25rem/1.3 var(--sans); letter-spacing: -.02em; }
.step-body { color: #cfe3d9; line-height: 1.7; } .step-body p { margin: .55em 0; } .step-body ul, .step-body ol { padding-left: 20px; } .step-body strong { color: var(--text); font-weight: 600; }
.step-hint { color: var(--warn); min-height: 1.3em; font-size: 14px; }
.step-hint.is-ok { color: var(--ok); border-left: 1px solid var(--ok); padding-left: 10px; animation: fadein .25s ease-out; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.step-footer { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 10px; } .spacer { flex: 1; }
#end-btn { align-self: flex-start; margin-top: 4px; padding: 6px 14px; font-size: 13px; }
.done-mark { font: 600 1.8rem/1.1 var(--display); letter-spacing: -.035em; }
.done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 18px; }
.resource-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 12px; }
.resource-list li { display: flex; flex-direction: column; gap: 2px; } .resource-list a { font-weight: 500; } .resource-list span { color: var(--muted); font-size: 12.5px; }

.terminal-pane { display: flex; flex-direction: column; min-width: 0; background: #030c09; }
.terminal-tab { padding: 10px 16px; border-bottom: 1px solid var(--rule); font: 500 12px var(--mono); letter-spacing: .06em; color: var(--muted); display: flex; gap: 12px; align-items: center; }
.terminal-links { margin-left: auto; display: flex; align-items: center; gap: 16px; font: 12px var(--sans); letter-spacing: 0; }
.terminal-links a { color: var(--muted); text-decoration: none; } .terminal-links a:hover { color: var(--text); }
.fullscreen-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 0; } .fullscreen-btn:hover { color: var(--text); }
#term { flex: 1; padding: 10px 12px; min-height: 0; } #term .xterm { height: 100%; }

.stats-box { display: grid; grid-template-columns: repeat(3, 1fr) auto; align-items: center; height: 64px; border-top: 1px solid var(--rule); background: rgba(3, 12, 9, .9); }
.stat-cell { padding: 10px 24px; border-right: 1px solid var(--rule); }
.stat-label { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--faint); }
.stat-value { font: 500 15px var(--mono); }
.stat-bar { height: 2px; background: var(--rule); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.stat-bar-fill { height: 100%; width: 0; background: var(--c); opacity: .8; transition: width .4s; }
.stats-note-cell { padding: 0 24px; font: 11.5px var(--mono); color: var(--faint); }

@media (max-width: 820px) {
  .lab-shell { grid-template-columns: 1fr; height: auto; } #term { height: 60vh; } .tasks-pane { border-right: 0; border-bottom: 1px solid var(--rule); }
  .stats-box { grid-template-columns: 1fr 1fr; height: auto; }
}
@media (prefers-reduced-motion: reduce) { .step-hint.is-ok { animation: none; } .jline i, .jmark, .jt { transition: none; } .journey.launch .jmark { animation: none; opacity: 0; } }

/* Invite code (gated labs, hosted only): a quiet form in the terminal pane */
.invite { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; max-width: 360px; margin: 0 auto; padding: 24px; }
.invite[hidden], #term[hidden] { display: none; }
.invite label { font: 500 12px var(--mono); letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.invite p { margin: 0; color: var(--text); line-height: 1.6; }
.invite-row { display: flex; gap: 10px; }
.invite input { flex: 1; min-width: 0; background: transparent; color: var(--text); border: 1px solid var(--rule2); border-radius: 999px; padding: 9px 16px; font: 14px var(--mono); }
.invite input:focus { outline: none; border-color: var(--brand); }

/* answer reveal (after repeated misses) and the completion screen */
.step-answer { margin-top: 14px; border-top: 1px solid var(--rule); padding-top: 12px; }
.step-answer .answer-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.step-answer pre { margin: 0; }
.done-mark { font: 600 26px var(--display); letter-spacing: -.02em; margin: 0 0 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.done-lede { margin: 0 0 10px; font-size: 16px; }
.done-sub { margin: 12px 0 6px; color: var(--muted); font-size: 13px; }
.done-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.done-list li { padding-left: 22px; position: relative; font-size: 14px; }
.done-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--ok); }
@media (prefers-reduced-motion: no-preference) { .done-mark, .done-lede, .done-list { animation: doneIn .4s ease both; } @keyframes doneIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } } }

/* shareable completion card */
.share { margin-top: 18px; }
.share-card { border: 1px solid var(--rule2); border-radius: 14px; padding: 20px 22px; background: linear-gradient(135deg, #04100c, #0a2a1e); }
.sc-top { display: flex; align-items: center; gap: 10px; font: 600 15px var(--display); } .sc-top img { width: 28px; height: 28px; } .sc-top b { color: var(--brand2); font-weight: 600; }
.sc-kicker { margin-top: 18px; font: 600 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.sc-title { margin-top: 6px; font: 700 22px/1.2 var(--display); letter-spacing: -.02em; }
.sc-meta { margin-top: 8px; font-size: 13px; color: var(--muted); }
.sc-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); } .sc-name { color: var(--text); font-weight: 600; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; } .share-actions .btn { text-decoration: none; }
.share-note { margin: 8px 0 0; font-size: 12px; color: var(--faint); }
