/* reference.css: the reference pages (ACGME minimums, guides). Loaded after folio.css on those pages only.
   Readable long-form: a narrow text column, a minimums table, sources and a quiet "Anesto does this" aside. */
.ref-head { padding-block: 44px 28px; border-bottom: 1px solid var(--ink); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--dim); margin-bottom: 18px; }
.crumbs a { color: var(--ink-wet); text-decoration: none; display: inline-block; padding: 3px 0; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs span[aria-hidden] { color: var(--faint); }
.ref-head h1 { font-size: clamp(36px, 5.4vw, 62px); margin-top: 8px; }
.ref-head .lead { margin-top: 16px; max-width: 40em; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; font-size: 13.5px; color: var(--dim); }
.byline b { color: var(--ink-wet); font-weight: 500; }

.ref { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; padding-block: 40px 24px; align-items: start; }
.ref-main { min-width: 0; }
.ref-main > section { padding-top: 8px; margin-bottom: 44px; }
.ref-main h2 { font-size: clamp(26px, 3.2vw, 34px); margin: 0 0 12px; scroll-margin-top: calc(var(--hdr, 66px) + 16px); }
.ref-main h3 { font-size: 20px; margin: 22px 0 6px; }
.ref-main p, .ref-main li { font-size: 16.5px; line-height: 1.65; color: var(--ink); max-width: 40em; }
.ref-main p + p { margin-top: 12px; }
.ref-main ul, .ref-main ol { padding-left: 22px; margin: 10px 0 0; display: grid; gap: 6px; }
.ref-main a { color: var(--accent-ink); text-underline-offset: 3px; }
.ref-main a.store { color: var(--button-ink); text-decoration: none; }
.ref-main a.btn { text-decoration: none; }
.ref-main a.btn.accent { color: var(--on-accent); }
.ref-main .src { font-size: 13px; color: var(--dim); margin-top: 8px; }

/* the minimums table */
.mins { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); }
.mins table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mins th { text-align: left; font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.mins td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mins tr:last-child td { border-bottom: 0; }
.mins td.n { font-family: var(--mono); font-size: 16px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 1%; }
.mins td.mname { font-family: var(--serif); font-size: 18px; line-height: 1.25; }
.mins td.mname small { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--dim); margin-top: 3px; line-height: 1.4; }
.mins tr.sub td.mname { padding-left: 34px; font-size: 16.5px; position: relative; }
.mins tr.sub td.mname::before { content: "\21B3"; position: absolute; left: 14px; color: var(--faint); font-family: var(--sans); }
.mins td.what { color: var(--ink-wet); font-size: 14.5px; line-height: 1.5; }
.mins tr.sub2 td.mname { padding-left: 54px; }
.mins tr.sub2 td.mname::before { left: 34px; }
.mins tr { position: relative; }
.mins tr[data-tick] td:first-child { box-shadow: inset 4px 0 0 var(--tick); }
.table-wrap { overflow-x: auto; }

/* asides */
.callout { margin: 18px 0 0; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; font-size: 15.5px; max-width: 42em; }
.callout b { font-weight: 600; }
.anesto-does { margin-top: 18px; padding: 16px 18px; border: 1.5px dashed var(--accent); border-radius: 14px; display: grid; gap: 8px; max-width: 42em; }
.anesto-does .kick { color: var(--accent-ink); }
.anesto-does p { font-size: 15.5px; margin: 0; }
.anesto-does .ctas { margin-top: 6px; gap: 14px; }

/* the side column: contents + sources */
.ref-side { position: sticky; top: calc(var(--hdr, 66px) + 24px); display: grid; gap: 22px; font-size: 14px; }
.ref-side nav ol { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 7px; }
.ref-side nav a { color: var(--ink-wet); text-decoration: none; }
.ref-side nav a:hover { color: var(--ink); }
.ref-side .card { box-shadow: none; padding: 14px; }
.ref-side .card p { margin: 6px 0 0; color: var(--ink-wet); font-size: 13.5px; }

.sources ol { padding-left: 20px; display: grid; gap: 8px; }
.sources li { font-size: 14.5px; color: var(--ink-wet); }
.disclaimer { font-size: 13px; color: var(--dim); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; max-width: 46em; }

@media (max-width: 960px) {
  .ref { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ref-side { position: static; order: -1; }
  .ref-side .sources-card { display: none; }
}
@media (max-width: 560px) {
  .mins thead { display: none; }
  .mins table, .mins tbody { display: block; }
  .mins tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid var(--line); }
  .mins tr:last-child { border-bottom: 0; }
  .mins td { display: block; border-bottom: 0; padding: 10px 12px; }
  .mins td.n { width: auto; }
  .mins td.what { grid-column: 1 / -1; padding-top: 0; font-size: 14px; }
  .mins tr.sub td.mname { padding-left: 28px; }
  .mins tr.sub td.mname::before { left: 10px; }
  .mins tr.sub2 td.mname { padding-left: 44px; }
  .mins tr.sub2 td.mname::before { left: 26px; }
}
