.heading,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero {
  position: relative;
  min-height: 156px;
  padding: clamp(1.25rem, 3vw, 1.85rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: transparent;
  box-shadow: none;
}

.hero-copy,
.hero .quiet-button {
  position: relative;
  z-index: 1;
}
.hero-copy {
  flex: 1;
}

.eyebrow,
.card-kicker {
  margin: 0;
  color: var(--plum);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.heading h1 {
  margin: 0.35rem 0 0.45rem;
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.heading h1 em {
  color: var(--plum);
  font-family: Georgia, "Noto Serif KR", serif;
  font-weight: 600;
}

.heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}
.quiet-button {
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--plum-dark);
  background: var(--paper);
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

.quiet-button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.summary-grid,
.detail-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.825fr 0.825fr;
  gap: 1rem;
  margin-top: 1rem;
}

.summary-card,
.detail-card,
.chart-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: none;
}

.model-panel {
  margin-top: 1rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: none;
}

.model-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.4rem 0;
}

.model-summary div {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: var(--subtle);
}

.model-summary span,
.model-label span,
.model-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.model-summary strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.model-chart {
  display: grid;
  gap: 0.8rem;
}

.model-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.75fr) minmax(100px, 2fr) minmax(84px, auto);
  gap: 0.8rem;
  align-items: center;
}

.model-label strong,
.model-label span {
  display: block;
}

.model-track {
  position: relative;
  display: flex;
  min-height: 14px;
  align-items: center;
  border-radius: 99px;
  background: var(--subtle);
}
.model-track::before {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 1px;
  background: var(--line);
  content: "";
}

.model-bar {
  min-height: 14px;
  border-radius: 99px;
  transition: width 0.55s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.model-bar.saving {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  background: var(--plum);
}
.model-bar.extra {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 50%;
  background: var(--pink);
}
.saving-text {
  color: var(--plum-dark);
}
.extra-text {
  color: var(--pink);
}
.model-row > strong {
  font-size: 0.86rem;
  text-align: right;
}
.model-note {
  margin: 1.1rem 0 0;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.breakdown-card {
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: none;
}

.usage-bars {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.usage-bar-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.65fr) minmax(80px, 1.5fr);
  gap: 0.45rem 0.8rem;
  align-items: center;
}

.usage-bar-row > span {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.75rem;
}

.usage-bar-row > strong {
  font-size: 0.85rem;
}

.usage-bar-track {
  display: flex;
  height: 12px;
  align-items: center;
  border-radius: 99px;
  background: var(--lilac);
}

.usage-bar {
  height: 12px;
  border-radius: 99px;
  background: var(--plum);
  transition: width 0.55s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.summary-card {
  position: relative;
  min-height: 138px;
  padding: 1.15rem 1.25rem;
  overflow: hidden;
}

.summary-card > strong {
  display: block;
  margin-top: 0.8rem;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.summary-card > span:not(.card-icon) {
  display: block;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 0.7rem;
  place-items: center;
  border-radius: 14px;
  color: var(--plum-dark);
  font-size: 1.3rem;
  font-weight: 600;
}

.card-icon.peach {
  background: var(--peach);
}
.card-icon.mint {
  background: var(--mint);
}

.quota-card {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: center;
  background: transparent;
}

.quota-ring {
  --quota: 0;
  display: grid;
  flex: 0 0 116px;
  width: 116px;
  height: 116px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--plum) calc(var(--quota) * 1%), var(--subtle) 0);
  box-shadow: none;
}

.quota-ring > div {
  display: grid;
  width: 86px;
  height: 86px;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: var(--paper);
}

.quota-ring strong {
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}
.quota-ring small {
  color: var(--muted);
  font-size: 0.72rem;
}
.quota-copy h2 {
  margin: 0.45rem 0 0.3rem;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.quota-copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

.chart-panel {
  margin-top: 1rem;
  padding: clamp(1.35rem, 3vw, 2rem);
}

.section-heading h2,
.detail-card h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.035em;
}

.mini-label {
  color: var(--muted);
  font-size: 0.78rem;
}
.chart-wrap {
  position: relative;
  margin-top: 1rem;
  padding-left: 2.6rem;
}

.chart-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.7rem;
}

.trend-chart {
  display: flex;
  align-items: end;
  gap: clamp(3px, 0.5vw, 7px);
  height: 170px;
  overflow: hidden;
  padding: 0.75rem 0 0;
  border-bottom: 1px solid var(--line);
  background: none;
}

.trend-bar {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  border-radius: 7px 7px 3px 3px;
  background: var(--lilac);
  cursor: pointer;
  transition:
    height 0.35s ease,
    background 0.15s ease;
}

.trend-bar:nth-child(4n + 2) {
  background: var(--peach);
}
.trend-bar:nth-child(4n + 3) {
  background: var(--mint);
}
.trend-bar:nth-child(4n) {
  background: var(--butter);
}

.trend-bar:hover,
.trend-bar:focus-visible {
  z-index: 2;
  background: var(--plum);
  outline: none;
}

.trend-bar.is-selected {
  z-index: 2;
  background: var(--plum-dark);
  box-shadow: none;
}

.trend-selection {
  min-height: 2.75rem;
  margin: 0.8rem 0 0;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  color: var(--plum-dark);
  background: var(--lilac);
  font-size: 0.82rem;
  font-weight: 500;
}
.trend-range {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.model-legend {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.saving-swatch,
.extra-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--plum);
}
.extra-swatch {
  background: var(--pink);
}

.detail-grid {
  grid-template-columns: 1fr;
}
.detail-card {
  padding: clamp(1.35rem, 3vw, 2rem);
}

.composition-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 32rem);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
  margin-top: 1.4rem;
}

.composition-donut {
  --uncached: 25%;
  --cached: 50%;
  --output: 75%;
  position: relative;
  display: grid;
  width: 138px;
  height: 138px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    var(--plum) 0 var(--uncached),
    var(--pink) var(--uncached) var(--cached),
    var(--green) var(--cached) var(--output),
    var(--amber) var(--output) 100%
  );
}

.composition-donut::before {
  position: absolute;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.composition-donut span {
  z-index: 1;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.detail-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 0;
}

.detail-card dl div {
  position: relative;
  padding-left: 1rem;
}

.detail-card dl div::before {
  position: absolute;
  top: 0.48rem;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--legend-color, var(--plum));
  content: "";
}

.detail-card dl div:nth-child(2) {
  --legend-color: var(--pink);
}
.detail-card dl div:nth-child(3) {
  --legend-color: var(--green);
}
.detail-card dl div:nth-child(4) {
  --legend-color: var(--amber);
}
.detail-card dt {
  color: var(--muted);
  font-size: 0.78rem;
}
.detail-card dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
}

.status {
  color: var(--muted);
  font-size: 0.78rem;
}
.status {
  min-height: 20px;
  margin: 1rem 0;
  text-align: center;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .model-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .model-row > strong {
    text-align: left;
  }

  .breakdown-grid {
    grid-template-columns: 1fr;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .quota-card {
    grid-column: 1 / -1;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 152px;
    padding: 1.35rem;
    border-radius: 25px;
  }
  .hero .quiet-button {
    align-self: end;
    justify-self: end;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .quota-card {
    grid-column: auto;
  }
  .summary-card:not(.quota-card) {
    min-height: 150px;
  }
  .chart-panel {
    padding-inline: 1rem;
  }
  .chart-wrap {
    padding-left: 0;
  }
  .chart-guide {
    display: none;
  }
  .trend-chart {
    height: 180px;
    gap: 2px;
  }
  .trend-bar {
    min-width: 0;
    min-height: 44px;
  }
  .composition-layout {
    grid-template-columns: 1fr;
  }
  .composition-donut {
    justify-self: center;
  }
}

/* A quiet studio ledger: hand-painted warmth around precise data. */
.hero {
  border-color: color-mix(in srgb, var(--line) 78%, var(--green));
  border-radius: 14px;
  background: rgb(255 253 245 / 42%);
  box-shadow: none;
  backdrop-filter: blur(1px);
}
.hero-friend img {
  filter: drop-shadow(0 5px 5px rgb(61 81 62 / 14%));
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card,
.model-summary div {
  border-color: color-mix(in srgb, var(--line) 88%, var(--green));
  box-shadow: none;
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card {
  border-radius: 12px;
}
.model-summary div,
.trend-selection,
.status:not(:empty) {
  border-radius: 12px;
}
.quota-card {
  background: var(--lilac);
}
.summary-card:nth-child(2) {
  background: var(--peach);
}
.summary-card:nth-child(3) {
  background: var(--mint);
}
.quiet-button {
  border-radius: 12px;
  box-shadow: none;
}
.trend-bar:is(:hover, :focus-visible, .is-selected)::before {
  background: var(--accent);
}

@media (min-width: 601px) and (max-width: 860px) {
  .trend-chart {
    overflow-x: hidden;
  }

  .trend-bar {
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
  }
}

/* The allowance projection follows the current reset cycle. */
.cycle-chart-wrap {
  margin-top: 1.15rem;
  min-width: 0;
  overflow: hidden;
}

.cycle-chart {
  height: clamp(190px, 30vw, 250px);
  min-width: 0;
}

.cycle-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cycle-grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.cycle-limit-line {
  stroke: var(--ink);
  stroke-width: 2;
}

.cycle-axis-label,
.cycle-day-label {
  fill: var(--muted);
  font-family: inherit;
  font-size: 12px;
}

.cycle-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.cycle-line.actual {
  stroke: var(--accent);
}

.cycle-line.forecast {
  stroke: var(--muted);
  stroke-dasharray: 7 6;
}

.cycle-dot {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 3;
}

.cycle-summary {
  min-height: 2.75rem;
  margin: 0.85rem 0 0;
  padding: 0.8rem 0.95rem;
  color: var(--ink);
  background: var(--subtle);
  font-size: 0.86rem;
  line-height: 1.55;
}

.cycle-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.cycle-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.cycle-legend span {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.legend-line {
  width: 1.25rem;
  height: 0;
  border-top: 3px solid var(--accent);
}

.legend-line.forecast {
  border-top-color: var(--muted);
  border-top-style: dashed;
  border-top-width: 2px;
}

@media (max-width: 600px) {
  .cycle-chart {
    height: 205px;
  }

  .cycle-axis-label,
  .cycle-day-label {
    font-size: 11px;
  }
}

/* The usage dashboard uses one generous rhythm instead of packing cards together. */
.chart-panel,
.model-panel {
  margin-top: 1.5rem;
}

.breakdown-grid,
.detail-grid {
  margin-top: 1.5rem;
}

.trend-bar::before {
  border-radius: 12px 12px 6px 6px;
}

.model-track,
.usage-bar-track,
.model-bar,
.usage-bar {
  border-radius: 999px;
}

.model-track::before {
  top: -5px;
  bottom: -5px;
  border-radius: 999px;
}

.trend-selection {
  border-radius: 16px;
}

@media (max-width: 600px) {
  .summary-card {
    padding: 1.25rem;
  }
}

/* Applied last: the watercolor is the scenery, not a digital card decoration. */
.hero {
  border-radius: 14px;
  background: rgb(255 253 245 / 42%);
  box-shadow: none;
  backdrop-filter: blur(1px);
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card,
.model-summary div {
  box-shadow: none;
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card {
  border-radius: 12px;
}
.model-summary div,
.trend-selection,
.status:not(:empty) {
  border-radius: 10px;
}
:root[saved-theme="dark"] .hero,
:root[saved-theme="dark"] .summary-card,
:root[saved-theme="dark"] .chart-panel,
:root[saved-theme="dark"] .model-panel,
:root[saved-theme="dark"] .breakdown-card,
:root[saved-theme="dark"] .detail-card,
:root[saved-theme="dark"] .model-summary div {
  background-color: rgb(46 58 48 / 86%);
}

/* Applied last: the watercolor is the scenery, not a digital card decoration. */
.hero {
  border-radius: 14px;
  background: rgb(255 253 245 / 42%);
  box-shadow: none;
  backdrop-filter: blur(1px);
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card,
.model-summary div {
  box-shadow: none;
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card {
  border-radius: 12px;
}
.model-summary div,
.trend-selection,
.status:not(:empty) {
  border-radius: 10px;
}
:root[saved-theme="dark"] .hero,
:root[saved-theme="dark"] .summary-card,
:root[saved-theme="dark"] .chart-panel,
:root[saved-theme="dark"] .model-panel,
:root[saved-theme="dark"] .breakdown-card,
:root[saved-theme="dark"] .detail-card,
:root[saved-theme="dark"] .model-summary div {
  background-color: rgb(46 58 48 / 86%);
}

/* Final painted-surface overrides after legacy usage layers. */
.hero {
  border-radius: 14px;
  background: rgb(255 253 245 / 42%);
  box-shadow: none;
  backdrop-filter: blur(1px);
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card,
.model-summary div {
  box-shadow: none;
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card {
  border-radius: 12px;
}
.model-summary div,
.trend-selection,
.status:not(:empty) {
  border-radius: 10px;
}
:root[saved-theme="dark"] .hero,
:root[saved-theme="dark"] .summary-card,
:root[saved-theme="dark"] .chart-panel,
:root[saved-theme="dark"] .model-panel,
:root[saved-theme="dark"] .breakdown-card,
:root[saved-theme="dark"] .detail-card,
:root[saved-theme="dark"] .model-summary div {
  background-color: rgb(46 58 48 / 86%);
}

/* The watercolor stays as a scene behind the data instead of a digital card effect. */
.hero {
  border-radius: 14px;
  background: rgb(255 253 245 / 42%);
  box-shadow: none;
  backdrop-filter: blur(1px);
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card,
.model-summary div {
  box-shadow: none;
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card {
  border-radius: 12px;
}
.model-summary div,
.trend-selection,
.status:not(:empty) {
  border-radius: 10px;
}
:root[saved-theme="dark"] .hero,
:root[saved-theme="dark"] .summary-card,
:root[saved-theme="dark"] .chart-panel,
:root[saved-theme="dark"] .model-panel,
:root[saved-theme="dark"] .breakdown-card,
:root[saved-theme="dark"] .detail-card,
:root[saved-theme="dark"] .model-summary div {
  background-color: rgb(46 58 48 / 86%);
}

/* Final forest palette after the page-specific rhythm layers. */
.hero {
  border-color: color-mix(in srgb, var(--line) 78%, var(--green));
  border-radius: 14px;
  background: rgb(255 253 245 / 42%);
  box-shadow: none;
  backdrop-filter: blur(1px);
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card,
.model-summary div {
  border-color: color-mix(in srgb, var(--line) 88%, var(--green));
  box-shadow: none;
}

/* Data changes use the same calm, short feedback rhythm as the record report. */
[data-ui-section] {
  animation: usage-section-enter 260ms ease-out both;
}

[data-ui-section].is-updated .model-bar,
[data-ui-section].is-updated .usage-bar,
[data-ui-section].is-updated .trend-bar::before {
  animation: usage-value-settle 420ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.cycle-chart[aria-busy="true"],
.model-chart[aria-busy="true"],
.usage-bars[aria-busy="true"],
.composition-donut[aria-busy="true"] {
  opacity: 0.58;
}

@keyframes usage-section-enter {
  from {
    opacity: 0;
  }
}

@keyframes usage-value-settle {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-ui-section],
  [data-ui-section].is-updated .model-bar,
  [data-ui-section].is-updated .usage-bar,
  [data-ui-section].is-updated .trend-bar::before {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trend-bar,
  .model-bar,
  .usage-bar,
  .quiet-button {
    transition: none;
  }
}

/* Functional hierarchy: one quota panel with two supporting metrics. */
.hero {
  min-height: 0;
  padding: 0 0 1.25rem;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.heading h1 {
  margin: 0.25rem 0 0.4rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
}
.heading h1 em {
  color: var(--ink);
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
}
.eyebrow,
.card-kicker {
  color: var(--accent-ink);
  letter-spacing: 0.08em;
}
.quiet-button {
  min-height: 44px;
  border-radius: 2px;
  color: var(--ink);
}
.quiet-button:hover {
  border-color: var(--accent);
  transform: none;
}
.summary-grid {
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  background: var(--paper);
}
.summary-card {
  min-height: 140px;
  padding: 1.15rem 1.35rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.summary-card + .summary-card {
  border-left: 1px solid var(--line);
}
.summary-card > strong {
  margin-top: 1.05rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}
.summary-card > span:not(.card-icon) {
  margin-top: 0.35rem;
}
.summary-card .card-icon {
  display: none;
}
.quota-card {
  gap: 1.25rem;
  background: transparent;
}
.quota-ring {
  flex-basis: 100px;
  width: 100px;
  height: 100px;
  background: conic-gradient(var(--accent) calc(var(--quota) * 1%), var(--subtle) 0);
  box-shadow: none;
}
.quota-ring > div {
  width: 76px;
  height: 76px;
  background: var(--paper);
}
.quota-copy h2 {
  margin-top: 0.25rem;
}
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card {
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
}
.model-panel {
  background: var(--paper);
}
.model-summary {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.model-summary div {
  border-radius: 0;
  background: transparent;
}
.model-summary div + div {
  border-left: 1px solid var(--line);
}
.trend-chart {
  overflow-x: auto;
  overflow-y: hidden;
  gap: 3px;
  background: none;
  scrollbar-width: thin;
}
.trend-bar {
  flex: 0 0 30px;
  min-width: 30px;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  background: transparent;
}
.trend-bar::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--bar-height, 0%);
  background: var(--accent-soft);
  content: "";
  transition: height 0.35s ease;
}
.trend-bar:nth-child(n) {
  background: transparent;
}
.trend-bar:hover,
.trend-bar:focus-visible,
.trend-bar.is-selected {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  box-shadow: none;
}
.trend-bar:is(:hover, :focus-visible, .is-selected)::before {
  background: var(--accent);
}
.trend-selection {
  border-radius: 0;
  color: var(--ink);
  background: var(--subtle);
}
.model-track,
.usage-bar-track {
  background: var(--subtle);
  border-radius: 0;
}
.model-bar,
.usage-bar {
  border-radius: 0;
}
.model-bar.extra {
  background: var(--pink);
}
.extra-text {
  color: var(--pink);
}
.composition-donut {
  background: conic-gradient(
    var(--accent) 0 var(--uncached),
    var(--pink) var(--uncached) var(--cached),
    var(--green) var(--cached) var(--output),
    var(--amber) var(--output) 100%
  );
}
.detail-card dl div:nth-child(2) {
  --legend-color: var(--pink);
}
.detail-card dl div:nth-child(3) {
  --legend-color: var(--green);
}
.detail-card dl div:nth-child(4) {
  --legend-color: var(--amber);
}
@media (max-width: 860px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quota-card {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
  }
  .summary-card:nth-child(2) {
    border-left: 0;
  }
}
@media (max-width: 600px) {
  .heading {
    align-items: flex-start;
  }
  .heading .quiet-button {
    flex: 0 0 auto;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .summary-card {
    min-height: 124px;
    padding: 1rem;
  }
  .summary-card:not(.quota-card) > strong {
    font-size: clamp(1.45rem, 6vw, 2rem);
  }
  .summary-card:not(.quota-card) .card-kicker {
    font-size: 0.75rem;
  }
  .model-summary {
    grid-template-columns: 1fr;
  }
  .model-summary div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .trend-chart {
    overflow-x: hidden;
  }
  .trend-bar {
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .trend-bar::before {
    transition: none;
  }
}

/* Keep the current-cycle comparison fully visible in the tablet layout as well. */
@media (min-width: 601px) and (max-width: 860px) {
  .trend-chart {
    overflow-x: hidden;
  }

  .trend-bar {
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
  }
}

/* The mascot and soft surfaces share the same visual language as the other rooms. */
.hero {
  display: grid;
  grid-template-areas:
    "copy friend"
    "copy action";
  grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: clamp(1.25rem, 4vw, 3rem);
  row-gap: 0.75rem;
  align-items: end;
  min-height: 210px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--hero);
  box-shadow: var(--shadow);
}
.hero-copy {
  grid-area: copy;
  min-width: 0;
  max-inline-size: 34rem;
  align-self: center;
}
.hero-copy h1 span,
.hero-copy h1 em,
.hero-copy > p span {
  white-space: nowrap;
}
.hero-copy > p {
  line-height: 1.65;
}
.hero-friend {
  grid-area: friend;
  display: grid;
  flex: 0 0 132px;
  justify-items: center;
  align-self: end;
  color: var(--plum-dark);
  font-size: 0.74rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}
.hero-friend img {
  width: min(100%, 112px);
  height: auto;
  filter: drop-shadow(0 10px 12px rgb(87 65 83 / 14%));
}
.quiet-button {
  grid-area: action;
  justify-self: end;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 4px 12px rgb(87 65 83 / 8%);
}
.quiet-button:active {
  background: var(--accent-soft);
}
.status:not(:empty) {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.summary-grid {
  gap: 1rem;
  border: 0;
  background: transparent;
}
.summary-card,
.chart-panel,
.model-panel,
.breakdown-card,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.summary-card + .summary-card {
  border-left: 1px solid var(--line);
}
.quota-card {
  background: var(--lilac);
}
.quota-ring > div {
  background: var(--paper);
}
.summary-card:nth-child(2) {
  background: var(--peach);
}
.summary-card:nth-child(3) {
  background: var(--mint);
}
.summary-card .card-icon {
  display: grid;
}
.model-summary {
  gap: 0.75rem;
  border: 0;
}
.model-summary div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--subtle);
}
.model-summary div + div {
  border-left: 1px solid var(--line);
}
.trend-bar::before {
  border-radius: 9px 9px 4px 4px;
  background: var(--lilac);
}
.trend-bar:nth-child(4n + 2)::before {
  background: var(--peach);
}
.trend-bar:nth-child(4n + 3)::before {
  background: var(--mint);
}
.trend-bar:nth-child(4n)::before {
  background: var(--butter);
}
.trend-bar:is(:hover, :focus-visible, .is-selected)::before {
  background: var(--plum);
}
.trend-selection,
.model-track,
.usage-bar-track {
  border-radius: 12px;
}
.trend-selection {
  color: var(--plum-dark);
  background: var(--lilac);
}
.model-bar,
.usage-bar {
  border-radius: 999px;
}
@media (max-width: 860px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quota-card {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 640px) {
  .hero {
    display: grid;
    grid-template-areas:
      "copy friend"
      "action action";
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 0.75rem;
    min-height: 0;
    padding: 1.1rem;
  }
  .hero-copy {
    max-inline-size: none;
  }
  .hero-copy > p {
    line-height: 1.5;
  }
  .hero-copy h1 span,
  .hero-copy h1 em,
  .hero-copy > p span {
    display: block;
  }
  .hero-friend {
    display: grid;
    justify-items: center;
    align-self: center;
    justify-self: center;
    width: 86px;
    font-size: 0.55rem;
    white-space: nowrap;
  }
  .hero-friend img {
    width: 72px;
  }
  .hero .quiet-button {
    width: 100%;
    justify-self: stretch;
  }
  .heading h1 {
    font-size: clamp(1.75rem, 7.5vw, 2rem);
    line-height: 1.08;
  }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .summary-card:nth-child(2) {
    border-left: 1px solid var(--line);
  }
  .summary-card:not(.quota-card) {
    min-width: 0;
  }
  .summary-card:not(.quota-card) > strong {
    overflow-wrap: anywhere;
  }
  .model-summary {
    grid-template-columns: 1fr;
  }
  .model-summary div + div {
    border-top: 1px solid var(--line);
  }
}

/* Final visual rhythm overrides: these intentionally follow the legacy style layers. */
.chart-panel,
.model-panel,
.breakdown-grid,
.detail-grid {
  margin-top: 1.5rem;
}

.trend-bar::before {
  border-radius: 12px 12px 6px 6px;
}

.model-track,
.usage-bar-track,
.model-bar,
.usage-bar {
  border-radius: 999px;
}

.model-track::before {
  top: -5px;
  bottom: -5px;
  border-radius: 999px;
}

.trend-selection {
  border-radius: 16px;
}

@media (max-width: 600px) {
  .summary-card {
    padding: 1.25rem;
  }
}
