/* ==========================================================================
   TRICSY — PRICING PAGE LAYER  (/pricing.css, loaded by /pricing/ only)

   The /pricing/ page in the brand-manual layout from the Claude Design
   handoff of 28 Nov 2026. Everything else on the page is a kit class from
   tricsy.css; these are the page-only patterns and the spacing the design
   asks for. Tokens only, every rule on a .price-* class or under
   main.price. If a pattern proves useful on another page, move it into
   tricsy.css rather than copying it.

   The old v14 page used .px-* classes; those rules still sit in the
   PRICING section of tricsy.css and nothing here reuses the prefix.
   ========================================================================== */

/* Every section heading on the page sits one step closer to its content
   than the site default. */
.price .section-head { margin-bottom: var(--space-6); }
.price .section-head.price-head--flush { margin-bottom: 0; }

.price-h4 { font-size: var(--size-h4); letter-spacing: var(--tracking-h4); }
.price-h3 { font-size: var(--size-h3); }
.price-small { font-size: var(--size-body-sm); }

/* ---------- hero ---------- */

.price-hero {
  padding-block: var(--space-8);
  border-bottom: var(--border-hairline) solid var(--line);
}
/* The design breaks the title after "pricing." and again before "to
   50,000+": the site's wider 1100px hero column would set it on two long
   lines instead. */
.price-hero .hero__inner { max-width: 900px; }
.price-hero__sub { display: block; color: var(--ink-muted); }
.price-hero__ctas { margin-top: var(--space-5); }
.price-hero__pills { margin-top: var(--space-5); gap: var(--space-3) var(--space-5); }
.price-hero__pills li { display: inline-flex; align-items: center; gap: var(--space-2); }
.price-hero__pills .icon { flex: none; }

/* ---------- how it adds up ---------- */

.price-sum { border-top: 0; }
/* The kit's rule for four cards (tricsy.css, "never leave one alone on a
   row"): two and two between phone and wide screen. */
@media (min-width: 600px) and (max-width: 1151px) {
  .price-sum .cards--4 { --card-min: 40%; }
}
/* Four across from 1152px, whatever the scrollbar takes: a media query
   counts the scrollbar, the grid does not, so a 220px floor would leave
   three and one at 1152-1168px on Windows. */
@media (min-width: 1152px) {
  .price-sum .cards--4 { --card-min: 22%; }
}

/* A card whose body fills the height, so the figures line up along the
   bottom edge of a row. */
.price-card { display: flex; flex-direction: column; }
.price-card__body { flex-grow: 1; }
.price-card__metric { margin-top: auto; padding-top: var(--space-4); }
.price-card__metric .metric__value { font-size: var(--size-h3); }

.price-plus-h { display: flex; align-items: center; gap: var(--space-2); }
.price-plus { flex: none; color: var(--ink-muted); }

.price-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--grid-gutter);
  padding-block: var(--space-5);
}
.price-strip__meta { gap: var(--space-2); }
.price-strip__text { font-size: var(--size-body-sm); color: var(--ink-secondary); }
.price-strip__sum {
  margin: 0;
  font-size: var(--size-h4);
  font-weight: 600;
  letter-spacing: var(--tracking-h4);
  font-variant-numeric: tabular-nums;
}
.price-strip__sum span { font-weight: 400; color: var(--ink-muted); }
.price-strip__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-body-sm);
}
.price-strip__link .icon { flex: none; }

/* ---------- calculator ---------- */

/* A fieldset is as wide as its content by default (min-inline-size:
   min-content), and the kit's .form-grid wants 240px columns: on a 320px
   phone the fields would push out of the card. */
.price-calc fieldset { min-inline-size: 0; }
/* iOS zooms the page into a field whose text is under 16px. */
@media (pointer: coarse) {
  .price-calc .field { font-size: var(--size-body); }
}
.price-calc .form-grid { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
/* The three hardware counts are short: 160px columns keep them on one row.
   Two classes, after the rule above, or the 240px rule would win. */
.price-calc .price-calc__hw { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }
.price-fs {
  padding-top: var(--space-5);
  border-top: var(--border-hairline) solid var(--line);
}
.price-fs__grid { margin-top: var(--space-5); }
.price-calc__note { margin: var(--space-3) 0 0; }
.price-calc__modes { gap: var(--space-5); }
.price-calc__modes + .form-grid { margin-top: var(--space-5); }
.price-zone b { color: var(--ink); font-weight: 500; }
/* The kit means a field to get the focus ring plus its ink border, but its
   older .field:focus { outline: none } outranks the :where() ring, so on
   fields only the border changes. Put the ring back here. */
.price-calc .field:focus-visible {
  outline: var(--border-rail) solid var(--accent);
  outline-offset: 3px;
}
/* The message under a count that is not a whole number (pricing.js). */
.price-err { color: var(--negative-ink); }
.price-err[hidden] { display: none; }

/* The estimate stays in view while the inputs scroll past, only where the
   two columns sit side by side (.split folds to one column at 1024px and
   below). 72px is the sticky site header, as in the site's own
   scroll-padding-top. Never taller than the window: a long estimate (all
   add-ons, hardware and man-days) scrolls inside, so its total stays in
   view and "Send this setup to sales" can always be reached. */
@media (min-width: 1025px) {
  .price-est {
    position: sticky;
    top: calc(72px + var(--space-5));
    max-height: calc(100vh - 72px - 2 * var(--space-5));
    overflow-y: auto;
  }
}

/* The hardware and one-off block is a .stack (display: flex), which would
   otherwise win over the hidden attribute. */
.price-est__extra { padding-top: var(--space-5); border-top: var(--border-hairline) solid var(--line-strong); }
.price-est__extra[hidden] { display: none; }
.price-est__send { justify-content: center; }

/* A list of price lines: label on the left, figure on the right, a
   hairline between rows. The examples and the estimate use it. */
.price-list { margin: 0; }
.price-list__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
  border-top: var(--border-hairline) solid var(--line);
  font-size: var(--size-body-sm);
}
.price-list__row dt { color: var(--ink-secondary); }
.price-list__row dd {
  margin: 0;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* The unit after a figure: "€80 / month". */
.price-unit {
  margin-left: var(--space-2);
  font-size: var(--size-body);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-muted);
}

/* ---------- 01 platform ---------- */

/* Five tiers: one column on a phone, three and two in between, one row
   of five from 1396px (percentages, so a scrollbar cannot push the fifth
   card onto a row of its own), never four and one alone. */
@media (max-width: 599px) {
  .price-plat .cards--4 { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 600px) and (max-width: 1395px) {
  .price-plat .cards--4 { --card-min: 30%; }
}
@media (min-width: 1396px) {
  .price-plat .cards--4 { --card-min: 18%; }
}

.price-plat__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5) var(--grid-gutter);
}
/* The tier panels below carry their own top padding (.tabs__panel). The
   tabs may shrink, so a long translation wraps inside its tab instead of
   pushing the page sideways on a phone. */
.price-plat__tabs { flex: 0 1 auto; min-width: 0; }
.price-plat__tabs .tab { text-align: start; }

.price-tier { display: flex; flex-direction: column; gap: var(--space-3); }
.price-tier__metric { padding-top: var(--space-4); }
.price-tier__foot {
  margin: auto 0 0;
  padding-top: var(--space-4);
  border-top: var(--border-hairline) solid var(--line);
}
.price-tier__foot b { color: var(--ink); font-weight: 600; }

.price-info {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
}
.price-info .icon { flex: none; margin-top: 1px; }

.price-notes { margin-top: var(--space-6); }
.price-note {
  padding-top: var(--space-5);
  border-top: var(--border-hairline) solid var(--line);
}

/* ---------- 02 cameras ---------- */

.price-cam { padding-block: 0 var(--space-8); }
.price-cam__split {
  align-items: center;
  padding-top: var(--space-8);
  border-top: var(--border-hairline) solid var(--line);
}
.price-cam__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
}
.price-cam__copy { flex: 1 1 220px; }

/* The icon square on the camera and hardware cards. */
.price-tile {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  width: var(--space-7);
  height: var(--space-7);
  background: var(--accent-tint);
  color: var(--ink);
}

/* ---------- 03 add-ons ---------- */

.price-add tbody th,
.price-add tbody td { padding-block: var(--space-5); }
.price-add tbody th { font-size: var(--size-body); font-weight: 600; }
.price-add__price {
  display: block;
  color: var(--ink);
  font-size: var(--size-h4);
  font-weight: 600;
  letter-spacing: var(--tracking-h4);
}
.price-add__per { display: block; }
/* On a phone three columns do not fit (a longer language hid the prices
   entirely): each row becomes a block, module name first, and the column
   name sits above each cell (data-label), as in the site's prose tables. */
@media (max-width: 599px) {
  .price-add .table-wrap { overflow: visible; border: 0; background: transparent; }
  .price-add .table-wrap > table { background: transparent; }
  /* Out altogether, not visually hidden: the column name already sits
     above each cell, so a screen reader would hear it twice (as on
     /smart-office/). */
  .price-add thead { display: none; }
  .price-add tbody tr {
    display: block;
    border: var(--border-hairline) solid var(--line);
    background: var(--surface);
  }
  .price-add tbody tr + tr { margin-top: var(--space-4); }
  /* tbody tr th/td: as specific as the kit's "tbody tr:last-child td
     { border-bottom: 0 }", and later, so the last card keeps its rules. */
  .price-add tbody tr th,
  .price-add tbody tr td {
    display: block;
    width: auto;
    padding: var(--space-4);
    text-align: start;
    border-bottom: var(--border-hairline) solid var(--line);
  }
  .price-add tbody tr > :last-child { border-bottom: 0; }
  .price-add td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: var(--space-1);
    font-family: var(--font-mono);
    font-size: var(--size-mono-label);
    font-weight: 400;
    letter-spacing: var(--tracking-mono-label);
    text-transform: uppercase;
    color: var(--ink-muted);
  }
}

/* ---------- 04 hardware ---------- */

.price-hw__link { text-decoration-color: var(--ink-muted); }
.price-hw__link .icon { margin-left: var(--space-2); }
.price-hw__prices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--grid-gutter);
  margin-top: auto;
  padding-top: var(--space-5);
  border-top: var(--border-hairline) solid var(--line);
}

/* Buy and rent share the row in equal halves; where "€17,900" and "€600"
   no longer fit side by side, rent moves under buy instead of spilling. */
.price-hw__prices > .metric { flex: 1 1 0; min-width: max-content; }

/* The two rows of three cards (hardware, examples): one column until
   three fit side by side, never two and one alone. */
@media (min-width: 600px) and (max-width: 899px) {
  .price-hw .cards,
  .price-ex .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 900px) and (max-width: 1151px) {
  .price-hw .cards,
  .price-ex .cards { --card-min: 30%; }
}

/* ---------- 05 examples ---------- */

.price-ex { padding-block: 0 var(--space-8); }
.price .price-ex__head {
  max-width: none;
  padding-top: var(--space-8);
  border-top: var(--border-hairline) solid var(--line);
}
.price-ex__head > p { max-width: 720px; }
.price-ex__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: var(--space-5);
}
.price-ex__total {
  margin-top: auto;
  padding-top: var(--space-5);
  border-top: var(--border-hairline) solid var(--line-strong);
}
.price-ex__foot {
  padding: var(--space-3) var(--space-6);
  background: var(--surface-sunk);
  border-top: var(--border-hairline) solid var(--line);
}

/* ---------- pilot and terms ---------- */

.price-cta__actions { justify-content: center; margin-top: var(--space-6); }

.price-terms__list { row-gap: var(--space-4); }
.price-terms__list li { display: flex; align-items: flex-start; gap: var(--space-3); }
.price-terms__list .icon { flex: none; color: var(--ink-muted); }
.price-terms__legal .stack > p { margin: 0; }
.price-terms__legal {
  gap: var(--space-4) var(--grid-gutter);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: var(--border-hairline) solid var(--line);
}
