/* Week 3 screens: sign-in, create trip, the answer cards and the tracker.
   Kept apart from application.css so the brand work can restyle the base. */

.masthead { justify-content: space-between; flex-wrap: wrap; }
.masthead__nav { display: flex; align-items: center; gap: var(--s-4); font-weight: 500; font-size: var(--fs-sm); }
.masthead__nav form { margin: 0; }

h1, h2 { font-family: var(--font-display, var(--font-sans)); }

.flash { border-radius: var(--radius); padding: var(--s-3) var(--s-4); margin: 0 0 var(--s-4); font-size: var(--fs-sm); }
.flash p { margin: 0; }
.flash--notice { background: color-mix(in srgb, var(--c-go) 12%, var(--surface)); color: var(--text); border: 1px solid color-mix(in srgb, var(--c-go) 35%, transparent); }
.flash--alert { background: color-mix(in srgb, var(--c-signal) 10%, var(--surface)); color: var(--text); border: 1px solid color-mix(in srgb, var(--c-signal) 40%, transparent); }

.linkish { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; }
.center { display: block; text-align: center; margin-inline: auto; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hint { font-size: var(--fs-sm); color: var(--text-muted); margin: var(--s-1) 0 0; }
.devnote { font-size: var(--fs-sm); background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius); padding: var(--s-3); }

.button { justify-content: center; min-height: 48px; font-size: var(--fs-md); }
.button:focus-visible, input:focus-visible, .choice:has(input:focus-visible), .chip:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--link) 60%, transparent); outline-offset: 2px;
}
.button--block { width: 100%; }
.button--quiet { background: transparent; color: var(--text); border: 1px solid var(--border); min-height: 40px; padding: var(--s-2) var(--s-4); font-size: var(--fs-sm); }
.button--quiet:hover { background: var(--bg); }
form.button_to { display: inline; margin: 0; }

/* Forms */
.flow { max-width: 520px; margin: var(--s-6) auto; }
.stack { display: flex; flex-direction: column; gap: var(--s-6); }
.stack > h1, .stack > h2, .stack > .eyebrow { margin: 0; }
.stack > .eyebrow + h1 { margin-top: calc(var(--s-6) * -1 + var(--s-1)); }
.field { display: flex; flex-direction: column; gap: var(--s-2); border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field legend, .dates label { font-weight: 600; font-size: var(--fs-sm); }
.field legend { padding: 0; margin-bottom: var(--s-2); }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=tel] {
  width: 100%; font: inherit; font-size: max(16px, var(--fs-md)); color: var(--text); background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent); border-radius: 10px; padding: var(--s-3) var(--s-4); min-height: 48px;
}
input::placeholder { color: color-mix(in srgb, var(--text-muted) 70%, transparent); }
.dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); }
.dates > div { display: flex; flex-direction: column; gap: var(--s-1); }
.check { display: flex; gap: var(--s-3); align-items: center; font-weight: 500; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }

.stepper { display: flex; align-items: stretch; max-width: 200px; }
.stepper input { text-align: center; border-radius: 0; border-inline: 0; -moz-appearance: textfield; font-weight: 700; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper__btn { width: 48px; font-size: var(--fs-lg); background: var(--bg); color: var(--text); border: 1px solid color-mix(in srgb, var(--text) 18%, transparent); cursor: pointer; }
.stepper__btn:first-child { border-radius: 10px 0 0 10px; }
.stepper__btn:last-child { border-radius: 0 10px 10px 0; }

/* Big tappable radio cards */
.choices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); }
.choices--stack { grid-template-columns: minmax(0, 1fr); }
.choice { position: relative; display: flex; gap: var(--s-3); align-items: center; padding: var(--s-4); border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; flex-direction: column; gap: 2px; }
.choice small { color: var(--text-muted); font-size: var(--fs-sm); }
.choice::after { content: ""; margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.choice:has(input:checked)::after { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }

/* City picker shows only when "We have ideas" is chosen */
.cities { display: none; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); max-height: 260px; overflow-y: auto; padding: 2px; }
.where:has(input[value=pick]:checked) .cities { display: flex; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: var(--fs-sm); background: var(--surface); }
.chip:has(input:checked) span { background: var(--c-ink); color: var(--c-paper); border-color: var(--c-ink); }

/* Create page: form plus a live preview beside it on wide screens */
.create { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.create .flow { margin: 0; max-width: none; }
.preview { background: var(--c-ink); color: var(--c-paper); border: 0; }
.preview .eyebrow, .preview .muted { color: color-mix(in srgb, var(--c-paper) 65%, transparent); }
.preview__name { font-family: var(--font-display, var(--font-sans)); font-size: var(--fs-xl); font-weight: 700; margin: var(--s-2) 0; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.preview__line { margin: var(--s-1) 0; }
.preview__line span:empty { display: none; }
@media (min-width: 860px) {
  .create { grid-template-columns: minmax(0, 1fr) 300px; }
  .preview { position: sticky; top: var(--s-6); }
}

/* Answer cards: phone first */
.answer { max-width: 480px; margin: 0 auto; }
.invitehead { text-align: center; margin-bottom: var(--s-4); }
.invitehead h1 { font-size: var(--fs-xl); margin-bottom: var(--s-1); }
.invitehead p { margin: 0; }
.dots { list-style: none; display: flex; justify-content: center; gap: var(--s-2); padding: 0; margin: 0 0 var(--s-4); }
.dots li { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: width .2s; }
.dots li.is-done { background: var(--c-go); }
.dots li.is-on { width: 24px; border-radius: 4px; background: var(--accent); }
.qcard { padding: var(--s-6) var(--s-4); }
@media (min-width: 480px) { .qcard { padding: var(--s-8); } }
.qcard h2 { font-size: var(--fs-lg); }
.qcard__nav { display: flex; gap: var(--s-3); }
.qcard__nav .button:last-child { flex: 1; }

.budget { align-items: stretch; text-align: center; }
.budget__value { font-family: var(--font-display, var(--font-sans)); font-size: var(--fs-2xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.budget input[type=range] { width: 100%; accent-color: var(--accent); height: 32px; }
.budget__scale { display: flex; justify-content: space-between; font-size: var(--fs-xs); }
.privacy { font-size: var(--fs-sm); background: var(--bg); border-radius: var(--radius); padding: var(--s-3) var(--s-4); margin: 0; }

.done { text-align: center; }
.done__tick { width: 56px; height: 56px; margin: 0 auto var(--s-3); border-radius: 50%; display: grid; place-items: center; font-size: 28px; color: var(--c-paper); background: var(--c-go); }
.recap { text-align: left; margin: var(--s-6) 0; display: grid; gap: 0; }
.recap div { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); }
.recap dt { color: var(--text-muted); }
.recap dd { margin: 0; text-align: right; }

/* Organiser: trip list and tracker */
.pagehead { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); margin-bottom: var(--s-4); }
.pagehead h1 { margin: 0; }
.triplist { display: grid; gap: var(--s-3); }
.triplist__item { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); align-items: center; text-decoration: none; color: inherit; padding: var(--s-4); }
.triplist__item .pill { margin-left: auto; }

.share { margin: var(--s-4) 0; }
.share--fresh { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent), var(--shadow); }
.share__title { font-weight: 600; margin: 0 0 var(--s-3); }
.share__row { display: flex; gap: var(--s-2); }
.share__link { font-family: var(--font-mono); font-size: var(--fs-sm) !important; min-width: 0; }
@media (max-width: 480px) { .share__row { flex-direction: column; } }

.tracker__head { display: flex; justify-content: space-between; align-items: baseline; }
.tracker__head h2 { margin: 0; }
.tracker__count { font-variant-numeric: tabular-nums; color: var(--text-muted); }
.tracker__count strong { font-size: var(--fs-xl); color: var(--text); }
.meter { height: 8px; background: var(--border); border-radius: var(--radius-pill); overflow: hidden; margin: var(--s-3) 0 var(--s-4); }
.meter span { display: block; height: 100%; background: var(--c-go); border-radius: inherit; transition: width .4s ease; }

.people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.person__main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 160px; }
.person__main .muted { font-size: var(--fs-sm); }
.person__actions { display: flex; gap: var(--s-2); align-items: center; margin-left: auto; }
.person--skipped { opacity: .6; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--bg); color: var(--text); }
.person--responded .avatar { background: var(--c-go); color: var(--c-paper); }
.avatar--ghost { border: 1.5px dashed var(--border); background: transparent; font-size: var(--fs-sm); color: var(--text-muted); }
.notjoined { display: flex; align-items: center; gap: var(--s-3); color: var(--text-muted); font-size: var(--fs-sm); margin: var(--s-3) 0 0; }
.gate { margin-top: var(--s-4); }
.gate p { margin: 0; }
.gate__ready { background: color-mix(in srgb, var(--c-go) 10%, var(--surface)); border-radius: var(--radius); padding: var(--s-3) var(--s-4); }
.hero .button { margin-top: var(--s-2); }

/* Week 6: footer, support page, admin drop-off */
.sitefoot { padding-block: var(--s-8); font-size: var(--fs-sm); color: var(--text-muted); }
.sitefoot a { color: inherit; }

.segmented { display: inline-flex; gap: var(--s-1); padding: var(--s-1); border-radius: 999px; background: var(--surface); border: 1px solid var(--border); margin-bottom: var(--s-4); }
.segmented a { padding: var(--s-1) var(--s-3); border-radius: 999px; color: var(--text-muted); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; }
.segmented a.is-active { background: var(--text); color: var(--surface); }

.funnel { width: 100%; border-collapse: collapse; }
.funnel th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: var(--s-2); border-bottom: 1px solid var(--border); }
.funnel td { padding: var(--s-2); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.funnel td:nth-child(3) { white-space: nowrap; }
.funnel .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.funnel__bar { display: inline-block; vertical-align: middle; width: 5rem; height: 0.5rem; border-radius: 999px; margin-right: var(--s-2);
  background: linear-gradient(to right, var(--accent) var(--w), var(--border) var(--w)); }
.funnel__drop { color: var(--accent); font-weight: 700; }
@media (max-width: 640px) {
  .funnel th:nth-child(4), .funnel td:nth-child(4) { display: none; }
  .funnel__bar { width: 3rem; }
}
