:root {
  color-scheme: light;
  --green-950: #0d1f18;
  --green-900: #132b20;
  --green-800: #193a2b;
  --green-700: #24533c;
  --red-900: #651d21;
  --red-800: #84282d;
  --red-700: #a13a3c;
  --beige-100: #fff8eb;
  --beige-200: #f4ead9;
  --beige-300: #e5d5bd;
  --gray-100: #f4f4f1;
  --gray-200: #e5e2dc;
  --gray-400: #a8a299;
  --gray-600: #686f69;
  --ink: #1c211f;
  --paper: #fffdf8;
  --shadow: 0 18px 44px rgba(13, 31, 24, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  padding-top: 86px;
  background:
    linear-gradient(180deg, rgba(19, 43, 32, 0.08), rgba(255, 248, 235, 0) 260px),
    var(--beige-100);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1160px, calc(100% - 32px));
  padding: 12px 0;
  border-bottom: 1px solid rgba(25, 58, 43, 0.12);
  background: rgba(255, 248, 235, 0.92);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

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

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.brand-lockup small {
  color: var(--gray-600);
  font-size: 0.74rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(25, 58, 43, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.9);
  color: var(--green-900);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  border-color: rgba(36, 83, 60, 0.42);
  background: #fff;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 2px solid var(--green-800);
  border-radius: 50%;
  background: var(--green-900);
}

.brand-ear {
  position: absolute;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--red-800);
  transform: rotate(45deg);
}

.brand-ear-left {
  left: 5px;
}

.brand-ear-right {
  right: 5px;
}

.brand-snout {
  position: absolute;
  bottom: 8px;
  width: 18px;
  height: 12px;
  border-radius: 999px;
  background: var(--beige-300);
}

.hero {
  display: grid;
  gap: 28px;
  align-items: center;
  min-height: calc(100svh - 130px);
  padding: 28px 0 42px;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red-800);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 18px;
  color: var(--green-950);
  font-size: clamp(2.35rem, 8vw, 4.85rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--green-950);
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.lead {
  max-width: 720px;
  margin-bottom: 12px;
  color: var(--red-900);
  font-size: clamp(1.25rem, 4vw, 1.8rem);
  font-weight: 800;
  line-height: 1.22;
}

.hero-text {
  max-width: 560px;
  color: #39423d;
  font-size: 1.04rem;
}

.hero-actions {
  display: flex;
  margin-top: 24px;
}

.mantra {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--green-800);
  font-weight: 800;
}

.hero-visual {
  padding: 18px;
  border: 1px solid rgba(25, 58, 43, 0.22);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.impact-card {
  background:
    linear-gradient(180deg, rgba(25, 58, 43, 0.06), rgba(132, 40, 45, 0.04)),
    var(--paper);
}

.impact-label {
  margin: 0 0 14px;
  color: var(--gray-600);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.impact-flow {
  display: grid;
  gap: 10px;
  text-align: center;
}

.impact-flow strong {
  display: block;
  padding: 14px;
  border: 1px solid rgba(25, 58, 43, 0.18);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green-950);
  font-size: clamp(1.65rem, 7vw, 2.9rem);
  line-height: 1;
}

.impact-flow span {
  color: var(--red-800);
  font-size: 1.25rem;
  font-weight: 900;
}

.impact-flow p {
  margin: 0;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--green-900);
  color: var(--beige-100);
  font-weight: 900;
}

.impact-note {
  margin: 16px 0 0;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--green-900);
  color: var(--beige-100);
  font-weight: 900;
  text-align: center;
}

.workspace {
  display: grid;
  gap: 22px;
  padding: 18px 0 42px;
}

.pwa-install-banner {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 16px;
  border: 1px solid rgba(132, 40, 45, 0.28);
  border-radius: var(--radius);
  background: #fff5ef;
  box-shadow: 0 10px 24px rgba(101, 29, 33, 0.08);
}

.pwa-install-banner h2 {
  margin: 0;
  color: var(--green-950);
  font-size: 1rem;
  line-height: 1.35;
}

.pwa-install-banner .button {
  width: 100%;
}

.pwa-install-help {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(25, 58, 43, 0.14);
  border-radius: var(--radius);
  background: var(--paper);
}

.pwa-install-help strong {
  color: var(--green-950);
}

.pwa-install-help p {
  margin: 0;
  color: var(--gray-600);
  font-weight: 700;
}

.pwa-install-debug {
  color: var(--gray-500);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
}

.return-home-row {
  display: flex;
  justify-content: flex-start;
}

.home-return-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(132, 40, 45, 0.32);
  border-radius: var(--radius);
  background: #fff5ef;
  color: var(--red-900);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(101, 29, 33, 0.08);
}

.home-return-button:hover {
  border-color: rgba(132, 40, 45, 0.55);
  background: #fff0e9;
}

.dashboard,
.entry-panel,
.detail-panel,
.expense-section,
.possibility-section,
.recovery-goal-card,
.insight-card,
.pwa-box,
.privacy-box {
  border: 1px solid rgba(25, 58, 43, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 10px 24px rgba(13, 31, 24, 0.06);
}

.dashboard,
.entry-panel,
.detail-panel,
.expense-section,
.possibility-section,
.recovery-goal-card,
.insight-card,
.pwa-box,
.privacy-box {
  padding: 18px;
}

.section-heading {
  margin-bottom: 16px;
}

.row-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stats-grid {
  display: grid;
  gap: 12px;
}

.stat-tile {
  display: grid;
  gap: 8px;
  min-height: 122px;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--paper);
}

.stat-tile span {
  color: var(--gray-600);
  font-size: 0.9rem;
  font-weight: 700;
}

.stat-tile strong {
  align-self: center;
  color: var(--green-950);
  font-size: 1.55rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.example-pill {
  justify-self: start;
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid rgba(132, 40, 45, 0.3);
  border-radius: 999px;
  background: #fff5ef;
  color: var(--red-900);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-tile small {
  color: #574f46;
  font-size: 0.85rem;
}

.stat-lost {
  border-color: rgba(132, 40, 45, 0.42);
  background: #fff5ef;
}

.stat-lost strong {
  color: var(--red-900);
}

.recovery-goal-card {
  display: grid;
  gap: 14px;
  border-color: rgba(132, 40, 45, 0.28);
  background: #fffaf2;
}

.recovery-goal-card h2 {
  margin-bottom: 8px;
}

.recovery-goal-card p {
  margin: 0;
  color: var(--green-950);
  font-weight: 900;
}

.recovery-goal-card > strong {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--green-900);
  color: var(--beige-100);
  font-size: 0.86rem;
}

.recovery-goal-card.is-complete > strong {
  background: var(--red-800);
}

.goal-controls {
  display: grid;
  gap: 10px;
}

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

.goal-options button {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--green-950);
  cursor: pointer;
  font-weight: 900;
}

.goal-options button[aria-pressed="true"] {
  border-color: var(--green-900);
  background: var(--green-900);
  color: var(--beige-100);
}

.custom-goal-field {
  display: grid;
  gap: 8px;
  color: var(--gray-600);
  font-size: 0.88rem;
  font-weight: 800;
}

.recovery-meter {
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(25, 58, 43, 0.18);
  border-radius: 999px;
  background: var(--gray-200);
}

.recovery-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-700), var(--red-700));
  transition: width 180ms ease;
}

.main-grid {
  display: grid;
  gap: 22px;
}

.possibility-grid {
  display: grid;
  gap: 12px;
}

.possibility-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--paper);
}

.possibility-card strong {
  color: var(--green-950);
  font-size: 1.08rem;
}

.possibility-card p {
  margin: 0;
  color: var(--gray-600);
  font-weight: 700;
}

.privacy-box {
  display: grid;
  gap: 12px;
  border-color: rgba(36, 83, 60, 0.3);
  background: #f7f3e8;
}

.privacy-box p,
.privacy-box ul {
  margin: 0;
  color: #39423d;
  font-weight: 700;
}

.privacy-box ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.pwa-box {
  display: grid;
  gap: 16px;
  border-color: rgba(132, 40, 45, 0.24);
  background: #fffaf2;
}

.pwa-box p {
  margin: 0;
  color: #39423d;
  font-weight: 700;
}

.pwa-instructions {
  display: grid;
  gap: 12px;
}

.pwa-instructions article {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--paper);
}

.pwa-instructions h3 {
  margin: 0;
  color: var(--green-950);
  font-size: 1rem;
}

.pwa-instructions ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: var(--gray-600);
  font-weight: 700;
}

.pwa-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pwa-status {
  flex: 1 1 220px;
  min-height: 22px;
  color: var(--green-950);
  font-weight: 900;
}

.sample-expenses {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(25, 58, 43, 0.14);
  border-radius: var(--radius);
  background: var(--gray-100);
}

.sample-expenses p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.9rem;
  font-weight: 800;
}

.sample-expenses h3 {
  margin: 0;
  color: var(--green-950);
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sample-grid button {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green-950);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
}

.sample-grid button:hover {
  border-color: rgba(36, 83, 60, 0.45);
  background: #fbf7ed;
}

form {
  display: grid;
  gap: 16px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.mode-fieldset {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(25, 58, 43, 0.14);
  border-radius: var(--radius);
  background: var(--gray-100);
}

.mode-fieldset legend {
  margin-bottom: 8px;
  color: var(--green-950);
  font-weight: 900;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: var(--green-950);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 900;
}

.radio-option input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green-900);
}

.frequency-panel {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--green-950);
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: 0;
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--green-700);
  box-shadow: 0 0 0 4px rgba(36, 83, 60, 0.18);
}

.money-input {
  position: relative;
  display: block;
}

.money-input input {
  padding-right: 42px;
}

.money-input span {
  position: absolute;
  right: 14px;
  top: 50%;
  color: var(--gray-600);
  font-weight: 800;
  transform: translateY(-50%);
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(132, 40, 45, 0.3);
  border-radius: var(--radius);
  background: #fff2ef;
  color: var(--red-900);
  font-weight: 700;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.button-primary {
  background: var(--green-900);
  color: var(--beige-100);
  box-shadow: 0 12px 24px rgba(13, 31, 24, 0.2);
}

.button-primary:hover {
  background: var(--green-800);
}

.button-quiet {
  border: 1px solid var(--gray-200);
  background: var(--paper);
  color: var(--green-900);
}

.button-danger {
  border: 1px solid rgba(132, 40, 45, 0.28);
  background: #fff5ef;
  color: var(--red-900);
}

.button-small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.detail-summary {
  display: grid;
  gap: 10px;
}

.guided-path {
  display: grid;
  gap: 12px;
}

.path-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--paper);
}

.path-step h3 {
  margin-bottom: 10px;
  color: var(--green-950);
}

.step-index {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green-900);
  color: var(--beige-100);
  font-size: 0.86rem;
  font-weight: 900;
}

.impact-sentence {
  margin-bottom: 12px;
  color: var(--green-950);
  font-size: 1rem;
  font-weight: 900;
}

.detail-summary div,
.app-suggestion {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--paper);
}

.detail-summary span,
.app-suggestion span {
  color: var(--gray-600);
  font-size: 0.82rem;
  font-weight: 800;
}

.detail-summary strong,
.app-suggestion strong {
  color: var(--green-950);
  font-size: 1.06rem;
  overflow-wrap: anywhere;
}

.app-suggestion {
  margin-top: 12px;
  border-color: rgba(36, 83, 60, 0.28);
  background: #f7f3e8;
}

.guide-question {
  margin: 18px 0;
  padding-left: 12px;
  border-left: 4px solid var(--red-800);
  color: var(--green-950);
  font-size: 1.1rem;
  font-weight: 900;
}

.choice-block {
  margin-top: 18px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.segmented button {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green-950);
  cursor: pointer;
  font-weight: 900;
}

.segmented button[aria-pressed="true"] {
  border-color: var(--green-900);
  background: var(--green-900);
  color: var(--beige-100);
}

.segmented button[data-quality="Spreco"][aria-pressed="true"],
.segmented button[data-decision="Da eliminare"][aria-pressed="true"] {
  border-color: var(--red-800);
  background: var(--red-800);
}

.lost-indicator {
  margin: 18px 0 0;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--gray-100);
  color: var(--green-950);
  font-weight: 800;
}

.lost-indicator.is-lost {
  background: #fff0ec;
  color: var(--red-900);
}

.evaluation-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.save-message {
  min-height: 22px;
  margin: 0;
  color: var(--green-900);
  font-weight: 900;
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(25, 58, 43, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 248, 235, 0.7);
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--gray-600);
}

.insight-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.insight-card {
  display: grid;
  gap: 12px;
  box-shadow: none;
}

.insight-card h3 {
  margin: 0;
  color: var(--green-950);
  font-size: 1rem;
}

.insight-card p {
  margin: 0;
  color: var(--gray-600);
  font-weight: 700;
}

.top-expenses-list,
.recoverable-summary {
  display: grid;
  gap: 8px;
}

.top-expense-item,
.recoverable-summary div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--gray-100);
}

.top-expense-item strong,
.recoverable-summary strong {
  color: var(--green-950);
  overflow-wrap: anywhere;
}

.top-expense-item span,
.recoverable-summary span {
  color: var(--gray-600);
  font-size: 0.78rem;
  font-weight: 800;
}

.top-expense-item small {
  color: var(--gray-600);
  font-weight: 800;
}

.category-filter {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--gray-600);
  font-weight: 900;
}

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

.expense-item {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--paper);
}

.expense-main {
  display: grid;
  gap: 6px;
}

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

.expense-title h3 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(25, 58, 43, 0.18);
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--green-950);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.badge-lost {
  border-color: rgba(132, 40, 45, 0.38);
  background: #fff0ec;
  color: var(--red-900);
}

.expense-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.expense-meta div {
  display: grid;
  gap: 3px;
  min-height: 66px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--gray-100);
}

.expense-meta span {
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 800;
}

.expense-meta strong {
  color: var(--ink);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.expense-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 0 32px;
  color: var(--gray-600);
  font-size: 0.86rem;
}

.footer span:first-child {
  color: var(--green-900);
  font-weight: 900;
}

.footer span:nth-child(2) {
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid rgba(25, 58, 43, 0.18);
  border-radius: 999px;
  background: var(--paper);
  color: var(--red-900);
  font-size: 0.78rem;
  font-weight: 900;
}

.footer small {
  max-width: 760px;
  color: #6b6258;
}

[hidden] {
  display: none !important;
}

@media (min-width: 620px) {
  .stats-grid,
  .detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .pwa-install-banner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .pwa-install-banner .button {
    width: auto;
  }

  .pwa-install-help {
    grid-column: 1 / -1;
  }

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

  .recoverable-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-filter {
    grid-template-columns: minmax(180px, 0.4fr) minmax(220px, 0.6fr);
    align-items: center;
  }

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

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

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

  .privacy-box {
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1fr);
    align-items: center;
  }

  .recovery-goal-card {
    grid-template-columns: minmax(220px, 0.8fr) minmax(200px, 1fr) auto;
    align-items: center;
  }
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
    padding-top: 42px;
  }

  .workspace {
    padding-top: 28px;
  }

  .main-grid {
    grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1fr);
    align-items: start;
  }

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

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

  .expense-item {
    grid-template-columns: minmax(220px, 0.9fr) minmax(360px, 1.4fr) auto;
    align-items: center;
  }

  .expense-actions {
    justify-content: flex-end;
  }
}

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

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