/* IFC 2026 Session Feedback
   Styled after resource-alliance.org: white page, black type, IFC orange,
   square buttons with a thick black border and a hard offset shadow.
   BRAND COLOURS: change these lines to re-skin the whole form. */
:root {
  --bg: #ffffff;
  --surface: #f4f4f4;     /* cards and inputs (same grey as the RA site) */
  --surface-2: #ebebeb;   /* hover */
  --ink: #000000;         /* text, borders, button shadows */
  --muted: #545454;       /* secondary text (7:1 on white) */
  --accent: #f18500;      /* RA orange: fills, bars, stars. Too light for text on white */
  --accent-soft: #f4a341; /* RA hero orange */
  --accent-text: #a85300; /* orange for TEXT on white (5.4:1, passes accessibility) */

  --line: #d6d6d6;
  --danger: #b3261e;
  --ok: #1b7a3a;
  --radius: 4px;
  --font: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Source Sans 3 (the current name of Source Sans Pro), self-hosted so no visitor
   data goes to Google. SIL Open Font License. */
@font-face { font-family: "Source Sans 3"; src: url("assets/fonts/source-sans-3-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("assets/fonts/source-sans-3-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("assets/fonts/source-sans-3-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Brand bar: logos */
/* Orange like the IFC 2026 hero on resource-alliance.org, so the white logos show */
.brandbar { background: var(--accent); border-bottom: 3px solid var(--ink); }
.brandbar-inner {
  max-width: 560px; margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px;
}
.brandbar a { display: contents; }
.brandbar img { display: block; width: auto; max-width: 50%; object-fit: contain; object-position: left center; }
#logoLeft { height: 26px; }                                  /* IFC 2026 */
.brandbar .logo-event { height: 34px; object-position: right center; } /* Presented by the Resource Alliance */
@media (min-width: 600px) { #logoLeft { height: 34px; } .brandbar .logo-event { height: 44px; } }

/* Banner image: wide and short so the search stays above the fold on phones */
/* White line between the orange logo bar and the photo (covers the bar's black edge) */
.hero { position: relative; margin-top: -3px; border-top: 3px solid #fff; background: var(--accent-soft); }
.hero img { display: block; width: 100%; height: 165px; object-fit: cover; object-position: 50% 45%; }
@media (min-width: 600px) { .hero img { height: 280px; object-position: 50% 32%; } }

.wrap {
  max-width: 560px; margin: 0 auto;
  padding: 20px 16px max(24px, env(safe-area-inset-bottom));
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}

/* Title with the RA orange side bar */
.top { margin: 4px 0 20px; padding-left: 12px; border-left: 5px solid var(--accent); }
.kicker { margin: 0 0 2px; color: var(--accent-text); font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0; font-size: 28px; line-height: 1.1; font-weight: 700; text-transform: uppercase; }
h2 { font-weight: 700; }

.banner {
  margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius);
  background: #fff4e5; border-left: 4px solid var(--accent); font-size: 15px;
}

/* "Is this your session?" from a room sign */
.room-ask { margin: 0 0 26px; padding: 18px; background: #fff4e5; border-left: 5px solid var(--accent); }
.room-q { margin: 0 0 12px; font-size: 19px; font-weight: 700; }
.room-card { background: var(--bg); padding: 14px 16px; margin-bottom: 16px; }
.room-btns { display: grid; gap: 8px; }
.room-btns .link { justify-self: center; }
.room-none { margin: 0; font-size: 16px; }

/* Search */
.search-label { display: block; font-size: 20px; font-weight: 700; }
.hint { margin: 4px 0 12px; color: var(--muted); font-size: 15px; }
.search { position: relative; }
.search input {
  width: 100%; height: 56px; padding: 0 48px 0 46px;
  background: var(--bg); border: 2px solid var(--ink); border-radius: 0;
  font-size: 18px; /* 16px+ stops iOS zooming in on focus */
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; box-shadow: -4px 5px 0 var(--accent); }
.search input::-webkit-search-cancel-button { display: none; }
.search-icon { position: absolute; left: 14px; top: 16px; width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.clear {
  position: absolute; right: 4px; top: 4px; width: 48px; height: 48px;
  background: none; border: 0; display: grid; place-items: center;
}
.clear svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; }
.status { margin: 10px 2px 0; min-height: 1.4em; color: var(--muted); font-size: 14px; }
.list-heading { margin: 14px 0 8px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.list-heading::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--accent); vertical-align: 1px; }

/* Results */
.results { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.result {
  width: 100%; text-align: left; padding: 14px 16px; min-height: 64px;
  background: var(--surface); border: 0; border-left: 5px solid transparent; border-radius: var(--radius);
  display: block; transition: background .12s, border-color .12s;
}
.result:hover, .result:focus-visible { background: var(--surface-2); border-left-color: var(--accent); }
.result:active { transform: scale(.99); }
.r-title { display: block; font-weight: 700; font-size: 18px; line-height: 1.25; }
.r-speakers { display: block; margin-top: 3px; font-size: 15px; }
.r-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.r-room { color: var(--accent-text); font-weight: 700; }
.r-done { color: var(--ok); font-weight: 700; }
.result.locked { opacity: .55; cursor: not-allowed; border-left-color: transparent; background: var(--surface); }
.r-locked { flex-basis: 100%; color: var(--ink); font-weight: 600; }
.slot-locked > summary { color: var(--muted); }
.group .list-heading { margin-top: 10px; }
.group + .group { margin-top: 0; }
mark { background: rgba(241, 133, 0, .28); color: inherit; padding: 0 1px; }

.day-group { margin-top: 18px; }
.day-group > h3 { margin: 0 0 8px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.slot { margin-bottom: 8px; border: 2px solid var(--ink); }
.slot > summary {
  list-style: none; padding: 14px 16px; min-height: 52px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700;
}
.slot > summary::-webkit-details-marker { display: none; }
.slot > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); flex: none; transition: transform .15s; }
.slot[open] > summary { background: var(--surface); }
.slot[open] > summary::after { transform: rotate(-135deg); }
.slot-count { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 14px; }
.slot .results { margin: 0; padding: 8px; }

.alt-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 18px 0 8px; }
.link { background: none; border: 0; padding: 10px 2px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; font-size: 15px; min-height: 44px; }
.link:hover { color: var(--accent-text); }

/* Selected session */
.chosen { padding: 14px 16px; background: var(--surface); border-left: 5px solid var(--accent); margin-bottom: 22px; }
.chosen-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.chosen-label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); font-weight: 700; }
.chosen .link { padding: 0; min-height: 0; font-size: 14px; }
.manual-input { width: 100%; margin-top: 8px; padding: 12px 14px; background: var(--bg); border: 2px solid var(--ink); border-radius: 0; font-size: 17px; }
.manual-input:focus { outline: none; box-shadow: -4px 5px 0 var(--accent); }

/* Questions */
.q { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.q legend, .q > label { display: block; padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 18px; }
.req { color: var(--accent-text); }
.q.invalid legend, .q.invalid > label { color: var(--danger); }
.q-help { margin: -4px 0 12px; font-size: 15px; color: var(--muted); font-weight: 400; }
.name-input { width: 100%; height: 52px; padding: 0 14px; background: var(--bg); border: 2px solid var(--ink); border-radius: 0; font-size: 17px; }
.name-input:focus { outline: none; box-shadow: -4px 5px 0 var(--accent); }
.q-error { margin: 6px 0 0; color: var(--danger); font-size: 14px; font-weight: 700; }

.stars { display: flex; gap: 6px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label {
  flex: 1; height: 54px; max-width: 76px; display: grid; place-items: center;
  background: var(--surface); cursor: pointer; transition: background .1s;
}
.stars label:hover { background: var(--surface-2); }
.stars svg { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; transition: fill .1s, transform .1s; }
.stars label.on svg { fill: var(--accent); }
.stars input:checked + label svg { transform: scale(1.12); }
.stars input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; }
.scale-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--muted); max-width: calc(76px * 5 + 24px); }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choices label {
  padding: 10px 18px; min-height: 48px; display: inline-flex; align-items: center;
  background: var(--bg); border: 2px solid var(--ink); cursor: pointer; font-weight: 600;
}
.choices label:hover { background: var(--surface); }
.choices input:checked + label { background: var(--accent); box-shadow: -3px 4px 0 var(--ink); }
.choices input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; }

.q textarea {
  width: 100%; min-height: 88px; padding: 12px 14px; resize: vertical;
  background: var(--bg); border: 2px solid var(--ink); border-radius: 0; font-size: 17px;
}
.q textarea::placeholder { color: var(--muted); }
.q textarea:focus { outline: none; box-shadow: -4px 5px 0 var(--accent); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* RA-style button: white, thick black border, hard black shadow */
.primary {
  width: calc(100% - 6px); margin-left: 6px; height: 58px;
  background: var(--bg); color: var(--ink); border: 3px solid var(--ink); border-radius: 0;
  box-shadow: -5px 6px 0 var(--ink);
  font-weight: 700; font-size: 19px; text-transform: uppercase; letter-spacing: .03em;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .12s, transform .06s, box-shadow .06s;
}
.primary::after {
  content: "→"; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg);
  display: grid; place-items: center; font-size: 16px; line-height: 1;
}
.primary:hover { background: var(--accent); }
.primary:active { transform: translate(-3px, 4px); box-shadow: -2px 2px 0 var(--ink); }
.primary:disabled { opacity: .6; cursor: progress; }
.form-error { margin: 0 0 12px; color: var(--danger); font-size: 15px; font-weight: 700; }
.form-error:empty { display: none; }
.privacy { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

/* Done */
#stepDone { text-align: center; padding-top: 24px; outline: none; }
.done-mark { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ink); display: grid; place-items: center; }
.done-mark svg { width: 38px; height: 38px; fill: none; stroke: var(--ink); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
#stepDone h2 { margin: 0 0 6px; font-size: 28px; text-transform: uppercase; }
#stepDone p { margin: 0 0 28px; color: var(--muted); }

.ico { width: 1.1em; height: 1.1em; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.help { margin: 0 0 10px; font-size: 14px; color: var(--ink); }
.help a { color: var(--ink); font-weight: 700; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Home screen tip on the thank-you screen */
.tip { margin: 36px 0 0; padding: 18px 18px 6px; text-align: left; background: var(--surface); border-left: 5px solid var(--accent); }
.tip h3 { margin: 0 0 4px; font-size: 18px; }
#stepDone .tip p { margin: 0 0 12px; color: var(--ink); }
.tip .tip-steps { font-size: 15px; }
#stepDone .tip .tip-more { font-size: 13px; color: var(--muted); }
.foot p { margin: 0 0 6px; }
.foot a[href='privacy.html'] { color: var(--ink); }
.secondary {
  margin: 4px 0 14px; padding: 0 18px; height: 46px; background: var(--bg); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: -3px 4px 0 var(--ink); font-weight: 700;
}
.secondary:hover { background: var(--accent); }

.foot { margin-top: auto; padding-top: 36px; text-align: center; font-size: 12px; color: var(--muted); }
.foot a { color: var(--muted); }
.noscript { padding: 16px; text-align: center; }

@media (min-width: 600px) {
  .wrap { padding-top: 32px; }
  h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
