:root {
  color-scheme: light;
  --ink: #16130d;
  --muted: #655f52;
  --paper: #f2efe4;
  --paper-strong: #fffaf0;
  --line: rgba(22, 19, 13, 0.14);
  --copper: #b95f32;
  --copper-dark: #763719;
  --sage: #61725a;
  --blue: #263d5d;
  --gold: #e0ad4f;
  --shadow: 0 28px 80px rgba(40, 31, 18, 0.18);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at 14% 10%, rgba(224, 173, 79, 0.28), transparent 28rem),
    radial-gradient(circle at 92% 16%, rgba(97, 114, 90, 0.24), transparent 24rem),
    linear-gradient(145deg, #f7f0de 0%, #ede5d2 52%, #e9ddc5 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(22, 19, 13, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 19, 13, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 12px;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper-strong);
  background: var(--ink);
  box-shadow: 0 10px 30px rgba(22, 19, 13, 0.18);
}

.nav-links {
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a {
  text-decoration: none;
}

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

.hero,
.section-shell,
.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 40px;
  align-items: center;
  padding-top: 76px;
  padding-bottom: 72px;
}

.eyebrow,
.panel-kicker,
.card-kicker {
  margin: 0;
  color: var(--copper-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: clamp(4rem, 11vw, 9.2rem);
  line-height: 0.82;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.9;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
}

.hero-text,
.section-heading p,
.plan-grid p,
.empty-state p,
.site-footer {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 670px;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.text-button {
  border: 0;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--paper-strong);
  background: var(--ink);
  box-shadow: 0 16px 36px rgba(22, 19, 13, 0.2);
}

.button.ghost,
.button.compact {
  color: var(--ink);
  background: rgba(255, 250, 240, 0.54);
}

.button.compact {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 0.9rem;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.text-button {
  color: var(--copper-dark);
  background: transparent;
  font-weight: 700;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255, 250, 240, 0.88), rgba(246, 230, 196, 0.72)),
    radial-gradient(circle at 80% 20%, rgba(185, 95, 50, 0.2), transparent 16rem);
  box-shadow: var(--shadow);
}

.card-orbit {
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(22, 19, 13, 0.16);
  border-radius: 50%;
}

.card-orbit::before,
.card-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(22, 19, 13, 0.12);
  border-radius: 50%;
}

.card-orbit::before {
  inset: 28px;
}

.card-orbit::after {
  inset: 60px;
  background: var(--gold);
}

.scribble {
  max-width: 280px;
  margin: 18px 0 58px;
  font-family: "Instrument Serif", serif;
  font-size: 2.2rem;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.arrow-line {
  width: 150px;
  height: 2px;
  margin-bottom: 34px;
  background: var(--ink);
}

.arrow-line::after {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin-left: 138px;
  transform: translateY(-5px) rotate(45deg);
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}

.launch-bullets {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.launch-bullets li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.62);
}

.section-shell {
  padding-top: 50px;
  padding-bottom: 58px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
  gap: 22px;
  align-items: start;
}

.input-panel,
.output-panel,
.plan-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 240, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.input-panel,
.output-panel {
  padding: 24px;
}

.llm-card {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(38, 61, 93, 0.18);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.72), rgba(224, 173, 79, 0.12)),
    rgba(255, 250, 240, 0.48);
}

.llm-card:has(#use-ai-engine:checked) {
  border-color: rgba(185, 95, 50, 0.34);
  background:
    radial-gradient(circle at 92% 12%, rgba(224, 173, 79, 0.36), transparent 8rem),
    linear-gradient(145deg, rgba(255, 250, 240, 0.86), rgba(185, 95, 50, 0.16));
}

.llm-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ai-switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.58);
  cursor: pointer;
}

.switch-copy strong,
.switch-copy small {
  display: block;
}

.switch-copy strong {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 1rem;
}

.switch-copy small {
  color: var(--muted);
  line-height: 1.45;
}

.ai-switch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  display: block;
  width: 68px;
  height: 38px;
  border: 1px solid rgba(22, 19, 13, 0.18);
  border-radius: 999px;
  background: rgba(22, 19, 13, 0.14);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.switch-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper-strong);
  box-shadow: 0 8px 20px rgba(22, 19, 13, 0.22);
  transition: transform 180ms ease;
}

.ai-switch input:checked + .switch-track {
  background: var(--ink);
  box-shadow: 0 0 0 5px rgba(185, 95, 50, 0.12);
}

.ai-switch input:checked + .switch-track .switch-thumb {
  transform: translateX(30px);
  background: var(--gold);
}

.ai-switch:focus-within {
  box-shadow: 0 0 0 4px rgba(185, 95, 50, 0.14);
}

.llm-settings {
  margin-top: 10px;
  animation: reveal 260ms ease both;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

label {
  display: block;
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.inline-check input {
  width: auto;
}

.helper-text,
.status-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.status-line {
  color: var(--blue);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(255, 250, 240, 0.78);
  outline: none;
}

input,
select {
  min-height: 48px;
  padding: 0 14px;
}

.select-shell {
  position: relative;
}

.select-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 10px;
  height: 10px;
  pointer-events: none;
  transform: translateY(-62%) rotate(45deg);
  border-right: 2px solid var(--copper-dark);
  border-bottom: 2px solid var(--copper-dark);
}

.select-shell select {
  appearance: none;
  padding-right: 46px;
  border-color: rgba(185, 95, 50, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.94), rgba(224, 173, 79, 0.14)),
    rgba(255, 250, 240, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.select-shell select:hover {
  border-color: rgba(185, 95, 50, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 1), rgba(224, 173, 79, 0.22)),
    rgba(255, 250, 240, 0.9);
}

.select-shell:focus-within::after {
  border-color: var(--ink);
}

textarea {
  min-height: 360px;
  padding: 14px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(185, 95, 50, 0.52);
  box-shadow: 0 0 0 4px rgba(185, 95, 50, 0.12);
}

.output-panel {
  min-height: 700px;
}

.empty-state {
  display: grid;
  min-height: 520px;
  place-content: center;
  text-align: center;
}

.empty-mark {
  margin-bottom: 12px;
  color: var(--ink) !important;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  line-height: 0.95 !important;
  letter-spacing: -0.04em;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tab {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 250, 240, 0.56);
  cursor: pointer;
  font-weight: 700;
}

.tab.active {
  color: var(--paper-strong);
  background: var(--blue);
}

.tab-content {
  animation: reveal 320ms ease both;
}

.kit-card {
  display: grid;
  gap: 14px;
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 240, 0.68);
}

.copy-row strong {
  display: block;
  margin-bottom: 6px;
}

.copy-row p,
.copy-row pre {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.55;
}

.copy-row pre {
  font-family: "Space Grotesk", sans-serif;
}

.mini-copy {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--copper-dark);
  background: var(--paper-strong);
  cursor: pointer;
  font-weight: 700;
}

.receipt-list,
.check-list,
.faq-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.receipt-list li,
.check-list li,
.faq-list li {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 240, 0.68);
}

.receipt-list span,
.check-list span,
.faq-list span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.plan-grid article {
  padding: 24px;
}

.step-number {
  display: inline-grid;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper-strong);
  background: var(--sage);
  font-weight: 700;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  padding-bottom: 42px;
}

.site-footer p {
  margin-bottom: 0;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .hero,
  .builder-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 44px;
  }

  .hero-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .panel-header,
  .copy-row {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-links {
    display: none;
  }

  .hero,
  .section-shell,
  .site-footer {
    padding-inline: 16px;
  }

  h1 {
    font-size: clamp(3.45rem, 18vw, 5rem);
  }

  .input-panel,
  .output-panel {
    padding: 18px;
    border-radius: 24px;
  }

  .button {
    width: 100%;
  }
}
