/* The client questionnaire (intake-player.js) — one question at a time, on
   the brief page and on the client's own link.

   Its own tokens on .iq, so the same sheet works inside the builder (app.css
   loaded) and on the bare client page (intake.html). The cloth is the
   Slashboom colours without the side menu's starfield and grid: black ground,
   dark-grey panels, yellow for what is picked and the one action that moves
   you on, red for where you are and what is needed — Manrope, and no rounded
   corners anywhere.

   The rail down the left shows how far along you are: a percentage, a yellow
   bar, and every section with its count (yellow edge when done, red edge on
   the one you are in). The question panel fills the rest of the width.

   The move between questions is the point: the answered card drifts left as
   it fades away, while the next comes in from the right. Back runs it the
   other way. Reduced motion turns both into a plain swap. */
.iq {
  --iq-black: #0A0A0A;
  --iq-panel: #161616;
  --iq-panel-2: #1F1F1F;
  --iq-panel-3: #262626;
  --iq-ink: #F4F4F4;
  --iq-muted: rgba(255, 255, 255, .68);
  --iq-subtle: rgba(255, 255, 255, .46);
  --iq-line: rgba(255, 255, 255, .16);
  --iq-line-soft: rgba(255, 255, 255, .08);
  --iq-yellow: #F5C518;
  --iq-yellow-hi: #FFD43B;
  --iq-yellow-soft: rgba(245, 197, 24, .12);
  --iq-red: #E2343F;
  --iq-red-soft: rgba(226, 52, 63, .14);
  --iq-danger: #FF6B6B;
  --iq-ease: cubic-bezier(.22, 1, .36, 1);
  --iq-spring: cubic-bezier(.34, 1.56, .5, 1);
  --iq-sans: "Manrope", "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: start; align-content: start; gap: 28px;
  width: min(1480px, 100%); font-family: var(--iq-sans); color: var(--iq-ink);
}
.iq *, .iq *::before, .iq *::after { box-sizing: border-box; border-radius: 0; }

/* ---- the rail on the left: how far along, and every section ---- */
.iq-head {
  position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px;
  padding: 22px 0 18px; background: var(--iq-panel); border: 1px solid var(--iq-line-soft); border-top: 3px solid var(--iq-yellow);
  transition: opacity .3s var(--iq-ease);
}
.iq-sum { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px; padding: 0 20px; }
.iq-sumk { font: 700 11px var(--iq-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--iq-subtle); }
.iq-pct { grid-row: 1 / 3; grid-column: 2; font: 800 34px/1 var(--iq-sans); letter-spacing: -.03em; color: var(--iq-yellow); font-variant-numeric: tabular-nums; }
.iq-tally { font-size: 13px; color: var(--iq-muted); font-variant-numeric: tabular-nums; }
.iq-progress { height: 4px; margin: 0 20px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.iq-progress i { display: block; height: 100%; width: 0; background: var(--iq-yellow); transition: width .5s var(--iq-ease); }
.iq-secs { display: flex; flex-direction: column; margin-top: 6px; }
.iq-sec {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%;
  padding: 11px 20px 11px 17px; border: 0; border-left: 3px solid transparent; background: transparent;
  font: 600 14px/1.3 var(--iq-sans); color: var(--iq-muted); text-align: left; cursor: pointer;
  transition: background .16s var(--iq-ease), color .16s var(--iq-ease), border-color .16s var(--iq-ease);
}
.iq-sec:hover { background: rgba(255, 255, 255, .05); color: var(--iq-ink); }
.iq-sec:focus-visible { outline: 2px solid var(--iq-yellow); outline-offset: -2px; }
.iq-snum { font: 700 11.5px var(--iq-sans); letter-spacing: .06em; color: var(--iq-subtle); font-variant-numeric: tabular-nums; }
.iq-stitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iq-scount { font-size: 12px; color: var(--iq-subtle); font-variant-numeric: tabular-nums; }
.iq-sec.done { border-left-color: var(--iq-yellow); color: var(--iq-ink); }
.iq-sec.done .iq-snum, .iq-sec.done .iq-scount { color: var(--iq-yellow); }
.iq-sec.on { border-left-color: var(--iq-red); background: var(--iq-panel-3); color: #FFFFFF; }
.iq-sec.on .iq-snum { color: var(--iq-red); }

/* ---- the stage: every card in one grid cell, so the leaving and the arriving
   one overlap while they pass ---- */
.iq-stage { display: grid; width: 100%; align-items: start; min-width: 0; }
.iq-card {
  grid-area: 1 / 1; min-width: 0;
  display: flex; flex-direction: column; gap: 14px;
  min-height: min(68vh, 720px);
  padding: 46px 56px 34px;
  background: var(--iq-panel); border: 1px solid var(--iq-line-soft); border-top: 3px solid var(--iq-red);
  outline: none;
}
.iq-card.from-right { animation: iq-in-right .5s var(--iq-ease) both; }
.iq-card.from-left  { animation: iq-in-left .5s var(--iq-ease) both; }
.iq-card.to-left    { animation: iq-out-left .38s cubic-bezier(.55, 0, .75, .2) both; pointer-events: none; }
.iq-card.to-right   { animation: iq-out-right .38s cubic-bezier(.55, 0, .75, .2) both; pointer-events: none; }
@keyframes iq-in-right  { from { opacity: 0; transform: translateX(70px); } }
@keyframes iq-in-left   { from { opacity: 0; transform: translateX(-70px); } }
@keyframes iq-out-left  { to { opacity: 0; transform: translateX(-90px); } }
@keyframes iq-out-right { to { opacity: 0; transform: translateX(90px); } }
.iq-card.from-right, .iq-card.from-left { animation-delay: .08s; }
.iq-card.shake { animation: iq-shake .42s var(--iq-ease); }
@keyframes iq-shake { 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

.iq-kicker { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font: 700 11.5px var(--iq-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--iq-yellow); }
.iq-kcount { color: var(--iq-subtle); font-weight: 600; letter-spacing: .08em; }
.iq-who { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 700; color: #FFFFFF; background: var(--iq-red-soft); border: 1px solid rgba(226, 52, 63, .5); padding: 2px 9px; }
.iq-secdesc { margin: -4px 0 4px; color: var(--iq-muted); font-size: 14px; }
.iq-title { margin: 4px 0 0; font: 800 clamp(26px, 2.5vw, 40px)/1.15 var(--iq-sans); letter-spacing: -.025em; color: #FFFFFF; text-wrap: balance; max-width: 30ch; }
.iq-req { color: var(--iq-red); margin-left: 6px; }
.iq-help { margin: 0; color: var(--iq-muted); font-size: 16px; line-height: 1.55; max-width: 70ch; }
.iq-field { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.iq-err { margin: 0; color: var(--iq-danger); font-size: 13.5px; font-weight: 700; }

/* Instagram: the question wears the Instagram mark, and the field its @ */
.iq-badge.ig {
  width: 46px; height: 46px; display: grid; place-items: center; color: #FFFFFF;
  background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FDF497 5%, #FD5949 45%, #D6249F 60%, #285AEB 90%);
  animation: iq-pop .5s var(--iq-spring) .2s both;
}
.iq-badge.ig svg { width: 26px; height: 26px; }
@keyframes iq-pop { from { opacity: 0; transform: scale(.6); } }

/* ---- fields ---- */
.iq input, .iq textarea, .iq select {
  font: 500 18px var(--iq-sans); color: var(--iq-ink); width: 100%;
  background: var(--iq-black); border: 1px solid var(--iq-line); padding: 15px 18px;
  transition: border-color .16s var(--iq-ease), box-shadow .2s var(--iq-ease), background .16s var(--iq-ease);
}
.iq select { color-scheme: dark; }
.iq input[type=date] { color-scheme: dark; }
.iq textarea { resize: vertical; min-height: 160px; line-height: 1.55; }
.iq input::placeholder, .iq textarea::placeholder { color: rgba(255, 255, 255, .32); }
.iq input:focus, .iq textarea:focus, .iq select:focus { outline: none; border-color: var(--iq-yellow); box-shadow: 0 0 0 1px var(--iq-yellow); }
.iq-line { position: relative; }
.iq-line.handle input { padding-left: 40px; }
.iq-at { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 700; color: var(--iq-subtle); pointer-events: none; }
.iq-date { max-width: 280px; }

/* a list of lines (services and the like): a number, the line, ✕ to remove */
.iq-lines { display: grid; gap: 8px; }
.iq-lrow { display: flex; align-items: center; gap: 10px; animation: iq-pop .22s var(--iq-ease); }
.iq-lnum { flex: none; width: 26px; font: 800 12px var(--iq-sans); letter-spacing: .06em; color: var(--iq-subtle); }
.iq-lrow input { flex: 1; min-width: 0; padding: 12px 16px; }
.iq-lrow .iq-fx { width: 34px; height: 34px; }
.iq-addline { margin: 10px 0 0 36px; }
.iq-addline span:first-child { font-size: 18px; line-height: 1; color: var(--iq-yellow); }
@media (prefers-reduced-motion: reduce) { .iq-lrow { animation: none; } }

/* options: tiles with a letter key; a pick goes yellow and ticks */
.iq-opts { display: grid; gap: 8px; }
.iq-opts.two { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.iq-opts.row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.iq-opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  font: 600 16px var(--iq-sans); color: var(--iq-ink);
  padding: 14px 16px; border: 1px solid var(--iq-line); background: var(--iq-panel-2);
  transition: border-color .16s var(--iq-ease), background .16s var(--iq-ease), color .16s var(--iq-ease), transform .2s var(--iq-ease);
}
.iq-opts.row .iq-opt { justify-content: center; padding: 22px 14px; font-size: 18px; }
.iq-opts.row .iq-key { display: none; }
.iq-opt:hover { background: var(--iq-panel-3); border-color: rgba(255, 255, 255, .4); }
.iq-opt:active { transform: scale(.985); transition-duration: .06s; }
.iq-opt:focus-visible { outline: 2px solid var(--iq-yellow); outline-offset: 2px; }
.iq-key {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  font: 700 12px var(--iq-sans); color: var(--iq-muted); border: 1px solid var(--iq-line); background: var(--iq-black);
  transition: background .16s var(--iq-ease), color .16s var(--iq-ease), border-color .16s var(--iq-ease);
}
.iq-olab { flex: 1; min-width: 0; }
.iq-tick { flex: none; width: 20px; height: 20px; color: var(--iq-yellow); opacity: 0; transform: scale(.5); transition: opacity .2s var(--iq-ease), transform .3s var(--iq-spring); }
.iq-opts.row .iq-tick { display: none; }
.iq-opt.on { border-color: var(--iq-yellow); background: var(--iq-yellow-soft); color: #FFFFFF; }
.iq-opt.on .iq-key { background: var(--iq-yellow); color: #000; border-color: var(--iq-yellow); }
.iq-opt.on .iq-tick { opacity: 1; transform: none; }
.iq-opt.picked { animation: iq-blink .34s var(--iq-ease); }
@keyframes iq-blink { 40% { box-shadow: 0 0 0 3px rgba(245, 197, 24, .35); } }
.iq-other { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--iq-ease), opacity .2s var(--iq-ease); opacity: 0; }
.iq-other > input { min-height: 0; overflow: hidden; }
.iq-other:not(.open) > input { padding-top: 0; padding-bottom: 0; border-width: 0; }
.iq-other.open { grid-template-rows: 1fr; opacity: 1; }
.iq-select { max-width: 460px; }

/* opening hours: a row a day — the day, an Open/Closed switch, from and to */
.iq-hours { display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.iq-hrow {
  display: grid; grid-template-columns: 120px 118px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  min-height: 58px; padding: 8px 14px; border: 1px solid var(--iq-line); background: var(--iq-panel-2);
  transition: border-color .16s var(--iq-ease), background .16s var(--iq-ease);
}
.iq-hrow.on { border-color: rgba(245, 197, 24, .5); background: var(--iq-yellow-soft); }
.iq-hday { font-size: 16px; color: #FFFFFF; }
.iq-htog {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 4px; cursor: pointer;
  font: 600 14px var(--iq-sans); color: var(--iq-muted); background: none; border: 0;
}
.iq-htog i {
  position: relative; flex: none; width: 38px; height: 22px; background: var(--iq-black); border: 1px solid var(--iq-line);
  transition: background .16s var(--iq-ease), border-color .16s var(--iq-ease);
}
.iq-htog i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--iq-subtle);
  transition: transform .24s var(--iq-spring), background .16s var(--iq-ease);
}
.iq-htog[aria-checked=true] { color: #FFFFFF; }
.iq-htog[aria-checked=true] i { background: var(--iq-yellow); border-color: var(--iq-yellow); }
.iq-htog[aria-checked=true] i::after { transform: translateX(16px); background: #000; }
.iq-htog:focus-visible { outline: 2px solid var(--iq-yellow); outline-offset: 2px; }
.iq-htimes { display: flex; align-items: center; gap: 10px; }
.iq .iq-htime { width: auto; min-width: 0; flex: 1; max-width: 150px; font-size: 15.5px; padding: 9px 12px; }
.iq-hto, .iq-hclosed { color: var(--iq-subtle); font-size: 14px; }
.iq-hrow.unset .iq-hclosed { font-style: italic; }
.iq-hsame { font: 600 13px var(--iq-sans); color: var(--iq-yellow); background: none; border: 0; padding: 4px 0; cursor: pointer; white-space: nowrap; }
.iq-hsame:hover { text-decoration: underline; }
.iq-hsame:focus-visible { outline: 2px solid var(--iq-yellow); outline-offset: 2px; }
.iq .iq-hnote { max-width: 760px; font-size: 16px; padding: 12px 16px; }
@media (max-width: 640px) {
  .iq-hrow { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .iq-htimes, .iq-hclosed, .iq-hsame { grid-column: 1 / -1; }
}

/* integrations: a tile per tool with its logo, on a white plate so every
   brand's mark reads; under the tiles, a box for each tool picked, saying how
   the site should work with it */
.iq-tools { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.iq-tool {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 104px; padding: 16px 8px 12px; cursor: pointer; text-align: center;
  font: 600 14px/1.2 var(--iq-sans); color: var(--iq-ink);
  border: 1px solid var(--iq-line); background: var(--iq-panel-2);
  transition: border-color .16s var(--iq-ease), background .16s var(--iq-ease), color .16s var(--iq-ease), transform .2s var(--iq-ease);
}
.iq-tool:hover { background: var(--iq-panel-3); border-color: rgba(255, 255, 255, .4); }
.iq-tool:active { transform: scale(.98); transition-duration: .06s; }
.iq-tool:focus-visible { outline: 2px solid var(--iq-yellow); outline-offset: 2px; }
.iq-tool .iq-key { position: absolute; top: 7px; left: 7px; width: 20px; height: 20px; font-size: 10.5px; }
.iq-tool .iq-tick { position: absolute; top: 7px; right: 7px; width: 18px; height: 18px; }
.iq-tool.on { border-color: var(--iq-yellow); background: var(--iq-yellow-soft); color: #FFFFFF; }
.iq-tool.on .iq-key { background: var(--iq-yellow); color: #000; border-color: var(--iq-yellow); }
.iq-tool.on .iq-tick { opacity: 1; transform: none; }
.iq-tlab { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iq-tlogo { flex: none; width: 64px; height: 38px; padding: 4px 6px; display: grid; place-items: center; background: #FFFFFF; }
.iq-tlogo img { max-width: 100%; max-height: 100%; width: auto; height: 28px; object-fit: contain; }
.iq-tlogo.mono { width: 38px; padding: 0; font: 800 15px var(--iq-sans); color: var(--iq-ink); background: var(--iq-panel-3); border: 1px solid var(--iq-line); }
.iq-thows { display: flex; flex-direction: column; gap: 8px; }
.iq-thows:empty { display: none; }
.iq-thow {
  display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border: 1px solid var(--iq-line-soft); border-left: 3px solid var(--iq-yellow); background: var(--iq-panel-2); animation: iq-row-in .3s var(--iq-ease);
}
.iq-thead { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.iq-thead .iq-tlogo { width: 42px; height: 26px; padding: 3px 4px; }
.iq-thead .iq-tlogo img { height: 20px; }
.iq-thead .iq-tlogo.mono { width: 26px; padding: 0; font-size: 12px; }
.iq .iq-thow textarea { min-height: 0; font-size: 15.5px; padding: 11px 14px; }
.iq .iq-thead .iq-tname { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; padding: 8px 12px; }

/* files: a drop zone and the list of what has gone up */
.iq-drop-btn {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
  padding: 40px 18px; border: 1.5px dashed rgba(255, 255, 255, .28); background: var(--iq-black);
  font: 500 13.5px var(--iq-sans); color: var(--iq-muted); text-align: center;
  transition: background .16s var(--iq-ease), border-color .16s var(--iq-ease);
}
.iq-drop-btn b { font-size: 17px; color: #FFFFFF; }
.iq-drop-ic { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 8px; color: #000; background: var(--iq-yellow); }
.iq-drop-ic svg { width: 20px; height: 20px; }
.iq-drop-btn:hover, .iq-drop.over .iq-drop-btn { background: var(--iq-panel-2); border-color: var(--iq-yellow); }
.iq-drop-btn:active { transform: scale(.995); transition-duration: .06s; }
.iq-drop-btn:focus-visible { outline: 2px solid var(--iq-yellow); outline-offset: 2px; }
.iq-files { display: flex; flex-direction: column; gap: 6px; }
.iq-file {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px;
  border: 1px solid var(--iq-line-soft); background: var(--iq-panel-2);
  animation: iq-row-in .3s var(--iq-ease); overflow: hidden;
}
@keyframes iq-row-in { from { opacity: 0; transform: translateY(4px); } }
.iq-fthumb { flex: none; width: 40px; height: 40px; overflow: hidden; display: grid; place-items: center; background: var(--iq-black); color: var(--iq-muted); }
.iq-fthumb img { width: 100%; height: 100%; object-fit: cover; }
.iq-fthumb svg { width: 18px; height: 18px; }
.iq-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--iq-ink); text-decoration: none; }
a.iq-fname:hover { text-decoration: underline; text-decoration-color: var(--iq-yellow); }
.iq-fsize { flex: none; font-size: 12px; color: var(--iq-subtle); font-variant-numeric: tabular-nums; }
.iq-fx { flex: none; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 1px solid transparent; background: transparent; color: var(--iq-muted); cursor: pointer; transition: background .16s var(--iq-ease), color .16s var(--iq-ease); }
.iq-fx svg { width: 13px; height: 13px; }
.iq-fx:hover { background: var(--iq-red-soft); color: var(--iq-danger); border-color: rgba(226, 52, 63, .5); }
.iq-fbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .08); }
.iq-fbar i { display: block; height: 100%; background: var(--iq-yellow); transition: width .2s linear; }

/* ---- the row at the foot of the card ---- */
.iq-nav { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 26px; }
.iq-nav.solo { justify-content: flex-start; }
.iq-nav.end { justify-content: space-between; flex-wrap: wrap; }
.iq-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.iq-hint { flex: 1; text-align: right; font-size: 12.5px; color: var(--iq-subtle); }
.iq-hint b { font-weight: 700; color: var(--iq-muted); }
.iq-btn {
  font: 700 14.5px var(--iq-sans); color: #FFFFFF; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, .4); background: transparent;
  transition: background .16s var(--iq-ease), border-color .16s var(--iq-ease), color .16s var(--iq-ease), opacity .16s, transform .2s var(--iq-ease);
}
.iq-btn svg { width: 15px; height: 15px; flex: none; }
.iq-btn:hover { background: #FFFFFF; border-color: #FFFFFF; color: #000; }
.iq-btn:active { transform: scale(.97); transition-duration: .06s; }
.iq-btn.primary { background: var(--iq-yellow); color: #000; border-color: var(--iq-yellow); }
.iq-btn.primary:hover { background: var(--iq-yellow-hi); border-color: var(--iq-yellow-hi); }
.iq-btn.primary svg { transition: transform .3s var(--iq-spring); }
.iq-btn.primary:hover svg { transform: translateX(3px); }
.iq-btn.ghost { border-color: transparent; color: var(--iq-muted); }
.iq-btn.ghost:hover { background: rgba(255, 255, 255, .08); border-color: var(--iq-line); color: #FFFFFF; }
.iq-btn.big { padding: 16px 32px; font-size: 16px; }
.iq-btn:disabled { opacity: .35; cursor: default; }
.iq-btn:disabled:hover { transform: none; background: transparent; border-color: transparent; color: var(--iq-muted); }
.iq-btn.primary:disabled:hover { background: var(--iq-yellow); color: #000; }
.iq-btn.loading { cursor: progress; }
.iq-btn.loading::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: iq-spin .7s linear infinite; }
@keyframes iq-spin { to { transform: rotate(360deg); } }
.iq-btn:focus-visible { outline: 2px solid var(--iq-yellow); outline-offset: 2px; }

.iq-intro { justify-content: center; }
.iq-intro .iq-title { font-size: clamp(32px, 3.4vw, 52px); max-width: 22ch; }
.iq-intro .iq-nav { margin-top: 10px; }
.iq-end { align-items: flex-start; justify-content: center; }
.iq-end .iq-nav { margin-top: 10px; }
.iq-done { width: 52px; height: 52px; display: grid; place-items: center; color: #000; background: var(--iq-yellow); animation: iq-pop .5s var(--iq-spring) .25s both; }
.iq-done svg { width: 24px; height: 24px; }
.iq-end .iq-nav { width: 100%; }

/* narrower: the rail folds into a strip above the card */
@media (max-width: 960px) {
  .iq { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .iq-head { position: static; padding: 14px 0 12px; }
  .iq-head.hide { display: none; }   /* the intro card stands alone on a phone */
  .iq-secs { display: none; }
  .iq-card { min-height: 0; padding: 32px 28px 24px; }
}
@media (max-width: 640px) {
  .iq-card { padding: 24px 18px 18px; }
  .iq-hint { display: none; }
  .iq-nav { justify-content: space-between; }
  .iq input, .iq textarea, .iq select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .iq-card.from-right, .iq-card.from-left, .iq-card.to-left, .iq-card.to-right, .iq-card.shake,
  .iq-badge.ig, .iq-done, .iq-file, .iq-thow, .iq-opt.picked { animation: none !important; }
  .iq-card.to-left, .iq-card.to-right { display: none; }
  .iq-btn, .iq-opt, .iq-sec, .iq-drop-btn, .iq-tool { transition: none; }
}

/* =================================================================== */
/* The brief page (index.html #bf-intake): the questionnaire comes first,
   under the header, with its own bar of team actions. While it is up the
   whole page goes to the questionnaire's black (#view-brief.on-intake), the
   header too. Continuing slides it away left and brings the brief in. */
#view-brief.on-intake { background: #0A0A0A; color: #F4F4F4; }
#view-brief.on-intake > .home-head { background: #000; border-bottom-color: rgba(255, 255, 255, .12); }
#view-brief.on-intake .brand-logo { filter: invert(1); }
#view-brief.on-intake .draft-status { color: rgba(255, 255, 255, .7); }
#view-brief.on-intake > .home-head .btn {
  border-radius: 0; background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .35); box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
#view-brief.on-intake > .home-head .btn:hover { background: var(--gold, #F5C518); border-color: var(--gold, #F5C518); color: #000; transform: none; box-shadow: none; }

.bf-intake {
  --bfi-yellow: #F5C518;
  --bfi-red: #E2343F;
  flex: 1; display: flex; flex-direction: column; align-items: center; padding: 26px 40px 70px; gap: 22px;
  font-family: "Manrope", "Hanken Grotesk", system-ui, sans-serif;
}
.bf-intake[hidden] { display: none; }
.bfi-bar {
  width: min(1480px, 100%); display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 12px 12px 20px;
  background: #161616; border: 1px solid rgba(255, 255, 255, .08); border-left: 3px solid var(--bfi-yellow);
}
.bfi-what { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.bf-intake .bfi-what b { font-size: 15px; font-weight: 800; color: #FFFFFF; letter-spacing: -.01em; }
.bfi-state { font-size: 12.5px; color: var(--muted, #2E2E2E); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity .12s; }
.bf-intake .bfi-state { color: rgba(255, 255, 255, .64); }
.bfi-state.fading { opacity: 0; }
.bfi-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: rgba(26, 26, 26, .25); }
.bf-intake .bfi-dot { border-radius: 0; background: rgba(255, 255, 255, .3); }
.bfi-dot.sent { background: var(--accent, #7B1E2E); box-shadow: 0 0 8px rgba(123, 30, 46, .6); animation: pulse 1.6s ease-in-out infinite; }
.bf-intake .bfi-dot.sent { background: var(--bfi-red); box-shadow: none; }
.bfi-dot.done { background: var(--ok, #0E8A5F); box-shadow: 0 0 8px rgba(14, 138, 95, .6); }
.bf-intake .bfi-dot.done { background: var(--bfi-yellow); box-shadow: none; }
.bfi-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.bf-intake .bfi-acts .btn {
  border-radius: 0; min-height: 40px; padding: 0 16px; font-family: inherit; font-weight: 700;
  background: transparent; color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .35); box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.bf-intake .bfi-acts .btn:hover { background: #FFFFFF; border-color: #FFFFFF; color: #000; transform: none; box-shadow: none; }
.bf-intake .bfi-acts .btn.ghost { border-color: transparent; color: rgba(255, 255, 255, .72); }
.bf-intake .bfi-acts .btn.ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #FFFFFF; }
.bf-intake .bfi-acts .btn.primary { background: var(--bfi-yellow); border-color: var(--bfi-yellow); color: #000; }
.bf-intake .bfi-acts .btn.primary:hover { background: #FFD43B; border-color: #FFD43B; }
.bf-intake .bfi-acts .btn.loading::before { border-radius: 50%; }
.bf-intake .iq { flex: 1; }
.bf-intake .iq-head { top: 86px; }
@media (max-width: 760px) { .bf-intake { padding: 18px 14px 50px; } }

.bf-intake.leaving { animation: iq-out-left .32s cubic-bezier(.55, 0, .75, .2) both; pointer-events: none; }
#view-brief .brief-split.in-right { animation: iq-in-right .56s var(--iq-ease, cubic-bezier(.22, 1, .36, 1)) both; }
#view-brief .bf-intake.in-left { animation: iq-in-left .56s cubic-bezier(.22, 1, .36, 1) both; }
@media (prefers-reduced-motion: reduce) {
  #view-brief .brief-split.in-right, #view-brief .bf-intake.in-left, .bf-intake.leaving { animation: none; }
}

/* the strip at the top of the brief that leads back to the questionnaire */
.bf-intake-strip {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px 12px 16px;
  border-radius: 16px; border: 1px solid var(--line, rgba(26, 26, 26, .14)); background: var(--glass, rgba(255, 255, 255, .62));
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow-rest), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.bf-intake-strip .bfi-ic { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #FFFFFF; background: var(--cta-grad); box-shadow: var(--bloom); }
.bf-intake-strip .bfi-ic svg { width: 16px; height: 16px; }
.bf-intake-strip .bfi-what b { font-size: 14px; }

/* ---- the question editor (#modal-intake-q) ---- */
.modal.iqe-modal { max-width: 820px; width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.iqe-top { padding: 22px 24px 12px; border-bottom: 1px solid var(--line-soft); }
.iqe-top h2 { margin: 0 0 4px; }
.iqe-top p { margin: 0; color: var(--muted); font-size: 13px; }
.iqe-top p.iqe-own { margin-top: 6px; color: var(--ink, inherit); }
.iqe-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px 20px; display: flex; flex-direction: column; gap: 16px; background: rgba(26, 26, 26, .03); }
.iqe-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 24px 16px; border-top: 1px solid var(--line-soft); }
.iqe-foot .grow { flex: 1; }
.iqe-sec { border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .55); padding: 12px; display: flex; flex-direction: column; gap: 10px; animation: iq-row-in .28s var(--ease-out); }
.iqe-sec-head { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; }
.iqe-sec-head .iqe-stitle { font-weight: 700; font-size: 15px; }
.iqe-sec-head .iqe-sdesc { grid-column: 1; font-size: 13px; }
.iqe-tools { display: flex; gap: 2px; grid-row: 1; grid-column: 2; }
.iqe-tool { width: 28px; height: 28px; padding: 0; border-radius: 50%; display: grid; place-items: center; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; transition: background .16s var(--ease-out), color .16s var(--ease-out), transform .32s var(--ease-spring); }
.iqe-tool svg { width: 14px; height: 14px; }
.iqe-tool:hover { background: #FFFFFF; border-color: var(--line); color: var(--ink); }
.iqe-tool:active { transform: scale(.9); transition-duration: .06s; }
.iqe-tool.del:hover { color: var(--danger-ink); background: var(--danger-bg); border-color: var(--danger-line); }
.iqe-tool:disabled { opacity: .3; pointer-events: none; }
.iqe-q {
  border-radius: 14px; border: 1px solid var(--line-soft); background: #FFFFFF; padding: 12px 12px 10px;
  display: grid; grid-template-columns: 1fr 190px auto; gap: 8px; align-items: start;
  border-left: 3px solid transparent; transition: border-color .16s var(--ease-out), box-shadow .25s var(--ease-out);
  animation: iq-row-in .28s var(--ease-out);
}
.iqe-q:focus-within { border-left-color: var(--accent); box-shadow: 0 4px 16px rgba(26, 26, 26, .08); }
.iqe-q .iqe-qtitle { font-weight: 600; }
.iqe-q .iqe-help, .iqe-q .iqe-opts, .iqe-q .iqe-row { grid-column: 1 / -1; }
.iqe-q .iqe-help { font-size: 13px; }
.iqe-q textarea.iqe-opts { font-size: 13px; min-height: 64px; resize: vertical; }
.iqe-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.iqe-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.iqe-row input[type=checkbox] { width: auto; }
.iqe-row select { width: auto; padding: 5px 30px 5px 10px; font-size: 12.5px; border-radius: 10px; max-width: 260px; }
.iqe-note { font-size: 12px; color: var(--muted); grid-column: 1 / -1; }
.iqe-add { align-self: flex-start; }
@media (max-width: 640px) {
  .iqe-q { grid-template-columns: 1fr auto; }
  .iqe-q .iqe-type { grid-column: 1; }
}

/* ---- sending it (#modal-intake-share) ---- */
.iqs-link { display: flex; gap: 8px; margin: 14px 0 6px; }
.iqs-link input { font-family: var(--mono); font-size: 12px; }
.iqs-state { font-size: 12.5px; color: var(--muted); margin: 0; }
.iqs-actions .grow { flex: 1; }
.modal.iqs-modal { max-width: 480px; }
/* the PIN, and the "sent to the client" mark */
.iqs-block { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.iqs-block > b { font-size: 13.5px; }
.iqs-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.iqs-pin-row { display: flex; gap: 8px; align-items: center; }
.iqs-pin-row input { width: 150px; flex: none; font: 700 18px var(--mono); letter-spacing: .3em; text-align: center; }
.iqs-pin-on { font-size: 12.5px; font-weight: 700; color: var(--ok, #0E8A5F); }
.iqs-sent { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; }
.iqs-sent input { width: 18px; height: 18px; accent-color: var(--accent, #7B1E2E); flex: none; }
