/* Pasqyra — the home screen (#/) and the intake (#/fillo …). Layout only: colours, type and components come from
   pq.css (tokens --pq-*, area accents .pq-a-*). Load after pq.css.
   Classes of this file:
   home     .pq-home-night · .pq-home-first (hero, no company) · .pq-home-hero (> .pq-home-head .pq-home-flow .pq-home-ctl)
            · .pq-home-live > .pq-home-fig (.pq-home-fig-s) > .pq-home-cap .pq-home-num (.pq-home-hi) .pq-home-sub
            · .pq-home-plan (.pq-home-beside) · .pq-home-tiles > .pq-tile (.pq-tile-missing .pq-tile-v .pq-tile-u .pq-tile-a)
            · .pq-home-save (.pq-home-outside)
            · .pq-home-when · .pq-home-more · .pq-home-what · .pq-home-offers · .pq-home-foot   (root markers without rules: .pq-home, .pq-intake-page)
   intake   .pq-intake (a .pq-split: form + .pq-intake-side) · .pq-intake-pre · .pq-intake-key · .pq-intake-facts
            · .pq-intake-check > .pq-check (.is-ok .is-off) · .pq-intake-go · .pq-intake-note · .pq-intake-hero · .pq-srclink
            · .pq-rib > .pq-rib-row (.is-on .is-measured .is-est .is-missing) > .pq-rib-n .pq-rib-t .pq-rib-v (.pq-rib-none)
            · .pq-lamp (a fieldset: one kind of lamp in the electricity step) */

/* ───────────────────────────── home: the night band ───────────────────────────── */
.pq-home-night { padding-top: 14px; }
.pq-home-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.pq-home-flow .pq-legend { justify-content: center; }
.pq-home-first .pq-hero { padding-top: 14px; }
.pq .pq-home-first .pq-hero h2 { max-width: 20ch; }
.pq-home-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.pq-home-live { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; min-width: 0; }
.pq-home-fig { display: grid; gap: 2px; min-width: 0; }
.pq-home-cap { font-size: 12.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--pq-fg-2); }
.pq-home-num { font: 700 clamp(38px, 11vw, 64px)/1.04 var(--pq-num); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--pq-fg); overflow-wrap: anywhere; }
.pq-home-num .pq-n, .pq-home-num strong { font: inherit; letter-spacing: inherit; }
.pq-home-num small { margin-left: 6px; font: 600 clamp(15px, 3.6vw, 19px)/1 var(--pq-text); letter-spacing: 0; color: var(--pq-fg-2); }
.pq-home-hi { font-size: .5em; font-weight: 600; white-space: nowrap; }
.pq-home-fig-s .pq-home-num { font-size: clamp(24px, 6.4vw, 32px); }
.pq-home-sub { font-size: 13.5px; line-height: 1.4; color: var(--pq-fg-2); }
.pq-home-ctl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.pq-home-ctl .pq-scrub { max-width: 560px; }
.pq-home-plan { font-size: 14.5px; line-height: 1.5; color: var(--pq-fg-2); }
.pq-home-plan .pq-n, .pq-home-plan .pq-range { color: var(--pq-mint-t); }
/* a saving the sum above does not hold (a bill that is missing, food not bought): a quieter line under the plan line */
.pq-home-beside { font-size: 13.5px; }
@media (min-width: 1000px) {
  .pq-wrap.pq-home-hero { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); grid-template-rows: auto 1fr; grid-template-areas: "flow head" "flow ctl"; column-gap: 40px; align-items: start; }
  .pq-home-hero > .pq-home-head { grid-area: head; padding-top: 14px; }
  .pq-home-hero > .pq-home-flow { grid-area: flow; }
  .pq-home-hero > .pq-home-ctl { grid-area: ctl; }
  .pq-home-hero .pq-home-num { font-size: 52px; }
  .pq-home-hero .pq-home-fig-s .pq-home-num { font-size: 30px; }
  .pq-wrap.pq-home-first { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-items: center; }
}

/* ───────────────────────────── home: the light sheet ───────────────────────────── */
.pq .pq-home-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.pq-home-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 700px) { .pq-home-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.pq .pq-tile { display: flex; flex-direction: column; }
.pq .pq-tile-missing { box-shadow: none; border: 1.5px dashed var(--pq-line-2); }
.pq-tile > .pq-card-h { align-items: center; margin-bottom: 6px; }
.pq-tile-v { font: 700 clamp(24px, 6.4vw, 30px)/1.12 var(--pq-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--pq-ac-ink); overflow-wrap: anywhere; }
.pq-tile-v .pq-n, .pq-tile-v .pq-range { font: inherit; white-space: normal; }
.pq .pq-tile-u { margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--pq-fg-2); }
.pq-tile-u .pq-n { color: var(--pq-fg); }
.pq .pq-tile > p:last-of-type { margin-bottom: 14px; }
.pq-tile > .pq-card-f { margin-top: auto; padding-top: 4px; justify-content: space-between; gap: 0 16px; }
.pq .pq-tile-a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 15px; font-weight: 650; text-decoration: none; }
.pq-tile-a .pq-ic { width: 18px; height: 18px; }
/* a chip that is a link keeps the chip's own ink (the link colour of `.pq a` would win otherwise) */
.pq a.pq-chip { text-decoration: none; }
.pq a.pq-chip-duty { color: var(--pq-bg); }
.pq-home-save { font: 700 15px/1.3 var(--pq-num); font-variant-numeric: tabular-nums; color: var(--pq-mint-t); white-space: nowrap; }
.pq-home-save .pq-n, .pq-home-save .pq-range, .pq-home-when .pq-n { font: inherit; }
/* a saving outside the bills (food not bought): its label is text and may wrap; it is not the saving on the bill */
.pq-home-outside { font-weight: 600; color: var(--pq-fg-2); white-space: normal; }
.pq-home-outside .pq-n { color: var(--pq-mint-t); font-weight: 700; }
.pq-home-when { font: 700 15px/1.3 var(--pq-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pq-home-foot { padding-top: 4px; }
.pq-home-what p { font-size: 15px; line-height: 1.5; color: var(--pq-fg-2); }
.pq .pq-home-offers { box-shadow: 0 0 0 2px var(--pq-line-2), var(--pq-shadow); }
.pq .pq-tile-add { color: var(--pq-fg); }

/* ───────────────────────────── intake ───────────────────────────── */
.pq-intake-hero { padding-top: 6px; }
.pq .pq-intake-hero h2 { font-size: clamp(26px, 6.4vw, 40px); }
.pq-intake-form { min-width: 0; }
.pq-intake-go { padding-top: 4px; }
.pq-intake-note { font-size: 13.5px; }
.pq-intake-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 14px; border-radius: var(--pq-r-s); background: var(--pq-surface-2); box-shadow: inset 0 0 0 1px var(--pq-line); }
.pq-intake-facts .pq-line dd { max-width: 56%; }
.pq .pq-srclink { margin-left: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pq .pq-intake-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--pq-fg-2); }
.pq-intake-key span { display: inline-flex; align-items: center; gap: 6px; }
.pq-intake-pre .pq-eyebrow { margin-bottom: 10px; }
@media (max-width: 899px) {
  /* on a phone the ribbon rides under the top bar while the fields scroll, so it is seen growing */
  .pq-intake > .pq-intake-side { order: -1; position: sticky; top: calc(62px + env(safe-area-inset-top)); z-index: 20; }
  .pq .pq-intake-pre { padding: 12px 14px; border-radius: var(--pq-r-s); box-shadow: 0 0 0 1px var(--pq-line), 0 12px 24px -16px rgba(11, 19, 14, .45); }
  .pq .pq-intake-pre .pq-eyebrow, .pq .pq-intake-pre .pq-intake-key { display: none; }
}

/* the lamps of the electricity step: one block per kind of lamp, the last one empty for the next kind */
.pq-lamp { min-width: 0; margin: 0; padding: 12px 14px 14px; border: 0; border-radius: var(--pq-r-s); background: var(--pq-surface-2); box-shadow: inset 0 0 0 1px var(--pq-line); }
.pq-lamp > legend { float: left; width: 100%; margin-bottom: 10px; }
.pq-lamp > legend + * { clear: both; }

/* the mini ribbon: one bar per area, width = EUR per year */
.pq-rib { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pq-rib-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13.5px; line-height: 1.2; }
.pq-rib-n { font-weight: 650; color: var(--pq-ac-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pq-rib-t { display: block; height: 12px; border-radius: 6px; background: var(--pq-surface-2); box-shadow: inset 0 0 0 1px var(--pq-line); overflow: hidden; }
.pq-rib-t i { display: block; height: 100%; border-radius: 6px; background: var(--pq-ac-fill); transition: width .45s var(--pq-ease); }
.pq-rib-row.is-est .pq-rib-t i { background: repeating-linear-gradient(135deg, var(--pq-ac-fill) 0 4px, color-mix(in srgb, var(--pq-ac-fill) 30%, transparent) 4px 8px); box-shadow: inset 0 0 0 1px var(--pq-ac-fill); }
.pq-rib-row.is-missing .pq-rib-t { background: none; box-shadow: none; border: 1.5px dashed var(--pq-line-2); }
.pq-rib-row.is-on .pq-rib-t { height: 18px; border-radius: 9px; }
.pq-rib-row.is-on .pq-rib-t i { border-radius: 9px; }
.pq-rib-v { min-width: 78px; text-align: right; font: 700 13.5px/1.2 var(--pq-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pq-rib-v .pq-n, .pq-rib-v .pq-range { font: inherit; }
.pq-rib-none { font-weight: 600; color: var(--pq-fg-2); }

/* what the engine makes of the typed numbers */
.pq-intake-check { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pq-intake-check:empty { display: none; }
.pq-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; line-height: 1.5; color: var(--pq-fg); }
.pq-check > .pq-ic { width: 20px; height: 20px; margin-top: 1px; color: var(--pq-fg-2); }
.pq-check.is-ok > .pq-ic { color: var(--pq-ok-t); }
.pq-check.is-off > .pq-ic { color: var(--pq-amber-t); }
.pq-check > span { min-width: 0; }
.pq-intake-check .pq-lines { padding: 2px 12px; border-radius: var(--pq-r-xs); background: var(--pq-surface-2); font-size: 14px; }
