/* Guide-only styles. The scanner and its controls are unchanged. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.guide { margin: 0; font-size: 17px; line-height: 1.65; }
.guide a { color: var(--tbt-mint); text-underline-offset: 4px; }
.guide .guide-wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
/* Match the homepage header without importing Bootstrap into the guide. */
.guide .guide-header { line-height: 24px; font-size: 16px; }
.guide .guide-header .guide-header-inner { display: flex; justify-content: space-between; align-items: center; margin-inline: auto; }
.guide .guide-header .navbar-brand img { display: block; }
.guide .guide-header-nav { display: flex; flex-direction: row; align-items: center; padding: 0; gap: 0; }
.guide .guide-header-nav .nav-link { display: flex; align-items: center; padding: 8px 0; text-decoration: none; }
.guide .guide-header .toggle-mode { display: flex; align-items: center; }
.guide .guide-header .toggle-mode a { display: flex; align-items: center; }
.guide .guide-header .navbar-toggler { display: none; padding: 0; align-items: center; justify-content: center; flex-direction: column; cursor: pointer; }
.guide .guide-header .navbar-toggler span { display: block; height: 2px; border-radius: 100px; }
.guide .guide-header .navbar-toggler span + span { margin-top: 5px; }
@media (max-width: 991px) {
  .guide .guide-header-inner { flex-wrap: wrap; }
  .guide .guide-header .navbar-toggler { display: flex; }
  .guide .guide-header-nav { display: none; flex: 0 0 100%; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 0 6px; }
  .guide .guide-header .toggle-mode { display: none; flex: 0 0 100%; padding: 12px 0 0; }
  .guide .guide-header.menu-open .guide-header-nav, .guide .guide-header.menu-open .toggle-mode { display: flex; }
}
.guide .guide-button { display: inline-flex; justify-content: center; align-items: center; padding: 13px 23px; border: 1px solid transparent; border-radius: 999px; background: #5cce23; color: #071622; text-decoration: none; font-weight: 700; font-size: 15px; line-height: 1.4; }
.guide .guide-button:hover { background: #7ae13f; }
.guide .guide-button.secondary { background: transparent; border-color: var(--line); color: var(--tbt-mint); }
.guide-hero { padding: 72px 0 50px; background: radial-gradient(ellipse at 80% 0%, #174047 0, transparent 58%); }
.guide .eyebrow { margin: 0 0 15px; color: var(--tbt-mint); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.guide h1 { max-width: 820px; margin: 0 0 24px; font-size: clamp(40px, 5.7vw, 66px); line-height: 1.06; letter-spacing: -.045em; font-weight: 900; }
.guide h1 span { color: var(--tbt-mint); }
.guide .lead { max-width: 680px; color: var(--muted); font-size: 20px; line-height: 1.6; margin: 0 0 26px; }
.guide-jumps { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 32px 0 0; font-size: 14px; }
.guide-jumps a { text-decoration: none; }
.guide section[id] { scroll-margin-top: 24px; }
.guide-section { padding-block: 48px; border-top: 1px solid var(--line); }
.guide h2 { margin: 0 0 14px; font-size: clamp(28px, 3vw, 38px); font-weight: 700; letter-spacing: -.035em; line-height: 1.2; }
.guide h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.3; }
.guide p { margin: 0 0 18px; }
.guide .muted { color: var(--muted); }
.guide .section-intro { max-width: 760px; color: var(--muted); }
.guide .step-number { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: #78dcc2; color: #081629; font-size: 13px; font-weight: 900; flex-shrink: 0; }
.guide .quick-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; list-style: none; margin: 30px 0 0; padding: 0; }
.guide .quick-steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 25px; }
.guide .quick-steps .step-number { margin-bottom: 18px; }
.guide .quick-steps p { font-size: 15px; color: var(--muted); margin: 0; }
.guide .notice { border-left: 3px solid var(--tbt-mint); background: #102a36; padding: 18px 22px; border-radius: 0 12px 12px 0; margin: 25px 0 0; font-size: 15px; color: #c8dbe6; }
.guide .notice strong { color: #fff; }
.guide figure { margin: 28px 0; }
.guide .visual-panel { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--surface); }
.guide .visual-topline { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 17px 22px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.guide .visual-topline b { color: #e7f4f9; font-weight: 700; }
.guide .example-badge { color: #9fdccf; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.guide .filter-map { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; padding: 24px; }
.guide .filter-example { padding: 15px; border: 1px solid #3c566e; border-radius: 12px; background: #081a2e; }
.guide .filter-example small { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.guide .filter-example .step-number { width: 21px; height: 21px; font-size: 11px; }
.guide .filter-example b { display: block; font-size: 14px; line-height: 1.5; color: #fff; }
.guide figcaption { margin: 12px 2px 0; font-size: 13px; color: var(--muted); }
.guide .control-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 42px; margin: 28px 0 0; }
.guide .control-list div { border-bottom: 1px solid var(--line); padding-bottom: 19px; }
.guide .control-list dt { font-weight: 700; margin-bottom: 7px; color: #f2f7fc; }
.guide .control-list dd { margin: 0; color: var(--muted); font-size: 15px; }
.guide code { color: #b5eee1; font-size: .86em; overflow-wrap: anywhere; }
.guide .table-scroll { overflow-x: auto; }
.guide .example-table { width: 100%; min-width: 770px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.guide .example-table th,.guide .example-table td { padding: 20px 15px; text-align: right; border-bottom: 1px solid var(--line); }
.guide .example-table th { color: var(--muted); font-size: 12px; background: #152b43; }
.guide .example-table :is(th,td):nth-child(-n+2) { text-align: left; }
.guide .example-table td:nth-child(2),.guide .example-table td:nth-child(6),.guide .example-table td:nth-child(7) { color: var(--tbt-mint); font-weight: 700; }
.guide .range-figure { padding: 28px; }
.guide .range-figure h3 { font-size: 16px; }
.guide .range-labels { display: flex; justify-content: space-between; margin: 26px 0 8px; font-size: 13px; color: var(--muted); }
.guide .range-track { height: 12px; border-radius: 99px; background: linear-gradient(90deg,#78dcc2,#36c946); position: relative; }
.guide .range-marker { position: absolute; left: 22.2222%; top: -6px; width: 4px; height: 24px; background: #fff; border-radius: 2px; }
.guide .range-last { margin: 9px 0 25px 22.2222%; color: #fff; font-weight: 700; font-size: 13px; }
.guide .metric-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.guide .metric { border: 1px solid var(--line); border-radius: 13px; background: #081a2e; padding: 18px; }
.guide .metric strong { display: block; font-size: 32px; color: var(--tbt-mint); line-height: 1.3; }
.guide .metric span { font-weight: 700; font-size: 14px; }
.guide .metric p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.guide .glossary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin: 28px 0; }
.guide .glossary dt { color: #f2f7fc; font-weight: 700; font-size: 16px; margin-bottom: 7px; }
.guide .glossary dd { margin: 0; color: var(--muted); font-size: 15px; }
.guide .walkthrough { display: grid; grid-template-columns: 1.1fr 1fr; gap: 42px; align-items: center; }
.guide .setup-list { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin: 0; }
.guide .setup-list div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.guide .setup-list div:last-child { border-bottom: 0; }
.guide .setup-list dt { color: var(--muted); font-weight: 400; }
.guide .setup-list dd { margin: 0; color: #f2f7fc; font-weight: 700; text-align: right; }
.guide .export-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 42px; margin-top: 28px; }
.guide .export-steps { padding-left: 23px; margin: 0; }
.guide .export-steps li { padding: 0 0 20px 8px; color: var(--muted); }
.guide .export-steps li::marker { color: var(--tbt-mint); font-weight: 700; }
.guide .export-steps strong { color: #f2f7fc; }
.guide .export-preview { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: #102238; align-self: start; }
.guide .file-symbol { display: inline-block; border: 1px solid var(--tbt-mint); border-radius: 8px; color: var(--tbt-mint); padding: 7px 10px; font-size: 12px; font-weight: 900; margin-bottom: 18px; }
.guide .export-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.9; background: #081a2e; padding: 17px; border-radius: 10px; color: #b5eee1; }
.guide .export-preview p { font-size: 13px; color: var(--muted); margin: 0; }
.guide details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.guide summary { cursor: pointer; font-size: 18px; font-weight: 700; color: #f2f7fc; }
.guide details p { color: var(--muted); max-width: 870px; margin: 15px 0 0; font-size: 16px; }
.guide .guide-end { padding-block: 40px 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.guide .guide-end p { margin: 0; font-size: 25px; font-weight: 700; }
.guide .skip { position: absolute; top: -90px; left: 16px; padding: 12px; background: #fff; color: #081629; z-index: 99; }
.guide .skip:focus { top: 10px; }
@media (max-width: 900px) { .guide .filter-map { grid-template-columns: repeat(3,minmax(0,1fr)); } .guide .glossary { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) {
  .guide .guide-wrap { width: calc(100% - 32px); }
  .guide-hero { padding: 42px 0 36px; }
  .guide .lead { font-size: 18px; }
  .guide-section { padding-block: 34px; }
  .guide .quick-steps,.guide .control-list,.guide .walkthrough,.guide .export-layout { grid-template-columns: 1fr; gap: 18px; }
  .guide .filter-map { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 16px; }
  .guide .quick-steps li { padding: 22px; }
  .guide .quick-steps .step-number { margin-bottom: 12px; }
  .guide .range-figure { padding: 20px 16px; }
  .guide .metric-pair { gap: 10px; }
  .guide .metric { padding: 14px 11px; }
  .guide .glossary { grid-template-columns: 1fr; gap: 21px; }
  .guide .guide-end { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* The light guide uses the same content, with readable colors for each visual. */
body.guide:not(.dark) { color-scheme: light; }
.guide:not(.dark) .guide-hero { background: radial-gradient(ellipse at 80% 0%, #d4eee7 0, transparent 58%); }
.guide:not(.dark) main a:not(.guide-button), .guide:not(.dark) :is(.eyebrow, h1 span, .example-badge, code, .metric strong, .file-symbol, .example-table td:nth-child(2), .example-table td:nth-child(6), .example-table td:nth-child(7)) { color: #09694f; }
.guide:not(.dark) :is(.notice, .filter-example, .example-table th, .metric, .export-preview pre) { background: #e8f1f2; }
.guide:not(.dark) :is(.notice, .notice strong, .visual-topline b, .filter-example b, .control-list dt, .range-last, .glossary dt, .setup-list dd, .export-steps strong, summary) { color: var(--ink); }
.guide:not(.dark) .notice { border-left-color: #09694f; }
.guide:not(.dark) .filter-example { border-color: var(--line); }
.guide:not(.dark) .range-marker { background: #15263a; }
.guide:not(.dark) .export-preview { background: var(--surface); }
.guide:not(.dark) .export-preview pre { color: #09694f; }
.guide:not(.dark) .file-symbol { border-color: #09694f; }
.guide:not(.dark) .export-steps li::marker { color: #09694f; }
