/* Smith matcher — scrollable wiki-style guided tour */

.guide-page {
  max-width: 1200px;
  padding-bottom: 4rem;
}

/* Header CTA — stands out gently, no glow (matches tool page Tutorial) */
.ai-nav a.nav-tutorial,
.ai-nav a.nav-open-tool {
  color: #fff !important;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem !important;
  border-radius: 999px;
  border-bottom: none !important;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ai-nav a.nav-tutorial:hover,
.ai-nav a.nav-open-tool:hover {
  color: #fff !important;
  border-bottom: none !important;
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.65);
}

/* —— Layout: sticky TOC + article —— */
.guide-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.guide-toc {
  position: sticky;
  top: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 0.9rem 1.1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  font-size: 0.82rem;
}

.guide-toc-title {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.guide-toc ol {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: #334155;
}

.guide-toc li {
  margin: 0.35rem 0;
  line-height: 1.35;
}

.guide-toc a {
  color: #1e40af;
  text-decoration: none;
}

.guide-toc a:hover {
  text-decoration: underline;
  color: #1a73e8;
}

.guide-toc-cta {
  display: block;
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: #fff !important;
  background: linear-gradient(135deg, #003087, #1a73e8);
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  text-decoration: none !important;
}

.guide-toc-cta:hover {
  filter: brightness(1.08);
}

.guide-article {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.75rem 2rem 2.5rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.guide-hero {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.guide-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b45309;
}

.guide-hero h2 {
  margin: 0 0 0.75rem;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.guide-lead {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.55;
  max-width: 42rem;
}

.guide-meta {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.guide-section {
  margin: 2.25rem 0 0;
  scroll-margin-top: 1.25rem;
}

.guide-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  color: #0f172a;
  letter-spacing: -0.015em;
}

.guide-section > p {
  margin: 0 0 1rem;
  color: #334155;
  max-width: 42rem;
  line-height: 1.55;
}

.guide-section a {
  color: #1a73e8;
}

.guide-figure {
  margin: 1rem 0 1.25rem;
}

.guide-figure figcaption {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
  max-width: 44rem;
}

.guide-steps,
.guide-bullets {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
  color: #334155;
  max-width: 42rem;
  line-height: 1.5;
}

.guide-steps li,
.guide-bullets li {
  margin: 0.4rem 0;
}

.guide-callout {
  margin: 1.1rem 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 44rem;
}

.guide-callout.tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a5f;
}

.guide-callout.try {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #78350f;
}

.guide-callout a {
  font-weight: 600;
  white-space: nowrap;
}

code {
  font-family: var(--ai-font-mono, ui-monospace, monospace);
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* —— Mock UI figures —— */
.mock {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 0.85rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.mock-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.mock-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mock-gear {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.mock-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.4rem;
}

.mock-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.6rem;
}

.mock-pane {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  min-height: 88px;
}

.mock-pane-load { grid-column: 1; }
.mock-pane-net { grid-column: 1; }
.mock-pane-smith { grid-column: 2; grid-row: 1 / span 2; }
.mock-pane-freq { grid-column: 1 / -1; }

.mock-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0;
}

.mock-chip-row.tight {
  margin-bottom: 0.6rem;
}

.mock-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.mock-chip.on {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

.mock-fields {
  display: flex;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.mock-fields span {
  flex: 1;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  text-align: center;
  padding: 0.25rem;
}

.mock-fields-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.mock-fields-3 label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
}

.mock-input {
  display: block;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.3rem 0.45rem;
  font-family: var(--ai-font-mono, ui-monospace, monospace);
  font-size: 0.85rem;
  font-weight: 500;
  color: #0f172a;
}

.mock-input.sm {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  font-size: 0.8rem;
}

.mock-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.mock-btn {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.mock-btn.accent {
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  border-color: #f59e0b;
  color: #78350f;
}

.mock-btn.dim {
  opacity: 0.75;
}

.mock-sch-bus {
  height: 6px;
  margin: 1rem 0 0.4rem;
  border-radius: 3px;
  background: linear-gradient(90deg, #94a3b8, #cbd5e1 40%, #94a3b8);
  position: relative;
}

.mock-sch-bus::before,
.mock-sch-bus::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 10px;
  height: 22px;
  border: 2px solid #64748b;
  border-radius: 2px;
  background: #fff;
}

.mock-sch-bus::before { left: 18%; }
.mock-sch-bus::after { left: 55%; border-top: none; height: 14px; top: 4px; }

.mock-smith-svg {
  width: 100%;
  max-width: 140px;
  display: block;
  margin: 0.25rem auto 0;
}

.mock-s11-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 0.25rem;
}

.mock-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-top: 0.4rem;
  background: #f8fafc;
  font-size: 0.75rem;
}

.mock-file-row.dim {
  opacity: 0.65;
}

.mock-file {
  font-family: var(--ai-font-mono, ui-monospace, monospace);
  font-weight: 600;
  color: #334155;
  margin-right: 0.25rem;
}

.mock-file.on {
  color: #1e40af;
}

.mock-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: #dbeafe;
  color: #1e40af;
}

.mock-pill.dim {
  background: #f1f5f9;
  color: #94a3b8;
}

.mock-check {
  font-size: 0.68rem;
  color: #64748b;
  margin-left: auto;
}

.mock-check + .mock-check {
  margin-left: 0;
}

/* Frequency mock */
.mock-design-f {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.75rem;
}

.mock-slider-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  position: relative;
}

.mock-slider-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  margin-left: -7px;
  border-radius: 50%;
  background: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.25);
}

.mock-val {
  font-family: var(--ai-font-mono, ui-monospace, monospace);
  color: #0f172a;
}

.mock-band {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.mock-dual {
  flex: 1;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  position: relative;
  min-width: 120px;
}

.mock-dual-fill {
  position: absolute;
  left: 18%;
  right: 22%;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #93c5fd, #60a5fa);
  border-radius: 999px;
}

.mock-dual-mark {
  position: absolute;
  left: 42%;
  top: -3px;
  bottom: -3px;
  width: 3px;
  background: #16a34a;
  border-radius: 2px;
}

.mock-edge {
  font-family: var(--ai-font-mono, ui-monospace, monospace);
  font-size: 0.75rem;
}

.mock-unit {
  font-size: 0.75rem;
  color: #94a3b8;
}

.mock-hint-line {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Full smith mock */
.mock-smith-full {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem;
}

.mock-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  align-items: center;
}

.mock-seg {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
}

.mock-seg:first-child {
  border-radius: 6px 0 0 6px;
}

.mock-seg:nth-child(2) {
  border-radius: 0 6px 6px 0;
  margin-right: 0.35rem;
  border-left: none;
}

.mock-seg.on {
  background: #1e293b;
  color: #fff;
  border-color: #1e293b;
}

.mock-toggle {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  color: #475569;
  background: #fff;
}

.mock-smith-big {
  width: 100%;
  max-width: 360px;
  display: block;
  margin: 0 auto;
}

.mock-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.65rem;
  font-size: 0.75rem;
  color: #64748b;
  justify-content: center;
}

.mock-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.mock-legend .dot.red { background: #dc2626; }
.mock-legend .dot.blue { background: #2563eb; }
.mock-legend .dot.green { background: #16a34a; }
.mock-legend .dot.amber { background: #f59e0b; }

/* Schematic strip */
.mock-sch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.78rem;
}

.mock-port {
  font-weight: 700;
  color: #1e293b;
  padding: 0.25rem 0.4rem;
}

.mock-wire {
  flex: 1;
  min-width: 18px;
  height: 2px;
  background: #64748b;
}

.mock-part {
  font-family: var(--ai-font-mono, ui-monospace, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1.5px solid #0f172a;
  background: #fff;
  color: #0f172a;
  white-space: nowrap;
}

.mock-part.series {
  border-color: #1d4ed8;
  color: #1e3a8a;
}

.mock-part.shunt {
  border-color: #0f766e;
  color: #115e59;
}

.mock-shunt-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mock-rl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.55rem;
}

.mock-bw {
  font-weight: 500;
  color: #15803d;
  font-size: 0.78rem;
}

.mock-s11-big {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

/* pin badges on mock controls */
.pin {
  position: relative;
}

.pin::after {
  content: attr(data-pin);
  position: absolute;
  top: -0.45rem;
  right: -0.45rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  font-family: system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}

/* Recipes */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 1.5rem;
}

.recipe-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.recipe-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #0f172a;
}

.recipe-card ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.45;
}

.recipe-card li {
  margin: 0.3rem 0;
}

.guide-footer-cta {
  text-align: center;
  margin-top: 1.5rem;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}

.guide-big-btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  color: #fff !important;
  text-decoration: none !important;
  background: linear-gradient(135deg, #003087, #1a73e8);
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35);
  margin-bottom: 0.75rem;
}

.guide-big-btn:hover {
  filter: brightness(1.06);
}

.guide-footer-cta p {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: #64748b;
}

/* Responsive */
@media (max-width: 860px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-toc {
    position: static;
  }

  .guide-toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.75rem;
    list-style: none;
    padding-left: 0;
  }

  .guide-toc li {
    margin: 0;
  }

  .guide-article {
    padding: 1.25rem 1.1rem 2rem;
  }

  .mock-workspace {
    grid-template-columns: 1fr;
  }

  .mock-pane-smith {
    grid-column: 1;
    grid-row: auto;
  }
}
