/* CityUx · AI for Life-Science Professionals — shared styles
   Brand: CityU hero scheme (Marine + Blood Orange accent + Teal secondary). */
:root {
  --marine: #002D5C;
  --marine-2: #0b3f78;
  --orange: #F63E02;
  --orange-ink: #b52d00;      /* AA on white for small text */
  --teal: #3BBABD;
  --teal-ink: #1d6f72;        /* AA on white for small text */
  --teal-wash: #e8f7f7;
  --ink: #0f1f33;
  --muted: #4a5a6e;
  --line: #d8e0ea;
  --bg: #f5f8fb;
  --card: #ffffff;
  --ok: #1a7f37;  --ok-wash: #e9f6ec;
  --warn: #9a5b00; --warn-wash: #fff4e0;
  --bad: #b42318; --bad-wash: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,45,92,.06), 0 8px 24px rgba(0,45,92,.07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.6;
}
a { color: var(--marine-2); }
a:hover { color: var(--orange-ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--marine); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar img { height: 34px; width: auto; display: block; }
.topbar .brand-sep { width: 1px; height: 28px; background: var(--line); }
.topbar .brand-name { font-weight: 800; color: var(--marine); letter-spacing: -.01em; }
.topbar .brand-name span { color: var(--orange-ink); }
.topbar nav { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: .9rem; font-weight: 600; }
.topbar nav a { text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 16px 80px; }
.narrow { max-width: 820px; }

.hero { background: var(--marine); color: #fff; border-radius: var(--radius); padding: 36px 32px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: var(--teal); opacity: .22; }
.hero .eyebrow { color: #ffd2c2; }
.hero h1 { margin: 6px 0 10px; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; }
.hero p { margin: 0; max-width: 680px; color: #e3ecf6; font-size: 1.05rem; }
.hero .pill-row { margin-top: 18px; }
.eyebrow { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-ink); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); }
.pill.light { background: var(--teal-wash); border-color: #bfe6e7; color: var(--teal-ink); }

h2 { color: var(--marine); font-size: 1.35rem; letter-spacing: -.01em; margin: 40px 0 12px; }
h3 { color: var(--marine); margin: 0 0 6px; font-size: 1.08rem; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.lab-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; border-top: 4px solid var(--orange); transition: transform .15s, box-shadow .15s; }
.lab-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,45,92,.12); color: inherit; }
.lab-thumb { display: block; width: calc(100% + 40px); max-width: none; margin: -20px -20px 14px; aspect-ratio: 16 / 10; height: auto; object-fit: cover; object-position: left top; border-bottom: 1px solid var(--line); background: #fff; }
.lab-card { overflow: hidden; }
.lab-card .num { font-size: .74rem; font-weight: 800; color: var(--orange-ink); letter-spacing: .1em; text-transform: uppercase; }
.lab-card p { color: var(--muted); font-size: .92rem; margin: 6px 0 12px; flex: 1; }
.lab-card .go { font-weight: 700; color: var(--marine-2); font-size: .9rem; }

.callout { border-left: 4px solid var(--teal); background: var(--teal-wash); padding: 14px 18px; border-radius: 8px; font-size: .94rem; }
.callout.warn { border-color: var(--orange); background: #fff1eb; }

/* Lab layout */
.lab-head { margin-bottom: 18px; }
.lab-head h1 { color: var(--marine); font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 4px 0 8px; letter-spacing: -.02em; line-height: 1.2; }
.lab-head p { margin: 0; color: var(--muted); max-width: 760px; }
.goals { margin: 14px 0 0; padding-left: 20px; color: var(--ink); font-size: .94rem; }
.lab-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
@media (max-width: 860px) { .lab-grid { grid-template-columns: 1fr; } }
.panel-title { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.ctrl { margin-bottom: 14px; }
.ctrl label, .ctrl .label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 4px; color: var(--marine); }
.ctrl output { font-weight: 700; color: var(--orange-ink); }
.ctrl input[type=range] { width: 100%; accent-color: var(--marine); }
.ctrl select { width: 100%; font: inherit; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.btn { font: inherit; font-size: .88rem; font-weight: 700; border-radius: 8px; padding: 8px 14px; border: 1px solid var(--marine); background: #fff; color: var(--marine); cursor: pointer; }
.btn:hover { background: #eef3f9; }
.btn.primary { background: var(--marine); color: #fff; }
.btn.primary:hover { background: var(--marine-2); }
.btn[aria-pressed="true"] { background: var(--marine); color: #fff; }
.hint { font-size: .84rem; color: var(--muted); margin: 4px 0 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stat .k { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-size: 1.35rem; font-weight: 800; color: var(--marine); }
.task { counter-increment: task; position: relative; padding-left: 34px; margin-bottom: 12px; font-size: .93rem; }
.task::before { content: counter(task); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 800; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.tasks { counter-reset: task; margin-top: 4px; }
details.reflect summary { cursor: pointer; font-weight: 700; color: var(--marine); }
.foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.lab-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
canvas { max-width: 100%; display: block; }

/* Key ideas primer */
.key-ideas { margin: 0 0 16px; border-left: 4px solid var(--teal); }
.key-ideas summary { cursor: pointer; font-weight: 800; color: var(--marine); font-size: 1rem; }
.key-ideas summary span { font-weight: 600; color: var(--muted); font-size: .88rem; }
.key-ideas dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 20px; margin: 14px 0 10px; }
.key-ideas dt { font-weight: 800; color: var(--marine); font-size: .92rem; }
.key-ideas dd { margin: 2px 0 0; font-size: .9rem; color: var(--ink); }
