:root {
  color: #23213f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { background: #f7f0e3; margin: 0; min-height: 100vh; }
a { color: inherit; }
.site-header { align-items: center; display: flex; justify-content: space-between; margin: 0 auto; max-width: 1120px; padding: 20px 24px; }
.brand { align-items: center; display: inline-flex; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 700; gap: 10px; text-decoration: none; }
.preview-badge { background: #e9dec9; border-radius: 99px; color: #5a3e66; font-size: .75rem; font-weight: 800; letter-spacing: .06em; padding: 7px 11px; text-transform: uppercase; }
main { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); margin: 0 auto; max-width: 1120px; padding: 34px 24px 72px; }
.hero, .demo-panel { border: 1px solid rgba(90, 62, 102, .14); border-radius: 28px; box-shadow: 0 22px 64px rgba(35, 33, 63, .08); }
.hero { background: linear-gradient(145deg, #fffdf8, #f0e6d5); min-height: 610px; overflow: hidden; padding: clamp(38px, 7vw, 84px); position: relative; }
.hero::after { background: radial-gradient(circle, rgba(216, 168, 79, .2), transparent 68%); content: ""; height: 360px; position: absolute; right: -160px; top: -130px; width: 360px; }
.stars { color: #d8a84f; font-size: 1.1rem; letter-spacing: .25em; margin-bottom: 26px; }
.eyebrow { color: #5a3e66; font-size: .75rem; font-weight: 850; letter-spacing: .14em; margin: 0 0 12px; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 7vw, 4.9rem); letter-spacing: -.04em; line-height: 1.02; margin: 0; max-width: 10ch; }
.lede { color: #5a3e66; font-size: 1.15rem; margin: 20px 0 40px; }
.card-preview { background: #23213f; border: 1px solid rgba(216, 168, 79, .5); border-radius: 22px; color: #f7f0e3; max-width: 440px; padding: 30px; }
.card-preview .moon { color: #d8a84f; font-size: 2rem; }
.card-preview h2 { font-size: 1.65rem; margin: 12px 0 8px; }
.card-preview p { color: #dcd2df; line-height: 1.65; margin: 0; }
.demo-panel { align-self: start; background: #fffdf8; padding: 30px; }
.demo-panel h2 { font-size: 1.8rem; line-height: 1.15; margin: 0 0 12px; }
.demo-panel > p { color: #5a3e66; line-height: 1.6; }
.demo-links { display: grid; gap: 10px; margin: 24px 0 30px; }
.demo-links a { border: 1px solid #cbbda6; border-radius: 12px; font-weight: 750; min-height: 46px; padding: 11px 13px; text-decoration: none; }
.demo-links a:hover { background: #f7f0e3; border-color: #d8a84f; }
.demo-links .debug-link { background: #2d1f36; border-color: #2d1f36; color: #fffdf8; }
.demo-links .debug-link:hover { background: #5a3e66; border-color: #d8a84f; }
.prefill-label { display: block; font-size: .82rem; font-weight: 800; margin-bottom: 7px; }
#demo-phone { border: 2px solid #cbbda6; border-radius: 12px; color: #23213f; font: inherit; min-height: 48px; padding: 10px 12px; width: 100%; }
.field-note { font-size: .8rem; margin-bottom: 0; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #d8a84f; outline-offset: 3px; }
footer { display: flex; gap: 22px; justify-content: center; padding: 0 24px 32px; }
footer { flex-wrap: wrap; }
footer a, footer button {
  min-height: 44px; min-width: 44px; display: inline-flex; align-items: center;
  border: 0; padding: 0; background: transparent; color: inherit;
  font: inherit; font-size: .88rem; font-weight: 700; text-decoration: underline;
  cursor: pointer;
}
.debug-evidence { background: #fffdf8; border: 1px solid rgba(90, 62, 102, .18); border-radius: 28px; box-shadow: 0 22px 64px rgba(35, 33, 63, .08); grid-column: 1 / -1; padding: 30px; }
.debug-evidence[hidden] { display: none; }
.debug-heading { align-items: start; display: flex; gap: 20px; justify-content: space-between; }
.debug-heading h2 { font-size: 1.8rem; margin: 0; }
.debug-status { background: #eee5f0; border-radius: 999px; color: #4a2754; font-size: .75rem; font-weight: 850; padding: 8px 12px; }
.debug-status[data-state="complete"] { background: #d9f0df; color: #185c2c; }
.debug-status[data-state="error"] { background: #f8dddd; color: #8b2020; }
.debug-note { color: #5a3e66; line-height: 1.6; max-width: 80ch; }
#debug-video { background: #171322; border-radius: 18px; display: block; margin: 24px auto; max-height: 480px; max-width: 640px; width: 100%; }
#debug-video[hidden] { display: none; }
.artifact-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 24px; }
.artifact-link { background: #f7f0e3; border: 1px solid #d6c7af; border-radius: 14px; display: grid; gap: 4px; padding: 14px; text-decoration: none; }
.artifact-link:hover { border-color: #d8a84f; }
.artifact-link strong { font-size: .85rem; overflow-wrap: anywhere; }
.artifact-link span { color: #6a5d72; font-size: .72rem; }
#debug-manifest-panel { border-top: 1px solid #e1d7c7; margin-top: 24px; padding-top: 18px; }
#debug-manifest-panel summary { cursor: pointer; font-weight: 800; }
#debug-manifest { background: #171322; border-radius: 14px; color: #e8dfeb; font-size: .74rem; line-height: 1.55; max-height: 420px; overflow: auto; padding: 18px; white-space: pre-wrap; word-break: break-word; }

@media (max-width: 820px) {
  main { grid-template-columns: 1fr; padding-top: 12px; }
  .hero { min-height: auto; }
}

@media (max-width: 480px) {
  .site-header { padding: 15px 18px; }
  .preview-badge { font-size: .64rem; }
  main { padding: 8px 14px 54px; }
  .hero, .demo-panel { border-radius: 22px; }
  .hero { padding: 34px 25px; }
  .demo-panel { padding: 25px 20px; }
  .debug-evidence { border-radius: 22px; padding: 25px 20px; }
  .debug-heading { align-items: stretch; flex-direction: column; }
  .debug-status { align-self: flex-start; }
}
