/* Supporting page layouts. No price, data or interaction logic lives in CSS. */
.today-hero__grid, .analysis-hero-grid, .smart-calc__panel-grid, .analysis-cta-content { display: grid; grid-template-columns: 1fr; gap: 16px; }
.today-hero-card { display: flex; flex-direction: column; gap: 12px; }
.today-hero-card--secondary { background: var(--accent-soft); }
.today-hero-card__header, .analysis-chart-card__header, .analysis-preview-panel__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.today-hero-card__kicker, .today-hero-card__meta, .today-hero__seo { font-size: .85rem; color: var(--text-muted); }
.today-hero-card__badge, .analysis-chart-badge, .history-v2-badge { display: inline-block; padding: 4px 9px; border-radius: 30px; background: var(--accent-soft); color: var(--accent); font-size: .72rem; font-weight: 650; }
.today-hero-card__time { color: var(--text); font-size: 1.6rem; font-weight: 700; }
.today-hero__insight, .today-hero__seo { margin-top: 16px; }
.hero-v2-card__price-row { display: flex; align-items: baseline; gap: 8px; }
.hero-v2-card__price { font-size: clamp(3rem, 8vw, 4.5rem); font-weight: 750; line-height: 1.1; letter-spacing: -.05em; color: var(--text); }
.hero-v2-card__price--small { font-size: 2.5rem; }
.hero-v2-card__unit { color: var(--text-muted); font-size: .9rem; }
.analysis-cta-block { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--accent-soft); }
.analysis-cta-text p { color: var(--text-soft); font-size: .9rem; max-width: 65ch; }
.analysis-cta-points { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .85rem; color: var(--accent); }
.analysis-cta-points > div { padding-block: 4px; }
.home-calculator-cta { margin-top: 20px; }
.home-calculator-cta__content { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.home-calculator-cta__content p { font-size: .85rem; max-width: 65ch; }
.calc-heading-mobile, .calc-title-mobile, .calc-intro-mobile { display: none; }

/* Calculator. Existing IDs and display states are retained. */
.smart-calc__panel-title { margin-bottom: 12px; }
#smart-calc-v2 .smart-calc__top { margin-bottom: 16px; }
#smart-calc-v2 .smart-toggle { display: grid; grid-template-columns: 16px minmax(0,1fr); align-content: start; padding: 10px; gap: 6px 8px; }
#smart-calc-v2 .smart-toggle strong { font-size: .875rem; }
#smart-calc-v2 .smart-toggle span { grid-column: 1 / -1; font-size: .8rem; line-height: 1.4; }
.smart-examples { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
#smart-calc-v2 .smart-toggle-group { grid-template-columns: repeat(2,minmax(0,1fr)); }
#smart-calc-v2 .smart-calc__results { grid-template-columns: repeat(2,minmax(0,1fr)); }
#smart-calc-v2 .smart-result { padding: 14px; }
#smart-calc-v2 .smart-result--highlight { grid-column: 1 / -1; }
.smart-calc-help summary { padding-inline: 0; font-size: .85rem; }
.smart-calc__lead, .smart-calc__helper, .smart-range-help, .smart-preset-description { max-width: 72ch; font-size: .9rem; color: var(--text-muted); }
.smart-preset-row, .smart-calc__presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block: 20px; }
.smart-preset { display: flex; flex-direction: column; align-items: start; gap: 5px; padding: 14px; text-align: left; }
.smart-preset small { font-size: .72rem; font-weight: 400; }
.smart-preset.is-active, .smart-toggle:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.smart-calc__inputs, .smart-calc__range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 18px; }
.smart-calc__inputs > :last-child { grid-column: 1 / -1; }
.smart-calc__radios, .smart-toggle-group { display: grid; grid-template-columns: 1fr; gap: 10px; margin-block: 16px; }
.smart-toggle { display: flex; align-items: start; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.smart-toggle input { margin-top: 5px; }
.smart-toggle strong, .smart-toggle span { display: block; }
.smart-toggle span { color: var(--text-muted); font-size: .82rem; }
.smart-calc__results, .smart-window-grid, .smart-calc__best-times { display: grid; grid-template-columns: 1fr; gap: 12px; margin-block: 18px; }
.smart-result > span:first-child, .smart-window-card__label { display: block; color: var(--text-muted); font-size: .78rem; margin-bottom: 8px; }
.smart-result strong, .smart-window-card strong { display: block; font-size: 1.6rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.smart-result small, .smart-window-card small { display: block; margin-top: 8px; }
.smart-result--highlight strong, .smart-result__saving { color: var(--accent); }
.smart-delay-info { margin-top: 12px; }
.smart-compare { display: none; }
.smart-compare__row { display: flex; gap: 12px; align-items: center; }
.smart-compare__bar { height: 10px; background: var(--blue); }
.smart-compare__bar--best { background: var(--green); }

/* History. Decorative fake sparklines are intentionally not presented as data. */
.history-v2__header { margin-bottom: 20px; }
.history-v2__header p { color: var(--text-muted); font-size: .9rem; }
.history-v2__top-grid, .history-dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.history-v2-card__head, .history-stat-card__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.history-v2-card__price, .history-stat-card__value { margin-top: 12px; color: var(--text); font-size: 1.9rem; font-weight: 720; letter-spacing: -.04em; }
.history-v2-card__price span, .history-stat-card__value span { font-size: .8rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0; }
.history-v2-card__meta, .history-stat-card__meta, .history-stat-card__trend { font-size: .8rem; color: var(--text-muted); }
.history-v2-spark { display: none; }
.history-v2-panel, .history-v2-months, .history-panel, .history-month-panel { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.history-v2-panel__title, .history-v2-months__head, .history-panel__header, .history-month-panel__top { padding: 16px 20px; background: var(--surface-soft); }
.history-v2-months__head p, .history-month-panel__top p { font-size: .85rem; color: var(--text-muted); }
.history-v2-row, .history-panel__row { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--border); }
.history-v2-row__label, .history-panel__label { font-weight: 650; }
.history-v2-row__value, .history-panel__value { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.history-v2-row__value span:last-child, .history-v2-row__trend, .history-panel__trend { font-size: .8rem; color: var(--text-muted); }
.history-trend--down { color: var(--green); }
.history-trend--up { color: var(--red); }
.history-v2-months__list, .history-month-panel__list { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 20px; }
.history-v2-months__list a { padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .85rem; }

/* Consumption analysis. Keep upload/results states controlled by existing JS. */
.analysis-page-hero { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-soft); }
.analysis-page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.analysis-page-hero__lead { max-width: 65ch; color: var(--text-muted); }
.analysis-preview-panel__grid, .analysis-datahub-steps, .datahub-guide-points { display: grid; grid-template-columns: 1fr; gap: 12px; margin-block: 16px; }
.analysis-preview-label, .analysis-preview-meta { display: block; color: var(--text-muted); font-size: .8rem; }
.analysis-preview-price { display: block; margin-block: 5px; font-size: 1.7rem; font-weight: 750; }
.analysis-preview-price--green { color: var(--green); }
.analysis-preview-price--red { color: var(--red); }
.analysis-preview-bars, .analysis-chart-preview__bars { display: flex; align-items: end; gap: 8px; height: 100px; margin-block: 18px; }
.analysis-preview-bars span, .analysis-chart-preview__bars span { flex: 1; background: var(--chart-bar); border-radius: 4px 4px 0 0; }
.analysis-benefit-row { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 20px; font-size: .85rem; color: var(--accent); }
.analysis-upload-card { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; background: var(--accent-soft); }
.analysis-upload-card__icon, .analysis-file-badge { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; color: var(--accent); background: var(--surface); font-weight: 750; }
.analysis-upload-card__format { display: flex; align-items: center; gap: 12px; }
.analysis-upload-card__format p, .analysis-upload-card__note, .analysis-upload-card__privacy { font-size: .82rem; color: var(--text-muted); }
.analysis-upload-card.is-processing { border-color: var(--accent); }
.file-upload-input:focus-visible + label, .analysis-upload-card:focus-within .file-upload-cta { outline: 3px solid var(--focus); outline-offset: 3px; }
.datahub-guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block: 16px; }
.guide-toggle { color: var(--accent); }
.analysis-hero-card--green { background: var(--accent-soft); }
.analysis-hero-card__eyebrow { font-size: .8rem; color: var(--text-muted); }
.analysis-hero-card__value { font-size: clamp(2rem, 6vw, 4rem); font-weight: 750; line-height: 1.2; }
.analysis-hero-card__text { font-size: .9rem; }
.analysis-chart-card__header { margin-bottom: 20px; }
.analysis-chart-preview { position: relative; height: 280px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-soft); }
.analysis-chart-preview__bars { position: absolute; inset: 0; height: auto; margin: 0; padding: 20px; opacity: .5; }
.analysis-chart-preview__bars span:nth-child(3n) { height: 70%; }
.analysis-chart-preview__bars span:nth-child(3n + 1) { height: 40%; }
.analysis-chart-preview__bars span:nth-child(3n + 2) { height: 55%; }
.analysis-chart-preview__overlay { position: relative; max-width: 85%; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); text-align: center; }
.analysis-chart-preview__overlay strong { display: block; margin-bottom: 8px; }
.analysis-chart-preview__overlay p { font-size: .85rem; color: var(--text-muted); }
.analysis-chart-preview.is-hidden { opacity: 0; pointer-events: none; }
.cost-hotspot-list { display: grid; gap: 12px; }
.cost-hotspot-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; }
.cost-hotspot-row__rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red-soft); color: var(--red); }
.cost-hotspot-row__time { font-weight: 700; }
.cost-hotspot-row__meta { color: var(--text-muted); font-size: .8rem; }
.cost-hotspot-row__price { grid-column: 2; font-weight: 750; }

@media (min-width: 640px) {
  .today-hero__grid, .analysis-hero-grid, .analysis-preview-panel__grid, .smart-calc__results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smart-window-grid, .smart-calc__best-times, .analysis-datahub-steps, .datahub-guide-points, .history-v2__top-grid, .history-dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .smart-preset-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .smart-toggle-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-v2-row, .history-panel__row { grid-template-columns: 1fr 1.2fr 1.1fr; align-items: center; }
  .cost-hotspot-row { grid-template-columns: auto 1fr auto; }
  .cost-hotspot-row__price { grid-column: auto; }
}
@media (min-width: 960px) {
  .smart-calc__panel-grid, .analysis-page-hero { grid-template-columns: 1.1fr 1fr; }
  .analysis-cta-content { grid-template-columns: 1fr auto; align-items: center; }
  .analysis-cta-points { flex-direction: column; }
  .analysis-upload-card { grid-template-columns: auto 1fr; }
  .analysis-upload-card__format { grid-column: 2; }
}
