/* Forge landing page. Loaded after chat.css, which owns every token; nothing here redefines one. */

/* Segment accents reach only markers (disc, spine dot, badge), never borders, fills or hovers.
   Config names which accent a segment uses (Landing:Segments:Accent), never the color. */
:root {
  --seg-corp: var(--brand-int);
  --seg-mfs: #00909E;
  --seg-ats: #4655C4;
  --seg-ips: #B4701C;
}
[data-theme="dark"] {
  --seg-mfs: #2FBCCB;
  --seg-ats: #7C88E8;
  --seg-ips: #D79A45;
}

/* chat.css lays the body out as a fixed-height app with an inner scroller; this page scrolls like a document.
   Root font size 100% here overrides chat.css's 110% because this sheet loads later. */
html { font-size: 100%; }
body.landing { display: block; height: auto; min-height: 100dvh; background: var(--bg); }
body.landing main { flex: none; overflow: visible; }

.header-actions { display: flex; align-items: center; gap: 10px; }
a.brand-lockup { text-decoration: none; color: inherit; border-radius: 8px; }
a.brand-lockup:focus-visible { outline: 2px solid var(--brand-int); outline-offset: 3px; }
/* chat.css has no .theme-toggle svg rule, so an unsized 24-viewBox icon would fill the button. */
.theme-toggle svg { width: 17px; height: 17px; }
/* Wider than the chat's --read-cap on purpose: this is a scannable index, not prose. */
.page { max-width: 1240px; margin: 0 auto; padding: 0 40px 110px; }

/* ---------- home ---------- */
.hm-greet { padding: 40px 0 18px; }
.hm-greet[hidden] { display: none; }
.hm-greet h1 { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; margin: 0; line-height: 1.15; }
.hm-greet p { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-base); }

.panel {
  border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--bg-elev);
  box-shadow: var(--shadow); padding: 18px 20px; color: var(--text); font-size: var(--fs-sm);
}
.panel[hidden] { display: none; }
#assistants, .hm-grid { margin-bottom: 16px; }
.pn-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.pn-head > div { flex: 1; min-width: 0; }
.pn-glyph { width: 22px; height: 22px; color: var(--brand-int); flex: none; margin-top: 2px; }
.pn-glyph svg { width: 22px; height: 22px; }
.pn-kicker { font-size: var(--fs-xs); font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--brand-int); }
.pn-title { font-size: var(--fs-lg); font-weight: 650; margin: 0; }
.pn-sub { color: var(--muted); margin: 2px 0 0; }
.pn-link { color: var(--brand-int); font-weight: 600; font-size: var(--fs-xs); white-space: nowrap; margin-top: 4px; text-decoration: none; }
.pn-link:hover { text-decoration: underline; }
.pn-empty { color: var(--muted); margin: 6px 0 2px; }
.btn-primary.sm { padding: 6px 12px; font-size: var(--fs-xs); display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }

/* your assistants: one tile per open door, yours first */
.dr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 10px; }
.dr {
  display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--hairline); border-radius: 10px;
  padding: 12px; background: var(--surface); color: inherit; text-decoration: none;
  transition: border-color var(--motion), background var(--motion);
}
.dr:hover { border-color: var(--brand-int); background: var(--brand-soft); }
.dr:focus-visible { outline: 2px solid var(--brand-int); outline-offset: 2px; }
/* The segment accent reaches the disc only: chat.css's rule that accents are markers, never fills. */
.dr-code {
  width: 38px; height: 38px; border-radius: 9px; flex: none; display: grid; place-items: center;
  font-weight: 750; font-size: 11px; letter-spacing: .03em; color: #fff; background: var(--a);
  background: linear-gradient(180deg, var(--a), color-mix(in oklab, var(--a) 76%, #000));
}
.dr-main { flex: 1; min-width: 0; display: block; }
.dr-name { font-weight: 650; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dr-purpose { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 3px; line-height: 1.45; }
.dr-tag { font-size: var(--fs-2xs); font-weight: 700; color: var(--brand-int); border: 1px solid var(--brand-int); padding: 0 6px; border-radius: 5px; }
.dr-go { width: 16px; height: 16px; color: var(--faint); flex: none; margin-top: 2px; }
.dr-go svg { width: 16px; height: 16px; }
.dr:hover .dr-go { color: var(--brand-int); }

/* training: your craft beside continue learning */
.hm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; }
.hm-grid[hidden] { display: none; }
.st-level { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; }
.st-pts {
  font-weight: 700; color: var(--brand-int); border: 1px solid var(--brand-int);
  padding: 4px 11px; border-radius: var(--radius-pill); white-space: nowrap; font-size: var(--fs-xs);
}
/* One segment per rank, labels underneath. */
.sg-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 2px; }
.sg-bar { display: block; height: 8px; border-radius: 4px; background: var(--hairline); overflow: hidden; }
.sg-bar > span { display: block; height: 100%; background: var(--brand-int); }
.sg.is-done .sg-bar > span { background: color-mix(in srgb, var(--brand-int) 55%, var(--bg-elev)); }
.sg-l { font-size: var(--fs-xs); color: var(--faint); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg.is-done .sg-l { color: var(--muted); }
.sg.is-now .sg-l { color: var(--brand-int); font-weight: 650; }
.st-next { color: var(--muted); margin: 12px 0; }
.st-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--hairline); padding-top: 10px; }
.st-stats b { display: block; font-size: 1.15rem; }
.st-stats span { color: var(--muted); font-size: var(--fs-xs); }

/* a module row: home's continue-learning list and the course view share it */
.mm {
  display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--hairline);
  color: inherit; text-decoration: none;
}
a.mm:hover .mm-title { color: var(--brand-int); }
.mm.is-locked { opacity: .6; }
.mm-type { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; flex: none; border: 1px solid var(--hairline); }
.mm-type svg { width: 16px; height: 16px; }
.t-video { color: var(--brand-int); border-color: var(--brand-int); }
.t-read { color: var(--muted); }
.t-challenge { color: var(--warn); border-color: var(--warn); }
.mm-main { flex: 1; min-width: 0; display: block; }
.mm-title { display: block; font-weight: 600; }
.mm-meta, .mm-how, .cr-ver { display: block; font-size: var(--fs-xs); margin-top: 2px; }
.mm-meta { color: var(--muted); }
.mm-how { color: var(--warn); }
.cr-ver { color: var(--success); display: flex; gap: 4px; align-items: center; }
.cr-ver svg, .cr-st svg { width: 12px; height: 12px; }
.cr-st { color: var(--muted); font-size: var(--fs-xs); display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.cr-st.is-done { color: var(--success); font-weight: 600; }

/* the course view */
#view-foundry { padding-top: 28px; }
#view-foundry[hidden] { display: none; }
.back { display: inline-block; color: var(--brand-int); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; margin-bottom: 12px; }
.back::before { content: "\2190\00a0"; }
.tr-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 10px; margin-bottom: 8px; }
.tr {
  display: block; text-align: left; border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px;
  background: var(--surface); color: inherit; font: inherit; cursor: pointer;
}
.tr:hover { border-color: var(--brand-int); }
.tr.is-shown { border-color: var(--brand-int); box-shadow: 0 0 0 1px var(--brand-int) inset; }
.tr-n { display: block; min-height: 1.2em; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.tr.is-done .tr-n { color: var(--success); }
.tr-name { display: block; font-weight: 650; margin: 2px 0 8px; }
.tr-c { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 5px; }
/* a lesson: a centered reading column with a contents rail beside it */
.ls { display: grid; grid-template-columns: minmax(0, 720px) 220px; gap: 48px; justify-content: center; }
.ls-col { min-width: 0; font-size: 1.08rem; line-height: 1.65; }
.ls-crumb { color: var(--muted); font-size: var(--fs-sm); margin: 2px 0 10px; }
.ls-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.ls-st { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--hairline); border-radius: var(--radius-pill);
  padding: 3px 12px 3px 4px; font-size: var(--fs-sm); color: var(--muted); text-decoration: none; }
a.ls-st:hover { border-color: var(--brand-int); }
.ls-sn { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--hairline); display: inline-grid; place-items: center; }
.ls-sn svg { width: 12px; height: 12px; }
.ls-st.is-now { color: var(--brand-int); border-color: var(--brand-int); font-weight: 650; }
.ls-st.is-now .ls-sn { border-color: var(--brand-int); }
.ls-st.is-done { color: var(--success); } .ls-st.is-done .ls-sn { border-color: var(--success); }
.ls-st.is-locked { opacity: .55; }
.ls-h1 { font-size: 2.1rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 12px; }
.ls-lede { font-size: 1.22rem; color: var(--muted); margin: 0 0 14px; line-height: 1.55; }
.ls-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: var(--fs-sm); color: var(--muted);
  padding-bottom: 18px; border-bottom: 1px solid var(--hairline); }
.ls-how { color: #7c3aed; } [data-theme="dark"] .ls-how { color: #a78bfa; }
.ls-col h2 { font-size: 1.4rem; margin: 34px 0 10px; letter-spacing: -.01em; scroll-margin-top: 16px; }
.ls-body p { margin: 0 0 14px; } .ls-body ul, .ls-body ol { margin: 0 0 14px; padding-left: 22px; } .ls-body li { margin-bottom: 6px; }
.ls-body code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; border: 1px solid var(--hairline);
  background: var(--surface); border-radius: 8px; padding: 8px 10px; display: block; white-space: pre-wrap; line-height: 1.5; margin: 6px 0; }
.ls-sub { color: var(--muted); }
.blk { border: 1px solid var(--hairline); border-radius: 12px; padding: 14px 16px; margin: 18px 0; background: var(--surface); }
.blk p:last-child, .blk ul:last-child { margin-bottom: 0; }
.blk-h { display: flex; gap: 8px; align-items: center; font-weight: 700; margin-bottom: 6px; }
.blk-g, .blk-g svg { width: 18px; height: 18px; display: inline-block; }
.blk-nordson { border-color: var(--brand-int); background: transparent; } .blk-nordson .blk-h { color: var(--brand-int); }
.blk-key { background: transparent; }
.blk-tip { border-color: #7c3aed; background: transparent; } .blk-tip .blk-h { color: #7c3aed; }
/* Material: what the learner works from. Copied by hand on purpose, so the request around it is theirs. */
.blk-material { border-style: dashed; }
.blk-material .blk-h { color: var(--muted); }
.blk-material p, .blk-material li { font-size: var(--fs-sm); }
.blk-part { margin: 0; } .blk-part .blk-h { color: var(--brand-int); font-size: 1.05rem; }
.blk-part p { font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); } .blk-part strong { color: var(--text); }
.parts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.ba .blk { margin: 0; background: transparent; }
.blk-before { border-color: var(--warn); } .blk-before .blk-h { color: var(--warn); }
.blk-after { border-color: var(--success); } .blk-after .blk-h { color: var(--success); }
.ba .blk-h { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; }
.ba p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.ls-links { display: flex; flex-direction: column; gap: 8px; }
.ls-lk { position: relative; display: block; border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 40px 12px 16px;
  background: var(--surface); color: var(--text); text-decoration: none; }
.ls-lk:hover { border-color: var(--brand-int); }
.ls-lk-s { display: block; font-size: var(--fs-xs); font-weight: 650; color: var(--brand-int); text-transform: uppercase; letter-spacing: .05em; }
.ls-lk b { display: block; } .ls-lk-m { display: block; color: var(--muted); font-size: var(--fs-sm); }
.ls-lk-x { position: absolute; right: 14px; top: 16px; width: 16px; height: 16px; color: var(--muted); } .ls-lk-x svg { width: 16px; height: 16px; }
.ls-next { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--hairline);
  margin-top: 30px; padding-top: 16px; color: var(--muted); }
.ls-go { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.ls-go svg { width: 14px; height: 14px; }
.ls-go.is-locked { opacity: .55; cursor: not-allowed; }
.ls-toc { position: sticky; top: 20px; align-self: start; font-size: var(--fs-sm); display: flex; flex-direction: column; gap: 4px; padding-top: 70px; }
.ls-toc-h { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ls-toc a { color: var(--muted); padding: 3px 0 3px 10px; border-left: 2px solid var(--hairline); text-decoration: none; }
.ls-toc a:hover { color: var(--brand-int); border-left-color: var(--brand-int); }
.ls-toc-p { margin-top: 22px; } .ls-toc-s { font-size: var(--fs-xs); color: var(--muted); display: block; margin-top: 6px; }
.qz-ex { border: 1px solid #7c3aed; border-radius: 10px; padding: 10px 12px; }
.qz-ex-h { display: flex; gap: 6px; align-items: center; font-weight: 650; color: #7c3aed; } .qz-ex-h svg { width: 15px; height: 15px; }
.qz-ex-weak { font-family: ui-monospace, Consolas, monospace; font-size: var(--fs-sm); color: var(--muted); margin: 8px 0; }
.qz-ex textarea { width: 100%; box-sizing: border-box; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 10px; padding: 9px 12px; resize: vertical; }
.qz-ex textarea:focus { outline: none; border-color: var(--brand-int); }
.qz-ex-r:empty { display: none; } .qz-ex-r { margin-top: 10px; }
.qz-ex-eg { font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 1000px) { .ls { grid-template-columns: minmax(0, 1fr); } .ls-toc { display: none; } }
@media (max-width: 640px) { .parts, .ba { grid-template-columns: 1fr; } }

/* knowledge checks and practice chats, inside a lesson */
.t-check { color: #7c3aed; border-color: #7c3aed; }
.t-practice { color: #0f766e; border-color: #0f766e; }
[data-theme="dark"] .t-check { color: #a78bfa; border-color: #a78bfa; }
[data-theme="dark"] .t-practice { color: #2dd4bf; border-color: #2dd4bf; }
.lesson-act:empty { display: none; }
.lesson-act { border-top: 1px solid var(--hairline); padding-top: 14px; margin-top: 6px; }
.qz { display: flex; flex-direction: column; gap: 12px; }
.qz-q { border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; margin: 0; }
.qz-q legend { font-weight: 600; padding: 0 4px; }
.qz-q.is-right { border-color: var(--success); }
.qz-q.is-wrong { border-color: var(--warn); }
.qz-o { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; cursor: pointer; }
.qz-o input { margin-top: 3px; }
.qz-why { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.qz-q.is-right .qz-why { color: var(--success); }
.qz-q.is-wrong .qz-why { color: var(--warn); }
.qz-foot { display: flex; gap: 12px; align-items: center; }
.qz-res { color: var(--muted); font-size: var(--fs-sm); }
.pr-goal { border: 1px solid #0f766e; border-radius: 10px; padding: 10px 12px; }
.pr-goal .pn-kicker { color: #0f766e; }
[data-theme="dark"] .pr-goal { border-color: #2dd4bf; } [data-theme="dark"] .pr-goal .pn-kicker { color: #2dd4bf; }
.pr-goal p { margin: 4px 0 0; }
.pr-log { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.pr-m { max-width: 85%; padding: 8px 12px; border-radius: 12px; line-height: 1.5; }
.pr-m.u { align-self: flex-end; border: 1px solid var(--brand-int); white-space: pre-wrap; }
.pr-m.a { align-self: flex-start; border: 1px solid var(--hairline); background: var(--surface); }
.pr-m.a p { margin: 0 0 8px; } .pr-m.a p:last-child { margin-bottom: 0; }
.pr-wait { color: var(--muted); font-size: var(--fs-xs); }
.pr-err { color: var(--warn); margin: 0; }
.pr-draft { color: var(--muted); font-size: var(--fs-xs); border-top: 1px dashed var(--hairline); padding-top: 6px; }
.pr-coach { border: 1px dashed #7c3aed; border-radius: 10px; padding: 10px 12px; }
.pr-coach p { margin: 6px 0 0; }
.pr-ch { color: #7c3aed; font-weight: 650; font-size: var(--fs-xs); }
.pr-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pr-chips span { font-size: var(--fs-xs); border: 1px solid; border-radius: var(--radius-pill); padding: 1px 9px; display: inline-flex; gap: 4px; align-items: center; }
.pr-chips svg { width: 10px; height: 10px; }
.pr-chips .ok { color: var(--success); } .pr-chips .miss { color: var(--warn); }
.pr-pass { color: var(--success); font-weight: 600; display: flex; gap: 5px; align-items: center; }
.pr-pass svg { width: 13px; height: 13px; }
.pr-out { color: var(--muted); font-size: var(--fs-sm); }
.ch-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ch-door { display: inline-flex; gap: 8px; align-items: center; font-size: var(--fs-sm); color: var(--muted); }
.ch-door b { color: var(--text); font-weight: 600; }
.ch-door select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; padding: 4px 8px; }
/* No box: the frame is sized to the chat inside it (landing.js fit), so it reads as part of the lesson. */
.ch-good { margin: 0 0 14px; } .ch-good ul { margin: 4px 0 0; }
.ch-coach:empty { display: none; } .ch-coach { margin-top: 10px; }
.ch-frame { display: block; width: 100%; height: 280px; border: 0; background: transparent; }
.ch-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; font-size: var(--fs-sm); }
.ch-status { color: var(--warn); display: inline-flex; gap: 5px; align-items: center; }
.ch.is-done .ch-status { color: var(--success); font-weight: 600; }
.ch-status svg { width: 13px; height: 13px; }

.pr-comp { display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--hairline); border-radius: 14px; padding: 8px 8px 8px 12px; background: var(--surface); }
.pr-comp:focus-within { border-color: var(--brand-int); }
.pr-comp textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); font: inherit; }
.pr-foot { display: flex; gap: 10px; align-items: center; margin-top: 8px; color: var(--muted); font-size: var(--fs-xs); }
.pr-restart { margin-left: auto; }
.pr-note { color: var(--faint); font-size: var(--fs-xs); margin: 8px 0 0; }

/* wins: company-wide, narrowed by division only on request */
.wn-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.pill {
  border: 1px solid var(--hairline); border-radius: var(--radius-pill); padding: 4px 11px; background: var(--surface);
  font: inherit; font-size: var(--fs-xs); font-weight: 550; color: var(--text); cursor: pointer;
}
.pill:hover { border-color: var(--brand-int); }
.pill.is-on { border-color: var(--brand-int); color: var(--brand-int); background: var(--brand-soft); }
.wn-sum { margin-left: auto; color: var(--muted); font-size: var(--fs-xs); }
.wn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 12px; }
.wn { border: 1px solid var(--hairline); border-radius: 10px; padding: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.wn-top { display: flex; gap: 9px; align-items: center; }
.wn-av {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--brand-int); color: var(--brand-int);
  display: inline-grid; place-items: center; font-weight: 700; font-size: 11px; flex: none;
}
.wn-name { font-weight: 600; }
.wn-meta { color: var(--muted); font-size: var(--fs-xs); }
.wn-div { margin-left: auto; font-size: var(--fs-2xs); font-weight: 750; color: var(--brand-int); border: 1px solid var(--brand-int); border-radius: 6px; padding: 1px 7px; }
.wn-title { font-weight: 650; }
.wn-body { color: var(--muted); line-height: 1.45; flex: 1; white-space: pre-line; }
.wn-foot { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--hairline); padding-top: 8px; flex-wrap: wrap; }
.wn-impact { font-weight: 650; color: var(--success); }
.wn-cat { color: var(--muted); font-size: var(--fs-xs); }
.wn-cheer, .wn-del {
  display: inline-flex; gap: 5px; align-items: center; color: var(--muted); background: none;
  border: 1px solid transparent; border-radius: var(--radius-pill); padding: 2px 8px; font: inherit; font-size: var(--fs-xs); cursor: pointer;
}
.wn-cheer { margin-left: auto; }
.wn-cheer:hover, .wn-del:hover { border-color: var(--hairline); color: var(--text); }
.wn-cheer svg { width: 14px; height: 14px; }
.wn-cheer.is-on { color: #e11d48; }
.wn-cheer.is-on svg { fill: currentColor; }
.wn-del.is-armed { color: var(--warn); border-color: var(--warn); }

/* the share dialog: a card sized to its content, never full width */
.win-dialog {
  border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--bg-elev); color: var(--text);
  box-shadow: 0 20px 56px rgba(10, 25, 55, .26); padding: 18px 20px; width: min(560px, calc(100vw - 32px));
}
.win-dialog::backdrop { background: rgba(10, 20, 40, .35); }

/* ---------- profile ---------- */
.profile-btn {
  display: flex; align-items: center; gap: 9px; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--radius-pill);
  padding: 4px 13px 4px 4px; cursor: pointer; color: inherit; font: inherit;
  transition: background var(--motion), border-color var(--motion);
}
.profile-btn:hover { background: var(--brand-soft); border-color: var(--brand-int); }
.profile-name { font-size: var(--fs-sm); font-weight: 580; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 10px; font-weight: 700; letter-spacing: .02em; color: #fff;
  background: linear-gradient(180deg, var(--brand-int), color-mix(in oklab, var(--brand-int) 76%, #000));
}
.avatar.lg { width: 42px; height: 42px; font-size: 13px; }

.profile-panel {
  position: fixed; top: 62px; right: 22px; z-index: 30; width: min(340px, calc(100vw - 32px));
  background: var(--bg-elev); border: 1px solid var(--hairline); border-radius: var(--radius-card);
  box-shadow: 0 20px 56px rgba(10, 25, 55, .26); padding: 17px;
}
.pp-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; }
.pp-name { font-weight: 650; letter-spacing: -.01em; }
.pp-title { color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.pp-rows { margin: 0; padding: 14px 0 4px; border-top: 1px solid var(--hairline); display: grid; gap: 10px; }
.pp-rows dt {
  font-size: var(--fs-2xs); letter-spacing: .1em; text-transform: uppercase; font-weight: 650; color: var(--faint);
}
.pp-rows dd { margin: 2px 0 0; font-size: var(--fs-sm); }
.pp-rows dd.unset { color: var(--faint); font-style: italic; }
.pp-signout {
  margin-top: 15px; width: 100%; padding: 9px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--text); font: inherit;
  font-size: var(--fs-sm); transition: background var(--motion), border-color var(--motion);
}
.pp-signout:hover { border-color: var(--brand-int); background: var(--brand-soft); }

@media (max-width: 860px) {
  .hm-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .page { padding: 0 16px 70px; }
  .profile-name { display: none; }
  .wn-sum { margin-left: 0; width: 100%; }
}

/* Loading skeletons, in the shape and place of what is coming, so nothing jumps when it lands. */
.skl {
  display: block; height: 12px; border-radius: 5px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--text) 7%, transparent) 25%,
    color-mix(in srgb, var(--text) 12%, transparent) 37%,
    color-mix(in srgb, var(--text) 7%, transparent) 63%);
  background-size: 400% 100%;
  animation: hm-shimmer 1.4s ease-in-out infinite;
}
.skl + .skl { margin-top: 8px; }
.skl.inline { display: inline-block; vertical-align: middle; }
.skl.box { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.skl.sq { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.skl.title { height: 18px; }
.dr.is-skel, .wn.is-skel { pointer-events: none; }
.mm.is-skel .mm-main { flex: 1; }
@keyframes hm-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skl { animation: none; } }


/* Your craft and the Foundry as one card: progress on the left, next steps on the right. */
#training { margin-bottom: 16px; }
.fc { padding: 0; overflow: hidden; }
.fc-top { display: flex; gap: 12px; align-items: center; padding: 16px 18px 12px; color: inherit; text-decoration: none; }
.fc-top:hover, .fc-left:hover { background: var(--brand-soft); }
.fc-top:hover .fc-open { color: var(--brand-int); }
.fc-top:focus-visible, .fc-left:focus-visible { outline: 2px solid var(--brand-int); outline-offset: -2px; }
.fc-id { flex: 1; min-width: 0; display: block; }
.fc-id .pn-kicker { display: block; }
.fc-rankline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fc-open { display: inline-flex; gap: 6px; align-items: center; font-size: var(--fs-xs); font-weight: 650; color: var(--muted); white-space: nowrap; }
.fc-arrow, .fc-arrow svg { width: 15px; height: 15px; display: inline-block; }
.fc-track { padding: 0 18px 14px; }
.fc-body { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); border-top: 1px solid var(--hairline); }
.fc-left { padding: 14px 18px 16px; border-right: 1px solid var(--hairline); color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 12px; }
.fc-toward { display: block; font-weight: 600; }
.fc-left-n { display: block; color: var(--muted); font-weight: 400; font-size: var(--fs-xs); margin-top: 2px; }
.fc-meter { display: block; height: 6px; border-radius: 3px; background: var(--hairline); overflow: hidden; }
.fc-meter > span { display: block; height: 100%; background: var(--brand-int); }
.fc-left .st-stats { margin-top: auto; }
.fc-left .st-stats > span { display: block; }
.fc-right { padding: 6px 18px 8px; min-width: 0; }
.fc-rh { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0 4px; }
.fc-rh b { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fc-rh a { font-size: var(--fs-xs); font-weight: 650; color: var(--brand-int); text-decoration: none; }
.fc-rh a:hover { text-decoration: underline; }
.fc-right .mm:first-child { border-top: 0; }
.mm.is-next { background: var(--brand-soft); border-radius: 10px; padding-left: 10px; padding-right: 10px; margin: 0 -10px; border-top-color: transparent; }
.mm.is-next + .mm { border-top-color: transparent; }
.mm-course { display: block; font-size: var(--fs-2xs); font-weight: 650; color: var(--brand-int); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 760px) { .fc-body { grid-template-columns: 1fr; } .fc-left { border-right: 0; border-bottom: 1px solid var(--hairline); } }

/* The Foundry overview (/foundry) as a list; only the open course shows its stages. */
.ov-head .fc-rankline { margin-top: 2px; }
.ov-sub { color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.ov-track { margin: 14px 0 6px; }
.ov-track .sg { font: inherit; text-align: left; border: 0; background: none; padding: 4px 4px 2px; border-radius: 6px; cursor: pointer; color: inherit; }
.ov-track .sg:hover { background: var(--brand-soft); }
.ov-track .sg.is-shown .sg-l { color: var(--text); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.ov-note { color: var(--muted); font-size: var(--fs-xs); margin: 6px 0 0; }
.ov-c { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 2px; border: 0; border-top: 1px solid var(--hairline);
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ov-c:hover .ov-t { color: var(--brand-int); }
.ov-c:focus-visible { outline: 2px solid var(--brand-int); outline-offset: 2px; }
.ov-t { flex: 1; min-width: 0; font-weight: 600; }
.ov-c.is-done .ov-t { color: var(--muted); font-weight: 500; }
.ov-dot { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--hairline); display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--muted); flex: none; }
.ov-dot svg { width: 12px; height: 12px; }
.ov-c.is-done .ov-dot { border-color: var(--success); color: var(--success); }
.ov-c.is-open .ov-dot, .ov-c.is-now .ov-dot { border-color: var(--brand-int); color: var(--brand-int); }
.ov-strip { display: inline-flex; gap: 4px; }
.ov-strip .mm-type { width: 22px; height: 22px; border-radius: 6px; }
.ov-strip .mm-type svg { width: 12px; height: 12px; }
.ov-c.is-done .ov-strip { opacity: .6; }
.ov-c.is-open .ov-strip { display: none; }
.ov-s { color: var(--muted); font-size: var(--fs-xs); min-width: 48px; text-align: right; white-space: nowrap; }
.ov-stages { margin: -4px 0 8px 36px; }
.ov-stages .mm:first-child { border-top: 0; }
.ov-stages .mm.is-done .mm-title { color: var(--muted); }
.ov-list.is-locked { opacity: .55; }
.ov-track .sg-l, .ov-track .sg-bar { display: block; }
.ov-head h1.st-level { margin: 0; }

/* Win cards clamp and the modal shows the whole win. The title is a button so it opens from the keyboard. */
button.wn-title { font: inherit; font-weight: 650; text-align: left; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button.wn-title:hover { color: var(--brand-int); }
button.wn-title:focus-visible { outline: 2px solid var(--brand-int); outline-offset: 2px; border-radius: 4px; }
.wn-title, .wn-impact { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.wn-grid .wn-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; flex: none; cursor: pointer; }
.wn-grid .wn-foot { margin-top: auto; }
.wn-full { border: 0; padding: 0; background: none; gap: 10px; max-width: 600px; }
.wn-full-t { font-size: var(--fs-lg); margin: 6px 0 0; }
.wn-full-b { color: var(--text); line-height: 1.55; white-space: pre-line; margin: 0; }
.wn-full .wn-impact { display: block; -webkit-line-clamp: none; }
.wn-full-x { display: flex; justify-content: flex-end; }
.skl.dot { width: 24px; height: 24px; border-radius: 50%; flex: none; }


/* Section header: an icon tile in the section's color, its name, a short line. */
.sh { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.sh-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 13%, var(--bg-elev)); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.sh-ico svg { width: 26px; height: 26px; }
.sh-k { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--c); }
.sh-t { display: block; font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; margin: 1px 0 0; }
.sh-d { display: block; margin: 4px 0 0; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; line-height: 1.45; }
.ov-lede { margin-top: 10px; }
.sh-end { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.c-assist { --c: var(--brand-int); }
.c-foundry { --c: #C2410C; }
.c-wins { --c: #B45309; }
[data-theme="dark"] .c-foundry { --c: #FB923C; } [data-theme="dark"] .c-wins { --c: #FBBF24; }
.see-all { font-size: var(--fs-sm); font-weight: 650; color: var(--brand-int); text-decoration: none; white-space: nowrap; }
.see-all:hover { text-decoration: underline; }
.c-foundry .fc-top { display: block; }
.fc-top .sh { margin-bottom: 6px; }
.fc-top .fc-open { margin-left: auto; align-self: center; }
.fc-top:hover { background: color-mix(in srgb, var(--c) 6%, transparent); }
.fc-rk { margin: 2px 0 0 60px; align-items: center; }
.fc-ingot { display: inline-flex; }

/* Metal ranks: each rank's ingot, and its stretch of every progress bar in its own metal. */
.ingot { width: 30px; height: 22px; flex: none; display: block; }
.ingot.sm { width: 18px; height: 13px; display: inline-block; vertical-align: -2px; margin-right: 5px; }
.sg-bar > span { background: var(--m, var(--brand-int)); }
.sg.is-done .sg-bar > span { background: var(--m, var(--brand-int)); opacity: .55; }
.sg.is-now .sg-l { color: var(--text); }
.fc-meter > span { background: var(--m, var(--brand-int)); }

/* Wins: the teaser row, the comment count, the page and the thread. */
.wn-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .wn-grid.three { grid-template-columns: minmax(0, 1fr); } }
.wn-cmt { display: inline-flex; gap: 4px; align-items: center; font-size: var(--fs-xs); color: var(--muted); margin-left: auto; }
.wn-cmt svg { width: 14px; height: 14px; }
.wn-foot .wn-cmt + .wn-cheer { margin-left: 0; }
.wp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 16px; }
@media (max-width: 760px) { .wp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wp-stat { border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 14px; background: var(--surface); min-width: 0; }
.wp-stat b { display: block; font-size: 1.4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-stat span { color: var(--muted); font-size: var(--fs-xs); }
.wp-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.wp-search { flex: 1; min-width: 200px; font: inherit; font-size: var(--fs-sm); border: 1px solid var(--hairline); border-radius: 999px;
  padding: 7px 14px; background: var(--surface); color: var(--text); }
.wp-sel { font: inherit; font-size: var(--fs-sm); border: 1px solid var(--hairline); border-radius: 999px; padding: 7px 12px;
  background: var(--surface); color: var(--text); max-width: 100%; }
.wp-search:focus, .wp-sel:focus { outline: none; border-color: var(--brand-int); }
.wp-more { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 18px; }
.wp-more span { color: var(--muted); font-size: var(--fs-xs); }
.wd-thread { border-top: 1px solid var(--hairline); padding-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.wd-th { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cm { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
.cm .wn-av { width: 32px; height: 32px; font-size: 12px; }
.cm-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cm-n { font-weight: 650; font-size: var(--fs-sm); }
.cm-m { color: var(--faint); font-size: var(--fs-xs); }
.cm-author { font-size: var(--fs-2xs); font-weight: 750; color: #B45309; border: 1px solid #B45309; border-radius: 5px; padding: 0 6px; }
.cm-b { margin: 3px 0 0; line-height: 1.5; font-size: var(--fs-sm); white-space: pre-line; overflow-wrap: anywhere; }
.cm-acts { display: flex; gap: 12px; margin-top: 4px; }
.cm-acts button { border: 0; background: none; padding: 0; font: inherit; font-size: var(--fs-xs); color: var(--muted); cursor: pointer; }
.cm-acts button:hover { color: var(--brand-int); }
.cm-acts button.is-armed { color: var(--warn); }
.cm.reply { margin-left: 42px; }
.cm-new { border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.cm-new textarea { font: inherit; font-size: var(--fs-sm); border: 0; outline: none; resize: vertical; background: transparent; color: var(--text); min-height: 48px; }
.cm-starters { display: flex; gap: 6px; flex-wrap: wrap; }
.cm-starter { font: inherit; font-size: var(--fs-xs); border: 1px dashed var(--hairline); border-radius: 999px; padding: 4px 10px; background: none; color: var(--text); cursor: pointer; }
.cm-starter:hover { border-color: var(--brand-int); color: var(--brand-int); }
.cm-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cm-row .cm-m { margin-right: auto; }
.cm-replying { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 8px; align-items: center; }
.cm-replying button { border: 0; background: none; color: var(--brand-int); font: inherit; cursor: pointer; padding: 0; }
.cm-err { color: var(--warn); font-size: var(--fs-xs); }
.win-dialog.thread { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; }
