/* =====================================================================
   DC ASEAN Summit 2027 — public site and participant portal.
   Layers on theme.css.

   Ported from reference/home.html, which is the built design target.
   DESIGN.md wins on rules, the reference wins on layout (§12), so the
   class names, proportions and section order here follow the reference
   rather than being reinvented.
   ===================================================================== */

body.public{background:var(--dc-white);display:flex;flex-direction:column;min-height:100vh}

/* Side padding for everything that is not full-bleed. The reference runs
   sections the full width inside this padding rather than centring them in
   a fixed container. */
.wrap{padding-inline:var(--page-pad)}
.pub-main{flex:1}

/* ── Header ───────────────────────────────────────────────────────────
   WHITE, with a hairline under it. The black bar is the foundation bar
   and belongs at the foot of the page; a black masthead inverts the
   brand's geometry and DESIGN.md §10 forbids it. */
.site-header{
  background:var(--dc-white);
  border-bottom:1px solid var(--dc-grey-200);
  display:flex;align-items:center;justify-content:space-between;gap:var(--s3);
  min-height:88px;padding-block:var(--s2);
}
/* The brand is artwork, never type. (§6) */
.site-header__logo{display:block;line-height:0}
/* 56px exactly fills the header's content box — min-height 88 less the 16px
   padding above and below — so the mark grows without the header moving, and
   that padding is the clear space the toolkit requires around it. (§6) */
.site-header__logo img{height:var(--logo-h,56px);width:auto}
.site-nav{display:flex;align-items:center;gap:clamp(16px,2.5vw,36px)}
/* No colour here: `.site-nav a` would out-specify `.btn--primary` and
   paint the Register button's label black on black. Links inherit black
   from the base `a` rule; the button sets its own white. */
.site-nav a{
  font-family:var(--font-display);font-weight:700;font-size:16px;
  text-decoration:none;letter-spacing:-.01em}
.site-nav a:not(.btn):hover{text-decoration:underline;text-decoration-thickness:3px}
/* 44px to tap, like every other control; the text stays where it was. */
.site-nav a:not(.btn){min-height:44px;display:inline-flex;align-items:center}
/* A label never breaks over two lines. */
.site-nav a{white-space:nowrap}

/* The public menu (public_nav_items()): a row of links on a wide screen; a
   Menu button and a drop-down panel below 800px, where the five links and
   Register no longer fit (an iPad in portrait, 810px and up, keeps the
   one-tap row). A delegate's own header (My QR, Guide) has no menu. The
   page you are on is underlined in the accent colour — the rule, not the
   text, carries the colour (§2). */
.site-menu{display:flex;align-items:center;gap:clamp(16px,2.5vw,36px);list-style:none;margin:0;padding:0}
.site-menu a[aria-current="page"]{text-decoration:underline;text-decoration-thickness:3px;
  text-decoration-color:var(--accent);text-underline-offset:8px}
.site-menu-btn{display:none;align-items:center;min-height:44px;padding:0 14px;cursor:pointer;
  font-family:var(--font-display);font-weight:700;font-size:16px;color:var(--dc-black);
  background:transparent;border:2px solid var(--dc-black);border-radius:var(--radius-sm)}
.site-menu-btn:focus-visible{outline:3px solid var(--dc-black);outline-offset:2px}
@media(max-width:959px){
  /* Register the size of Menu, so the two sit as a pair; and a tighter row
     so the five links still fit beside it from 800px. */
  body.public .site-header .btn{font-size:16px;padding:0 16px;min-height:44px;display:inline-flex;align-items:center}
  .site-menu{gap:clamp(14px,2vw,24px)}
}
@media(max-width:799px){
  .site-header{position:relative}
  /* Without the script the links wrap under the logo, all of them visible. */
  .site-nav{flex-wrap:wrap;justify-content:flex-end;row-gap:0}
  .site-menu{flex-wrap:wrap;column-gap:var(--s3);row-gap:0}
  /* With it: Menu beside Register, the links behind it. */
  .has-menu .site-nav{flex-wrap:nowrap;gap:10px}
  .has-menu .site-menu-btn{display:inline-flex}
  .has-menu .site-menu{display:none}
  /* A hard black edge ends the panel (no shadow, §10), so the page's own
     links below never read as more menu rows. */
  .has-menu.is-open .site-menu{display:flex;flex-direction:column;align-items:stretch;gap:0;
    position:absolute;left:0;right:0;top:100%;z-index:30;background:var(--dc-white);
    border-bottom:2px solid var(--dc-black);padding:0 var(--page-pad) var(--s2)}
  .has-menu.is-open .site-menu li + li{border-top:1px solid var(--line)}
  .has-menu.is-open .site-menu a{display:flex;width:100%;min-height:56px;font-size:18px}
}
@media(max-width:329px){
  /* The narrowest phones (a folding phone's cover screen, 280px). */
  .site-header{gap:8px}
  .has-menu .site-nav{gap:6px}
  .site-menu-btn,body.public .site-header .btn{padding-left:10px;padding-right:10px}
  .site-header .site-header__logo img{height:40px}
}

/* In-page jumps (Speakers, Venue, the guide's contents) glide rather than
   cut — interaction feedback, the one kind of motion §11 allows — and not
   at all for anyone who has asked for less motion. Only once the page has
   loaded (public_footer() adds .glide), so arriving at #venue from another
   page lands there instead of travelling the whole page. */
@media(prefers-reduced-motion:no-preference){html.glide{scroll-behavior:smooth}}

/* ── Buttons ──────────────────────────────────────────────────────────
   The reference's sizing, scoped to the public site so admin rows — which
   stack three or four small buttons — stay dense. 4px radius, never a
   pill (§10). Blue and purple never carry a control (§2). */
body.public .btn{font-size:17px;line-height:1;padding:18px 32px}
/* Small in type, not in reach: a delegate taps these one-handed on a phone,
   so they keep the 44px minimum every other button has. */
body.public .btn-sm{font-size:.85rem;padding:9px 14px;min-height:44px}
/* A file input's own button, drawn like ours rather than as the browser's
   21px grey chip. */
body.public input[type=file]::file-selector-button{font-family:var(--font-display);font-weight:700;
  font-size:.95rem;padding:11px 18px;min-height:44px;margin-right:12px;cursor:pointer;
  border:2px solid var(--dc-black);border-radius:var(--radius-sm);background:transparent;color:var(--dc-black)}
.btn--primary{background:var(--dc-black);border-color:var(--dc-black);color:var(--dc-white)}
.btn--secondary{background:transparent;color:var(--dc-black);border:2px solid var(--dc-black)}
.btn--primary:hover{background:#262626;color:var(--dc-white)}

/* ── Hero: the one bold move (§5) ─────────────────────────────────────
   Two bands across the foot of a black-and-white photograph. The upper is
   translucent so the picture reads through it; the lower is solid.

   The photo well ALWAYS renders, with or without a photograph — see the
   note on --dc-photo-well in theme.css. Drop a cleared image in as
   --hero-image and nothing else changes. Export true greyscale; a CSS
   grayscale filter would leave the colour original on the server, and
   that is the copy that leaks into link previews. (§7) */
.hero{position:relative}
.hero__photo{
  position:relative;
  min-height:clamp(360px,46vw,560px);
  background-color:var(--dc-photo-well);
  background-image:var(--hero-image,none);
  background-size:cover;background-position:center;
  display:flex;align-items:center;justify-content:center;
}
.hero__photo-note{font-size:15px;color:#a8a8a8;text-align:center;padding:var(--s3);margin:0;max-width:none}
.hero__bands{position:absolute;left:0;right:0;bottom:0}
.hero__band--title{background:rgba(var(--accent-rgb),.85);padding:clamp(18px,2.5vw,30px) var(--page-pad)}
.hero__band--meta{background:var(--dc-purple);padding:clamp(14px,1.8vw,22px) var(--page-pad)}
/* Black on both bands: white on blue or purple fails contrast, and the
   toolkit's own samples set these in black. (§2) */
.hero__band--title h1{color:var(--dc-black);margin:0}
.hero__band--meta p{font-size:clamp(16px,1.6vw,21px);color:var(--dc-black);margin:0;max-width:none}
.hero__actions{display:flex;flex-wrap:wrap;gap:var(--s2);padding-block:var(--s5)}
/* The route back for somebody already registered, under the Register button. */
.hero__registered{flex-basis:100%;margin:0;font-size:var(--text-small);color:var(--dc-black)}
.cta-band__actions{display:flex;flex-direction:column;gap:var(--s2);align-items:flex-start}

/* ── Sections ─────────────────────────────────────────────────────────*/
.section{padding-block:clamp(48px,7vw,88px)}
.section--grey{background:var(--dc-grey-050)}
.lede{font-size:clamp(17px,1.6vw,19px);margin-bottom:var(--s6)}
.section .rich p{margin:0 0 1em}
.section .rich img{max-width:100%;height:auto}

.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s4)}
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--s3)}

/* About — a blue rule over each pillar. A small accent is one of the
   three places colour is allowed. (§2) */
.pillar{border-top:4px solid var(--dc-blue);padding-top:var(--s3)}
.pillar h3{margin-bottom:var(--s1)}
.pillar p{font-size:16px;color:var(--dc-grey-500);margin:0}

/* Three days */
.day{background:var(--dc-white);padding:var(--s4)}
.day__date{font-size:15px;color:var(--dc-grey-500);margin-bottom:var(--s1)}
.day h3{margin-bottom:12px}
.day p{font-size:16px;margin:0}

/* Speakers — rectangular and square-cornered; the brand has no round
   avatars. The portrait well is a photo well like any other. (§6, §7) */
.speaker__portrait{
  aspect-ratio:5/6;background-color:var(--dc-photo-well);
  background-size:cover;background-position:center;
  display:flex;align-items:flex-end;padding:14px}
.speaker__portrait span{font-family:var(--font-display);font-weight:700;font-size:2rem;color:#a8a8a8;letter-spacing:.02em}
/* Initials sit in the middle of an empty well; a portrait fills it. */
.speakers .speaker__portrait{align-items:center;justify-content:center}
/* However many speakers there are, no empty fourth column. */
.speakers{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.speaker h3{margin:var(--s2) 0 4px;font-size:1.25rem}
.speaker p{font-size:15px;color:var(--dc-grey-500);margin:0}

/* Venue — a solid purple field beside a photograph. */
.venue{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.venue__panel{
  background:var(--dc-purple);
  padding:clamp(40px,5vw,64px);padding-left:var(--page-pad);
  display:flex;flex-direction:column;justify-content:center;
  gap:var(--s3);align-items:flex-start}
.venue__panel h2,.venue__panel p{color:var(--dc-black);margin:0}
/* The panel is a flex column, so the buttons need their own row or they
   stack full-width down the purple field. */
.venue__actions{display:flex;flex-wrap:wrap;gap:var(--s2)}
.venue__photo{
  background-color:var(--dc-photo-well);min-height:420px;
  background-size:cover;background-position:center;
  display:flex;align-items:center;justify-content:center}


/* Recently registered — name in the display face, country in Sanchez,
   a small blue dot as the marker. (§6) */
.reg-row{display:flex;align-items:center;gap:var(--s2);padding-block:20px;
  border-bottom:1px solid var(--dc-grey-200)}
.reg-row__dot{width:10px;height:10px;border-radius:50%;background:var(--dc-blue);flex:none}
.reg-row__name{font-family:var(--font-display);font-weight:700;font-size:19px;letter-spacing:-.01em}
.reg-row__place{font-size:16px;color:var(--dc-grey-500)}
.reg-tally{margin:0 0 var(--s3);font-family:var(--font-display);font-weight:700}

/* Closing CTA — solid blue field, black text, black button. */
.cta-band{background:var(--dc-blue);padding-block:clamp(48px,6vw,72px);
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s4)}
/* The column takes the space the button leaves; the heading keeps its own
   measure so the kicker above it is not squeezed to the heading's width. */
.cta-band__text{flex:1 1 auto}
.cta-band h2{color:var(--dc-black);max-width:20ch;margin:0}
/* Uppercase by rule, not by how it was typed, so the line cannot arrive in
   mixed case and read as a sentence instead of a rally line. */
.cta-band__kicker{font-family:var(--font-display);font-weight:700;
  font-size:var(--text-meta);letter-spacing:.14em;text-transform:uppercase;
  color:var(--dc-black);margin:0 0 var(--s2);max-width:none}
/* Each sentence is unbreakable, so a narrow screen wraps BETWEEN them and
   never splits the brand name across two lines — which is what it did at the
   heading's measure. */
.cta-band__kicker span{white-space:nowrap}

/* ── Foundation bar [BRAND] — styled in theme.css ──────────────────────
   foundation_bar() emits it for BOTH chromes, so its rules live in the one
   stylesheet both load. They used to live here, which only public pages
   load, and every admin page rendered it as an unstyled 2000×694 logo. */

/* ── Social wall — not in the reference, but §9 lists the hashtag feed
   as part of the home page, so it keeps the reference's section shape. */
.wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:var(--s3)}
.wall .post{border:1px solid var(--dc-grey-200)}
.wall .post img{width:100%;display:block}
.wall .post .cap{padding:12px 14px;font-size:var(--text-small)}
.wall .post .src{padding:0 14px 12px;font-size:var(--text-meta);color:var(--muted)}
/* Small text on white, so black rather than blue. (§2) */
.hashtag{font-family:var(--font-display);font-weight:700;color:var(--ink)}

/* ── Programme (§6) ───────────────────────────────────────────────────
   Hairline-separated rows, not cards; the track is a 4px left rule. */
.day-tabs{display:flex;gap:var(--s3);flex-wrap:wrap;border-bottom:1px solid var(--line);margin-bottom:var(--s3)}
.day-tabs a,.day-tabs button{min-height:44px;display:inline-flex;align-items:center;
  border:none;background:none;padding:10px 0;margin-bottom:-1px;cursor:pointer;
  font-family:var(--font-display);font-weight:700;font-size:1rem;color:var(--muted);
  border-bottom:3px solid transparent;text-decoration:none}
.day-tabs a:hover,.day-tabs button:hover{color:var(--ink)}
.day-tabs .active{color:var(--ink);border-bottom-color:var(--accent)}
.agenda__actions{margin-top:var(--s5)}

.sess{display:flex;gap:var(--s3);align-items:flex-start;
  padding:var(--s3) 0 var(--s3) var(--s2);
  border-bottom:1px solid var(--line);border-left:4px solid var(--dc-grey-200)}
.sess .time{min-width:100px;font-family:var(--font-display);font-weight:300;
  font-variant-numeric:tabular-nums;font-size:1.05rem}
.sess .time small{display:block;color:var(--muted)}
.sess .body{flex:1;min-width:0}
.sess .title{font-family:var(--font-display);font-weight:700;font-size:var(--text-h4);
  line-height:1.15;letter-spacing:-.02em}
.sess .meta{color:var(--muted);font-size:var(--text-small);margin-top:2px}
.sess .desc{font-size:var(--text-small);margin-top:8px;max-width:62ch}
.sess .side{display:flex;flex-direction:column;gap:8px;align-items:flex-end;flex-shrink:0}
.type-pill{font-family:var(--font-display);font-weight:700;font-size:var(--text-meta);color:var(--muted)}
.sess--general{border-left-color:var(--accent)}
.sess--workshop{border-left-color:var(--dc-purple)}
.sess--dinner,.sess--cocktail{border-left-color:var(--dc-black)}
.sess--tour{border-left-color:var(--dc-grey-500)}

/* Day panels: one day on screen, every day on paper. The portal marks the
   hidden days with a class; agenda.php hides them inline from its script,
   hence the !important for print. */
.day-panel--off{display:none}
.day-panel__title{font-size:var(--text-h4);margin:var(--s3) 0 var(--s1)}
/* The public programme's day theme, under its tab (admin -> Settings). */
.day-theme{font-size:var(--text-h4);margin:var(--s3) 0 var(--s1)}
.day-theme__blurb{color:var(--muted);margin:0 0 var(--s2)}
/* "Franchisees only": a fact about who the session is for, in words, not colour. */
.type-pill--franchisee{display:inline-block;margin-left:6px}
/* The tab already names the day on screen; paper has no tabs. */
.day-tabs ~ .day-panel .day-panel__title{display:none}
@media print{
  .day-panel,.day-panel--off{display:block !important}
  .day-panel .day-panel__title{display:block}
}

/* RSVP in one tap: where you stand, in words, and the button that changes it. */
.rsvp{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.rsvp__state{flex-basis:100%;margin:0;font-size:var(--text-small)}
/* Rating 1–5: numbered squares in reading order, black when chosen. */
.rating-form{margin-top:8px;display:flex;flex-direction:column;gap:8px;min-width:230px}
.rating{border:0;padding:0;margin:0;display:flex;gap:6px;flex-wrap:wrap}
.rating legend{font-size:var(--text-small);color:var(--muted);padding:0;margin-bottom:6px;width:100%}
.rating input{position:absolute;opacity:0;pointer-events:none}
.rating label{width:44px;height:44px;display:flex;align-items:center;justify-content:center;
  border:1px solid var(--dc-black);border-radius:var(--radius-sm);cursor:pointer;
  font-family:var(--font-display);font-weight:700}
.rating input:checked + label{background:var(--dc-black);color:var(--dc-white)}
.rating input:focus-visible + label{outline:3px solid var(--dc-black);outline-offset:2px}

/* The tour, compact (portal Programme tab): one row per stop. */
.tour-list{list-style:none;margin:var(--s3) 0 0;padding:0}
.tour-list__stop{display:flex;gap:var(--s2);align-items:flex-start;padding:12px 0;border-bottom:1px solid var(--line)}
.tour-list__photo{width:96px;aspect-ratio:4/3;flex-shrink:0;background-color:var(--dc-photo-well);
  background-image:var(--photo,none);background-size:cover;background-position:center}
.tour-list__body{min-width:0}
.tour-list__body strong{display:block;font-family:var(--font-display)}
.tour-list__meta,.tour-list__body .tour-stop__credit{display:block;font-size:var(--text-small);color:var(--muted)}
.tour-list__desc{display:block;font-size:var(--text-small);line-height:1.5;margin-top:2px}
.tour-list__map{display:inline-block;padding:8px 0;font-family:var(--font-display);font-weight:700;font-size:var(--text-small)}

/* ── Forms (registration, portal) ─────────────────────────────────────*/
.pub-card{border:1px solid var(--line);border-radius:var(--radius);padding:var(--s4);margin:var(--s4) 0}
.pub-card h2{margin-bottom:var(--s2)}
/* A page whose title is its card's heading (thank-you, resend, unsubscribe,
   the contact card's states, Programme): an h1 for structure, at the size
   the h2 had — the site's h1 is the hero scale. */
.pub-card h1,.page-title{font-size:clamp(1.75rem,4vw,2.5rem);margin-bottom:var(--s2)}

/* Size chart: one row per size, five narrow columns (tshirt_chart_html()),
   which fits a 360px phone whole — no sideways scrolling to discover the
   larger sizes. The overflow box stays only as a guard: a table that
   overflowed its container would drag the whole form sideways.
   min-width:0 matters for that guard: a grid item defaults to
   min-width:auto, so an over-wide table pushed its own track wider and the
   overflow escaped to the page instead of being caught here. */
.size-chart__field{min-width:0}
.size-chart{overflow-x:auto;margin:var(--s2) 0;max-width:30rem}
.size-chart__table{margin:0}
/* Tighter cells than a data table: five columns across a 320px phone. */
.size-chart__table{font-size:.85rem}
.size-chart__table th,.size-chart__table td{padding:8px 5px}
.size-chart__table thead th{font-size:.8rem}
.size-chart__table th:first-child,.size-chart__table td:first-child{padding-left:0}
.size-chart__table th[scope=row]{white-space:nowrap}
/* The summary carries .btn, which is the house pattern for a disclosure
   (admin → Users, the directory, the portal) and the reason there is no rule
   for it here. There was one, and it was the bug: it set the summary to
   font-weight:700 with display:flex, which both LOOKS like a heading and
   suppresses the browser's own disclosure triangle — so the chart was
   hidden behind something nobody could tell was a control. A button says
   "press me" without needing a marker at all.
   The chart also now starts open, so nothing has to be discovered to be
   read; the button is there to get it back after collapsing it. */
.size-chart__toggle summary{margin-bottom:var(--s1)}

/* "Add to your home screen" is meaningless inside an app that is already on
   the home screen. install.js hides it too — this rule is what stops it being
   painted for an instant first, and covers the case where the script never
   loads at all. Older iOS Safari does not match this query and is caught by
   navigator.standalone in the script instead. */
@media (display-mode: standalone){#installBox{display:none}}

.fieldset{border:none;padding:0;margin:0 0 var(--s2)}
.fieldset legend{font-family:var(--font-display);font-weight:700;font-size:var(--text-h4);
  letter-spacing:-.02em;padding:var(--s3) 0 var(--s1)}

/* A long form reads as a sequence of steps, so the sections are separated
   by the same hairline the rest of the site uses rather than boxed in
   cards — no shadows, no nested borders. (§4)
   Scoped to .form-page: the portal puts .fieldset on its <details> guest
   accordions too, and unscoped these rules ruled a line between every one
   of them. */
.form-page{max-width:920px}
.form-lede{font-size:var(--text-lead);margin-bottom:var(--s5);max-width:62ch}
.form-page .fieldset{margin:0}
.form-page .fieldset + .fieldset{border-top:1px solid var(--line);margin-top:var(--s5);padding-top:var(--s5)}
/* display:block so the legend sits in normal flow — a default legend is
   laid out by the fieldset and leaves a gap under it that padding cannot
   close. */
.form-page .fieldset legend{display:block;width:100%;float:left;padding:0;margin:0 0 var(--s1)}
.form-page .fieldset legend + *{clear:both}
/* One line under each legend saying why we are asking. */
.fieldset__note{font-size:var(--text-small);color:var(--muted);margin:0 0 var(--s3);max-width:62ch}

/* Explicit two columns, not auto-fit: auto-fit reflowed whenever a field
   carried help text under it, so rows never lined up. */
.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s3);align-items:start}
.field-grid .full{grid-column:1 / -1}
@media(max-width:720px){.field-grid{grid-template-columns:1fr}}
label.field{display:block;font-family:var(--font-display);font-weight:700;font-size:.95rem}
label.field > input,label.field > select,label.field > textarea{margin-top:8px;font-weight:400}
/* .help is a span here, so it needs block and its own weight — inside a
   label.field it would otherwise sit inline and inherit the label's bold. */
label.field .help{display:block;font-weight:400;margin-top:6px}
/* The quieter half of a label: which fields can be left blank. */
.field__opt{font-weight:400;color:var(--muted);font-size:var(--text-small)}
/* Registration package cards: the franchisee wording shows while Function is
   Franchisee (register.php), the team wording otherwise. */
.pkg-v--fr{display:none}
.is-franchisee .pkg-v--fr{display:inline}
.is-franchisee .pkg-v--team{display:none}
/* …read straight from the select where :has() is supported, so the wording
   cannot drift from it — without JavaScript, or after Back restores it. */
form:has(#f-department option[value="Franchisee" i]:checked) #f-package .pkg-v--fr{display:inline}
form:has(#f-department option[value="Franchisee" i]:checked) #f-package .pkg-v--team{display:none}
/* The transfer price under its tick box: a fact beside a choice, not a label. */
.cost-note{display:block;font-weight:400;color:var(--muted);font-size:var(--text-small)}
/* Errors at the field, and a summary that links to them. Black, bold, a
   black rule — never red on the public site (DESIGN.md §14, deviation 1).
   The field itself gets a heavier border, so the cue is not colour alone. */
.field__error{display:block;font-family:var(--font-display);font-weight:700;font-size:var(--text-small);
  margin:8px 0 0;padding-left:10px;border-left:4px solid var(--dc-black);color:var(--dc-black)}
.guest > .field__error{margin:0 0 var(--s2)}
/* The input half repeats theme.css's by-exclusion selector: anything shorter
   loses to its specificity and the heavier border never shows. Padding gives
   back the 2px, so marking a field does not nudge the form. */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]):not([type=range]):not([type=color]):not([type=hidden])[aria-invalid="true"],
select[aria-invalid="true"],textarea[aria-invalid="true"]{border-width:3px;border-color:var(--dc-black);padding:9px 10px}
.form-errors{margin-bottom:var(--s4)}
.form-errors:focus{outline:3px solid var(--dc-black);outline-offset:2px}
.form-errors p{margin:0 0 var(--s1)}
.form-errors ul{margin:0;padding-left:1.2em}
.form-errors li{margin:4px 0}

/* Each guest is a block of their own, so name, diet and what they are
   joining stay visibly attached to one person. */
.guest{border:1px solid var(--line);padding:var(--s3);margin-bottom:var(--s2)}
.guest__head{display:grid;grid-template-columns:2fr 2fr auto;gap:var(--s2);align-items:end}
.guest__events{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:2px var(--s2);margin-top:var(--s2);padding-top:var(--s2);border-top:1px solid var(--line)}
.guest__events .check-row{padding:6px 0}
/* No event ticked for a guest: the same black rule as a field error. */
.guest__events.is-invalid{border-left:4px solid var(--dc-black);padding-left:10px}
@media(max-width:640px){.guest__head{grid-template-columns:1fr}}

.form-submit{margin-top:var(--s5);padding-top:var(--s4);border-top:1px solid var(--line)}
.choice-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:var(--s2)}
/* The radio is left visible and given a column of its own. Hidden radios
   plus a :has() border told nobody what the cards were until one was
   already picked — a card with no control in it reads as a panel, not a
   choice. */
.choice-cards label{display:grid;grid-template-columns:auto 1fr;gap:0 12px;align-items:start;
  border:2px solid var(--line);border-radius:var(--radius-sm);
  padding:var(--s2);cursor:pointer;background:var(--dc-white)}
.choice-cards label:hover{border-color:var(--dc-grey-500)}
/* Selection reads as a black outline plus the accent rule, not colour
   alone, which someone who cannot distinguish it would miss. */
.choice-cards label:has(input:checked){border-color:var(--dc-black);box-shadow:inset 4px 0 0 var(--accent)}
.choice-cards label:has(input:focus-visible){outline:3px solid var(--dc-black);outline-offset:2px}
.choice-cards input{grid-row:1 / span 2;width:20px;height:20px;margin:2px 0 0;accent-color:var(--dc-black)}
.choice-cards .t{grid-column:2;font-family:var(--font-display);font-weight:700}
.choice-cards .d{grid-column:2;font-size:var(--text-small);color:var(--muted);margin-top:4px}
.check-row{display:flex;align-items:flex-start;gap:12px;padding:10px 0}
.check-row input[type=checkbox],.check-row input[type=radio]{width:20px;height:20px;margin-top:4px;flex-shrink:0;accent-color:var(--dc-black)}
/* A radio's label IS the row (the portal's RSVP choices): the whole 44px
   line is the target, not the 13px circle. */
label.check-row{min-height:44px;align-items:center;cursor:pointer;font-weight:400}
label.check-row input{margin-top:0}
/* A field that belongs to the checkbox above it: indented to the checkbox's
   text column and ruled on the left, so the pair reads as one thing when
   the field appears. */
.check-detail{margin:0 0 var(--s3) 32px;padding-left:var(--s3);border-left:2px solid var(--line);max-width:420px}
/* The room-block detail carries a whole rate card, so it gets the column
   back — 420px is right for one flight number, not for this. */
.check-detail--wide{max-width:none;margin-top:var(--s3)}
.check-row + .check-detail{margin-top:2px}
.check-detail + .field-grid{margin-top:var(--s3)}
/* A sub-heading inside a fieldset. Not a second <legend>: only the first
   one is the fieldset's, and a later one gets hoisted to the top. */
.field-legend{font-family:var(--font-display);font-weight:700;font-size:.95rem;margin:0 0 var(--s1)}
/* Room categories are one decision read top to bottom, not a row of tiles:
   side by side the labels wrap to three lines and the rates stop lining up. */
.choice-cards--stack{grid-template-columns:1fr;gap:8px}
.companion-row{display:grid;grid-template-columns:2fr 2fr 1fr auto;gap:12px;align-items:end;margin-bottom:12px}

/* ── Participant portal ───────────────────────────────────────────────*/
.portal-head{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--s2);
  flex-wrap:wrap;margin:var(--s5) 0 var(--s1)}
.portal-head h1{font-size:clamp(1.75rem,4vw,2.5rem);margin:0}
.qr-box{padding:10px}
/* The fallback when the QR image cannot be drawn. Monospace and large: the
   desk reads this aloud or types it, so it has to survive a phone screen at
   arm's length. */
.qr-fallback{border:2px solid var(--dc-black);border-radius:var(--radius-sm);padding:var(--s3);text-align:center}
.qr-fallback__code{font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  font-size:1.35rem;font-weight:700;letter-spacing:.08em;word-break:break-all;line-height:1.35}
.qr-fallback p{margin:var(--s2) 0 0}
.portal-tabs{display:flex;gap:var(--s3);flex-wrap:wrap;border-bottom:1px solid var(--line);margin:var(--s3) 0}
.portal-tabs a{padding:10px 0;font-family:var(--font-display);font-weight:700;font-size:1rem;
  color:var(--muted);border-bottom:3px solid transparent;margin-bottom:-1px;text-decoration:none}
.portal-tabs a:hover{color:var(--ink)}
.portal-tabs a.active{color:var(--ink);border-bottom-color:var(--accent)}
.announce{border-left:4px solid var(--accent);padding:12px 0 12px var(--s2);margin-bottom:var(--s2)}
.announce .when{font-size:var(--text-meta);color:var(--muted)}
.msg-item{border-left:4px solid var(--dc-grey-200);padding:12px 0 12px var(--s2);margin-bottom:12px}
.msg-item .from{font-size:var(--text-small);color:var(--muted);margin-top:6px}
.msg-item__reply{display:inline-block;padding:10px 0 0;font-family:var(--font-display);font-weight:700;font-size:var(--text-small)}
/* A fixed value in a form (name, email): text, not a disabled box. */
.field__value{display:block;font-family:var(--font-text);font-weight:400;margin-top:8px}
.guest-form__need{font-weight:700;margin:var(--s1) 0 0}
/* Home: two columns on a desk, one on a phone; cards keep their own
   height instead of stretching to the tallest neighbour. */
.portal-home{align-items:start}
.portal-home .pub-card{margin:0 0 var(--s3)}
/* The grid gap already separates the columns; a card's own margin on top of
   it doubled the space when they stack on a phone. */
body.portal .portal-home .pub-card{margin:0 0 var(--s3)}
body.portal .portal-home__col > .pub-card:last-child{margin-bottom:0}
#qr canvas{display:block}

/* "Still to do": what is outstanding, in one list. A black rule for what
   is needed, the accent rule for what is optional or just for this phone —
   never red: nothing here is an error, and red on the public site is
   reserved (DESIGN.md §14, deviation 1). Hidden whole when nothing in it is
   showing (the phone rows are revealed by script). */
.todo:not(:has(.todo__row:not([hidden]))){display:none}
.todo__list,.next-list{list-style:none;margin:0;padding:0}
.todo__row{border-left:4px solid var(--dc-black);padding:8px 0 8px var(--s2);margin:0 0 12px}
.todo__row--soft{border-left-color:var(--accent)}
.todo__row > a,.todo__row > strong{display:block;font-family:var(--font-display);font-weight:700}
.todo__note{display:block;font-size:var(--text-small);color:var(--muted);margin-top:2px}
.todo__action{margin:8px 0 0}
.todo__how summary{display:inline-block;padding:10px 0;cursor:pointer;font-size:var(--text-small);
  text-decoration:underline}
.todo__how p{font-size:var(--text-small);margin:0 0 8px}
/* On the other tabs, one line in place of the banners. */
.todo-pointer{margin:0 0 var(--s1);font-family:var(--font-display);font-weight:700}
/* Details tab: where the photo and LinkedIn live instead (the contact card). */
.details-card-pointer{margin:0 0 var(--s2);font-size:var(--text-small)}
.next-list li{padding:8px 0;border-bottom:1px solid var(--line)}
.next-list li:last-child{border-bottom:0}
.next-list a{display:block;font-family:var(--font-display);font-weight:700}
.next-list__time{display:block;font-size:var(--text-small);color:var(--muted)}

/* My details / People: sections that fold to one line. The summary says
   what is on file, or what is missing; the whole line is the target. */
/* Visually hidden, still read aloud. !important because it is a utility:
   the form's own legend rule (width:100%, float) must not undo it. */
.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;
  margin:-1px !important;overflow:hidden !important;clip:rect(0 0 0 0) !important;white-space:nowrap !important;
  border:0 !important;float:none !important}
.dsec{border-top:1px solid var(--line)}
.dsec:first-of-type{border-top:0}
.dsec > summary,.card-sec > summary{display:flex;flex-direction:column;gap:2px;min-height:44px;padding:14px 32px 14px 0;
  cursor:pointer;list-style:none;position:relative}
.dsec > summary::-webkit-details-marker,.card-sec > summary::-webkit-details-marker{display:none}
/* The open/closed mark is drawn, not an icon: a chevron from two borders. */
.dsec > summary::after,.card-sec > summary::after{content:"";position:absolute;right:6px;top:22px;width:9px;height:9px;
  border-right:2px solid var(--dc-black);border-bottom:2px solid var(--dc-black);transform:rotate(45deg)}
.dsec[open] > summary::after,.card-sec[open] > summary::after{transform:rotate(-135deg);top:26px}
.dsec__title{font-family:var(--font-display);font-weight:700;font-size:var(--text-lead)}
.dsec__sum{font-size:var(--text-small);color:var(--muted)}
.dsec > .fieldset{padding-bottom:var(--s3)}
.form-page .dsec .fieldset + .fieldset{border-top:0;margin-top:0;padding-top:0}
/* Arrival and departure: two blocks of the same shape. */
.leg{margin:0 0 var(--s3)}
.leg > label.field{max-width:420px}
/* Save always in reach, however many sections are open. White and a
   hairline — no shadow (DESIGN.md §4). */
.form-submit--sticky{position:sticky;bottom:0;background:var(--dc-white);z-index:2;
  margin-top:0;padding:12px 0;border-top:1px solid var(--line)}
/* …and nothing the browser scrolls to sits underneath it. */
.details-form input,.details-form select,.details-form textarea{scroll-margin-bottom:96px}
.card-sec{padding-top:0;padding-bottom:0}
.card-sec[open]{padding-bottom:var(--s3)}

/* A guest is a disclosure row: the summary is the tap target. */
.guest-item{margin-bottom:12px}
.guest-item > summary{min-height:44px;padding:10px 0;cursor:pointer}
.guest-remove{margin-top:var(--s2)}

/* Inside the portal the card heading is a section, not a second page title
   — at the shared h2 size, five 40px headings stood level with "Hi, …". */
body.portal .pub-card h2{font-size:var(--text-h4)}


/* ── How the portal works (guide.php) ──────────────────────────────
   The printed guidebook as a page. Colour stays inside §2's three uses —
   small accents (step numbers, date strips, timeline marks, icon discs,
   rules) and two solid fields (the QR panels) — with black text on every
   one of them. Icons are the page's one exception to §7/§10, overruled by
   the owner for the guide only (DESIGN.md §14): black line drawings from
   assets/img/guide-icons.svg on a pale blue disc, never carrying meaning
   the words beside them do not. */
.g-i{width:1em;height:1em;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;vertical-align:-.15em;flex:none}
.g-ic{flex:none;display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;border-radius:50%;background:rgba(var(--accent-rgb),.16);color:var(--dc-black)}
.g-ic .g-i{width:24px;height:24px}
.g-ic--lg{width:56px;height:56px}
.g-ic--lg .g-i{width:30px;height:30px}
.g-ic--sm{width:32px;height:32px}
.g-ic--sm .g-i{width:18px;height:18px}
.g-ic--h{width:48px;height:48px;margin-right:14px;vertical-align:middle}
.g-ic--h .g-i{width:26px;height:26px}
/* on a colour field the disc goes white, or it vanishes into the field */
.g-ic--w{background:var(--dc-white);width:40px;height:40px;margin-right:12px;vertical-align:middle}
.g-ic--w .g-i{width:22px;height:22px}
/* With a token, "your link" and "on your phone" fold away at the end —
   the reader is already in the portal. */
.g-more{border-top:1px solid var(--line);margin-top:var(--s5);padding-top:var(--s2)}
.g-more > summary{cursor:pointer;min-height:44px;padding:10px 0;font-family:var(--font-display);
  font-weight:700;text-decoration:underline}
.g-toc{display:flex;flex-wrap:wrap;gap:0 var(--s3);margin:var(--s2) 0 var(--s4);
  font-family:var(--font-display);font-weight:700;font-size:var(--text-small)}
.g-toc a{min-height:44px;display:inline-flex;align-items:center}
.g-sec{margin-top:var(--s6)}
.g-h{font-size:clamp(1.5rem,3.2vw,2rem);margin:var(--s5) 0 var(--s3);display:flex;align-items:center}
.g-sec > .g-h:first-child{margin-top:0}
.g-h3{font-size:1.25rem;margin:var(--s4) 0 var(--s2)}

.g-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s3)}
.g-stat{border-top:4px solid var(--accent);padding-top:var(--s2);display:flex;flex-direction:column;
  font-family:var(--font-display);font-weight:700}
.g-stat__n{font-size:clamp(3rem,9vw,4.5rem);line-height:1;letter-spacing:-.03em}

.g-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s2)}
.g-tiles--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g-tile{border:1px solid var(--line);border-left:4px solid var(--dc-purple);padding:var(--s2);
  display:flex;gap:14px;align-items:center;min-width:0}
.g-tile > div{display:flex;flex-direction:column;gap:4px;min-width:0}
.g-tile--static{border-color:transparent;border-left-color:transparent;padding-left:0}
.g-tile strong{font-family:var(--font-display);font-size:1.05rem}
.g-tile > div > span{font-size:var(--text-small);line-height:1.45}

/* A numbered step: black numeral on a blue square (text on a colour field
   is black, §2). Across the page on a wide screen, a list on a phone. */
.g-steps{list-style:none;padding:0;margin:0 0 var(--s3);display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s3)}
.g-steps li{display:flex;gap:var(--s2);align-items:center;min-width:0}
.g-steps li > div{display:flex;flex-direction:column;gap:2px;line-height:1.35;min-width:0}
.g-steps li > div strong{font-family:var(--font-display)}
.g-steps li > div span{font-size:var(--text-small);color:var(--muted)}
.g-num{flex:none;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--accent);color:var(--dc-black);font-family:var(--font-display);font-weight:700;font-size:1rem}
/* the step's number sits on the corner of its icon disc */
.g-disc{position:relative;flex:none;padding:6px 0 0 6px}
.g-disc .g-num{position:absolute;left:-4px;top:-4px;width:26px;height:26px;font-size:.9rem;
  border:2px solid var(--dc-white)}
.g-steps--list{grid-template-columns:minmax(0,1fr);gap:var(--s2)}
.g-steps--list .g-num{width:32px;height:32px;font-size:1rem}
.g-steps--list li{align-items:center}
/* one running sentence here, bold labels and links inline in it */
.g-steps--list li > div{display:block}

.g-dd,.g-cols,.g-qrs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s3)}
.g-dd > div,.g-col{border:1px solid var(--line);padding:var(--s3)}
.g-dd__do{border-left:4px solid var(--accent) !important}
.g-dd h3,.g-col h3{font-size:1.15rem;margin:0 0 var(--s1);display:flex;align-items:center;gap:10px}
.g-dd ul{margin:0;padding:0;list-style:none}
.g-dd li{margin:6px 0;display:flex;gap:10px;align-items:center}
.g-dd .g-i{width:20px;height:20px;stroke-width:2.4}

.g-dates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s2)}
.g-date{display:flex;gap:var(--s2);align-items:center;border:1px solid var(--line);padding:var(--s2);
  font-family:var(--font-display);font-weight:700;line-height:1.3}
/* The calendar tile: a blue strip over a square, square-cornered (§4). */
.g-cal{flex:none;display:inline-flex;flex-direction:column;width:60px;border:2px solid var(--dc-black);
  text-align:center;font-family:var(--font-display);font-weight:700;background:var(--dc-white);line-height:1}
.g-cal__m{background:var(--accent);color:var(--dc-black);font-size:.8rem;padding:4px 0}
.g-cal__d{font-size:1.6rem;padding:6px 0 2px}
.g-cal__w{font-size:.75rem;font-weight:400;padding:0 0 6px;color:var(--muted)}

.g-timeline{list-style:none;padding:0;margin:0;position:relative}
.g-timeline::before{content:"";position:absolute;left:83px;top:12px;bottom:12px;width:2px;background:var(--line)}
.g-timeline li{display:flex;align-items:center;margin:0 0 var(--s2);position:relative}
.g-mark{flex:none;width:14px;height:14px;margin:0 var(--s2) 0 17px;border:3px solid var(--accent);
  background:var(--dc-white);position:relative}
.g-timeline li.is-event .g-mark{background:var(--accent)}
.g-timeline li > div{display:flex;flex-direction:column;line-height:1.35}
.g-timeline li > div strong{font-family:var(--font-display)}
.g-timeline li > div span{font-size:var(--text-small);color:var(--muted)}

.g-qr{padding:var(--s3);color:var(--dc-black)}
.g-qr h3{margin:0 0 var(--s1);display:flex;align-items:center}
.g-qr--portal{background:var(--accent)}
.g-qr--badge{background:var(--dc-purple)}
.g-help{border-top:4px solid var(--accent);padding-top:var(--s3)}

@media(max-width:720px){
  .g-tiles,.g-dates{grid-template-columns:repeat(2,minmax(0,1fr))}
  .g-steps{grid-template-columns:minmax(0,1fr);gap:var(--s2)}
  .g-steps li{align-items:center}
  .g-dd,.g-cols,.g-qrs{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:480px){
  .g-tiles,.g-tiles--2,.g-dates{grid-template-columns:minmax(0,1fr)}
}

/* ── Langkawi island tour (render_tour) ───────────────────────────────
   On the public programme and the portal's Programme tab. Each stop's photo
   is a photo well first (§7.5), in colour when filled (§14 deviation 6) and
   credited underneath; the travel time is a small blue field with
   black type (§2). The area line is sentence case, not a tracked-out
   capital eyebrow (§3, §10). */
.tour{margin-top:var(--s6);padding-top:var(--s4);border-top:4px solid var(--accent)}
.tour__title{margin:0}
.tour__intro{margin:var(--s2) 0 0}
.tour__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s4);margin-top:var(--s4)}
.tour-stop{display:flex;flex-direction:column;min-width:0}
.tour-stop__photo{aspect-ratio:2/1;background-color:var(--dc-photo-well);background-image:var(--photo,none);
  background-size:cover;background-position:center;display:flex;align-items:flex-end;padding:14px}
.tour-stop__photo span{font-size:13px;color:#a8a8a8}
.tour-stop__credit{font-size:var(--text-meta);color:var(--muted);margin:6px 0 0}
.tour-stop h3{margin:var(--s2) 0 4px;font-size:1.25rem}
.tour-stop__area{font-size:var(--text-small);color:var(--muted);margin:0}
.tour-stop__desc{font-size:16px;margin:var(--s1) 0 0}
.tour-stop__meta{display:flex;gap:var(--s2);align-items:center;flex-wrap:wrap;margin-top:auto;padding-top:var(--s2)}
.tour-stop__time{background:var(--accent);color:var(--dc-black);font-family:var(--font-display);font-weight:700;
  font-size:var(--text-small);padding:4px 10px}
.tour-stop__meta a{font-family:var(--font-display);font-weight:700;font-size:var(--text-small)}
.day__more{margin-top:var(--s2) !important;font-family:var(--font-display);font-weight:700;font-size:16px}
@media(max-width:720px){.tour__grid{grid-template-columns:minmax(0,1fr)}}

/* ── Langkawi visitor guide (langkawi.php) ────────────────────────────
   The cheerful page. It carries the site's two owner-approved exceptions
   (DESIGN.md §14, deviations 5 and 6): the guide icon set, and colour
   photography. Everything else is the house style — Set 3 blue and purple
   only, via tokens and color-mix(), black text on every colour field, no
   gradients, no shadows, square fields. Colour is used generously here,
   but only in the three places §2 allows it: bands, fields and accents. */
.lk-hero{position:relative}
.lk-hero__photo{position:relative;min-height:clamp(340px,48vw,560px);background-color:var(--dc-photo-well);
  background-image:var(--photo,none);background-size:cover;background-position:center;overflow:hidden}
/* No photo yet: a sunny field and a big beach drawing, not a dark well. */
.lk-hero__photo--none{background-color:color-mix(in srgb,var(--accent) 30%,var(--dc-white))}
.lk-hero__art{position:absolute;right:6%;top:8%;width:clamp(140px,26vw,300px);height:clamp(140px,26vw,300px);
  color:color-mix(in srgb,var(--accent) 60%,var(--dc-black));opacity:.55}
.lk-hero__art .g-i{width:100%;height:100%;stroke-width:1.2}
.lk-hero__bands{position:absolute;left:0;right:0;bottom:0}
.lk-hero__title{background:rgba(var(--accent-rgb),.88);padding:clamp(16px,2.4vw,28px) var(--page-pad)}
.lk-hero__title h1{color:var(--dc-black);margin:0}
.lk-hero__meta{background:var(--dc-purple);padding:clamp(12px,1.6vw,20px) var(--page-pad)}
.lk-hero__meta p{margin:0;color:var(--dc-black);font-family:var(--font-display);font-weight:700;max-width:none}
.lk-credit{font-size:var(--text-meta);color:var(--muted);margin:6px 0 0}
.lk-credit--hero{position:absolute;right:10px;top:8px;margin:0;background:rgba(255,255,255,.85);color:var(--dc-black);padding:2px 8px}

.lk-body{padding-bottom:var(--s6)}
.lk-intro{display:flex;gap:var(--s3);align-items:flex-start;justify-content:space-between;flex-wrap:wrap;margin:var(--s4) 0 var(--s3)}
.lk-lead{font-size:var(--text-lead);margin:0;max-width:52ch}

.lk-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:var(--s1);margin:0 0 var(--s2)}
.lk-fact{display:flex;flex-direction:column;padding:var(--s2);color:var(--dc-black);font-family:var(--font-display);
  background:color-mix(in srgb,var(--accent) 22%,var(--dc-white))}
.lk-fact:nth-child(even){background:color-mix(in srgb,var(--dc-purple) 30%,var(--dc-white))}
.lk-fact__big{font-size:clamp(1.5rem,3vw,2rem);font-weight:700;line-height:1.1}
.lk-fact span:last-child{font-size:var(--text-small);font-weight:700}
/* The emergency number is a way in to the panel: its label is underlined like a link. */
.lk-fact--link{text-decoration:none}
.lk-fact--link span:last-child{text-decoration:underline}

.lk-sec{margin-top:var(--s6)}
.lk-h{font-size:clamp(1.5rem,3.2vw,2.1rem);margin:0 0 var(--s3);display:flex;align-items:center}
.lk-note{margin:calc(-1 * var(--s2)) 0 var(--s3);color:var(--muted);font-size:var(--text-small)}

/* The maps: coastline from the static SVG, painted here with the tokens. */
.lk-maps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s3)}
.lk-map{margin:0;border:1px solid var(--line)}
.lk-map figcaption{font-family:var(--font-display);font-weight:700;font-size:var(--text-small);padding:8px 12px;border-top:1px solid var(--line)}
.lk-map__svg{display:block;width:100%;height:auto}
.lk-map__sea{fill:color-mix(in srgb,var(--accent) 22%,var(--dc-white))}
.lk-map__land{fill:var(--dc-white);stroke:var(--dc-purple);stroke-width:2.5;stroke-linejoin:round}
.lk-map__label{font-family:var(--font-display);font-weight:700;font-size:26px;fill:var(--dc-black);
  paint-order:stroke;stroke:var(--dc-white);stroke-width:6px}
.lk-map__label--sea{font-style:italic;font-weight:400;fill:color-mix(in srgb,var(--accent) 45%,var(--dc-black));stroke:none}
.lk-map__label--area{font-size:34px}
.lk-map__frame{fill:none;stroke:var(--dc-black);stroke-width:3;stroke-dasharray:8 6}
.lk-pin circle{fill:var(--dc-black);stroke:var(--dc-white);stroke-width:4}
.lk-pin text{fill:var(--dc-white);font-family:var(--font-display);font-weight:700;font-size:24px}
/* Pins are links to their cards. */
.lk-pin{cursor:pointer}
.lk-pin:focus-visible circle{stroke:var(--dc-black);stroke-width:8}
/* The contents stay on screen: one row that scrolls sideways, white with a
   hairline under it (a black bar here would be a second masthead, §10). */
.lk-toc{position:sticky;top:0;z-index:5;background:var(--dc-white);border-bottom:1px solid var(--line);
  flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;margin-inline:calc(-1 * var(--page-pad));padding-inline:var(--page-pad)}
/* overflow-x clips anything outside the bar, so the focus ring goes inside. */
.lk-toc a:focus-visible{outline-offset:-3px}
.lk-hotel path{fill:var(--accent);stroke:var(--dc-black);stroke-width:3;stroke-linejoin:round}
.lk-hotel text{font-family:var(--font-display);font-weight:700;font-size:28px;fill:var(--dc-black);
  paint-order:stroke;stroke:var(--dc-white);stroke-width:6px}

/* The cards: a photograph, or a tinted panel with a big drawing until one
   is uploaded — bright from day one, never a grey hole. */
.lk-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:var(--s3)}
.lk-card{display:flex;flex-direction:column;border:1px solid var(--line);background:var(--dc-white);min-width:0}
.lk-card__photo{position:relative;aspect-ratio:16/10;background-color:var(--dc-photo-well);
  background-image:var(--photo,none);background-size:cover;background-position:center}
.lk-card__photo--none{display:flex;align-items:center;justify-content:center}
/* The photo is an <img> (lazy) filling the well. */
.lk-card__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
/* A card a map pin jumped to says so. */
.lk-card:target{outline:3px solid var(--dc-black);outline-offset:2px}
.lk-tint--see{background-color:color-mix(in srgb,var(--accent) 28%,var(--dc-white))}
.lk-tint--eat{background-color:color-mix(in srgb,var(--dc-purple) 38%,var(--dc-white))}
.lk-tint--shop{background-color:color-mix(in srgb,var(--accent) 16%,var(--dc-white))}
.lk-tint--care{background-color:color-mix(in srgb,var(--dc-purple) 22%,var(--dc-white))}
.lk-tint--stay{background-color:color-mix(in srgb,var(--accent) 22%,var(--dc-white))}
.lk-card__art{width:64px;height:64px;color:var(--dc-black);opacity:.7}
.lk-card__art .g-i{width:100%;height:100%;stroke-width:1.4}
.lk-card__pin{position:absolute;left:10px;top:10px;min-width:32px;height:32px;border-radius:50%;padding:0 6px;
  display:inline-flex;align-items:center;justify-content:center;background:var(--dc-black);color:var(--dc-white);
  font-family:var(--font-display);font-weight:700;font-size:15px;border:2px solid var(--dc-white);
  text-decoration:none;z-index:1}
/* The badge is a link back to the map; its tap area is 44px, not its 32px
   disc. The overlay measures from inside the 2px border: 28 + 2×8. */
.lk-card__pin::after{content:"";position:absolute;inset:-8px}
.lk-card__body{padding:var(--s2);display:flex;flex-direction:column;gap:6px;flex:1}
.lk-card h3{margin:0;font-size:1.15rem;display:flex;align-items:center;gap:10px}
.lk-card__area{margin:0;font-size:var(--text-small);color:var(--muted)}
.lk-card__desc{margin:0;font-size:16px;line-height:1.55}
.lk-card__links{display:flex;flex-wrap:wrap;gap:var(--s2);margin-top:auto;padding-top:6px}
.lk-card__links a{display:inline-flex;align-items:center;gap:6px;font-family:var(--font-display);font-weight:700;font-size:var(--text-small);
  min-height:44px}
.lk-card__links .g-i{width:16px;height:16px}

/* offline.php (the service worker's no-connection page). */
.offline-links{display:flex;flex-wrap:wrap;gap:var(--s2)}
.offline-links .btn{margin:0;text-align:center}

/* In an emergency: the one solid blue field on the page, black type. */
.lk-sos{background:var(--accent);color:var(--dc-black);padding:clamp(20px,3vw,32px);margin-bottom:var(--s4)}
.lk-sos__lead{display:flex;align-items:center}
.lk-sos h2{margin:0;font-size:clamp(1.6rem,4vw,2.6rem);color:var(--dc-black)}
.lk-sos__nums{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s2);margin-top:var(--s3)}
.lk-sos__num{display:flex;flex-direction:column;background:var(--dc-white);color:var(--dc-black);padding:var(--s2);text-decoration:none}
.lk-sos__num strong{font-family:var(--font-display);font-size:clamp(2rem,5vw,3rem);line-height:1}
.lk-sos__num span{font-size:var(--text-small);font-weight:700;font-family:var(--font-display);margin-top:4px}
.lk-sos__num:hover{outline:3px solid var(--dc-black)}
.lk-sos__contact{margin:var(--s2) 0 0;max-width:none}
.lk-sos__contact a{color:var(--dc-black)}

/* Organiser-written sections (admin → Pages): an <ol> becomes numbered
   step cards, a <ul> becomes tiles, tables get hairlines and scroll inside
   their own box on a phone. */
.lk-text .rich{max-width:none}
.lk-text .rich > p{max-width:70ch}
.lk-text .rich ol,.lk-text .rich ul{list-style:none;padding:0;margin:0 0 var(--s2);display:grid;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:var(--s2)}
.lk-text .rich li{background:var(--dc-white);border:1px solid var(--line);border-left:5px solid var(--dc-purple);
  padding:14px 16px;margin:0;font-size:16px;line-height:1.55}
.lk-text .rich ol{counter-reset:lkstep}
.lk-text .rich ol li{counter-increment:lkstep;border-left-color:var(--accent);position:relative;padding-left:62px}
.lk-text .rich ol li::before{content:counter(lkstep);position:absolute;left:14px;top:14px;width:34px;height:34px;
  display:flex;align-items:center;justify-content:center;background:var(--accent);color:var(--dc-black);
  font-family:var(--font-display);font-weight:700}
.lk-text .rich table{display:block;overflow-x:auto;border-collapse:collapse;margin:0 0 1em;max-width:100%}
.lk-text .rich th,.lk-text .rich td{text-align:left;vertical-align:top;padding:10px 16px 10px 0;border-bottom:1px solid var(--line);font-size:16px}
.lk-text .rich img{max-width:100%;height:auto}

@media(max-width:800px){
  .lk-maps{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:560px){
  /* Cards as compact rows on a phone: a 112px square photo (or its tinted
     well) beside the text, instead of a 208px photo over it — the cards
     were twelve screens. Credits stay under the text. */
  .lk-card{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:start}
  .lk-card__photo,.lk-card__photo--none{aspect-ratio:1/1}
  .lk-card__art{width:40px;height:40px}
  .lk-card__body{padding:12px}
  .lk-card h3 .g-ic{display:none}      /* the photo or its well already carries the icon */
  .lk-card__pin{left:6px;top:6px;min-width:28px;height:28px;font-size:13px}
  .lk-card__pin::after{inset:-10px}   /* 24 + 2×10 = 44 */
  /* Pins 1.4× on a phone: at 375px a 1000-wide map draws them 15px across.
     langkawi_map_spread() keeps them apart at this size — change together. */
  .lk-pin__mark{transform:scale(1.4)}
  .lk-sos__nums{grid-template-columns:minmax(0,1fr)}
  .lk-sos__num{flex-direction:row;align-items:baseline;gap:var(--s2)}
}

/* ── Responsive ───────────────────────────────────────────────────────*/
@media(max-width:900px){
  .grid-3,.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .venue{grid-template-columns:minmax(0,1fr)}
  .venue__panel{padding-inline:var(--page-pad)}
  .venue__photo{min-height:280px}

}
@media(max-width:640px){
  /* The band device is the thing most likely to break at 360px. (§11) */
  .hero__photo{min-height:300px}
  .hero__band--title h1{font-size:clamp(1.75rem,8vw,2.4rem)}
  .sess{flex-direction:column;gap:var(--s1)}
  .sess .side{align-items:flex-start;flex-direction:row;flex-wrap:wrap}
  .companion-row{grid-template-columns:1fr}
}
@media(max-width:359px){
  /* Narrower than any current phone but the smallest: let the row scroll. */
  .portal-tabs{overflow-x:auto}
}
@media(max-width:600px){
  .grid-3,.grid-4{grid-template-columns:minmax(0,1fr)}
  /* Five tabs on one row from 360px: smaller type, and the spare width
     shared out between them rather than a fixed gap. */
  .portal-tabs{flex-wrap:nowrap;justify-content:space-between;column-gap:8px}
  .portal-tabs a{font-size:.875rem;white-space:nowrap}
  .site-header__logo img{height:48px}
  /* Only the button that saves or commits goes full width. It used to be
     every button, which turned Search, "Size chart" and a map link into
     57px bars competing with the one action that matters on the screen. */
  body.public .btn-primary:not(.btn-sm),body.public .btn--primary:not(.btn-sm){width:100%;text-align:center}
  /* Same specificity as the rule above, and later, so it wins: the hero's
     two buttons share the row instead of one full-width bar over another. */
  body.public .site-header .btn{width:auto}
  body.public .hero__actions .btn{width:auto;flex:1 1 0;padding-inline:12px}
  .hero__actions{padding-block:var(--s3)}
  /* Speakers two to a row, square wells: a full-width 5:6 well per speaker
     was a screen of dark box each. */
  .reg-row{padding-block:12px}
  .speakers{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s2)}
  .speakers .speaker__portrait{aspect-ratio:1/1}
  .speakers .speaker h3{font-size:var(--text-lead)}
  /* The resort photograph (or its empty well) at 16:9 rather than 280px. */
  .venue__photo{min-height:0;aspect-ratio:16/9}

  /* Portal on a phone: sections separated by a hairline instead of framed
     cards — the frame and its padding cost a fifth of the screen's width —
     and less air between form sections. */
  body.portal .pub-card{border:0;border-radius:0;border-top:1px solid var(--line);
    padding:var(--s3) 0 0;margin:var(--s3) 0}
  /* The header or the tab bar already draws the line above the first one. */
  body.portal .pub-main > .pub-card:first-child,
  body.portal .portal-tabs + .pub-card,
  body.portal .portal-tabs + .grid > :first-child > .pub-card:first-child{border-top:0;padding-top:0}
  body.portal .pub-card h2{font-size:var(--text-lead)}
  body.portal .form-page .fieldset + .fieldset{margin-top:var(--s4);padding-top:var(--s4)}
  body.portal .fieldset legend{font-size:var(--text-lead)}
  body.portal .check-detail{margin-left:0}
  .sess .title{font-size:var(--text-lead)}
  /* One line for the time on a phone: "09:00 – 10:30", not two. */
  .sess .time small{display:inline;margin-left:4px}
}

/* ── Print ────────────────────────────────────────────────────────────
   Delegates print the agenda. (§11) */
@media print{
  .site-header,.site-nav,.foundation-bar,.no-print{display:none !important}
  body.public{background:var(--dc-white)}
  .section{padding-block:var(--s3);break-inside:avoid}
  .sess{break-inside:avoid}
  a{text-decoration:none}
}

/* ── Contact card ─────────────────────────────────────────────────────
   The page behind the badge QR, shown to a stranger who just scanned a
   lanyard. One column, generous type: it is read at arm's length on a
   phone, usually one-handed, often standing up. */
.contact-card{max-width:32rem}
.contact-card h1{font-size:var(--text-h2);line-height:1.05;margin:0}
.contact-card__role{font-size:var(--text-lead);margin:var(--s1) 0 0}
.contact-card__org{font-weight:700;margin:var(--s1) 0 0}
.contact-card__bio{margin:var(--s3) 0 0;max-width:46ch}
.contact-card__rows{display:grid;grid-template-columns:auto 1fr;gap:6px var(--s3);
  margin:var(--s4) 0;align-items:baseline}
.contact-card__rows dt{font-family:var(--font-display);font-weight:700;
  font-size:var(--text-small);color:var(--muted)}
.contact-card__rows dd{margin:0;word-break:break-word}

/* Contact-card and directory photos. Every one is a PHOTO WELL first and an
   image second (DESIGN.md §7.5): the element keeps its box whether or not a
   picture exists, falling back to --dc-photo-well with the person's initials,
   so a card with no photo is a considered blank rather than a collapse. */
.contact-card__photo{width:112px;height:112px;border-radius:50%;overflow:hidden;
  background-color:var(--dc-photo-well);display:flex;align-items:center;
  justify-content:center;margin:0 0 var(--s3);flex-shrink:0}
.contact-card__photo img{width:100%;height:100%;object-fit:cover;display:block}
.contact-card__photo span{font-family:var(--font-display);font-weight:700;
  font-size:30px;color:#a8a8a8;letter-spacing:.02em}

.card-photo-row{display:flex;gap:var(--s4);align-items:flex-start;flex-wrap:wrap}
.card-photo{width:96px;height:96px;border-radius:50%;overflow:hidden;
  background-color:var(--dc-photo-well);display:flex;align-items:center;
  justify-content:center;flex-shrink:0}
.card-photo img{width:100%;height:100%;object-fit:cover;display:block}
.card-photo span{font-size:12px;color:#a8a8a8;text-align:center;padding:0 8px}
.card-photo-controls{flex:1;min-width:240px}

/* The directory row is a flex .sess that already sets gap:var(--s3), so the
   avatar needs no margin of its own — it just sits before .body. */
.dir-avatar{width:44px;height:44px;border-radius:50%;overflow:hidden;flex-shrink:0;
  background-color:var(--dc-photo-well);display:flex;align-items:center;
  justify-content:center}
.dir-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.dir-avatar span{font-family:var(--font-display);font-weight:700;font-size:14px;color:#a8a8a8}

/* The directory: one compact row per person — avatar, name and role, a
   small Message button — on a hairline. Never stacked into a column, so a
   phone shows several people per screen instead of one. */
.dir-country{font-size:var(--text-h4);margin:var(--s4) 0 var(--s1)}
.dir-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.dir-row__body{flex:1;min-width:0}
.dir-row__name{font-family:var(--font-display);font-weight:700;font-size:var(--text-lead);line-height:1.2}
.dir-row .meta{color:var(--muted);font-size:var(--text-small);margin-top:2px}
.dir-row__side{flex-shrink:0;text-align:right}
/* The note form opens under the row across its full width, not squeezed
   into the button's column. */
.dir-row:has(details[open]){flex-wrap:wrap}
.dir-row:has(details[open]) .dir-row__side{flex-basis:100%;text-align:left}
.dir-row__form{margin-top:8px;display:flex;flex-direction:column;gap:6px}
.dir-search{flex-wrap:nowrap;align-items:stretch}
.dir-search input{flex:1;min-width:0;max-width:24rem}
