/* ==========================================================================
   iamota MCP docs — Get Started guide (/docs/get-started)

   The setup wizards and background that used to live on the public landing
   page, now inside the docs app. Everything is scoped under `.guide` so none
   of it reaches the rest of the docs, and it consumes the shared tokens in
   /brand.css like everything else. Rendered by guide.js.
   ========================================================================== */

/* ===== Header CTA (every docs page) ===================================== */

.header-cta {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  margin-right: 12px;
  font-size: 11px;
  background: var(--ia-yellow);
  color: var(--ia-charcoal);
  border: var(--hairline) solid var(--ia-yellow);
  text-decoration: none;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.header-cta:hover { background: var(--ia-charcoal); border-color: var(--ia-charcoal); color: var(--ia-white); }
/* On the guide itself the button marks where you are rather than inviting a click. */
.header-cta.is-active { background: var(--surface); border-color: var(--border-strong); }
.header-cta.is-active:hover { background: var(--bg); color: var(--ia-charcoal); }

#start-view { flex: 1; }

/* ===== Sidebar: the Get Started section ================================= */

a.tree-guide-link { text-decoration: none; }
.tree-guide-group {
  font-size: 9.5px;
  color: var(--sidebar-muted);
  padding: 10px 8px 3px 11px;
}

/* ===== Page frame ======================================================= */

.guide { font-size: 16px; line-height: 1.6; }

.guide-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.guide-crumbs .ia-label { font-size: 10px; color: var(--text-muted); }
.guide-crumbs a { text-decoration: none; }
.guide-crumbs a:hover { color: var(--accent); }

.guide-head { margin-bottom: 30px; }
.guide-page-body { margin-top: 8px; }

.guide a { color: inherit; }

/* Body-copy links keep an underline — colour alone must not carry meaning. */
.guide .prose-two a,
.guide .step-text a,
.guide .prereq a,
.guide .step-note a,
.guide .serves-title a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.guide .prose-two a:hover,
.guide .step-text a:hover,
.guide .prereq a:hover,
.guide .serves-title a:hover { color: var(--accent); }

.guide code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--ia-gray-light);
  border: var(--hairline) solid var(--border);
  padding: 0.1em 0.34em;
}

.guide-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-top: 30px;
}
.guide-facts > div {
  padding: 16px 20px;
  border: var(--hairline) solid var(--border);
  margin: 0 0 calc(var(--hairline) * -1) calc(var(--hairline) * -1);
}
.guide-facts dt { font-size: 10px; color: var(--text-muted); margin-bottom: 6px; }
.guide-facts dd { font-size: 15px; }
.guide-facts code { background: none; border: 0; padding: 0; font-size: 14px; word-break: break-all; }

.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 26px;
  padding-bottom: 6px;
}
.guide-toc a { font-size: 11px; color: var(--text-muted); text-decoration: none; }
.guide-toc a:hover { color: var(--accent); }

.guide-section {
  margin-top: 64px;
  padding-top: 40px;
  border-top: var(--hairline) solid var(--border);
  scroll-margin-top: 16px;
}
.guide-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.1;
  margin-bottom: 30px;
  max-width: 26ch;
}
.guide-lede { margin: -14px 0 30px; max-width: 62ch; color: var(--text-muted); }
.guide-subtitle {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  margin: 52px 0 20px;
}

.guide .prose-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px 48px;
  max-width: 92ch;
}
.guide .prose-two p { color: var(--text-muted); }

/* ===== Numbered flow ==================================================== */

.guide .flow {
  list-style: none;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.guide .flow > li {
  padding: 24px 24px 28px;
  border: var(--hairline) solid var(--border);
  margin: 0 0 calc(var(--hairline) * -1) calc(var(--hairline) * -1);
}
.guide .flow-step { font-size: 11px; color: var(--accent); }
.guide .flow-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 22px;
  margin: 12px 0 8px;
}
.guide .flow > li p { font-size: 15px; color: var(--text-muted); }

/* ===== Content kinds ==================================================== */

.guide .serves-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.guide .serves-grid > li {
  padding: 22px 22px 26px;
  border: var(--hairline) solid var(--border);
  border-top: 3px solid transparent;
  margin: 0 0 calc(var(--hairline) * -1) calc(var(--hairline) * -1);
  background: var(--surface-sunken);
}
.guide .serves-grid > li:hover { border-top-color: var(--ia-yellow); }
.guide .serves-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 8px;
}
.guide .serves-grid > li p { font-size: 14px; color: var(--text-muted); }
.guide .serves-note {
  margin-top: 28px;
  max-width: 62ch;
  font-size: 15px;
  color: var(--text-muted);
  border-left: 2px solid var(--ia-yellow);
  padding-left: 16px;
}

/* ===== Buttons ==========================================================
   Brand spec: square corners, Roboto Mono SemiBold 12px uppercase, 2px
   tracking, optional 10px arrow with a 10px gap. */

.guide .btn {
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  height: 46px;
  padding-inline: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: var(--hairline) solid transparent;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease),
              border-color 0.15s var(--ease);
}
.guide .btn-arrow { font-size: 10px; line-height: 1; }
.guide .btn-primary { background: var(--ia-yellow); color: var(--ia-charcoal); }
.guide .btn-primary:hover { background: var(--ia-charcoal); color: var(--ia-white); }
.guide .btn-secondary {
  background: var(--surface);
  color: var(--ia-charcoal);
  border-color: var(--border-strong);
}
.guide .btn-secondary:hover { background: var(--ia-yellow); border-color: var(--ia-yellow); }
.guide .btn:disabled { opacity: 0.38; cursor: not-allowed; }
.guide .btn:disabled:hover { background: var(--surface); color: var(--ia-charcoal); }

/* ===== Wizard — choice cards ============================================ */

/* A group sets its own column count (--cols, from guide.js): four cards sit
   2 × 2 rather than three and a stray. The 1px gap over a border-coloured
   background draws the rules between cards, across rows as well as columns. */
.guide .client-cards {
  --cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--hairline);
  background: var(--border);
  border: var(--hairline) solid var(--border-strong);
}
@media (max-width: 1100px) {
  .guide .client-cards { grid-template-columns: repeat(min(var(--cols), 2), minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .guide .client-cards { grid-template-columns: minmax(0, 1fr); }
}
.guide .client-card {
  text-decoration: none;
  background: var(--surface);
  border: 0;
  border-top: 3px solid transparent;
  padding: 26px 24px 30px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  /* A column, so the meta line can sit on the bottom edge and line up across
     a row even when titles wrap to different heights. */
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: background-color 0.15s var(--ease);
}
.guide .client-card:hover { background: var(--ia-gray-light); border-top-color: var(--ia-yellow); }
.guide .card-kicker { font-size: 10px; color: var(--text-muted); }
.guide .card-title { font-family: var(--font-serif); font-size: 30px; line-height: 1.1; }
.guide .card-sub { font-size: 15px; color: var(--text-muted); margin-bottom: 10px; }
.guide .card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 14px;
  border-top: var(--hairline) solid var(--border);
}
.guide .card-go { position: absolute; top: 24px; right: 22px; font-size: 13px; color: var(--text-muted); }
.guide .client-card:hover .card-go { color: var(--text); }

.guide .prereq {
  margin-top: 28px;
  border: var(--hairline) solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface-sunken);
  padding: 18px 22px;
  max-width: 72ch;
}
.guide .prereq-head { font-size: 10px; color: var(--accent); margin-bottom: 8px; }
.guide .prereq p { font-size: 15px; color: var(--text-muted); }

/* ===== Wizard — steps =================================================== */

.guide .wizard-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: var(--hairline) solid var(--border);
  margin-bottom: 26px;
}
.guide .wizard-back {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted);
  padding: 0;
}
.guide .wizard-back:hover { color: var(--text); }
.guide .wizard-crumb { font-size: 11px; color: var(--text-muted); }
.guide .wizard-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.12;
}
.guide .wizard-intro { margin-top: 12px; max-width: 62ch; color: var(--text-muted); }

.guide .wizard-progress {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--border);
  border: var(--hairline) solid var(--border);
  margin: 28px 0 0;
}
.guide .wizard-progress > li { display: flex; flex: 1 1 auto; min-width: 150px; }
.guide .progress-item {
  background: var(--bg);
  padding: 11px 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: 1;
  text-decoration: none;
  transition: background-color 0.15s var(--ease);
}
.guide .progress-item:hover { background: var(--ia-gray-light); }
.guide .progress-num { font-size: 10px; color: var(--text-faint); }
.guide .progress-label { font-size: 13px; color: var(--text-muted); }
.guide .progress-item.is-done .progress-num { color: var(--accent); }
.guide .progress-item.is-current { background: var(--ia-charcoal); }
.guide .progress-item.is-current .progress-num { color: var(--ia-yellow); }
.guide .progress-item.is-current .progress-label { color: var(--ia-white); }

.guide .wizard-body {
  border: var(--hairline) solid var(--border);
  border-top: 0;
  background: var(--surface);
  padding: 30px 28px 34px;
}

.guide .step-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  margin-bottom: 10px;
}
.guide .step-lede { color: var(--text-muted); max-width: 62ch; margin-bottom: 20px; }
.guide .step-text { max-width: 68ch; margin-bottom: 16px; }
.guide .step-text:last-child { margin-bottom: 0; }

.guide .step-list { margin: 0 0 20px 1.35em; max-width: 66ch; }
.guide .step-list li { margin-bottom: 8px; }
.guide .step-list li::marker { font-family: var(--font-mono); font-size: 0.85em; color: var(--text-muted); }

/* ===== Tables =========================================================== */

.guide .step-table-wrap {
  overflow-x: auto;
  border: var(--hairline) solid var(--border);
  margin-bottom: 20px;
}
.guide .step-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.guide .step-table th {
  text-align: left;
  font-size: 10px;
  color: var(--text-muted);
  background: var(--ia-gray-light);
  padding: 10px 14px;
  white-space: nowrap;
}
.guide .step-table td {
  padding: 10px 14px;
  border-top: var(--hairline) solid var(--border);
  vertical-align: top;
}

/* ===== Code blocks ====================================================== */

.guide .code-block {
  border: var(--hairline) solid var(--border-strong);
  background: var(--ia-charcoal);
  margin-bottom: 20px;
  max-width: 78ch;
}
.guide .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: var(--hairline) solid var(--border-invert);
}
.guide .code-label { font-size: 10px; color: rgba(255, 255, 255, 0.6); }
.guide .code-copy {
  background: none;
  border: var(--hairline) solid var(--border-invert);
  color: var(--ia-beige);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  padding: 5px 10px;
  cursor: pointer;
}
.guide .code-copy:hover { background: var(--ia-yellow); color: var(--ia-charcoal); border-color: var(--ia-yellow); }
.guide .code-pre {
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ia-beige);
  white-space: pre;
}
/* The inner <code> must not pick up the inline-code chip above — a gray chip
   behind beige text is unreadable on the charcoal block. */
.guide .code-pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }

/* ===== Notes ============================================================ */

.guide .step-note {
  border: var(--hairline) solid var(--border);
  border-left: 3px solid var(--info);
  background: var(--info-bg);
  padding: 14px 18px;
  margin-bottom: 20px;
  max-width: 72ch;
}
.guide .step-note p { font-size: 15px; }
.guide .step-note-warn { border-left-color: var(--warn); background: var(--warn-bg); }

/* ===== Branches ========================================================= */

.guide .branch { margin-bottom: 8px; }
.guide .branch-q { font-weight: 500; margin-bottom: 14px; }
.guide .branch-opts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.guide .branch-opt {
  background: var(--surface);
  border: var(--hairline) solid var(--border-strong);
  padding: 13px 18px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  display: grid;
  gap: 3px;
  min-width: 190px;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.guide .branch-opt:hover { background: var(--ia-gray-light); }
.guide .branch-opt-label { font-size: 15px; font-weight: 500; }
.guide .branch-opt-hint { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.guide .branch-opt.is-active { background: var(--ia-yellow); border-color: var(--ia-charcoal); }
.guide .branch-opt.is-active .branch-opt-hint { color: var(--ia-charcoal); }
.guide .branch-follow:not(:empty) { border-top: var(--hairline) solid var(--border); padding-top: 24px; }

/* ===== Wizard footer ==================================================== */

.guide .wizard-foot {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border: var(--hairline) solid var(--border);
  border-top: 0;
  background: var(--surface);
  padding: 16px 28px 22px;
  flex-wrap: wrap;
}

.guide .wizard-help {
  margin-right: auto;
  align-self: center;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}
.guide .wizard-help span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.guide .wizard-help:hover { color: var(--accent); }

/* ===== Link cards ========================================================
   External links get a card rather than an inline underline, so a
   non-technical reader can see at a glance that a step needs a download. */

.guide .link-list { display: grid; gap: 10px; margin-bottom: 22px; max-width: 72ch; }
.guide .link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  background: var(--surface);
  border: var(--hairline) solid var(--border-strong);
  text-decoration: none;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.guide .link-card:hover { background: var(--ia-gray-light); }
.guide .link-card-main { display: grid; gap: 3px; }
.guide .link-card-label { font-size: 15px; font-weight: 500; }
.guide .link-card-note { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.guide .link-card-go { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
.guide .link-card:hover .link-card-go { color: var(--text); }

/* The one link a step actually wants you to click. */
.guide .link-card-primary { background: var(--ia-yellow); border-color: var(--ia-charcoal); }
.guide .link-card-primary .link-card-note,
.guide .link-card-primary .link-card-go { color: var(--ia-charcoal); }
.guide .link-card-primary:hover { background: var(--ia-charcoal); color: var(--ia-white); }
.guide .link-card-primary:hover .link-card-note,
.guide .link-card-primary:hover .link-card-go { color: rgba(255, 255, 255, 0.7); }

/* ===== Figures ===========================================================
   Schematic diagrams (inline SVG) or real screenshots, framed the same way
   so swapping one for the other is invisible to the layout. */

.guide .step-figure { margin: 0 0 22px; max-width: 80ch; }
.guide .step-figure-svg,
.guide .step-figure-img {
  display: block;
  width: 100%;
  border: var(--hairline) solid var(--border);
  background: var(--surface-sunken);
}
.guide .step-figure-svg svg { display: block; width: 100%; height: auto; }
.guide .step-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  border-left: 2px solid var(--ia-yellow);
  padding-left: 12px;
}

/* ===== Narrow screens =================================================== */

@media (max-width: 640px) {
  .header-cta { padding: 0 10px; margin-right: 6px; }
  .guide .wizard-body { padding: 24px 18px 28px; }
  .guide .wizard-foot { padding: 14px 18px 18px; }
  .guide .wizard-foot .btn { flex: 1 1 auto; justify-content: center; }
  .guide .wizard-help { flex: 1 1 100%; margin: 0 0 4px; }
  .guide .branch-opt { min-width: 0; flex: 1 1 100%; }
  .guide .wizard-progress > li { min-width: 0; flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .guide *, .header-cta { transition-duration: 0.01ms !important; }
}
