:root {
  color-scheme: light;
  --bg: #f6f2ea;
  --paper: #fffaf2;
  --ink: #161411;
  --muted: #645d52;
  --line: #ded3c2;
  --accent: #b63d25;
  --accent-dark: #812819;
  --navy: #172033;
  --gold: #d99a2b;
  --green: #226b51;
  --shadow: 0 24px 70px rgba(23, 32, 51, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(217, 154, 43, 0.18), transparent 34rem),
    linear-gradient(180deg, #fbf7ef 0%, var(--bg) 42%, #efe7d9 100%);
  color: var(--ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  background: rgba(255, 250, 242, 0.86);
  border-bottom: 1px solid rgba(222, 211, 194, 0.7);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.8rem;
  color: white;
  background: var(--navy);
  font-weight: 900;
  letter-spacing: -0.06em;
}
.brand small { display: block; color: var(--muted); font-size: 0.78rem; }
nav { display: flex; gap: 1rem; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-weight: 700; }
nav a:hover { color: var(--accent); }

.section-pad { padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 4rem); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  min-height: 72vh;
}
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.045em; }
h1 { font-size: clamp(3rem, 8vw, 6.8rem); max-width: 10ch; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: 1.25rem; }
.lede {
  max-width: 68ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.6;
}
.hero-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.5rem; }
.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: 0.45; transform: none; box-shadow: none; }
.button-primary { color: white; background: var(--accent); box-shadow: 0 14px 34px rgba(182, 61, 37, 0.25); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary, .button-copy { color: var(--navy); background: #ece2d2; }
.button-copy.copied { color: white; background: var(--green); }
.full { width: 100%; margin-bottom: 1rem; }

.trust-card, .output-card, .example-card, .prompt-form {
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: rgba(255, 250, 242, 0.88);
  box-shadow: var(--shadow);
}
.trust-card { padding: 1.4rem; }
.trust-card h2 { font-size: 1.35rem; }
ul { padding-left: 1.2rem; }
li { margin: 0.45rem 0; color: var(--muted); }

.section-heading { max-width: 820px; margin-bottom: 1.4rem; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.flow-card {
  min-height: 9rem;
  padding: 1.1rem;
  text-align: left;
  color: inherit;
  background: rgba(255, 250, 242, 0.72);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  cursor: pointer;
}
.flow-card strong { display: block; margin-bottom: 0.5rem; font-size: 1.05rem; }
.flow-card span { color: var(--muted); line-height: 1.45; }
.flow-card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 2px rgba(182, 61, 37, 0.2); }

.builder-shell { background: rgba(23, 32, 51, 0.035); }
.prompt-form { padding: clamp(1rem, 3vw, 2rem); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.field { display: grid; gap: 0.45rem; }
.field-wide { grid-column: 1 / -1; }
.field span, legend { color: var(--navy); font-weight: 900; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.85rem 0.95rem;
  background: white;
  color: var(--ink);
  font: inherit;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(217, 154, 43, 0.35);
  border-color: var(--gold);
}
.safeguards {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 0.7rem;
  border: 1px dashed var(--line);
  border-radius: 1rem;
  padding: 1rem;
}
.safeguards legend { padding: 0 0.35rem; }
.safeguards label { color: var(--muted); font-weight: 700; }

.output-shell { padding-top: 2rem; }
.output-card { padding: clamp(1rem, 3vw, 2rem); }
.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.prompt-output {
  min-height: 18rem;
  margin: 0;
  padding: 1.1rem;
  overflow: auto;
  white-space: pre-wrap;
  color: #f7efe3;
  background: #151b29;
  border-radius: 1rem;
  line-height: 1.55;
  font-size: 0.94rem;
}
.prompt-output.small { min-height: 19rem; }
.prompt-output.tiny { min-height: 8rem; background: #fffdf8; color: var(--ink); border: 1px solid var(--line); }
.enhance-explanation { margin-top: 1rem; }
.enhance-explanation h4 { margin: 0 0 0.6rem; color: var(--navy); font-size: 1rem; }
.strategy-grid, .enhance-grid, .example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.strategy-grid article {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fffdf8;
}
.strategy-grid p { color: var(--muted); line-height: 1.55; }
.enhance-grid { align-items: start; }
.compact { box-shadow: none; }
.example-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.example-card { padding: 1.2rem; box-shadow: none; }
.example-card p { color: var(--muted); line-height: 1.55; }
.site-footer {
  padding: 2rem clamp(1rem, 4vw, 4rem);
  color: #f3eadc;
  background: var(--navy);
}
.site-footer p { max-width: 850px; margin: 0; line-height: 1.55; }

@media (max-width: 900px) {
  .hero, .enhance-grid, .strategy-grid { grid-template-columns: 1fr; }
  .flow-grid, .example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { max-width: 12ch; }
}

@media (max-width: 640px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  nav { font-size: 0.92rem; }
  .section-pad { padding-left: 1rem; padding-right: 1rem; }
  .form-grid, .flow-grid, .example-grid, .safeguards { grid-template-columns: 1fr; }
  .output-header { align-items: stretch; flex-direction: column; }
  .button { width: 100%; text-align: center; }
  h1 { font-size: 3.1rem; }
}
