:root {
  --ink: #2b1a10;
  --muted: #6e5c50;
  --paper: #fffdfa;
  --line: #e8ddcf;
  --gold: #b97a1f;
  --gold-soft: #e3a44f;
  --rust: #a84c15;
  --espresso: #33200f;
  --cream-on-dark: #f6ecdf;
  --error: #b3261e;
  --sans: 'IBM Plex Sans Thai', system-ui, sans-serif;
  --display: 'Montserrat', 'IBM Plex Sans Thai', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, fieldset { margin: 0; padding: 0; border: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.topbar { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; }
.brand { display: block; }
.brand img { width: auto; height: 42px; }
.topbar-cta { font-weight: 500; font-size: 15px; text-underline-offset: 4px; }

.button {
  display: inline-block;
  padding: 13px 34px;
  border: 0;
  border-radius: 4px;
  background: var(--rust);
  color: #fff;
  font: 500 17px/1.4 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.button:hover { background: #8e3f10; }
.button:disabled { opacity: .6; cursor: progress; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  padding-top: 24px;
}
.hero-copy { padding-bottom: 72px; }
.eyebrow { color: var(--rust); font-weight: 500; font-size: 15px; margin-bottom: 18px; }
h1 { font: 800 clamp(40px, 6.2vw, 72px)/1.05 var(--display); letter-spacing: -.02em; text-transform: uppercase; }
h1 span, h1 em { display: block; }
h1 em { font-style: normal; font-size: .5em; line-height: 1.3; color: var(--gold); letter-spacing: 0; }
.lede { font-size: clamp(22px, 2.6vw, 28px); font-weight: 500; line-height: 1.45; margin-top: 22px; }
.audience { color: var(--muted); margin-top: 6px; }
.facts { margin-top: 34px; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 76px 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.hero-price { color: var(--muted); }
.hero-price strong { color: var(--ink); font-weight: 600; }
.hero-photo { width: 100%; max-height: 720px; object-fit: contain; object-position: bottom; mix-blend-mode: multiply; }

/* Statement */
.statement { background: var(--espresso); color: var(--cream-on-dark); padding: 72px 0; }
.statement-lead { max-width: 34em; opacity: .8; }
.statement-main { margin-top: 14px; max-width: 18em; font-size: clamp(27px, 4vw, 42px); font-weight: 500; line-height: 1.35; }
.statement-main u { color: var(--gold-soft); text-decoration-thickness: 2px; text-underline-offset: 7px; }

/* Sections */
.section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; }
h2 { font-size: 24px; font-weight: 600; line-height: 1.4; }

.topics { counter-reset: topic; }
.topics li {
  counter-increment: topic;
  display: grid;
  grid-template-columns: 44px 1fr;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}
.topics li:first-child { padding-top: 0; }
.topics li:last-child { border-bottom: 0; padding-bottom: 0; }
.topics li::before { content: counter(topic); color: var(--gold); font: 700 16px/1.9 var(--display); }

.takeaways li { padding: 13px 0; border-bottom: 1px solid var(--line); }
.takeaways li:first-child { padding-top: 0; }
.takeaways li:last-child { border-bottom: 0; padding-bottom: 0; }
.takeaways strong { display: block; font-size: 18px; font-weight: 600; }
.takeaways span { color: var(--muted); }

.speaker-name { font-size: 24px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.speaker-lead { font-size: 18px; }
.speaker-lead strong { font-weight: 600; }
.timeline { margin: 22px 0; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; padding: 7px 0; }
.timeline b { color: var(--gold); font-weight: 600; }
.speaker-note { color: var(--muted); font-size: 15.5px; }

.price-table { width: 100%; min-width: 0; border-collapse: collapse; background: none; table-layout: fixed; }
.price-table th, .price-table td { padding: 12px 12px 12px 0; background: none; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: normal; }
.price-table thead th { font-size: 15px; font-weight: 500; color: var(--muted); padding-top: 0; }
.price-table thead td { padding-top: 0; }
.price-table small { font-size: 13.5px; font-weight: 400; }
.price-table tbody th { font-size: 16px; font-weight: 500; }
.price-table tbody th small { display: block; color: var(--muted); }
.price-table tbody td { font: 700 clamp(25px, 4vw, 36px)/1.25 var(--display); letter-spacing: -.01em; }
.price-table .is-early td { color: var(--rust); }
.price-terms { margin-top: 14px; color: var(--muted); font-size: 15px; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child summary { padding-top: 0; }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold); font-size: 22px; line-height: 1.2; }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding-bottom: 18px; color: var(--muted); max-width: 40em; }

/* Register */
.register { background: var(--espresso); color: var(--cream-on-dark); padding: 72px 0; scroll-margin-top: 0; }
.register h2 { font-size: 32px; margin-bottom: 14px; }
.register-seats { margin-top: 14px; color: var(--gold-soft); font-weight: 500; }
.register-line { margin-top: 26px; font-size: 15.5px; }
.qr { width: 120px; margin-top: 12px; border-radius: 6px; }
.register-panel { background: var(--paper); color: var(--ink); border-radius: 8px; padding: 32px; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #f2e9dd; border-radius: 6px; margin-bottom: 24px; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 9px 6px; border-radius: 4px; text-align: center; font-weight: 500; font-size: 16px; color: var(--muted); }
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(51 32 15 / .12); }
.segmented input:focus-visible + span { outline: 2px solid var(--rust); outline-offset: 1px; }

.field { margin-bottom: 18px; }
.field label, .field legend { display: block; font-weight: 500; font-size: 15.5px; margin-bottom: 5px; }
.field small, .check small { color: var(--muted); font-weight: 400; }
input:not([type=radio], [type=checkbox]), select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cfc2b2;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.4 var(--sans);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rust); outline-offset: 0; border-color: transparent; }
[aria-invalid=true] { border-color: var(--error) !important; }
.error { color: var(--error); font-size: 14.5px; }
.error:not(:empty) { margin-top: 4px; }
.attendance { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.attendance legend { width: 100%; }
.choice { display: inline-flex !important; align-items: center; gap: 8px; font-weight: 400 !important; cursor: pointer; }
.choice input, .check input { accent-color: var(--rust); width: 18px; height: 18px; flex: none; }
.price-summary { margin: -2px 0 20px; padding: 10px 14px; background: #f8efe2; border-radius: 4px; font-weight: 500; }
.honeypot { position: absolute; left: -9999px; }
.check { display: flex; gap: 10px; font-size: 15px; line-height: 1.55; margin-top: 12px; cursor: pointer; }
.check input { margin-top: 3px; }
#register-form .button { width: 100%; margin-top: 22px; }
.form-error { color: var(--error); font-size: 15px; }
.form-error:not(:empty) { margin-top: 10px; }
.success h3 { font-size: 24px; font-weight: 600; }
.success p { margin: 8px 0 22px; }
.success:focus { outline: 0; }
.closed { font-weight: 500; }
.company-receipt { margin: -6px 0 18px; }
.company-fields { margin-bottom: 18px; padding-left: 14px; border-left: 2px solid var(--line); }
.company-hint { margin-bottom: 14px; color: var(--muted); font-size: 14.5px; }
.payment { margin-bottom: 22px; padding: 18px; background: #f8efe2; border-radius: 6px; }
.payment-amount { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-weight: 500; }
.payment-amount strong { font: 700 28px/1.3 var(--display); color: var(--rust); }
.payment dl > div { padding: 8px 0; border-top: 1px solid #e6d7c2; }
.payment dt { color: var(--muted); font-size: 14.5px; }
.payment dd { font-weight: 500; }
.account-number { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 19px; }
.payment-wht { margin: 8px 0 0 !important; padding-top: 12px; border-top: 1px solid #e6d7c2; font-size: 14.5px; line-height: 1.6; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 26px 0; color: var(--muted); font-size: 14.5px; }

.sticky-cta { display: none; }

/* Privacy */
.prose { max-width: 680px; padding: 20px 0 72px; }
.prose h1 { font: 600 32px/1.4 var(--sans); text-transform: none; letter-spacing: 0; margin-bottom: 18px; }
.prose h2 { font-size: 19px; margin: 28px 0 6px; }
.prose p + p { margin-top: 8px; }
.prose-back { margin-top: 36px !important; }

/* Admin */
.admin { font-size: 15px; background: #fbf8f3; }
.admin-login { width: min(360px, 100% - 40px); margin: 14vh auto 0; }
.admin-login h1, .admin-head h1 { font: 600 24px/1.4 var(--sans); text-transform: none; letter-spacing: 0; margin-bottom: 18px; }
.admin-head { padding: 24px 20px 12px; }
.admin-head h1 { margin-bottom: 2px; }
.admin-summary { color: var(--muted); }
.admin-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.admin-tools input, .admin-tools select { width: auto !important; flex: 0 1 240px; padding: 8px 10px !important; font-size: 15px !important; }
.button-quiet { padding: 8px 14px; border: 1px solid #cfc2b2; border-radius: 4px; background: #fff; color: var(--ink); font: 500 14.5px var(--sans); cursor: pointer; }
.table-wrap { overflow-x: auto; padding: 0 20px 40px; }
table { border-collapse: collapse; width: 100%; min-width: 1120px; background: #fff; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; line-height: 1.5; }
th { font-weight: 600; white-space: nowrap; background: #f5eee4; }
td select, td textarea { padding: 6px 8px !important; font-size: 14px !important; min-width: 120px; }
td textarea { min-width: 170px; }
.admin-empty { padding: 20px; color: var(--muted); }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .brand img { height: 34px; }
  .hero { grid-template-columns: 1fr; gap: 0; padding-top: 8px; }
  .hero-copy { padding-bottom: 28px; }
  .hero-photo { width: min(330px, 86%); margin-inline: auto; }
  .split { grid-template-columns: 1fr; gap: 22px; }
  .section { padding: 46px 0; }
  .statement, .register { padding: 54px 0; }
  .register-panel { padding: 22px 18px; }
  .qr { display: none; }
  .register-line { margin-bottom: 24px; }
  .footer { padding-bottom: 86px; }
  .sticky-cta {
    display: block;
    position: fixed;
    inset: auto 16px 14px;
    z-index: 5;
    padding: 12px;
    border-radius: 4px;
    background: var(--rust);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 6px 18px rgb(51 32 15 / .28);
    transition: opacity .15s, transform .15s;
  }
  .sticky-cta.is-away { opacity: 0; transform: translateY(8px); pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
