:root {
  --bg: #f5efe6;
  --bg-2: #ede5d8;
  --surface: rgba(255, 252, 247, 0.82);
  --surface-strong: #fffdf8;
  --surface-soft: #f5eee4;
  --ink: #1d2b27;
  --muted: #6d7973;
  --line: rgba(29, 43, 39, 0.12);
  --line-strong: rgba(29, 43, 39, 0.18);
  --shadow: 0 24px 60px rgba(45, 40, 28, 0.08);
  --shadow-soft: 0 12px 30px rgba(45, 40, 28, 0.05);
  --radius-xl: 34px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --owner: #c46e70;
  --owner-soft: #f6e4e0;
  --partner: #4a7c6e;
  --partner-soft: #ddeae3;
  --shared: #c5a15c;
  --shared-soft: #f4e9d3;
  --sage: #7fa882;
  --peach: #e8956b;
  --gold: #c8a86a;
  --sky: #7a8ec0;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 0%, rgba(232, 149, 107, 0.18), transparent 30%),
    radial-gradient(circle at 84% 0%, rgba(127, 168, 130, 0.2), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(196, 110, 112, 0.1), transparent 30%),
    linear-gradient(180deg, #f8f2e9 0%, #f2ebdf 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.26;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.18'/%3E%3C/svg%3E");
}

.bg-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22) 0, transparent 34%),
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.18) 0, transparent 30%);
  mix-blend-mode: soft-light;
}

.bg-orb {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(24px);
  opacity: 0.8;
}

.bg-orb--one {
  top: -80px;
  left: -40px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 149, 107, 0.28), rgba(232, 149, 107, 0));
}

.bg-orb--two {
  right: -50px;
  top: 120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 168, 130, 0.2), rgba(127, 168, 130, 0));
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 24px 48px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.76);
  box-shadow: 0 18px 40px rgba(40, 35, 28, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  color: var(--ink);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  display: block;
  font-family: "Nunito", sans-serif;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.brand-copy span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.month-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.month-picker::-webkit-scrollbar {
  display: none;
}

.month-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  font: 600 13px/1 "Nunito Sans", sans-serif;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
  white-space: nowrap;
}

.month-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(74, 124, 110, 0.35);
}

.month-pill.is-active {
  color: #fffdf8;
  border-color: transparent;
  background: linear-gradient(135deg, var(--partner), #5e9b87);
  box-shadow: 0 12px 22px rgba(74, 124, 110, 0.22);
}

.sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font: 600 13px/1 "Nunito Sans", sans-serif;
  white-space: nowrap;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sage);
  box-shadow: 0 0 0 6px rgba(127, 168, 130, 0.18);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 20px;
  padding: 30px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.66);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.64)),
    linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(245, 238, 230, 0.9));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -90px -120px auto;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 149, 107, 0.28), rgba(232, 149, 107, 0));
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding-right: 12px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Nunito", sans-serif;
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.08em;
  max-width: 11ch;
}

.hero-subtitle {
  margin: 16px 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--ink);
  font: 700 13px/1 "Nunito Sans", sans-serif;
  box-shadow: 0 10px 20px rgba(35, 33, 28, 0.04);
}

.tag--muted {
  color: var(--muted);
}

.tag__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sage);
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.gauge-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 251, 247, 0.76));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.gauge-card::before {
  content: "";
  position: absolute;
  inset: auto -20px -30px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 168, 130, 0.14), rgba(127, 168, 130, 0));
  pointer-events: none;
}

.gauge {
  --progress: 0;
  --accent: var(--partner);
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.05;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(246, 240, 232, 0.95)),
    conic-gradient(from -90deg, var(--accent) 0 calc(var(--progress) * 1%), rgba(29, 43, 39, 0.08) 0 100%);
  padding: 18px;
}

.gauge::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(29, 43, 39, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.gauge__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.gauge__value {
  font-family: "Nunito", sans-serif;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 0.92;
  letter-spacing: -0.1em;
  font-weight: 800;
}

.gauge__label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.gauge__detail {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 26ch;
}

.gauge-meta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.gauge-meta__block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gauge-meta__block span {
  font-size: 12px;
  color: var(--muted);
}

.gauge-meta__block strong {
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  letter-spacing: -0.04em;
}

.gauge-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.gauge-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.gauge-status[data-tone="good"] {
  color: #2f6b4f;
}

.gauge-status[data-tone="good"] .gauge-status__dot {
  background: var(--sage);
  box-shadow: 0 0 0 5px rgba(127, 168, 130, 0.16);
}

.gauge-status[data-tone="warn"] {
  color: #8d6536;
}

.gauge-status[data-tone="warn"] .gauge-status__dot {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(200, 168, 106, 0.16);
}

.gauge-status[data-tone="danger"] {
  color: #ab4e51;
}

.gauge-status[data-tone="danger"] .gauge-status__dot {
  background: var(--owner);
  box-shadow: 0 0 0 5px rgba(196, 110, 112, 0.16);
}

.gauge-status[data-tone="muted"] {
  color: var(--muted);
}

.gauge-status[data-tone="muted"] .gauge-status__dot {
  background: var(--muted);
  box-shadow: 0 0 0 5px rgba(109, 121, 115, 0.14);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 24px rgba(35, 33, 28, 0.04);
}

.mini-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent, var(--partner)), rgba(255, 255, 255, 0));
}

.mini-card strong {
  display: block;
  margin-top: 4px;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  letter-spacing: -0.06em;
}

.mini-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.66);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 252, 247, 0.72)),
    linear-gradient(180deg, rgba(244, 238, 229, 0.3), rgba(255, 255, 255, 0));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
}

.panel--wide {
  grid-column: span 8;
}

.panel--narrow {
  grid-column: span 4;
}

.grid-layout > .panel:nth-child(1) {
  animation-delay: 80ms;
}

.grid-layout > .panel:nth-child(2) {
  animation-delay: 120ms;
}

.grid-layout > .panel:nth-child(3) {
  animation-delay: 160ms;
}

.grid-layout > .panel:nth-child(4) {
  animation-delay: 200ms;
}

.grid-layout > .panel:nth-child(5) {
  animation-delay: 240ms;
}

.grid-layout > .panel:nth-child(6) {
  animation-delay: 280ms;
}

.panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2 {
  margin: 0;
  font-family: "Nunito", sans-serif;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.panel-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.panel-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.panel-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.panel-body {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.panel-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.chart-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 241, 233, 0.8));
}

.chart-shell svg {
  display: block;
  width: 100%;
  height: 320px;
}

.trend-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.stat-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
}

.stat-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  letter-spacing: -0.05em;
}

.stack-list,
.category-list,
.goal-list,
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-row,
.category-row,
.activity-row,
.goal-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 24px rgba(34, 32, 28, 0.04);
}

.stack-row {
  padding: 14px;
}

.stack-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.stack-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stack-name__emoji,
.activity-icon,
.goal-ring {
  flex: 0 0 auto;
}

.stack-name__emoji {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.stack-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.stack-meta strong {
  font-family: "Nunito", sans-serif;
  font-size: 18px;
  letter-spacing: -0.05em;
}

.stack-meta span {
  color: var(--muted);
  font-size: 12px;
}

.stack-bar,
.heat-track,
.category-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(29, 43, 39, 0.08);
  overflow: hidden;
}

.stack-fill,
.heat-fill,
.category-fill {
  height: 100%;
  border-radius: inherit;
}

.stack-fill {
  background: linear-gradient(90deg, var(--accent, var(--partner)), rgba(255, 255, 255, 0));
}

.stack-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.heat-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.heat-tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  font: 800 12px/1 "Nunito Sans", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.heat-tab.is-active {
  background: linear-gradient(135deg, var(--partner), #5e9b87);
  color: #fffdf8;
  box-shadow: 0 10px 18px rgba(74, 124, 110, 0.18);
}

.heat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.heat-row {
  display: grid;
  gap: 8px;
}

.heat-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.heat-label {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.heat-value {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.heat-track {
  height: 14px;
}

.heat-fill {
  position: relative;
  background: linear-gradient(90deg, var(--partner), #82bda9);
}

.heat-row[data-mode="hour"] .heat-fill {
  background: linear-gradient(90deg, var(--owner), #e19c8f);
}

.heat-fill span {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.95);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.category-row {
  padding: 14px;
}

.category-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.category-title__emoji {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.category-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.category-meta strong {
  font-family: "Nunito", sans-serif;
  font-size: 18px;
  letter-spacing: -0.05em;
}

.category-meta span {
  color: var(--muted);
  font-size: 12px;
}

.category-track {
  height: 9px;
}

.category-fill {
  background: linear-gradient(90deg, var(--accent, var(--gold)), rgba(255, 255, 255, 0));
}

.goal-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.goal-ring {
  --progress: 0;
  --accent: var(--partner);
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(from -90deg, var(--accent) calc(var(--progress) * 1%), rgba(29, 43, 39, 0.08) 0);
}

.goal-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
}

.goal-ring__label {
  position: relative;
  z-index: 1;
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

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

.goal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.goal-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.goal-name strong {
  font-size: 15px;
  line-height: 1.3;
}

.goal-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.goal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.goal-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.goal-pill strong {
  color: var(--ink);
}

.activity-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.activity-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.activity-row.is-expense .activity-icon {
  background: linear-gradient(135deg, var(--owner-soft), #f9ece8);
}

.activity-row.is-saving .activity-icon {
  background: linear-gradient(135deg, var(--partner-soft), #eef6f0);
}

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

.activity-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.activity-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.activity-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.activity-row.is-expense .activity-badge {
  color: #a95356;
  background: rgba(246, 228, 224, 0.82);
}

.activity-row.is-saving .activity-badge {
  color: #2f6b4f;
  background: rgba(221, 234, 227, 0.82);
}

.activity-amount {
  font-family: "Nunito", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.activity-row.is-expense .activity-amount {
  color: var(--owner);
}

.activity-row.is-saving .activity-amount {
  color: #2f6b4f;
}

.empty-state {
  padding: 20px;
  border-radius: 20px;
  border: 1px dashed rgba(29, 43, 39, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
}

.empty-state p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.chart-axis {
  font-size: 10px;
  fill: #7d8a84;
  font-family: "Nunito Sans", sans-serif;
}

.chart-line {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line--actual {
  stroke: var(--owner);
  stroke-width: 2.6;
}

.chart-line--future {
  stroke: var(--partner);
  stroke-width: 2.2;
  stroke-dasharray: 6 5;
}

.chart-area {
  fill: url(#chartAreaFill);
}

.chart-grid {
  stroke: rgba(29, 43, 39, 0.08);
  stroke-width: 1;
}

.chart-budget {
  stroke: rgba(196, 110, 112, 0.55);
  stroke-width: 1.2;
  stroke-dasharray: 5 5;
}

.chart-today {
  stroke: rgba(200, 168, 106, 0.8);
  stroke-width: 1.2;
  stroke-dasharray: 4 5;
}

.chart-label {
  font-size: 10px;
  fill: #7d8a84;
  font-family: "Nunito Sans", sans-serif;
}

.trend-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.trend-footer .stat-card strong {
  font-size: 18px;
}

.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-loading .panel,
.is-loading .hero-panel {
  opacity: 0.72;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1220px) {
  .panel--wide,
  .panel--narrow {
    grid-column: span 12;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    border-radius: 28px;
    position: relative;
    top: 0;
  }

  .brand,
  .sync-chip {
    justify-self: start;
  }

  .month-picker {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-panel {
    padding: 24px;
  }

  .mini-grid,
  .trend-stats,
  .trend-footer {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }

  .panel-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 14px 14px 36px;
  }

  .hero-panel,
  .panel {
    border-radius: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(30px, 12vw, 42px);
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .gauge-card {
    padding: 14px;
  }

  .gauge {
    border-radius: 22px;
  }

  .activity-row,
  .goal-card {
    grid-template-columns: 1fr;
  }

  .activity-amount {
    justify-self: start;
  }

  .stack-top,
  .category-head,
  .activity-top,
  .goal-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
