:root {
  --ink: #221d0d;
  --muted: #6b6354;
  --line: #ece7d6;
  --bg: #ffffff;
  --soft: #fdfaef;
  --accent: #f5c518;
  --accent-dark: #d9ab08;
  /* Yellow is too light to read as text on white; use this where accent was a color. */
  --accent-ink: #8a6100;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- header --- */
header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--ink);
}

.logo span { color: var(--accent-ink); }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.nav-links a:hover { color: var(--ink); }

/* `.nav-links a` outranks `.btn`, which would leave the button label muted. */
.nav-links a.btn,
.nav-links a.btn:hover { color: var(--ink); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover { background: var(--accent-dark); }

.btn:disabled { opacity: .55; cursor: default; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.btn-ghost:hover { background: var(--soft); color: var(--ink); }

.nav .btn { padding: 9px 18px; }

/* --- hero --- */
.hero {
  padding: 88px 0 72px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  background: var(--soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

h1 {
  font-size: 52px;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 0 0 20px;
  font-weight: 700;
}

.lede {
  font-size: 20px;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 36px;
}

.hero-note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
}

/* --- sections --- */
section { padding: 72px 0; }

.alt { background: var(--soft); }

h2 {
  font-size: 32px;
  letter-spacing: -.02em;
  margin: 0 0 12px;
  font-weight: 700;
}

.sub {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 44px;
  max-width: 620px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
}

.card h3 {
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 650;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.icon {
  font-size: 24px;
  display: block;
  margin-bottom: 14px;
}

/* --- steps --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step h3 {
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 650;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

/* --- cta --- */
.cta { text-align: center; }

.cta form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 32px auto 0;
}

.cta form input[type="email"] { flex: 1; }

.fineprint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
}

/* --- form controls --- */
input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

textarea { resize: vertical; min-height: 88px; line-height: 1.5; }

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field { margin-bottom: 18px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.check input { margin: 5px 0 0; width: auto; accent-color: var(--accent); }

.check label { margin: 0; font-weight: 500; }

.check label small { display: block; color: var(--muted); font-weight: 400; }

/* --- messages --- */
.msg {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 18px;
}

.msg-error { background: #fdeceb; color: #96291d; }
.msg-ok { background: #eaf5ee; color: #1c6b42; }
.msg-warn { background: #fff6e5; color: #8a5a00; }

.msg:empty { display: none; }

/* --- auth page --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px;
}

.auth-card h1 { font-size: 26px; margin: 0 0 6px; }

.auth-card .sub { font-size: 15px; margin-bottom: 26px; }

.auth-card .btn { width: 100%; }

.tabs {
  display: flex;
  gap: 4px;
  background: var(--soft);
  border-radius: 9px;
  padding: 4px;
  margin-bottom: 26px;
}

.tabs button {
  flex: 1;
  padding: 9px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.07);
}

.auth-foot {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 22px;
}

.auth-foot a { color: var(--accent-ink); }

/* --- dashboard --- */
.dash { padding: 44px 0 80px; }

.dash-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.dash h1 { font-size: 30px; margin: 0; }

.dash-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 32px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
}

.panel h2 { font-size: 19px; margin: 0 0 4px; }

.panel .sub { font-size: 14px; margin-bottom: 22px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat {
  background: var(--soft);
  border-radius: 10px;
  padding: 16px;
}

.stat b { display: block; font-size: 24px; line-height: 1.2; }

.stat span { font-size: 13px; color: var(--muted); }

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 26px 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.user-chip {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 14px;
}

/* --- footer --- */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 780px) {
  h1 { font-size: 36px; }
  .lede { font-size: 18px; }
  .grid, .steps, .dash-layout, .field-row { grid-template-columns: 1fr; }
  /* Drop the in-page section links, but never the way to sign in. */
  .nav-links a[href^="#"] { display: none; }
  .nav-links { gap: 16px; }
  .cta form { flex-direction: column; }
  .hero { padding: 56px 0 48px; }
  .stat-row { grid-template-columns: 1fr; }
}
