/*
  Valence: GPU cloud pricing page (Screenery template)
  The page is a printed classroom periodic table: warm chart paper, ink rules, flat family colours, mono data.
  Structure: tokens, base, components, header, the table and its key, estimator and bill sheet, plans,
  comparison, add-ons, billing questions, account form, dock, footer, motion, narrow screens.
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* Paper and ink */
  --paper: #f3efe6;        /* chart paper */
  --sheet: #fffcf5;        /* the white report sheet */
  --ink: #18181a;          /* print black */
  --ink-2: #47464c;        /* secondary text, 8.4:1 on paper */
  --ink-3: #5f5d63;        /* tertiary, notes, 5.9:1 on paper */
  --rule: color-mix(in srgb, var(--ink) 18%, transparent);
  --rule-strong: color-mix(in srgb, var(--ink) 55%, transparent);
  --well: #e9e3d6;         /* inset areas on paper */

  /* Family colours, flat as on a printed chart. Ink text on all of them is above 9:1. */
  --f-inf: #f3cd4e;        /* inference, sodium yellow */
  --f-ren: #a6d896;        /* render, copper-flame green */
  --f-trn: #f4a283;        /* training, strontium coral */
  --f-mem: #9cc3ea;        /* memory, cobalt-glass blue */
  --f-node: #c8b5f0;       /* node of eight, potassium lilac */
  --f-pred: #f3efe6;       /* predicted: paper with a hatch */

  /* Meaning */
  --warn: #a8321c;         /* edge warnings, errors: 6.1:1 on paper */
  --ok: #2d6a32;           /* success: 6.2:1 on paper */
  --focus: #1d4fd6;

  /* Type */
  --sans: "Prompt", "Helvetica Neue", Arial, sans-serif;
  --mono: "Source Code Pro", ui-monospace, Menlo, monospace;
  --fs-xs: 0.75rem;     /* 12, mono labels */
  --fs-sm: 0.875rem;    /* 14 */
  --fs-md: 1rem;        /* 16 body */
  --fs-lg: 1.25rem;     /* 20 */
  --fs-h2: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  --fs-h1: clamp(1.6rem, 1rem + 2vw, 2.5rem);

  /* Space and shape */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;
  --r-1: 2px; --r-2: 4px;
  --line: 1.5px;
  --wrap: 1380px;
  --gut: clamp(16px, 3vw, 40px);
  --top-h: 60px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 6px 16px -6px rgb(24 24 26 / 0.28), 0 2px 4px -2px rgb(24 24 26 / 0.18);
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 16px); scrollbar-color: var(--ink-3) var(--paper); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--fs-md)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  caret-color: var(--ink); accent-color: var(--ink);
}
::selection { background: var(--f-inf); color: var(--ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: var(--r-1); }
table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
sub { font-size: 0.55em; vertical-align: -0.28em; line-height: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r-2); }
.skip:focus { top: 12px; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
html:not(.js) .js-only { display: none !important; }

/* ---------- 3. Components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 46px; padding: 0 var(--s-5); border-radius: var(--r-2);
  font-weight: 500; font-size: var(--fs-md); text-decoration: none; white-space: nowrap;
  border: var(--line) solid var(--ink); transition: transform .3s var(--ease), background .2s, box-shadow .3s var(--ease);
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #303034; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--well); }
.btn--sm { min-height: 36px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
.btn--wide { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: .2em; font-weight: 500; min-height: 24px; }

.note { font-size: var(--fs-sm); color: var(--ink-3); }
.f { border: 0; margin: 0; padding: 0; min-width: 0; }
.f legend { padding: 0; margin-bottom: var(--s-3); font-weight: 600; font-size: var(--fs-md); }

/* Segmented radios */
.seg { display: grid; gap: 0; border: var(--line) solid var(--ink); border-radius: var(--r-2); overflow: hidden; background: var(--sheet); }
.seg--3 { grid-template-columns: repeat(3, 1fr); }
.seg--4 { grid-template-columns: repeat(4, 1fr); }
.seg label { position: relative; display: block; cursor: pointer; }
.seg label + label { border-left: 1px solid var(--rule-strong); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label > span { display: block; height: 100%; padding: 10px 12px; font-size: var(--fs-sm); line-height: 1.3; color: var(--ink-2); transition: background .2s; }
.seg b { display: block; font-weight: 600; color: var(--ink); font-size: var(--fs-md); }
.seg label:hover > span { background: var(--well); }
.seg input:checked + span { background: var(--ink); color: #d9d6cf; }
.seg input:checked + span b { color: var(--paper); }
.seg input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: -4px; }
.seg input:disabled + span { opacity: .5; cursor: not-allowed; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.chip { min-height: 34px; padding: 0 12px; border: 1px solid var(--rule-strong); background: transparent; border-radius: 999px; font-size: var(--fs-sm); color: var(--ink-2); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.stepper { display: inline-flex; align-items: center; border: var(--line) solid var(--ink); border-radius: var(--r-2); background: var(--sheet); }
.st-b { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; }
.st-b:hover { background: var(--well); }
.st-b:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 64px; text-align: center; font: 500 var(--fs-sm)/1 var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- 4. Header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: var(--line) solid var(--ink); }
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); height: var(--top-h); display: flex; align-items: center; gap: var(--s-6); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-tile {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--f-inf); border: var(--line) solid var(--ink); border-radius: var(--r-1);
  font-weight: 600; font-size: 16px; line-height: 1; padding-top: 6px;
}
.brand-tile i { position: absolute; left: 3px; top: 2px; font: 500 9px/1 var(--mono); font-style: normal; }
.brand-word { font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }
.nav { display: flex; gap: var(--s-5); margin-left: auto; font-size: var(--fs-sm); }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 0; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.cur { display: inline-flex; border: var(--line) solid var(--ink); border-radius: var(--r-2); overflow: hidden; }
.cur button { border: 0; background: transparent; min-width: 48px; height: 34px; font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .04em; }
.cur button + button { border-left: 1px solid var(--rule-strong); }
.cur button[aria-checked="true"] { background: var(--ink); color: var(--paper); }

/* ---------- 5. The table ---------- */
.chart { max-width: var(--wrap); margin: 0 auto; padding: var(--s-5) var(--gut) var(--s-7); }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; margin-bottom: var(--s-4); padding-left: 30px; }
.chart-head h1 { font-size: var(--fs-h1); font-weight: 600; }
.chart-lede { max-width: 58ch; color: var(--ink-2); font-size: var(--fs-sm); }

.table, .nodes {
  display: grid; gap: 6px;
  grid-template-columns: 24px repeat(8, minmax(0, 1fr));
}
.table { grid-template-rows: auto repeat(3, auto); }
.gl, .prl { font: 500 var(--fs-xs)/1 var(--mono); color: var(--ink-3); display: grid; place-items: center; }
.gl { grid-row: 1; grid-column: calc(var(--c) + 1); padding-bottom: 2px; }
.prl { grid-column: 1; grid-row: calc(var(--r) + 1); }
.fh { display: none; }

/* A tile */
.el {
  position: relative; container-type: inline-size;
  grid-column: calc(var(--c) + 1); grid-row: calc(var(--r) + 1);
  aspect-ratio: 1 / 0.92; min-width: 0; padding: 0; margin: 0; text-align: left;
  background: var(--fam, var(--paper)); color: var(--ink);
  border: var(--line) solid var(--ink); border-radius: var(--r-1);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.el:hover:not([aria-disabled="true"]) { transform: translateY(-3px); box-shadow: var(--shadow); z-index: 2; }
.el[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--ink); }
.el[aria-pressed="true"]:hover { box-shadow: inset 0 0 0 3px var(--ink), var(--shadow); }
.el > span { position: absolute; }
.el-num { left: 7%; top: 6%; font: 500 clamp(11px, 9cqi, 14px)/1 var(--mono); }
.el-rate { right: 7%; top: 6%; font: 500 clamp(11px, 9cqi, 14px)/1 var(--mono); }
.el-sym { left: 7%; top: 21%; font-weight: 600; font-size: clamp(22px, 34cqi, 56px); line-height: 1; letter-spacing: -0.02em; }
.el-name { left: 7%; right: 6%; bottom: 25%; font-size: clamp(11px, 9.5cqi, 15px); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el-mass { left: 7%; bottom: 8%; font: 400 clamp(11px, 8.5cqi, 13px)/1 var(--mono); }
.el-count {
  right: 6%; bottom: 7%; min-width: 24px; height: 24px; padding: 0 6px; display: none;
  place-items: center; border-radius: 12px; background: var(--ink); color: var(--paper);
  font: 600 12px/1 var(--mono); border: 2px solid var(--paper);
}
.el[aria-pressed="true"] .el-count { display: grid; }
.el--pred { cursor: help; border-style: dashed; background: repeating-linear-gradient(135deg, var(--paper) 0 7px, #e6dfcf 7px 8px); }
.el--pred .el-sym, .el--pred .el-name { color: var(--ink-2); }
.el-est { font-style: italic; }

[data-fam="inf"] { --fam: var(--f-inf); }
[data-fam="ren"] { --fam: var(--f-ren); }
[data-fam="trn"] { --fam: var(--f-trn); }
[data-fam="mem"] { --fam: var(--f-mem); }
[data-fam="node"] { --fam: var(--f-node); }
[data-fam="pred"] { --fam: repeating-linear-gradient(135deg, var(--paper) 0 7px, #e6dfcf 7px 8px); }

/* Pointer cell to the detached row */
.ptr {
  grid-column: calc(var(--c) + 1); grid-row: calc(var(--r) + 1); container-type: inline-size;
  position: relative; display: block; aspect-ratio: 1 / 0.92; text-decoration: none;
  border: var(--line) dashed var(--ink); border-radius: var(--r-1); background: color-mix(in srgb, var(--f-node) 40%, var(--paper));
}
.ptr > span { position: absolute; left: 7%; right: 6%; }
.ptr-num { top: 6%; font: 500 clamp(11px, 9cqi, 14px)/1 var(--mono); }
.ptr-sym { top: 24%; font-weight: 600; font-size: clamp(20px, 30cqi, 48px); line-height: 1; }
.ptr-name { bottom: 8%; font-size: clamp(11px, 9cqi, 14px); line-height: 1.15; }
.ptr:hover { background: var(--f-node); }

/* The key: enlarged tile plus details */
.key {
  grid-column: 4 / 9; grid-row: 2 / 4;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: var(--s-5);
  align-items: center; padding: var(--s-2) var(--s-5) var(--s-2) var(--s-6);
}
.key-tile {
  position: relative; container-type: inline-size; aspect-ratio: 1 / 0.92; max-height: 100%;
  background: var(--fam); border: 2px solid var(--ink); border-radius: var(--r-2); transition: background .25s;
}
.key-tile > span { position: absolute; }
.kt-num { left: 7%; top: 6%; font: 500 9cqi/1 var(--mono); }
.kt-rate { right: 7%; top: 6%; font: 500 9cqi/1 var(--mono); }
.kt-sym { left: 7%; top: 22%; font-weight: 600; font-size: 38cqi; line-height: 1; letter-spacing: -0.02em; }
.kt-name { left: 7%; bottom: 23%; font-size: 9.5cqi; }
.kt-mass { left: 7%; bottom: 7%; font: 400 8.5cqi/1 var(--mono); }
.kt-lab { font: 500 11px/1 var(--mono); color: var(--ink-2); white-space: nowrap; }
.kt-lab::before { content: ""; position: absolute; border-top: 1px solid var(--ink-3); width: 14px; top: 50%; }
.kt-lab--num { right: calc(100% + 22px); top: 7%; }
.kt-lab--num::before { left: calc(100% + 4px); }
.kt-lab--mass { right: calc(100% + 22px); bottom: 7%; }
.kt-lab--mass::before { left: calc(100% + 4px); }
.kt-lab--rate { right: 7%; top: -20px; }
.key-info { min-width: 0; }
.ki-fam { font: 500 var(--fs-xs)/1.3 var(--mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.ki-use { margin-top: 6px; font-size: var(--fs-lg); font-weight: 500; line-height: 1.25; }
.ki-specs { display: grid; grid-template-columns: repeat(5, auto); justify-content: start; gap: var(--s-2) var(--s-5); margin: var(--s-4) 0 var(--s-3); }
.ki-specs dt { font-size: var(--fs-xs); color: var(--ink-3); }
.ki-specs dd { margin: 0; font: 500 var(--fs-sm)/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.ki-reg { font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: var(--s-4); }

/* Detached nodes row */
.nodes { margin-top: var(--s-5); }
.nodes .el { grid-row: 1; }
.nodes-label { grid-column: 2 / 4; align-self: center; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.4; padding-right: var(--s-4); }
.nodes-label strong { display: block; color: var(--ink); font-weight: 600; font-size: var(--fs-md); }

.legend { list-style: none; margin: var(--s-5) 0 0; padding: 0 0 0 30px; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--fs-sm); color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend li::before { content: ""; width: 14px; height: 14px; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--fam); }
.legend li[data-fam="pred"]::before { border-style: dashed; background: repeating-linear-gradient(135deg, var(--paper) 0 3px, #cfc7b4 3px 4px); }

/* Fly-in ghost tile (estimator signature) */
.ghost { position: fixed; z-index: 70; pointer-events: none; display: grid; place-items: center; border: var(--line) solid var(--ink); border-radius: var(--r-1); font-weight: 600; background: var(--fam); }

/* ---------- 6. Section heads ---------- */
.sec-head { max-width: 72ch; margin-bottom: var(--s-6); }
.sec-head h2 { font-size: var(--fs-h2); }
.sec-head p { margin-top: var(--s-3); color: var(--ink-2); }
.sec-head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: var(--s-6); flex-wrap: wrap; }
.sec-head--row > div { max-width: 66ch; }
.est, .plans, .cmp, .extras, .faq, .acct { max-width: var(--wrap); margin: 0 auto; padding: var(--s-8) var(--gut); border-top: var(--line) solid var(--ink); }

/* ---------- 7. Estimator ---------- */
.est-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s-7); align-items: start; }
.bench { display: grid; gap: var(--s-6); }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.line {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: var(--s-3);
  padding: 6px 6px 6px 6px; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--r-2);
}
.line-sym { display: grid; place-items: center; width: 48px; height: 42px; background: var(--fam); border: var(--line) solid var(--ink); border-radius: var(--r-1); font-weight: 600; font-size: 1.05rem; }
.line-name { min-width: 0; line-height: 1.25; }
.line-name small { display: block; color: var(--ink-3); font: 400 var(--fs-xs)/1.3 var(--mono); }
.line-n { font: 500 var(--fs-sm)/1 var(--mono); }
.line.is-bad { border-color: var(--warn); }
.line .x { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; border-radius: var(--r-2); color: var(--ink-2); }
.line .x:hover { background: var(--well); color: var(--ink); }
.line .stepper output { min-width: 40px; }
.line .st-b { width: 36px; height: 36px; }
.empty { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border: 1.5px dashed var(--rule-strong); border-radius: var(--r-2); color: var(--ink-2); font-size: var(--fs-sm); }
.empty .ic { width: 22px; height: 22px; margin-top: 1px; }
.hours { display: flex; align-items: center; gap: var(--s-4); }
.hours input[type="range"] { flex: 1; min-width: 0; height: 28px; accent-color: var(--ink); }
.num-in { display: inline-flex; align-items: center; gap: 4px; border: var(--line) solid var(--ink); border-radius: var(--r-2); background: var(--sheet); padding: 0 10px; height: 42px; font: 500 var(--fs-sm)/1 var(--mono); }
.num-in input { width: 5ch; -moz-appearance: textfield; border: 0; background: transparent; text-align: right; font: inherit; padding: 0; outline: none; }
.num-in:focus-within { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.hours + .chips + .note { margin-top: var(--s-2); }
.f--row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.f--row legend { width: 100%; }

/* The bill sheet */
.sheet {
  position: sticky; top: calc(var(--top-h) + 20px);
  background: var(--sheet); border: var(--line) solid var(--ink); border-radius: var(--r-2);
  box-shadow: 0 18px 40px -24px rgb(24 24 26 / .35);
}
.sheet-head { display: flex; justify-content: space-between; align-items: end; gap: var(--s-5); flex-wrap: wrap; padding: var(--s-5) var(--s-5) var(--s-4); border-bottom: var(--line) solid var(--ink); }
.formula { font-weight: 600; font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; overflow-wrap: anywhere; min-width: 0; }
.formula.is-empty { color: var(--ink-3); font-weight: 400; font-size: 1.6rem; }
.props { display: flex; gap: var(--s-5); margin: 0; }
.props dt { font-size: var(--fs-xs); color: var(--ink-3); }
.props dd { margin: 0; font: 600 var(--fs-md)/1.2 var(--mono); }
.calc { padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--rule); }
.ar { width: 100%; font-size: var(--fs-sm); }
.ar th { text-align: left; font-weight: 600; padding: 7px 12px 7px 0; white-space: nowrap; }
.ar td { padding: 7px 0; font-family: var(--mono); color: var(--ink-2); font-size: 13px; }
.ar td.r { text-align: right; color: var(--ink); font-weight: 500; white-space: nowrap; padding-left: 12px; }
.ar tbody tr + tr { border-top: 1px dotted var(--rule-strong); }
.ar tfoot tr:first-child { border-top: var(--line) solid var(--ink); }
.ar .bad td, .ar .bad th { color: var(--warn); }
.vs, .plans-out { padding: var(--s-4) var(--s-5); }
.vs { border-bottom: 1px solid var(--rule); }
.vs h4, .plans-out h4 { font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--s-3); }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 7.5rem; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); }
.bar-t { height: 14px; background: var(--well); border-radius: 1px; overflow: hidden; }
.bar-t i { display: block; height: 100%; width: var(--w); background: var(--ink); border-right: 1.5px solid var(--ink); transition: width .6s var(--ease); }
.bar[data-k="1y"] .bar-t i { background: var(--f-trn); }
.bar[data-k="3y"] .bar-t i { background: var(--f-mem); }
.bar-v { text-align: right; font: 500 13px/1 var(--mono); font-variant-numeric: tabular-nums; }
.bar.is-best .bar-l { font-weight: 600; }
.bar.is-best .bar-v { font-weight: 600; }
.be { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--ink-2); }
.po { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.po li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; align-items: baseline; gap: var(--s-3); padding: 8px 10px; border: 1px solid transparent; border-radius: var(--r-2); }
.po-n { font-weight: 500; }
.po-f { font-size: 13px; color: var(--ink-3); min-width: 0; }
.po-v { font: 500 var(--fs-sm)/1 var(--mono); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.po li.is-best { background: var(--f-inf); border-color: var(--ink); }
.po li.is-best .po-f { color: var(--ink-2); }
.po li.is-out { color: var(--ink-3); }
.po li.is-out .po-v { text-decoration: line-through; }
.rec { margin: var(--s-3) 0 var(--s-2); font-size: var(--fs-sm); }
.warns { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: 6px; }
.warns li { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-sm); color: var(--warn); }
.warns li .ic { margin-top: 3px; }
.plans-out .note { margin-top: var(--s-3); }

/* ---------- 8. Plans ---------- */
.period { display: inline-flex; border: var(--line) solid var(--ink); border-radius: var(--r-2); overflow: hidden; background: var(--sheet); }
.period button { border: 0; background: transparent; min-height: 44px; padding: 0 var(--s-4); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.period button + button { border-left: 1px solid var(--rule-strong); }
.period button[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.save { font: 500 11px/1 var(--mono); padding: 4px 6px; border-radius: 2px; background: var(--f-inf); color: var(--ink); }
.pl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: var(--line) solid var(--ink); border-radius: var(--r-2); background: var(--sheet); }
.pl { position: relative; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6) var(--s-5) var(--s-5); }
.pl + .pl { border-left: var(--line) solid var(--ink); }
.pl--rec { background: color-mix(in srgb, var(--f-trn) 16%, var(--sheet)); }
.pl-why { font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-2); padding: var(--s-3); background: var(--f-inf); border: 1px solid var(--ink); border-radius: var(--r-2); }
.pl-why b { color: var(--ink); }
.pl-tile { position: relative; width: 56px; height: 52px; display: grid; place-items: center; padding-top: 8px; background: var(--fam); border: var(--line) solid var(--ink); border-radius: var(--r-1); font-weight: 600; font-size: 1.3rem; line-height: 1; }
.pl-tile i { position: absolute; left: 5px; top: 4px; font: 500 10px/1 var(--mono); font-style: normal; }
.pl h3 { font-size: 1.5rem; }
.pl-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.pl-price .big { font: 600 2.4rem/1 var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pl-price .per { font-size: var(--fs-sm); color: var(--ink-2); }
.pl-sub { font-size: var(--fs-sm); color: var(--ink-2); min-height: 2.9em; }
.pl-list { list-style: none; margin: var(--s-2) 0 var(--s-4); padding: 0; display: grid; gap: 0; font-size: var(--fs-sm); }
.pl-list li { padding: 8px 0; border-top: 1px dotted var(--rule-strong); }
.pl-list b { font-weight: 600; }
.pl .btn { margin-top: auto; }
.pl.is-picked::after { content: "Fits your estimate"; position: absolute; top: 12px; right: 12px; font: 500 11px/1 var(--mono); padding: 5px 7px; background: var(--ink); color: var(--paper); border-radius: 2px; }
.pl-foot { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--ink-2); }

/* ---------- 9. Comparison ---------- */
.cmp-switch { display: none; }
.cmp-wrap { border: var(--line) solid var(--ink); border-radius: var(--r-2); background: var(--sheet); overflow: clip; }
.ct { width: 100%; font-size: var(--fs-sm); }
.ct th, .ct td { text-align: left; padding: 10px 16px; vertical-align: top; }
.ct thead th { font-weight: 600; font-size: var(--fs-md); border-bottom: var(--line) solid var(--ink); background: var(--paper); position: sticky; top: var(--top-h); }
.ct thead th[data-plan="team"] { background: color-mix(in srgb, var(--f-trn) 35%, var(--paper)); }
.ct tbody th[scope="row"] { font-weight: 500; width: 24%; }
.ct tbody tr + tr { border-top: 1px dotted var(--rule-strong); }
.ct td { color: var(--ink-2); }
.ct td[data-plan="team"] { background: color-mix(in srgb, var(--f-trn) 10%, transparent); color: var(--ink); }
.ct-g th { font: 600 var(--fs-xs)/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding-top: 22px; color: var(--ink); }
.ct tr.ct-g { border-top: var(--line) solid var(--ink) !important; }

/* ---------- 10. Add-ons, tax ---------- */
.x-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); }
.x-col h3 { font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.x-col p { color: var(--ink-2); max-width: 64ch; }
.x-col p + h3 { margin-top: var(--s-5); }
.xt { width: 100%; font-size: var(--fs-sm); }
.xt th, .xt td { text-align: left; padding: 10px 0; vertical-align: top; border-top: 1px dotted var(--rule-strong); }
.xt th { font-weight: 500; padding-right: var(--s-4); width: 42%; }
.xt td { color: var(--ink-2); }

/* ---------- 11. Billing questions ---------- */
.q-list { max-width: 880px; border-top: var(--line) solid var(--ink); }
.q-list details { border-bottom: 1px solid var(--rule-strong); }
.q-list summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: 16px 0; cursor: pointer; font-weight: 500; font-size: 1.06rem; min-height: 44px; }
.q-list summary::-webkit-details-marker { display: none; }
.q-list summary .ic { transition: transform .3s var(--ease); }
.q-list details[open] summary .ic { transform: rotate(180deg); }
.q-list details p { padding: 0 0 18px; color: var(--ink-2); max-width: 68ch; }

/* ---------- 12. Account form ---------- */
.a-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.a-form { display: grid; gap: var(--s-5); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-5); }
.fld { display: grid; gap: 6px; align-content: start; }
.fld--wide { grid-column: 1 / -1; }
.fld label { font-weight: 500; font-size: var(--fs-sm); }
.opt { font-weight: 400; color: var(--ink-3); }
.fld input, .fld select, .fld textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; background: var(--sheet);
  border: var(--line) solid var(--ink); border-radius: var(--r-2);
}
.fld textarea { resize: vertical; }
.fld select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%2318181a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 40px; }
.fld input::placeholder, .fld textarea::placeholder { color: #6e6b71; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2.5px solid var(--focus); outline-offset: 1px; }
.fld [aria-invalid="true"] { border-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.hint { font-size: 13px; color: var(--ink-3); }
.err { font-size: 13px; color: var(--warn); font-weight: 500; }
.tick { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm); cursor: pointer; }
.tick input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
.a-actions { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.spin { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.is-loading .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { display: flex; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-2); }
.alert--err { border: var(--line) solid var(--warn); background: #fbe9e2; color: #6e1f10; }
.alert--err .ic { color: var(--warn); width: 20px; height: 20px; margin-top: 2px; }
.alert p { margin-bottom: var(--s-3); }
.a-sum { position: sticky; top: calc(var(--top-h) + 20px); background: var(--sheet); border: var(--line) solid var(--ink); border-radius: var(--r-2); padding: var(--s-5); }
.a-sum h3 { font-size: var(--fs-lg); }
.sum-formula { font-weight: 600; font-size: 2rem; line-height: 1.1; margin: var(--s-3) 0 var(--s-4); overflow-wrap: anywhere; }
.sum-rows { margin: 0 0 var(--s-3); display: grid; }
.sum-rows > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: 8px 0; border-top: 1px dotted var(--rule-strong); font-size: var(--fs-sm); }
.sum-rows dt { color: var(--ink-2); }
.sum-rows dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.sum-rows .sum-sub { border-top: var(--line) solid var(--ink); }
.sum-rows .sum-tot { font-weight: 600; font-size: var(--fs-md); }
.sum-rows .sum-tot dt { color: var(--ink); }
.done { grid-column: 1 / -1; display: flex; gap: var(--s-6); align-items: flex-start; padding: var(--s-6); background: var(--sheet); border: var(--line) solid var(--ink); border-radius: var(--r-2); outline: none; }
.done-tile { position: relative; flex: none; width: 120px; height: 112px; display: grid; place-items: center; padding-top: 14px; background: var(--fam); border: 2px solid var(--ink); border-radius: var(--r-2); font-weight: 600; font-size: 3rem; line-height: 1; }
.done-tile i { position: absolute; left: 9px; top: 8px; font: 500 13px/1 var(--mono); font-style: normal; }
.done h3 { font-size: 1.6rem; color: var(--ok); margin-bottom: var(--s-3); }
.done p { color: var(--ink-2); max-width: 62ch; }
.done-meta { display: flex; gap: var(--s-6); margin: var(--s-4) 0 var(--s-5); }
.done-meta dt { font-size: var(--fs-xs); color: var(--ink-3); }
.done-meta dd { margin: 0; font: 600 var(--fs-md)/1.3 var(--mono); }

/* ---------- 13. Dock (phones) ---------- */
.dock { display: none; }

/* ---------- 14. Footer ---------- */
.foot { border-top: var(--line) solid var(--ink); background: var(--well); }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: var(--s-7) var(--gut) var(--s-8); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-5) var(--s-7); }
.foot-brand { display: flex; gap: var(--s-4); align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-2); max-width: 60ch; }
.foot-brand .brand-tile { flex: none; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--fs-sm); align-content: start; }
.foot-links a { display: inline-block; padding: 4px 0; }
.foot-note { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3); }

/* ---------- 15. Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .key-tile.is-swap { animation: keyswap .45s var(--ease); }
  @keyframes keyswap { from { transform: scale(.94) rotate(-1.5deg); filter: blur(2px); } }
  .el.is-bump .el-count { animation: bump .5s var(--ease); }
  @keyframes bump { 0% { transform: scale(1.6); } 100% { transform: scale(1); } }
  .formula.is-react { animation: react .6s var(--ease); }
  @keyframes react { 0% { color: var(--warn); transform: translateY(4px); } 100% { color: var(--ink); transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- 16. Narrow screens ---------- */
@media (max-width: 1180px) {
  .nav { gap: var(--s-4); }
  .nav a[href="#extras"], .nav a[href="#billing"] { display: none; }
  .key { padding-left: var(--s-5); gap: var(--s-4); }
  .ki-use { font-size: var(--fs-md); }
  .ki-specs { grid-template-columns: repeat(5, auto); gap: 2px var(--s-3); margin: var(--s-3) 0 var(--s-3); }
  .ki-fam, .ki-reg { display: none; }
  .key .btn { min-height: 38px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
  .kt-lab { display: none; }
  .est-grid { grid-template-columns: minmax(0, 1fr); }
  .sheet { position: static; }
  .seg--4 { grid-template-columns: repeat(2, 1fr); }
  .seg--4 label:nth-child(3) { border-left: 0; }
  .seg--4 label:nth-child(n+3) { border-top: 1px solid var(--rule-strong); }
}

@media (max-width: 900px) {
  :root { --top-h: 56px; }
  .nav { display: none; }
  .cur { margin-left: auto; }
  .chart-head { padding-left: 0; }
  .legend { padding-left: 0; }

  /* The table flows by family */
  .table, .nodes { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: none; }
  .gl, .prl, .ptr { display: none; }
  .el, .nodes .el { grid-column: auto; grid-row: auto; }
  .fh { display: block; grid-column: 1 / -1; margin: var(--s-3) 0 -2px; font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
  .fh[data-fam="inf"], .el[data-fam="inf"] { order: 1; }
  .fh[data-fam="ren"], .el[data-fam="ren"] { order: 2; }
  .fh[data-fam="trn"], .el[data-fam="trn"] { order: 3; }
  .fh[data-fam="mem"], .el[data-fam="mem"], .table .el--pred { order: 4; }
  .key { order: 0; grid-column: 1 / -1; grid-row: auto; padding: 0 0 var(--s-2); grid-template-columns: 180px minmax(0, 1fr); }
  .nodes-label { grid-column: 1 / -1; padding: 0; }
  .ki-fam, .ki-reg { display: block; }
  .nodes { margin-top: var(--s-3); }

  .pl-grid { grid-template-columns: minmax(0, 1fr); }
  .pl + .pl { border-left: 0; border-top: var(--line) solid var(--ink); }
  .pl-sub { min-height: 0; }
  .x-grid, .a-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .a-sum { position: static; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }

  /* Comparison: one plan at a time beside the feature names */
  .cmp-switch { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--line) solid var(--ink); border-radius: var(--r-2); overflow: hidden; margin-bottom: var(--s-3); background: var(--sheet); }
  .cmp-switch button { border: 0; background: transparent; min-height: 44px; font-weight: 500; font-size: var(--fs-sm); padding: 0 6px; }
  .cmp-switch button + button { border-left: 1px solid var(--rule-strong); }
  .cmp-switch button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
  .ct[data-show="payg"] [data-plan="team"], .ct[data-show="payg"] [data-plan="commit"],
  .ct[data-show="team"] [data-plan="payg"], .ct[data-show="team"] [data-plan="commit"],
  .ct[data-show="commit"] [data-plan="payg"], .ct[data-show="commit"] [data-plan="team"] { display: none; }
  .ct tbody th[scope="row"] { width: 44%; }
  .ct th, .ct td { padding: 10px 12px; }
  .ct thead th { position: static; }

  .dock:not([hidden]) {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 45;
    display: flex; align-items: center; gap: var(--s-3); padding: 10px 14px; min-height: 52px;
    background: var(--ink); color: var(--paper); border-radius: var(--r-2); text-decoration: none; box-shadow: var(--shadow);
  }
  .dock-f { font-weight: 600; font-size: 1.2rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dock-v { margin-left: auto; font: 500 var(--fs-sm)/1 var(--mono); white-space: nowrap; }
  .foot { padding-bottom: 70px; }
}

@media (max-width: 560px) {
  .table, .nodes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .key { grid-template-columns: 124px minmax(0, 1fr); gap: var(--s-4); }
  .ki-use { font-size: var(--fs-sm); }
  .ki-specs { grid-template-columns: repeat(3, auto); gap: 4px var(--s-4); margin: var(--s-3) 0 var(--s-2); }
  .ki-reg { font-size: 13px; margin-bottom: var(--s-3); }
  .key .btn { min-height: 40px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
  .chart-head h1 { font-size: 1.6rem; }
  .seg--3 { grid-template-columns: minmax(0, 1fr); }
  .seg--3 label + label { border-left: 0; border-top: 1px solid var(--rule-strong); }
  .seg label > span { padding: 9px 10px; }
  .hours { flex-wrap: wrap; }
  .hours input[type="range"] { flex-basis: 100%; }
  .sheet-head, .calc, .vs, .plans-out { padding-left: var(--s-4); padding-right: var(--s-4); }
  .ar td:not(.r) { display: block; font-size: 12px; padding-top: 0; }
  .ar tr { display: grid; grid-template-columns: 1fr auto; }
  .ar tr > th { grid-column: 1; }
  .ar tr > td.r { grid-column: 2; grid-row: 1; }
  .ar tr > td:not(.r) { grid-column: 1 / -1; }
  .ar tfoot tr > td:empty { display: none; }
  .bar { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-t { grid-column: 1 / -1; grid-row: 2; }
  .po li { grid-template-columns: minmax(0, 1fr) auto; }
  .po-f { grid-column: 1 / -1; grid-row: 2; }
  .props { gap: var(--s-4); }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .done { flex-direction: column; padding: var(--s-5); }
  .done-tile { width: 96px; height: 90px; font-size: 2.4rem; }
  .line { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .line-sym { width: 44px; }
  .line .x { grid-column: 3; grid-row: 1; }
  .line .stepper { grid-column: 2 / 4; justify-self: start; }
  .est, .plans, .cmp, .extras, .faq, .acct { padding-top: var(--s-7); padding-bottom: var(--s-7); }
}
.num-in input::-webkit-inner-spin-button, .num-in input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pl--rec .pl-why { margin-top: auto; }
.pl--rec .pl-why + .btn { margin-top: 0; }
.warns li.hint-li { color: var(--ink-2); }
