:root {
  --bg-top: #f8f3ec;
  --bg-mid: #f1ede8;
  --bg-bottom: #eef3fa;
  --surface: rgba(255, 255, 255, 0.88);
  --text: #182132;
  --muted: #5f6878;
  --navy: #0f2747;
  --navy-soft: #17355f;
  --red: #9e2a2b;
  --red-deep: #6f141d;
  --red-mid: #8d1f2a;
  --gold: #d9c7a2;
  --gold-strong: #b6925b;
  --paper: #fffaf3;
  --paper-soft: #f7f1e7;
  --shadow-lg: 0 28px 70px rgba(15, 39, 71, 0.12);
  --shadow-md: 0 14px 34px rgba(15, 39, 71, 0.09);
  --shadow-sm: 0 10px 22px rgba(15, 39, 71, 0.07);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 4%, rgba(217, 199, 162, 0.34), transparent 22%),
    radial-gradient(circle at 92% 8%, rgba(158, 42, 43, 0.12), transparent 20%),
    radial-gradient(circle at 50% 85%, rgba(23, 53, 95, 0.08), transparent 26%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 38%, var(--bg-bottom) 100%);
  background-attachment: fixed;
}
button, input { font: inherit; }
a { color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.app-shell { min-height: 100vh; padding: 24px 20px 28px; }
.topbar, .hero, .site-preview-row, .chat-panel {
  width: 100%; max-width: 920px; margin-left: auto; margin-right: auto;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 34px;
}
.brand-mark { color: var(--navy); font-weight: 800; letter-spacing: .02em; }
.topbar-note {
  color: var(--navy-soft); font-size: .9rem; background: linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.42) 100%);
  border: 1px solid rgba(182,146,91,.22); border-radius: 999px; padding: 8px 14px; box-shadow: 0 8px 18px rgba(15,39,71,.05);
}
.hero { text-align: center; margin-bottom: 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 7px 12px; color: var(--red);
  background: linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.36) 100%);
  border: 1px solid rgba(182,146,91,.18); border-radius: 999px; text-transform: uppercase;
  letter-spacing: .12em; font-size: .76rem; font-weight: 800; box-shadow: 0 10px 20px rgba(15,39,71,.05);
}
.hero h1 {
  margin: 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 5vw, 4.2rem); line-height: 1.03; letter-spacing: -.035em;
}
.hero-copy {
  margin: 18px auto 0; max-width: 760px; color: var(--muted); font-size: 1.02rem; line-height: 1.76;
}
.site-preview-row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 26px;
}
.site-preview-card {
  position: relative; overflow: hidden; padding: 22px 22px 18px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.84) 0%, rgba(247,241,231,.94) 100%);
  border: 1px solid rgba(15,39,71,.09); box-shadow: var(--shadow-md);
}
.site-preview-card::before,
.site-preview-card::after {
  content: ""; position: absolute; inset: auto auto 12px 12px; border-radius: 20px; z-index: 0;
}
.site-preview-card::before {
  width: 92%; height: 88%; background: rgba(255,255,255,.35); transform: translate(10px, 8px); border: 1px solid rgba(182,146,91,.15);
}
.site-preview-card::after {
  width: 84%; height: 80%; background: rgba(249,242,230,.7); transform: translate(18px, 14px); border: 1px solid rgba(182,146,91,.12);
}
.site-preview-card > * { position: relative; z-index: 1; }
.preview-kicker { margin: 0 0 8px; color: var(--red); text-transform: uppercase; font-size: .76rem; font-weight: 800; letter-spacing: .12em; }
.site-preview-card h2 { margin: 0 0 10px; color: var(--navy); }
.site-preview-card p { margin: 0 0 14px; color: var(--muted); line-height: 1.65; }
.site-preview-card a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: white;
  background: linear-gradient(135deg, var(--red-deep) 0%, var(--red-mid) 55%, #b5404f 100%);
  padding: 10px 16px; border-radius: 999px; box-shadow: 0 12px 24px rgba(111,20,29,.24);
}
.chat-shell { display: flex; justify-content: center; }
.chat-panel {
  position: relative; min-height: 620px; display: flex; flex-direction: column; border: 1px solid rgba(15,39,71,.08);
  border-radius: 30px; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,.88) 0%, rgba(255,255,255,.8) 100%);
  backdrop-filter: blur(16px); box-shadow: var(--shadow-lg);
}
.chat-panel::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--red) 58%, var(--gold-strong) 100%);
}
.chat-header {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(15,39,71,.08); background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(252,248,242,.74) 100%);
  flex-shrink: 0;
}
.chat-kicker { margin: 0 0 8px; color: var(--red); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.chat-header h2 { margin: 0; color: var(--navy); font-size: 1.55rem; }
.chat-guide-text { max-width: 360px; margin: 0; color: var(--muted); line-height: 1.64; font-size: .96rem; }
.chat-messages {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 24px 24px 18px;
  background: linear-gradient(180deg, rgba(248,243,236,.82) 0%, rgba(241,236,228,.64) 28%, rgba(236,242,250,.92) 100%);
}
.message { display: flex; flex-direction: column; gap: 6px; }
.message.user { align-items: flex-end; }
.message.ai { align-items: flex-start; }
.message-meta { padding: 0 4px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .03em; }
.message-bubble {
  max-width: min(720px, 88%); padding: 15px 16px; border-radius: 20px; line-height: 1.65; box-shadow: var(--shadow-sm);
}
.message.ai .message-bubble { background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(250,245,237,.96) 100%); border: 1px solid rgba(15,39,71,.08); }
.message.user .message-bubble { color: white; background: linear-gradient(135deg, #7b1b25 0%, #9a2631 54%, #be5360 100%); }
.message-bubble p { margin: 0 0 10px; }
.message-bubble p:last-child { margin-bottom: 0; }
.message-list { margin: 0; padding-left: 18px; }
.message-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.option-chip, .prompt-chip {
  border: 1px solid rgba(111,20,29,.14); background: rgba(255,255,255,.86); color: var(--navy);
  border-radius: 999px; padding: 9px 14px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.option-chip:hover, .prompt-chip:hover { transform: translateY(-1px); box-shadow: 0 10px 16px rgba(15,39,71,.08); }
.quick-prompts {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 24px 0; background: linear-gradient(180deg, rgba(248,243,236,.0) 0%, rgba(248,243,236,.32) 100%);
}
.chat-input-area {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 18px 24px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.8) 0%, rgba(255,250,243,.98) 100%); border-top: 1px solid rgba(15,39,71,.06);
}
.chat-input-area input {
  width: 100%; min-width: 0; border: 1px solid rgba(15,39,71,.12); background: rgba(255,255,255,.94); color: var(--text);
  border-radius: 18px; padding: 16px 18px; outline: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.chat-input-area input:focus { border-color: rgba(157,42,43,.45); box-shadow: 0 0 0 4px rgba(158,42,43,.1); }
#sendButton {
  border: none; color: white; min-width: 112px; border-radius: 18px; padding: 14px 18px; cursor: pointer;
  background: linear-gradient(135deg, #64111a 0%, #8f1f2b 45%, #b33749 100%);
  box-shadow: 0 16px 28px rgba(111,20,29,.26), inset 0 1px 0 rgba(255,255,255,.18);
}
#sendButton:hover { transform: translateY(-1px); filter: saturate(1.04); }
.thinking-bubble { display: inline-flex; gap: 8px; align-items: center; }
.thinking-dot {
  width: 8px; height: 8px; border-radius: 999px; background: rgba(15,39,71,.45); animation: pulse 1s infinite ease-in-out;
}
.thinking-dot:nth-child(2) { animation-delay: .15s; }
.thinking-dot:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%,80%,100% { transform: scale(.8); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
@media (max-width: 760px) {
  .site-preview-row { grid-template-columns: 1fr; }
  .topbar, .chat-header, .chat-input-area { display: block; }
  .topbar-note { margin-top: 10px; display: inline-flex; }
  .chat-guide-text { max-width: none; margin-top: 12px; }
  .chat-input-area { grid-template-columns: 1fr; }
  #sendButton { width: 100%; }
  .message-bubble { max-width: 95%; }
}


.compact-home .topbar {
  max-width: 920px;
  margin-bottom: 18px;
}

.compact-home .brand-mark {
  font-size: clamp(2rem, 3.4vw, 3rem);
  letter-spacing: -0.02em;
}

.compact-home .chat-panel {
  min-height: 720px;
}

@media (max-width: 720px) {
  .compact-home .brand-mark {
    font-size: 1.9rem;
  }

  .compact-home .chat-panel {
    min-height: 70vh;
  }
}
