/* Faculty of Health Sciences palette (health.uct.ac.za): crimson accent, dark navy bar, charcoal footer, Roboto.
   If the Faculty changes its look, these tokens are the only place to update. */
:root {
  --red-600:#BF1238; --red-700:#9c0e2d; --red-50:#fbe8ec; --pink-200:#f3c3cd;
  --navy-900:#00243A; --charcoal:#383838; --tile:#191919;
  --ink:#191919; --slate-700:#40444e; --steel-400:#6b7680;
  --gray-200:#c7c7c7; --gray-100:#e6e6e6; --gray-50:#f7f8f9; --white:#fff;
  --amber:#b26b00; --amber-50:#fff4e0;
  --font-display:'Roboto', -apple-system, sans-serif;
  --font-body:'Roboto', Arial, -apple-system, sans-serif;
  --radius-md:4px; --radius-lg:8px; --radius-full:999px;
  --shadow-sm:0 1px 2px rgba(0,16,48,0.08); --shadow-md:0 4px 12px rgba(0,16,48,0.12);
  --gutter:40px; --maxw:1120px;
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; font-family:var(--font-body); color:var(--ink); background:var(--white); line-height:1.55; }
h1,h2,h3,h4 { font-family:var(--font-display); font-weight:700; margin:0; color:var(--ink); line-height:1.2; }
h2 { font-size:28px; margin-bottom:12px; }
h3 { font-size:19px; font-weight:500; }
p { margin:0 0 14px; }
a { color:var(--red-600); }
img { max-width:100%; display:block; }
.wrap { max-width:var(--maxw); margin:0 auto; padding:0 var(--gutter); }
.section { padding:56px 0; border-bottom:1px solid var(--gray-100); }
.section.tint { background:var(--gray-50); }
.section.navy { background:var(--navy-900); color:#fff; border-bottom:0; }
.section.navy h2, .section.navy h3 { color:#fff; }
.lede { font-size:17px; color:var(--slate-700); max-width:680px; }
.muted { color:var(--steel-400); font-size:13px; }
.skip { position:absolute; left:-999px; top:0; background:#fff; padding:8px 12px; z-index:10; }
.skip:focus { left:8px; }

/* masthead */
.masthead { background:var(--navy-900); }
.masthead .wrap { display:flex; align-items:stretch; padding:0; }
.masthead-uni { display:flex; align-items:center; padding:16px var(--gutter); }
.masthead-uni img { height:34px; width:auto; }
.masthead-back { margin-left:auto; display:flex; align-items:center; padding:0 var(--gutter); color:#fff; font-size:13px; text-decoration:none; }
.masthead-back:hover { text-decoration:underline; }
/* Faculty title band; the CSS halftone circles stand in for the FHS header graphic until we have the Faculty's file */
.faculty-band { background:
  radial-gradient(circle at 78% 40%, rgba(191,18,56,0.16) 0 46px, transparent 47px),
  radial-gradient(circle at 90% 75%, rgba(191,18,56,0.10) 0 70px, transparent 71px),
  radial-gradient(circle at 66% 85%, rgba(191,18,56,0.08) 0 30px, transparent 31px),
  radial-gradient(rgba(191,18,56,0.18) 1.4px, transparent 1.6px) 0 0/9px 9px,
  #fff; border-bottom:1px solid var(--gray-100); }
.faculty-band .wrap { min-height:96px; display:flex; align-items:center; }
.faculty-band a { font-size:30px; font-weight:300; color:#000; text-decoration:none; background:rgba(255,255,255,0.85); padding:2px 8px 2px 0; }
.sitenav { background:#fff; border-bottom:1px solid var(--gray-100); }
.sitenav .wrap { display:flex; align-items:center; gap:28px; min-height:64px; flex-wrap:wrap; }
.brand { font-family:var(--font-display); font-weight:700; font-size:18px; color:var(--ink); text-decoration:none; display:flex; align-items:center; gap:10px; margin-right:auto; }
.brand-mark { width:auto; height:48px; display:block; }
.sitenav nav { display:flex; gap:22px; flex-wrap:wrap; }
.sitenav nav a { text-decoration:none; font-size:14px; font-weight:700; color:var(--slate-700); padding:6px 0; border-bottom:2px solid transparent; }
.sitenav nav a:hover, .sitenav nav a[aria-current="page"] { color:var(--ink); border-bottom-color:var(--red-600); }
.crumbs { font-size:14px; color:#fff; margin-bottom:14px; }
.crumbs a { color:#fff; }

/* buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:10px 22px; font-family:var(--font-body); font-weight:700; font-size:15px; border-radius:var(--radius-md); cursor:pointer; border:1px solid transparent; text-decoration:none; line-height:1.2; }
.btn-accent { background:var(--red-600); color:#fff; border-color:var(--red-600); }
.btn-accent:hover { background:var(--red-700); border-color:var(--red-700); }
.hero-copy .btn-accent { background:#fff; color:var(--red-600); border-color:#fff; }
.btn-navy { background:var(--red-600); color:#fff; }
.btn-outline { background:transparent; color:#fff; border-color:rgba(255,255,255,0.75); }
.btn-outline-navy { background:#fff; color:var(--red-600); border-color:var(--red-600); }
.btn-row { display:flex; gap:12px; flex-wrap:wrap; }
.link-arrow { font-weight:700; text-decoration:none; color:var(--red-600); }
.link-arrow:hover { text-decoration:underline; }

/* hero */
.hero { display:grid; grid-template-columns:56% 44%; min-height:420px; }
.hero-copy { background:var(--red-600); color:#fff; padding:48px var(--gutter); display:flex; align-items:center; }
.hero-copy h1, .pagehead h1 { color:#fff; font-size:40px; margin-bottom:10px; border-left:6px solid #6e0a20; padding-left:16px; }
.hero-copy .tagline { font-family:var(--font-display); font-size:20px; color:#fff; margin-bottom:22px; font-weight:400; }
.hero-copy ul { margin:0 0 26px; padding:0; list-style:none; color:rgba(255,255,255,0.88); font-size:16px; }
.hero-copy li { margin-bottom:8px; padding-left:18px; position:relative; }
.hero-copy li::before { content:""; position:absolute; left:0; top:10px; width:7px; height:7px; border-radius:50%; background:#fff; }
.hero-img { position:relative; background:var(--gray-100); }
.hero-img img { width:100%; height:100%; object-fit:cover; }
.eyebrow { font-size:12px; letter-spacing:0.08em; text-transform:uppercase; color:var(--red-600); font-weight:700; margin-bottom:8px; }
.hero-copy .eyebrow, .pagehead .eyebrow, .section.navy .eyebrow { color:var(--pink-200); }
.pagehead { background:var(--red-600); color:#fff; padding:32px 0 40px; }
.pagehead p { color:rgba(255,255,255,0.92); max-width:640px; margin:10px 0 0; font-size:16px; }

/* image placeholder tag for the image brief */
.ph-tag { position:absolute; left:10px; bottom:10px; background:rgba(0,36,58,0.8); color:#fff; font-size:11px; padding:4px 8px; border-radius:var(--radius-md); letter-spacing:0.02em; }
.sample-tag { display:inline-block; background:var(--amber-50); color:var(--amber); font-size:11px; font-weight:700; padding:3px 8px; border-radius:var(--radius-full); letter-spacing:0.03em; text-transform:uppercase; vertical-align:middle; }

/* steps */
.steps { display:flex; gap:10px; align-items:center; margin-bottom:22px; font-size:14px; color:var(--steel-400); flex-wrap:wrap; }
.step { display:inline-flex; align-items:center; gap:8px; }
.step b { width:26px; height:26px; border-radius:50%; background:var(--gray-100); color:var(--slate-700); display:inline-flex; align-items:center; justify-content:center; font-size:13px; }
.step.on { color:var(--ink); font-weight:700; }
.step.on b { background:var(--red-600); color:#fff; }
.step.done b { background:var(--navy-900); color:#fff; }
.step.done a { color:var(--ink); }

/* cards & grids */
.grid { display:grid; gap:16px; }
.g5 { grid-template-columns:repeat(5,1fr); }
.g4 { grid-template-columns:repeat(4,1fr); }
.g3 { grid-template-columns:repeat(3,1fr); }
.g2 { grid-template-columns:repeat(2,1fr); }
.card { background:#fff; border:1px solid var(--gray-200); border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-sm); }
a.card { text-decoration:none; color:inherit; display:block; transition:box-shadow .15s ease, transform .15s ease; }
a.card:hover, a.card:focus-visible { box-shadow:var(--shadow-md); transform:translateY(-1px); }
.card-body { padding:18px 20px; }
/* decade tiles follow the Faculty's dark tiles */
a.decade-card { padding:22px 20px; min-height:132px; display:flex; flex-direction:column; justify-content:flex-end; background:var(--tile); border-color:var(--tile); border-radius:0; }
a.decade-card:hover, a.decade-card:focus-visible, a.decade-card.here { background:var(--red-600); border-color:var(--red-600); }
.decade-card .d { font-family:var(--font-display); font-size:24px; font-weight:700; color:#fff; }
.decade-card .meta { font-size:13px; color:rgba(255,255,255,0.78); margin-top:4px; }
.class-card .thumb { aspect-ratio:4/3; background:var(--gray-100); position:relative; overflow:hidden; }
.class-card .thumb img { width:100%; height:100%; object-fit:cover; }
.class-card .thumb .none { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:var(--steel-400); font-size:13px; text-align:center; padding:12px; }
.class-card .card-body { padding:12px 14px; }
.class-card .y { font-family:var(--font-display); font-weight:700; font-size:18px; color:var(--ink); }
.badges { display:flex; gap:6px; flex-wrap:wrap; margin-top:6px; }
.badge { display:inline-flex; align-items:center; height:22px; padding:0 9px; border-radius:var(--radius-full); font-size:12px; background:var(--red-50); color:var(--red-700); }
.badge.amber { background:var(--amber-50); color:var(--amber); }

/* giving table */
.tabs { display:inline-flex; border:1px solid var(--gray-200); border-radius:var(--radius-md); overflow:hidden; margin-bottom:18px; }
.tabs button { font:inherit; font-size:14px; font-weight:700; padding:10px 18px; border:0; background:#fff; color:var(--slate-700); cursor:pointer; }
.tabs button[aria-selected="true"] { background:var(--red-600); color:#fff; }
.table-wrap { overflow-x:auto; }
.giving-table { width:100%; border-collapse:collapse; font-size:15px; }
.giving-table th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:0.05em; color:var(--steel-400); padding:10px 12px; border-bottom:2px solid var(--gray-200); }
.giving-table td { padding:12px; border-bottom:1px solid var(--gray-100); vertical-align:middle; }
.giving-table td.num, .giving-table th.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.giving-table .dec a { font-weight:700; color:var(--ink); text-decoration:none; }
.largest { margin:0; padding-left:20px; font-size:14px; }
.largest li { margin:2px 0; }
.largest span { display:block; font-size:12px; color:var(--steel-400); }
.leading .total { font-size:30px; font-weight:700; color:var(--red-600); line-height:1.1; }
.leading h3 { font-size:15px; margin:16px 0 6px; }
.giving-table tr.here td { background:var(--red-50); }
.bar { height:8px; background:var(--gray-100); border-radius:4px; min-width:80px; }
.bar span { display:block; height:100%; background:var(--red-600); border-radius:4px; }

/* class page */
.class-photo { border:1px solid var(--gray-200); border-radius:var(--radius-lg); overflow:hidden; background:var(--gray-50); }
.class-photo img { width:100%; height:auto; }
.class-photo .cap { padding:12px 16px; font-size:13px; color:var(--slate-700); display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.two-col { display:grid; grid-template-columns:2fr 1fr; gap:32px; align-items:start; }
.side > * + * { margin-top:16px; }
.list-links { list-style:none; margin:0; padding:0; }
.list-links li { border-bottom:1px solid var(--gray-100); }
.list-links li:last-child { border-bottom:0; }
.list-links a { display:flex; justify-content:space-between; gap:12px; padding:12px 0; text-decoration:none; color:var(--ink); font-weight:700; }
.list-links a span { font-weight:400; color:var(--steel-400); font-size:13px; white-space:nowrap; }
.empty { border:1px dashed var(--gray-200); border-radius:var(--radius-lg); padding:20px; color:var(--slate-700); background:#fff; }
.empty p:last-child { margin-bottom:0; }
.person { display:flex; gap:14px; align-items:center; }
.avatar { width:56px; height:56px; border-radius:50%; background:var(--gray-100); flex-shrink:0; display:flex; align-items:center; justify-content:center; color:var(--steel-400); font-size:11px; text-align:center; line-height:1.2; }
.pager { display:flex; justify-content:space-between; gap:12px; padding:24px 0; flex-wrap:wrap; }
.subhead { margin:36px 0 14px; }
.subhead:first-child { margin-top:0; }

/* story cards */
.story-card .card-body { display:flex; flex-direction:column; gap:6px; height:100%; }
.story-card h3 { font-size:17px; }

/* help band */
.help { display:grid; grid-template-columns:1.3fr 1fr; gap:40px; align-items:center; }
.help p { color:rgba(255,255,255,0.88); }
.shawco { display:grid; grid-template-columns:1fr 1fr; gap:40px; align-items:center; }
.media { position:relative; aspect-ratio:4/3; border-radius:var(--radius-lg); overflow:hidden; background:var(--gray-100); }
.media img { width:100%; height:100%; object-fit:cover; }

/* footer */
.footer { background:var(--charcoal); color:rgba(255,255,255,0.78); font-size:13px; padding:40px 0 28px; }
.footer a { color:#fff; }
.footer .cols { display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:32px; margin-bottom:24px; }
.footer-logo { height:30px; width:auto; margin-bottom:16px; }
.footer h4 { color:#fff; font-size:14px; font-weight:600; margin-bottom:10px; }
.footer ul { list-style:none; margin:0; padding:0; }
.footer li { margin-bottom:6px; }
.footer .legal { border-top:1px solid rgba(255,255,255,0.15); padding-top:16px; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:12px; }

/* responsive */
@media (max-width: 960px) {
  .g5, .g4 { grid-template-columns:repeat(3,1fr); }
  .two-col, .help, .shawco { grid-template-columns:1fr; }
  .footer .cols { grid-template-columns:1fr 1fr; }
}
@media (max-width: 720px) {
  :root { --gutter:16px; }
  .hero { grid-template-columns:1fr; min-height:0; }
  .hero-img { aspect-ratio:16/9; order:-1; }
  .hero-copy { padding:36px var(--gutter); }
  .hero-copy h1, .pagehead h1 { font-size:32px; }
  h2 { font-size:24px; }
  .section { padding:40px 0; }
  .g5, .g4, .g3 { grid-template-columns:repeat(2,1fr); }
  .g2 { grid-template-columns:1fr; }
  .masthead-uni { padding:12px var(--gutter); }
  .masthead-uni img { height:28px; }
  .masthead-back { font-size:12px; }
  .faculty-band .wrap { min-height:64px; }
  .faculty-band a { font-size:22px; }
  .sitenav .wrap { gap:8px; padding-top:12px; padding-bottom:4px; }
  .sitenav nav { gap:18px; width:100%; overflow-x:auto; flex-wrap:nowrap; padding-bottom:6px; }
  .sitenav nav a { white-space:nowrap; }
  .bar-col { display:none; }
  .footer .cols { grid-template-columns:1fr; }
}
