/* Instructivo de Fixur — estilos (sin dependencias externas) */
@font-face { font-family: 'Inter'; src: url('fonts/Inter_Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter_Variable_LatinExt.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --ink: #111827; --ink-2: #1f2937; --muted: #6b7280; --line: #e5e7eb; --bg: #f9fafb; --card: #ffffff;
  --orange: #ea580c; --orange-d: #c2410c; --orange-l: #fff7ed; --orange-b: #fed7aa;
  --side-w: 300px; --top-h: 60px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top-h) + 16px); }
body { margin: 0; font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--orange-d); }
a:hover { color: var(--orange); }
b { font-weight: 650; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; height: var(--top-h); background: var(--ink); color: #fff; display: flex; align-items: center; gap: 14px; padding: 0 20px; border-bottom: 3px solid var(--orange); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand img { height: 38px; }
.brand span { font-size: 15px; text-transform: uppercase; letter-spacing: .14em; color: #fdba74; border-left: 1px solid #374151; padding-left: 10px; }
.top-note { margin-left: auto; font-size: 13px; color: #9ca3af; }
.menu-btn { display: none; background: none; border: 1px solid #374151; color: #fff; font-size: 20px; border-radius: 8px; width: 40px; height: 36px; cursor: pointer; }

/* layout */
.layout { display: flex; min-height: calc(100vh - var(--top-h)); }
.side { width: var(--side-w); flex: 0 0 var(--side-w); position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; background: #fff; border-right: 1px solid var(--line); padding: 16px 12px 40px; font-size: 14px; }
.side a { text-decoration: none; color: var(--ink-2); }
.nav-home, .nav-pdf { display: block; padding: 8px 10px; border-radius: 8px; font-weight: 600; }
.nav-pdf { margin-top: 14px; border: 1px solid var(--orange-b); color: var(--orange-d) !important; text-align: center; }
.nav-home.on, .nav-ch-link.on { background: var(--orange-l); color: var(--orange-d); }
.nav-ch { margin: 4px 0; }
.nav-ch summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 8px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.nav-ch summary::-webkit-details-marker { display: none; }
.nav-ch summary::before { content: '▸'; color: var(--orange); font-size: 12px; transition: transform .15s; }
.nav-ch[open] summary::before { transform: rotate(90deg); }
.nav-ch-link { padding: 2px 6px; border-radius: 6px; }
.nav-ch ul { list-style: none; margin: 2px 0 8px; padding: 0 0 0 18px; }
.nav-ch li a { display: block; padding: 5px 10px; border-radius: 6px; line-height: 1.35; color: #374151; }
.nav-ch li a:hover { background: var(--bg); }
.nav-ch li a.on { background: var(--orange-l); color: var(--orange-d); font-weight: 600; box-shadow: inset 3px 0 0 var(--orange); }

.content { flex: 1; min-width: 0; max-width: 1080px; padding: 32px 44px 60px; }
.foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* typography */
h1 { font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; margin: 4px 0 12px; }
h2 { font-size: 22px; margin: 0 0 6px; }
h3 { font-size: 17px; margin: 24px 0 8px; }
.crumb { margin: 0; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; color: var(--orange-d); }
.lead { font-size: 18px; color: #374151; }
.purpose { font-size: 17px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 10px; padding: 12px 16px; }
.roles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
.roles > span { margin-right: 4px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--ink); color: #fff; white-space: nowrap; }
.badge-ghost { background: #fff; color: #374151; border: 1px solid #d1d5db; }
.b-admin { background: #111827; } .b-fleet_manager { background: #c2410c; } .b-dispatcher { background: #1d4ed8; } .b-maintenance { background: #047857; } .b-driver { background: #7c3aed; }
.dot { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--orange); vertical-align: middle; }

/* steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 24px 0 0; }
.step { counter-increment: step; position: relative; padding: 0 0 26px 52px; margin: 0; }
.step::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step::after { content: ''; position: absolute; left: 17px; top: 40px; bottom: 6px; width: 2px; background: var(--line); }
.step:last-child::after { display: none; }
.step > p { margin: 4px 0 10px; font-size: 16.5px; }
.shot { margin: 8px 0 10px; }
.shot img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(17,24,39,.06); }
.shot.web img { max-height: 760px; width: auto; }
.shot.web.wide img { width: 100%; max-height: none; }
.shot.mobile img { width: 320px; border-radius: 22px; border: 6px solid var(--ink); }
.shot.side img { width: 210px; }
.shot figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.marks { margin: 6px 0 0; padding: 12px 16px 12px 16px; list-style: none; counter-reset: mk; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }
.marks li { counter-increment: mk; position: relative; padding-left: 34px; margin: 4px 0; }
.marks li::before { content: counter(mk); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.tip, .note { background: var(--orange-l); border: 1px solid var(--orange-b); border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
.tip > b { display: block; color: var(--orange-d); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.tip p { margin: 4px 0 0; }
.note { background: #f3f4f6; border-color: var(--line); }

.pair { display: flex; gap: 24px; align-items: flex-start; }
.pair .marks { flex: 1; margin-top: 8px; }
@media (max-width: 700px) { .pair { flex-direction: column; } }
/* chapter + index */
.ch-intro { display: flex; gap: 28px; align-items: flex-start; margin-top: 12px; }
.ch-intro > div { flex: 1; }
.ch-intro .shot.side { flex: 0 0 auto; }
.tasklist { padding-left: 20px; }
.tasklist li { margin: 8px 0; }
.tasklist li a { font-weight: 600; }
.tasklist li span { display: block; color: var(--muted); font-size: 14px; }
.hero { display: flex; gap: 32px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px 32px; border-top: 6px solid var(--orange); }
.hero-logo { width: 170px; }
.hero h1 { font-size: 38px; }
.btn { display: inline-block; background: var(--orange); color: #fff !important; text-decoration: none; padding: 10px 18px; border-radius: 999px; font-weight: 600; margin: 6px 6px 0 0; }
.btn-ghost { background: #fff; color: var(--orange-d) !important; border: 1px solid var(--orange-b); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin: 24px 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card p { font-size: 14.5px; color: #4b5563; }
.card ol { padding-left: 18px; font-size: 14.5px; margin: 0; }
.card ol li { margin: 4px 0; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.pager a { text-decoration: none; }
.pager .next { text-align: right; margin-left: auto; }

/* responsive */
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .top-note { display: none; }
  .side { position: fixed; left: 0; top: var(--top-h); z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
  body.nav-open .side { transform: none; }
  .content { padding: 22px 16px 48px; }
  h1 { font-size: 26px; }
  .hero { flex-direction: column; text-align: center; padding: 22px; }
  .step { padding-left: 0; }
  .step::before { position: static; display: inline-flex; margin-bottom: 6px; width: 30px; height: 30px; }
  .step::after { display: none; }
  .ch-intro { flex-direction: column; }
  .shot.mobile img { width: min(300px, 100%); }
}

/* ---------------- print / PDF ---------------- */
@page { size: Letter; margin: 0.55in 0.6in 0.6in; }
@media print {
  body { background: #fff; font-size: 11pt; }
  .top, .side, .pager, .foot, .menu-btn { display: none !important; }
  .layout { display: block; }
  .content { max-width: none; padding: 0; }
  a { color: var(--orange-d); text-decoration: none; }
  .task, .pchapter { break-before: page; }
  .step { break-inside: avoid; padding-bottom: 14px; }
  .step > p { break-after: avoid; }
  .shot { break-inside: avoid; }
  .shot img { box-shadow: none; }
  .shot.web img { max-height: 4.7in; max-width: 100%; width: auto; }
  .shot.web.wide img { width: auto; max-width: 100%; max-height: 4.9in; }
  .shot.mobile img { width: 2.05in; border-width: 4px; }
  .shot.side img { width: 1.7in; }
  .marks { break-inside: avoid; font-size: 10pt; padding: 8px 12px; }
  .tip, .note { break-inside: avoid; }
  h1 { font-size: 21pt; }
  .purpose { font-size: 11.5pt; }
  .cover { height: 9.4in; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border-top: 10px solid var(--orange); }
  .cover img { width: 2.6in; }
  .cover h1 { font-size: 36pt; margin-top: .3in; }
  .toc { break-before: page; }
}
.print-doc .cover { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.print-doc .cover img { width: 260px; }
.print-doc .cover .date { font-size: 18px; font-weight: 600; color: var(--orange-d); }
.print-doc .cover .small { color: var(--muted); font-size: 13px; }
.print-doc .toc ol { font-weight: 600; }
.print-doc .toc ol ol { font-weight: 400; margin-bottom: 8px; }
.print-doc .chtitle { font-size: 34px; border-bottom: 4px solid var(--orange); padding-bottom: 6px; }
.also { font-size: 14px; }
