*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafafa;
  --bg-secondary: #f5f4f0;
  --border: #e2e0d8;
  --border-secondary: #d4d2ca;
  --text-primary: #1a1a18;
  --text-secondary: #5f5e5a;
  --text-tertiary: #9e9c96;
  --border-accent: #c5c3bb;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1a;
    --bg-secondary: #242422;
    --border: #333330;
    --border-secondary: #3a3a37;
    --text-primary: #e8e6df;
    --text-secondary: #a8a69e;
    --text-tertiary: #6e6c66;
    --border-accent: #4a4a46;
  }
}

html[data-theme="light"] {
  --bg: #fafafa;
  --bg-secondary: #f5f4f0;
  --border: #e2e0d8;
  --border-secondary: #d4d2ca;
  --text-primary: #1a1a18;
  --text-secondary: #5f5e5a;
  --text-tertiary: #9e9c96;
  --border-accent: #c5c3bb;
}

html[data-theme="dark"] {
  --bg: #1c1c1a;
  --bg-secondary: #242422;
  --border: #333330;
  --border-secondary: #3a3a37;
  --text-primary: #e8e6df;
  --text-secondary: #a8a69e;
  --text-tertiary: #6e6c66;
  --border-accent: #4a4a46;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

.theme-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px;
}

.theme-btn {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 99px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}
.theme-btn.active {
  background: var(--bg);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  padding: 24px 20px;
  max-width: 860px;
  margin: 0 auto;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
}

.method-nav {
  margin-bottom: 2rem;
  margin-top: 1.25rem;
}

.nav-group {
  margin-bottom: 14px;
}

.nav-group-label {
  font-size: 10px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-tertiary);
  margin-bottom: 7px;
}

.nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nav-btn {
  font-size: 12px; padding: 4px 12px; border-radius: 99px;
  border: 1px solid; cursor: pointer; transition: opacity 0.15s;
  font-family: var(--font); background: transparent;
}

.nav-btn:hover { opacity: 0.75; }

.nav-btn.gm-vehicle { background: #FCEBEB; color: #A32D2D; border-color: #F09595; }
.nav-btn.gm-vehicle.active { background: #F09595; color: #501313; border-color: #E24B4A; font-weight: 500; }

.nav-btn.gm-char { background: #EDE8FB; color: #3C3489; border-color: #AFA9EC; }
.nav-btn.gm-char.active { background: #AFA9EC; color: #26215C; border-color: #7F77DD; font-weight: 500; }

.nav-btn.utility { background: #EAF3DE; color: #3B6D11; border-color: #97C459; }
.nav-btn.utility.active { background: #97C459; color: #173404; border-color: #639922; font-weight: 500; }

html[data-theme="dark"] .nav-btn.gm-vehicle { background: #3d1212; color: #f4a0a0; border-color: #791F1F; }
html[data-theme="dark"] .nav-btn.gm-vehicle.active { background: #791F1F; color: #FCEBEB; border-color: #E24B4A; }
html[data-theme="dark"] .nav-btn.gm-char { background: #26215C; color: #CECBF6; border-color: #534AB7; }
html[data-theme="dark"] .nav-btn.gm-char.active { background: #3C3489; color: #EEEDFE; border-color: #7F77DD; }
html[data-theme="dark"] .nav-btn.utility { background: #173404; color: #C0DD97; border-color: #3B6D11; }
html[data-theme="dark"] .nav-btn.utility.active { background: #27500A; color: #EAF3DE; border-color: #639922; }

@media (prefers-color-scheme: dark) {
  .nav-btn.gm-vehicle { background: #3d1212; color: #f4a0a0; border-color: #791F1F; }
  .nav-btn.gm-vehicle.active { background: #791F1F; color: #FCEBEB; border-color: #E24B4A; }
  .nav-btn.gm-char { background: #26215C; color: #CECBF6; border-color: #534AB7; }
  .nav-btn.gm-char.active { background: #3C3489; color: #EEEDFE; border-color: #7F77DD; }
  .nav-btn.utility { background: #173404; color: #C0DD97; border-color: #3B6D11; }
  .nav-btn.utility.active { background: #27500A; color: #EAF3DE; border-color: #639922; }
}

.method-card { display: none; }
.method-card.visible { display: block; }

.method-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 99px;
  white-space: nowrap;
  font-family: var(--font);
}

.type-gm { background: #FCEBEB; color: #A32D2D; }
.type-utility { background: #E1F5EE; color: #0F6E56; }
.type-char { background: #EDE8FB; color: #5B3DB5; }
.aw-xs { background: #FFF3E0; color: #8A4F00; }
.aw-yt { background: #E3F2FD; color: #1156A3; }
.aw-xs-partial { background: #FFF3E0; color: #8A4F00; border: 1px dashed #C87800; }

@media (prefers-color-scheme: dark) {
  .type-gm { background: #501313; color: #F7C1C1; }
  .type-utility { background: #04342C; color: #9FE1CB; }
  .type-char { background: #2D1F5E; color: #C4B5FD; }
  .aw-xs { background: #3D2200; color: #FFB74D; }
  .aw-yt { background: #0A2744; color: #90CAF9; }
  .aw-xs-partial { background: #3D2200; color: #FFB74D; border: 1px dashed #FF8C00; }
}

html[data-theme="dark"] .type-gm { background: #501313; color: #F7C1C1; }
html[data-theme="dark"] .type-utility { background: #04342C; color: #9FE1CB; }
html[data-theme="dark"] .type-char { background: #2D1F5E; color: #C4B5FD; }
html[data-theme="dark"] .aw-xs { background: #3D2200; color: #FFB74D; }
html[data-theme="dark"] .aw-yt { background: #0A2744; color: #90CAF9; }
html[data-theme="dark"] .aw-xs-partial { background: #3D2200; color: #FFB74D; border: 1px dashed #FF8C00; }

.inline-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 99px;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 4px;
  position: relative;
  top: -1px;
  font-family: var(--font);
}

.rules-box {
  background: var(--bg-secondary);
  border-left: 2px solid var(--border-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 14px;
  margin-bottom: 1.25rem;
}

.rules-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.rules-box ul { margin: 0; padding-left: 16px; }
.rules-box li { font-size: 13px; color: var(--text-primary); margin-bottom: 3px; line-height: 1.5; }

.steps-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.step {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
  align-items: flex-start;
}

.step-num {
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0.5px solid var(--border-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-top: 1px;
}

.step-text { font-size: 13px; color: var(--text-primary); line-height: 1.55; }
.step-note { font-size: 12px; color: var(--text-secondary); font-style: italic; }

.sub-step {
  display: flex;
  gap: 8px;
  margin: 4px 0 4px 34px;
  align-items: flex-start;
}

.sub-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-accent);
  flex-shrink: 0;
  margin-top: 7px;
}

.sub-text { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.notes-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin: 1.25rem 0 8px;
}

.note-block {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 8px;
}

.note-block-title { font-size: 12px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.note-block p { font-size: 13px; color: var(--text-secondary); margin: 0 0 4px; line-height: 1.5; }
.note-block ul { margin: 4px 0 0; padding-left: 16px; }
.note-block li { font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; line-height: 1.5; }

.result {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.25rem;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 0.5px solid #9FE1CB;
  background: #E1F5EE;
  color: #0F6E56;
  font-size: 13px;
  font-weight: 500;
}

@media (prefers-color-scheme: dark) {
  .result { background: #04342C; border-color: #085041; color: #9FE1CB; }
}

html[data-theme="dark"] .result { background: #04342C; border-color: #085041; color: #9FE1CB; }

.alt-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 0.5px solid var(--border);
}

.alt-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0 2rem;
}

b { font-weight: 600; color: var(--text-primary); }

a { color: #1156A3; }
@media (prefers-color-scheme: dark) { a { color: #90CAF9; } }
html[data-theme="dark"] a { color: #90CAF9; }

.photo-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 2px 8px; border-radius: 99px;
  border: 0.5px solid var(--border-secondary);
  color: var(--text-secondary); background: var(--bg-secondary);
  cursor: pointer; margin-left: 6px; vertical-align: middle;
  transition: all 0.15s; user-select: none;
  position: relative; top: -1px; font-family: var(--font);
}
.photo-trigger:hover { border-color: var(--border-accent); color: var(--text-primary); }
.photo-popup {
  display: none; margin: 8px 0 8px 34px;
  background: var(--bg-secondary); border: 0.5px solid var(--border-secondary);
  border-radius: 10px; overflow: hidden; max-width: 440px; position: relative;
}
.photo-popup.visible { display: block; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 10px 10px 0; }
.photo-grid img { width: 100%; border-radius: 6px; display: block; aspect-ratio: 4/3; object-fit: cover; cursor: zoom-in; transition: opacity 0.15s; }
.photo-grid img:hover { opacity: 0.85; }
.photo-caption { font-size: 11px; color: var(--text-tertiary); padding: 6px 10px 8px; line-height: 1.4; }
.photo-close {
  position: absolute; top: 8px; right: 8px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--bg); border: 0.5px solid var(--border-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px; color: var(--text-secondary); line-height: 1;
}
.photo-close:hover { color: var(--text-primary); }

.lightbox {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.9); align-items: center; justify-content: center;
  flex-direction: column; cursor: pointer;
}
.lightbox.visible { display: flex; }
.lightbox-img-wrap { position: relative; display: flex; align-items: center; justify-content: center; cursor: default; }
.lightbox img { max-width: 86vw; max-height: 82vh; border-radius: 8px; object-fit: contain; box-shadow: 0 8px 40px rgba(0,0,0,0.5); display: block; }
.lightbox-counter { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 12px; font-family: var(--font); cursor: default; }
.lightbox-close {
  position: fixed; top: 16px; right: 16px; width: 36px; height: 36px;
  border-radius: 50%; background: rgba(255,255,255,0.15); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; color: #fff; transition: background 0.15s; z-index: 1001;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-arrow {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 20px; color: #fff; transition: background 0.15s;
  user-select: none; z-index: 1001;
}
.lightbox-arrow:hover { background: rgba(255,255,255,0.25); }
.lightbox-arrow.prev { left: 16px; }
.lightbox-arrow.next { right: 16px; }
.lightbox-arrow.hidden { opacity: 0; pointer-events: none; }
.lightbox-arrow-icon { pointer-events: none; }

@media (hover: none) and (pointer: coarse) {
  .lightbox-arrow {
    top: 50%; transform: translateY(-50%);
    width: 22vw; height: 60vh; border-radius: 0; background: transparent;
    font-size: 0;
  }
  .lightbox-arrow:hover, .lightbox-arrow:active { background: transparent; }
  .lightbox-arrow.prev { left: 0; }
  .lightbox-arrow.next { right: 0; }
  .lightbox-arrow-icon {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
  }
}
