:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --panel: #ffffff;
  --panel-soft: #fff9ec;
  --text: #17211f;
  --muted: #6b7470;
  --line: #e4dfd4;
  --green: #1f9d6a;
  --yellow: #d89b1d;
  --red: #df5648;
  --ink: #17211f;
  --teal: #2a9d8f;
  --blue: #4f7fc8;
  --coral: #f47c61;
  --shadow: 0 18px 42px rgba(39, 45, 41, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(244, 124, 97, 0.16), transparent 34rem),
    linear-gradient(180deg, #f9f7f1 0%, var(--bg) 48%, #edf4f2 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
label.upload-action,
select {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 18px 16px 96px;
}

.top-panel {
  padding: 14px 0 16px;
}

.app-bar,
.section-heading,
.budget-controls,
.ring-layout,
.action-dock,
.expense-form,
.core-grid,
.category-cloud,
.history-item,
.history-main,
.metric-card,
.upload-preview {
  display: grid;
  gap: 12px;
}

.app-bar {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.8rem;
  line-height: 1;
}

h2 {
  font-size: 1.08rem;
  line-height: 1.2;
}

.icon-button,
.text-button,
.primary-action,
.submit-button,
.upload-action {
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 1.35rem;
  box-shadow: var(--shadow);
}

.app-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.layout-button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(35, 43, 40, 0.08);
}

.budget-card,
.panel,
.metric-card,
.upload-action,
.primary-action {
  border: 1px solid rgba(23, 33, 31, 0.08);
  border-radius: 20px;
}

.budget-card {
  padding: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #fff5df 100%);
  box-shadow: var(--shadow);
}

.setup-card {
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.78);
}

.setup-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.setup-card strong {
  display: block;
  margin-top: 3px;
  font-size: 1.15rem;
}

.edit-budget-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
}

.pace-summary {
  margin-top: 12px;
}

.budget-controls {
  grid-template-columns: minmax(0, 1.2fr) minmax(116px, 0.8fr);
}

.save-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.storage-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0 4px;
  text-align: center;
}

label span {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  outline: 0;
  padding: 0 12px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.16);
}

.ring-layout {
  grid-template-columns: 132px 1fr;
  align-items: center;
}

.progress-ring {
  position: relative;
  width: 132px;
  aspect-ratio: 1;
}

.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg,
.ring-value {
  fill: none;
  stroke-width: 13;
}

.ring-bg {
  stroke: rgba(23, 33, 31, 0.09);
}

.ring-value {
  stroke: var(--green);
  stroke-linecap: round;
  stroke-dasharray: 364.42;
  stroke-dashoffset: 364.42;
  transition: stroke-dashoffset 550ms ease, stroke 220ms ease;
}

.ring-center {
  position: absolute;
  inset: 22px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.ring-center strong {
  display: block;
  max-width: 92px;
  font-size: clamp(1rem, 8vw, 1.42rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.ring-center span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.status-copy {
  min-width: 0;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(31, 157, 106, 0.13);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
}

.status-copy h2 {
  margin: 10px 0 7px;
  font-size: clamp(1.18rem, 6vw, 2rem);
}

.status-copy p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.core-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.metric-card {
  position: relative;
  min-height: 82px;
  align-content: space-between;
  padding: 13px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(35, 43, 40, 0.06);
}

.metric-card.wide {
  grid-column: 1 / -1;
}

.metric-card.daily-hero {
  grid-column: 1 / -1;
  display: grid;
  min-height: 150px;
  margin-top: 12px;
  padding: 22px;
  background: linear-gradient(135deg, #3f8fb3 0%, #6f8fd6 100%);
  color: #fff;
  box-shadow: 0 20px 42px rgba(79, 127, 200, 0.2);
}

.metric-card span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.metric-card strong {
  min-width: 0;
  font-size: clamp(1rem, 5.2vw, 1.42rem);
  overflow-wrap: anywhere;
}

.metric-card small,
.ticker-line {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(23, 33, 31, 0.07);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.metric-card.daily-hero span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.metric-card.daily-hero small {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.metric-card.daily-hero strong {
  color: #fff;
  font-size: clamp(3.2rem, 19vw, 5.4rem);
  line-height: 0.95;
}

.ticker-line {
  margin: 0 0 8px;
}

.ticker-up {
  background: rgba(31, 157, 106, 0.13);
  color: var(--green);
}

.ticker-down {
  background: rgba(223, 86, 72, 0.13);
  color: var(--red);
}

.ticker-flat {
  background: rgba(23, 33, 31, 0.08);
  color: var(--muted);
}

.catchup-ideas {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(23, 33, 31, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(39, 45, 41, 0.07);
}

.compact-heading {
  margin-bottom: 12px;
}

.idea-list {
  display: grid;
  gap: 10px;
}

.catchup-ideas:not([open]) {
  padding-bottom: 2px;
}

.idea-card {
  display: grid;
  gap: 6px;
  padding: 13px;
  border-radius: 16px;
  background: #f7f8f4;
  border-left: 5px solid var(--green);
}

.idea-card:nth-child(2) {
  border-left-color: var(--blue);
}

.idea-card:nth-child(3) {
  border-left-color: var(--yellow);
}

.idea-card strong {
  font-size: 0.96rem;
}

.idea-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.42;
}

.metric-card.pace-over {
  border-color: rgba(223, 86, 72, 0.24);
  background: #fff0ed;
}

.metric-card.pace-over span,
.metric-card.pace-over strong {
  color: var(--red);
}

.metric-card.pace-under {
  border-color: rgba(65, 105, 225, 0.26);
  background: #eef3ff;
}

.metric-card.pace-under span,
.metric-card.pace-under strong {
  color: var(--blue);
}

.metric-card.pace-even {
  border-color: rgba(31, 157, 106, 0.22);
  background: #eefaf5;
}

.metric-card.pace-even span,
.metric-card.pace-even strong {
  color: var(--green);
}

.metric-card.goal-good {
  border-color: rgba(31, 157, 106, 0.24);
  background: #ecfaf3;
}

.metric-card.goal-good span,
.metric-card.goal-good strong {
  color: var(--green);
}

.metric-card.goal-bad {
  border-color: rgba(223, 86, 72, 0.24);
  background: #fff0ed;
}

.metric-card.goal-bad span,
.metric-card.goal-bad strong {
  color: var(--red);
}

.action-dock {
  grid-template-columns: 1fr 1fr;
  margin: 4px 0 14px;
}

.primary-action,
.submit-button {
  min-height: 54px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-action:active,
.submit-button:active,
.upload-action:active {
  transform: scale(0.98);
}

.upload-action {
  display: grid;
  min-height: 54px;
  place-items: center;
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.upload-action.compact {
  grid-column: 1 / -1;
}

.upload-action input {
  display: none;
}

.content-stack {
  display: grid;
  gap: 14px;
}

.panel {
  position: relative;
  padding: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(39, 45, 41, 0.07);
}

.layout-controls {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  gap: 5px;
}

.layout-controls button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.layout-editing .layout-controls {
  display: flex;
}

.layout-editing .fold-panel summary::after {
  display: none;
}

.layout-editing [data-layout-id] {
  outline: 2px dashed rgba(65, 105, 225, 0.28);
  outline-offset: 3px;
}

.fold-panel {
  overflow: hidden;
}

.fold-panel summary {
  cursor: pointer;
  list-style: none;
  margin-bottom: 0;
}

.fold-panel summary::-webkit-details-marker {
  display: none;
}

.fold-panel summary::after {
  content: "+";
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #f0eee7;
  color: var(--muted);
  font-weight: 900;
}

.fold-panel[open] summary {
  margin-bottom: 14px;
}

.fold-panel[open] summary::after {
  content: "-";
}

.nested-heading {
  margin: 16px 0 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.simple-help {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.section-heading {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 14px;
}

.expense-form {
  grid-template-columns: 1fr;
}

.submit-button {
  margin-top: 2px;
}

.upload-preview {
  min-height: 112px;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(23, 33, 31, 0.24);
  border-radius: 18px;
  background: var(--panel-soft);
  color: var(--muted);
  text-align: center;
}

.what-if-panel {
  border-color: rgba(65, 105, 225, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #eef3ff 100%);
}

.what-if-form {
  display: grid;
  gap: 12px;
}

.what-if-note {
  grid-column: 1 / -1;
}

.what-if-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 12px;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(35, 43, 40, 0.06);
}

.what-if-result.what-if-safe {
  border: 1px solid rgba(31, 157, 106, 0.22);
  background: #f4fcf8;
}

.what-if-result.what-if-over {
  border: 1px solid rgba(223, 86, 72, 0.24);
  background: #fff5f2;
}

.what-if-result strong {
  font-size: 1.02rem;
}

.what-if-result span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

.what-if-result > strong,
.what-if-result > span {
  grid-column: 1 / -1;
}

.what-if-box {
  display: grid;
  min-height: 86px;
  align-content: space-between;
  gap: 8px;
  padding: 13px;
  border-radius: 15px;
  background: #f7f8f4;
}

.what-if-box.hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #0d8f5b 0%, #18b978 100%);
}

.what-if-box.hero.danger {
  background: linear-gradient(135deg, #b9342c 0%, #df5648 100%);
}

.what-if-box.hero.safe {
  background: linear-gradient(135deg, #0d8f5b 0%, #18b978 100%);
}

.what-if-box.hero span,
.what-if-box.hero strong,
.what-if-box.hero em {
  color: #fff;
}

.what-if-box.calm {
  grid-column: 1 / -1;
  background: #eef3ff;
}

.what-if-box span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.what-if-box strong {
  color: var(--text);
  font-size: clamp(1rem, 5vw, 1.45rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.what-if-box.hero strong {
  font-size: clamp(2.1rem, 11vw, 3.6rem);
}

.what-if-box em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 12px;
}

.calendar-legend span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 0 10px;
  background: #f7f8f4;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.calendar-legend i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-over {
  background: var(--red);
}

.legend-normal {
  background: var(--blue);
}

.legend-under {
  background: var(--green);
}

.goal-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.calendar-day {
  display: grid;
  min-width: 0;
  min-height: 54px;
  align-content: space-between;
  border: 1px solid rgba(23, 33, 31, 0.08);
  border-radius: 13px;
  padding: 7px 5px;
  background: #f3f2ec;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.calendar-day:active {
  transform: scale(0.96);
}

.calendar-day span {
  font-size: 0.75rem;
  font-weight: 900;
}

.calendar-day strong {
  display: block;
  min-height: 13px;
  font-size: clamp(0.58rem, 2.8vw, 0.72rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.calendar-day.day-over {
  border-color: rgba(223, 86, 72, 0.28);
  background: #fff0ed;
  color: var(--red);
}

.calendar-day.day-normal {
  border-color: rgba(65, 105, 225, 0.26);
  background: #eef3ff;
  color: var(--blue);
}

.calendar-day.day-under {
  border-color: rgba(31, 157, 106, 0.26);
  background: #ecfaf3;
  color: var(--green);
}

.calendar-day.day-exact {
  border-color: rgba(23, 33, 31, 0.18);
  background: #ffffff;
  color: var(--text);
  box-shadow: inset 0 0 0 2px rgba(23, 33, 31, 0.08);
}

.calendar-day.day-empty {
  color: #a3aaa5;
}

.reward-strip {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 13px;
  border-radius: 16px;
  background: linear-gradient(135deg, #17211f 0%, #24534a 100%);
  color: #fff;
}

.reward-strip strong {
  font-size: 1rem;
}

.reward-strip span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(23, 33, 31, 0.38);
  backdrop-filter: blur(12px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(100%, 430px);
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-card .budget-controls {
  margin-bottom: 14px;
}

.submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.upload-preview strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.category-cloud {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-chip {
  display: grid;
  min-height: 66px;
  align-content: center;
  gap: 5px;
  border-radius: 16px;
  padding: 10px 12px;
  background: #f5f7f4;
  border-left: 5px solid var(--teal);
}

.category-chip strong {
  font-size: 0.95rem;
}

.category-chip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.bar-graph {
  display: grid;
  grid-template-columns: repeat(var(--days), minmax(9px, 1fr));
  align-items: end;
  min-height: 164px;
  gap: 5px;
  padding: 14px 10px 8px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f5fbf9 0%, #ffffff 100%);
  overflow-x: auto;
}

.bar {
  position: relative;
  min-width: 9px;
  height: max(10px, var(--height));
  border-radius: 999px 999px 5px 5px;
  background: var(--teal);
  animation: rise 520ms ease both;
}

.bar.today {
  outline: 3px solid rgba(65, 105, 225, 0.2);
}

.bar.over {
  background: var(--coral);
}

.bar-over {
  background: var(--red);
}

.bar-normal {
  background: var(--blue);
}

.bar-under {
  background: var(--green);
}

.bar-exact {
  background: var(--ink);
}

.bar-empty {
  background: #d9ddd8;
}

.bar::after {
  content: attr(data-day);
  position: absolute;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  border-radius: 16px;
  background: #f7f8f4;
}

.history-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: #ffffff;
  font-weight: 800;
}

.history-main {
  gap: 3px;
}

.history-main strong {
  font-size: 0.94rem;
}

.history-main span,
.history-date {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.history-amount {
  font-weight: 800;
}

.edit-expense-list {
  display: grid;
  gap: 12px;
}

.edit-add-box {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 16px;
  background: #eef3ff;
}

.edit-add-box summary {
  cursor: pointer;
  list-style: none;
}

.edit-add-box summary::-webkit-details-marker {
  display: none;
}

.add-another-button {
  display: grid;
  min-height: 44px;
  place-items: center;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
}

.edit-add-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.edit-expense-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: #f7f8f4;
}

.edit-expense-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 8px;
}

.edit-expense-row strong,
.edit-expense-row span,
.edit-expense-row b {
  min-width: 0;
  font-size: 0.84rem;
}

.edit-expense-row span {
  color: var(--muted);
  font-weight: 800;
}

.edit-expense-row b {
  overflow-wrap: anywhere;
}

.edit-expense-fields {
  display: grid;
  gap: 10px;
}

.edit-expense-fields[hidden] {
  display: none;
}

.edit-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.mini-save {
  min-height: 44px;
}

.danger-button {
  color: var(--red);
}

.text-button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  background: #f0eee7;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(calc(100% - 28px), 430px);
  min-height: 58px;
  transform: translateX(-50%);
  border: 1px solid rgba(23, 33, 31, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.bottom-nav a {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.bottom-nav button {
  display: grid;
  place-items: center;
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
}

.empty-state {
  display: grid;
  min-height: 92px;
  place-items: center;
  border-radius: 16px;
  background: #f7f8f4;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.status-green .ring-value {
  stroke: var(--green);
}

.status-yellow .ring-value {
  stroke: var(--yellow);
}

.status-red .ring-value {
  stroke: var(--red);
}

.status-green .status-pill {
  background: rgba(31, 157, 106, 0.13);
  color: var(--green);
}

.status-yellow .status-pill {
  background: rgba(216, 155, 29, 0.14);
  color: #9b6a08;
}

.status-red .status-pill {
  background: rgba(223, 86, 72, 0.13);
  color: var(--red);
}

body.cool {
  --bg: #eef5f7;
  --panel-soft: #eef8ff;
  --ink: #12343b;
  --teal: #277da1;
  --blue: #5b78bd;
  --coral: #ef476f;
}

@keyframes rise {
  from {
    height: 8px;
    opacity: 0.45;
  }
}

@media (min-width: 1100px) {
  .app-shell {
    width: min(100%, 1080px);
    padding: 28px 24px 104px;
  }

  .top-panel {
    position: static;
  }

  .budget-card {
    padding: 22px;
  }

  .ring-layout {
    grid-template-columns: 180px 1fr;
  }

  .progress-ring {
    width: 180px;
  }

  .ring-center {
    inset: 34px;
  }

  .core-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .metric-card.wide {
    grid-column: auto;
  }

  .metric-card.daily-hero {
    grid-column: span 2;
  }

  .action-dock {
    position: static;
    grid-template-columns: 1.1fr 1fr 1fr;
  }

  .upload-action.compact {
    grid-column: auto;
  }

  .content-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .add-panel,
  .upload-panel {
    grid-column: span 1;
  }

  .expense-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .what-if-form {
    grid-template-columns: 1fr 1fr;
  }

  .submit-button {
    grid-column: 1 / -1;
  }

  .category-cloud {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
