/* Install guides (/install, /install/*), built by scripts/build-pages.mjs with
   scripts/install-guides.mjs. Loaded after landing.css + pages.css and uses
   their tokens. Light theme only. */

/* ── Layout: content + "On this page" ─────────────────────────────────── */
.ig-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 56px; align-items: start; }
.ig-main { min-width: 0; max-width: 820px; }
.ig-toc { position: sticky; top: calc(var(--nav-h) + 24px); padding-top: 44px; }
.ig-toc h2 { margin-bottom: 12px; font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ig-toc ol { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.ig-toc a { display: block; margin-left: -1px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; font-size: 14px; color: var(--text-2); transition: color var(--t), border-color var(--t); }
.ig-toc a:hover { color: var(--accent-ink); border-left-color: var(--accent); }

.ig-sec { padding: 44px 0 0; scroll-margin-top: calc(var(--nav-h) + 12px); }
.ig-sec:last-child { padding-bottom: 8px; }
.ig-h2 { font-size: 28px; line-height: 1.15; letter-spacing: -0.035em; }
.ig-p { margin-top: 12px; font-size: 16px; line-height: 1.7; color: #2a3a4f; text-wrap: pretty; }
.ig-p b, .ig-li b { color: var(--text); font-weight: 600; }
.ig-sec > .cb, .ig-p + .cb, .cb + .ig-p { margin-top: 16px; }
.ig-h3 { margin-top: 28px; font-size: 19px; letter-spacing: -0.02em; }
.ig-ul { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; font-size: 16px; line-height: 1.65; color: #2a3a4f; }
.ig-ul li { position: relative; padding-left: 24px; }
.ig-ul li::before { content: ''; position: absolute; left: 4px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ig-ul b { color: var(--text); font-weight: 600; }

/* Inline code in prose */
.ig-main :not(pre) > code, .pg-hero code, .pr-table code, .ig-card code {
  padding: 1px 6px; border-radius: 6px; background: #eef0f6; color: #1d2b44;
  font: 400 .88em/1.4 var(--mono); overflow-wrap: anywhere;
}
.ig-main a:not(.btn):not(.lk-card), .ig-card a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: rgba(61, 39, 214, .35); text-underline-offset: 3px; }
.ig-main a:not(.btn):not(.lk-card):hover { text-decoration-color: currentColor; }

/* ── Before you start ─────────────────────────────────────────────────── */
.ig-pre { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; padding: 0; list-style: none; }
.ig-pre--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ig-pre li { padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid rgba(6, 27, 49, .07); font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.ig-pre li > b:first-child { display: block; margin-bottom: 4px; font-size: 15.5px; font-weight: 600; color: var(--text); }

/* ── Callouts ─────────────────────────────────────────────────────────── */
.ig-note, .callout {
  margin-top: 16px; padding: 14px 18px; border-radius: 14px;
  background: var(--accent-soft); border: 1px solid rgba(83, 58, 253, .14);
  font-size: 15px; line-height: 1.6; color: #2a3a4f;
}
.callout b, .ig-note b { color: var(--text); }
.callout--warn { background: #fff7ec; border-color: #f4dcb8; }

/* ── Menu path chips ──────────────────────────────────────────────────── */
.ip-path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin-top: 20px; font-size: 14px; }
.ip-lbl { margin-right: 6px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ip-chip { padding: 5px 11px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; color: var(--text); }
.ip-chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ip-sep { color: var(--muted); }
.ip-paste { margin-left: 2px; font-weight: 600; color: var(--accent-ink); }

/* ── Numbered steps ───────────────────────────────────────────────────── */
.ig-steps { display: flex; flex-direction: column; margin: 24px 0 0; padding: 0; list-style: none; }
.ig-step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 0 0 32px 48px; scroll-margin-top: calc(var(--nav-h) + 12px); }
.ig-step::before { content: ''; position: absolute; left: 15px; top: 36px; bottom: 6px; width: 2px; border-radius: 2px; background: #e4e1fb; }
.ig-step:last-child { padding-bottom: 0; }
.ig-step:last-child::before { display: none; }
.ig-step-body { min-width: 0; }
.ig-step-t { font-size: 19px; line-height: 1.35; letter-spacing: -0.02em; padding-top: 4px; }
.ig-n {
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-ink); font: 500 14px/1 var(--mono);
}
.ig-step-x { margin-top: 8px; font-size: 16px; line-height: 1.65; color: #2a3a4f; }
.ig-step-x b { color: var(--text); font-weight: 600; }
.ig-step .cb { margin-top: 14px; }
.ig-steps--art .ig-step { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.ig-steps--art .ig-step:not(:has(.ig-art)) .ig-step-body { grid-column: 1 / -1; }
.ig-art { border-radius: 16px; overflow: hidden; border: 1px solid rgba(6, 27, 49, .08); box-shadow: 0 20px 40px -32px rgba(50, 50, 93, .45); }

.ig-alt { margin-top: 32px; padding: 22px 24px; border-radius: 18px; background: var(--surface); border: 1px solid rgba(6, 27, 49, .07); }
.ig-alt-t { font-size: 17px; letter-spacing: -0.015em; }
.ig-alt p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.ig-alt .cb { margin-top: 14px; }

/* ── Code blocks ──────────────────────────────────────────────────────── */
.cb { position: relative; border-radius: 14px; background: #0b1628; border: 1px solid #0b1628; box-shadow: 0 24px 44px -34px rgba(6, 27, 49, .7); }
.cb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 0 8px 0 16px; border-bottom: 1px solid #1c2a44; }
.cb-lbl { font: 400 12px/1.2 var(--mono); color: #a7b3c8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-copy {
  flex: none; display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 8px;
  border: 1px solid #2a3a58; background: #13213a; color: #e4e9f2; font: 600 12.5px/1 var(--font); cursor: pointer;
  transition: background var(--t), border-color var(--t);
}
.cb-copy:hover { background: #1b2c4b; border-color: #3a4e74; }
.cb-copy:focus-visible { outline: 2px solid #b7a6ff; outline-offset: 2px; }
.cb-copy.is-done { color: #a5e3c4; border-color: #2e5b4a; }
.cb-pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; font: 400 13px/1.7 var(--mono); color: #e4e9f2; tab-size: 2; white-space: pre; border-radius: 0 0 14px 14px; }
.cb-pre:focus-visible { outline: 2px solid #b7a6ff; outline-offset: -2px; }
.cb-pre code { font: inherit; }
.tk-c { color: #93a1b8; }
.tk-s { color: #a5e3c4; }
.tk-t { color: #ffa3b5; }
.tk-k { color: #c3b6ff; }

/* "Copied" toast (copy.js) */
.cp-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50; translate: -50% 12px;
  padding: 10px 16px; border-radius: 10px; background: var(--text); color: #fff;
  font-size: 14px; font-weight: 600; box-shadow: 0 16px 36px -16px rgba(6, 27, 49, .6);
  opacity: 0; pointer-events: none; transition: opacity 160ms var(--ease), translate 160ms var(--ease);
}
.cp-toast.is-on { opacity: 1; translate: -50% 0; }

/* ── Troubleshooting ──────────────────────────────────────────────────── */
.ts-list { margin-top: 18px; border-radius: 18px; background: var(--surface); border: 1px solid rgba(6, 27, 49, .07); }
.ts-item + .ts-item { border-top: 1px solid #eef0f5; }
.ts-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 20px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; cursor: pointer; list-style: none;
}
.ts-item summary::-webkit-details-marker { display: none; }
.ts-item summary::after { content: '+'; flex: none; font: 400 20px/1 var(--mono); color: var(--muted); }
.ts-item[open] summary::after { content: '−'; }
.ts-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }
.ts-body { padding: 0 20px 18px; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.ts-body .cb { margin: 12px 0; }
.ts-body .ts-more { font-size: 14px; }

/* ── Hub: platform cards, attribute table ─────────────────────────────── */
.ig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ig-card { position: relative; }
.ig-card .lk-time { display: inline-flex; align-self: flex-start; padding: 2px 9px; border-radius: 99px; background: #eef0f6; font: 500 12px/1.6 var(--mono); color: var(--text-2); }
.ig-grid > li { display: flex; }
.ig-grid > li > .lk-card { flex: 1; }
.ig-card--wide { grid-column: 1 / -1; }
.ig-others { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding: 0; list-style: none; }
.ig-others a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 99px;
  background: var(--surface); border: 1px solid #e3e6ef; font-size: 15px; font-weight: 500; color: var(--text);
  box-shadow: 0 6px 14px -12px rgba(50, 50, 93, .4); transition: border-color var(--t), color var(--t);
}
.ig-others a:hover { border-color: var(--accent); color: var(--accent-ink); }
.pg-h2 + .ig-grid, .pg-sub + .ig-grid { margin-top: 24px; }
.at-table .pr-table { min-width: 640px; }
.at-table .pr-table tbody th { width: 34%; }
.at-table .pr-table tbody th code { white-space: nowrap; }
.at-table td { color: #2a3a4f; }

/* ── Illustrations (dashboard/assets/install-illustrations.js) ───────── */
/* Same markup as the dashboard's Install page; its theme tokens are mapped
   onto the landing palette here (light only). */
.ill {
  --bg: #fff; --text-primary: var(--text); --text-secondary: var(--text-2); --text-muted: var(--muted);
  --border: var(--line); --accent-fill: var(--accent); --ik-soft: #f4f3fd; --ik-mono: var(--mono);
  --ill-line: #e9ebf3; --ill-tip-bg: #061b31; --ill-tip-fg: #fff;
  --ill-win-shadow: 0 1px 3px rgba(6, 27, 49, .1); --ill-ring: 0 0 0 4px rgba(83, 58, 253, .2);
  position: relative; height: 170px; overflow: hidden; background: var(--ik-soft); font: 10px/1.3 var(--font); color: var(--text-muted);
}
.ill-win { position: absolute; box-sizing: border-box; border-radius: 10px; background: var(--bg); box-shadow: var(--ill-win-shadow); }
.ill-full { inset: 18px; padding: 12px 14px; }
.ill-rail { left: 18px; top: 18px; bottom: 18px; width: 40px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 12px; }
.ill-main { left: 74px; right: 18px; top: 18px; bottom: 18px; padding: 14px; }
.ill-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ill-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ill-between { justify-content: space-between; }
.ill-end { justify-content: flex-end; }
.ill-grow { flex: 1; min-width: 0; }
.ill-fill { flex: 1; align-items: stretch; }
.ill-tight { gap: 4px; padding-top: 10px; }
.ill-line { display: block; height: 8px; flex: none; border-radius: 4px; background: var(--ill-line); }
.ill-line--in { margin-left: 10px; }
.ill-block { display: block; height: 40px; border-radius: 6px; background: var(--ill-line); }
.ill-sq { display: block; width: 16px; height: 16px; flex: none; border-radius: 4px; background: var(--ill-line); }
.ill-ic { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px; color: var(--text-muted); }
.ill-ic--sm { width: 22px; height: 22px; border-radius: 6px; }
.ill-ic--on { color: #fff; background: var(--accent-fill); box-shadow: var(--ill-ring); }
.ill-tip { position: absolute; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--ill-tip-fg); background: var(--ill-tip-bg); }
.ill-strong { font-weight: 600; color: var(--text-primary); }
.ill-muted { color: var(--text-muted); }
.ill-mono { font-family: var(--ik-mono); font-size: 9px; }
.ill-hl { border: 1.5px solid var(--accent) !important; box-shadow: var(--ill-ring); color: var(--accent); }
.ill-btn { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border); font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--text-primary); }
.ill-btn--ghost { color: var(--text-secondary); }
.ill-btn--on { border-color: transparent; color: #fff; background: var(--accent-fill); box-shadow: var(--ill-ring); }
.ill-split { display: flex; padding: 0; overflow: hidden; }
.ill-nav { display: flex; flex-direction: column; gap: 6px; width: 92px; flex: none; padding: 10px 8px; box-sizing: border-box; border-right: 1px solid var(--ill-line); }
.ill-nav span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.ill-nav-on { margin: 0 -5px; padding: 2px 5px; border-radius: 5px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, transparent); }
.ill-in { margin-left: 4px; }
.ill-pane { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; padding: 10px 12px; }
.ill-field { display: block; flex: none; height: 20px; box-sizing: border-box; padding: 4px 6px; border-radius: 5px; border: 1px solid var(--ill-line); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ill-field--mid { height: 28px; }
.ill-field--tall { height: 40px; }
.ill-select { display: flex; align-items: center; justify-content: space-between; height: 24px; padding: 0 8px; border-radius: 5px; font-weight: 600; }
.ill-select i { font-style: normal; }
.ill-bar { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--ill-line); }
.ill-side { display: flex; flex-direction: column; gap: 6px; width: 54px; flex: none; padding-top: 4px; }
.ill-canvas { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 6px 0 0 8px; border-left: 1px solid var(--ill-line); }
.ill-theme { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; border: 1px solid var(--ill-line); }
.ill-thumb { width: 34px; height: 24px; flex: none; border-radius: 4px; background: var(--ill-line); }
.ill-dots { display: grid; place-items: center; width: 22px; height: 20px; flex: none; border-radius: 5px; font-size: 13px; font-weight: 700; line-height: 1; }
.ill-menu { position: absolute; right: 14px; top: 78px; display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 8px; background: var(--bg); box-shadow: 0 6px 16px -4px rgba(6, 27, 49, .22), 0 0 0 1px var(--ill-line); }
.ill-menu span { padding: 3px 10px; border-radius: 5px; white-space: nowrap; }
.ill-menu-on { font-weight: 600; color: #fff; background: var(--accent-fill); }
.ill-code { gap: 7px; padding-top: 12px; }
.ill-codeline { display: block; margin-left: 10px; padding: 3px 6px; border-radius: 5px; font: 9px var(--ik-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ill-search { height: 22px; padding: 0 8px; border-radius: 5px; border: 1px solid var(--ill-line); display: flex; align-items: center; color: var(--text-secondary); }
.ill-plugin { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; border: 1px solid var(--ill-line); }
.ill-plug { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 8px; color: var(--text-secondary); background: var(--ill-line); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .ig-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ig-toc { display: none; }
  .ig-main { max-width: none; }
  .ig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .ig-steps--art .ig-step { grid-template-columns: minmax(0, 1fr); }
  .ig-art { max-width: 420px; }
}
@media (max-width: 720px) {
  .ig-sec { padding-top: 36px; }
  .ig-h2 { font-size: 24px; }
  .ig-pre, .ig-pre--4, .ig-grid { grid-template-columns: minmax(0, 1fr); }
  .ig-step { padding-left: 42px; }
  .ig-n { width: 30px; height: 30px; }
  .ig-step::before { left: 14px; }
  .ig-step-t { font-size: 17.5px; }
  .cb-pre { font-size: 12.5px; padding: 14px; }
  .ig-alt { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-toast { transition: none; }
}
