:root {
  --bg: #f2efe8;
  --panel: #fffdf8;
  --panel-strong: #f7f1e3;
  --ink: #14213d;
  --muted: #5b6475;
  --line: #d9d2c4;
  --brand: #c05621;
  --brand-deep: #8f3b15;
  --accent: #2f855a;
  --danger: #b83280;
  --shadow: 0 18px 50px rgba(20, 33, 61, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Instrument Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(192, 86, 33, 0.1), transparent 28%),
    linear-gradient(180deg, #f8f4ec 0%, #f2efe8 100%);
}

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

code {
  font-family: monospace;
  background: rgba(20, 33, 61, 0.06);
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
}

.topbar,
.app-topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: inline-flex;
  width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 120ms ease, opacity 120ms ease, border-color 120ms ease;
}

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

.button-primary {
  background: var(--brand);
  color: #fff;
}

.button-secondary {
  background: var(--panel);
  border-color: var(--line);
}

.button-danger {
  background: rgba(184, 50, 128, 0.08);
  color: var(--danger);
}

.button-small {
  padding: 0.45rem 0.75rem;
  border-radius: 0.7rem;
}

.button-block {
  width: 100%;
}

.landing-shell main,
.app-layout,
.auth-card {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem;
}

.hero-panel,
.pricing-panel,
.panel,
.auth-card,
.feature-strip article {
  background: rgba(255, 253, 248, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(217, 210, 196, 0.8);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 2rem;
  margin-top: 2rem;
}

.hero-copy h1,
.hero-summary h1,
.auth-card h1,
.section-heading h2,
.pricing-panel h2 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
  margin: 0;
}

.hero-copy h1,
.hero-summary h1 {
  font-size: clamp(2.25rem, 5vw, 4.2rem);
  line-height: 0.95;
  max-width: 12ch;
}

.hero-text,
.pricing-panel p,
.section-heading p,
.auth-card p,
.app-subtitle {
  color: var(--muted);
}

.eyebrow {
  color: var(--brand-deep);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-actions,
.action-row,
.app-topbar-actions,
.card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-subtext,
.muted-center,
.table-muted,
.meta-row {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-card,
.pricing-card {
  background: linear-gradient(160deg, var(--ink), #22345e);
  color: #fff;
  padding: 1.3rem;
  border-radius: 1.5rem;
}

.mock-header {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.mock-header span {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

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

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

.metric {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1rem;
}

.metric span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

.metric strong {
  font-size: 1.8rem;
  font-family: "Space Grotesk", sans-serif;
}

.breakdown-list {
  margin-top: 1rem;
}

.breakdown-list div {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.feature-strip,
.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.feature-strip article,
.panel,
.auth-card {
  border-radius: 1.5rem;
  padding: 1.25rem;
}

.pricing-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.4rem;
  border-radius: 2rem;
}

.pricing-card ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  line-height: 1.8;
}

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

.auth-card {
  width: min(100%, 480px);
}

.back-link {
  color: var(--muted);
  display: inline-block;
  margin-bottom: 1rem;
}

.stack-form,
.section-heading {
  display: grid;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.85rem 0.95rem;
  font: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

.message {
  border-radius: 1rem;
  padding: 0.9rem 1rem;
}

.message-error {
  background: rgba(184, 50, 128, 0.08);
  color: var(--danger);
}

.message-success {
  background: rgba(47, 133, 90, 0.1);
  color: var(--accent);
}

.app-layout {
  display: grid;
  gap: 1rem;
}

.hero-summary {
  padding: 1.4rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.9rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.card-list {
  display: grid;
  gap: 0.75rem;
}

.list-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  background: var(--panel-strong);
  border-radius: 1rem;
  padding: 1rem;
}

.list-card h3 {
  margin: 0 0 0.3rem;
}

.empty-state,
.empty-block {
  color: var(--muted);
  text-align: center;
  padding: 1rem;
}

.pill {
  display: inline-flex;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  text-transform: capitalize;
}

.pill-income {
  background: rgba(47, 133, 90, 0.12);
  color: var(--accent);
}

.pill-expense {
  background: rgba(192, 86, 33, 0.12);
  color: var(--brand-deep);
}

.table-actions {
  white-space: nowrap;
}

.session-name {
  color: var(--muted);
  font-weight: 600;
}

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

@media (max-width: 980px) {
  .hero-panel,
  .pricing-panel,
  .panel-grid,
  .feature-strip,
  .metric-grid,
  .app-metrics,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar,
  .app-topbar,
  .list-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .topnav {
    width: 100%;
    flex-wrap: wrap;
  }
}
