/* Evendraft — order.css: the order page (/order). Built on the tokens, grid, fields and buttons of site.css.
   The same axis as every inner page: the left zone (columns 1-4) carries the order summary, which stays in view
   on a wide screen; the steps hang from column 6. A page people work through, so nothing here performs an
   entrance: the only motion is feedback on the choices. */

/* ---------- head ---------- */
.ord-head { padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(2rem, 4vw, 3.25rem); row-gap: 1.25rem; align-items: start; }
.ord-crumb { grid-column: 1 / -1; font-size: var(--step-small); color: var(--muted); }
.ord-crumb a { color: var(--ink); }
.ord-crumb [data-crumb-link] { overflow-wrap: anywhere; }
.ord-head h1 { grid-column: 6 / -1; grid-row: 2; font-size: clamp(2.4rem, 1.35rem + 3.1vw, 4.4rem); line-height: 0.96; letter-spacing: -0.034em; font-weight: 480; text-wrap: balance; }
.ord-head__aside { grid-column: 1 / 5; grid-row: 2 / span 2; padding-top: 0.35rem; }
.ord-head .ord-tender { grid-column: 6 / -1; grid-row: 3; margin-top: 0.75rem; }
.ord-head__aside .lead { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem); line-height: 1.3; max-width: 30ch; }
.ord-head__real { margin-top: 0.9rem; font-size: var(--step-small); color: var(--muted); max-width: 40ch; }

/* ---------- frame: the summary on the left, the steps on the right ---------- */
.ord-form { padding-bottom: clamp(4rem, 7vw, 6.5rem); align-items: start; }
.ord-sum { grid-column: 1 / 5; position: sticky; top: 1rem; }
.ord-main { grid-column: 6 / -1; min-width: 0; max-width: 52rem; }
.ord-main > * + * { margin-top: 0; }

/* ---------- the summary ---------- */
.ord-sum__card { padding: 1.35rem 1.4rem 1.45rem; background: var(--paper); }
.ord-sum__h { font-family: var(--font-text); font-size: var(--step-small); font-weight: 700; letter-spacing: 0; color: var(--muted); }
.ord-sum__product { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; margin-top: 0.55rem; }
.ord-sum__name { font-family: var(--font-display); font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.12; letter-spacing: -0.015em; font-weight: 500; }
.ord-sum__price { font-family: var(--font-display); font-size: clamp(1.6rem, 1.3rem + 0.9vw, 2.1rem); line-height: 1; letter-spacing: -0.025em; font-weight: 500; font-variant-numeric: lining-nums; color: var(--accent); }
.ord-sum__dl { margin-top: 1rem; display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: 0; box-shadow: inset 0 1px 0 var(--rule); } /* taste-skill-ignore: a hairline ledger rule */
.ord-sum__dl > div { display: contents; }
.ord-sum__dl dt, .ord-sum__dl dd { padding-block: 0.55rem 0.6rem; box-shadow: inset 0 -1px 0 var(--rule); font-size: var(--step-small); line-height: 1.4; } /* taste-skill-ignore: a hairline ledger rule */
.ord-sum__dl dt { color: var(--muted); padding-right: 0.75rem; }
.ord-sum__dl dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.ord-sum__dl dd b { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; letter-spacing: 0; }
.ord-sum__terms { margin-top: 1rem; font-size: var(--step-small); color: var(--muted); }
.ord-sum__jump { margin-top: 0.7rem; font-size: var(--step-small); font-weight: 600; }

/* ---------- the tender ---------- */
.ord-tender { padding: 1.3rem 1.4rem 1.4rem; background: var(--green); color: var(--green-ink); }
.ord-tender p { margin: 0; }
.ord-tender__lab { font-size: var(--step-small); color: var(--green-soft); }
.ord-tender__title { margin-top: 0.4rem !important; font-family: var(--font-display); font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.85rem); line-height: 1.15; letter-spacing: -0.015em; font-weight: 450; text-wrap: balance; overflow-wrap: anywhere; }
.ord-tender__buyer { margin-top: 0.35rem !important; font-size: 1rem; }
.ord-tender__facts { margin-top: 1rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem var(--gutter); }
.ord-tender__facts dt { font-size: 0.8125rem; color: var(--green-soft); }
.ord-tender__facts dd { margin: 0.15rem 0 0; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.ord-tender__note { margin-top: 1rem !important; padding: 0.65rem 0.85rem; background: var(--act-bg); color: var(--act-ink); font-size: var(--step-small); font-weight: 600; }
.ord-tender__links { margin-top: 1.05rem !important; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: var(--step-small); font-weight: 600; }
.ord-tender__links a { color: var(--green-ink); }

/* ---------- notices ---------- */
.ord-flag { margin-top: 1rem; padding: 0.95rem 1.1rem; background: var(--act-bg); color: var(--act-ink); font-size: 1rem; font-weight: 600; line-height: 1.45; }
.ord-flag p + p { margin-top: 0.5rem; }
.ord-flag a:not(.button) { color: inherit; }
.ord-flag .ord-flag__acts { margin-top: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; font-weight: 400; }
.ord-flag .button { min-height: 2.75rem; padding: 0 1.1rem; font-size: 1rem; white-space: normal; text-align: center; }

/* ---------- steps ---------- */
.ord-step { padding-block: clamp(2rem, 3.5vw, 2.75rem); box-shadow: inset 0 -1px 0 var(--rule); } /* taste-skill-ignore: a hairline rule between the steps */
.ord-step:first-of-type { padding-top: clamp(1.75rem, 3vw, 2.5rem); }
.ord-step h2 { font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.15rem); line-height: 1.08; letter-spacing: -0.02em; }
.ord-step h3 { margin-top: 1.4rem; font-family: var(--font-text); font-size: var(--step-body); font-weight: 700; }
.ord-step > div:first-of-type > h3 { margin-top: 1rem; }
.ord-step__lead { margin-top: 0.6rem; max-width: 60ch; color: var(--muted); font-size: 1rem; }
.ord-step__lead a { color: var(--ink); }
.ord-step__note { margin-top: 1rem; max-width: 62ch; font-size: var(--step-small); color: var(--muted); }
.ord-step__note a { color: var(--ink); }
.ord-step__note.is-warn { padding: 0.65rem 0.85rem; background: var(--act-bg); color: var(--act-ink); font-weight: 600; }

/* ---------- the choice ---------- */
.ord-opts { margin: 1.25rem 0 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 0.5rem; }
.ord-opt { position: relative; display: grid; grid-template-columns: 1.35rem minmax(0, 1fr) auto; column-gap: 1rem; align-items: start; padding: 1.1rem 1.25rem 1.15rem; background: var(--paper); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: box-shadow var(--t-hover) ease, background-color var(--t-hover) ease; }
.ord-opt input { position: absolute; top: 1.2rem; left: 1.25rem; width: 1.35rem; height: 1.35rem; margin: 0; opacity: 0; cursor: pointer; }
.ord-opt__box { position: relative; width: 1.35rem; height: 1.35rem; margin-top: 0.15rem; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 45%, transparent); transition: box-shadow var(--t-hover) ease; } /* taste-skill-ignore: a square radio mark, drawn as an inset line */
.ord-opt__box::after { content: ""; position: absolute; inset: 0.3rem; background: var(--accent); transform: scale(0); transition: transform var(--t-ui) var(--ease-out); }
.ord-opt__main { display: grid; gap: 0.3rem; min-width: 0; }
.ord-opt__name { font-family: var(--font-display); font-size: clamp(1.15rem, 1.05rem + 0.35vw, 1.35rem); line-height: 1.2; letter-spacing: -0.01em; font-weight: 500; }
.ord-opt__tag { display: inline-block; margin-left: 0.35rem; padding: 0.1rem 0.45rem; vertical-align: 0.15em; font-family: var(--font-text); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0; background: var(--accent-tint); color: var(--accent); }
.ord-opt__what { font-size: var(--step-small); line-height: 1.45; color: var(--muted); max-width: 62ch; }
.ord-opt__when { font-size: var(--step-small); font-weight: 600; }
.ord-opt__when b { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }
.ord-opt__price { font-family: var(--font-display); font-size: clamp(1.2rem, 1.05rem + 0.45vw, 1.45rem); line-height: 1.2; font-weight: 500; font-variant-numeric: lining-nums; color: var(--accent); white-space: nowrap; }
.ord-opt:has(input:checked), .ord-opt.is-on { box-shadow: inset 0 0 0 2px var(--accent); } /* taste-skill-ignore: the chosen option's outline */
.ord-opt:has(input:checked) .ord-opt__box, .ord-opt.is-on .ord-opt__box { box-shadow: inset 0 0 0 2px var(--accent); } /* taste-skill-ignore: the square radio mark, ringed in green */
.ord-opt:has(input:checked) .ord-opt__box::after, .ord-opt.is-on .ord-opt__box::after { transform: scale(1); }
.ord-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.ord-opt.is-pilot { background: color-mix(in srgb, var(--accent-tint) 55%, var(--paper)); }
.ord-opt.is-off { cursor: not-allowed; background: transparent; box-shadow: inset 0 0 0 1px var(--rule); } /* taste-skill-ignore: a quiet outline for an option it is too late to order */
.ord-opt.is-off input { cursor: not-allowed; }
.ord-opt.is-off .ord-opt__name, .ord-opt.is-off .ord-opt__price { color: var(--muted); }
.ord-opt.is-off .ord-opt__when { color: var(--act-ink); }
.ord-opt.is-off .ord-opt__box { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 18%, transparent); } /* taste-skill-ignore: the radio mark, dimmed */
@media (hover: hover) and (pointer: fine) {
  .ord-opt:not(.is-off):hover { background: #fff; }
  .ord-opt.is-pilot:not(.is-off):hover { background: color-mix(in srgb, var(--accent-tint) 35%, #fff); }
}

/* ---------- the timeline ---------- */
.ord-time { margin: 1.25rem 0 0; padding: 0; list-style: none; box-shadow: inset 0 1px 0 var(--rule); } /* taste-skill-ignore: a hairline ledger rule */
.ord-time li { display: grid; grid-template-columns: minmax(0, 10.5rem) minmax(0, 1fr) minmax(0, 5.5rem); column-gap: var(--gutter); align-items: baseline; padding-block: 0.8rem 0.85rem; box-shadow: inset 0 -1px 0 var(--rule); } /* taste-skill-ignore: a hairline ledger rule */
.ord-time__when { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.25; font-variant-numeric: tabular-nums lining-nums; }
.ord-time__off { display: block; font-family: var(--font-text); font-size: 0.8125rem; color: var(--muted); }
.ord-time__what { font-size: 1rem; line-height: 1.45; }
.ord-time__who { justify-self: end; font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.ord-time li.is-you .ord-time__who { color: var(--act-ink); }
.ord-time li.is-first .ord-time__what, .ord-time li.is-last .ord-time__what { font-weight: 600; }
.ord-time li.is-first { background: color-mix(in srgb, var(--accent-tint) 45%, transparent); box-shadow: inset 0 -1px 0 var(--rule), -0.75rem 0 0 color-mix(in srgb, var(--accent-tint) 45%, transparent), 0.75rem 0 0 color-mix(in srgb, var(--accent-tint) 45%, transparent); } /* taste-skill-ignore: the order row's tint, bled past the text */

/* ---------- lists ---------- */
.ord-step .ord-list, .ord-step .ord-terms { margin: 0.75rem 0 0; padding-left: 1.15rem; list-style: disc; display: grid; gap: 0.55rem; max-width: 64ch; font-size: 1rem; }
.ord-list li::marker, .ord-terms li::marker { color: var(--accent); }
.ord-step .ord-terms { margin-top: 1rem; gap: 0.75rem; }

/* ---------- details ---------- */
.ord-fields { margin-top: 1.25rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.05rem var(--gutter); }
.ord-field { display: grid; gap: 0.4rem; align-content: start; font-weight: 600; font-size: var(--step-small); min-width: 0; }
.ord-field.is-wide { grid-column: 1 / -1; }
.ord-field .opt { font-weight: 400; color: var(--muted); }
.ord-field textarea.field { min-height: 6.5rem; resize: vertical; line-height: 1.45; }
.ord-field .field[aria-invalid="true"] { box-shadow: inset 0 -3px 0 var(--act-ink); } /* taste-skill-ignore: the field underline, marked */
.ord-agree { margin-top: 1.4rem; display: flex; align-items: flex-start; gap: 0.75rem; font-size: 1rem; font-weight: 600; cursor: pointer; max-width: 60ch; }
.ord-agree input { flex: none; width: 1.35rem; height: 1.35rem; margin: 0.12rem 0 0; accent-color: var(--accent); cursor: pointer; }
.ord-err { margin-top: 1rem; padding: 0.7rem 0.9rem; background: var(--act-bg); color: var(--act-ink); font-size: var(--step-small); font-weight: 600; max-width: 62ch; }

/* ---------- pay or request ---------- */
.ord-go { margin-top: 1.6rem; padding: 1.35rem 1.4rem 1.45rem; background: var(--paper); }
.ord-go p { margin: 0; }
.ord-go__total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.3rem 1rem; margin-bottom: 1rem !important; font-family: var(--font-display); font-size: clamp(1.2rem, 1.05rem + 0.45vw, 1.45rem); line-height: 1.2; }
.ord-go__total b { font-weight: 500; font-size: 1.25em; color: var(--accent); font-variant-numeric: lining-nums; }
.ord-go__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.ord-go__acts .button { min-width: 14rem; }
.ord-go__note { margin-top: 0.95rem !important; font-size: var(--step-small); color: var(--muted); max-width: 64ch; }
.ord-go__note a { color: var(--ink); overflow-wrap: anywhere; }
.ord-go__data { margin-top: 0.4rem !important; }

/* ---------- done ---------- */
.ord-done { margin-top: 1.6rem; padding: clamp(1.4rem, 2.6vw, 2rem); background: var(--paper); box-shadow: inset 0 3px 0 var(--accent); outline: none; } /* taste-skill-ignore: a top rule marking the panel that answers the button */
.ord-done h2 { font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.15rem); line-height: 1.08; letter-spacing: -0.02em; }
.ord-done__ref { margin-top: 0.6rem; font-size: 1rem; }
.ord-done__ref b, .ord-done__steps b { font-variant-numeric: tabular-nums lining-nums; overflow-wrap: anywhere; }
.ord-done__steps { margin: 1.25rem 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 0; box-shadow: inset 0 1px 0 var(--rule); } /* taste-skill-ignore: a hairline ledger rule */
.ord-done__steps > li { counter-increment: s; position: relative; padding: 1.05rem 0 1.15rem 2.4rem; box-shadow: inset 0 -1px 0 var(--rule); } /* taste-skill-ignore: a hairline ledger rule */
.ord-done__steps > li::before { content: counter(s); position: absolute; left: 0; top: 1.05rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 0.875rem; font-weight: 700; }
.ord-done__steps h3 { margin: 0; font-family: var(--font-text); font-size: var(--step-body); font-weight: 700; }
.ord-done__steps p { margin-top: 0.35rem; font-size: 1rem; max-width: 60ch; }
.ord-done__acts { margin-top: 0.85rem !important; display: flex; flex-wrap: wrap; gap: 0.6rem 0.8rem; }
.ord-done__acts .button { min-height: 2.9rem; padding: 0 1.2rem; font-size: 1rem; }
.ord-done__alt { font-size: var(--step-small) !important; color: var(--muted); }
.ord-done__alt a { color: var(--ink); }
.ord-done__preview { margin-top: 0.8rem; font-size: var(--step-small); }
.ord-done__preview summary { cursor: pointer; font-weight: 600; min-height: 2.75rem; display: inline-flex; align-items: center; gap: 0.45rem; }
.ord-done__preview summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; font-weight: 700; background: var(--surface); }
.ord-done__preview[open] summary::before { content: "\2212"; }
.ord-done__preview pre { margin: 0.4rem 0 0; padding: 0.9rem 1rem; background: var(--bg); font-family: var(--font-text); font-size: var(--step-small); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 24rem; overflow-y: auto; }
.ord-done__next { margin-top: 1.1rem; font-size: 1rem; max-width: 62ch; }

/* ---------- tablet and phone ---------- */
@media (max-width: 63.99em) {
  .ord-head h1, .ord-head__aside, .ord-head .ord-tender { grid-column: 1 / -1; grid-row: auto; }
  .ord-head .ord-tender { margin-top: 0.25rem; }
  .ord-head__aside { padding-top: 0; }
  .ord-sum, .ord-main { grid-column: 1 / -1; }
  .ord-sum { position: static; margin-bottom: 0.5rem; }
  .ord-main { max-width: none; }
}
@media (max-width: 44.99em) {
  .ord-head { padding-top: 1.1rem; row-gap: 1rem; }
  .ord-head h1 { font-size: clamp(2.1rem, 10vw, 2.6rem); }
  .ord-sum__card, .ord-tender, .ord-go { padding: 1.1rem 1.1rem 1.2rem; }
  .ord-tender__facts { grid-template-columns: 1fr 1fr; }
  .ord-opt { grid-template-columns: 1.35rem minmax(0, 1fr); padding: 1rem 1rem 1.05rem; column-gap: 0.85rem; }
  .ord-opt input { top: 1.1rem; left: 1rem; }
  .ord-opt__box { grid-column: 1; grid-row: 1; }
  .ord-opt__main { grid-column: 2; grid-row: 1; }
  .ord-opt__price { grid-column: 2; grid-row: 2; margin-top: 0.35rem; }
  .ord.has-tender .ord-sum__dl [data-k="tender"], .ord.has-tender .ord-sum__dl [data-k="closes"] { display: none; } /* the tender card just above says it */
  .ord-time li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.25rem; }
  .ord-time__when { grid-column: 1; grid-row: 1; }
  .ord-time__who { grid-column: 2; grid-row: 1; }
  .ord-time__what { grid-column: 1 / -1; grid-row: 2; }
  .ord-opt__tag { display: table; margin: 0.35rem 0 0; }
  .ord-fields { grid-template-columns: 1fr; }
  .ord-go__acts .button { width: 100%; min-width: 0; white-space: normal; text-align: center; }
  .ord-done__acts .button { width: 100%; }
  .ord-done__steps > li { padding-left: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ord-opt, .ord-opt__box, .ord-opt__box::after { transition-duration: 0.01ms !important; }
}
@media print {
  .ord-go, .ord-done__acts, .ord-sum__jump { display: none !important; }
  .ord-sum { position: static; }
}

/* too late for anything on this tender: only the notice and its ways on are left */
.ord.is-blocked .ord-step, .ord.is-blocked .ord-sum { display: none; }
.ord.is-blocked .ord-form { padding-bottom: clamp(3rem, 6vw, 5rem); }
.ord-step#details { box-shadow: none; }
