/* Generated reference pages: the ACLS algorithms (/learn/acls/) and the
   cheat-sheet index. The sheets themselves add sheet.css. */

.ref-hero { background: var(--night); color: var(--on-night); padding: 26px var(--gutter) 40px; }
.ref-hero .eyebrow { color: var(--trace); margin-bottom: 8px; }
.ref-hero h1 { font-size: var(--h1); max-width: 18em; }
.ref-hero .lede { max-width: 46em; margin-top: 14px; color: var(--on-night-muted); font-size: 18.5px; }
.ref-hero .draft-badge { margin-top: 0; }
.ref-crumbs { font-size: 14.5px; color: var(--on-night-muted); margin-bottom: 22px; }
.ref-crumbs a { color: var(--on-night); }
.sheet-toolbar .ref-crumbs { color: var(--muted); margin-bottom: 0; }
.sheet-toolbar .ref-crumbs a { color: var(--blue); }

.ref-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.ref-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--night-line); color: var(--on-night); text-decoration: none; font-weight: 600; font-size: 15px; }
.ref-tabs a:hover { border-color: var(--trace); }
.ref-tabs a[aria-current="page"] { background: var(--trace); border-color: var(--trace); color: var(--night); }

.ref-body { padding: 40px var(--gutter) 72px; display: grid; gap: 44px; max-width: calc(var(--wrap) + 2 * var(--gutter)); }
.ref-body > * { min-width: 0; }
.ref-body > section > h2 { font-size: var(--h2); margin-bottom: 14px; }
.ref-small { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.ref-body a { color: var(--blue); }

/* Rhythm cards */
.ref-rhythms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.ref-rhythm { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; display: grid; gap: 6px; align-content: start; }
.ref-rhythm h3 { font-size: 20px; }
.ref-rhythm h3 a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ref-rhythm p { color: var(--muted); font-size: 15px; }
.ref-rhythm .ref-rhythm-entry { font-size: 13.5px; }
.ref-strip { display: block; width: 100%; height: 84px; border-radius: 10px; border: 1px solid #f0d6d6; }
.ref-shock { margin-top: 4px; }
.ref-shock summary { cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 650; font-size: 15px; background: var(--paper); }
.ref-shock summary::-webkit-details-marker { display: none; }
.ref-shock[open] summary { border-color: var(--blue); }
.ref-shock p { margin-top: 8px; font-weight: 650; font-size: 15px; }
.ref-shock .is-yes { color: #9b1c1c; }
.ref-shock .is-no { color: #0b5e52; }

/* Algorithm flow: every step is a card; a decision splits into branch columns. */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.flow-step { position: relative; display: grid; gap: 0; padding-bottom: 22px; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; left: 28px; bottom: 2px; width: 2px; height: 18px; background: #9fb2cc; }
.flow-card { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--blue); border-radius: var(--r-sm); padding: 14px 18px; max-width: 46em; }
.flow-card h3 { font-family: var(--sans); font-size: 18px; font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.flow-card ul { margin: 6px 0 0; padding-left: 20px; color: var(--ink); font-size: 15.5px; }
.flow-card li + li { margin-top: 2px; }
.flow-kind { font: 700 12px/1.2 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.is-start > .flow-card { border-left-color: #0f9d8a; }
.is-check > .flow-card { border-left-color: #b7791f; background: #fffaf0; }
.is-end > .flow-card { border-left-color: #55657a; background: var(--paper-2); }
.flow-goto { margin-top: 8px; font-weight: 650; font-size: 14.5px; color: var(--blue-deep); }
.flow-branches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 16px; }
.flow-branch { border: 1px dashed #c4ccd8; border-radius: var(--r-md); padding: 14px; background: rgba(255, 255, 255, 0.5); }
.flow-branch-label { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; background: var(--night); color: var(--trace); font: 700 14px/1.4 var(--sans); }
.flow-sub .flow-card { max-width: none; }

.ref-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.ref-points > section { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.ref-points h3 { font-size: 20px; margin-bottom: 6px; }
.ref-points ul { margin: 0; padding-left: 20px; font-size: 15.5px; }

.ref-caution { border: 1px solid #e8b94a; background: #fff6dd; border-radius: var(--r-sm); padding: 14px 18px; display: grid; gap: 6px; margin-bottom: 14px; font-size: 15.5px; max-width: 52em; }
.ref-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.ref-doses { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 560px; }
.ref-doses th, .ref-doses td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ref-doses thead th { background: var(--paper-2); font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.ref-doses tbody th { font-weight: 650; width: 28%; }
.ref-doses td:last-child { color: var(--muted); font-size: 13.5px; width: 26%; }
.ref-doses tr:last-child > * { border-bottom: 0; }

.ref-sources { border-top: 1px solid var(--line); padding-top: 24px; font-size: 15.5px; max-width: 52em; }
.ref-sources h2 { font-size: 26px; margin-bottom: 8px; }
.ref-sources ul { margin: 6px 0 12px; padding-left: 20px; }

.ref-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ref-pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; text-decoration: none; color: var(--ink); font-weight: 650; }
.ref-pager a:hover { border-color: var(--blue); }
.ref-pager small { color: var(--muted); font-weight: 500; }
.ref-pager .art-next { text-align: right; }

.ref-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.ref-cards > li > a { display: grid; gap: 6px; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; text-decoration: none; color: var(--ink); }
.ref-cards > li > a:hover { border-color: var(--blue); }
.ref-cards b { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.2; }
.ref-cards small { color: var(--muted); font-size: 15px; }
.ref-card-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 15px var(--mono); }
.ref-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.ref-split > section { padding: 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; }
.ref-split > section:first-child { border-top: 6px solid #b91c1c; }
.ref-split > section:last-child { border-top: 6px solid #0f9d8a; }
.ref-split h3 { font-size: 22px; margin-bottom: 6px; }

.sheet-list > li { position: relative; }
.sheet-list > li > a { padding-right: 96px; }
.sheet-list .draft-badge { justify-self: start; }
.sheet-list-actions { position: absolute; top: 14px; right: 14px; }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 14.5px; }
.btn-line { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-line:hover { border-color: var(--blue); }

@media (max-width: 640px) {
  .ref-hero { padding-bottom: 30px; }
  .ref-hero .lede { font-size: 17px; }
  .ref-body { padding-top: 28px; gap: 34px; }
  .ref-pager { grid-template-columns: 1fr; }
  .ref-pager .art-next { text-align: left; }
  .flow-card { padding: 12px 14px; }
  .flow-branch { padding: 10px; }
}

@media print {
  .nav, .foot, .ref-tabs, .ref-pager, .skip { display: none !important; }
  .ref-hero { background: none; color: #000; padding: 0 0 12px; }
  .ref-hero .lede, .ref-crumbs, .ref-crumbs a { color: #000; }
  .flow-step, .ref-rhythm, .ref-points > section { break-inside: avoid; }
}
