/*
 * The dashboard's composition: the page header, the figures, the grids, the
 * week's chart, Today, busy times, the feature cards, Insights, QR & share,
 * the reports layout and the printed poster. Built on vendor.css's tokens.
 */

.d-dash { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }

/* ── The page header ──────────────────────────────────────────────────── */

.d-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 10px 4px 6px;
}
.d-eyebrow { margin: 0 0 6px; font-size: var(--t-foot); font-weight: 600; color: var(--ink-3); }
.d-title { margin: 0; font-size: var(--t-title); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; }
.d-lede { margin: 8px 0 0; font-size: var(--t-body); color: var(--ink-2); max-width: 62ch; }
.d-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.d-foot { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 4px; font-size: var(--t-foot); color: var(--ink-3); }

/* What changed since the last visit, as a slim banner. */
.v-digest {
  margin: 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  font-size: var(--t-sub);
  color: var(--ink-2);
}
.v-fact {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.v-fact:hover { text-decoration: underline; }

/* ── Grids ────────────────────────────────────────────────────────────── */

.d-grid-main { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
.d-col-main { display: flex; min-width: 0; }
.d-col-main > * { flex: 1; }
.d-col-side { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.d-col-side > :last-child { flex: 1; }

.d-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.d-grid-wide { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--gap); }
.d-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.d-says-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--gap); align-items: stretch; }

/* ── The figures ──────────────────────────────────────────────────────── */

.d-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.d-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 150px;
  padding: 20px 20px 18px;
  border: 0;
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
}
.d-kpi-btn { cursor: pointer; transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease); }
.d-kpi-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.d-kpi-btn:hover .v-arrow { transform: rotate(45deg); background: var(--inset); }
.d-kpi-btn:active { transform: scale(0.98); }
.d-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.d-kpi-label { font-size: var(--t-body); font-weight: 600; color: var(--ink); }
.d-kpi-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--inset); color: var(--ink-2); }
.d-kpi-value {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: auto 0 8px;
  padding-top: 14px;
  font-size: var(--t-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.d-kpi-star { color: var(--gold); }
.d-kpi-star .ic { fill: currentColor; }
.d-kpi-none { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-3); }
.d-kpi-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--t-foot); color: var(--ink-2); line-height: 1.4; }

.d-delta {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink-2);
  font-size: var(--t-cap);
  font-weight: 700;
}
.d-delta.up { background: var(--tint-2); color: var(--link); }
.d-delta.down { background: var(--red-tint); color: var(--red-ink); }

/* The hero: the figure the vendor is asking about, filled green. */
.d-kpi.is-hero {
  background: radial-gradient(130% 120% at 100% 0%, var(--g-500) 0%, var(--g-700) 42%, var(--g-900) 100%);
  color: #fff;
  box-shadow: 0 18px 36px -18px color-mix(in srgb, var(--g-800) 80%, transparent);
}
.d-kpi.is-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fff;
  opacity: 0.09;
  -webkit-mask: var(--v-hub) right -140px top -160px / 460px 460px no-repeat;
  mask: var(--v-hub) right -140px top -160px / 460px 460px no-repeat;
}
.d-kpi.is-hero .d-kpi-label { color: #fff; }
.d-kpi.is-hero .d-kpi-sub { color: rgba(255, 255, 255, 0.78); }
.d-kpi.is-hero .d-kpi-none { color: rgba(255, 255, 255, 0.7); }
.d-kpi.is-hero .v-arrow { border-color: transparent; background: #fff; color: var(--g-800); }
.d-kpi.is-hero .d-kpi-ico { background: rgba(255, 255, 255, 0.16); color: #fff; }
.d-kpi.is-hero .d-delta { background: rgba(255, 255, 255, 0.18); color: #fff; }
.d-kpi-btn.is-hero:hover .v-arrow { background: var(--g-100); }

/* ── Today ────────────────────────────────────────────────────────────── */

/* Rows share out any height the column is given, rather than leaving it
   under the last one. */
.d-today { display: flex; flex-direction: column; padding-bottom: 10px; }
.d-today .d-today-row { flex: 1 1 auto; max-height: 92px; }
.d-today .d-card-head { margin-bottom: 6px; }
.d-today-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% + 16px);
  margin: 0 -8px;
  padding: 10px 8px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}
.d-today-row:hover { background: var(--inset); }
.d-today-row:hover .d-today-chev { transform: translateX(2px); color: var(--ink-2); }
.d-today-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.d-today-key { font-size: var(--t-cap); font-weight: 600; color: var(--ink-3); }
.d-today-val { font-size: var(--t-body); font-weight: 600; line-height: 1.35; }
.d-today-sub { font-weight: 500; color: var(--ink-2); }
.d-today-muted { font-weight: 500; color: var(--ink-3); }
.d-today-chev { color: var(--ink-3); transition: transform 0.25s var(--spring), color 0.2s; }

/* ── Latest ───────────────────────────────────────────────────────────── */

.d-latest { display: flex; flex-direction: column; }
.d-recent { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.d-recent li { display: flex; align-items: center; gap: 12px; padding: 6px 0; min-width: 0; }
.d-recent .v-glyph { width: 34px; height: 34px; border-radius: 11px; }
.d-recent-body { display: flex; flex-direction: column; min-width: 0; }
.d-recent-text { overflow: hidden; font-size: var(--t-sub); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.d-recent-meta { font-size: var(--t-cap); color: var(--ink-3); }
.d-recent-stars { color: var(--gold); letter-spacing: 1px; }
.d-empty-state { display: flex; align-items: flex-start; gap: 12px; color: var(--ink-3); }

/* ── The week's chart: pills, as the reference draws them ────────────── */

.d-chart { position: relative; padding-top: 28px; }
/* On the Overview the chart takes whatever height its row gives the card,
   so a tall neighbour makes taller bars rather than empty space above them. */
.d-week { display: flex; flex-direction: column; }
.d-week .d-chart { display: flex; flex: 1; flex-direction: column; }
.d-week .d-cols { flex: 1; height: auto; min-height: 210px; }
.d-cols {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: clamp(4px, 1.4vw, 14px);
  align-items: end;
  height: 210px;
}
.d-cols:not(.d-cols-week) { gap: 4px; }
.d-col { display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; min-width: 0; }
.d-bar-slot { position: relative; display: flex; align-items: flex-end; justify-content: center; flex: 1; width: 100%; }
.d-bar {
  position: relative;
  display: block;
  width: 100%;
  max-width: 58px;
  border-radius: 999px;
  background: var(--g-300);
  transform-origin: bottom;
  animation: v-grow 0.9s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes v-grow { from { transform: scaleY(0); } }
.d-bar-in { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 999px; background: var(--g-700); }
.d-col.is-today .d-bar { background: var(--g-600); }
.d-col.is-today .d-bar-in { background: var(--g-900); }
.d-col.is-zero .d-bar {
  background: repeating-linear-gradient(-45deg, var(--hatch) 0 3px, transparent 3px 8px);
  box-shadow: inset 0 0 0 1.5px var(--hatch);
}
.d-bar-flag {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  padding: 3px 8px;
  border: 1px solid var(--g-300);
  border-radius: 999px;
  background: var(--card);
  color: var(--link-strong);
  font-size: var(--t-cap);
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
}
.d-tick { font-size: var(--t-cap); font-weight: 600; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.d-col.is-today .d-tick { color: var(--ink); }
.d-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: var(--t-cap); color: var(--ink-2); }
.d-legend span { display: inline-flex; align-items: center; gap: 7px; }
.d-sw { width: 12px; height: 12px; border-radius: 4px; }
.d-sw-views { background: var(--g-300); }
.d-sw-dir { background: var(--g-700); }
.d-sw-zero { background: repeating-linear-gradient(-45deg, #c9ccd3 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px #c9ccd3; }

/* ── Busy times ───────────────────────────────────────────────────────── */

.d-heat { display: grid; grid-template-columns: 38px repeat(18, minmax(0, 1fr)); gap: 4px; align-items: center; }
.d-hour { font-size: var(--t-cap); color: var(--ink-3); }
.d-row-label { font-size: var(--t-cap); font-weight: 600; color: var(--ink-2); }
.d-cell { display: block; height: 26px; border-radius: 7px; background: var(--inset); transition: transform 0.2s var(--spring); }
.d-cell:hover { transform: scale(1.12); }
.d-cell[data-level="0"] { background: var(--level-0); }
.d-cell[data-level="1"] { background: var(--g-300); }
.d-cell[data-level="2"] { background: var(--s-busy); }
.d-cell[data-level="3"] { background: var(--s-sold); }
.d-legend .d-cell { width: 12px; height: 12px; border-radius: 4px; }

.d-busy { display: flex; flex-direction: column; }
.d-busy-line { margin: 0 0 16px; font-size: var(--t-lead); letter-spacing: -0.01em; color: var(--ink-2); }
.d-busy-line b { color: var(--ink); font-weight: 700; }
.d-busy-strip { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: 3px; align-items: end; height: 96px; margin-top: auto; }
.d-busy-h { display: block; height: var(--h); border-radius: 999px; background: var(--inset); transform-origin: bottom; animation: v-grow 0.8s var(--spring) both; }
.d-busy-h[data-level="0"] { background: var(--level-0); }
.d-busy-h[data-level="1"] { background: var(--g-300); }
.d-busy-h[data-level="2"] { background: var(--s-busy); }
.d-busy-h[data-level="3"] { background: var(--s-sold); }
.d-busy-h.is-now { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.d-busy-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.d-busy-now { margin: 12px 0 0; font-size: var(--t-foot); font-weight: 600; color: var(--ink-2); }

/* ── Feature cards: the dark ones ─────────────────────────────────────── */

.d-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px;
  border-radius: var(--r-card);
  background: radial-gradient(120% 100% at 0% 100%, var(--g-700) 0%, var(--g-900) 55%, var(--g-950) 100%);
  color: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  isolation: isolate;
}
.d-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fff;
  opacity: 0.08;
  -webkit-mask: var(--v-hub) right -200px bottom -360px / 620px 620px no-repeat;
  mask: var(--v-hub) right -200px bottom -360px / 620px 620px no-repeat;
}
.d-feature-k { display: flex; align-items: center; gap: 7px; margin: 0; font-size: var(--t-cap); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--g-300); }
.d-feature-t { margin: 12px 0 6px; font-size: var(--t-title3); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.d-feature-s { margin: 0; font-size: var(--t-sub); color: rgba(255, 255, 255, 0.74); line-height: 1.5; }
.d-feature-price { margin: auto 0 14px; padding-top: 16px; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; }
.d-feature-price span { margin-left: 4px; font-size: var(--t-sub); font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, 0.7); }
.d-feature-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; font-size: var(--t-sub); color: rgba(255, 255, 255, 0.86); }
.d-feature-list li { display: flex; gap: 8px; align-items: center; }
.d-feature-list .ic { color: var(--g-300); }
.d-feature-bar { height: 6px; margin: auto 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.d-feature-bar i { display: block; height: 100%; border-radius: inherit; background: var(--g-300); }
.d-feature .v-btn { align-self: flex-start; margin-top: auto; background: #fff; color: var(--g-900); }
.d-feature .v-btn:hover { background: var(--g-100); }
.d-feature-price + .v-btn,
.d-feature-bar + .v-btn { margin-top: 0; }

.d-qr-mini { display: flex; gap: 20px; align-items: center; }
.d-qr-mini-code { flex: none; width: 128px; padding: 8px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--sep); }
.d-qr-mini-svg { display: block; width: 100%; height: auto; }
.d-qr-mini-t { margin: 0 0 6px; font-size: var(--t-lead); font-weight: 700; letter-spacing: -0.015em; }
.d-qr-mini .v-btn { margin-top: 14px; }
.d-grid-3 .d-qr-mini { flex-direction: column; align-items: flex-start; }
.d-grid-3 .d-qr-mini-code { width: 112px; }

.d-peek-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; font-size: var(--t-sub); font-weight: 600; }
.d-peek-list li { display: flex; align-items: center; gap: 12px; }
.d-peek-list .v-glyph { width: 34px; height: 34px; border-radius: 11px; }

/* ── Insights ─────────────────────────────────────────────────────────── */

.d-view { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.d-seg { min-width: 260px; }
.d-teaser-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.d-teaser-item { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 14px; border-radius: 16px; background: var(--inset); }
.d-teaser-item .v-glyph { grid-row: span 2; }
.d-teaser-item strong { font-size: var(--t-body); }
.d-teaser-item > span:last-child { font-size: var(--t-foot); color: var(--ink-2); line-height: 1.45; }
.d-teaser-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.d-teaser-note { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--t-sub); color: var(--ink-2); }
.d-teaser-note .ic { color: var(--link); }

/* ── QR & share: the poster studio ────────────────────────────────────── */

.d-share { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.d-studio { display: flex; flex-direction: column; gap: 18px; }
.d-studio .d-card-head { margin-bottom: 0; }

/* The preview stands on a lit stage, tilted a little like a product shot,
   and squares up when the pointer is over it. */
.d-stage {
  display: grid;
  place-items: center;
  padding: 30px 20px 34px;
  border-radius: 20px;
  background: radial-gradient(80% 70% at 50% 30%, var(--card) 0%, var(--inset) 100%);
  box-shadow: inset 0 0 0 1px var(--sep);
  perspective: 1400px;
}
.d-sheet {
  width: min(100%, 300px);
  aspect-ratio: 148 / 210;
  padding: 26px 22px 22px;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 34px 60px -26px rgba(0, 0, 0, 0.5);
  transform: rotateX(5deg) rotateY(-9deg);
  transition: transform 0.7s var(--spring);
}
.d-stage:hover .d-sheet { transform: none; }
.d-sheet.is-changing { animation: p-settle 0.55s var(--spring); }
@keyframes p-settle { from { opacity: 0.6; transform: scale(0.96) rotateX(5deg) rotateY(-9deg); } }

/* The poster itself, the same on the stage and on paper: layout here, sizes
   for print in the print block below. */
.d-sheet,
.d-poster {
  position: relative;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  font-family: inherit;
}
.d-sheet { display: flex; }
.d-sheet::before,
.d-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fff;
  opacity: var(--p-art, 0);
  -webkit-mask: var(--v-hub) center bottom -120px / 560px 560px no-repeat;
  mask: var(--v-hub) center bottom -120px / 560px 560px no-repeat;
}
.p-brand { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; color: var(--p-brand); }
.p-brand .v-mark { width: 16px; height: 16px; }
.p-lead { margin: 14px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
.p-name { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--p-soft); }
.p-code { width: 66%; margin: auto 0; padding: 7px; border-radius: 12px; background: #fff; box-shadow: var(--p-code-edge, none); }
.p-code svg { display: block; width: 100%; height: auto; }
.p-hint { margin: 0; max-width: 24ch; font-size: 10.5px; line-height: 1.4; color: var(--p-soft); }
.p-url { margin: 8px 0 0; font-size: 11px; font-weight: 800; letter-spacing: 0.02em; color: var(--p-brand); }

/* The three looks. Print keeps them: see print-color-adjust below. */
[data-style="green"]:is(.d-sheet, .d-poster) {
  background: radial-gradient(130% 80% at 50% 0%, var(--g-500) 0%, var(--g-700) 42%, var(--g-900) 100%);
  color: #fff;
  --p-brand: #c9f2dc;
  --p-soft: rgba(255, 255, 255, 0.8);
  --p-art: 0.12;
}
[data-style="night"]:is(.d-sheet, .d-poster) {
  background: radial-gradient(130% 80% at 50% 0%, #30343b 0%, #16181c 55%, #0c0d0f 100%);
  color: #fff;
  --p-brand: var(--g-300);
  --p-soft: rgba(255, 255, 255, 0.72);
  --p-art: 0.1;
}
[data-style="paper"]:is(.d-sheet, .d-poster) {
  background: #ffffff;
  color: #111317;
  --p-brand: var(--g-700);
  --p-soft: #4b4f57;
  --p-code-edge: inset 0 0 0 1px #e1e3e7;
}

.d-studio-controls { display: flex; flex-direction: column; gap: 14px; }
.d-poster-styles { max-width: 360px; }
.d-studio-controls .v-field-k { margin-top: 0; margin-bottom: 8px; }
.d-studio-controls .v-chips { margin-top: 0; }
.d-swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--sep-2); }
.d-swatch[data-style="green"] { background: linear-gradient(135deg, var(--g-500), var(--g-900)); }
.d-swatch[data-style="night"] { background: linear-gradient(135deg, #3a3e45, #0c0d0f); }
.d-swatch[data-style="paper"] { background: #fff; }
.d-share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.d-share-actions .v-btn { flex: 1 1 200px; }

.d-share-side { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.d-scans { min-height: 0; }
.d-scans .d-kpi-value { margin-top: 18px; }
.d-scans .v-btn { align-self: flex-start; margin-top: 14px; background: #fff; color: var(--g-900); }
.d-spark { display: flex; align-items: flex-end; gap: 2px; height: 46px; margin-top: 14px; }
.d-spark i { flex: 1; border-radius: 3px; background: rgba(255, 255, 255, 0.45); transform-origin: bottom; animation: v-grow 0.8s var(--spring) both; }
.d-spark i:last-child { background: #fff; }
.d-tips { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: var(--t-sub); color: var(--ink-2); }
.d-tips li { display: flex; align-items: center; gap: 12px; }
.d-tips .v-glyph { width: 34px; height: 34px; border-radius: 11px; }
.d-link-row { display: flex; gap: 8px; }
.d-link { flex: 1; color: var(--ink-2); }
.d-share-targets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.d-share-notice { color: var(--link); }
.d-poster { display: none; }

/* ── Reports & reviews ────────────────────────────────────────────────── */

.d-reports { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; }
.d-reports-side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: var(--gap); }
.d-rating-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.d-rating-avg { font-size: 44px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.d-rating-stars { display: flex; gap: 2px; color: var(--star-off); }
.d-rating-stars i { display: flex; }
.d-rating-stars .is-on { color: var(--gold); }
.d-rating-stars .ic { fill: currentColor; }
.d-rating-bars { display: flex; flex-direction: column; gap: 6px; }
.d-rating-row { display: grid; grid-template-columns: 12px 1fr 20px; align-items: center; gap: 10px; font-size: var(--t-cap); color: var(--ink-2); }
.d-rating-track { height: 7px; border-radius: 999px; background: var(--inset); overflow: hidden; }
.d-rating-track i { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.d-rating-n { text-align: right; }
.d-rating-foot { display: flex; align-items: center; gap: 7px; margin: 16px 0 0; font-size: var(--t-foot); color: var(--ink-2); }
.d-report-week { display: flex; align-items: center; gap: 14px; }
.d-report-week-n { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }

/* ── Narrow screens ───────────────────────────────────────────────────── */

@media (max-width: 1280px) {
  .d-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-grid-3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .d-grid-main, .d-grid-wide, .d-share, .d-says-grid, .d-reports { grid-template-columns: minmax(0, 1fr); }
  .d-reports-side { position: static; }
  .d-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .d-grid-3, .d-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .d-title { font-size: 26px; }
  .d-actions { width: 100%; }
  .d-actions .d-act { flex: 1 1 auto; }
  .d-seg { min-width: 0; width: 100%; }
}
@media (max-width: 520px) {
  .d-kpi { min-height: 128px; padding: 16px; }
  .d-kpi-value { font-size: 32px; }
  .d-heat { grid-template-columns: 30px repeat(18, minmax(0, 1fr)); gap: 2px; }
  .d-cell { height: 18px; border-radius: 4px; }
  .d-hour { font-size: 9.5px; }
  .d-cols { height: 170px; }
  /* Seven "Wed 9" labels do not fit a phone; seven "Wed" do. */
  .d-cols-week .d-tick-date { display: none; }
  .d-qr-mini { flex-direction: column; align-items: flex-start; }
  .d-link-row { flex-direction: column; }
}

/* ── The poster, and only the poster, when printed ──────────────────── */

@media print {
  @page { size: A5 portrait; margin: 0; }
  body.v-scene { background: #ffffff !important; }
  body.v-scene * { visibility: hidden !important; }
  /* As specific as the rule above or more: between two !important rules the
     more specific wins, and a bare .d-poster lost, printing a blank page. */
  body.v-scene .d-poster,
  body.v-scene .d-poster * { visibility: visible !important; }
  .d-poster {
    display: flex !important;
    position: fixed;
    inset: 0;
    justify-content: center;
    gap: 5mm;
    padding: 14mm;
    /* A green or night poster is its colour, not a suggestion the printer
       may drop to save ink. */
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .d-poster::before { -webkit-mask-size: 190mm 190mm; mask-size: 190mm 190mm; -webkit-mask-position: center bottom -40mm; mask-position: center bottom -40mm; }
  .d-poster .p-brand { font-size: 13pt; gap: 2mm; }
  .d-poster .p-brand .v-mark { width: 6mm; height: 6mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .d-poster .p-lead { margin: 2mm 0 0; font-size: 28pt; }
  .d-poster .p-name { margin: 0; font-size: 15pt; }
  .d-poster .p-code { width: 84mm; margin: 3mm 0; padding: 4mm; border-radius: 5mm; }
  .d-poster .p-hint { max-width: 100mm; font-size: 11pt; }
  .d-poster .p-url { margin: 0; font-size: 11pt; }
}
