:root {
  color-scheme: light;
  --wt-bg: #f6f8f7;
  --wt-surface: rgba(255, 255, 255, 0.9);
  --wt-surface-solid: #ffffff;
  --wt-line: rgba(145, 161, 176, 0.2);
  --wt-line-strong: rgba(145, 161, 176, 0.34);
  --wt-text: #0b1724;
  --wt-muted: #5f6f85;
  --wt-soft: #eaf6f0;
  --wt-accent: #119669;
  --wt-accent-dark: #0c7a56;
  --wt-shadow: 0 24px 80px rgba(11, 23, 36, 0.08);
  --wt-shadow-soft: 0 16px 40px rgba(11, 23, 36, 0.05);
  --wt-ink: #0b1724;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(17, 150, 105, 0.08), transparent 26%),
    linear-gradient(180deg, #fbfcfb 0%, var(--wt-bg) 100%);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  height: 2.75rem;
  width: 2.75rem;
  flex-shrink: 0;
  border-radius: 1rem;
  box-shadow: 0 12px 28px rgba(11, 23, 36, 0.12);
}

.brand-mark-sm {
  height: 2.5rem;
  width: 2.5rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  color: var(--wt-ink);
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-caption {
  color: var(--wt-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand-subline {
  color: #607286;
  font-size: 0.78rem;
  font-weight: 500;
}

.brand-wordmark-hero {
  color: var(--wt-ink);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.brand-tagline {
  color: var(--wt-muted);
  font-size: 0.94rem;
  line-height: 1.8;
}

.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: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  border-radius: 9999px;
  background: #07111f;
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 700;
  transition: top 0.2s ease;
}

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

.section-label {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.14);
  background: rgba(236, 253, 245, 0.92);
  color: #047857;
  padding: 0.45rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.form-label {
  display: block;
  margin-bottom: 0.7rem;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-input {
  width: 100%;
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  color: var(--wt-text);
  min-height: 3.5rem;
  padding: 0.95rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.form-input:focus {
  border-color: rgba(15, 159, 110, 0.65);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), 0 10px 30px rgba(15, 23, 42, 0.06);
  outline: none;
  transform: translateY(-1px);
}

.summary-card,
.info-card {
  border-radius: 1.75rem;
  border: 1px solid var(--wt-line);
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(252,253,252,0.98) 100%);
  padding: 1.5rem;
  box-shadow: var(--wt-shadow-soft);
}

.summary-label {
  color: #6b7b8d;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.summary-value {
  margin-top: 1.15rem;
  color: #081120;
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.summary-note {
  margin-top: 0.9rem;
  color: var(--wt-muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.table-head {
  padding: 1rem 1.35rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #718197;
}

.table-cell {
  padding: 1.15rem 1.35rem;
  vertical-align: middle;
  color: var(--wt-text);
  font-size: 0.95rem;
}

.expense-name {
  color: #0b1320;
  font-size: 0.98rem;
  font-weight: 700;
}

.expense-subtext {
  margin-top: 0.25rem;
  color: var(--wt-muted);
  font-size: 0.83rem;
}

.expense-amount {
  color: #0b1320;
  font-size: 1rem;
  font-weight: 700;
}

.expense-annual {
  color: var(--wt-muted);
  font-size: 0.88rem;
}

.info-step {
  display: inline-flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f7faf9 100%);
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.faq-item {
  border-radius: 1.5rem;
  border: 1px solid var(--wt-line);
  background: rgba(255, 255, 255, 0.92);
  padding: 1.35rem 1.5rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  color: #020617;
  font-size: 1.05rem;
  font-weight: 700;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin-top: 1rem;
  color: #475569;
  line-height: 1.8;
}

.ad-slot {
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(248,250,252,0.98) 100%);
  padding: 1.6rem;
  text-align: center;
}

.category-row {
  border: 1px solid var(--wt-line);
  border-radius: 1.4rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(249,251,250,0.98) 100%);
  padding: 1.15rem 1.2rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95);
}

.category-meter {
  height: 0.62rem;
  overflow: hidden;
  border-radius: 9999px;
  background: #e7edf2;
}

.category-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #0f9f6e 0%, #3ac78e 100%);
}

.category-name {
  color: #081120;
  font-size: 0.98rem;
  font-weight: 700;
}

.category-meta {
  margin-top: 0.3rem;
  color: var(--wt-muted);
  font-size: 0.84rem;
}

.category-total {
  color: #081120;
  font-size: 1rem;
  font-weight: 700;
}

.category-annual {
  margin-top: 0.3rem;
  color: var(--wt-muted);
  font-size: 0.84rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #f5f8fa;
  color: #425466;
  padding: 0.35rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.placeholder-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.content-shell {
  border: 1px solid var(--wt-line);
  border-radius: 2rem;
  background: #fff;
  padding: 2rem;
  box-shadow: var(--wt-shadow-soft);
}

.prose-lite h1,
.prose-lite h2,
.prose-lite h3 {
  color: #020617;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.prose-lite h1 {
  font-size: clamp(2.25rem, 6vw, 3.6rem);
}

.prose-lite h2 {
  margin-top: 2rem;
  font-size: 1.5rem;
}

.prose-lite h3 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.prose-lite p,
.prose-lite li {
  color: #475569;
  line-height: 1.9;
}

.prose-lite ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.site-menu[data-open="true"] {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: calc(100% + 0.75rem);
  border: 1px solid var(--wt-line);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.98);
  padding: 1rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

.hero-shell {
  position: relative;
  overflow: hidden;
}

.hero-shell::after {
  content: '';
  position: absolute;
  right: -8rem;
  top: -8rem;
  height: 18rem;
  width: 18rem;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.11) 0%, rgba(16, 185, 129, 0) 70%);
  pointer-events: none;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.12);
  background: rgba(255, 255, 255, 0.78);
  padding: 0.6rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
}

.hero-kicker-dot {
  height: 0.55rem;
  width: 0.55rem;
  border-radius: 9999px;
  background: linear-gradient(180deg, #27c083 0%, #0f9f6e 100%);
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}

.hero-panel {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(250,252,251,0.98) 100%);
  padding: 1.5rem;
  box-shadow: var(--wt-shadow);
  backdrop-filter: blur(14px);
}

.hero-panel::before,
.tracker-panel::before,
.breakdown-panel::before,
.list-panel::before,
.form-panel::before,
.footer-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.7);
  pointer-events: none;
}

.metric-chip {
  border-radius: 1.25rem;
  border: 1px solid var(--wt-line);
  background: rgba(255, 255, 255, 0.82);
  padding: 1rem 1.1rem;
}

.metric-chip dt {
  color: #6b7b8d;
  font-size: 0.8rem;
  font-weight: 700;
}

.metric-chip dd {
  margin-top: 0.45rem;
  color: #081120;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.panel-soft {
  border-radius: 1.5rem;
  background: linear-gradient(180deg, #f8fbfa 0%, #f2f6f4 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.form-panel,
.list-panel,
.breakdown-panel,
.tracker-panel {
  position: relative;
  border-radius: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(251,252,251,0.99) 100%);
  box-shadow: var(--wt-shadow-soft);
}

.tracker-panel {
  padding: 1.5rem;
}

.form-panel,
.list-panel,
.breakdown-panel {
  padding: 1.5rem;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: linear-gradient(180deg, #102033 0%, #09111f 100%);
  color: #fff;
  padding: 0.95rem 1.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255,255,255,0.88);
  color: #1e293b;
  padding: 0.95rem 1.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.button-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(100, 116, 139, 0.35);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
}

.button-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(180deg, #15b77d 0%, #0f9f6e 100%);
  color: #fff;
  padding: 0.95rem 1.3rem;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 16px 32px rgba(15, 159, 110, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 159, 110, 0.28);
}

.button-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255,255,255,0.9);
  color: #334155;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.button-quiet:hover {
  border-color: rgba(239, 68, 68, 0.26);
  background: #fff5f5;
  color: #b42318;
}

.button-primary:focus-visible,
.button-secondary:focus-visible,
.button-accent:focus-visible,
.button-quiet:focus-visible,
.footer-link:focus-visible,
.site-menu a:focus-visible,
summary:focus-visible {
  outline: 2px solid #0f9f6e;
  outline-offset: 3px;
}

.form-input[aria-invalid="true"] {
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.empty-state-shell {
  position: relative;
  overflow: hidden;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 1.75rem;
  background: linear-gradient(180deg, #fbfcfc 0%, #f4f8f6 100%);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.empty-state-shell::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -3rem;
  height: 8rem;
  width: 8rem;
  transform: translateX(-50%);
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.14) 0%, rgba(16,185,129,0) 72%);
}

.empty-state-icon {
  position: relative;
  display: inline-flex;
  height: 4rem;
  width: 4rem;
  align-items: center;
  justify-content: center;
  border-radius: 1.5rem;
  border: 1px solid rgba(16, 185, 129, 0.14);
  background: rgba(255,255,255,0.9);
  color: #0f9f6e;
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.footer-shell {
  position: relative;
}

.footer-link {
  color: #c2ccd7;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
}

.footer-title {
  color: rgba(255,255,255,0.95);
}

@media (max-width: 767px) {
  .summary-card,
  .info-card,
  .content-shell,
  .form-panel,
  .list-panel,
  .breakdown-panel,
  .tracker-panel,
  .hero-panel {
    border-radius: 1.5rem;
  }

  .summary-value {
    font-size: 2rem;
  }

  #expense-table thead {
    display: none;
  }

  #expense-table,
  #expense-table tbody,
  #expense-table tr,
  #expense-table td {
    display: block;
    width: 100%;
  }

  #expense-table tr {
    padding: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  #expense-table tr:last-child {
    border-bottom: 0;
  }

  #expense-table .table-cell {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    text-align: left;
  }

  #expense-table .table-cell::before {
    content: attr(data-label);
    flex: 0 0 5.5rem;
    color: #6b7b8d;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  #expense-table .table-cell.text-right {
    justify-content: space-between;
    text-align: left;
  }

  #expense-table .table-cell.text-right .button-quiet {
    margin-left: auto;
  }

  .empty-state-shell {
    padding: 2rem 1.2rem;
  }
}

@media (min-width: 768px) {
  .site-menu[data-open="true"] {
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    flex-direction: row;
  }
}
