/* =========================================================
   MISSION: MILESTONE — brief.css — the optional brief, reached from the confirmation panel.
   A single column of questions on the ink. Tokens, fonts and the ring button all come from
   styles.css; this file is only what the page itself needs.
   ========================================================= */

.brief-page { background: var(--ink); color: var(--cream); font-family: var(--mono); }
.brief-page .grain { position: fixed; }

/* p59: every vertical gap on this page came down 25%. Nine questions do not fit the rhythm seven
   did - the page had grown a scroll's worth of air before anyone reached question one. The
   horizontal indent and the option rows' padding are deliberately untouched: the indent is what
   keeps numbers and answers aligned, and the row padding IS the tap target. */
.briefdoc {
  width: min(900px, 100% - 2 * var(--gutter));
  margin: 0 auto; padding: clamp(30px, 5.25vh, 60px) 0 clamp(42px, 6.75vh, 72px);
  position: relative; z-index: 1;
}

/* ---------- head ---------- */
.brief-head { padding-bottom: 15px; border-bottom: 1px solid color-mix(in srgb, var(--cream) 18%, transparent); }
.briefdoc .brand { display: flex; gap: 15px; align-items: center; }
.briefdoc .brand svg { width: 28px; height: 66px; fill: var(--cream); display: block; flex: none; }
.briefdoc .brand svg .port { fill: var(--ink); }
.briefdoc .brand b {
  font-family: var(--display); font-size: clamp(27px, 4.6vw, 36px); line-height: 0.95;
  text-transform: uppercase; font-weight: 400; letter-spacing: var(--trk-md); display: block; white-space: nowrap;
}
.briefdoc .brand b em { font-style: normal; color: var(--accent); }
.brief-slot { margin: 11px 0 0; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.5; }
.brief-slot b { color: var(--accent); font-weight: 600; }

.briefdoc .intro {
  font-size: 15px; line-height: 1.75; max-width: 78ch; margin: 18px 0 0;
  border-left: 2px solid var(--accent); padding-left: 16px;
}
.briefdoc .intro b { font-weight: 600; }

/* ---------- the questions ----------
   One indent for the whole block: the number's column, the options and the text boxes all read
   off it, so the answers can never drift out of line with the question. */
.qs { --qind: 38px; margin-top: 20px; padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--cream) 18%, transparent); }
/* the gap BETWEEN questions is much bigger than the gap inside one — that is what turns a wall
   of text into seven small jobs */
.q { padding: 22px 0; }
.q + .q { border-top: 1px solid color-mix(in srgb, var(--cream) 12%, transparent); }
.q:first-child { padding-top: 0; }

/* a two-column grid, not a hanging indent: column one IS the indent, so alignment is exact by
   construction rather than by arithmetic that breaks when the type size changes.
   -0.06em takes a tenth out of Plex Mono's 0.6em advance. */
.q > p {
  display: grid; grid-template-columns: var(--qind) 1fr; align-items: baseline;
  margin: 0 0 11px; font-size: clamp(17px, 2.2vw, 21px); line-height: 1.4; letter-spacing: -0.06em;
  font-weight: 600; color: var(--cream);
}
/* the number in Anton, the way the Flight Plan sets its countdown — it is what makes each
   question read as a new card rather than another paragraph */
.q > p > b {
  font-family: var(--display); font-size: clamp(24px, 3.2vw, 30px); line-height: 1; font-weight: 400;
  color: var(--accent); letter-spacing: 0.01em;
}
/* only the multi-select questions are marked: "one" is what a picker implies by default, so
   saying it is noise. Its own tracking, because the question runs negative. */
.q > p u {
  text-decoration: none; display: inline-block; margin-left: 11px; font-size: 10px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); opacity: 0.8;
  vertical-align: 0.14em; white-space: nowrap;
}

/* ---------- the picker: a node, the way the Flight Plan draws one ---------- */
.opts { display: flex; flex-direction: column; padding-left: var(--qind); }
/* p59: leading between options halved, 7px -> 3.5px. Mouse only; the touch tiers below cannot
   follow it all the way down without the rows dropping under a thumb's 44px. */
.opts > label {
  position: relative; display: grid; grid-template-columns: 15px 1fr; align-items: start; gap: 13px;
  padding: 3.5px 8px 3.5px 0; cursor: pointer;
}
.opts > label::before { content: ''; position: absolute; inset: 0 -10px; background: transparent; transition: background 0.13s; }
.opts > label:hover::before { background: color-mix(in srgb, var(--cream) 5%, transparent); }
.opts > label > * { position: relative; }
/* `label input`, not `input` — the Other box is a sibling of the labels, and the bare selector
   would hide it at 1px and opacity 0 */
.opts label input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.opts .sq {
  width: 15px; height: 15px; border-radius: 50%; margin-top: 2px; position: relative;
  border: 2px solid color-mix(in srgb, var(--cream) 38%, transparent); background: transparent;
  transition: background 0.16s, border-color 0.16s, box-shadow 0.22s;
}
.opts > label:hover .sq { border-color: color-mix(in srgb, var(--cream) 75%, transparent); }
.opts input:checked ~ .sq {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent),
              0 0 0 8px color-mix(in srgb, var(--accent) 9%, transparent);
}
.opts input:focus-visible ~ .sq { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
/* the ::after is the pulse, fired on every press by brief.js */
.opts .sq::after {
  content: ''; display: block; position: absolute; left: -2px; top: -2px; right: -2px; bottom: -2px;
  border: 2px solid var(--accent); border-radius: 50%; opacity: 0; pointer-events: none;
}
.opts .sq.ping::after { animation: node-ping 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes node-ping { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(3.2); opacity: 0; } }
.opts .t { font-size: 14px; letter-spacing: 0.01em; opacity: 0.72; transition: opacity 0.14s; }
.opts input:checked ~ .t { opacity: 1; font-weight: 600; }

/* long lists run in two columns — filled top to bottom, then wrapped, so it is still one list
   read downward rather than pairs read across */
.opts.wide { display: block; column-count: 2; column-gap: 34px; }
.opts.wide > label { break-inside: avoid; }

.opts .other-in { display: none; }
.opts:has(.other:checked) .other-in {
  display: block; width: auto; max-width: 420px; margin: 6px 0 2px 28px;
  font: inherit; font-size: 13.5px; color: var(--cream); padding: 9px 12px; outline: none;
  background: color-mix(in srgb, var(--cream) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--cream) 20%, transparent);
}
.opts:has(.other:checked) .other-in:focus { border-color: var(--accent); }

.q .fill {
  font: inherit; font-size: 15px; line-height: 1.6; color: var(--cream); display: block;
  width: calc(100% - var(--qind)); margin-left: var(--qind); min-height: 92px; resize: vertical;
  background: color-mix(in srgb, var(--cream) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--cream) 20%, transparent);
  padding: 10px 12px; outline: none;
}
.q .fill::placeholder { color: var(--cream); opacity: 0.4; }
.q .fill:hover { border-color: color-mix(in srgb, var(--cream) 34%, transparent); }
.q .fill:focus { border-color: var(--accent); background: color-mix(in srgb, var(--cream) 8%, transparent); }

/* ---------- send ---------- */
/* `display: flex` here outranks the UA's [hidden] rule, so the send button stayed on screen
   after submitting until this was added. Anything given a display needs its [hidden] back. */
.sendrow[hidden] { display: none; }
.sendrow {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 26px; padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--cream) 18%, transparent);
}
.sendrow .btn { cursor: pointer; background: none; border: 0; padding: 0; font-family: var(--mono); color: var(--cream); }
.sendrow .btn .btn-txt { font-size: 15px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; }
.sent { margin: 20px 0 0; font-size: 14px; line-height: 1.75; max-width: 70ch; border-left: 2px solid var(--accent); padding-left: 16px; }
.sent b { font-weight: 600; }
.sent a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* the honeypot: off-screen rather than display:none, because some bots skip hidden inputs */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* "who is this" — only ever seen by someone who arrived without the booking handoff, so it has to
   explain itself in one line and then get out of the way. Deliberately quieter than a question:
   it is admin, not part of the seven. */
.whoami { margin: 0 0 4px; padding: 16px 18px; border: 1px dashed color-mix(in srgb, var(--cream) 24%, transparent); }
.whoami > p { margin: 0 0 12px; font-size: 13px; color: color-mix(in srgb, var(--cream) 72%, transparent); }
.whoami > p b { color: var(--cream); font-weight: 600; }
.whorow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.whorow label { display: block; }
.whorow span {
  display: block; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--puff, #8a857a); margin-bottom: 5px;
}
.whorow input {
  width: 100%; box-sizing: border-box; font-family: var(--mono); font-size: 14px; color: var(--cream);
  background: transparent; border: 1px solid color-mix(in srgb, var(--cream) 22%, transparent);
  padding: 10px 12px;
  min-height: 45px;   /* the option rows' 44px floor, +1 so sub-pixel rounding cannot dip under it */
}
.whorow input:focus { outline: none; border-color: var(--accent); }
@media (max-width: 700px) {
  .whorow { grid-template-columns: 1fr; }
  .whorow input { font-size: 16px; }   /* under 16 and iOS zooms on focus */
}

/* sending: the button has to stop looking pressable while the request is in flight */
.sendrow .btn[disabled] { opacity: 0.45; cursor: progress; }

/* the fallback. Only ever seen when the POST failed, so it has to carry the whole job itself. */
.sent.fail { border-left-color: var(--accent); max-width: 78ch; }
.sent.fail p { margin: 0 0 14px; }
.failbox {
  width: 100%; box-sizing: border-box; resize: vertical;
  font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--cream);
  background: color-mix(in srgb, var(--cream) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--cream) 20%, transparent);
  padding: 14px 16px;
}
.failbox:focus { outline: none; border-color: var(--accent); }
.failrow { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.failbtn {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--cream); text-decoration: none;
  background: none; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--cream) 30%, transparent);
  padding: 10px 18px;
  /* the same 44px a thumb needs that the option rows get - these two are the escape hatch
     on a failed send, so they are the last controls that should be fiddly to hit */
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
}
.failbtn:hover { border-color: var(--accent); color: var(--accent); }
.failsaid { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }

.brief-foot {
  margin-top: 20px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--cream) 18%, transparent);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.45;
}
.brief-foot a:hover { color: var(--accent); opacity: 1; }

/* Touch sizing, tablet included. These were under the 700px query, so an iPad at 768 - a thumb,
   not a mouse - was still getting 36px rows and a 15px footer link. Hit areas belong to every
   touch tier; only the layout changes below belong to the phone. */
@media (max-width: 1024px) {
  /* The row IS the hit area, so this padding is a tap target, not styling. Desktop went to 3.5px;
     the same cut here would give 34px rows and thumbs would start catching the wrong option.
     Tightened as far as the 44px floor allows and no further. */
  .opts > label { padding: 11px 8px 11px 0; }
  .brief-foot { padding-top: 4px; }
  .brief-foot a { padding: 15px 0; }
}

@media (max-width: 700px) {
  .opts.wide { column-count: 1; }
  .qs { --qind: 30px; }
  .q { padding: 18px 0; }
  .q .fill { font-size: 16px; }   /* anything under 16 makes iOS zoom on focus */
  .sendrow { flex-direction: column; gap: 14px; }
  .sendrow .btn { flex-direction: column; gap: 14px; }
  .sendrow .btn .btn-txt { font-size: 13px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .opts .sq.ping::after { animation: none; }
  .btn-ring .ring::after { animation: none; }
}
