:root {
  --bg: #f4f1eb;
  --paper: #fbfaf7;
  --ink: #1c1917;
  --muted: #6f6b64;
  --faint: #9a958c;
  --line: #e6e1d8;
  --accent: #2c6e62;
  --danger: #b42318;
  --warn: #9a6700;
  --good: #2c6e62;
  --radius: 2px;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", "Segoe UI", system-ui, sans-serif;
  --max: 1040px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
  font-size: 16px;
}

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
img { max-width: 100%; }

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  text-transform: uppercase;
}
.mark:hover { text-decoration: none; color: var(--ink); }
.mark svg { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary:hover { background: transparent; color: var(--ink); }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { background: transparent; color: var(--accent); text-decoration: underline; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
}
.pill.ok { color: var(--good); border-color: #c9ddd6; }
.pill.warn { color: var(--warn); border-color: #ead9a8; }
.pill.err { color: var(--danger); border-color: #f0c9c5; }
.pill.accent { color: var(--accent); border-color: #c9ddd6; }

.public-nav, .public-foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.public-nav { border-bottom: 1px solid var(--line); }
.public-foot { border-top: 1px solid var(--line); margin-top: 3rem; }
.public-nav .links, .public-foot .links {
  display: flex;
  gap: 1.35rem;
  align-items: center;
  font-size: 0.92rem;
}
.public-nav .links a, .public-foot .links a {
  color: var(--muted);
  text-decoration: none;
}
.public-nav .links a.active,
.public-nav .links a:hover,
.public-foot .links a:hover {
  color: var(--ink);
}

.hero, .section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.2rem 1.5rem 2.4rem;
}
.hero { padding-top: 5.5rem; padding-bottom: 4rem; }
.kicker {
  color: var(--accent);
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
h1, h2, .display {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 1rem;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); max-width: 11ch; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); max-width: 22ch; }
h3 { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; margin: 0 0 0.4rem; }
.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 1.8rem;
  line-height: 1.6;
}

.grid-3, .grid-2, .stats {
  display: grid;
  gap: 1.5rem 2.2rem;
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem 1rem; }

.card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 1.15rem 0 0;
  box-shadow: none;
}
.card p { margin: 0; color: var(--muted); }
.value {
  font-family: var(--display);
  font-size: 2.1rem;
  font-weight: 500;
  margin: 0.15rem 0 0.2rem;
  letter-spacing: -0.03em;
}
.label {
  color: var(--faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.step { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.step .num {
  font-family: var(--display);
  color: var(--faint);
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
}

.strip { background: transparent; }

.price-card {
  max-width: 28rem;
  border-top: 1px solid var(--ink);
  padding-top: 1.4rem;
}
.price-card .amount {
  font-family: var(--display);
  font-size: 3.4rem;
  font-weight: 500;
  line-height: 1;
  margin: 0.2rem 0 0.4rem;
  letter-spacing: -0.04em;
}
.price-card .amount span {
  font-size: 1rem;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0;
}
.price-card ul {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.price-card li {
  margin: 0;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}
.price-split {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2rem;
}
.price-split .amount { font-size: 2.8rem; }

.login-wrap {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  padding: 3rem 1.25rem;
}
.login-card {
  width: min(400px, 100%);
  border-top: 1px solid var(--ink);
  padding-top: 1.5rem;
}
label { display: block; font-size: 0.78rem; color: var(--muted); margin: 0.95rem 0 0.3rem; letter-spacing: 0.04em; }
input[type="email"], input[type="password"], input[type="text"], select {
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.55rem 0;
  font: inherit;
}
input:focus, select:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
.form-error {
  color: var(--danger);
  padding: 0.4rem 0;
  font-size: 0.9rem;
}
.check { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; color: var(--muted); font-size: 0.9rem; }
.stack label:first-of-type { margin-top: 0; }

.app-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side {
  border-right: 1px solid var(--line);
  padding: 1.4rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.side nav { margin-top: 1.6rem; display: flex; flex-direction: column; gap: 0.1rem; }
.side nav a {
  display: block;
  color: var(--muted);
  padding: 0.4rem 0;
  text-decoration: none;
  font-size: 0.95rem;
}
.side nav a:hover, .side nav a.active {
  color: var(--ink);
  text-decoration: none;
}
.side .grow { flex: 1; }
.side .who { font-size: 0.75rem; color: var(--faint); padding: 0.8rem 0 0.4rem; line-height: 1.45; }
.main {
  background: var(--paper);
  padding: 2.2rem 2.4rem 3.5rem;
  min-width: 0;
}
.main-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.2rem;
  margin-bottom: 2.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}
.main-head h2 { margin-bottom: 0.35rem; }
.banner {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 0 0 1rem;
  margin-bottom: 1.4rem;
  font-size: 0.88rem;
}

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.75rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  color: var(--faint);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.details pre {
  background: var(--bg);
  border: 0;
  padding: 0.8rem 0;
  overflow: auto;
  max-height: 280px;
  color: var(--muted);
  font-size: 0.8rem;
}

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.85rem; }

.panel {
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  margin-bottom: 1.4rem;
}

@media (max-width: 840px) {
  .app-shell { grid-template-columns: 1fr; }
  .side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.2rem;
  }
  .side nav { margin: 0; flex-direction: row; flex-wrap: wrap; gap: 0.8rem 1.1rem; }
  .side .grow, .side .who { display: none; }
  .main { padding: 1.4rem 1.2rem 2.5rem; }
  .main-head { flex-direction: column; align-items: flex-start; }
  h1 { max-width: none; }
  .hero { padding-top: 3rem; }
  .public-nav .links .hide-sm { display: none; }
}
