/* The registration portal: mobile first, the show colors in --brand / --accent. */
:root {
  --brand: #1f3a5f; --accent: #e8a33d; --ink: #1d232b; --muted: #5b6573; --line: #dde2e8; --paper: #fff; --bg: #f4f6f8;
  --ok: #0a7b43; --err: #b3261e; --radius: 14px;
  /* A field's edge and the focus ring are told from the page at 3:1 or better. */
  --field: #6b7686; --focus: #1d232b;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--brand); color: #fff; border-bottom: 4px solid var(--accent); }
.top-in { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.brand { font-weight: 800; letter-spacing: .02em; font-size: 17px; }
.top .link { color: #fff; }
main { padding-top: 18px; padding-bottom: 32px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
h1 { font-size: 24px; margin: 0 0 6px; color: var(--brand); }
h2 { font-size: 17px; margin: 0 0 12px; color: var(--brand); }
h3 { font-size: 15px; margin: 0 0 4px; }
.lead { color: var(--muted); margin: 0 0 12px; }
label, .label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=tel], input[type=url], select {
  width: 100%; padding: 11px 12px; font-size: 16px; border: 1px solid var(--field); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.top :focus-visible { outline-color: #fff; }
[aria-invalid=true] { border-color: var(--err); }
/* A step's heading takes focus from the script so a screen reader announces the new step; it is not a control, so it shows no focus ring. */
[tabindex="-1"]:focus { outline: none; }
input.code { font-size: 26px; letter-spacing: .4em; text-align: center; max-width: 260px; }
.btn { display: inline-block; margin-top: 14px; padding: 12px 20px; font-size: 16px; font-weight: 700; color: #fff; background: var(--brand); border: 0; border-radius: 11px; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn.small { margin-top: 8px; padding: 8px 14px; font-size: 14px; }
.btn.big { width: 100%; font-size: 18px; padding: 15px; }
.link { background: none; border: 0; color: var(--brand); text-decoration: underline; font-size: 14px; padding: 4px 0; cursor: pointer; }
.row-links { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0 0; }
.status { min-height: 1.2em; margin: 0 0 10px; color: var(--muted); }
.status.err, .error { color: var(--err); font-weight: 600; }
.error:empty { display: none; }
.hello { border-left: 6px solid var(--accent); }
.hello p { margin: 4px 0 0; color: var(--muted); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 30%, #fff); color: var(--ink); font-size: 13px; font-weight: 700; margin-right: 6px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.tab { flex: 0 0 auto; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.tab[aria-selected=true] { background: var(--brand); color: #fff; border-color: var(--brand); }
.offerings { display: grid; gap: 10px; }
.offer { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.offer .head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.offer .price { font-weight: 800; font-size: 17px; white-space: nowrap; color: var(--brand); }
.offer .price s { color: var(--muted); font-weight: 600; font-size: 14px; margin-right: 6px; }
.offer .desc { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.offer .prices { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.offer .prices li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.offer .left { font-size: 13px; color: var(--muted); margin-top: 6px; }
.offer .sold { color: var(--err); font-weight: 700; }
.offer .opts { display: grid; gap: 6px; margin-top: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 8px 0; color: var(--ink); font-weight: 400; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.person { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.person .head { display: flex; justify-content: space-between; align-items: center; }
.grid2 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
.phone { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.radios { display: flex; gap: 18px; margin-top: 4px; }
.radios label { display: flex; gap: 6px; align-items: center; margin: 0; font-weight: 600; color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.consent { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.consent:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.cart-line { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.cart-line small { display: block; color: var(--muted); }
.cart-line .amt { white-space: nowrap; font-weight: 700; }
.offer-up { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 4px; padding: 10px 12px; border-radius: 8px; background: var(--bg); font-size: 14px; }
.offer-up p { margin: 0; }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; padding-top: 12px; }
.member-note { color: var(--ok); font-size: 13px; font-weight: 700; }
.foot { color: var(--muted); font-size: 13px; padding-bottom: 28px; }
@media (min-width: 640px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 28px; }
}

/* The show questions and the group. */
details.questions, details.group { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
details.questions summary, details.group summary { font-weight: 700; color: var(--brand); cursor: pointer; padding: 4px 0; }
textarea { width: 100%; padding: 11px 12px; font-size: 16px; border: 1px solid var(--field); border-radius: 10px; background: #fff; color: var(--ink); font-family: inherit; }
input[type=number], input[type=date], input[type=file] { width: 100%; padding: 10px 12px; font-size: 16px; border: 1px solid var(--field); border-radius: 10px; background: #fff; color: var(--ink); }
.help { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.q-lead { font-size: 14px; margin: 12px 0 4px; white-space: pre-line; }
.warn { color: #8a5a00; font-weight: 600; white-space: pre-line; }
.warn:empty { display: none; }
.held { color: var(--ok); font-weight: 700; font-size: 13px; margin-top: 6px; }

/* The session calendar (sign-up and the registration page): wider than the form. */

.offer.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.offer label.pick { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--ink); font-size: 15px; cursor: pointer; }
.offer label.pick input { margin-top: 4px; width: 18px; height: 18px; }
.total-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; margin-top: 10px; }
.grid2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.q-lead { white-space: pre-line; color: var(--muted); font-size: 13px; margin: 14px 0 4px; }
.opt { font-weight: 400; color: var(--muted); }
.done-item { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
.offer .price { white-space: normal; }
.offer, .offerings, .person { min-width: 0; overflow-wrap: anywhere; }

/* ADR-0412: keep the full ordered schedule readable on a phone. */
.class-list { max-height: 30rem; overflow-y: auto; border: 1px solid var(--line, #d9dfe6); border-radius: 8px; padding: 0 1rem 1rem; }
.class-list h4 { margin: 1.5rem 0 .75rem; }
.class-option { padding: .8rem 0; border-bottom: 1px solid var(--line, #d9dfe6); }
.class-option .check { align-items: start; }
.class-option label { font-weight: 500; overflow-wrap: anywhere; }
.class-option.unavailable .check { color: #626975; }
.class-reason { margin: .25rem 0 .5rem 1.6rem; font-size: .85rem; }
.class-option details { margin-left: 1.6rem; font-size: .9rem; }
.class-option summary { cursor: pointer; }
.chosen-classes { flex-basis: 100%; margin: .5rem 0; padding-left: 1.25rem; font-size: .85rem; }
.cart-line { flex-wrap: wrap; }

/* ADR-0415 D3: the three steps, in Mike's order. A hidden control stays hidden whatever its display rule. */
[hidden] { display: none !important; }
.steps { display: flex; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; counter-reset: none; }
.steps li { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 700; }
.steps li span { flex: 0 0 auto; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid currentColor; font-size: 13px; }
.steps li.now { color: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.steps li.done { color: var(--ink); }
.steps li.done span { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (max-width: 520px) { .steps li { flex-direction: column; text-align: center; gap: 4px; padding: 8px 4px; font-size: 12px; } }
.step-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.step-nav .btn { margin-top: 0; }
.total-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 17px; }
.total-bar strong { color: var(--brand); text-align: right; }
#pay-box { margin-top: 14px; }
.pay-frame { width: 100%; height: 360px; border: 0; display: block; }

/* ADR-0415 D5: inside a show website the frame is the page's own section: no app chrome, the host's
   colors and font (set from the embed snippet), the host column's width. */
html.embed { --bg: transparent; background: var(--bg); }
html.embed body { background: transparent; }
html.embed .top, html.embed .foot { display: none; }
html.embed .wrap { max-width: none; padding: 0 2px; }
html.embed main { padding-top: 2px; padding-bottom: 8px; }
.offer .prices li strong { white-space: nowrap; overflow-wrap: normal; flex: 0 0 auto; }
/* ADR-0416: the class calendar, in the PCB East session planner's layout (day tabs, a time column, lanes). */
.sched-views { display: flex; gap: 6px; margin: 8px 0; }
.sched-view { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.sched-view[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: #fff; }
.sched-refused { margin: 6px 0; color: #9a2617; font-weight: 600; }
.sched-refused:empty { display: none; }
.sched-tabs { display: flex; gap: 6px; padding-bottom: 4px; border-bottom: 3px solid var(--brand); }
.sched-tab { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; align-items: flex-start; padding: 8px 14px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: #f1f3f6; color: var(--ink); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.sched-tab small { font-size: 11px; font-weight: 600; min-height: 1em; color: var(--muted); }
.sched-tab[aria-selected=true] { background: var(--brand); border-color: var(--brand); color: #fff; }
.sched-tab[aria-selected=true] small { color: #fff; }
.sched-scroll { overflow: auto; max-height: 36rem; border: 1px solid var(--line); border-top: 0; background: #fafbfc; }
.sched-body { position: relative; display: flex; width: max-content; min-width: 100%; }
.sched-hours { position: sticky; left: 0; z-index: 2; flex: 0 0 72px; background: #fafbfc; border-right: 1px solid var(--line); }
.sched-hour { position: absolute; left: 8px; font-size: 12px; color: var(--muted); }
.sched-lanes { position: relative; flex: 1 1 auto; }
.sched-card { position: absolute; display: flex; flex-direction: column; gap: 2px; overflow: hidden; padding: 6px 8px; text-align: left; border: 1px solid #e3c99c; border-radius: 8px; background: #fbf3e4; color: var(--ink); font: inherit; cursor: pointer; }
.sched-card.free { background: #e4f3e8; border-color: #9fcfae; }
.sched-card.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.sched-card.held { background: #eceef1; border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.sched-card.separate { background: #ece9f7; border-color: #c3bce4; color: var(--ink); }
/* ADR-0419 D5: the key to the calendar's colours. */
.sched-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.sched-legend li { display: flex; align-items: center; gap: 6px; }
.sched-legend li:first-child { flex-basis: 100%; color: var(--ink); font-weight: 600; }
.sched-swatch { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 4px; border: 1px solid #e3c99c; background: #fbf3e4; }
.sched-swatch.on { background: var(--brand); border-color: var(--brand); }
.sched-swatch.free { background: #e4f3e8; border-color: #9fcfae; }
.sched-swatch.held { background: #eceef1; border-color: var(--line); }
.sched-swatch.separate { background: #ece9f7; border-color: #c3bce4; }
.sched-refused a, .class-reason a { color: var(--brand); font-weight: 700; }
.sched-time { font-size: 11px; font-weight: 700; }
.sched-title { font-size: 13px; font-weight: 800; line-height: 1.25; }
.sched-meta { font-size: 11px; color: var(--muted); }
.sched-mark { margin-top: auto; font-size: 11px; font-weight: 800; color: var(--brand); }
.sched-card.on .sched-meta, .sched-card.on .sched-mark { color: #fff; }
.sched-card.held .sched-mark { color: var(--muted); }
/* Every tab shares the width; a day wider than the box scrolls inside it, with a fade and an arrow as the cue. */
.sched-frame { position: relative; }
.sched-frame.more::after { content: '\203A'; position: absolute; top: 0; right: 0; bottom: 0; width: 44px; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; font-size: 28px; font-weight: 800; color: var(--brand); background: linear-gradient(to right, rgba(250,251,252,0), #fafbfc 70%); pointer-events: none; }
@media (max-width: 640px) { .sched-tab { padding: 6px 6px; font-size: 12px; } }

/* ADR-0421: the console's heat map, painted over the page; it never takes a click. */
.heat-layer { position: absolute; top: 0; left: 0; z-index: 2147483000; pointer-events: none; }
.heat-badge { position: fixed; right: 12px; bottom: 12px; z-index: 2147483001; padding: 8px 12px; border-radius: 8px; background: rgba(16,24,40,.88); color: #fff; font: 600 13px/1.3 system-ui, sans-serif; pointer-events: none; }

/* ADR-0432 D2: the details in titled sections; on a wide screen, two to four fields a row (twelve columns). */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.wide-form:not(.embed) .wrap { max-width: 1040px; }
.dgroup { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.dgroup:first-child { border-top: 0; padding-top: 0; margin-top: 4px; }
.dgroup h2 { margin: 0; }
.dgroup-hint { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.q { min-width: 0; }
@media (min-width: 720px) {
  /* Rows align at the top: a select is shorter than a text box in Safari, so bottom alignment would drop its label. */
  .drows { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 14px; align-items: start; }
  .drows > .q { grid-column: span 6; }
  .drows > .c2 { grid-column: span 2; }
  .drows > .c3 { grid-column: span 3; }
  .drows > .c4 { grid-column: span 4; }
  .drows > .c8 { grid-column: span 8; }
  .dgroup label, .dgroup .label { margin-top: 9px; }
  .consents { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
}

/* ADR-0432 D1: the address suggestion card, just under Address Line 1. */
.ac { position: relative; }
.ac-card { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--paper); border: 1px solid var(--field);
  border-radius: 12px; box-shadow: 0 10px 28px rgba(18,38,63,.18), 0 2px 6px rgba(18,38,63,.08); overflow: hidden; }
.ac-list { list-style: none; margin: 0; padding: 4px 0; max-height: 330px; overflow-y: auto; }
.ac-opt { display: flex; flex-direction: column; padding: 10px 14px; cursor: pointer; min-height: 44px; }
.ac-opt .l1 { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ac-opt .l2 { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ac-opt[aria-selected=true] { background: color-mix(in srgb, var(--accent) 18%, #fff); box-shadow: inset 4px 0 0 var(--accent); }
.ac-foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); padding: 8px 14px; background: var(--bg); }
.ac-manual { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13px; color: var(--brand); text-decoration: underline; cursor: pointer; }
.ac-help { font-size: 12.5px; color: var(--muted); margin: 5px 0 0; }
.filled { animation: filled 1.6s ease-out; }
@keyframes filled { from { background: color-mix(in srgb, var(--accent) 22%, #fff); } to { background: #fff; } }
@media (prefers-reduced-motion: reduce) { .filled { animation: none; } }
