:root {
  --bg: #f7f2ea;
  --paper: #fffdf8;
  --ink: #20211f;
  --muted: #756c62;
  --soft: #e4d8c9;
  --accent: #2f6058;
  --accent-soft: #dce9df;
  --gold: #b5853c;
  --red: #9d3838;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(181, 133, 60, .12), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(47, 96, 88, .12), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 76px;
}

.intro { margin-bottom: 24px; max-width: 820px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.intro h1 {
  margin: 0;
  font-size: clamp(40px, 8vw, 86px);
  line-height: .9;
  letter-spacing: -.06em;
}
.intro p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.45;
}

.panel,
.report-card,
.path-card,
.karma-card {
  background: rgba(255, 253, 248, .94);
  border: 1px solid var(--soft);
  border-radius: 28px;
  box-shadow: 0 18px 48px rgba(47, 38, 26, .07);
}

.form-panel { padding: 14px; margin-bottom: 18px; }
form { display: grid; gap: 12px; }
.primary-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 750; }
.birthdate-field span { color: var(--ink); }
input,
textarea {
  width: 100%;
  border: 1px solid var(--soft);
  border-radius: 18px;
  background: #fffaf2;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 14px 15px;
}
input:focus,
textarea:focus {
  outline: 2px solid rgba(47, 96, 88, .18);
  border-color: var(--accent);
}
button {
  border: 0;
  border-radius: 18px;
  background: var(--ink);
  color: #fffdf8;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  min-height: 52px;
  padding: 0 22px;
}
button[disabled] { opacity: .55; cursor: wait; }

.options {
  border-top: 1px solid rgba(228, 216, 201, .7);
  padding-top: 4px;
}
summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  list-style-position: outside;
}
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 12px;
}
.wide { grid-column: 1 / -1; }
.option-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
textarea { resize: vertical; }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check input { width: auto; }
.status { display: none; }

.error {
  margin: 14px 0;
  border: 1px solid #e2a8a8;
  background: #fff3f0;
  color: #812d2d;
  padding: 13px 15px;
  border-radius: 18px;
}
.hidden { display: none !important; }

#results { margin-top: 18px; }
.report-card { padding: clamp(22px, 4vw, 42px); }
.meta-line {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}
.hero-card {
  min-height: 170px;
  border: 1px solid var(--soft);
  border-radius: 26px;
  background: linear-gradient(135deg, #fffaf2, #f5ecde);
  padding: 22px;
  display: grid;
  align-content: space-between;
}
.hero-card span,
.karma-card span,
.path-topline span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero-card strong {
  display: block;
  font-size: clamp(48px, 8vw, 72px);
  line-height: 1;
  letter-spacing: -.05em;
}
.hero-card em,
.karma-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 750;
}
.red { color: var(--red); }
.black { color: var(--ink); }

.section-block { margin-top: 32px; }
.ai-section {
  margin: 0 0 30px;
  border: 1px solid rgba(47, 96, 88, .24);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(220, 233, 223, .78), rgba(255, 250, 242, .92));
  padding: clamp(18px, 3vw, 26px);
}
.compact-heading { margin-bottom: 10px; }
.ai-status {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
}
.ai-text {
  display: grid;
  gap: 12px;
  color: #2f332f;
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.62;
}
.ai-text p { margin: 0; }
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3.6vw, 38px);
  line-height: 1.05;
  letter-spacing: -.04em;
}
.section-heading .eyebrow { margin-bottom: 6px; }

.life-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.path-card {
  min-height: 290px;
  padding: 16px;
  box-shadow: none;
  display: grid;
  align-content: start;
  gap: 11px;
}
.path-topline {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.path-topline em {
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}
.path-card-main {
  font-size: clamp(38px, 5vw, 54px);
  line-height: 1;
  letter-spacing: -.05em;
  font-weight: 900;
}
.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.keyword-row span,
.chip {
  border: 1px solid var(--soft);
  border-radius: 999px;
  background: #fffaf2;
  color: #4f473e;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 8px;
}
.path-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.path-card p,
.karma-card p {
  margin: 0;
  color: #504941;
  font-size: 13px;
  line-height: 1.5;
}
.mini-detail { border-top: 1px solid rgba(228, 216, 201, .72); padding-top: 8px; }
.mini-detail p { margin-top: 8px; }

.karma-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.karma-card {
  padding: 22px;
  box-shadow: none;
  display: grid;
  gap: 10px;
}
.karma-card strong {
  font-size: clamp(44px, 7vw, 68px);
  line-height: 1;
  letter-spacing: -.05em;
}
.karma-card small { color: var(--muted); font-weight: 750; }

.proof {
  margin-top: 26px;
  border-top: 1px solid var(--soft);
  padding-top: 16px;
}
.meaning-key {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}
.key-group h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip strong { margin-right: 6px; color: var(--ink); }
.text-pre,
.json-pre {
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #20211f;
  color: #fffaf2;
  border-radius: 18px;
  padding: 16px;
  font-size: 12px;
  line-height: 1.45;
}
.text-pre { background: #2f6058; }

@media (max-width: 720px) {
  .shell { width: min(100% - 22px, 760px); padding-top: 34px; }
  .primary-row,
  .options-grid,
  .hero-cards,
  .karma-grid { grid-template-columns: 1fr; }
  button { width: 100%; }
  .life-grid { grid-template-columns: 1fr; }
  .path-card { min-height: auto; }
  .section-heading { display: block; }
}
