:root {
  color-scheme: light;
  --ink: #17352d;
  --ink-soft: #557067;
  --green: #173f35;
  --green-2: #285b4c;
  --green-3: #9fb8ab;
  --cream: #f4efe5;
  --cream-2: #fbf8f1;
  --paper: #fffdf9;
  --gold: #bd8d39;
  --gold-soft: #f1dfb7;
  --rose: #a75448;
  --rose-soft: #f6e3df;
  --line: #d9d2c3;
  --shadow: 0 22px 60px rgba(30, 55, 46, 0.12);
  --shadow-soft: 0 10px 30px rgba(30, 55, 46, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(241, 223, 183, 0.48), transparent 30rem),
    linear-gradient(180deg, var(--cream-2), var(--cream));
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: white;
  background: var(--green);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 4.5rem);
  border-bottom: 1px solid rgba(23, 63, 53, 0.1);
  background: rgba(251, 248, 241, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--gold-soft);
  background: var(--green);
  font-family: var(--serif);
  font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(23, 63, 53, 0.24);
}

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

.brand strong {
  letter-spacing: -0.02em;
}

.brand small {
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions,
.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.privacy-badge,
.step-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(23, 63, 53, 0.14);
  border-radius: 999px;
  color: var(--green-2);
  background: rgba(255, 255, 255, 0.48);
  font-size: 0.78rem;
  font-weight: 700;
}

.privacy-badge span {
  color: #5e9c7a;
  font-size: 0.62rem;
}

main {
  min-height: calc(100vh - 76px);
}

.app-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-height: calc(100vh - 76px);
  color: var(--green);
}

.app-loading strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.app-loading p {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.setup-view {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(400px, 0.78fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
  width: min(1440px, 100%);
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 6rem) clamp(1rem, 5vw, 5rem);
}

.setup-copy {
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--gold);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.setup-copy h1,
.dashboard-heading h1 {
  margin-bottom: 1.3rem;
  font-family: var(--serif);
  font-size: clamp(3rem, 6.2vw, 6.7rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.93;
}

.lede {
  max-width: 640px;
  margin-bottom: 2.3rem;
  color: var(--ink-soft);
  font-size: clamp(1.03rem, 1.5vw, 1.25rem);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.2rem 0;
  border-block: 1px solid var(--line);
}

.feature-strip > div {
  display: flex;
  gap: 0.7rem;
}

.feature-strip p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.5;
}

.feature-strip strong {
  color: var(--ink);
}

.feature-icon {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.guardrail-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  max-width: 610px;
  margin-top: 1.4rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  color: #f9f5ec;
  background: var(--green);
  box-shadow: var(--shadow-soft);
}

.guardrail-card p {
  margin: 0.1rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
}

.guardrail-icon {
  color: var(--gold-soft);
  font-size: 1.3rem;
}

.setup-panel {
  position: relative;
  padding: clamp(1.35rem, 3vw, 2.4rem);
  border: 1px solid rgba(23, 63, 53, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.88);
  box-shadow: var(--shadow);
}

.setup-panel::before {
  position: absolute;
  inset: 0.65rem;
  z-index: -1;
  border: 1px solid rgba(189, 141, 57, 0.18);
  border-radius: calc(var(--radius-lg) - 7px);
  content: "";
}

.panel-heading,
.dialog-heading,
.advice-heading,
.dashboard-heading,
.lane-heading,
.budget-card-top,
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel-heading {
  align-items: flex-start;
  margin-bottom: 1.3rem;
}

.panel-heading h2,
.dialog-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.field {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.field > span:first-child,
.field-label-row {
  color: var(--ink);
  font-size: 0.79rem;
  font-weight: 750;
}

.field-label-row > span:last-child {
  color: var(--ink-soft);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: white;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input,
select {
  min-height: 46px;
  padding: 0.65rem 0.8rem;
}

textarea {
  min-height: 176px;
  padding: 0.85rem;
  line-height: 1.45;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(40, 91, 76, 0.12);
}

.budget-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.money-input,
.mini-money-input {
  position: relative;
  display: flex;
  align-items: center;
}

.money-input > span,
.mini-money-input > span {
  position: absolute;
  left: 0.8rem;
  z-index: 1;
  color: var(--ink-soft);
  font-weight: 700;
}

.money-input input,
.mini-money-input input {
  padding-left: 1.75rem;
}

.field-hint {
  margin: -0.45rem 0 1.2rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.budget-persistence-note {
  margin-top: -0.35rem;
}

.form-step-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.2rem 0 1rem;
}

.form-step-heading-links {
  margin-top: 1.35rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.form-step-heading > div {
  display: grid;
  gap: 0.1rem;
}

.form-step-heading strong {
  font-size: 0.83rem;
}

.form-step-heading small {
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.form-step-heading em {
  color: var(--ink-soft);
  font-style: normal;
  font-weight: 600;
}

.form-step-number {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-family: var(--serif);
  font-size: 0.9rem;
}

.link-instructions {
  display: grid;
  gap: 0.35rem;
  margin: -0.35rem 0 0.85rem;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.5;
}

.link-instructions strong {
  color: var(--ink);
}

.link-instructions code,
.link-examples code {
  color: var(--green-2);
  font-size: 0.69rem;
}

.link-instructions-compact {
  margin-top: -0.15rem;
}

.link-examples {
  display: grid;
  gap: 0.2rem;
  margin: -0.25rem 0 0.95rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(23, 63, 53, 0.1);
  border-radius: 10px;
  background: rgba(226, 238, 229, 0.42);
}

.link-examples code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-helper {
  margin-top: 0;
}

.field-hint code {
  color: var(--green);
  font-family: inherit;
  font-weight: 650;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

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

.button:active {
  transform: translateY(0);
}

.button:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.button-primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 8px 20px rgba(23, 63, 53, 0.18);
}

.button-primary:hover {
  background: #0f322a;
}

.button-quiet {
  border-color: rgba(23, 63, 53, 0.16);
  background: rgba(255, 255, 255, 0.64);
}

.button-danger {
  color: var(--rose);
  border-color: color-mix(in srgb, var(--rose) 34%, transparent);
  background: color-mix(in srgb, var(--rose) 7%, white);
}

.button-danger:hover {
  color: #fff;
  border-color: var(--rose);
  background: var(--rose);
}

.button-large {
  width: 100%;
  min-height: 54px;
  justify-content: space-between;
  padding-inline: 1.3rem;
}

.text-button,
.icon-button {
  padding: 0;
  border: 0;
  background: transparent;
}

.text-button {
  color: var(--green-2);
  font-size: 0.8rem;
  font-weight: 750;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.4rem;
}

.form-message {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e8b9b1;
  border-radius: 10px;
  color: #7e372d;
  background: var(--rose-soft);
  font-size: 0.82rem;
}

.section-rule {
  height: 1px;
  margin: 1.5rem 0;
  background: var(--line);
}

.recent-plans h3 {
  margin-bottom: 0.7rem;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.recent-plan-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border: 0;
  border-bottom: 1px solid rgba(217, 210, 195, 0.68);
  text-align: left;
  background: transparent;
}

.recent-plan-button small {
  display: block;
  color: var(--ink-soft);
}

.dashboard-view {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 4rem) clamp(1rem, 4vw, 4rem) 6rem;
}

.dashboard-heading {
  align-items: flex-end;
  margin-bottom: 2rem;
}

.dashboard-heading h1 {
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 5rem);
}

.dashboard-meta {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.save-status {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.save-help {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.research-progress {
  margin-bottom: 1.4rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(189, 141, 57, 0.28);
  border-radius: var(--radius-md);
  background: #fffaf0;
  box-shadow: var(--shadow-soft);
}

.research-copy {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.research-copy p {
  margin: 0.1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.spinner {
  width: 27px;
  height: 27px;
  border: 3px solid var(--gold-soft);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-track,
.budget-meter {
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: rgba(23, 63, 53, 0.1);
}

.progress-track {
  margin-top: 0.9rem;
}

.progress-track span,
.budget-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 280ms ease;
}

.budget-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(220px, 0.58fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.planner-view-tabs {
  display: inline-flex;
  gap: 0.3rem;
  margin: 0.25rem 0 1.25rem;
  padding: 0.3rem;
  scroll-margin-top: calc(76px + 1rem);
  border: 1px solid rgba(23, 63, 53, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.planner-view-tab {
  min-width: 104px;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 750;
}

.planner-view-tab.active {
  color: white;
  background: var(--green);
  box-shadow: 0 3px 10px rgba(23, 63, 53, 0.18);
}

.planner-view-tab:focus-visible,
.summary-review-products:focus-visible {
  outline: 3px solid rgba(189, 141, 57, 0.6);
  outline-offset: 3px;
}

.scroll-budget-dock {
  position: sticky;
  top: calc(76px + 0.65rem);
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0.72rem 0.8rem 0.72rem 1rem;
  border: 1px solid rgba(241, 223, 183, 0.28);
  border-radius: 18px;
  color: #fffdf9;
  background: rgba(23, 63, 53, 0.96);
  box-shadow: 0 14px 34px rgba(23, 53, 45, 0.2);
  backdrop-filter: blur(18px);
}

.scroll-budget-dock-label {
  display: flex;
  min-width: 150px;
  align-items: center;
  gap: 0.65rem;
}

.scroll-budget-dock-label small,
.scroll-budget-dock-label strong {
  display: block;
}

.scroll-budget-dock-label small {
  color: var(--gold-soft);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scroll-budget-dock-label strong {
  margin-top: 0.05rem;
  font-size: 0.76rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d5ac5b;
  box-shadow: 0 0 0 5px rgba(213, 172, 91, 0.14);
}

.scroll-budget-dock-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
  margin: 0;
}

.scroll-budget-dock-metrics div {
  min-width: 0;
  padding: 0 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.scroll-budget-dock-metrics dt {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.scroll-budget-dock-metrics dd {
  overflow: hidden;
  margin: 0.08rem 0 0;
  font-family: var(--serif);
  font-size: clamp(0.88rem, 1.4vw, 1.08rem);
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scroll-budget-dock .over-budget {
  color: #ffd6ce !important;
}

.scroll-open-summary {
  min-height: 38px;
  padding: 0.5rem 0.78rem;
  border-color: rgba(241, 223, 183, 0.38);
  color: var(--green);
  background: var(--gold-soft);
}

.scroll-open-summary:hover {
  background: #fff1d1;
}

.scroll-open-summary:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.78);
  outline-offset: 3px;
}

.summary-hero,
.summary-breakdown,
.products-totals {
  border: 1px solid rgba(23, 63, 53, 0.1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.summary-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 1.45rem;
  color: #f8f4ea;
  background:
    linear-gradient(120deg, rgba(241, 223, 183, 0.18), transparent 48%),
    var(--green);
}

.summary-hero h2,
.summary-breakdown h2,
.products-totals h2 {
  margin: 0.2rem 0 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
}

.summary-hero > div > strong {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.summary-hero p,
.summary-hero small {
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
}

.summary-hero .eyebrow {
  color: var(--gold-soft);
}

.summary-hero-balance {
  min-width: min(250px, 35%);
  align-self: flex-end;
  text-align: right;
}

.summary-hero-balance > span,
.summary-hero-balance > strong {
  display: block;
}

.summary-hero-balance > span {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.summary-hero-balance > strong {
  margin-top: 0.2rem;
  font-size: 0.78rem;
}

.summary-breakdown {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) 1fr;
  gap: 1rem 1.5rem;
  margin: 0 0 2rem;
  padding: 1.35rem;
  background: rgba(255, 253, 249, 0.74);
}

.summary-metrics,
.products-totals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
}

.summary-metrics div,
.products-totals-grid div {
  min-width: 0;
}

.summary-metrics dt,
.products-totals-grid dt {
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.summary-metrics dd,
.products-totals-grid dd {
  margin: 0.25rem 0 0;
  color: var(--green-2);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 550;
}

.summary-list-health {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.summary-list-health > span,
.summary-review-products {
  padding: 0.38rem 0.68rem;
  border: 1px solid rgba(23, 63, 53, 0.12);
  border-radius: 999px;
  color: var(--green-2);
  background: #edf3ee;
  font-size: 0.72rem;
  font-weight: 750;
}

.summary-review-products:disabled {
  opacity: 0.55;
}

.products-totals {
  display: grid;
  grid-template-columns: minmax(155px, 0.45fr) 1fr;
  gap: 1.15rem;
  margin: 0 0 2rem;
  padding: 1.1rem 1.25rem;
  background: #f0f5f0;
}

.products-totals h2 {
  font-size: 1.25rem;
}

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

.products-totals-grid dd {
  font-size: 1.08rem;
}

.products-totals-grid small {
  display: block;
  margin-top: 0.22rem;
  color: var(--ink-soft);
  font-size: 0.66rem;
  line-height: 1.35;
}

.budget-card,
.duty-card,
.advice-panel {
  border: 1px solid rgba(23, 63, 53, 0.1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.budget-card {
  padding: 1.35rem;
  background: var(--paper);
}

.budget-card-essentials {
  background: #f0f5f0;
}

.budget-card-top {
  align-items: flex-start;
}

.budget-card h2,
.duty-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.budget-card-top p:not(.eyebrow),
.duty-card > div > p:last-child {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.budget-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(189, 141, 57, 0.3);
  border-radius: 50%;
  color: var(--gold);
  background: #fffaf0;
  font-size: 1.1rem;
}

.budget-numbers {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0 0.65rem;
  color: var(--ink-soft);
  font-size: 0.73rem;
}

.budget-numbers strong {
  color: var(--ink);
}

.budget-caption {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.over-budget {
  color: var(--rose) !important;
}

.budget-card.over-budget-card {
  border-color: rgba(167, 84, 72, 0.45);
  background: #fff8f6;
}

.budget-card.over-budget-card .budget-meter span {
  background: var(--rose);
}

.duty-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem;
  color: #f8f4ea;
  background: var(--green);
}

.duty-card .eyebrow {
  color: var(--gold-soft);
}

.duty-card > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.76rem;
}

.advice-panel {
  margin-bottom: 2rem;
  padding: 1.35rem;
  background:
    linear-gradient(110deg, rgba(241, 223, 183, 0.3), transparent 45%),
    var(--paper);
}

.advice-heading {
  justify-content: flex-start;
}

.advice-heading .button {
  margin-left: auto;
}

.advice-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 500;
}

.advice-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--gold-soft);
  background: var(--green);
  font-family: var(--serif);
  font-size: 1.4rem;
}

.advice-summary {
  max-width: 1000px;
  margin: 1rem 0;
  color: var(--ink-soft);
}

.advice-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.advice-stat {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: var(--green-2);
  background: #edf3ee;
  font-size: 0.73rem;
  font-weight: 750;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 0.38fr) minmax(172px, 0.32fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 0 0 1rem;
}

.catalog-summary h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.search-field input {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.catalog-subcategory-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 700;
}

.catalog-subcategory-filter select {
  min-width: 0;
  min-height: 38px;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
}

.filter-chip {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(23, 63, 53, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  font-weight: 700;
}

.filter-chip.active {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.lane-section {
  margin-bottom: 1.3rem;
  border: 1px solid rgba(23, 63, 53, 0.11);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 249, 0.68);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.lane-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  padding: 1.15rem 1.3rem;
  border: 0;
  border-radius: inherit;
  text-align: center;
  background: transparent;
}

.lane-heading > span:first-child {
  grid-column: 2;
  justify-content: center;
  text-align: center;
}

.lane-heading > span:first-child,
.lane-heading-totals,
.lane-heading-totals > span {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.lane-heading small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lane-heading strong {
  display: block;
}

.lane-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.lane-dot-items {
  background: var(--gold);
}

.lane-dot-essentials {
  background: #6c9a81;
}

.lane-section[data-lane-section="personalItems"] .lane-heading {
  background:
    linear-gradient(90deg, rgba(255, 247, 226, 0.86), rgba(255, 253, 249, 0.96), rgba(255, 247, 226, 0.86));
  border-bottom: 3px solid rgba(189, 141, 57, 0.45);
}

.lane-section[data-lane-section="personalEssentials"] .lane-heading {
  background:
    linear-gradient(90deg, rgba(235, 247, 240, 0.9), rgba(255, 253, 249, 0.96), rgba(235, 247, 240, 0.9));
  border-bottom: 3px solid rgba(73, 138, 114, 0.45);
}

.lane-heading-totals {
  grid-column: 3;
  justify-content: flex-end;
  gap: 1.4rem;
  text-align: right;
}

.lane-heading-totals > span {
  display: block;
  min-width: 92px;
}

.chevron {
  min-width: 0 !important;
  color: var(--ink-soft);
  font-size: 1.3rem;
  transition: transform 180ms ease;
}

.lane-section.collapsed .chevron {
  transform: rotate(-90deg);
}

.lane-section.collapsed .product-grid,
.lane-section.collapsed .empty-lane {
  display: none !important;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0 1rem 1rem;
}

.empty-lane {
  margin: 0;
  padding: 1rem 1.3rem 1.4rem;
  color: var(--ink-soft);
  font-size: 0.83rem;
}

.product-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(23, 63, 53, 0.12);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(30, 55, 46, 0.06);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(30, 55, 46, 0.11);
}

.product-card.excluded {
  opacity: 0.56;
}

.product-card.excluded .product-title {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.product-card.price-under-75 {
  border-color: rgba(189, 141, 57, 0.62);
  box-shadow: 0 10px 28px rgba(189, 141, 57, 0.14);
}

.product-card.price-under-60 {
  border: 2px solid rgba(40, 91, 76, 0.72);
  box-shadow: 0 12px 32px rgba(40, 91, 76, 0.18);
}

.product-card.priority-1 {
  border: 3px solid #a75448;
  background: #fff5f2;
  box-shadow: 0 14px 34px rgba(167, 84, 72, 0.2);
}

.product-card.priority-2 {
  border: 3px solid #bd8d39;
  background: #fffaf0;
  box-shadow: 0 12px 30px rgba(189, 141, 57, 0.18);
}

.product-card.priority-3 {
  border: 3px solid #447aa3;
  background: #f5faff;
  box-shadow: 0 10px 28px rgba(68, 122, 163, 0.16);
}

.priority-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 0.5rem;
  padding: 0.24rem 0.52rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.priority-1 .priority-badge { color: #793c31; background: #f6e3df; }
.priority-2 .priority-badge { color: #79591e; background: #fff1c9; }
.priority-3 .priority-badge { color: #214f74; background: #e2f0fa; }

.product-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(241, 223, 183, 0.44), rgba(159, 184, 171, 0.25)),
    #f2ede2;
}

.product-media-link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8f5ee;
}

.image-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(23, 63, 53, 0.28);
  font-size: 3.5rem;
  text-align: center;
  pointer-events: none;
}

.image-placeholder::after {
  content: "Image unavailable";
  max-width: 12rem;
  color: rgba(23, 63, 53, 0.68);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.status-pill {
  position: absolute;
  z-index: 2;
  left: 0.65rem;
  top: 0.65rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.64rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.status-pill.review,
.status-pill.error {
  color: #793c31;
  background: rgba(255, 240, 236, 0.92);
}

.status-pill.researching,
.status-pill.queued {
  color: #6d5120;
  background: rgba(255, 248, 228, 0.92);
}

.include-switch {
  position: absolute;
  z-index: 2;
  right: 0.65rem;
  top: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.switch-track {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: var(--green-2);
  transition: background 160ms ease;
}

.switch-track span {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  transition: transform 160ms ease;
}

.include-switch[aria-pressed="false"] .switch-track {
  background: #a9aaa5;
}

.include-switch[aria-pressed="false"] .switch-track span {
  transform: translateX(-12px);
}

.switch-label {
  font-size: 0.62rem;
  font-weight: 800;
}

.product-body {
  padding: 1rem;
}

.product-store {
  overflow: hidden;
  margin-bottom: 0.25rem;
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.product-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.85rem;
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-title-link {
  color: inherit;
  text-decoration: none;
}

.product-media-link:focus-visible,
.product-title-link:focus-visible,
.store-link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.product-title-link:hover,
.store-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.product-media-link img {
  transition: transform 180ms ease;
}

.product-media-link:hover img {
  transform: scale(1.015);
}

.product-note {
  margin-bottom: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.73rem;
}

.product-research-note {
  margin: -0.15rem 0 0.6rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--gold);
  color: #4a5e56;
  font-size: 0.72rem;
  line-height: 1.4;
}

.recommendation-badge {
  margin-bottom: 0.7rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  color: var(--green-2);
  background: #edf3ee;
  font-size: 0.68rem;
}

.recommendation-badge strong {
  margin-right: 0.25rem;
  text-transform: capitalize;
}

.recommendation-badge.defer,
.recommendation-badge.skip {
  color: #754c22;
  background: #fbf0d8;
}

.recommendation-badge.review {
  color: #793c31;
  background: var(--rose-soft);
}

.product-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0;
  padding-block: 0.7rem;
  border-block: 1px solid rgba(217, 210, 195, 0.75);
}

.price-under-75 .product-price-row {
  border-color: rgba(189, 141, 57, 0.34);
  background: rgba(241, 223, 183, 0.2);
}

.price-under-60 .product-price-row {
  border-color: rgba(40, 91, 76, 0.28);
  background: rgba(159, 184, 171, 0.2);
}

.price-highlight-badge {
  display: block;
  width: fit-content;
  margin-top: 0.28rem;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  color: #79591e;
  background: #fff1c9;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.price-under-60 .price-highlight-badge {
  color: var(--green-2);
  background: #dceee2;
}

.product-price-row small,
.product-controls label > span:first-child,
.classification-fields label > span:first-child {
  display: block;
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 700;
}

.line-total {
  font-size: 1rem;
}

.store-link {
  color: var(--green-2);
  font-size: 0.7rem;
  font-weight: 750;
  text-decoration: none;
}

.product-controls {
  display: grid;
  grid-template-columns: 1fr 0.52fr;
  gap: 0.6rem;
}

.priority-control {
  grid-column: 1 / -1;
}

.product-controls input,
.product-controls select {
  min-height: 38px;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
}

.mini-money-input > span {
  left: 0.55rem;
  font-size: 0.72rem;
}

.mini-money-input input {
  padding-left: 1.25rem;
}

.product-classification {
  margin-top: 0.8rem;
  padding: 0.8rem;
  border: 1px solid rgba(40, 91, 76, 0.18);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(229, 240, 233, 0.8), rgba(248, 245, 238, 0.9));
}

.classification-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.classification-heading > span {
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.classification-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.66rem;
  line-height: 1.35;
  text-align: right;
}

.classification-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.monthly-promises { display: grid; grid-template-columns: minmax(12rem, .8fr) minmax(18rem, 1.2fr); gap: 1.25rem; margin: 1rem 0 1.5rem; padding: 1.25rem; border: 1px solid rgba(40, 91, 76, .18); border-radius: 1rem; background: #f6faf7; }
.monthly-promises h2 { margin: .15rem 0 .4rem; }
.monthly-promises p { margin: 0; color: var(--muted); }
.monthly-promise-form { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem auto; gap: .5rem; }
.monthly-promise-form input { width: 100%; min-height: 2.5rem; border: 1px solid rgba(40, 91, 76, .26); border-radius: .55rem; padding: .5rem .65rem; background: white; }
.monthly-promise-list { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: .75rem 0 0; list-style: none; }
.monthly-promise-list li { padding: .38rem .6rem; border-radius: 999px; background: #e1eee7; color: #204c3e; font-size: .85rem; font-weight: 650; }
.catalog-navigation { display: grid; gap: .85rem; margin: 0 0 1.25rem; padding: .9rem 1rem; border: 1px solid rgba(40, 91, 76, .16); border-radius: .9rem; background: rgba(255, 253, 249, .76); }
.catalog-navigation-group { display: grid; gap: .45rem; }
.catalog-navigation-label { margin: 0; color: var(--ink-soft); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.category-jumps, .subcategory-jumps { display: flex; flex-wrap: wrap; gap: .5rem; }
.category-jump, .subcategory-jump { border: 1px solid rgba(40, 91, 76, .24); border-radius: 999px; background: #fff; color: #245345; padding: .45rem .72rem; font: inherit; font-size: .82rem; font-weight: 750; cursor: pointer; }
.category-jump:hover, .subcategory-jump:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(23, 63, 53, .1); }
.category-jump.active, .subcategory-jump.active { background: #245345; border-color: #245345; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.category-jump.category-jewelry, .subcategory-jump.category-jewelry { border-color: rgba(189, 141, 57, .48); color: #6d4b12; background: #fff8e9; }
.category-jump.category-clothing, .subcategory-jump.category-clothing { border-color: rgba(68, 122, 163, .48); color: #214f74; background: #edf6fb; }
.category-jump.category-home, .subcategory-jump.category-home { border-color: rgba(73, 138, 114, .48); color: #285b4c; background: #edf7f1; }
.category-jump.category-personalCare, .subcategory-jump.category-personalCare { border-color: rgba(113, 78, 131, .48); color: #563965; background: #f5eff8; }
.category-jump.category-foodAndDrink, .subcategory-jump.category-foodAndDrink { border-color: rgba(180, 91, 61, .48); color: #743723; background: #fff0eb; }
.category-jump.active, .subcategory-jump.active { color: #fff; }

.catalog-category-group { --category-accent: #59726b; --category-ink: #173f35; --category-pale: #f3f7f5; grid-column: 1 / -1; margin: .8rem 0 1.6rem; scroll-margin-top: 6rem; }
.catalog-category-group[data-category="jewelry"] { --category-accent: #bd8d39; --category-ink: #6d4b12; --category-pale: #fff8e9; }
.catalog-category-group[data-category="clothing"] { --category-accent: #447aa3; --category-ink: #214f74; --category-pale: #edf6fb; }
.catalog-category-group[data-category="home"] { --category-accent: #498a72; --category-ink: #285b4c; --category-pale: #edf7f1; }
.catalog-category-group[data-category="personalCare"] { --category-accent: #714e83; --category-ink: #563965; --category-pale: #f5eff8; }
.catalog-category-group[data-category="foodAndDrink"] { --category-accent: #b45b3d; --category-ink: #743723; --category-pale: #fff0eb; }
.catalog-category-banner { display: grid; justify-items: center; gap: .1rem; margin: 0 0 .75rem; padding: .9rem 1rem; border: 1px solid color-mix(in srgb, var(--category-accent) 36%, white); border-top: 5px solid var(--category-accent); border-radius: .75rem; background: var(--category-pale); color: var(--category-ink); text-align: center; }
.catalog-group-kicker, .catalog-subcategory-kicker { color: inherit; font-size: .65rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.catalog-category-heading { margin: 0; color: inherit; font-family: var(--serif); font-size: clamp(1.45rem, 3vw, 1.85rem); line-height: 1.1; }
.catalog-group-count { color: inherit; font-size: .76rem; font-weight: 700; opacity: .82; }
.catalog-subcategory-section { margin: 0 0 1rem; scroll-margin-top: 6rem; }
.catalog-subcategory-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; margin: 0 0 .7rem; padding: .6rem .75rem; border-left: 5px solid var(--category-accent); border-radius: 0 .5rem .5rem 0; color: var(--category-ink); background: var(--category-pale); font-size: .92rem; font-weight: 800; letter-spacing: .025em; }
.catalog-subcategory-heading > span:nth-child(2) { text-transform: uppercase; }
.catalog-subcategory-heading small { color: inherit; font-size: .7rem; font-weight: 750; opacity: .78; white-space: nowrap; }
.catalog-subcategory-group { margin-bottom: .5rem; }
.catalog-visual-key { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; padding-top: .15rem; color: var(--ink-soft); font-size: .72rem; }
.catalog-visual-key-title { color: var(--ink); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.catalog-key-item { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; }
.catalog-key-swatch { width: .72rem; height: .72rem; border: 1px solid currentColor; border-radius: 50%; }
.catalog-key-swatch.category-jewelry { color: #bd8d39; background: #fff8e9; }
.catalog-key-swatch.category-clothing { color: #447aa3; background: #edf6fb; }
.catalog-key-swatch.category-home { color: #498a72; background: #edf7f1; }
.catalog-key-swatch.category-personalCare { color: #714e83; background: #f5eff8; }
.catalog-key-swatch.category-foodAndDrink { color: #b45b3d; background: #fff0eb; }
@media (max-width: 700px) { .monthly-promises { grid-template-columns: 1fr; } .monthly-promise-form { grid-template-columns: minmax(0, 1fr) 4rem; } .monthly-promise-form button { grid-column: 1 / -1; } }

.classification-fields select {
  min-height: 40px;
  padding: 0.45rem 0.55rem;
  border-color: rgba(40, 91, 76, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.72rem;
}

.classification-fields select:disabled {
  color: rgba(23, 63, 53, 0.54);
  background: rgba(236, 237, 230, 0.8);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.8rem;
}

.card-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.price-source {
  color: var(--ink-soft);
  font-size: 0.62rem;
}

.retry-button {
  color: var(--green-2);
}

.danger-text {
  color: var(--rose);
}

.add-dialog {
  width: min(620px, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(18, 38, 32, 0.34);
}

.add-dialog::backdrop {
  background: rgba(13, 29, 25, 0.58);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  padding: 1.5rem;
}

.dialog-heading {
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
}

.next-payday-dialog {
  width: min(680px, calc(100vw - 2rem));
}

.next-payday-intro {
  margin: -0.35rem 0 1.1rem;
  color: var(--muted);
  line-height: 1.55;
}

.next-payday-choices {
  display: grid;
  gap: 0.75rem;
}

.next-payday-choice {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.next-payday-choice:hover,
.next-payday-choice:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.12);
}

.next-payday-choice > span:first-child {
  display: grid;
  gap: 0.3rem;
}

.next-payday-choice small {
  color: var(--muted);
  line-height: 1.4;
}

.recommended-chip {
  flex: 0 0 auto;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  display: grid;
  width: min(380px, calc(100vw - 2rem));
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(23, 63, 53, 0.16);
  border-radius: 12px;
  color: white;
  background: var(--green);
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  animation: toast-in 220ms ease both;
}

.toast.error {
  background: #743d35;
}

.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1rem;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.62fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
  width: min(1120px, 100%);
}

.login-copy h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(3.8rem, 9vw, 7.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.login-copy > p:last-child {
  max-width: 520px;
  color: var(--ink-soft);
}

.login-brand {
  width: 54px;
  height: 54px;
  margin-bottom: 1.8rem;
  border-radius: 17px;
  font-size: 1.7rem;
}

.login-card {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border: 1px solid rgba(23, 63, 53, 0.11);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.login-card .field {
  margin: 0;
}

.login-note {
  margin: -0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  text-align: center;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (max-width: 1120px) {
  .setup-view {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

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

  .budget-overview {
    grid-template-columns: 1fr 1fr;
  }

  .summary-breakdown,
  .products-totals {
    grid-template-columns: 1fr;
  }

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

  .duty-card {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: flex-end;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr minmax(220px, 0.7fr);
  }

  .catalog-subcategory-filter {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .filter-group {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 68px;
  }

  .scroll-budget-dock {
    top: calc(68px + 0.5rem);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    padding-left: 0.75rem;
  }

  .scroll-budget-dock-label {
    display: none;
  }

  .planner-view-tabs {
    scroll-margin-top: calc(68px + 0.75rem);
  }

  .scroll-budget-dock-metrics div:first-child {
    border-left: 0;
  }

  .privacy-badge {
    display: none;
  }

  .setup-view {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
  }

  .setup-copy h1 {
    font-size: clamp(3rem, 14vw, 5.2rem);
  }

  .setup-copy {
    max-width: none;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-shell {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .login-copy h1 {
    font-size: clamp(3.4rem, 17vw, 5.6rem);
  }

  .login-copy > p:last-child {
    margin-bottom: 0;
  }

  .budget-overview {
    grid-template-columns: 1fr;
  }

  .summary-hero {
    flex-direction: column;
  }

  .summary-hero-balance {
    min-width: 0;
    align-self: stretch;
    text-align: left;
  }

  .duty-card {
    grid-column: auto;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .filter-group {
    grid-column: auto;
  }

  .catalog-subcategory-filter {
    grid-column: auto;
  }

  .lane-heading {
    align-items: flex-start;
  }

  .lane-heading-totals {
    gap: 0.7rem;
  }

  .lane-heading-totals > span {
    min-width: 72px;
  }
}

@media (max-width: 620px) {
  .brand small {
    display: none;
  }

  .site-header {
    padding-inline: 0.8rem;
  }

  .header-actions .button {
    padding-inline: 0.75rem;
  }

  .logout-button {
    display: none;
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }

  .budget-inputs,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .planner-view-tabs {
    display: flex;
    width: 100%;
  }

  .planner-view-tab {
    flex: 1;
  }

  .scroll-budget-dock {
    top: calc(68px + 0.35rem);
    gap: 0.45rem;
    padding: 0.58rem;
    border-radius: 15px;
  }

  .scroll-budget-dock-metrics div {
    padding: 0 0.45rem;
  }

  .scroll-budget-dock-metrics dt {
    font-size: 0.54rem;
    letter-spacing: 0;
  }

  .scroll-budget-dock-metrics dd {
    overflow: visible;
    font-family: var(--sans);
    font-size: 0.71rem;
    font-weight: 750;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .scroll-open-summary {
    min-height: 34px;
    padding: 0.4rem 0.58rem;
    font-size: 0.7rem;
  }

  .summary-metrics,
  .products-totals-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-view {
    padding-inline: 0.7rem;
  }

  .dashboard-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .save-status,
  .save-help {
    width: 100%;
  }

  .dashboard-actions .button {
    flex: 1;
  }

  .advice-heading {
    flex-wrap: wrap;
  }

  .advice-heading .button {
    width: 100%;
    margin-left: 0;
  }

  .duty-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .lane-heading {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.9rem;
  }

  .lane-heading > span:first-child,
  .lane-heading-totals {
    grid-column: 1;
  }

  .lane-heading-totals {
    justify-content: space-between;
    text-align: center;
  }

  .lane-heading-totals {
    width: 100%;
    justify-content: space-between;
  }

  .product-grid {
    padding-inline: 0.6rem;
  }

  .product-controls {
    grid-template-columns: 1fr 0.58fr;
  }

  .classification-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .classification-heading p {
    text-align: left;
  }

  .classification-fields {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 2026-11-24: "Fix name or image" panel for stores that block research (Amazon). */
.product-fix { margin-top: .8rem; border: 1px solid rgba(40, 91, 76, .18); border-radius: 11px; background: rgba(255, 253, 249, .8); }
.product-fix summary { cursor: pointer; padding: .6rem .8rem; color: var(--green-2); font-size: .72rem; font-weight: 750; }
.product-fix-fields { display: grid; gap: .55rem; padding: 0 .8rem .8rem; }
.product-fix-fields label > span:first-child { display: block; color: var(--ink-soft); font-size: .62rem; font-weight: 700; }
.product-fix-fields input { width: 100%; min-height: 38px; border: 1px solid rgba(40, 91, 76, .26); border-radius: .55rem; padding: .45rem .6rem; background: white; font: inherit; font-size: .8rem; }
