:root {
  color-scheme: light;
  --forest-950: #10251f;
  --forest-900: #17342c;
  --forest-700: #2d6b59;
  --forest-500: #4c8e78;
  --forest-100: #dcece6;
  --stone-50: #f8f4ea;
  --stone-100: #f0e8d8;
  --stone-200: #e4dbc8;
  --stone-400: #907f65;
  --ink: #1d241d;
  --shadow: 0 22px 60px rgba(16, 37, 31, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(76, 142, 120, 0.22), transparent 30%),
    radial-gradient(circle at top right, rgba(223, 194, 132, 0.22), transparent 28%),
    linear-gradient(180deg, #f7f4ed 0%, #eee6d6 100%);
  font-family: "Instrument Sans", sans-serif;
}

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero,
.workspace,
.footnotes {
  display: grid;
  gap: 18px;
}

.hero {
  grid-template-columns: 1.3fr 0.8fr;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.panel {
  background: rgba(255, 251, 245, 0.92);
  border: 1px solid rgba(228, 219, 200, 0.92);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-card {
  border-radius: var(--radius-xl);
  padding: 28px;
}

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

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 40px;
  background:
    linear-gradient(135deg, rgba(76, 142, 120, 0.18), rgba(16, 37, 31, 0.02)),
    linear-gradient(0deg, transparent, transparent);
  transform: rotate(18deg);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--forest-100);
  color: var(--forest-700);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

h1 {
  margin-top: 18px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.94;
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0;
  color: rgba(29, 36, 29, 0.74);
  line-height: 1.65;
}

.hero-text {
  margin-top: 18px;
  max-width: 60ch;
  font-size: 1.02rem;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-notes span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(16, 37, 31, 0.05);
  color: var(--forest-900);
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(242, 235, 221, 0.96));
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--forest-900);
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.workspace {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 18px;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--forest-900);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(144, 127, 101, 0.32);
  border-radius: var(--radius-md);
  padding: 0 14px;
  background: rgba(255, 253, 249, 0.95);
  color: var(--ink);
}

input:focus,
select:focus,
button:focus {
  outline: 3px solid rgba(45, 107, 89, 0.18);
  border-color: var(--forest-700);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.primary-button,
.ghost-button {
  min-height: 52px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  border: none;
  color: white;
  background: linear-gradient(135deg, var(--forest-900), var(--forest-700));
  box-shadow: 0 16px 30px rgba(23, 52, 44, 0.22);
}

.ghost-button {
  border: 1px solid rgba(16, 37, 31, 0.12);
  background: rgba(255, 251, 245, 0.9);
  color: var(--forest-900);
}

.results-list {
  display: grid;
  gap: 12px;
}

.result-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(250, 247, 240, 0.92), rgba(240, 233, 218, 0.92));
  border: 1px solid rgba(228, 219, 200, 0.95);
}

.result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.result-name {
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  color: var(--forest-900);
}

.result-score {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--forest-700);
}

.result-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(16, 37, 31, 0.08);
  overflow: hidden;
  margin: 12px 0 10px;
}

.result-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest-500), var(--forest-900));
}

.result-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.result-reasons span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(76, 142, 120, 0.12);
  color: var(--forest-900);
  font-size: 0.84rem;
  font-weight: 600;
}

.empty-state {
  padding: 24px;
  border: 1px dashed rgba(144, 127, 101, 0.4);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.8);
  color: rgba(29, 36, 29, 0.72);
}

.footnotes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.info-card {
  min-height: 160px;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

@media (max-width: 960px) {
  .hero,
  .workspace,
  .footnotes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1160px);
    padding-top: 20px;
  }

  .hero-copy,
  .hero-card,
  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}
