/* Write Lab v2: editorial one-page design agreed in Paper (24 Nov 2026).
   Cobalt band, numbered kickers, hairline rules, 50/50 splits with a grey form panel on the right. */
:root {
  --blue: #244BE8;
  --blue-soft: #E1E7FF;
  --blue-rule: #718DF2;
  --ink: #181818;
  --muted: #595959;
  --faint: #8B8E96;
  --rule: #D9DCE2;
  --border: #D9DCE2;
  --panel: #F3F4F6;
  --btn-rule: #A9AEB8;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --thai: "IBM Plex Sans Thai Looped", "Inter", system-ui, sans-serif;
  --pad: 56px;
  --max: 1440px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: #fff;
  font-family: var(--thai); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-wrap: anywhere;
}
a { color: var(--blue); }
img { max-width: 100%; display: block; }
.en { font-family: var(--sans); }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.band :focus-visible { outline-color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Masthead ---------- */
.masthead { border-bottom: 1px solid var(--rule); background: #fff; }
.masthead .wrap { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.wordmark { display: inline-flex; align-items: baseline; font-family: var(--sans); letter-spacing: -0.05em; }
.w-write { font-style: italic; font-weight: 300; }
.w-lab { font-weight: 700; }
.brand .wordmark { font-size: 29px; line-height: 38px; }
.brand .vr { width: 1px; height: 26px; background: var(--rule); flex: none; }
.brand .tag { font-size: 14px; line-height: 18px; color: var(--muted); }
.nav { display: flex; gap: 30px; }
.nav a { font-family: var(--sans); font-size: 14px; line-height: 18px; color: var(--ink); text-decoration: none; padding: 6px 0; }
.nav a:hover { color: var(--blue); }

/* ---------- Kickers and headings ---------- */
.kicker { margin: 0; font-family: var(--sans); font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.kicker.plain { font-weight: 400; color: var(--muted); }
.kicker-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.h-xl { margin: 0; font-family: var(--sans); font-size: 48px; line-height: 52px; font-weight: 600; letter-spacing: -0.055em; }
.h-l { margin: 0; font-family: var(--sans); font-size: 42px; line-height: 48px; font-weight: 600; letter-spacing: -0.04em; }
.h-m { margin: 0; font-family: var(--sans); font-size: 36px; line-height: 42px; font-weight: 600; letter-spacing: -0.035em; }
.h-s { margin: 0; font-family: var(--sans); font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.03em; }
.h-th { margin: 0; font-family: var(--thai); font-size: 34px; line-height: 46px; font-weight: 600; }
.h-th.sm { font-size: 30px; line-height: 42px; }
.lede-th { margin: 0; font-size: 19px; line-height: 30px; color: var(--muted); }
.lede-th.ink { font-size: 20px; color: var(--ink); }
.lede-en { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 25px; color: var(--muted); max-width: 470px; }
.note-en { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 24px; color: var(--muted); }
.stack { display: flex; flex-direction: column; }
.g8 { gap: 8px; } .g14 { gap: 14px; } .g16 { gap: 16px; } .g18 { gap: 18px; } .g22 { gap: 22px; } .g26 { gap: 26px; }

/* ---------- Cobalt intro band ---------- */
.band { background: var(--blue); color: #fff; }
.band .wrap { display: grid; grid-template-columns: 580px minmax(0, 1fr); gap: 72px; padding-top: 56px; padding-bottom: 60px; }
.band .kicker { color: #fff; font-weight: 400; }
.band .big { display: flex; align-items: baseline; font-size: 96px; line-height: 104px; margin: 0; }
.band .tag-th { margin: 0; font-size: 24px; line-height: 36px; }
.band .intro { padding-top: 32px; display: flex; flex-direction: column; gap: 24px; }
.band .intro p { margin: 0; }
.band .intro .th { font-size: 20px; line-height: 32px; }
.band .intro .en { font-size: 15px; line-height: 25px; color: var(--blue-soft); }
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 200px)); gap: 32px; border-top: 1px solid var(--blue-rule); padding-top: 20px; }
.formats a { color: #fff; text-decoration: none; display: flex; flex-direction: column; gap: 7px; }
.formats b { font-family: var(--sans); font-size: 21px; line-height: 26px; font-weight: 600; }
.formats span { font-size: 15px; line-height: 24px; }
.formats a:hover b { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 50/50 split sections ---------- */
.split { border-top: 1px solid var(--rule); background: linear-gradient(90deg, #fff 50%, var(--panel) 50%); }
.split.first { border-top: 0; }
.split > .inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; }
.split .left { background: #fff; padding: 48px var(--pad); display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.split .right { background: var(--panel); padding: 44px 64px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.split .left > * { max-width: 608px; }
.split .right > * { max-width: 592px; }

/* Next talk block */
.when { display: flex; align-items: center; gap: 28px; border-top: 1px solid var(--rule); padding-top: 24px; }
.when .big { font-family: var(--sans); font-size: 78px; line-height: 80px; font-weight: 500; letter-spacing: -0.06em; color: #C4C8D0; flex: none; }
.when .big.on { color: var(--ink); }
.when .big small { display: block; font-size: 15px; line-height: 20px; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.when h3 { margin: 0; font-family: var(--sans); font-size: 19px; line-height: 24px; font-weight: 600; }
.when p { margin: 0; font-size: 15px; line-height: 24px; }
.last { border-top: 1px solid var(--rule); padding-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.last .meta { font-family: var(--sans); font-size: 13px; line-height: 16px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.last .title { margin: 0; font-family: var(--sans); font-size: 23px; line-height: 30px; font-weight: 600; }
.last .title a { color: var(--ink); text-decoration: none; }
.last .title a:hover { color: var(--blue); }
.last p { margin: 0; font-size: 16px; line-height: 24px; }

/* Top 5 topics */
.top5 { list-style: none; margin: 0; padding: 0; }
.top5 li { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-top: 1px solid var(--rule); }
.top5 li:last-child { border-bottom: 1px solid var(--rule); }
.top5 .n { width: 30px; flex: none; font-family: var(--sans); font-size: 22px; line-height: 26px; font-weight: 600; letter-spacing: -0.04em; color: var(--blue); }
.top5 .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.top5 .t b { font-weight: 400; font-size: 17px; line-height: 26px; }
.top5 .t span { font-family: var(--sans); font-size: 13px; line-height: 16px; color: var(--muted); }
.top5 .empty { color: var(--muted); }
.me-too {
  flex: none; width: 132px; height: 40px; border-radius: 5px; cursor: pointer;
  font: 600 14px/18px var(--thai); color: var(--ink); background: #fff; border: 1px solid var(--btn-rule);
}
.me-too:hover { border-color: var(--blue); color: var(--blue); }
.me-too[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.me-too:disabled { opacity: .6; cursor: wait; }

/* Definition rows (Writeshop, summary tables) */
.rows { display: flex; flex-direction: column; }
.rows .row { display: flex; gap: 24px; padding: 16px 0; border-top: 1px solid var(--rule); }
.rows .row:last-child { border-bottom: 1px solid var(--rule); }
.rows .k { width: 150px; flex: none; font-family: var(--sans); font-size: 13px; line-height: 22px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; padding-top: 2px; }
.rows .v { flex: 1; min-width: 0; font-size: 16px; line-height: 26px; }
.rows .k.strong { width: 190px; font-size: 16px; line-height: 26px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); padding-top: 0; }
.rows .len { width: 150px; flex: none; text-align: right; font-size: 15px; line-height: 26px; font-weight: 600; color: var(--blue); }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 22px; margin: 0; }
.fields { border-top: 1px solid var(--rule); padding-top: 18px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label, .field .lab { font-size: 14px; line-height: 22px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input[type=text], .field input[type=email], .field textarea {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 5px; background: #fff;
  font: 400 15px/22px var(--thai); color: var(--ink);
}
.field textarea { height: 104px; padding: 13px 14px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 75, 232, .15); }
.hint { font-family: var(--sans); font-size: 12.5px; line-height: 16px; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; border: 1px solid var(--rule); border-radius: 5px; background: #fff; overflow: hidden; margin: 0; padding: 0; }
.seg label { flex: 1; position: relative; font-weight: 400; }
.seg label + label { border-left: 1px solid var(--rule); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; height: 44px; font-size: 14px; line-height: 18px; padding: 0 6px; text-align: center; }
.seg input:checked + span { background: var(--blue); color: #fff; font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: -4px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 21px; color: var(--muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.go {
  width: 100%; height: 56px; padding: 0 20px; border: 0; border-radius: 5px; background: var(--blue); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; font: 600 17px/22px var(--thai); text-align: left;
}
.go:hover { background: #1A3BC4; }
.go:disabled { opacity: .6; cursor: wait; }
.go svg { flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.out:empty { display: none; }
.done { border-left: 3px solid var(--blue); background: #fff; padding: 12px 14px; font-size: 15px; line-height: 24px; }
.err { margin: 0; color: #B3261E; font-size: 14px; line-height: 22px; }

/* ---------- Past sessions ---------- */
.plain-sec { border-top: 1px solid var(--rule); }
.plain-sec > .wrap { padding-top: 48px; padding-bottom: 52px; }
.past { display: grid; grid-template-columns: 520px minmax(0, 1fr); gap: 72px; }
.past-list { list-style: none; margin: 0; padding: 0; }
.past-list li { border-top: 1px solid var(--rule); }
.past-list li:last-child { border-bottom: 1px solid var(--rule); }
.past-list a { display: flex; align-items: center; gap: 32px; padding: 22px 0; color: var(--ink); text-decoration: none; }
.past-list .d { width: 96px; flex: none; font-family: var(--sans); }
.past-list .d b { display: block; font-size: 64px; line-height: 66px; font-weight: 500; letter-spacing: -0.06em; }
.past-list .d span { font-size: 13px; line-height: 18px; color: var(--muted); }
.past-list .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.past-list .t .title { font-family: var(--sans); font-size: 23px; line-height: 30px; font-weight: 600; }
.past-list .t .sub { font-size: 15px; line-height: 24px; }
.past-list .more { display: flex; align-items: center; gap: 8px; color: var(--blue); font-weight: 600; font-size: 15px; flex: none; }
.past-list a:hover .title { color: var(--blue); }

/* ---------- Resources ---------- */
.res { list-style: none; margin: 0; padding: 0; }
.res li { display: flex; align-items: center; gap: 20px; padding: 15px 0; border-top: 1px solid var(--rule); }
.res li:last-child { border-bottom: 1px solid var(--rule); }
.res .s { width: 72px; flex: none; font-family: var(--sans); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; color: var(--blue); }
.res .s.fund { color: var(--ink); }
.res .t { flex: 1; min-width: 0; font-size: 16px; line-height: 24px; }
.res .t span { color: var(--muted); }
.res .st { font-family: var(--sans); font-size: 13px; color: var(--faint); }

/* ---------- Summary page ---------- */
.band.hero .wrap { grid-template-columns: minmax(0, 780px) minmax(0, 1fr); padding-top: 40px; padding-bottom: 52px; }
.crumb { margin: 0; font-family: var(--sans); font-size: 13px; line-height: 16px; letter-spacing: 0.08em; color: var(--blue-soft); }
.crumb a { color: #fff; text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.band.hero h1 { margin: 0; font-family: var(--sans); font-size: 64px; line-height: 68px; font-weight: 600; letter-spacing: -0.05em; }
.band.hero .sub-th { margin: 0; font-size: 22px; line-height: 34px; }
.facts { padding-top: 30px; }
.facts .f { display: flex; gap: 16px; padding: 12px 0; border-top: 1px solid var(--blue-rule); }
.facts .f:last-child { border-bottom: 1px solid var(--blue-rule); }
.facts .k { width: 96px; flex: none; font-family: var(--sans); font-size: 12.5px; line-height: 22px; letter-spacing: 0.08em; color: var(--blue-soft); }
.facts .v { font-size: 16px; line-height: 24px; }
.facts .v small { display: block; font-family: var(--sans); font-size: 13.5px; line-height: 21px; color: var(--blue-soft); }
.sum { border-top: 1px solid var(--rule); }
.sum.grey { background: var(--panel); }
.sum > .wrap { padding-top: 52px; padding-bottom: 52px; display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 72px; }
.sum.halves > .wrap { grid-template-columns: 1fr 1fr; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 18px; padding: 14px 0; border-top: 1px solid var(--rule); font-size: 16px; line-height: 26px; }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps b { width: 28px; flex: none; font-family: var(--sans); font-size: 18px; color: var(--blue); }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 52px; }
.photos figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.photos img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--panel); }
.photos figcaption { font-size: 14px; line-height: 22px; color: var(--muted); }
.closing { border-top: 1px solid var(--rule); background: var(--panel); }
.closing .wrap { padding-top: 36px; padding-bottom: 36px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.btn-line { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px; border: 1.5px solid var(--blue); border-radius: 5px; color: var(--blue); font-weight: 600; text-decoration: none; flex: none; }
.btn-line:hover { background: var(--blue); color: #fff; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--rule); }
.foot .wrap { padding-top: 24px; padding-bottom: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--sans); font-size: 14px; line-height: 18px; color: var(--muted); }
.foot a { text-decoration: none; }

/* ---------- Admin page (shares the masthead) ---------- */
.sec { padding: 32px 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 5px; background: var(--blue); color: #fff; border: 1.5px solid var(--blue); font: 600 15px/20px var(--thai); text-decoration: none; cursor: pointer; }
.btn.ghost { background: #fff; color: var(--blue); }
.btn.small { padding: 6px 10px; font-size: 13px; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1200px) {
  .band .wrap, .band.hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .band .intro, .facts { padding-top: 0; }
  .past, .sum > .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split .right { padding: 44px 40px; }
}
@media (max-width: 960px) {
  :root { --pad: 20px; }
  .masthead .wrap { height: auto; padding-top: 14px; padding-bottom: 12px; flex-wrap: wrap; gap: 8px 20px; }
  .brand .vr, .brand .tag { display: none; }
  .nav { gap: 18px; flex-wrap: wrap; }
  .nav a { font-size: 13.5px; }
  .band .wrap { padding-top: 36px; padding-bottom: 40px; }
  .band .big { font-size: 64px; line-height: 70px; }
  .band .tag-th { font-size: 20px; line-height: 30px; }
  .band .intro .th { font-size: 17px; line-height: 28px; }
  .formats { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .formats a { flex-direction: row; align-items: baseline; gap: 12px; }
  .formats b { font-size: 18px; min-width: 120px; }
  .split { background: #fff; }
  .split > .inner { grid-template-columns: minmax(0, 1fr); }
  .split .left { padding: 32px var(--pad); }
  .split .right { padding: 28px var(--pad) 36px; }
  .split .left > *, .split .right > * { max-width: none; }
  .h-xl { font-size: 36px; line-height: 40px; }
  .h-l { font-size: 32px; line-height: 38px; }
  .h-m { font-size: 28px; line-height: 34px; }
  .h-s { font-size: 24px; line-height: 30px; }
  .h-th { font-size: 26px; line-height: 36px; }
  .h-th.sm { font-size: 24px; line-height: 34px; }
  .lede-th { font-size: 17px; line-height: 28px; }
  .when { gap: 18px; }
  .when .big { font-size: 56px; line-height: 60px; }
  .top5 li { gap: 12px; }
  .top5 .n { width: 24px; font-size: 18px; }
  .top5 .t b { font-size: 15px; line-height: 23px; }
  .me-too { width: 96px; font-size: 13px; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .rows .row { flex-direction: column; gap: 4px; }
  .rows .k, .rows .k.strong, .rows .len { width: auto; text-align: left; }
  .plain-sec > .wrap { padding-top: 32px; padding-bottom: 36px; }
  .past-list a { gap: 16px; }
  .past-list .d { width: auto; }
  .past-list .d b { font-size: 44px; line-height: 48px; }
  .past-list .t .title { font-size: 18px; line-height: 24px; }
  .past-list .more .lbl { display: none; }
  .res li { flex-wrap: wrap; gap: 4px 14px; }
  .res .t { flex-basis: 100%; order: 3; }
  .band.hero h1 { font-size: 40px; line-height: 44px; }
  .band.hero .sub-th { font-size: 18px; line-height: 28px; }
  .sum > .wrap { padding-top: 32px; padding-bottom: 32px; }
  .sum.halves > .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .photos { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-bottom: 32px; }
  .closing .wrap { flex-direction: column; align-items: flex-start; }
  .foot .wrap { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
