/* style.css */
:root {
  color-scheme: dark;
  --bg: #101512;
  --surface: #17201b;
  --surface-2: #202b24;
  --surface-3: #28362d;
  --text: #f2f5ed;
  --muted: #b6c0b7;
  --faint: #829087;
  --line: #3d4e42;
  --accent: #b8e152;
  --accent-deep: #6e9424;
  --accent-ink: #132000;
  --orange: #ffb45f;
  --danger: #ff957e;
  --focus: #fff1a8;
  --shadow: 0 18px 46px rgba(0, 0, 0, .28);
  --radius: 18px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f3ec;
  --surface: #ffffff;
  --surface-2: #edf0e9;
  --surface-3: #e4ebe0;
  --text: #172118;
  --muted: #536157;
  --faint: #6b776d;
  --line: #bfccb9;
  --accent: #6f941f;
  --accent-deep: #547715;
  --accent-ink: #faffeb;
  --orange: #a95f0c;
  --danger: #ad3f2b;
  --focus: #574500;
  --shadow: 0 14px 36px rgba(35, 54, 38, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  padding-bottom: calc(66px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 86% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 27rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
}

button,
select,
textarea,
input {
  font: inherit;
}

button,
select,
.file-label {
  min-height: 44px;
}

button,
.file-label {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible,
.file-label:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

a:hover {
  color: var(--orange);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: -70px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 850;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1380px;
  margin: auto;
  padding: max(20px, env(safe-area-inset-top)) 20px 18px;
}

.brand-wrap,
.header-actions,
.section-heading,
.step-topline,
.export-card,
.status-strip,
.vehicle-links {
  display: flex;
  align-items: center;
}

.brand-wrap {
  gap: 13px;
}

.engine-mark {
  display: grid;
  grid-template-columns: repeat(3, 10px);
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 7px;
  border: 1px solid var(--accent-deep);
  border-radius: 13px;
  background: linear-gradient(145deg, var(--surface-3), var(--surface));
}

.engine-mark span {
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent);
}

.eyebrow,
.kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.08rem, 2.5vw, 1.5rem);
  letter-spacing: -.025em;
}

h1 span {
  display: block;
  color: var(--muted);
  font-size: .8em;
  font-weight: 600;
}

.header-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.icon-button,
.text-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 12px;
  font-size: .84rem;
  font-weight: 700;
}

.icon-button:hover,
.text-button:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

main {
  max-width: 1380px;
  margin: auto;
  padding: 0 20px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr);
  gap: 20px;
  padding: clamp(23px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(115deg, color-mix(in srgb, var(--surface) 93%, var(--accent)), var(--surface) 58%);
  box-shadow: var(--shadow);
}

.hero h2 {
  max-width: 760px;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4.15rem);
  line-height: .98;
  letter-spacing: -.05em;
}

.hero-copy > p:not(.kicker) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.04rem;
}

.warning-callout,
.urgent-callout,
.stop-note {
  border-left: 4px solid var(--orange);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--orange) 10%, var(--surface));
  color: var(--text);
}

.warning-callout {
  max-width: 730px;
  margin-top: 24px;
  padding: 14px 16px;
}

.vehicle-card {
  align-self: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
}

.vehicle-card h2 {
  margin-bottom: 16px;
  font-size: 1.15rem;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: .9rem;
  font-weight: 750;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  padding: 10px 12px;
}

.vehicle-tip {
  min-height: 88px;
  margin: 17px 0;
  color: var(--muted);
  font-size: .92rem;
}

.vehicle-links {
  align-items: flex-start;
  flex-direction: column;
  gap: 9px;
  font-size: .88rem;
}

.quick-start {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 50px 0 18px;
}

.quick-start h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  letter-spacing: -.03em;
}

.symptom-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.symptom-button {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  padding: 16px;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.symptom-button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.symptom-button.selected {
  border-color: var(--accent);
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 18%, var(--surface)), var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent);
}

.scenario-number {
  display: grid;
  flex: 0 0 29px;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--accent);
  font-size: .81rem;
  font-weight: 900;
}

.symptom-button.selected .scenario-number {
  background: var(--accent);
  color: var(--accent-ink);
}

.symptom-button strong,
.symptom-button small {
  display: block;
}

.symptom-button strong {
  margin-bottom: 5px;
}

.symptom-button small {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.35;
}

.status-strip {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.status-strip > div {
  min-width: 0;
}

.status-label {
  display: block;
  color: var(--faint);
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.status-strip strong {
  display: block;
  overflow-wrap: anywhere;
}

.text-button {
  color: var(--muted);
  white-space: nowrap;
}

.guide-layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  align-items: start;
  gap: 27px;
}

.guide-nav {
  position: sticky;
  top: 14px;
  padding: 10px 0 20px;
}

.guide-nav nav {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.guide-nav nav a {
  padding: 8px 0 8px 14px;
  color: var(--muted);
  font-size: .84rem;
  text-decoration: none;
}

.guide-nav nav a:hover {
  color: var(--accent);
}

.toolbox {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.toolbox h2 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.toolbox ul {
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
  font-size: .84rem;
}

.content-column {
  min-width: 0;
}

.diagnostic-card,
.workbench-card,
.photo-card,
.reference-card,
.log-card,
.resources-card,
.export-card {
  margin-bottom: 22px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
}

.section-heading {
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.badge,
.save-status {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 100px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  padding: 5px 9px;
  font-size: .73rem;
  font-weight: 800;
}

.triage-grid,
.reference-grid,
.resource-grid,
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.triage-grid article,
.reference-grid article {
  padding: 17px;
  border-radius: 13px;
  background: var(--surface-2);
}

.triage-grid h3,
.reference-grid h3 {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 1rem;
}

.triage-grid p,
.reference-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .91rem;
}

.scenario-header {
  margin: 0 0 17px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: var(--radius);
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 15%, var(--surface)), var(--surface) 70%);
}

.scenario-header h2 {
  margin-bottom: 13px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -.045em;
}

.scenario-header > p:not(.eyebrow) {
  max-width: 830px;
  margin-bottom: 18px;
  color: var(--muted);
}

.urgent-callout,
.stop-note {
  padding: 12px 14px;
  font-size: .92rem;
}

.walkthrough {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.step {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.step.done {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
}

.step-topline {
  align-items: stretch;
}

.check-control {
  display: grid;
  flex: 0 0 57px;
  place-items: center;
  min-height: 58px;
  margin: 0;
  border-right: 1px solid var(--line);
  cursor: pointer;
}

.check-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-control span {
  width: 21px;
  height: 21px;
  border: 2px solid var(--faint);
  border-radius: 6px;
}

.check-control input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--surface);
}

.check-control input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.step-toggle {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-width: 0;
  min-height: 58px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 13px 16px;
  text-align: left;
  font-weight: 820;
}

.step-toggle:hover {
  background: var(--surface-2);
}

.toggle-word {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: .79rem;
  font-weight: 800;
}

.step-content {
  display: none;
  padding: 4px 22px 22px 75px;
  color: var(--muted);
}

.step-content.open {
  display: block;
}

.step-content p {
  margin-bottom: 0;
}

.tab-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 10px;
  scrollbar-color: var(--line) transparent;
}

.tab-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 9px 14px;
  font-size: .87rem;
  font-weight: 800;
}

.tab-button:hover,
.tab-button.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--text);
}

.system-panel {
  padding-top: 8px;
}

.system-diagram {
  display: block;
  width: 100%;
  min-height: 170px;
  margin: 0 0 23px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}

.system-diagram rect {
  fill: var(--surface-2);
  stroke: var(--accent-deep);
  stroke-width: 1.5;
}

.system-diagram line,
.system-diagram .svg-loop {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
}

.svg-title {
  fill: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
}

.svg-sub,
.svg-note {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
}

.svg-note {
  text-anchor: middle;
}

.system-copy h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.08;
}

.system-intro,
.section-intro {
  color: var(--muted);
}

.system-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-top: 20px;
}

.system-blocks article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.system-blocks h4 {
  margin-bottom: 9px;
  color: var(--accent);
  font-size: .96rem;
}

.system-blocks ul {
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
  font-size: .89rem;
}

.system-blocks li + li {
  margin-top: 8px;
}

.data-table,
.head-table,
.code-grid {
  display: grid;
  gap: 8px;
}

.data-table > div,
.head-table > div,
.code-grid > div {
  display: grid;
  grid-template-columns: minmax(110px, .65fr) 2fr;
  gap: 13px;
  padding: 11px;
  border-radius: 9px;
  background: var(--surface-3);
}

.data-table b,
.head-table b,
.code-grid b {
  color: var(--accent);
}

.data-table span,
.head-table span,
.code-grid span {
  color: var(--muted);
  font-size: .86rem;
}

.code-grid {
  grid-template-columns: 1fr 1fr;
}

.code-grid > div {
  grid-template-columns: 68px 1fr;
}

.test-tip {
  margin: 17px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .9rem;
}

.photo-link {
  display: flex;
  min-height: 164px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, var(--surface-2)), var(--surface-2));
  color: var(--text);
  text-decoration: none;
}

.photo-link:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.photo-link strong {
  color: var(--accent);
  font-size: 1rem;
}

.photo-link span {
  color: var(--muted);
  font-size: .88rem;
}

.photo-link b {
  color: var(--orange);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.engine-diagram {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 86px;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 750;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.engine-front,
.engine-rear {
  color: var(--faint);
}

.engine-diagram small {
  font-size: .63rem;
  text-transform: none;
  letter-spacing: 0;
}

.cylinders {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.cylinders span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  min-width: 24px;
  border: 1px solid var(--accent-deep);
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
  font-size: clamp(.75rem, 2.2vw, 1.08rem);
  font-weight: 900;
}

.large-data {
  color: var(--accent) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.35rem !important;
  font-weight: 900;
  letter-spacing: .08em;
}

.fine-print {
  margin-top: 13px !important;
  color: var(--faint) !important;
  font-size: .79rem !important;
}

textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.5;
}

textarea::placeholder {
  color: var(--faint);
}

.resource-link {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.resource-link:hover {
  border-color: var(--accent);
  color: var(--text);
}

.resource-link strong {
  color: var(--accent);
}

.resource-link span {
  color: var(--muted);
  font-size: .86rem;
}

.export-card {
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  background: linear-gradient(125deg, var(--surface-2), var(--surface));
}

.export-card h2 {
  margin-bottom: 7px;
  font-family: var(--serif);
  font-size: 1.55rem;
}

.export-card p:not(.eyebrow) {
  max-width: 670px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: .91rem;
}

.export-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 9px;
}

.export-actions button,
.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-deep);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  font-size: .86rem;
  font-weight: 850;
}

.file-label {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.export-actions button:hover {
  background: color-mix(in srgb, var(--accent) 82%, white);
}

.file-label:hover {
  border-color: var(--accent);
}

#importFile {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

footer {
  max-width: 1000px;
  margin: 24px auto 0;
  padding: 0 20px;
  color: var(--faint);
  font-size: .78rem;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 20;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  max-width: min(92vw, 480px);
  transform: translate(-50%, 140%);
  border: 1px solid var(--accent-deep);
  border-radius: 12px;
  background: var(--surface-3);
  box-shadow: var(--shadow);
  color: var(--text);
  padding: 12px 16px;
  font-size: .9rem;
  font-weight: 700;
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}

.toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 1040px) {
  .symptom-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .system-blocks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .vehicle-tip {
    min-height: 0;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-nav {
    position: static;
    padding-top: 0;
  }

  .guide-nav nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 0;
    gap: 6px;
  }

  .guide-nav nav a {
    min-height: 44px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
  }

  .toolbox {
    display: none;
  }
}

@media (max-width: 600px) {
  .site-header {
    align-items: flex-start;
    padding-inline: 16px;
  }

  .header-actions {
    max-width: 130px;
  }

  main {
    padding: 0 12px;
  }

  .hero {
    margin-inline: -1px;
    padding: 22px 18px;
    border-radius: 20px;
  }

  .hero h2 {
    font-size: 2.15rem;
  }

  .quick-start {
    display: block;
    margin-top: 35px;
  }

  .quick-start h2 {
    margin-bottom: 16px;
  }

  .symptom-grid,
  .triage-grid,
  .reference-grid,
  .resource-grid,
  .photo-grid,
  .code-grid {
    grid-template-columns: 1fr;
  }

  .symptom-button {
    min-height: 96px;
  }

  .status-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .status-strip .text-button {
    grid-column: 1 / -1;
  }

  .guide-nav nav {
    grid-template-columns: 1fr;
  }

  .diagnostic-card,
  .workbench-card,
  .photo-card,
  .reference-card,
  .log-card,
  .resources-card,
  .export-card {
    padding: 18px;
    border-radius: 15px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .step-content {
    padding: 4px 16px 18px 18px;
  }

  .check-control {
    flex-basis: 49px;
  }

  .system-diagram {
    min-height: 130px;
  }

  .system-diagram .svg-title {
    font-size: 11px;
  }

  .system-diagram .svg-sub,
  .system-diagram .svg-note {
    font-size: 8px;
  }

  .data-table > div,
  .head-table > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .engine-diagram {
    grid-template-columns: 1fr;
  }

  .engine-front,
  .engine-rear {
    display: none;
  }

  .export-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .export-actions {
    width: 100%;
  }

  .export-actions button,
  .file-label {
    flex: 1;
  }
}

@media (max-height: 570px) and (orientation: landscape) {
  .site-header {
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .hero {
    padding: 20px;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .guide-nav {
    display: none;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: white;
    color: black;
    padding: 0;
  }

  .site-header,
  .quick-start,
  .status-strip,
  .guide-nav,
  .header-actions,
  .tab-list,
  .photo-card,
  .export-card,
  .toast,
  footer {
    display: none !important;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .hero,
  .diagnostic-card,
  .scenario-header,
  .step,
  .workbench-card,
  .reference-card,
  .log-card,
  .resources-card {
    border-color: #999;
    box-shadow: none;
    background: white;
    color: black;
    break-inside: avoid;
  }

  .hero h2,
  .scenario-header h2,
  .section-heading h2,
  .system-copy h3 {
    color: black;
  }

  .step-content {
    display: block !important;
    color: #222;
  }

  .step-toggle,
  .step-content p,
  .step-content li,
  .triage-grid p,
  .reference-grid p,
  .system-blocks li {
    color: #222;
  }

  .system-panel {
    display: block !important;
  }

  a {
    color: #111;
  }
}
