/* Cardiac Imaging Academy - site stylesheet */
:root {
  --navy: #0f2a4a;
  --navy-dark: #0a1f38;
  --text: #1e2933;
  --muted: #5a6978;
  --border: #d8dee5;
  --bg: #ffffff;
  --bg-alt: #f3f5f7;
  --accent: #a32638;
  --accent-dark: #841e2d;
  --link: #0f4c81;
  --focus: #1a6fd1;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1100px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 84px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: 2.2rem; letter-spacing: -0.01em; }
h2 { font-size: 1.65rem; margin-top: 0; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.lead { font-size: 1.15rem; color: #2c3a47; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
section { padding: 3rem 0; }
section.alt { background: var(--bg-alt); }
.section-intro { max-width: 720px; margin-bottom: 1.5rem; }

/* Skip link */
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; z-index: 200; }
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: #fff; position: sticky; top: 0; z-index: 100; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; line-height: 1.1; }
.brand-sub { display: block; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; font: inherit; font-size: 0.95rem; color: var(--navy); cursor: pointer; min-height: 44px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--navy); text-decoration: none; padding: 10px 11px; font-size: 0.95rem; border-radius: var(--radius); }
.site-nav a:hover { background: var(--bg-alt); }
.site-nav a[aria-current="page"] { font-weight: 600; box-shadow: inset 0 -2px 0 var(--navy); border-radius: 0; }
.site-nav .btn { margin-left: 8px; }
.site-nav a.btn-primary { color: #fff; }
.site-nav a.btn-primary:hover { background: var(--accent-dark); }

/* Buttons */
.btn { display: inline-block; padding: 11px 20px; border: 1px solid var(--navy); border-radius: var(--radius); color: var(--navy); background: #fff; font: inherit; font-size: 0.98rem; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; min-height: 44px; line-height: 1.3; }
.btn:hover { background: var(--bg-alt); color: var(--navy); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.25rem 0 0; }

/* Breadcrumb */
.breadcrumb { font-size: 0.9rem; color: var(--muted); padding: 14px 0 0; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #9aa6b2; }
.breadcrumb a { color: var(--muted); }

/* Hero */
.hero { padding: 2.5rem 0 3rem; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 40px; align-items: start; }
.hero h1 { font-size: 2.4rem; }
.hero .lead { margin-bottom: 0.5rem; }
.kicker { display: inline-block; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem; }

/* Fact card */
.facts { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 24px; }
.facts h2, .facts h3 { font-family: var(--sans); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 12px; }
.facts dl { margin: 0 0 16px; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 0.97rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.facts .price { font-family: var(--serif); font-size: 2rem; color: var(--navy); margin: 4px 0 0; }
.facts .price small { font-family: var(--sans); font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.facts .btn { width: 100%; margin-top: 10px; }
.facts .note { font-size: 0.85rem; color: var(--muted); margin: 10px 0 0; }
.card .price { font-family: var(--serif); font-size: 1.8rem; color: var(--navy); margin: 0 0 8px; }
.card .price small { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); font-weight: 400; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; background: #fff; display: flex; flex-direction: column; }
.card h3 { margin-top: 0; }
.card .meta { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.card p:last-of-type { margin-bottom: 0; }
.card .card-cta { margin-top: auto; padding-top: 14px; }
.card.featured { border-color: var(--navy); border-width: 2px; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.card h2 a, .card h3 a, .article-list h2 a, .person h3 a { text-decoration: none; }
.card h2 a:hover, .card h3 a:hover, .article-list h2 a:hover, .person h3 a:hover { text-decoration: underline; }
.num-list { counter-reset: n; list-style: none; padding: 0; margin: 0; }
.num-list li { counter-increment: n; position: relative; padding-left: 2.4rem; margin-bottom: 1rem; }
.num-list li::before { content: counter(n); position: absolute; left: 0; top: 0.05rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--navy); color: #fff; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.6rem; position: relative; }
.checklist li::before { content: "\2713"; position: absolute; left: 0; color: var(--navy); font-weight: 700; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-alt); font-weight: 600; color: var(--navy); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.time { white-space: nowrap; color: var(--muted); width: 1%; }
tr.break td { color: var(--muted); font-style: italic; }
caption { text-align: left; font-weight: 600; padding: 10px 12px; color: var(--navy); caption-side: top; }

/* Programme accordion */
details.day { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; background: #fff; }
details.day summary { cursor: pointer; padding: 14px 16px; font-weight: 600; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
details.day summary::-webkit-details-marker { display: none; }
details.day summary::after { content: "+"; font-size: 1.3rem; color: var(--muted); }
details[open].day summary::after { content: "\2212"; }
details.day summary .day-sub { font-weight: 400; color: var(--muted); font-size: 0.9rem; display: block; }
details.day .table-wrap { margin: 0 12px 12px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 18px; max-width: 760px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* Faculty */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 0; }
.person { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: start; }
.person .initials { width: 72px; height: 72px; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--serif); font-size: 1.4rem; display: flex; align-items: center; justify-content: center; }
.person h3 { margin: 0 0 2px; font-size: 1.1rem; }
.person .role { color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.person p { font-size: 0.97rem; }

/* Callouts */
.callout { border-left: 4px solid var(--navy); background: var(--bg-alt); padding: 16px 18px; margin: 1.5rem 0; border-radius: 0 var(--radius) var(--radius) 0; }
.callout.warning { border-left-color: var(--accent); }
.callout-title { font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.callout p:last-child { margin-bottom: 0; }
.pull-quote { font-family: var(--serif); font-size: 1.25rem; color: var(--navy); border-left: 4px solid var(--border); padding: 4px 0 4px 18px; margin: 1.5rem 0; }
.sponsor-line { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; margin: 1.5rem 0 0; }
.sponsor-line strong { color: var(--navy); }

/* CTA band */
.cta-band { background: var(--navy); color: #fff; padding: 3rem 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe3ec; max-width: 640px; }
.cta-band .btn { border-color: #fff; color: #fff; background: transparent; }
.cta-band .btn:hover { background: rgba(255,255,255,0.1); }
.cta-band .btn-primary { background: var(--accent); border-color: var(--accent); }

/* Article */
.article-header { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--border); }
.article-header h1 { max-width: 820px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px 28px; color: var(--muted); font-size: 0.92rem; align-items: center; margin-top: 1rem; }
.article-meta .byline { display: flex; align-items: center; gap: 10px; color: var(--text); }
.article-meta .initials { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--serif); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; padding: 2rem 0 3rem; }
.article-body { max-width: 740px; font-size: 1.05rem; min-width: 0; }
.article-layout > * { min-width: 0; }
.hero .wrap > * { min-width: 0; }
.article-body h2 { margin-top: 2.2rem; scroll-margin-top: 90px; font-size: 1.5rem; }
.article-body h3 { margin-top: 1.6rem; }
.article-body ul, .article-body ol { margin-bottom: 1.2rem; }
.toc { position: sticky; top: 84px; align-self: start; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; font-size: 0.92rem; background: #fff; }
.toc h2 { font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--navy); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.author-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 2.5rem; display: grid; grid-template-columns: 64px 1fr; gap: 16px; background: var(--bg-alt); }
.author-box .initials { width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--serif); font-size: 1.3rem; display: flex; align-items: center; justify-content: center; }
.author-box h3 { margin: 0 0 2px; }
.author-box .role { color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.related { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin: 1.5rem 0; display: block; text-decoration: none; color: var(--text); }
.related:hover { border-color: var(--navy); }
.related .meta { font-size: 0.88rem; color: var(--muted); }
.related h3 { margin: 4px 0 6px; }
.article-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.article-list li { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.article-list h2 { font-size: 1.35rem; margin: 6px 0 8px; }
.article-list .meta { color: var(--muted); font-size: 0.9rem; }

/* Legal */
.legal h2 { margin-top: 2.5rem; scroll-margin-top: 90px; }
.legal h3 { margin-top: 1.5rem; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #c9d3de; padding: 3rem 0 2rem; margin-top: 3rem; font-size: 0.95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { color: #fff; font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand { font-family: var(--serif); color: #fff; font-size: 1.3rem; margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 2rem; padding-top: 1.25rem; font-size: 0.85rem; color: #9fb0c2; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Sticky mobile CTA */
.sticky-cta { display: none; }

/* Responsive */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .lead { font-size: 1.05rem; }
  h1, .hero h1 { font-size: 1.85rem; }
  h2 { font-size: 1.4rem; }
  section { padding: 2.25rem 0; }
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 8px 20px 16px; gap: 0; box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 8px; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .site-nav a[aria-current="page"] { box-shadow: none; border-left: 3px solid var(--navy); padding-left: 10px; }
  .site-nav .btn { margin: 12px 0 0; border-bottom: 1px solid var(--accent); }
  .hero { padding: 1.75rem 0 2.25rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .article-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .person { grid-template-columns: 56px 1fr; }
  .person .initials { width: 56px; height: 56px; font-size: 1.1rem; }
  .sticky-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: #fff; border-top: 1px solid var(--border); padding: 10px 16px; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -4px 16px rgba(0,0,0,0.08); }
  .sticky-cta .price { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 1.15rem; line-height: 1.1; }
  .sticky-cta .price small { display: block; font-family: var(--sans); font-weight: 400; color: var(--muted); font-size: 0.75rem; }
  body.has-sticky { padding-bottom: 76px; }
}
@media (max-width: 600px) {
  .stack { border: 0; }
  .stack table, .stack tbody, .stack tr, .stack td { display: block; width: 100%; }
  .stack thead { display: none; }
  .stack tr { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; background: #fff; }
  .stack td { border: 0; padding: 8px 14px; }
  .stack td:first-child { padding-top: 12px; }
  .stack td:last-child { padding-bottom: 12px; }
  .stack td::before { content: attr(data-label); display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 2px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; }
  .facts dl { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dt { margin-top: 8px; }
}
@media print {
  .site-header, .site-footer, .sticky-cta, .btn { display: none !important; }
  body { font-size: 12pt; }
}
