:root {
  --bg: #f4efe5;
  --bg-soft: #fffaf1;
  --ink: #0c1f2f;
  --muted: #5a6874;
  --line: rgba(12, 31, 47, 0.12);
  --card: rgba(255, 250, 241, 0.86);
  --accent: #0f766e;
  --accent-strong: #0b5c56;
  --accent-soft: #d7f3ea;
  --gold: #b7791f;
  --shadow: 0 24px 80px rgba(12, 31, 47, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(183, 121, 31, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.22), transparent 28%),
    linear-gradient(180deg, #f7f2e8 0%, #f1e7d8 100%);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(12, 31, 47, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 31, 47, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

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

.hero,
.section {
  position: relative;
  z-index: 1;
}

.topbar,
.hero-grid,
.feature-grid,
.dashboard-grid,
.insight-grid,
.pricing-grid,
.field-row,
.result-grid,
.stack-head,
.hero-metrics {
  display: grid;
  gap: 16px;
}

.topbar {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-bottom: 42px;
}

.topbar-links {
  justify-self: end;
  display: flex;
  gap: 18px;
}

.topbar a,
.brand {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: white;
}

.hero-grid,
.dashboard-grid,
.insight-grid,
.pricing-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero {
  padding: 24px 0 48px;
}

.hero-copy h1,
.section-heading h2 {
  margin: 0;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  font-family: "Instrument Serif", serif;
  font-size: clamp(3.2rem, 9vw, 6.8rem);
  max-width: 10ch;
}

.hero-text,
.section-heading p,
.feature-card p,
.panel p,
.price-card p,
.stack-summary,
label,
input,
select,
textarea {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
}

.button.primary {
  background: var(--ink);
  color: white;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  border-color: var(--line);
}

.hero-metrics {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-metrics li,
.preview-card,
.feature-card,
.panel,
.price-card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow);
}

.hero-metrics li {
  padding: 16px;
  border-radius: 18px;
}

.hero-metrics strong {
  display: block;
  font-size: 1.6rem;
}

.hero-preview {
  display: grid;
  gap: 18px;
  align-content: center;
}

.preview-card,
.feature-card,
.panel,
.price-card {
  border-radius: 28px;
  padding: 24px;
}

.card-strong {
  background: linear-gradient(180deg, rgba(12, 31, 47, 0.95), rgba(15, 118, 110, 0.92));
  color: white;
}

.card-strong p,
.card-strong li {
  color: rgba(255, 255, 255, 0.8);
}

.card-soft {
  background: linear-gradient(180deg, rgba(215, 243, 234, 0.92), rgba(255, 250, 241, 0.92));
}

.eyebrow,
.stack-label,
.pack-label,
.price-name {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-strong);
}

.section {
  padding: 28px 0;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  max-width: 12ch;
}

.feature-grid,
.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card span {
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: 700;
}

.panel-form,
.panel-result {
  min-height: 100%;
}

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

.panel-header {
  align-items: center;
  margin-bottom: 18px;
}

.panel-header h3 {
  margin: 0;
}

.status-pill {
  justify-self: end;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pill.subtle {
  background: rgba(12, 31, 47, 0.08);
  color: var(--ink);
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.74);
  font: inherit;
}

textarea {
  resize: vertical;
}

.checkbox-row {
  align-content: center;
  justify-items: start;
}

.checkbox-row input {
  width: auto;
}

.result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-sheet,
.sheet-block {
  display: grid;
  gap: 16px;
}

.sheet-block {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.mini-list,
.stack-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.stack-item {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
}

.stack-head {
  grid-template-columns: 1fr auto;
}

.stack-meta {
  font-size: 0.84rem;
  color: var(--accent-strong);
}

.history-empty {
  margin: 0;
}

.price-card.featured {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.92), rgba(12, 31, 47, 0.92));
  color: white;
}

.price-card.featured p,
.price-card.featured .price-name,
.price-card.featured h3 {
  color: white;
}

.price-card h3 {
  margin: 8px 0 10px;
  font-size: 3rem;
}

.price-card span {
  font-size: 1rem;
}

code {
  font-family: inherit;
  background: rgba(12, 31, 47, 0.08);
  padding: 2px 6px;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .hero-grid,
  .dashboard-grid,
  .insight-grid,
  .pricing-grid,
  .feature-grid,
  .field-row,
  .panel-header,
  .result-grid,
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .topbar-links {
    justify-self: start;
    flex-wrap: wrap;
  }

  .page-shell {
    width: min(100% - 20px, 1180px);
  }
}
