/* The storefront's whole stylesheet.
 *
 * One file, no framework, no build step, served from this origin so the page
 * can run style-src 'self' with no inline styles anywhere. The only value
 * that varies per provider is the accent, which arrives as two custom
 * properties from /shop/theme.css and is validated as a hex colour before it
 * is written there.
 *
 * Mobile first. Everything below 640px is the base; the two breakpoints add
 * columns rather than rearrange the page, so the reading order is the same
 * on a phone and on a desktop and the tab order never surprises anybody.
 */

:root {
  /* Near-neutral greys from one hue, so the accent is the only colour with
     an opinion. */
  --bg: #fbfbfc;
  --surface: #ffffff;
  --line: #e6e7ea;
  --line-strong: #d3d5da;
  --fg: #15171c;
  --fg-2: #4a4f5a;
  --fg-3: #71767f;
  --ok: #0f7b4a;
  --ok-soft: #e7f4ee;
  --fail: #b3261e;
  --fail-soft: #fdecea;
  --warn-soft: #fff5e6;

  /* The default accent, used only until a provider sets their own. It is
     KLYRN's, and it is deliberately the one thing here that is ours. */
  --brand: #2f5fdd;
  --on-brand: #ffffff;

  --r: 10px;
  --pad: 20px;
  --measure: 68ch;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --surface: #171a20;
    --line: #262a32;
    --line-strong: #363b45;
    --fg: #eef0f4;
    --fg-2: #b3b9c4;
    --fg-3: #868d99;
    --ok: #5ed39a;
    --ok-soft: #12261d;
    --fail: #ff8a80;
    --fail-soft: #2a1614;
    --warn-soft: #2a2113;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
}

/* Money and every other number that a reader compares down a column. */
.num, .amount, .price, .compare td { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.94em; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.4em; }
h1 { font-size: clamp(28px, 6vw, 40px); font-weight: 650; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: inherit; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* One visible ring, on everything reachable by keyboard, everywhere. */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-3); margin: 0 0 12px;
}
.lede { font-size: 17px; color: var(--fg-2); max-width: var(--measure); }
.small { font-size: 13.5px; color: var(--fg-3); }
.optional { font-weight: 400; color: var(--fg-3); font-size: 13px; }

.pad { padding: 28px var(--pad); max-width: 1080px; margin: 0 auto; }
.narrow { max-width: 620px; }
.hero { padding-top: 40px; padding-bottom: 8px; }

/* ---- chrome ---------------------------------------------------------- */

/* The bar is full-bleed; what is inside it lines up with the content
 * column, so the wordmark and the first plan card share a left edge and
 * "Sign in" does not drift into the margin on a wide screen. */
.top {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.top-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--pad); max-width: 1080px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.logo { max-height: 32px; max-width: 200px; display: block; }
.wordmark { font-weight: 650; font-size: 17px; letter-spacing: -0.01em; }
.signin {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: 14.5px; color: var(--fg-2); text-decoration: none;
}
.signin:hover { color: var(--fg); text-decoration: underline; }

.preview {
  margin: 0; padding: 10px var(--pad); background: var(--warn-soft);
  border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--fg-2);
}

.foot {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 24px var(--pad); color: var(--fg-3); font-size: 13.5px;
}
.foot .links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot p { margin: 0 0 8px; }

/* ---- plans ------------------------------------------------------------ */

.plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }

.plan {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px 20px 20px;
  display: flex; flex-direction: column;
}
.plan-featured { border-color: var(--brand); }
.tag {
  display: inline-block; align-self: flex-start; margin: 0 0 10px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--brand); color: var(--on-brand);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.tagline { color: var(--fg-2); margin: -2px 0 12px; font-size: 14.5px; }
.price { margin: 6px 0 14px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.amount { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; }
.per { color: var(--fg-3); font-size: 14px; }
.desc { color: var(--fg-2); font-size: 14.5px; }

.specs { margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line); }
.spec {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.spec dt { color: var(--fg-3); font-size: 14px; }
.spec dd { margin: 0; font-size: 14px; font-weight: 550; }

.highlights { list-style: none; margin: 0 0 18px; padding: 0; }
.highlights li { position: relative; padding-left: 20px; font-size: 14.5px; color: var(--fg-2); margin-bottom: 5px; }
.highlights li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

.plan .btn { margin-top: auto; }

/* ---- comparison ------------------------------------------------------- */

/* Below the breakpoint the plan cards ARE the comparison: every value in
 * this table is already on the card above it, laid out for one thumb. A
 * second copy that scrolls sideways behind a cut-off edge is not more
 * information, it is the same information in a worse place — so it is not
 * shown, rather than shown badly. */
@media (max-width: 719px) { .compare-section { display: none; } }

/* A table can still be wider than its column when a provider lists many
 * features. It scrolls inside its own box — never the page — and says so
 * with an edge shadow, because a cut-off cell with no affordance reads as a
 * bug rather than as something to swipe. */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* The box is capped, not the table inside it: a shadow painted on a
     container wider than its content lands in empty space and reads as a
     stray grey band. */
  max-width: 860px;
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left / 24px 100% no-repeat,
    linear-gradient(to left, var(--surface) 30%, transparent) right / 24px 100% no-repeat,
    linear-gradient(to right, rgba(0, 0, 0, 0.10), transparent) left / 12px 100% no-repeat,
    linear-gradient(to left, rgba(0, 0, 0, 0.10), transparent) right / 12px 100% no-repeat;
  background-attachment: local, local, scroll, scroll;
}
.compare {
  width: 100%; border-collapse: collapse; min-width: 480px;
  background: var(--surface);
}
.compare th, .compare td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.compare thead th { font-size: 13px; color: var(--fg-3); font-weight: 600; }
.compare tbody th { font-weight: 500; color: var(--fg-2); }
.compare td.num { text-align: right; }
.compare-price td { padding-top: 14px; padding-bottom: 14px; }

/* ---- forms ------------------------------------------------------------ */

.steps { margin-bottom: 22px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.steps li { font-size: 13px; color: var(--fg-3); display: flex; align-items: center; gap: 6px; }
.steps li::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-strong);
}
.steps li.done::before { background: var(--ok); }
.steps li.here { color: var(--fg); font-weight: 600; }
.steps li.here::before { background: var(--brand); }

.summary {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px; margin: 0 0 22px;
}
.summary-line {
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  margin: 0 0 8px; font-size: 15px;
}
.summary-line.ok { color: var(--ok); }
.summary-line.total {
  border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px;
  font-size: 17px;
}

.form fieldset { border: 0; margin: 0 0 26px; padding: 0; }
.form legend {
  padding: 0; margin: 0 0 12px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14.5px; font-weight: 550; margin-bottom: 6px; }
.hint { display: block; font-size: 13px; color: var(--fg-3); margin: 6px 0 0; font-weight: 400; }

input[type=text], input[type=email] {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--line-strong); border-radius: 8px;
  font: inherit; font-size: 16px; /* 16px so iOS does not zoom on focus */
}
input[type=text]:focus, input[type=email]:focus {
  border-color: var(--brand); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}

.choice { display: grid; gap: 8px; margin-bottom: 16px; }
.radio, .check {
  display: flex; gap: 10px; align-items: flex-start;
  min-height: 44px; padding: 11px 13px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); cursor: pointer; font-size: 15px; font-weight: 400;
}
.radio:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.radio input, .check input { margin-top: 3px; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.check { border: 0; padding-left: 0; background: none; }

.row { display: flex; gap: 8px; }
.row input { flex: 1; }

.field-error { color: var(--fail); font-size: 13.5px; margin: 6px 0 0; }
.banner-error {
  background: var(--fail-soft); color: var(--fail);
  border: 1px solid color-mix(in srgb, var(--fail) 30%, transparent);
  border-radius: 8px; padding: 11px 14px; font-size: 14.5px;
}
.banner-ok {
  background: var(--ok-soft); color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
  border-radius: 8px; padding: 11px 14px; font-size: 14.5px;
}

/* ---- buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: 8px;
  border: 1px solid transparent; background: none;
  font: inherit; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), opacity 160ms var(--ease-out);
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { opacity: 0.92; }
.btn-quiet { border-color: var(--line-strong); color: var(--fg); background: var(--surface); }
.btn-quiet:hover { border-color: var(--fg-3); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---- the order page --------------------------------------------------- */

.instructions {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px; margin: 0 0 22px;
}
.instructions h2 { font-size: 16px; margin-bottom: 10px; }
.instructions pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.6; color: var(--fg);
}

.state-ready { color: var(--ok); }
.state-attention { color: var(--fg); }

.empty { text-align: center; padding-top: 56px; padding-bottom: 56px; }
.support p { max-width: var(--measure); color: var(--fg-2); white-space: pre-line; }
