/* ===========================================================================
   SolutionsDataHub -- HERO FILM v2, part 2/3: the five answer shapes.
   ① KPI + this year vs last year (line) · ② ranking bars · ③ days-left
   gauges · ④ split (donut) · ⑤ dashboard of all four + share link.
   Colours: one series = --blue; comparison = muted dashed; the single fact
   the answer sentence names = --amber badge. Donut = navy -> blue -> pale ->
   grey (largest share darkest). All data fictional (caption says so).
   Final frames only; motion in datahub-film-3.css.
   =========================================================================== */

/* ---- ① KPI + line ------------------------------------------------------------ */
.dh-f-kpis { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 22px; }   /* the legend drops under the KPIs when the card is narrow */
.dh-f-kpi { display: grid; margin: 0; }
.dh-f-kl { font-size: 13px; color: var(--muted); white-space: nowrap; }
.dh-f-kv { font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif; font-size: 24px; font-weight: 900; line-height: 1.25; color: var(--navy); letter-spacing: 0.01em; }
.dh-f-kv small { margin-left: 2px; font-size: 13px; font-weight: 700; }
.dh-f-up { font-size: 12px; font-weight: 700; color: #237A4C; white-space: nowrap; }
.dh-f-legend { display: flex; gap: 12px; margin: 2px 0 0 auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dh-f-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dh-f-legend span::before { content: ""; width: 14px; height: 0; border-top: 2px solid var(--blue); }
.dh-f-legend .is-prev::before { border-top: 2px dashed #9BB0C4; }
.dh-f-line { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.dh-f-line svg, .dh-f-tile svg { flex: 1 1 auto; min-height: 0; width: 100%; overflow: visible; }
.dh-f-grid { fill: none; stroke: var(--dh-hair); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dh-f-area { fill: rgba(27, 111, 179, 0.1); stroke: none; }
.dh-f-prev { fill: none; stroke: #9BB0C4; stroke-width: 1.6; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.dh-f-cur { fill: none; stroke: var(--blue); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dh-f-x { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 4px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---- ② ranking bars / ③ days-left gauges (same 4-column row) ----------------- */
.dh-f-bars, .dh-f-stock { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-around; }
.dh-f-bars li, .dh-f-stock li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 48px 50px; column-gap: 8px; align-items: center; font-size: 13px; }
.dh-f-stock li { grid-template-columns: 108px minmax(0, 1fr) 62px; }
.dh-f-bl, .dh-f-sn { font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-f-bt { height: 12px; border-radius: 6px; background: var(--surface); }
.dh-f-bt i { display: block; width: calc(var(--w) * 100%); height: 100%; border-radius: 6px; background: var(--blue-pale); transform-origin: left center; }
.dh-f-bars b { font-weight: 700; color: var(--navy); text-align: right; white-space: nowrap; }
.dh-f-dl { color: #237A4C; font-weight: 700; text-align: right; white-space: nowrap; }
.dh-f-bars .is-top .dh-f-bt i { background: var(--blue); }
.dh-f-bars .is-down .dh-f-dl { color: var(--muted); }
.dh-f-sd { text-align: right; font-weight: 700; color: var(--muted); white-space: nowrap; }
.dh-f-stock .dh-f-bt i { background: #C6D3E0; }
.dh-f-stock .is-amb .dh-f-bt i { background: var(--amber); }
.dh-f-stock .is-amb .dh-f-sd { color: #8A5A00; }
.dh-f-stock .is-red .dh-f-bt i { background: #D9534F; }
.dh-f-stock .is-red .dh-f-badge { background: #D9534F; color: var(--white); }   /* 4.0:1, bold 10.5px = UI badge, paired with the sentence above */

/* ---- ④ donut ----------------------------------------------------------------- */
.dh-f-card--donut { flex-direction: row; align-items: center; gap: 28px; padding-left: 28px; }
.dh-f-donut { position: relative; flex: none; width: 168px; height: 168px; }
.dh-f-donut svg, .dh-f-tile--donut svg { width: 100%; height: 100%; transform: rotate(0deg); }
.dh-f-donut circle, .dh-f-tile--donut circle { fill: none; stroke-width: 6.2; }
.dh-f-ring { stroke: var(--surface); }
.dh-f-dc { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 13px; color: var(--muted); }
.dh-f-dc b { display: block; font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif; font-size: 22px; font-weight: 900; line-height: 1.2; color: var(--navy); }
.dh-f-leg { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1 1 auto; }
.dh-f-leg li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; column-gap: 8px; align-items: center; font-size: 13px; color: var(--ink); }
.dh-f-leg li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.dh-f-leg b { font-size: 13px; color: var(--navy); }

/* ---- ⑤ dashboard + share ------------------------------------------------------ */
.dh-f-dash { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; }
.dh-f-tile { display: flex; flex-direction: column; gap: 6px; min-height: 0; padding: 10px 12px; border: 1px solid var(--dh-hair); border-radius: 12px; background: var(--white); box-shadow: 0 2px 8px -4px rgba(16, 42, 67, 0.14); }
.dh-f-tt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 6px; margin: 0; font-size: 13px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.dh-f-tt b { color: #237A4C; }
.dh-f-cols { flex: 1 1 auto; display: flex; align-items: flex-end; gap: 10%; padding: 0 6%; border-bottom: 1px solid var(--dh-hair); }
.dh-f-cols i { flex: 1 1 0; height: calc(var(--h) * 100%); border-radius: 4px 4px 0 0; background: var(--blue-pale); transform-origin: center bottom; }
.dh-f-cols .is-top { background: var(--blue); }
.dh-f-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; margin: auto 0; font-size: 13px; font-weight: 700; color: var(--navy); }
.dh-f-big b { font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif; font-size: 34px; font-weight: 900; line-height: 1; color: #C0392B; }
.dh-f-tile--donut svg { flex: 1 1 auto; min-height: 0; }
.dh-f-share { flex: none; display: flex; align-items: center; gap: 8px; align-self: flex-end; margin: 0; padding: 6px 10px 6px 8px; border-radius: 10px; background: var(--navy); font-size: 13px; font-weight: 700; color: var(--white); }
.dh-f-share svg { width: 15px; height: 15px; color: var(--blue-pale); stroke-width: 1.6; }
.dh-f-share .dh-chip { background: rgba(255, 255, 255, 0.14); color: var(--white); }

@media (min-width: 1024px) and (max-width: 1199px) {
  .dh-f-card--donut { gap: 18px; padding-left: 16px; }
  .dh-f-donut { width: 140px; height: 140px; }
}
@media (max-width: 759px) {
  .dh-f-kpis { gap: 16px; flex-wrap: wrap; }
  .dh-f-kv { font-size: 20px; }
  .dh-f-legend { margin-left: 0; width: 100%; }
  .dh-f-bars li { grid-template-columns: 30px minmax(0, 1fr) 42px 50px; column-gap: 6px; }
  .dh-f-stock li { grid-template-columns: 106px minmax(0, 1fr) 62px; column-gap: 6px; }
  .dh-f-card--donut { gap: 14px; padding-left: 12px; }
  .dh-f-donut { width: 120px; height: 120px; }
  .dh-f-dc b { font-size: 17px; }
  .dh-f-big b { font-size: 28px; }
}
