:root {
  --paper: #f3f5fa;
  --surface: #ffffff;
  --ink: #161a3a;
  --muted: #5a6080;
  --line: #d9deea;
  --focus: #2f6bff;

  /* One colour per topic. These carry all the colour on the page.
     Each area shares a colour family: violets for AI, reds for security, blues and teals for Azure, warm for workplace. */
  --t-copilot: #7b5cfa;
  --t-copilot-studio: #a855f7;
  --t-agent-365: #d6409f;
  --t-ai-agents: #2f6bff;
  --t-foundry: #5a3cc8;
  --t-microsoft-iq: #b62fd0;
  --t-github-copilot: #4757c9;
  --t-security: #e5484d;
  --t-identity-entra: #a8202f;
  --t-threat-protection: #f2555a;
  --t-compliance-purview: #c2410c;
  --t-azure: #0090d0;
  --t-migration-modernisation: #4cb3e6;
  --t-hybrid-arc: #00618e;
  --t-sql-data: #0f9f8c;
  --t-fabric: #2bb673;
  --t-finops: #c99700;
  --t-devops-github: #3a3f58;
  --t-microsoft-365: #f2660f;
  --t-windows-endpoints: #5b6fa0;
  --t-windows-365-avd: #8494cf;
  --t-business-apps: #3f9b4f;
  --t-partner-smb: #a3582b;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --radius-tile: 14px;
  --radius-ctl: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1028; --surface: #161a3a; --ink: #e8ebf7; --muted: #a0a6c4; --line: #2a2f55; --focus: #8fb0ff;
    --t-devops-github: #9aa3c7; --t-windows-endpoints: #8b9cd0; --t-finops: #e0b220;
    --t-identity-entra: #e5606f; --t-hybrid-arc: #3fa7dc; --t-partner-smb: #d4875a; --t-foundry: #8a6cf0; --t-github-copilot: #7f8cf0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1028; --surface: #161a3a; --ink: #e8ebf7; --muted: #a0a6c4; --line: #2a2f55; --focus: #8fb0ff;
  --t-devops-github: #9aa3c7; --t-windows-endpoints: #8b9cd0; --t-finops: #e0b220;
    --t-identity-entra: #e5606f; --t-hybrid-arc: #3fa7dc; --t-partner-smb: #d4875a; --t-foundry: #8a6cf0; --t-github-copilot: #7f8cf0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--display);
  font-variation-settings: "wdth" 100;
}
body.locked { overflow: hidden; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 50; }

/* ---------- AI notice ---------- */
.ai-banner {
  margin: 0; padding: 9px 16px;
  background: #c4282d; color: #fff;
  text-align: center; font-size: 14px; font-weight: 550; line-height: 1.4;
}

/* ---------- Hero ---------- */
.hero { max-width: 1200px; margin: 0 auto; padding: 24px 24px 8px; }
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.brand { margin: 0; color: var(--muted); font-weight: 500; }
.wordmark {
  margin: 28px 0 0;
  font-weight: 800;
  font-size: clamp(64px, 15vw, 196px);
  line-height: .86;
  letter-spacing: -0.015em;
  font-variation-settings: "wdth" 75, "opsz" 96;
}
.wordmark .org {
  display: block;
  font-size: .22em; font-weight: 600; line-height: 1;
  letter-spacing: 0; margin: 0 0 .12em .04em;
  font-variation-settings: "wdth" 100;
  color: var(--muted);
}
.wordmark .year {
  display: block;
  font-weight: 300;
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  letter-spacing: -0.03em;
}
.lede { max-width: 34ch; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.4; margin: 24px 0 36px; }
@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: auto 1fr; column-gap: 56px; }
  .hero-top, .spectrum, .coverage { grid-column: 1 / -1; }
  .lede { align-self: end; justify-self: end; margin: 0 0 18px; }
  .spectrum { margin-top: 40px; }
}

/* The topic spectrum: one band per area, one segment per topic, width = share of sessions */
.spectrum { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.band { display: grid; grid-template-columns: 150px 1fr; align-items: stretch; gap: 12px; }
.band-name { margin: 0; align-self: center; font-size: 15px; font-weight: 650; color: var(--muted); line-height: 1.2; }
.band-segs { display: flex; flex-wrap: wrap; gap: 4px; }
.seg {
  --c: var(--muted);
  flex: var(--w, 1) 1 0;
  min-width: 104px; min-height: 82px;
  border: 0; padding: 10px 10px 9px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  color: var(--ink);
  border-radius: 10px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  text-align: left; cursor: pointer;
  font: inherit;
  position: relative; overflow: hidden;
  transition: background-color .2s ease, transform .2s ease;
}
.seg::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: var(--c);
  transition: height .25s ease;
}
.seg:hover { background: color-mix(in srgb, var(--c) 26%, transparent); }
.seg[aria-pressed="true"] { color: #fff; }
.seg[aria-pressed="true"]::before { height: 100%; }
.seg > * { position: relative; }
.seg-n { font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; line-height: 1; font-variation-settings: "wdth" 80; }
.seg-name { font-size: 13px; font-weight: 600; line-height: 1.2; margin-bottom: 4px; }
.seg[data-empty] { opacity: .45; }
.spectrum.has-active .seg[aria-pressed="false"] { opacity: .55; }
.coverage { color: var(--muted); margin: 14px 0 0; font-size: 15px; }

/* ---------- Toolbar ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 24px; }
.toolbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 12px 0; background: var(--paper);
}
.search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ctl);
  padding: 0 12px; color: var(--muted);
}
.search:focus-within { border-color: var(--focus); }
.search input { flex: 1; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 12px 0; min-width: 0; }
.search input:focus { outline: none; }
kbd { font: 600 12px var(--display); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-ctl); padding: 10px 12px;
}
.status { display: flex; align-items: center; gap: 16px; min-height: 40px; }
.status p { margin: 0; color: var(--muted); }
.text-btn {
  font: 600 15px var(--display); color: var(--ink); background: none; border: 0; padding: 6px 2px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.text-btn:disabled { opacity: .35; cursor: default; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}

/* ---------- Session tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px 22px; margin-top: 8px; }
.tile {
  display: flex; flex-direction: column; text-align: left; font: inherit; color: inherit;
  background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none;
}
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-tile); overflow: hidden;
  background: var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.tile:hover .thumb img { transform: scale(1.04); }
.thumb .code {
  position: absolute; left: 10px; top: 10px;
  background: rgba(13, 16, 40, .82); color: #fff; font-weight: 700; font-size: 13px;
  padding: 3px 8px; border-radius: 6px;
}
.thumb .yt {
  position: absolute; right: 10px; top: 10px;
  background: #fff; color: #161a3a; font-weight: 600; font-size: 12px;
  padding: 3px 8px; border-radius: 6px;
}
.stripe { display: flex; height: 6px; gap: 3px; margin: 12px 0 10px; }
.stripe i { flex: 1; border-radius: 3px; background: var(--c); }
.tile h3 {
  margin: 0; font-size: 20px; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em;
  font-variation-settings: "wdth" 90;
}
.tile:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tile .who { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.tile .facts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.tile .gist {
  font-family: var(--serif); font-size: 15px; line-height: 1.55; margin: 10px 0 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.empty { text-align: center; padding: 64px 0; color: var(--muted); font-size: 18px; }

/* ---------- Reader ---------- */
.scrim { position: fixed; inset: 0; background: rgba(13, 16, 40, .5); z-index: 20; }
.reader {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 30;
  width: min(760px, 100%);
  background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
  transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s;
  box-shadow: -24px 0 60px rgba(13, 16, 40, .25);
}
.reader.open { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.reader:focus { outline: none; }
.reader-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.reader-nav { display: flex; gap: 16px; }
.reader-scroll { overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.media { position: relative; aspect-ratio: 16 / 9; background: #000; }
.media img, .media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.media .play {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; cursor: pointer;
  background: linear-gradient(transparent 50%, rgba(13, 16, 40, .55));
}
.media .play span {
  display: flex; align-items: center; gap: 10px; background: #fff; color: #161a3a;
  font: 700 16px var(--display); padding: 12px 20px 12px 16px; border-radius: 999px;
}
.reader-head { padding: 4px 32px 8px; }
.r-meta { margin: 0; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.reader-head h2 {
  margin: 8px 0 6px; font-size: clamp(26px, 4vw, 36px); line-height: 1.1; font-weight: 750;
  letter-spacing: -0.02em; font-variation-settings: "wdth" 85;
}
.r-speakers { margin: 0; color: var(--muted); }
.r-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.chip {
  --c: var(--muted);
  font: 600 13px var(--display); border: 0; cursor: pointer;
  padding: 5px 10px 5px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.r-links { display: flex; gap: 20px; margin: 16px 0 0; }
.r-links a { font-weight: 600; text-underline-offset: 3px; }

.notes { padding: 8px 32px 64px; font-family: var(--serif); font-size: 18px; line-height: 1.65; max-width: 70ch; }
.notes h2 {
  font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
  margin: 36px 0 10px; padding-top: 20px; border-top: 1px solid var(--line);
}
.notes ul { padding-left: 1.2em; }
.notes li { margin: 0 0 .5em; }
.notes li::marker { color: var(--muted); }
.notes strong { font-weight: 600; }
.notes a { color: var(--focus); }

/* ---------- Single session page (s/CODE.html) ---------- */
.page-top {
  max-width: 820px; margin: 0 auto; padding: 18px 24px 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px;
}
.page-top a { font-weight: 650; text-underline-offset: 3px; }
.page-top a:first-child { text-decoration: none; }
.page-main { max-width: 820px; margin: 0 auto; padding: 20px 24px 0; }
.page-thumb { display: block; width: 100%; height: auto; border-radius: var(--radius-tile); margin-bottom: 18px; }
.page-main h1 {
  margin: 8px 0 6px; font-size: clamp(30px, 5vw, 46px); line-height: 1.08; font-weight: 750;
  letter-spacing: -0.02em; font-variation-settings: "wdth" 85;
}
.page-main .chip { cursor: default; }
.page-main .notes { padding: 8px 0 32px; }

/* ---------- Footer ---------- */
.foot { max-width: 1200px; margin: 48px auto 0; padding: 24px 24px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot p { margin: 0 0 6px; max-width: 72ch; }
.foot a { color: var(--ink); font-weight: 600; }

@media (max-width: 760px) {
  .hero, main { padding-left: 16px; padding-right: 16px; }
  .foot { padding-left: 16px; padding-right: 16px; }
  .spectrum { gap: 14px; }
  .band { grid-template-columns: 1fr; gap: 6px; }
  .seg { flex: 0 1 calc((100% - 8px) / 3); min-width: 0; min-height: 76px; }
  .wordmark .year { -webkit-text-stroke-width: 1.5px; }
  .toolbar select { flex: 1 1 140px; }
  .reader-head { padding: 4px 20px 8px; }
  .notes { padding: 8px 20px 48px; font-size: 17px; }
  kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; }
}
