/* Order flow -- single page, selection-driven. Inherits tokens from site.css. */

.order { padding: 40px 0 0; }
.ohead { max-width: 680px; margin: 0 0 44px; }
.ohead h1 { font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -.022em; margin: 0 0 12px; }
.ohead p { color: var(--muted); font-size: 16.5px; line-height: 1.62; margin: 0; }

.step { padding: 30px 0 38px; border-top: 1px solid var(--line-2); }
.step:first-of-type { border-top: 0; padding-top: 0; }

.steptitle { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; }
.steptitle h2 { font-size: 21px; letter-spacing: -.012em; margin: 0; }
.steptitle .num {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: var(--blue-wash); color: var(--blue-ink);
  font-size: 13px; font-weight: 600;
  display: grid; place-items: center;
}
.stepnote { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 8px 0 20px; max-width: 640px; }
.stepnote em { color: var(--ink-2); font-style: normal; font-weight: 500; }

/* shared card */
.ocard {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  text-align: left; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 16px; cursor: pointer; font: inherit; color: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.ocard:hover { border-color: var(--blue); }
.ocard:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ocard.on { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.ocard.soon, .ocard[disabled] { opacity: .45; cursor: not-allowed; }
.ocard.soon:hover { border-color: var(--line); }

.req {
  position: absolute; top: 10px; right: 10px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  color: var(--faint); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: 99px; padding: 2px 7px;
}

/* 1 - software */
.sgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 18px; }
.sgrid .ocard { min-height: 118px; justify-content: center; align-items: center; text-align: center; gap: 6px; }
.softname { font-size: 22px; font-weight: 650; letter-spacing: -.015em; }
.softnote { font-size: 12.5px; color: var(--muted); }

/* 2 - plans */
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 14px; margin-top: 18px; }
/* There is one grid per controller and only the chosen one is shown. The
   author `display: grid` above outranks the UA sheet's [hidden] rule, so the
   hidden grids need this to actually stay hidden. */
.pgrid[hidden] { display: none; }
.pgrid .ocard { padding: 18px; }
.pill {
  align-self: flex-start; background: var(--blue); color: #fff;
  font-size: 11.5px; font-weight: 600; border-radius: 99px;
  padding: 4px 11px; margin-bottom: 12px;
}
.price { font-size: 30px; font-weight: 680; letter-spacing: -.026em; line-height: 1.1; }
.per { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.feats { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.feats li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.2px; color: var(--ink-2); line-height: 1.45; }
.feats svg { width: 14px; height: 14px; flex: none; margin-top: 3px; fill: none; stroke: var(--good); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* 3 - regions */
.contname {
  font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint); margin: 24px 0 10px;
}
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 10px; }
.rgrid .ocard { padding: 13px 14px; gap: 1px; }
.flag { font-size: 17px; line-height: 1; margin-bottom: 5px; }
.rname { font-size: 14.5px; font-weight: 560; letter-spacing: -.008em; }
.rsub { font-size: 12px; color: var(--muted); }
.ocard.onreq .rname { color: var(--ink-2); }

/* 4 - hostname */
.hostrow {
  display: flex; align-items: stretch; max-width: 520px; margin-top: 18px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); overflow: hidden;
}
.hostrow:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.hostrow input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: 500 16px/1 var(--mono); padding: 15px 14px; outline: none;
}
.suffix {
  display: grid; place-items: center; padding: 0 15px;
  font: 400 14px/1 var(--mono); color: var(--muted);
  background: var(--surface-2); border-left: 1px solid var(--line-2);
}
.hosterr { color: #D9534F; font-size: 13px; margin: 9px 0 0; max-width: 520px; line-height: 1.5; }

.spacer { height: 120px; }

/* sticky summary */
.summary {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
}
.srow { display: flex; align-items: center; gap: 18px; padding: 13px 0; flex-wrap: wrap; }
.sitems { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.sitem {
  font-size: 12.8px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: 99px; padding: 5px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px;
}
.sright { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.stotal { font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
#go[disabled] { opacity: .42; cursor: not-allowed; }

@media (max-width: 620px) {
  .sitems { display: none; }
  .sright { width: 100%; justify-content: space-between; }
  .step { padding: 24px 0 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .step, .ocard { transition: none; }
}

/* --- SVG flags -----------------------------------------------------------
   Emoji flags are not an option: Windows ships no country-flag glyphs, so
   regional-indicator pairs render as bare letters ("DE") in every browser
   there. These are vendored SVGs (flag-icons, MIT).
-------------------------------------------------------------------------- */
.rgrid .ocard { padding: 12px 14px 11px; }
img.flag {
  display: block; width: 21px; height: 16px; margin: 0 0 7px;
  border-radius: 2.5px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0,0,0,.09);
}
@media (prefers-color-scheme: dark) {
  img.flag { box-shadow: 0 0 0 1px rgba(255,255,255,.14); }
}

/* --- latency -------------------------------------------------------------- */
.latbar {
  display: flex; align-items: flex-start; gap: 20px;
  justify-content: space-between; flex-wrap: wrap; margin-bottom: 4px;
}
.latbar .stepnote { margin-bottom: 0; flex: 1; min-width: 260px; }
.latbar .btn { flex: none; }
.latnote {
  font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
  background: var(--blue-wash); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 11px 14px; margin: 14px 0 4px; max-width: 720px;
}
.latnote strong { font-weight: 620; }

.lat {
  position: absolute; top: 11px; right: 12px;
  font: 500 11.5px/1 var(--mono); color: var(--blue-ink);
  font-variant-numeric: tabular-nums;
}
.lat.dim { color: var(--faint); }

.ocard.best { border-color: var(--good); box-shadow: 0 0 0 3px rgba(0,168,98,.12); }
.ocard.best .lat { color: var(--good); font-weight: 600; }
.ocard.best::after {
  content: "Fastest"; position: absolute; left: 12px; bottom: -9px;
  font-size: 10px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase;
  color: #fff; background: var(--good); border-radius: 99px; padding: 2px 8px;
}
.ocard.best.on { border-color: var(--good); }

/* --- one-pager layout ----------------------------------------------------
   Every step is live from the start -- no progressive unlocking. On wide
   screens each step is a label rail plus its controls, so the whole flow is
   scannable in a single view.
-------------------------------------------------------------------------- */
@media (min-width: 940px) {
  .step {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    column-gap: 40px;
    align-items: start;
  }
  .stepside { position: sticky; top: 84px; }
}
.stepside .stepnote { margin: 10px 0 14px; max-width: none; }
.stepside .btn { width: fit-content; }
.stepmain > :first-child { margin-top: 0; }
.sgrid, .pgrid { margin-top: 0; }
.contname:first-of-type { margin-top: 0; }

/* the summary bar is present from the outset, so keep it quiet until usable */
#go:not([disabled]) { box-shadow: 0 6px 20px -8px var(--blue); }

/* Order page shows the mark alone -- the wordmark is redundant here and the
   page title already says what this is. The link keeps an aria-label so it is
   still announced. */
.brand-mark-only .mark { margin-right: 0; }

/* Payment method note, shown before the deploy action. */
.payline {
  font-size: 13.5px; line-height: 1.6; color: var(--muted);
  border-top: 1px solid var(--line-2); padding-top: 20px; margin: 6px 0 0; max-width: 720px;
}
.payline strong { color: var(--ink-2); font-weight: 600; }

/* --- embedded in the client area -----------------------------------------
   Same page, framed inside my.lvl1.host. The host provides chrome, so drop
   ours and let the frame own the background and the scrolling.
-------------------------------------------------------------------------- */
.embedded body { background: transparent; }
.embedded header { display: none; }
.embedded .order { padding-top: 4px; }
.embedded .ohead { display: none; }
.embedded .spacer { height: 8px; }
.embedded .summary {
  position: static; border-top: 1px solid var(--line); border-radius: var(--r-sm);
  margin-top: 26px; background: var(--surface-2); backdrop-filter: none;
}
.embedded .summary .wrap { padding-left: 0; padding-right: 0; }
.embedded .stepside { position: static; }

/* --- step gating ---------------------------------------------------------
   A step stays dimmed and inert until the one before it is answered, so the
   order of operations is obvious and you cannot pick a plan for a controller
   you have not chosen.
-------------------------------------------------------------------------- */
.step { transition: opacity .3s ease, filter .3s ease; }
.step.locked { opacity: .35; pointer-events: none; filter: saturate(.35); }
.step.locked .ocard { box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .step { transition: none; } }
