/* IJCAI 2026 Tutorial — academic, restrained */
:root {
  --paper: #fbfaf6;
  --paper-2: #f3f0e8;
  --paper-3: #e8e3d5;
  --ink: #1a1814;
  --ink-2: #333029;
  --muted: #6b6458;
  --muted-2: #8a8274;
  --rule: #d6cfbd;
  --rule-soft: #e3ddca;
  --accent: oklch(0.40 0.07 230);
  --accent-soft: oklch(0.93 0.03 230);
  --accent-ink: oklch(0.30 0.08 230);
  --radius: 4px;
  --f-serif: 'Source Serif 4', 'Newsreader', Georgia, serif;
  --f-sans: 'Inter', -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --f-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  --content-w: 1080px;
  --density: 1;
}

[data-theme="dark"] {
  --paper: #14130f;
  --paper-2: #1d1c17;
  --paper-3: #27251e;
  --ink: #f1ece1;
  --ink-2: #d9d3c3;
  --muted: #a49b86;
  --muted-2: #756e62;
  --rule: #3d3930;
  --rule-soft: #2a2822;
  --accent: oklch(0.78 0.09 230);
  --accent-soft: oklch(0.28 0.05 230);
  --accent-ink: oklch(0.86 0.08 230);
}

[data-accent="teal"]   { --accent: oklch(0.40 0.07 230); --accent-soft: oklch(0.93 0.03 230); --accent-ink: oklch(0.30 0.08 230); }
[data-accent="rust"]   { --accent: oklch(0.48 0.10 42);  --accent-soft: oklch(0.93 0.04 42);  --accent-ink: oklch(0.34 0.10 42); }
[data-accent="olive"]  { --accent: oklch(0.44 0.07 120); --accent-soft: oklch(0.93 0.03 120); --accent-ink: oklch(0.32 0.08 120); }
[data-accent="plum"]   { --accent: oklch(0.40 0.09 310); --accent-soft: oklch(0.93 0.04 310); --accent-ink: oklch(0.28 0.09 310); }
[data-accent="ink"]    { --accent: oklch(0.26 0.01 260); --accent-soft: oklch(0.92 0.00 0);   --accent-ink: oklch(0.18 0.01 260); }

[data-theme="dark"][data-accent="teal"]  { --accent: oklch(0.78 0.09 230); --accent-soft: oklch(0.28 0.05 230); --accent-ink: oklch(0.86 0.08 230); }
[data-theme="dark"][data-accent="rust"]  { --accent: oklch(0.78 0.11 42);  --accent-soft: oklch(0.28 0.05 42);  --accent-ink: oklch(0.88 0.10 42); }
[data-theme="dark"][data-accent="olive"] { --accent: oklch(0.78 0.09 120); --accent-soft: oklch(0.28 0.04 120); --accent-ink: oklch(0.86 0.08 120); }
[data-theme="dark"][data-accent="plum"]  { --accent: oklch(0.78 0.10 310); --accent-soft: oklch(0.28 0.04 310); --accent-ink: oklch(0.86 0.09 310); }
[data-theme="dark"][data-accent="ink"]   { --accent: oklch(0.88 0.01 260); --accent-soft: oklch(0.25 0.00 0);   --accent-ink: oklch(0.94 0.00 0); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); }
/* Force backgrounds on containers so host-injected inline body styles don't leak through */
.hero, main, section.block, footer { background: var(--paper); }
body {
  font-family: var(--f-serif);
  font-feature-settings: "liga", "kern";
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

.shell {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 36px;
}

/* --- Top bar --- */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 54px;
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--muted);
}
.topbar-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
}
.topbar-logo .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}
.topbar-logo b { font-family: var(--f-sans); font-weight: 600; font-size: 13px; letter-spacing: 0.01em; }
.topnav { display: flex; gap: 22px; }
.topnav a { color: var(--muted); text-decoration: none; }
.topnav a:hover { color: var(--ink); }

/* --- HERO --- */
.hero {
  padding: calc(80px * var(--density)) 0 calc(56px * var(--density));
  border-bottom: 1px solid var(--rule);
}
.hero-eyebrow {
  font-family: var(--f-sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: flex; gap: 16px; align-items: center;
  margin-bottom: 32px;
  text-transform: uppercase;
}
.hero-eyebrow .bar { flex: 0 0 40px; height: 1px; background: var(--rule); }

.hero h1 {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  text-wrap: balance;
  color: var(--ink);
}
.hero h1 em { font-style: italic; color: var(--accent-ink); font-weight: 400; }

.hero .tagline {
  font-family: var(--f-serif);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
  margin: 0;
  max-width: 66ch;
}

/* Meta row */
.meta-row {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.meta-cell {
  padding: 18px 20px 18px 0;
  border-right: 1px solid var(--rule);
}
.meta-cell:last-child { border-right: 0; padding-right: 0; }
.meta-cell:first-child { padding-left: 0; }
.meta-cell .k {
  font-family: var(--f-sans); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
  font-weight: 500;
}
.meta-cell .v {
  font-family: var(--f-serif); font-weight: 400; font-size: 16px;
  color: var(--ink); line-height: 1.35;
}

/* --- Section frame --- */
section.block { padding: calc(72px * var(--density)) 0; border-bottom: 1px solid var(--rule); }
section.block:last-child { border-bottom: 0; }

.block-head {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  margin-bottom: 40px;
  align-items: baseline;
}
.block-num {
  font-family: var(--f-sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
}
.block-title {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
.block-title em { font-style: italic; color: var(--accent-ink); font-weight: 400; }
.block-kicker {
  font-family: var(--f-serif);
  font-size: 17px;
  color: var(--muted);
  margin: 14px 0 0;
  max-width: 62ch;
  text-wrap: pretty;
  line-height: 1.5;
}

/* --- Abstract --- */
.abstract {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  align-items: baseline;
}
.abstract .label {
  font-family: var(--f-sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
}
.abstract .body { max-width: 66ch; }
.abstract p {
  font-family: var(--f-serif);
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 18px;
  color: var(--ink-2);
  text-wrap: pretty;
}
.abstract p em { color: var(--accent-ink); font-style: italic; }

/* Overview / stats */
.overview {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.ov-item .n {
  font-family: var(--f-serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 6px;
}
.ov-item .l {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* --- Two column --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.list-clean { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.list-clean li {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: baseline;
}
.list-clean li:last-child { border-bottom: 0; }
.list-clean li > span {
  font-family: var(--f-serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.list-clean li::before {
  content: counter(step, decimal-leading-zero);
  counter-increment: step;
  font-family: var(--f-sans);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-weight: 500;
}

.aud-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.aud-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 20px;
  background: var(--paper);
}
.aud-card .tag {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 6px;
  font-weight: 600;
}
.aud-card p { margin: 0; font-family: var(--f-serif); font-size: 16px; line-height: 1.5; color: var(--ink-2); }

.subhead {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 16px;
  font-weight: 600;
}

/* --- Schedule --- */
.schedule {
  border-top: 1px solid var(--ink);
}
.sch-row {
  display: grid;
  grid-template-columns: 90px 80px 1fr 120px 32px;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
  cursor: pointer;
  transition: background 0.15s ease;
}
.sch-row:hover { background: var(--paper-2); }
.sch-row.is-break { cursor: default; opacity: 0.6; font-style: italic; }
.sch-row.is-break:hover { background: transparent; }

.sch-num {
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--muted);
  padding-top: 6px;
  font-weight: 500;
}
.sch-dur {
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--ink-2);
  padding-top: 6px;
}
.sch-title {
  font-family: var(--f-serif);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0;
  font-weight: 400;
}
.sch-blurb {
  font-family: var(--f-serif);
  font-size: 16px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.5;
  max-width: 62ch;
}
.sch-speaker {
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--ink-2);
  padding-top: 7px;
  text-align: right;
}
.sch-caret {
  font-family: var(--f-sans);
  font-size: 14px;
  color: var(--muted);
  padding-top: 6px;
  text-align: right;
  transition: transform 0.2s ease;
}
.sch-row.open .sch-caret { transform: rotate(45deg); color: var(--accent-ink); }

.sch-detail {
  grid-column: 2 / 5;
  padding: 6px 0 6px;
  display: none;
}
.sch-row.open .sch-detail { display: block; }
.sch-detail ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-family: var(--f-serif);
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.55;
}
.sch-detail ul li { margin-bottom: 6px; }
.sch-detail ul li::marker { color: var(--muted); }

/* --- Presenter cards --- */
.people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.person {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: var(--paper);
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  align-items: start;
}
.avatar {
  width: 110px; height: 130px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  border-radius: 4px;
  display: grid; place-items: center;
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: 20px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.person h4 {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: 19px;
  margin: 0 0 3px;
  letter-spacing: -0.01em;
}
.person .aff {
  font-family: var(--f-sans);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}
.person .bio {
  font-family: var(--f-serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 12px;
}
.person .links {
  font-family: var(--f-sans);
  font-size: 12px;
  display: flex; gap: 16px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}
.person .links a { text-decoration: none; color: var(--accent-ink); }
.person .links a:hover { text-decoration: underline; }

/* --- References --- */
.ref-filter {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.ref-chip {
  font-family: var(--f-sans);
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ref-chip:hover { color: var(--ink); border-color: var(--muted); }
.ref-chip.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.ref-list { border-top: 1px solid var(--ink); }
.ref-item {
  display: grid;
  grid-template-columns: 110px 1fr 140px;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.ref-item .ref-topic {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 500;
}
.ref-item .ref-title {
  font-family: var(--f-serif);
  font-size: 16px;
  color: var(--ink);
  line-height: 1.35;
  margin: 0;
  font-weight: 400;
}
.ref-item .ref-cite {
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.ref-item .ref-venue {
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  font-style: italic;
}

/* --- History --- */
.history {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 4px;
}
.hist-item {
  border-left: 1px solid var(--rule);
  padding: 12px 24px 12px 22px;
  position: relative;
}
.hist-item::before {
  content: "";
  position: absolute;
  left: -4px; top: 18px;
  width: 7px; height: 7px;
  background: var(--paper);
  border: 1px solid var(--muted);
  border-radius: 50%;
}
.hist-item:first-child { border-left: 0; padding-left: 0; }
.hist-item:first-child::before { display: none; }
.hist-item .y {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 500;
}
.hist-item h5 {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: 18px;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.hist-item p {
  font-family: var(--f-serif);
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.hist-item a {
  font-family: var(--f-sans);
  font-size: 12px;
  display: inline-block;
  margin-top: 8px;
  text-decoration: none;
  color: var(--accent-ink);
}
.hist-item a:hover { text-decoration: underline; }
.hist-item.current::before {
  background: var(--accent);
  border-color: var(--accent);
  width: 9px; height: 9px;
  left: -5px; top: 17px;
}

/* --- Ethics --- */
.ethics {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  border-radius: var(--radius);
  padding: 24px 28px;
  border-left: 3px solid var(--accent);
  max-width: 760px;
}
.ethics p {
  font-family: var(--f-serif);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 14px;
  color: var(--ink-2);
}
.ethics p em { color: var(--accent-ink); font-style: italic; }
.ethics p:last-child { margin-bottom: 0; }

/* --- Footer --- */
footer {
  padding: 40px 0 48px;
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
}
footer .foot-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
}
footer .foot-title {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.005em;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 8px;
}
footer .foot-sub {
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--muted);
}
footer .foot-col .t {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
  font-weight: 600;
}
footer .foot-col a, footer .foot-col div {
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
}
footer .foot-col a:hover { color: var(--ink); }
footer .foot-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 16px;
}

/* --- Tweaks panel --- */
.tweaks {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 280px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  font-family: var(--f-sans);
  z-index: 100;
  display: none;
}
.tweaks.open { display: block; }
.tweaks-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
}
.tweaks-body { padding: 14px 16px 16px; display: grid; gap: 14px; }
.tw-row { display: grid; gap: 8px; }
.tw-row .tw-label {
  font-family: var(--f-sans);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.tw-swatches { display: flex; gap: 6px; }
.tw-sw {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  outline: 1px solid var(--rule);
}
.tw-sw.active { border-color: var(--paper); outline: 1.5px solid var(--ink); }
.tw-seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.tw-seg button {
  padding: 7px 10px;
  font-family: var(--f-sans);
  font-size: 11px;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-right: 1px solid var(--rule);
  cursor: pointer;
}
.tw-seg button:last-child { border-right: 0; }
.tw-seg button.active { background: var(--ink); color: var(--paper); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .meta-row { grid-template-columns: repeat(2, 1fr); }
  .meta-cell:nth-child(2) { border-right: 0; }
  .meta-cell:nth-child(1), .meta-cell:nth-child(2) { border-bottom: 1px solid var(--rule); }
  .meta-cell:nth-child(3) { padding-left: 0; }
  .block-head, .abstract { grid-template-columns: 1fr; gap: 20px; }
  .two-col { grid-template-columns: 1fr; gap: 44px; }
  .people { grid-template-columns: 1fr; }
  .overview { grid-template-columns: repeat(2, 1fr); }
  .sch-row { grid-template-columns: 70px 1fr 32px; gap: 16px; }
  .sch-dur, .sch-speaker { grid-column: 2; text-align: left; padding-top: 0; }
  .sch-dur { font-size: 11px; color: var(--muted); margin-top: 4px; }
  .sch-speaker { margin-top: 2px; font-size: 12px; }
  .sch-detail { grid-column: 2 / 4; }
  .ref-item { grid-template-columns: 1fr; gap: 4px; }
  .ref-item .ref-venue { text-align: left; }
  .history { grid-template-columns: 1fr; }
  .hist-item { border-left: 1px solid var(--rule); padding: 12px 0 12px 22px; }
  .hist-item:first-child { border-left: 1px solid var(--rule); padding-left: 22px; }
  .hist-item:first-child::before { display: block; }
  footer .foot-top { grid-template-columns: 1fr 1fr; }
  .shell { padding: 0 24px; }
}

[data-density="compact"] { --density: 0.75; }
[data-density="spacious"] { --density: 1.2; }
