/* Podcasts as Social Data — IC²S² 2026 tutorial page.
   Self-contained: no webfonts, no external requests, and one small inline
   script for the scroll-spy. Sans-serif chrome over a serif reading column,
   with a colour band at the top and a hue per section. */

:root {
  color-scheme: light dark;

  --paper:       oklch(0.995 0.002 250);
  --paper-sunk:  oklch(0.966 0.006 250);
  --ink:         oklch(0.250 0.020 250);
  --ink-soft:    oklch(0.450 0.018 250);
  --ink-faint:   oklch(0.535 0.016 250);
  --rule:        oklch(0.905 0.008 250);
  --rule-strong: oklch(0.790 0.012 250);

  /* One hue per section, matched in lightness and chroma so they read as a set
     rather than as decoration. */
  --brand:       oklch(0.375 0.090 235);   /* blue  — chrome, agenda, setup */
  --brand-deep:  oklch(0.270 0.075 240);   /* the masthead band */
  --teal:        oklch(0.400 0.078 200);   /* notebooks */
  --green:       oklch(0.400 0.072 158);   /* annotation */
  --plum:        oklch(0.395 0.085 330);   /* background */
  --accent:      oklch(0.510 0.150 38);    /* rust — links, part markers */
  --gold:        oklch(0.795 0.115 72);    /* on the dark band only */
  --th-ink:      #fff;                     /* table header text */

  --brand-wash:  oklch(0.960 0.020 235);
  --teal-wash:   oklch(0.960 0.020 200);
  --green-wash:  oklch(0.960 0.020 158);
  --accent-wash: oklch(0.958 0.026 55);

  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --xs: 0.86rem;
  --sm: 0.95rem;
  --base: 1.08rem;
  --h1: clamp(2rem, 1.6rem + 1.9vw, 3rem);
  --pad: clamp(1.1rem, 0.6rem + 2vw, 2.2rem);
  --wide: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:       oklch(0.180 0.014 250);
    --paper-sunk:  oklch(0.234 0.016 250);
    --ink:         oklch(0.925 0.010 250);
    --ink-soft:    oklch(0.782 0.012 250);
    --ink-faint:   oklch(0.700 0.012 250);
    --rule:        oklch(0.318 0.014 250);
    --rule-strong: oklch(0.440 0.016 250);

    --brand:      oklch(0.720 0.095 235);
    --brand-deep: oklch(0.245 0.048 240);
    --teal:       oklch(0.735 0.080 200);
    --green:      oklch(0.730 0.075 158);
    --plum:       oklch(0.745 0.085 330);
    --accent:     oklch(0.762 0.128 45);
    --gold:       oklch(0.825 0.110 72);
    /* the header fills lighten in dark mode, so their text has to invert */
    --th-ink:     oklch(0.180 0.014 250);

    --brand-wash:  oklch(0.262 0.030 235);
    --teal-wash:   oklch(0.258 0.028 200);
    --green-wash:  oklch(0.256 0.026 158);
    --accent-wash: oklch(0.262 0.034 45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--base);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff;
  padding: .5rem .9rem; z-index: 60;
  font-family: var(--sans); font-size: var(--sm);
}
.skip:focus { left: .5rem; top: .5rem; }

/* ---------------------------------------------------------------- masthead */
/* Outside the layout grid so the band runs the full width. The title block is
   centred; everything below it stays left-aligned for reading. */

.masthead {
  background: var(--brand-deep);
  color: oklch(0.975 0.010 250);
  padding: 3.2rem 0 2.6rem;
  border-bottom: 4px solid var(--accent);
}
.masthead-in {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--pad);
  text-align: center;
}
/* The global reading measure on <p> would otherwise pin these to a narrow box
   on the left and centre the text inside *that*, not inside the band. */
.masthead-in p { max-width: none; margin-inline: auto; }
.eyebrow {
  font-family: var(--sans); font-size: var(--xs);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin: 0 0 .9rem;
}
.masthead h1 {
  font-size: var(--h1); line-height: 1.04; font-weight: 600;
  letter-spacing: -.02em; margin: 0; color: #fff;
  text-wrap: balance;
}
.subtitle {
  font-size: 1.22rem; font-style: italic; line-height: 1.35;
  color: oklch(0.878 0.020 250);
  margin: .6rem auto 0; max-width: 46ch;
}
.byline {
  font-family: var(--sans); font-size: var(--sm); line-height: 1.5;
  color: oklch(0.850 0.018 250);
  margin: 1.6rem auto 0; max-width: 60ch;
  padding-top: 1.2rem;
  border-top: 1px solid oklch(0.400 0.045 240);
}
.byline b { color: #fff; font-weight: 600; }
.venue {
  font-family: var(--sans); font-size: var(--xs);
  letter-spacing: .1em; text-transform: uppercase;
  color: oklch(0.730 0.030 250); margin: .45rem 0 0;
}

/* ------------------------------------------------------------------- shell */

.shell { max-width: var(--wide); margin: 0 auto; padding: 0 var(--pad); }
.col { min-width: 0; padding-bottom: 3.5rem; }

@media (min-width: 60rem) {
  .shell {
    display: grid;
    grid-template-columns: 10.5rem minmax(0, 1fr);
    gap: 0 3.4rem;
    align-items: start;
  }
  .toc { position: sticky; top: 0; padding: 3rem 0 1rem; max-height: 100vh; overflow-y: auto; }
  .toc a { padding-left: .8rem; border-left: 2px solid transparent; }
  .toc a.here { border-left-color: var(--brand); }
}

.toc ol { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: var(--xs); }
.toc a { display: block; padding: .36rem 0; color: var(--ink-faint); border-bottom: none; }
.toc a:hover { color: var(--brand); }
.toc a.here { color: var(--brand); font-weight: 700; }

@media (max-width: 59.99rem) {
  .toc {
    position: sticky; top: 0; z-index: 20;
    background: var(--paper); border-bottom: 2px solid var(--brand);
    margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad);
    overflow-x: auto; scrollbar-width: none;
  }
  .toc::-webkit-scrollbar { display: none; }
  .toc ol { display: flex; gap: 1.1rem; white-space: nowrap; }
  .toc a { padding: .65rem 0; }
  .toc a.here { box-shadow: inset 0 -2px 0 var(--brand); }
}

/* ---------------------------------------------------------------- sections */

section { padding-top: 2.9rem; }

h2 {
  font-family: var(--sans);
  font-size: 1.34rem; font-weight: 700; letter-spacing: -.008em;
  color: var(--brand);
  margin: 0 0 1rem; padding-bottom: .5rem;
  border-bottom: 2px solid currentColor;
}
h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; margin: 1.9rem 0 .6rem; }

p { margin: 0 0 .8rem; max-width: 70ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
.fine { font-size: var(--sm); color: var(--ink-soft); }

/* per-section hue: heading, table header and row tint move together */
#notebooks h2  { color: var(--teal); }
#annotation h2 { color: var(--green); }
#background h2 { color: var(--plum); }
#notebooks th  { background: var(--teal); }
#annotation th { background: var(--green); }
#notebooks tbody tr:hover  { background: var(--teal-wash); }
#annotation tbody tr:hover { background: var(--green-wash); }

/* the optional-extras note reads as an aside, not as body copy */
.note {
  background: var(--green-wash);
  border-left: 4px solid var(--green);
  padding: .9rem 1.15rem;
  border-radius: 0 4px 4px 0;
  color: var(--ink);
  margin: 1.3rem 0 0;
  max-width: 72ch;
  font-size: var(--sm);
}

/* ------------------------------------------------------------------ tables */

.scroller {
  overflow-x: auto;
  margin-inline: calc(-1 * var(--pad));
  padding-inline: var(--pad);
  scrollbar-width: thin;
}

table { width: 100%; min-width: 34rem; border-collapse: collapse;
        font-size: var(--sm); line-height: 1.45; }
th, td { vertical-align: baseline; padding: .46rem .95rem .46rem 0;
         border-bottom: 1px solid var(--rule); }
th {
  text-align: left; font-family: var(--sans); font-size: .74rem;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: var(--th-ink); background: var(--brand);
  padding: .55rem .95rem .55rem .7rem; white-space: nowrap; border-bottom: none;
}
th:first-child { border-radius: 3px 0 0 3px; }
th:last-child  { border-radius: 0 3px 3px 0; padding-right: .7rem; }
tbody tr:nth-child(even) { background: var(--paper-sunk); }
tbody tr:hover { background: var(--brand-wash); }
tbody tr:last-child td { border-bottom: none; }
td:last-child { padding-right: 0; }

.sched .t, .nb .n {
  font-family: var(--sans); font-size: var(--xs);
  font-variant-numeric: tabular-nums; color: var(--ink-faint); white-space: nowrap;
}
.sched .t { width: 3.6rem; padding-left: .7rem; }
.sched .brk td { color: var(--ink-faint); font-style: italic; }
.sched .part td {
  font-family: var(--sans); font-size: var(--xs); letter-spacing: .13em;
  text-transform: uppercase; font-weight: 700; color: var(--accent);
  padding-top: 1.1rem;
}
.sched th.sl, .sched td.sl { width: 3.8rem; text-align: right; white-space: nowrap; }
.sched .sl span { color: var(--rule-strong); }
.nb td:first-child { width: 1.8rem; padding-left: .7rem; padding-right: .6rem; }
.ann td:first-child { padding-left: .7rem; }
.ann .u { color: var(--green); font-family: var(--sans); font-size: var(--xs);
          font-weight: 600; white-space: nowrap; }

.rowname { font-weight: 600; white-space: nowrap; }
.rowname a { border-bottom-color: transparent; }
tr:hover .rowname a { border-bottom-color: var(--accent); }

/* ------------------------------------------------------------------- lists */

.steps { margin: 1.1rem 0 0; padding-left: 1.35rem; max-width: 70ch; font-size: var(--sm); }
.steps li { margin-bottom: .55rem; }
.steps li::marker { color: var(--brand); font-weight: 700; }

.learn { margin: 0; padding: 0; list-style: none; max-width: 72ch; font-size: var(--sm); }
.learn li { padding: .5rem 0 .5rem 1.5rem; border-bottom: 1px solid var(--rule);
            position: relative; line-height: 1.5; }
.learn li:last-child { border-bottom: none; }
.learn li::before {
  content: "\2192"; position: absolute; left: 0; top: .38em;
  color: var(--plum); font-family: var(--sans); font-size: .95em;
}

.links { margin: 0; padding: 0; list-style: none; font-size: var(--sm); }
.links li { display: grid; gap: 0 1.5rem; padding: .5rem 0; border-bottom: 1px solid var(--rule); }
.links li:last-child { border-bottom: none; }
.links a { justify-self: start; font-weight: 600; }
.links span { color: var(--ink-soft); }
.links .nolink { color: var(--ink); font-weight: 600; }
@media (min-width: 40rem) { .links li { grid-template-columns: 12rem 1fr; align-items: baseline; } }

/* -------------------------------------------------------------------- code */

code {
  font-family: var(--mono); font-size: .86em;
  background: var(--paper-sunk); color: var(--accent);
  padding: .06em .32em; border-radius: 3px;
}
pre {
  font-family: var(--mono); font-size: var(--xs); line-height: 1.65;
  background: var(--brand-deep); color: oklch(0.905 0.015 250);
  padding: 1rem 1.15rem; margin: 1.15rem 0 .9rem;
  overflow-x: auto; border-radius: 4px;
  border-left: 4px solid var(--accent);
}
pre code { background: none; padding: 0; font-size: 1em; color: inherit; }
pre .c { color: oklch(0.690 0.035 250); }

/* ------------------------------------------------------------------- links */

a { color: var(--accent); text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 110ms ease-out, color 110ms ease-out; }
a:hover { border-bottom-color: var(--accent); }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 1px; }
.masthead a { color: var(--gold); }
.masthead a:hover { border-bottom-color: var(--gold); }

/* ------------------------------------------------------------------ footer */

footer {
  margin-top: 3rem; padding-top: 1.1rem;
  border-top: 3px solid var(--brand);
  font-size: var(--xs); color: var(--ink-faint);
}
footer p { max-width: 72ch; }

/* ------------------------------------------------------------------- print */

@media print {
  :root {
    --paper: #fff; --paper-sunk: #f4f5f7; --ink: #1a1a1a; --ink-soft: #3f3f3f;
    --ink-faint: #5f5f5f; --rule: #ccc; --rule-strong: #999;
    --brand: #1e3f5c; --brand-deep: #1e3f5c; --accent: #a2502a;
    --teal: #1d4a52; --green: #1f4a34; --plum: #4d2547;
  }
  .toc, .skip { display: none; }
  .shell { display: block; max-width: none; padding: 0; }
  .masthead { padding: 0 0 1rem; border-bottom: 2px solid #1a1a1a;
              background: none; color: #1a1a1a; }
  .masthead h1, .byline b { color: #1a1a1a; }
  .subtitle, .byline, .venue { color: #3f3f3f; }
  .masthead-in { padding: 0; text-align: left; }
  body { font-size: 9.5pt; line-height: 1.38; }
  section { padding-top: 1.2rem; break-inside: avoid; }
  h2 { break-after: avoid; }
  th { background: none !important; color: #1a1a1a; border-bottom: 1.5pt solid #1a1a1a; }
  tbody tr:nth-child(even) { background: none; }
  .scroller { overflow: visible; margin-inline: 0; padding-inline: 0; }
  table { min-width: 0; font-size: 8.5pt; }
  pre { background: #f4f5f7; color: #1a1a1a; border-left: 2pt solid #999; }
  tr, li { break-inside: avoid; }
  a { border-bottom: none; }
  .links a::after { content: " (" attr(href) ")"; font-size: 7.5pt; color: #666; word-break: break-all; }
}
