/* Brief: the closing screen, light like the rest of the page. Left: the live brief card (ticket.js).
   Right: the brief as a glass card (the same glass as the header and the schedule), every answer in
   a clearly drawn white field. Behaviour in brief.js. */
.brief {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 6vw;
  margin-top: 12vh; align-items: start;
}

/* ---------- left ---------- */
.brief__side { position: sticky; top: 100px; display: grid; gap: 28px; }
.contact__text { font-size: clamp(22px, 2vw, 30px); line-height: 1.3; letter-spacing: -0.01em; max-width: 24ch; }
.brief__alt { font-size: 15px; color: var(--grey); }
.brief__alt .contact__mail { margin-left: 6px; color: var(--ink); }
.contact__mail { border-bottom: 1px solid currentColor; padding-bottom: 3px; transition: color .3s var(--ease); }
.contact__mail:hover { color: var(--accent); }

/* ---------- left: the live brief (ticket.js) ---------- */
.ticket {
  display: grid; gap: 24px; padding: 28px 30px 30px; border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.4));
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 24px 64px rgba(12, 12, 14, 0.09), 0 0 0 1px rgba(12, 12, 14, 0.05);
}
.ticket__head { display: flex; justify-content: space-between; font-size: 13px; color: var(--grey); font-variant-numeric: tabular-nums; }
.ticket__line { font-size: clamp(26px, 2.4vw, 38px); line-height: 1.12; letter-spacing: -0.025em; min-height: 2.24em; }
.ticket__line em { font-style: normal; color: var(--grey); }
.ticket__facts { display: grid; }
.ticket__facts div { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.ticket__facts div:last-child { border-bottom: 1px solid var(--line); }
.ticket__facts dt { color: var(--grey); }
.ticket__facts dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the schedule with real dates: tubes like the process chart */
.ticket__sched { display: grid; gap: 10px; }
.ts { display: grid; grid-template-columns: 8.5em 1fr; align-items: center; gap: 12px; font-size: 13px; }
.ts__name { display: grid; }
.ts__name b { font-weight: 400; color: var(--ink); }
.ts__name span { color: var(--grey); font-variant-numeric: tabular-nums; }
.ts__lane { position: relative; height: 12px; }
.ts__tube {
  position: absolute; top: 0; bottom: 0; left: var(--a); width: var(--w); border-radius: 999px;
  background: linear-gradient(180deg, rgba(150, 175, 255, 0.45), rgba(47, 91, 255, 0.24));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 0 0 1px rgba(47, 91, 255, 0.22), 0 2px 6px rgba(47, 91, 255, 0.12);
  transform-origin: left; animation: ts-in .9s var(--ease) both; animation-delay: calc(var(--i) * 90ms);
}
@keyframes ts-in { from { transform: scaleX(0); opacity: 0; } }
.ts__deadline { position: absolute; top: -6px; bottom: -6px; width: 1px; background: #e0584a; left: var(--d); }
.ticket__verdict { font-size: 15px; line-height: 1.45; color: var(--ink); min-height: 2.9em; }
.ticket__verdict span { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; }
.is-ok span { background: #2fb56a; }
.is-tight span { background: #f0a02a; }
.is-open span { background: var(--accent); }

/* ---------- the card ---------- */
.brief__card {
  position: relative; padding: 36px 40px 40px; border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.36));
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(12, 12, 14, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 30px 80px rgba(12, 12, 14, 0.1),
    0 4px 12px rgba(12, 12, 14, 0.05),
    0 0 0 1px rgba(12, 12, 14, 0.05);
}
/* light catching the top-left edge */
.brief__card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(80% 60% at 10% -10%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 60%);
}
.brief__card > * { position: relative; }
.brief__card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 32px; }
.brief__card-title { font-size: clamp(28px, 2.6vw, 40px); font-weight: 400; letter-spacing: -0.03em; line-height: 1; }
.brief__card-note { font-size: 15px; color: var(--grey); }

/* ---------- questions ---------- */
.brief__form { display: grid; gap: 28px; }
.brief__form[hidden] { display: none; }
.bf { min-width: 0; border: 0; padding: 0; margin: 0; }
.bf--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bf__cell { min-width: 0; }
.bf__label { display: flex; gap: 10px; align-items: baseline; padding: 0; margin-bottom: 12px; font-size: 15px; color: var(--ink); }
.bf__num { font-variant-numeric: tabular-nums; color: var(--grey); }
/* a floated legend stops the fieldset from cutting around it */
legend.bf__label { float: left; width: 100%; }
legend.bf__label + * { clear: both; }

/* chips: white pills; the picked one turns ink with the small accent square */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 0; height: 46px; padding: 0 20px; border-radius: 999px;
  font-size: 15px; background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(12, 12, 14, 0.1), 0 1px 2px rgba(12, 12, 14, 0.05);
  transition: background-color .45s var(--ease), color .45s var(--ease), box-shadow .45s var(--ease), gap .45s var(--ease);
}
.chip span::before {
  content: ""; width: 0; height: 6px; border-radius: 1px; background: var(--accent);
  transition: width .45s var(--ease);
}
.chip:hover span { box-shadow: inset 0 0 0 1px rgba(12, 12, 14, 0.24), 0 2px 6px rgba(12, 12, 14, 0.06); }
.chip input:checked + span { background: var(--ink); color: var(--white); box-shadow: 0 6px 16px rgba(12, 12, 14, 0.16); gap: 10px; }
.chip input:checked + span::before { width: 6px; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

/* text fields: clear white boxes, a blue ring while you type */
.field { position: relative; display: block; }
.field input, .field textarea {
  display: block; width: 100%; margin: 0; border: 0; outline: 0; border-radius: 16px;
  padding: 18px 20px; background: #fff; color: var(--ink);
  font: inherit; font-size: 18px; line-height: 1.4; resize: none;
  box-shadow: inset 0 0 0 1px rgba(12, 12, 14, 0.12), 0 1px 2px rgba(12, 12, 14, 0.05);
  transition: box-shadow .35s var(--ease);
}
.field textarea { min-height: 132px; overflow: hidden; }
.field input:hover, .field textarea:hover { box-shadow: inset 0 0 0 1px rgba(12, 12, 14, 0.24), 0 1px 2px rgba(12, 12, 14, 0.05); }
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px rgba(47, 91, 255, 0.12); }
.field ::placeholder { color: var(--grey); opacity: .7; }

/* errors: a quiet line under the field, and a red ring */
.bf__error {
  font-size: 14px; color: #d4412f; overflow: hidden; max-height: 0; margin-top: 0;
  transition: max-height .4s var(--ease), margin-top .4s var(--ease);
}
.bf.is-bad .bf__error, .bf__cell.is-bad .bf__error { max-height: 3em; margin-top: 8px; }
.is-bad .field input, .is-bad .field textarea { box-shadow: inset 0 0 0 1.5px #e0584a, 0 0 0 4px rgba(224, 88, 74, 0.1); }
.bf.is-bad .chip span { box-shadow: inset 0 0 0 1px rgba(224, 88, 74, 0.6); }

.bf__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.brief__submit { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 4px; }
.pill--big { height: 56px; padding: 0 28px 0 20px; font-size: 16px; box-shadow: inset 0 0 0 1px rgba(12, 12, 14, 0.08), 0 10px 24px rgba(12, 12, 14, 0.1), 0 1px 2px rgba(12, 12, 14, 0.06); }
.brief__status { font-size: 15px; color: var(--grey); }
.brief__form.is-sending .pill { pointer-events: none; opacity: .6; }

/* ---------- sent ---------- */
.brief__done { display: grid; gap: 20px; justify-items: start; padding: 8px 0 12px; outline: 0; animation: brief-in .8s var(--ease); }
.brief__done[hidden] { display: none; }
@keyframes brief-in { from { opacity: 0; transform: translateY(12px); } }
.brief__done-title { font-size: clamp(40px, 4.4vw, 72px); font-weight: 400; letter-spacing: -0.035em; line-height: 1; }
.brief__done-text { font-size: clamp(20px, 1.7vw, 26px); line-height: 1.35; color: var(--grey); max-width: 30ch; }
.brief__done-text span { color: var(--ink); }
.brief__again { margin-top: 12px; font-size: 15px; border-bottom: 1px solid currentColor; padding-bottom: 3px; transition: color .3s var(--ease); }
.brief__again:hover { color: var(--accent); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .brief { grid-template-columns: 1fr; gap: 48px; margin-top: 8vh; }
  .brief__side { position: static; gap: 32px; }
  .ticket { padding: 22px 18px; border-radius: 24px; margin: 0 calc(var(--gutter) * -0.5); }
  .ts { grid-template-columns: 7.5em 1fr; }
  .brief__card { padding: 24px 18px; border-radius: 24px; margin: 0 calc(var(--gutter) * -0.5); }
  .brief__card-head { flex-direction: column; gap: 6px; margin-bottom: 24px; }
  .bf--pair { grid-template-columns: 1fr; gap: 28px; }
  .chip span { height: 42px; padding: 0 16px; font-size: 14px; }
  .field input, .field textarea { font-size: 16px; padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .chip span, .chip span::before, .field input, .field textarea, .bf__error { transition: none; }
  .brief__done { animation: none; }
}
