/* Onboarding guides: shared stylesheet (identical copy in each role folder so a
   folder can be opened or shared on its own). Palette follows the workstation's
   tokens (static/index.html) so the guide feels like part of the same machine. */
:root {
  --ground: #f5f6f9;
  --paper: #ffffff;
  --paper-2: #eef0f5;
  --line: #d9dde6;
  --ink: #12151b;
  --text: #1e2430;
  --muted: #5c6575;
  --faint: #8a93a4;
  --accent: #2f5fe0;
  --accent-ink: #ffffff;
  --accent-soft: rgba(47, 95, 224, .10);
  --signal: #9a7420;
  --signal-bg: rgba(202, 162, 74, .14);
  --signal-line: rgba(202, 162, 74, .45);
  --good: #1f8f5a;
  --bad: #c0463f;
  --code-bg: #12151b;
  --code-text: #e7eaf0;
  --shadow: 0 10px 30px rgba(18, 21, 27, .08);
  --display: "Charter", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0d1015; --paper: #161b23; --paper-2: #1b212b; --line: #272e3a;
    --ink: #e7eaf0; --text: #e7eaf0; --muted: #8a93a4; --faint: #5c6575;
    --accent: #6a92ff; --accent-ink: #0d1015; --accent-soft: rgba(106, 146, 255, .14);
    --signal: #e0bd6a; --signal-bg: rgba(202, 162, 74, .12); --signal-line: rgba(202, 162, 74, .35);
    --good: #4fd58f; --bad: #e5807a; --code-bg: #0b0e13; --code-text: #e7eaf0;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --ground: #0d1015; --paper: #161b23; --paper-2: #1b212b; --line: #272e3a;
  --ink: #e7eaf0; --text: #e7eaf0; --muted: #8a93a4; --faint: #5c6575;
  --accent: #6a92ff; --accent-ink: #0d1015; --accent-soft: rgba(106, 146, 255, .14);
  --signal: #e0bd6a; --signal-bg: rgba(202, 162, 74, .12); --signal-line: rgba(202, 162, 74, .35);
  --good: #4fd58f; --bad: #e5807a; --code-bg: #0b0e13; --code-text: #e7eaf0;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
/* links to other guides are revealed per role by guide.js (all of them when
   the page is opened from disk or the server has no sign-in) */
[data-guide-link]:not(.allowed) { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 16px/1.6 var(--ui); padding-inline: 16px; padding-block: 0;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, kbd, pre { font-family: var(--mono); }
code { background: var(--paper-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: .88em; }
kbd { background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; font-size: .85em; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; text-wrap: balance; color: var(--ink); margin: 0; }
h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.12; }
h2 { font-size: 26px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.3; }
p, ul, ol { margin: 0; }
.wrap { max-width: 1140px; margin: 0 auto; }

/* masthead */
.mast { display: flex; align-items: center; gap: 14px; padding: 18px 0 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mast .brand { font-family: var(--display); font-weight: 600; color: var(--ink); text-decoration: none; font-size: 17px; }
.mast .role { font: 600 11px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 6px 10px; }
.mast .sp { flex: 1; }
.mast .other { display: flex; gap: 6px; flex-wrap: wrap; }
.mast .other a { font-size: 13px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; background: var(--paper); }
.mast .other a:hover { color: var(--ink); border-color: var(--faint); }
.mast .theme { font: 13px var(--ui); color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; cursor: pointer; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 32px; padding-block: 36px 28px; align-items: start; }
.hero .lede { font-size: 18px; color: var(--muted); max-width: 60ch; margin-top: 14px; text-wrap: pretty; }
.hero .eyebrow { font: 600 12px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--signal); margin-bottom: 14px; }
.brief { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.brief h3 { font: 600 12px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.brief dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; font-size: 14px; }
.brief dt { color: var(--muted); }
.brief dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }

/* body grid */
.grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding-block: 10px 60px; }
.rail { position: sticky; top: 16px; align-self: start; }
.rail .prog { font: 600 12px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 8px; }
.rail .bar { height: 6px; background: var(--paper-2); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.rail .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
.rail ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.rail li a { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: baseline; padding: 7px 8px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; }
.rail li a:hover { background: var(--paper-2); color: var(--ink); }
.rail li a.on { background: var(--accent-soft); color: var(--ink); }
.rail li a .n { font: 600 12px/1.2 var(--mono); color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.rail li a.done .n { color: var(--good); }
.rail li a.done .n::after { content: " ✓"; }
.rail .reset { margin-top: 14px; font: 12px var(--ui); color: var(--faint); background: none; border: none; cursor: pointer; padding: 4px 8px; }
.rail .reset:hover { color: var(--muted); }

/* steps */
.steps { display: flex; flex-direction: column; gap: 44px; max-width: 72ch; }
.step { scroll-margin-top: 20px; }
.step .head { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: start; margin-bottom: 14px; }
.step .num { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--ground); display: grid; place-items: center; font: 600 16px var(--mono); font-variant-numeric: tabular-nums; }
.step.done .num { background: var(--good); color: #fff; }
.step .head .t { padding-top: 6px; }
.step .head .t .where { display: block; font: 13px var(--ui); color: var(--muted); margin-top: 3px; }
.step .head .t .where code { font-size: 12px; }
.step .check { display: inline-flex; align-items: center; gap: 8px; font: 13px var(--ui); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; background: var(--paper); cursor: pointer; user-select: none; white-space: nowrap; margin-top: 4px; }
.step .check input { accent-color: var(--good); margin: 0; }
.step.done .check { color: var(--good); border-color: var(--good); }
.step .body { display: flex; flex-direction: column; gap: 14px; padding-left: 58px; }
.step .body p { max-width: 68ch; text-wrap: pretty; }
.step .body ul, .step .body ol { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.step .body li { max-width: 66ch; }
.step .body li::marker { color: var(--faint); }

/* callouts and boxes */
.tip, .warn, .note { border-radius: 10px; padding: 12px 14px 12px 16px; font-size: 15px; border-left: 3px solid; max-width: 68ch; }
.tip { background: var(--signal-bg); border-color: var(--signal); }
.tip b, .warn b, .note b { color: var(--ink); }
.warn { background: rgba(192, 70, 63, .08); border-color: var(--bad); }
.note { background: var(--paper-2); border-color: var(--faint); }
.tip .lab, .warn .lab, .note .lab { display: block; font: 600 11px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.tip .lab { color: var(--signal); } .warn .lab { color: var(--bad); } .note .lab { color: var(--muted); }

.cmd { position: relative; background: var(--code-bg); color: var(--code-text); border-radius: 10px; padding: 12px 88px 12px 14px; font: 13px/1.6 var(--mono); overflow-x: auto; white-space: pre; max-width: 100%; }
.cmd button { position: absolute; top: 8px; right: 8px; font: 12px var(--ui); color: var(--code-text); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px; padding: 4px 9px; cursor: pointer; }
.cmd button:hover { background: rgba(255, 255, 255, .16); }

/* the parts table and app cards */
.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.part { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.part b { display: block; color: var(--ink); margin-bottom: 4px; font-family: var(--ui); }
.part .k { font: 600 10.5px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; display: block; }
.part.hidden-part { opacity: .65; border-style: dashed; }

table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.tablewrap { overflow-x: auto; max-width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 11.5px/1.3 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
td .w { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* chat mock */
.chat { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; max-width: 60ch; }
.chat .m { display: grid; grid-template-columns: 74px 1fr; gap: 10px; }
.chat .who { font: 600 12px/1.6 var(--ui); color: var(--muted); }
.chat .who.you { color: var(--accent); }
.chat .sig { font: 12.5px var(--mono); color: var(--signal); background: var(--signal-bg); border: 1px solid var(--signal-line); border-radius: 8px; padding: 6px 10px; }

details { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 0 14px; max-width: 68ch; }
details summary { cursor: pointer; padding: 11px 0; font-weight: 600; color: var(--ink); }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
details .in { padding-bottom: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }

.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.links a { display: block; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink); font-size: 14px; }
.links a:hover { border-color: var(--accent); }
.links a span { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.links a .h { color: var(--accent); font-family: var(--mono); font-size: 12px; word-break: break-all; }

.foot { border-top: 1px solid var(--line); padding-block: 22px 40px; font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 20px; padding-block: 26px 18px; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .rail { position: static; }
  .rail ol { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
  .rail li a { white-space: nowrap; grid-template-columns: auto auto; border: 1px solid var(--line); background: var(--paper); }
  .step .head { grid-template-columns: 36px 1fr; }
  .step .num { width: 36px; height: 36px; font-size: 14px; border-radius: 10px; }
  .step .head .check { grid-column: 2; justify-self: start; }
  .step .body { padding-left: 0; }
}
