/* Pricing screen — additive only. app.css already carries the whole rate-card
   layout (.pricing-grid, .pricing-table, .tax-setting, .pricing-save-bar and
   the rest), ported verbatim from the desktop build. Nothing here restyles it. */

/* The desktop app reported a rejected save with alert(), which covers the very
   fields the message is naming. Same treatment as the estimate editor's
   #editor-error: inline, above the save bar, next to the work it refused. */
#pricing-error {
  display: none;
  margin: 18px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--err-border);
  background: var(--err-bg);
  color: var(--err-text);
  font-size: 12px;
}
#pricing-error.show {
  display: block;
}

/* The save bar sits directly under the error when one is showing, so it loses
   the margin the grid above would otherwise have given it. */
#pricing-error.show + .pricing-save-bar {
  margin-top: 10px;
}

/* The save bar's sentence — Rate Card, Profit Goals and Capacity all share the
   bar. At 1280 Capacity's broke with "at." alone on its last line (Finance &
   Price design review, should-fix 9). `balance`, not the review's `pretty`:
   Chrome's `pretty` only rescues a one-word last line, and "quoted at." is
   two, so it changed nothing (measured). These sentences are one or two lines,
   which is what `balance` is for; one that fits on a line is left alone, and
   browsers without it ignore the rule. This does reach >=1100px, which the Desktop
   Preservation Law otherwise keeps pixel-identical — a deliberate exception,
   approved with the rest of the review's fixes on 2026-09-28. */
.pricing-save-bar p {
  text-wrap: balance;
}

/* ── The computed rate column ───────────────────────────────────────────────
   Every labour row's Rate ($/hr) is one derived figure now, not a field. It
   stays an <input> so it can carry aria-readonly and the aria-describedby link
   to the note below — a screen-reader user needs to be told the field stopped
   accepting input — but it should not go on *looking* like a box you can type
   in when it isn't. So the chrome comes off and the value stays put.

   border-color rather than `border:none`: the transparent border keeps the same
   border-box, so the number sits on exactly the x it did as an editable field
   and the column doesn't shift. width matches what app.css gives the number
   inputs beside it. Below 768px the rate-card rows stack into flex rows that
   right-align their value, so the width stops mattering there and this needs no
   responsive rule of its own. */
.pricing-table input.pricing-rate-ro {
  width: 72px;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  cursor: default;
}
/* A row showing a day reads "108.08/day" or "54.04/half day" (pricing.js,
   rateDisplay): wider so the unit isn't clipped. Only while a day is on show,
   so an all-hourly card keeps today's column. Right-aligned like the rest, so
   the extra width goes left and the figures still line up down the column. */
.pricing-table input.pricing-rate-ro.pricing-rate-day {
  width: 112px;
}
/* The "no Overhead or Goals data yet" em dash. Muted because it is an absence,
   where the figure above is an answer — and never $0.00, which would read as a
   computed answer meaning an hour of your time costs nothing. */
.pricing-table input.pricing-rate-ro.pricing-rate-none {
  color: var(--muted);
}
/* Focus is still worth showing: the field is reachable by keyboard on purpose,
   so a screen-reader user can land on it and hear the note it points at.
   a11y.css's ring does the work; this restores the accent edge the transparent
   border would otherwise swallow. */
.pricing-table input.pricing-rate-ro:focus {
  border-color: var(--accent);
}

/* The note sits between the catalogue bar and the grid, so it is read before
   the first read-only field is reached rather than after it. max-width keeps it
   at a readable measure on a wide screen instead of running the full width of a
   three-column grid. */
.pricing-rate-note {
  margin: 0 0 14px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 78ch;
}
/* Buttons, not anchors: these navigate inside the app, and a real href would
   offer a page load the router doesn't want. Styled as the inline links they
   read as — the same rest/hover pair .client-history-link already uses.

   --text rather than --accent at rest, which is the one place this departs from
   .toast-link: measured on this background, the accent is 3.71:1, under the
   4.5:1 this feature's brief sets for body text, and 11px muted copy is exactly
   where that bar matters. --text is 15.2:1, and against the --muted sentence
   around them the links come out brighter than their surroundings rather than
   dimmer. The underline is permanent for the same reason it is on nothing else
   here: these sit mid-sentence, where there is no row or button shape to say
   they can be clicked. */
.pricing-rate-note-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.pricing-rate-note-link:hover,
.pricing-rate-note-link:focus-visible {
  color: var(--accent);
}

/* ── Service units and each row's state line (2026-09-27, reshaped 2026-09-28)
   Two second lines rather than new columns: the service name is already the
   column that gives way when the table is tight, and a Unit column plus a
   state column would have cut most names to their first word. Under the name,
   "per [unit ▾]" (a view switch) and, for a day, its billable hours; under the
   Mark-Up, the unit's state line. 10.5px muted, the rate card's own hint size,
   so the table still reads as prices first. */
.pricing-row-meta {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
/* The same chrome as the table's inputs (app.css), at the hint's size so the
   control sits in the line rather than above it. */
.pricing-unit-sel {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  font-family: var(--font-family-body);
  font-size: 10.5px;
  padding: 2px 4px;
  outline: none;
  cursor: pointer;
  /* A select is as wide as its longest option, and an option can carry a
     problem ("half day · below floor by $12.40"). Fixed to fit the unit names, so the
     closed control stays small; the open list still shows every word. */
  width: 7.6em;
}
.pricing-unit-sel:focus {
  border-color: var(--accent);
}
.pricing-unit-sel:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
}
/* The state line may carry three parts ("set by you · below floor by $12.40
   · ↺ use $57"), more than the Mark-Up column is wide, so it wraps — but
   between parts, never inside one, so a figure is never split from its words. */
.pricing-floor {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}
.pricing-state-part {
  white-space: nowrap;
}
/* A part that is a sentence rather than a figure with its words — the note
   under a travel price that stopped following the floor (task 6a). It wraps
   inside the column instead of pushing the table wider. */
.pricing-state-part.pricing-state-note {
  white-space: normal;
}
/* Wherever the rows are a table (768px and up) the line is 72–105px wide:
   too narrow for any line with two parts, so every one wrapped, and each
   wrapped line ended in a stray "·" ("auto ·" / "floor $657.28"). There,
   the parts stack one to a line, with no dots (design review D2, which
   named ≥1100 only; measured, no two-part line fits at any width from 768
   up, 2026-09-29). Below 768 the row stacks, the line has the card's width
   and reads as one sentence, dots and all. */
@media (min-width: 768px) {
  .pricing-floor .pricing-state-part {
    display: block;
  }
  .pricing-state-sep {
    display: none;
  }
}
/* An auto price is a real price, and the estimator quotes it, but it isn't one
   you typed: muted, like the rest of what this screen works out for you, until
   you type over it. The state line says "auto" in words; this is the glance. */
.pricing-table input.pricing-price-inp.pricing-auto {
  color: var(--muted);
}
/* "↺ use $57" and "needs Profit Goals": buttons that read as inline links,
   the same rest/hover pair as .pricing-rate-note-link above, and --text for
   the same contrast reason. */
.pricing-state-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.pricing-state-link:hover,
.pricing-state-link:focus-visible {
  color: var(--accent);
}
/* --accent-text, never raw --accent, for text (a11y.css: 3.71:1 on this
   background). The Dashboard's badge carries the same colour. */
.pricing-below {
  color: var(--accent-text);
}

/* ── Service Day, Show, and the hidden-unit notice (2026-09-28) ─────────────
   The Service Day is a second .tax-setting block: copy left, fields right, as
   the tax rate above it. Its two fields are an hours figure each, so narrower
   than app.css's 90px for the tax rate. */
.pricing-day-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.pricing-day-ctl {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted);
}
.pricing-day-ctl label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tax-setting .pricing-day-ctl input {
  width: 64px;
}
/* Why a save was refused, under the block's own description, beside the
   fields it names (design review D1). --accent-text, the screen's colour for
   a problem in words (4.60:1 on --bg, which this block sits on). */
.pricing-day-error {
  display: none;
  margin-top: 6px;
  font-size: 11px;
  color: var(--accent-text);
}
.pricing-day-error.show {
  display: block;
}

/* "Show: Hourly | Half day | Full day", above the first category. The pressed
   button takes the accent edge and full-strength text, the same pair a focused
   field uses, and a --surface fill: the edge alone was a red-versus-slate hue
   difference, hard to find at a glance and invisible to anyone who can't tell
   the two apart (design review D3). The fill is a lightness change. */
.pricing-show {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
}
.pricing-show-label {
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--muted);
  margin-right: 4px;
}
.pricing-show-btn[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--text);
}

/* "Full day below floor by $12.40 ▸": its own line under the unit switch, as
   an inline link would read. --accent-text for the same reason as
   .pricing-below: it names a problem. */
.pricing-hidden-note {
  flex-basis: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent-text);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pricing-hidden-note:hover,
.pricing-hidden-note:focus-visible {
  color: var(--text);
}

/* ── The car's km row (task 6b) ─────────────────────────────────────────────
   Its price is Overhead's, so the Mark-Up cell shows it as text, not a field,
   in the field's size and weight so the column still lines up; its Rate is
   "at cost", muted, as a read-only fact. */
.pricing-km-price {
  display: inline-block;
  font-size: 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  padding: 5px 0;
}
.pricing-km-price.pricing-rate-none {
  color: var(--muted);
}
.pricing-km-na {
  font-size: 11px;
  color: var(--muted);
}
/* Two buttons in the travel table's foot while the card has no km row. */
.pricing-sec-foot-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Production booking task 4: On set, Surcharges, Public holidays ────────
   New blocks below the tables, so nothing here reaches an existing rule.
   Written phone first (min-width queries only), unlike the rest of this
   screen, whose phone rules live in responsive.css: these classes are new,
   and nothing above 1100px has a look to preserve.

   The language is the editor's .billing-block (a panel-layer head with a Delight
   label and a tag) and the Rate Card's own: hairline rules between rows,
   hints at 11px muted, fields in the inset well. */

/* responsive.css gives every .billing-block head a 660px floor from 1099px
   down, and lets the block scroll sideways, so the editor's money grids can't
   squash. These blocks have no grid: their content wraps, and that floor only
   pushed the head past the block's edge at 800px (measured). Doubled class to
   outrank it from this earlier file. */
.billing-block.surch-block,
.billing-block.hol-block {
  overflow-x: hidden;
}
.billing-block.surch-block .bb-head,
.billing-block.hol-block .bb-head {
  min-width: 0;
}

/* "On set", where the Production category's × was: the one section that
   can't be deleted (D24). The accent hairline marks it as the special case;
   the text stays --text for contrast. */
.pricing-sec-tag {
  flex-shrink: 0;
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  padding: 2px 7px;
  border: 1px solid var(--accent-text);
  color: var(--text);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  white-space: nowrap;
  cursor: help;
}

.surch-intro {
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 78ch;
}
.surch-intro strong {
  color: var(--text);
  font-weight: 600;
}

/* One surcharge per row: what it is on the left, its figures on the right
   (stacked on a phone, label above field, as the IA has it). */
.surch-row {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--color-border-hairline);
}
.surch-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}
.surch-desc {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 60ch;
}
.surch-ctl {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.surch-mult {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* The "×" reads as part of the figure, in the screen's display face. */
.surch-x {
  font-family: 'Delight', 'Georgia', serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--muted);
}
/* 16px and 44px tall on a phone: smaller text makes iOS zoom on focus. */
.surch-inp,
.hol-field input {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  font-family: var(--font-family-body);
  font-size: 16px;
  padding: 6px 10px;
  min-height: 44px;
  outline: none;
  transition: border-color 0.15s;
  /* The native time and date pickers, dark to match. */
  color-scheme: dark;
}
.surch-inp:focus,
.hol-field input:focus {
  border-color: var(--accent);
}
.surch-inp {
  width: 96px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.surch-inp::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.surch-inp.surch-inp-days {
  width: 72px;
}
.surch-inp.surch-inp-time {
  width: auto;
  text-align: left;
}
.surch-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

/* The working week: seven toggles. Checked is a fill, an accent edge and
   full-strength text together, the Show switch's pair (design review D3), so
   it never rests on hue alone. The real checkbox lies over its chip,
   invisible, so a tap anywhere on the chip toggles it. */
.surch-week {
  align-self: stretch;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.surch-week legend {
  padding: 0;
  margin-bottom: 6px;
}
/* Phone: four to a row (Mon–Thu, Fri–Sun). Seven 44px chips don't fit in
   the 311px a 375px screen leaves, and wrapping left Sunday alone. */
.surch-days {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.surch-day {
  position: relative;
  display: flex;
}
.surch-day span {
  flex: 1;
}
.surch-day input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.surch-day span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border: 1px solid var(--border);
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--muted);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.surch-day input:checked + span {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--text);
}
.surch-day input:hover + span {
  color: var(--text);
}
.surch-day input:focus-visible + span {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
}
.surch-day input[aria-invalid='true'] + span {
  border-color: var(--err-text);
}

/* How surcharges combine: three options, each with what it makes of the
   same short-notice weekend evening, so the choice is a comparison of
   figures rather than of wordings. */
.surch-modes {
  border: 0;
  border-top: 1px solid var(--color-border-hairline);
  margin: 0;
  padding: 14px 16px 16px;
  min-width: 0;
}
/* Floated so the legend sits inside the padding like any heading, not on
   the border as a legend otherwise does. */
.surch-modes-legend {
  float: left;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0;
  margin-bottom: 10px;
}
.surch-mode-opts {
  clear: both;
  display: grid;
  gap: 6px;
}
.surch-mode-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--color-border-subtle);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.surch-mode-opt:hover {
  border-color: var(--border);
  background: var(--row-hover);
}
.surch-mode-opt:has(input:checked) {
  border-color: var(--accent);
  background: var(--surface);
}
.surch-mode-opt input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.surch-mode-words {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}
.surch-mode-ex {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}
.surch-mode-f {
  font-family: 'Delight', 'Georgia', serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ── Public holidays ── */
.hol-block {
  margin-top: 22px;
}
.hol-status {
  padding: 14px 16px;
  font-size: 12px;
  color: var(--muted);
}
.hol-status .pricing-state-link {
  min-height: 0;
}
/* The NSW Bank Holiday: a fact to act on, so set apart with the accent rule
   the info popover and the rail use to mean "read this". */
.hol-note {
  margin: 0 16px 14px;
  padding: 8px 12px;
  border-left: 2px solid var(--accent);
  background: var(--color-bg-panel);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text);
  max-width: 78ch;
}
.hol-years {
  display: grid;
  border-top: 1px solid var(--border);
}
.hol-year {
  padding: 12px 16px 10px;
  min-width: 0;
}
.hol-year + .hol-year {
  border-top: 1px solid var(--border);
}
.hol-year-head {
  font-family: 'Delight', 'Georgia', serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 4px;
}
.hol-count {
  font-family: var(--font-family-body);
  font-weight: 400;
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--muted);
}
.hol-list {
  list-style: none;
}
/* Phone: date | name over its source tag | remove. */
.hol-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 44px;
  grid-template-areas: 'date name del' 'date src del';
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  min-height: 44px;
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border-hairline);
  font-size: 12px;
}
.hol-item:last-child {
  border-bottom: 0;
}
.hol-date {
  grid-area: date;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.hol-name {
  grid-area: name;
  color: var(--text);
  overflow-wrap: anywhere;
}
.hol-src {
  grid-area: src;
  justify-self: start;
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  padding: 1px 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  white-space: nowrap;
}
/* The owner's own dates stand out from the fetched ones: an edge and full
   text, not colour alone. */
.hol-src.hol-src-added {
  border-color: var(--accent-text);
  color: var(--text);
}
/* A date already gone this year, kept for reference. */
.hol-past .hol-date,
.hol-past .hol-name {
  color: var(--muted);
}
.hol-del {
  grid-area: del;
  justify-self: end;
  min-width: 44px;
  min-height: 44px;
  font-size: 16px;
}
.hol-empty {
  padding: 10px 0;
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
}
/* A refused add, remove or fetch, in the screen's one error palette. */
.hol-error {
  display: none;
  margin: 0 16px 12px;
  padding: 8px 12px;
  border: 1px solid var(--err-border);
  background: var(--err-bg);
  color: var(--err-text);
  font-size: 12px;
}
.hol-error.show {
  display: block;
}
.hol-add {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--color-bg-panel);
}
.hol-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 100%;
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--muted);
}
.hol-optional {
  text-transform: none;
  letter-spacing: 0;
}
.hol-field input {
  width: 100%;
}
.hol-add-btns {
  display: flex;
  gap: 8px;
  flex: 1 1 100%;
}
.hol-add-btns .btn,
.hol-foot .btn {
  flex: 1;
  justify-content: center;
  min-height: 44px;
}

@media (min-width: 768px) {
  .surch-row {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 40px;
    align-items: start;
  }
  .surch-ctl {
    align-items: flex-end;
    gap: 10px;
  }
  .surch-sub {
    justify-content: flex-end;
  }
  .surch-week legend {
    margin-left: auto;
    text-align: right;
  }
  .surch-week {
    align-self: auto;
  }
  .surch-days {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .surch-inp,
  .hol-field input {
    font-size: 13px;
    min-height: 0;
  }
  .surch-inp {
    width: 80px;
  }
  .surch-inp.surch-inp-days {
    width: 56px;
  }
  .surch-day span {
    min-width: 38px;
    min-height: 28px;
  }
  .surch-mode-opts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hol-item {
    grid-template-columns: 82px minmax(0, 1fr) auto 28px;
    grid-template-areas: 'date name src del';
    min-height: 34px;
    padding: 2px 0;
  }
  .hol-del {
    min-width: 28px;
    min-height: 28px;
  }
  .hol-field {
    flex: 0 0 auto;
  }
  .hol-field.hol-field-name {
    flex: 1 1 220px;
  }
  .hol-add-btns {
    flex: 0 0 auto;
  }
  .hol-add-btns .btn,
  .hol-foot .btn {
    flex: 0 0 auto;
    min-height: 0;
  }
}

/* The two years side by side only where each column still fits a name on
   one line: at 800 they were 295px wide and "New Year's Day" wrapped. */
@media (min-width: 1100px) {
  .hol-years {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hol-year + .hol-year {
    border-top: 0;
    border-left: 1px solid var(--border);
  }
}

@media (prefers-reduced-motion: reduce) {
  .surch-inp,
  .hol-field input,
  .surch-day span,
  .surch-mode-opt {
    transition: none;
  }
}

/* ── Capture and Deliverable Types (production-booking B2-9) ────────────────
   The Capture column is the one change inside the existing tables (the
   brief's exception to the Desktop Preservation Law): a sixth column on the
   On set category only. Its head carries the ⓘ, so it takes its own width
   rather than the 48px the Custom/Direct heads hold.

   The Deliverable Types block speaks the Surcharges block's language: a
   .billing-block with a panel-layer head, hairline rules between rows, fields in
   the inset well, 16px and 44px on a phone. Phone first, as above. */

.pricing-table th.pricing-capture-th {
  width: auto;
  white-space: nowrap;
}
/* The 18px circle would make the head row taller than every other
   category's, pushing the grid's next row down (measured: 5px). Negative
   margins keep it out of the line box; its 44px hit area is unchanged. */
.pricing-capture-th .info {
  margin: -4px 0;
}
.pricing-capture-th .info-btn {
  margin-left: 4px;
}
/* What Capture means, for a phone, where the column head is hidden. */
.pricing-capture-note {
  padding: 10px 12px 2px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.billing-block.dtype-block {
  overflow-x: hidden;
}
.billing-block.dtype-block .bb-head {
  min-width: 0;
}
.dtype-intro {
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 78ch;
}
.dtype-intro strong {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

/* The column heads: only where the row is a row (768 up). */
.dtype-head {
  display: none;
}
.dtype-list {
  list-style: none;
  border-top: 1px solid var(--color-border-hairline);
}

/* Phone: one type is a stack, label above field, × in the corner. */
.dtype-row {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 14px 16px 16px;
  border-bottom: 1px solid var(--color-border-hairline);
}
.dtype-row:last-child {
  border-bottom: 0;
}
.dtype-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
.dtype-lbl {
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--muted);
}
.dtype-lbl-note {
  text-transform: none;
  letter-spacing: 0;
}
/* Clear of the × in the row's corner. */
.dtype-what .dtype-lbl:first-child {
  padding-right: 44px;
}
.dtype-what .dtype-desc {
  margin-bottom: 4px;
}
.dtype-what .dtype-lbl + .dtype-inp + .dtype-lbl {
  margin-top: 6px;
}

.dtype-inp,
.dtype-add {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  font-family: var(--font-family-body);
  font-size: 16px;
  padding: 6px 10px;
  min-height: 44px;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}
.dtype-inp:focus,
.dtype-add:focus {
  border-color: var(--accent);
}
.dtype-inp[aria-invalid='true'] {
  border-color: var(--err-text);
}
.dtype-name {
  font-weight: 600;
}
.dtype-desc {
  resize: none;
  overflow: hidden;
  field-sizing: content;
  min-height: 44px;
  line-height: 1.5;
  color: var(--text);
}
.dtype-inp::placeholder {
  color: var(--muted);
  opacity: 1;
}
.dtype-add {
  cursor: pointer;
}
.dtype-add:disabled {
  cursor: default;
  color: var(--muted);
  border-style: dashed;
}
.dtype-add option {
  background: var(--color-bg-float);
  color: var(--text);
}

/* Post services as chips. A chip's × is its own target, the whole chip's
   height. */
.dtype-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dtype-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding-left: 10px;
  border: 1px solid var(--border);
  background: var(--color-bg-panel);
  font-size: 12px;
  color: var(--text);
}
/* The name, then "missing" beside it if there's room, else under it: a
   long name keeps its line rather than being squeezed beside the flag. */
.dtype-chip-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  min-width: 0;
  padding: 4px 0;
}
.dtype-chip-name {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.dtype-chip-x {
  flex-shrink: 0;
  align-self: stretch;
  /* Over the chip's own border, so it's the chip's full 44px, not 42. */
  margin: -1px -1px -1px 0;
  min-width: 44px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
}
.dtype-chip-x:hover {
  color: var(--color-status-error-text);
}
.dtype-chip-x:focus-visible {
  outline: 2px solid transparent;
  outline-offset: -2px;
  box-shadow: inset 0 0 0 2px var(--color-border-focus);
}
/* A service no longer on the card: struck through, dashed, and the word
   itself, so it never rests on colour alone. */
.dtype-chip.dtype-chip-missing {
  border-style: dashed;
  border-color: var(--err-border);
  background: none;
}
.dtype-chip-missing .dtype-chip-name {
  color: var(--muted);
}
.dtype-chip-flag {
  flex-shrink: 0;
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--err-text);
}
.dtype-none {
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
}

.dtype-mult-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.dtype-mult-inp {
  width: 96px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dtype-mult-inp::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.dtype-mult-unit {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.dtype-act {
  position: absolute;
  top: 6px;
  right: 6px;
}

.dtype-empty {
  padding: 14px 16px;
  border-top: 1px solid var(--color-border-hairline);
  font-size: 11px;
  font-style: italic;
  line-height: 1.6;
  color: var(--muted);
}
.dtype-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  background: var(--color-bg-hover);
}
.dtype-foot .btn {
  justify-content: center;
}

/* 768 up: compact fields (a mouse, not a thumb). 768–1099 a type is two
   columns, what it is and its multiplier beside its services, labels still
   above each field: at 800 the four-column row left Post services 129px
   wide, and a long service name broke over five lines (measured). */
@media (min-width: 768px) {
  .pricing-capture-note {
    display: none;
  }

  .dtype-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    grid-template-areas: 'what svcs' 'mult svcs';
    column-gap: 20px;
    row-gap: 12px;
    align-items: start;
    padding-right: 48px;
  }
  .dtype-what {
    grid-area: what;
  }
  .dtype-svcs {
    grid-area: svcs;
  }
  .dtype-mult {
    grid-area: mult;
  }
  .dtype-what .dtype-lbl:first-child {
    padding-right: 0;
  }
  .dtype-inp,
  .dtype-add {
    font-size: 13px;
    min-height: 0;
    padding: 5px 8px;
  }
  .dtype-desc {
    min-height: 30px;
    font-size: 12px;
  }
  /* A select is as wide as its longest option, a 40-character service name;
     closed, it only ever says "+ Add service". */
  .dtype-add {
    align-self: flex-start;
    width: 240px;
    max-width: 100%;
  }
  .dtype-chip {
    min-height: 28px;
    font-size: 11px;
    padding-left: 9px;
  }
  .dtype-chip-text {
    padding: 3px 0;
  }
  .dtype-chip-x {
    min-width: 28px;
    font-size: 13px;
  }
  .dtype-none {
    line-height: 28px;
  }
  .dtype-mult-row {
    flex-wrap: nowrap;
  }
  .dtype-mult-inp {
    width: 64px;
  }
  .dtype-mult-unit {
    font-size: 11px;
  }
  .dtype-act {
    top: 10px;
    right: 10px;
  }
  .dtype-foot {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* 1100 up: one row per type under four column heads; the labels above each
   field stay for screen readers only. The head and each row are separate
   grids, so every column is a set width or a share, never `auto`, or the
   heads would drift off their fields. */
@media (min-width: 1100px) {
  .dtype-head,
  .dtype-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(0, 1.5fr) 168px 28px;
    grid-template-areas: 'what svcs mult act';
    column-gap: 20px;
    padding-left: 16px;
    padding-right: 10px;
  }
  .dtype-head {
    padding-top: 7px;
    padding-bottom: 7px;
    border-top: 1px solid var(--color-border-hairline);
    font-size: var(--font-size-sm);
    letter-spacing: var(--letter-spacing-normal);
    color: var(--muted);
  }
  .dtype-head + .dtype-list {
    border-top-color: var(--border);
  }
  .dtype-row {
    padding-top: 10px;
    padding-bottom: 12px;
  }
  .dtype-lbl {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .dtype-what .dtype-desc {
    margin-bottom: 0;
  }
  .dtype-what .dtype-lbl + .dtype-inp + .dtype-lbl {
    margin-top: 0;
  }
  .dtype-act {
    grid-area: act;
    position: static;
    display: flex;
    justify-content: center;
    padding-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dtype-inp,
  .dtype-add,
  .dtype-chip-x {
    transition: none;
  }
}
