@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --bg-top: #f4ecd8;
  --bg-bottom: #e7ddd0;
  --panel: rgba(255, 249, 239, 0.84);
  --panel-strong: #fffaf3;
  --ink: #17251f;
  --muted: #62716b;
  --forest: #24463d;
  --amber: #a4602f;
  --brick: #a13f32;
  --sea: #2f6a72;
  --line: rgba(23, 37, 31, 0.12);
  --line-strong: rgba(23, 37, 31, 0.18);
  --shadow: 0 24px 60px rgba(28, 34, 31, 0.08);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(47, 106, 114, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(161, 63, 50, 0.14), transparent 24%),
    linear-gradient(180deg, var(--bg-top) 0%, #f0e8dc 48%, var(--bg-bottom) 100%);
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(36, 70, 61, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 70, 61, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.46), transparent 82%);
}

.page-shell {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero-panel,
.cards-panel,
.insight-panel,
.product-card,
.meta-card,
.field-card,
.helper-panel,
.insight-block {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 26px;
  padding: 34px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero-panel::after {
  position: absolute;
  inset: auto -10% -48% auto;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(164, 96, 47, 0.2), transparent 70%);
  content: "";
}

.hero-kicker,
.section-kicker,
.product-card__eyebrow {
  margin: 0 0 12px;
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--forest);
}

.hero-panel h1,
.cards-header h2,
.insight-block h3,
.product-card__title,
.subsection__head h4 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero-panel h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 5vw, 5.2rem);
  line-height: 0.94;
}

.hero-text,
.cards-note,
.product-card__intro,
.subsection__note,
.meta-card p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.meta-card {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
}

.meta-card span {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.meta-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.55rem;
  line-height: 1.1;
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 360px;
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.cards-panel,
.insight-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.cards-panel {
  min-height: 60vh;
}

.cards-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.cards-header h2 {
  font-size: clamp(2.2rem, 3vw, 3rem);
}

.ghost-button,
.icon-button,
.link-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
}

.ghost-button {
  color: var(--panel-strong);
  background: linear-gradient(135deg, var(--forest), #10231e);
}

.cards-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}

.product-card {
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 250, 241, 0.88));
}

.product-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.product-card__title {
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1;
}

.remove-button {
  background: rgba(161, 63, 50, 0.12);
  color: var(--brick);
}

.remove-button[disabled] {
  opacity: 0.42;
  cursor: default;
}

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

.field-grid--compact {
  margin-top: 0;
}

.field-card,
.helper-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.field-card--wide,
.helper-panel {
  grid-column: span 2;
}

.field-card span {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--muted);
}

.field-card input {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
}

.field-card input:focus {
  outline: none;
  border-color: rgba(47, 106, 114, 0.44);
  box-shadow: 0 0 0 4px rgba(47, 106, 114, 0.12);
}

.field-card small,
.helper-content,
.subsection__note,
.summary-item p {
  color: var(--muted);
  line-height: 1.58;
}

.link-button {
  align-self: flex-start;
  padding: 0;
  background: none;
  color: var(--sea);
  font-weight: 800;
}

.helper-content {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.subsection {
  margin-top: 22px;
}

.subsection__head {
  margin-bottom: 14px;
}

.subsection__head h4 {
  font-size: 1.8rem;
}

.status-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.status-chip--muted {
  background: rgba(23, 37, 31, 0.08);
  color: var(--muted);
}

.status-chip--good {
  background: rgba(36, 70, 61, 0.14);
  color: var(--forest);
}

.status-chip--warn {
  background: rgba(164, 96, 47, 0.14);
  color: var(--amber);
}

.status-chip--danger {
  background: rgba(161, 63, 50, 0.14);
  color: var(--brick);
}

.insight-panel {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insight-block {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.insight-block h3 {
  font-size: 2rem;
}

.insight-block--accent {
  background:
    linear-gradient(180deg, rgba(36, 70, 61, 0.1), rgba(255, 255, 255, 0.76));
}

.plain-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.summary-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.summary-item strong {
  display: block;
  font-size: 1rem;
}

.summary-item p {
  margin: 8px 0 0;
}

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

.step-chip {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.step-chip--active {
  background: linear-gradient(135deg, var(--forest), #10231e);
  color: var(--panel-strong);
  border-color: transparent;
}

.step-chip--done {
  background: rgba(36, 70, 61, 0.14);
  color: var(--forest);
}

.step-chip--open {
  color: var(--ink);
}

.step-chip--locked {
  opacity: 0.42;
}

.flow-step[hidden] {
  display: none;
}

.step-copy,
.result-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

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

.secondary-button {
  background: rgba(23, 37, 31, 0.08);
  color: var(--ink);
}

.result-board {
  padding: 20px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(36, 70, 61, 0.12), rgba(255, 255, 255, 0.74));
  border: 1px solid var(--line);
}

.result-figure {
  margin-top: 10px;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
}

.result-grid {
  margin-top: 18px;
}

.result-breakdown p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.58;
}

.cards-note code,
.field-card small code,
.plain-list code {
  padding: 0 4px;
  border-radius: 6px;
  background: rgba(23, 37, 31, 0.08);
  color: var(--forest);
}

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

  .insight-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 20px, 1480px);
    padding-top: 14px;
  }

  .hero-panel,
  .cards-panel,
  .insight-panel,
  .product-card {
    padding: 18px;
  }

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

  .field-card--wide,
  .helper-panel {
    grid-column: auto;
  }

  .cards-header,
  .product-card__head {
    flex-direction: column;
    align-items: stretch;
  }

  .ghost-button,
  .icon-button,
  .step-chip {
    width: 100%;
  }
}
