/* ─── AeroTrack Guide System — Shared Stylesheet ─── */
/* Extracted from the Aircraft Onboarding sample guide.  */
/* Every guide HTML links to ../assets/guide.css         */

/* ─── Design Tokens ─── */
:root {
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #f1f5f9;
  --muted-fg: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-fg: #ffffff;
  --accent: #f59e0b;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Header ─── */
.guide-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.guide-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.guide-header .subtitle {
  font-size: 0.9375rem;
  color: var(--muted-fg);
}
.guide-header .meta {
  font-size: 0.8125rem;
  color: var(--muted-fg);
  margin-top: 8px;
}

/* ─── Table of Contents ─── */
.toc {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.toc h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.toc ul {
  list-style: none;
  padding-left: 16px;
}
.toc > ul { padding-left: 0; }
.toc li { margin: 4px 0; font-size: 0.875rem; }
.toc li::before {
  content: "\2022";
  color: var(--primary);
  font-weight: bold;
  display: inline-block;
  width: 1em;
}

/* ─── Collapsible Sections ─── */
details { margin-bottom: 16px; }
summary { cursor: pointer; user-select: none; }
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "\25B6";
  display: inline-block;
  margin-right: 8px;
  font-size: 0.75rem;
  transition: transform 0.2s;
}
details[open] > summary::before { transform: rotate(90deg); }

/* ─── Hierarchy Levels ─── */
.process { margin-bottom: 24px; }
.process-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.workflow {
  margin-left: 16px;
  margin-bottom: 16px;
}
.workflow-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--primary);
  padding: 6px 0;
}

.activity {
  margin-left: 16px;
  margin-bottom: 12px;
}
.activity-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted-fg);
  padding: 4px 0;
}

/* ─── Step Cards ─── */
.steps-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 12px 0 12px 16px;
}

.step-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg);
}

.step-desc {
  padding: 8px 16px;
  font-size: 0.8125rem;
  color: var(--muted-fg);
}

.step-img {
  display: block;
  width: 100%;
  height: auto;
  border-top: 1px solid var(--border);
}

.step-no-img {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted-fg);
  font-size: 0.8125rem;
  font-style: italic;
}

/* ─── Footer ─── */
.guide-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-fg);
}

/* ─── Print ─── */
@media print {
  body { max-width: 100%; padding: 0; }
  details { break-inside: avoid; }
  .step-card { break-inside: avoid; page-break-inside: avoid; }
  .toc { break-after: page; }
  summary::before { content: ""; margin: 0; }
}
