/* TWES Business Matching – public prototype styles.
   Poster field (mustard + wordmark + light display type on an olive band) turning into a white
   ledger (coral labels in the left column). Square corners; circles only as process dots. */

@font-face {
  font-family: "FH Lecturis";
  src: url("assets/fonts/FHLecturis-Light.otf") format("opentype");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "FH Lecturis";
  src: url("assets/fonts/FHLecturis-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "FH Lecturis";
  src: url("assets/fonts/FHLecturis-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Anuphan";
  src: url("assets/fonts/Anuphan-Thai-Variable.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}

:root {
  --yellow: #E9B851;
  --ink: #231F20;
  --paper: #FFFFFF;
  --olive: #8E8A49;
  --coral: #D9644A;
  --line: rgba(35, 31, 32, 0.2);
  --muted: #5E5A55;
  --error: #B3261E;
  --tint: #FBF3E1;
  --font: "FH Lecturis", "Anuphan", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(16px, 3.5vw, 80px);
  --display: clamp(2.5rem, 5.4vw, 8.5rem);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.4;
  overflow-x: clip;
}
:lang(th) body {
  line-height: 1.65;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
img {
  max-width: 100%;
  height: auto;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.muted {
  color: var(--muted);
}

/* ---------- Yellow field ---------- */
.yellow-field {
  background: var(--yellow);
  padding: 24px var(--pad) 56px;
}
.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.brand-logo {
  display: block;
  width: clamp(110px, 10vw, 180px);
}
.landing .brand-logo {
  position: relative;
  z-index: 2;
  width: var(--logo);
}
.header-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px 20px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.header-links a {
  text-decoration: underline;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lang-toggle button {
  min-width: 28px;
  min-height: 28px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  letter-spacing: 0.04em;
}
.lang-toggle button[aria-pressed="true"] {
  font-weight: 700;
  text-decoration: underline;
}

.masthead {
  margin-top: 20px;
}
.landing .masthead {
  margin-top: calc(var(--display) * -0.3);
}
.display {
  margin: 0;
  font-size: var(--display);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.display span {
  background: var(--olive);
  padding: 0.04em 0.12em 0.08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.landing {
  --display: clamp(2.5rem, 5vw, 8.5rem);
  --logo: clamp(150px, 17vw, 330px);
}
.landing .display {
  padding-left: calc(var(--logo) * 0.62);
}
:lang(th) .display {
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: none;
}
:lang(th) .display span {
  padding: 0.12em 0.14em 0.06em;
}
.lead {
  max-width: 34ch;
  margin: 36px 0 32px;
  color: var(--paper);
  font-size: clamp(1.5rem, 2.2vw, 2.6rem);
  line-height: 1.15;
}
:lang(th) .lead {
  line-height: 1.4;
}
.field-note {
  margin: 0 0 20px;
  font-size: 15px;
}

/* Landing info row */
.info-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px 40px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}
.agenda {
  margin: 0;
  font-size: clamp(20px, 1.6vw, 30px);
  line-height: 1.25;
}
.qr-intro {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  font-size: clamp(20px, 1.6vw, 30px);
  line-height: 1.22;
}
.qr-intro img {
  width: clamp(110px, 8vw, 160px);
  flex: 0 0 auto;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin: 36px 0 52px;
}

/* ---------- Buttons ---------- */
.split-button {
  display: inline-flex;
  align-items: stretch;
  min-height: 48px;
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  transition: background-color 140ms, color 140ms;
}
.split-button .button-label {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  white-space: nowrap;
}
.split-button .button-arrow {
  display: grid;
  place-items: center;
  min-width: 48px;
  border-left: 1px solid currentColor;
  font-size: 22px;
}
.split-button:hover,
.split-button:focus-visible {
  background: var(--ink);
  color: var(--paper);
}
.split-button.primary {
  background: var(--ink);
  color: var(--paper);
}
.split-button.primary:hover .button-arrow,
.split-button.primary:focus-visible .button-arrow {
  background: var(--paper);
  color: var(--ink);
}
.split-button:disabled,
.split-button[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}
.split-button:disabled:hover {
  background: var(--paper);
  color: var(--ink);
}
.split-button.primary:disabled:hover {
  background: var(--ink);
  color: var(--paper);
}
.split-button.primary:disabled:hover .button-arrow {
  background: transparent;
  color: var(--paper);
}
.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.eyebrow,
.section-label,
.field-label,
.group-title,
.process-title {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
:lang(th) .eyebrow,
:lang(th) .section-label,
:lang(th) .field-label,
:lang(th) .group-title,
:lang(th) .process-title {
  font-size: 13px;
  letter-spacing: 0;
}
.subheading {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 700;
}

/* ---------- Process line (landing steps, form progress, status tracker) ---------- */
.process {
  --steps: 7;
  --dot: 10px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--steps), minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.process::before {
  content: "";
  position: absolute;
  top: calc(var(--title-h, 34px) + var(--dot) / 2);
  left: calc(var(--dot) / 2);
  right: calc(100% / var(--steps) - var(--dot) / 2);
  height: 1px;
  background: var(--paper);
}
.process li {
  position: relative;
  min-width: 0;
  padding-right: 14px;
}
.process-title {
  display: flex;
  align-items: flex-end;
  min-height: var(--title-h, 34px);
  padding-bottom: 0;
}
.process-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: var(--dot);
  height: var(--dot);
  margin: 0;
  border-radius: 50%;
  background: var(--paper);
}
.process-desc {
  display: block;
  max-width: 22ch;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.25;
}
.process a {
  text-decoration: none;
}
.process .is-done .process-dot {
  background: var(--ink);
}
.process [aria-current="step"] .process-dot {
  width: 14px;
  height: 14px;
  margin: -2px 0 -2px -2px;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--paper);
}
.process [aria-current="step"] .process-title {
  font-weight: 700;
}
.process.compact {
  --title-h: 26px;
  margin-top: 28px;
}

/* ---------- White ledger ---------- */
.ledger {
  padding: 56px var(--pad);
}
.ledger-section {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px clamp(16px, 2vw, 40px);
  padding: 0 0 56px;
}
.ledger-section + .ledger-section {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.section-label {
  grid-column: span 2;
  margin: 0;
  padding-top: 4px;
  color: var(--coral);
}
.ledger-content {
  grid-column: span 10;
  min-width: 0;
}
/* A floated legend is not the fieldset's "rendered legend", so it becomes a normal grid item. */
.ledger-section > legend.section-label {
  float: left;
}
.prose {
  max-width: 68ch;
}
.prose p,
.prose ul {
  margin: 0 0 14px;
}
.prose ul {
  padding-left: 20px;
}
.placeholder {
  border-bottom: 1px dashed var(--ink);
  background: var(--tint);
  padding: 0 3px;
}
.notice {
  margin: 0 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--ink);
}
.notice h2,
.notice h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.notice p {
  margin: 0 0 12px;
}
.notice.quiet {
  border-color: var(--line);
}
.consent-line {
  margin: 0 0 24px;
  font-size: 15px;
}

/* Who can join – three role columns sharing row lines (subgrid) */
.compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(6, auto);
  column-gap: clamp(16px, 2vw, 40px);
}
.compare-col {
  display: grid;
  grid-row: span 6;
  grid-template-rows: subgrid;
}
.compare-col h3 {
  margin: 0;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--ink);
  font-size: 20px;
}
.compare-col dl {
  display: contents;
}
.compare-col dl > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.compare-col dt {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.compare-col dd {
  margin: 0;
}
.compare-col .compare-action {
  padding-top: 18px;
  border: 0;
}

/* Participating sellers */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 26px;
}
.filter-button {
  padding: 4px 0 2px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  font-size: 14px;
}
.filter-button[aria-pressed="true"] {
  border-color: var(--ink);
  font-weight: 700;
}
.seller-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.seller-item {
  min-height: 108px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.seller-name {
  display: block;
  font-weight: 700;
  line-height: 1.02;
  text-transform: uppercase;
}
.seller-meta {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}
.empty-state {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

/* Footer + prototype strip */
.site-footer {
  padding: 30px var(--pad);
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.site-footer p {
  margin: 0 0 6px;
}
.prototype-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 10px var(--pad);
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.03em;
}
.prototype-strip a {
  color: var(--paper);
}
.strip-title {
  font-weight: 700;
  text-transform: uppercase;
}

/* ---------- Forms ---------- */
fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
legend {
  padding: 0;
}
.form-title {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 700;
}
.fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px clamp(16px, 2vw, 40px);
}
.field {
  position: relative;
  min-width: 0;
}
.field.full {
  grid-column: 1 / -1;
}
.field-label {
  display: block;
  margin-bottom: 6px;
}
.field-label .optional,
.field-label .req {
  text-transform: none;
  letter-spacing: 0;
}
.field-label .optional {
  color: var(--muted);
}
.helper {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
.text-input,
.select-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-size: 18px;
}
.select-input {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23231F20' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
}
.text-input:focus,
.select-input:focus {
  outline: 0;
  border-bottom-width: 2px;
}
.text-input[aria-invalid="true"],
.select-input[aria-invalid="true"] {
  border-color: var(--error);
}
.on-yellow .text-input {
  border-color: var(--ink);
}
.error-message {
  display: block;
  color: var(--error);
  font-size: 13px;
}
.error-message:not(:empty) {
  margin: 6px 0 4px;
}
.error-summary {
  margin: 0 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--ink);
  border-left: 4px solid var(--error);
}
.error-summary h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.error-summary ul {
  margin: 0;
  padding-left: 20px;
}
.form-block {
  margin-top: 28px;
}
.form-block:first-child {
  margin-top: 0;
}
.sub-legend .muted {
  text-transform: none;
  letter-spacing: 0;
}
.venue-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
}
.venue-title.form-block {
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.venue-note {
  margin: 0 0 16px;
  color: var(--muted);
}
.sub-legend {
  display: block;
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
:lang(th) .sub-legend {
  font-size: 13px;
  letter-spacing: 0;
}
.reveal-panel {
  margin-top: 24px;
  padding: 22px 0 0;
  border-top: 1px solid var(--ink);
}
.reveal-panel h3 {
  margin: 0 0 18px;
  font-size: 18px;
}

/* Choice cells: visually hidden input + styled label */
.choice-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 8px;
}
.choice-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  transition: background-color 140ms, color 140ms, opacity 140ms;
}
/* Cells in a grid share the row height; standalone checkboxes keep their own height. */
.choice-grid > div > .choice-label,
.date-grid > div > .choice-label,
.session-grid > div > .choice-label,
.round-grid > div > .choice-label,
.block-matrix > div > .choice-label {
  height: 100%;
}
.choice-input:checked + .choice-label {
  background: var(--ink);
  color: var(--paper);
}
.choice-input:focus-visible + .choice-label {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.choice-input:disabled + .choice-label {
  opacity: 0.35;
  cursor: not-allowed;
}
.choice-label small {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  opacity: 0.85;
}
.choice-label.stacked {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}
.type-cells .choice-label {
  min-height: 96px;
  padding: 16px 18px;
}
.type-cells strong {
  font-size: 22px;
}
.check-label {
  align-items: flex-start;
}
.check-label::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid currentColor;
}
.choice-input:checked + .check-label::before {
  background: var(--paper);
  box-shadow: inset 0 0 0 3px var(--ink);
}
.check-stack {
  display: grid;
  gap: 10px;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.date-label {
  min-height: 80px;
  font-size: 20px;
}
.date-label small {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.session-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.session-label {
  min-height: 74px;
}
.session-label strong {
  font-size: 18px;
}
.inline-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Seller rounds: two sessions on a rail each */
.round-sessions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}
.round-session .group-title {
  margin: 0 0 12px;
}
.round-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
}
.round-grid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ink);
}
.round-cell {
  position: relative;
}
.round-cell::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}
.round-label {
  min-height: 74px;
}
.round-label strong {
  font-size: 15px;
}
.selection-count {
  margin: 18px 0 0;
  font-weight: 700;
}

/* Buyer matching block matrix */
.block-matrix {
  display: grid;
  grid-template-columns: minmax(140px, 220px) repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.matrix-heading {
  padding: 6px 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.matrix-date {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  font-weight: 700;
}
.block-label {
  justify-content: center;
  min-height: 64px;
  font-weight: 700;
}

/* File attach */
.file-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.file-input:focus-visible + .split-button {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.file-name {
  color: var(--muted);
  font-size: 14px;
}

/* Review list + next steps */
.review-list {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  margin: 0 0 28px;
  border-top: 1px solid var(--line);
}
.review-list dt,
.review-list dd {
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.review-list dt {
  color: var(--muted);
}
.next-list {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  counter-reset: next;
}
.next-list li {
  position: relative;
  padding: 13px 0 13px 40px;
  border-top: 1px solid var(--line);
  counter-increment: next;
}
.next-list li::before {
  content: counter(next, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--coral);
}
.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}
.submit-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Seat meter (on yellow) */
.seat-meter {
  max-width: 640px;
  margin: 0 0 8px;
}
.meter-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.meter-track {
  height: 8px;
  margin: 10px 0 8px;
  background: var(--paper);
}
.meter-fill {
  height: 100%;
  background: var(--ink);
}

/* Submitted + account */
.registration-id {
  margin: 8px 0 24px;
  font-size: clamp(1.75rem, 3.6vw, 4rem);
  font-weight: 700;
  line-height: 1;
}
.copy-button {
  margin-left: 12px;
  font-size: 15px;
  font-weight: 400;
  vertical-align: middle;
}
.qr-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}
.qr-block img {
  width: clamp(150px, 14vw, 220px);
  border: 1px solid var(--ink);
}
.qr-block p {
  margin: 0 0 6px;
}
/* Account: QR (notes underneath, small and red) beside the profile */
.ticket-card {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 24px 48px;
  align-items: start;
}
.ticket-qr {
  margin: 0;
}
.ticket-qr img {
  display: block;
  width: 100%;
  max-width: 240px;
  border: 1px solid var(--ink);
}
.ticket-qr figcaption {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: var(--error);
  font-size: 13px;
  line-height: 1.35;
}
.ticket-qr figcaption strong {
  font-size: 14px;
}
.mail-lang {
  min-height: 36px;
  max-width: 200px;
  padding: 4px 28px 4px 0;
  font-size: 16px;
}
.ticket-profile .sub-legend {
  margin-top: 0;
}
.ticket-profile .review-list {
  margin-top: 0;
}
@media (max-width: 640px) {
  .ticket-card {
    grid-template-columns: 1fr;
  }
  .ticket-qr {
    justify-self: center;
    text-align: center;
  }
  .ticket-qr img {
    margin: 0 auto;
  }
}
.status-marker {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  vertical-align: 1px;
}
.status-marker.on {
  background: var(--ink);
}
.schedule-table {
  width: 100%;
  margin: 0 0 28px;
  border-collapse: collapse;
}
.schedule-table th {
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
}
.schedule-table td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.schedule-table td:first-child {
  font-weight: 700;
}
.schedule-title {
  margin: 0 0 16px;
  font-size: 22px;
}

/* Sign in / password (form on yellow) */
.auth-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 18px 24px;
  max-width: 1200px;
}
.auth-form .field-label {
  color: var(--ink);
}
.password-wrap {
  position: relative;
}
.password-wrap .text-input {
  padding-right: 60px;
}
.show-toggle {
  position: absolute;
  right: 0;
  bottom: 12px;
  font-size: 14px;
}
.form-alert {
  margin: 14px 0 0;
  font-weight: 700;
}
/* One-click demo sign-in (test environments only) */
.demo-panel {
  max-width: 900px;
  margin: 28px 0 0;
  padding: 16px 18px;
  border: 1px dashed var(--ink);
}
.demo-title {
  margin: 0 0 10px;
  font-weight: 700;
}
.demo-group + .demo-group {
  margin-top: 12px;
}
.demo-group-title {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
:lang(th) .demo-group-title {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.login-switch {
  margin: 18px 0 0;
}
.login-switch a {
  font-weight: 700;
}
.demo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.demo-button {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  background: var(--paper);
  transition: background-color 140ms, color 140ms;
}
.demo-button:hover,
.demo-button:focus-visible {
  background: var(--ink);
  color: var(--paper);
}
.demo-button:disabled {
  opacity: 0.4;
  cursor: wait;
}
.demo-note {
  margin: 10px 0 0;
  font-size: 13px;
}

/* Demo inbox – stands in for e-mail during a demo */
.inbox-banner {
  display: grid;
  gap: 6px;
  justify-items: start;
  max-width: 900px;
  margin: 24px 0 0;
  padding: 16px 18px;
  border: 1px dashed var(--ink);
  background: var(--paper);
}
.inbox-banner .split-button {
  margin-top: 8px;
}
.inbox-form {
  margin-top: 24px;
}
.inbox-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.inbox-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
.inbox-list li {
  border-bottom: 1px solid var(--line);
}
.inbox-list li.muted {
  padding: 12px 0;
}
.inbox-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.inbox-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 12px 10px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  text-align: left;
}
.inbox-item:hover,
.inbox-item[aria-pressed="true"] {
  border-left-color: var(--ink);
  background: var(--tint);
}
.inbox-item small {
  color: var(--muted);
}
.inbox-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 10px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.inbox-frame {
  display: block;
  width: 100%;
  height: 78vh;
  min-height: 560px;
  border: 1px solid var(--line);
  background: #f2efe8;
}
@media (max-width: 899px) {
  .inbox-layout {
    grid-template-columns: 1fr;
  }
}

.sample-logins {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 20px 0 0;
  font-size: 14px;
}
.sample-logins button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
}
.rule-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.rule-list li {
  display: flex;
  gap: 10px;
  padding: 4px 0;
}
.rule-list li::before {
  content: "–";
  width: 14px;
}
.rule-list li.ok::before {
  content: "✓";
  font-weight: 700;
}

/* Introduction definitions */
.defs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(16px, 2vw, 40px);
  margin: 0;
}
.defs > div {
  padding: 12px 0 14px;
  border-top: 1px solid var(--ink);
}
.defs > div[data-mark] dt::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--coral);
  vertical-align: 2px;
}
.defs dt {
  font-weight: 700;
  font-size: 18px;
}
.defs dd {
  margin: 6px 0 0;
  max-width: 48ch;
}

/* Seller slots: one block per day, two session rails each */
.slot-days {
  display: grid;
  gap: 28px;
}
.slot-day h3 {
  margin: 0 0 14px;
  font-size: 18px;
}
.slot-day .round-sessions {
  margin: 0;
}

/* Visitor booking in the account */
.booking-rule {
  margin: 0 0 18px;
}
.booking-current {
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 300;
  margin: 0 0 14px;
}
.booking-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.booking-item {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.booking-item + :not(.booking-item) {
  margin-top: 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.booking-item .booking-current {
  margin-bottom: 10px;
}
.date-grid .choice-input:disabled + .choice-label {
  opacity: 0.4;
  cursor: not-allowed;
}
.history-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.history-list li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- Wide screens ---------- */
@media (min-width: 1100px) {
  /* One line on wide screens: the band runs under the logo, the words start clear of it. */
  .landing .display {
    white-space: nowrap;
  }
  .landing .display span {
    padding-left: calc(var(--logo) * 0.3);
  }
}
@media (min-width: 1500px) {
  .round-sessions {
    grid-template-columns: 1fr 1fr;
    gap: 26px 32px;
  }
}
@media (min-width: 1600px) {
  .fields-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Narrower screens ---------- */
@media (max-width: 1099px) {
  .section-label,
  .ledger-content {
    grid-column: 1 / -1;
  }
  .ledger-section {
    gap: 12px;
  }
}
@media (max-width: 900px) {
  .defs {
    grid-template-columns: 1fr;
  }
  .fields-grid,
  .choice-grid.cols-2 {
    grid-template-columns: 1fr;
  }
  .compare {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: 32px;
  }
  .compare-col {
    grid-row: auto;
    grid-template-rows: none;
  }
  .session-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auth-form {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .yellow-field {
    padding-top: 16px;
  }
  .header-links {
    gap: 6px 12px;
    font-size: 11px;
  }
  .landing .display {
    padding-left: 0;
  }
  .landing .masthead {
    margin-top: 8px;
  }
  .lead {
    margin-top: 26px;
  }
  .info-row {
    flex-direction: column;
    align-items: flex-start;
  }
  /* Process line turns vertical */
  .process {
    display: block;
    padding-left: 26px;
  }
  .process::before {
    top: 10px;
    bottom: 10px;
    left: 4.5px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .process li {
    min-height: 54px;
    padding: 0 0 12px;
  }
  .process-title {
    min-height: 0;
  }
  .process-dot {
    position: absolute;
    top: 5px;
    left: -26px;
  }
  .process [aria-current="step"] .process-dot {
    margin: -2px 0 0 -2px;
  }
  .process-desc {
    max-width: none;
    margin-top: 2px;
  }
  .process.compact li {
    min-height: 34px;
  }
  .round-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 22px;
  }
  .round-grid .round-cell:nth-child(n + 3)::before {
    display: none;
  }
  .block-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .matrix-heading {
    display: none;
  }
  .matrix-date {
    grid-column: 1 / -1;
    padding-top: 12px;
  }
  .review-list {
    grid-template-columns: 110px 1fr;
  }
  .schedule-table,
  .schedule-table tbody,
  .schedule-table tr,
  .schedule-table td {
    display: block;
    width: 100%;
  }
  .schedule-table thead {
    display: none;
  }
  .schedule-table tr {
    padding: 8px 0;
    border-top: 1px solid var(--ink);
  }
  .schedule-table td {
    position: relative;
    min-height: 28px;
    padding: 5px 0 5px 40%;
    border: 0;
  }
  .schedule-table td::before {
    content: attr(data-label);
    position: absolute;
    top: 6px;
    left: 0;
    width: 36%;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}
@media (max-width: 420px) {
  .type-cells strong {
    font-size: 19px;
  }
  .date-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .yellow-field {
    padding: 12px;
  }
  .prototype-strip,
  .header-links,
  .split-button,
  .text-button,
  .no-print {
    display: none !important;
  }
  .ledger {
    padding: 22px;
  }
}
