:root {
  --ink: #1d2823;
  --muted: #5f6964;
  --forest: #153f31;
  --forest-light: #245c47;
  --saffron: #d87a34;
  --paper: #f4efe3;
  --cream: #fffdf8;
  --line: rgba(29, 40, 35, .15);
  --shadow: 0 30px 80px rgba(35, 48, 40, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.site-header { width: min(1180px, calc(100% - 40px)); min-height: 88px; margin: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand, .footer-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand span, .footer-brand strong { font-family: Georgia, serif; font-weight: 700; }
nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 700; }
nav a { text-decoration: none; }
.nav-contact { border: 1px solid var(--ink); padding: 8px 16px; border-radius: 99px; }

.hero { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 72px 0 100px; display: grid; grid-template-columns: .82fr 1.18fr; gap: 70px; align-items: start; }
.hero-copy { position: sticky; top: 50px; padding-top: 54px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--forest-light); font-size: 12px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow span { width: 28px; height: 1px; background: var(--saffron); }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
h1 { margin: 20px 0 26px; font-size: clamp(52px, 5.7vw, 80px); }
h1 em { color: var(--saffron); font-weight: 400; }
.hero-lede { color: var(--muted); font-size: 18px; }
.trust-list { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 9px; }
.trust-list span { padding: 8px 11px; color: var(--forest); background: rgba(255,255,255,.48); border: 1px solid var(--line); border-radius: 99px; font-size: 11px; font-weight: 750; }

.chat-card { background: var(--cream); border: 1px solid rgba(29,40,35,.1); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.chat-heading { display: flex; align-items: center; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.mini-mark { display: grid; place-items: center; width: 42px; height: 42px; flex: none; color: #f2ca9d; background: var(--forest); border-radius: 50%; font-family: Georgia, serif; }
.chat-heading > div:nth-child(2) { flex: 1; }
.chat-heading h2 { margin: 0 0 2px; font-size: 20px; }
.chat-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.status-dot { width: 9px; height: 9px; background: #3c9f70; border-radius: 50%; box-shadow: 0 0 0 5px rgba(60,159,112,.12); }
.messages { min-height: 240px; max-height: 560px; padding: 22px; overflow-y: auto; background: linear-gradient(180deg, #faf7ef 0%, #fffdf8 100%); }
.message { width: min(92%, 660px); margin-bottom: 16px; padding: 15px 17px; border-radius: 15px; font-size: 14px; white-space: pre-wrap; }
.message p { margin: 0 0 10px; }
.message p:last-child { margin-bottom: 0; }
.guide-message { margin-right: auto; background: #eee7d9; border-radius: 15px 15px 15px 3px; }
.guide-message small { color: var(--muted); }
.user-message { margin-left: auto; color: white; background: var(--forest); border-radius: 15px 15px 3px 15px; }
.error-message { color: #7c2d20; background: #fde8e4; border: 1px solid #e8b2a8; }
.practice, .reflection { margin-top: 15px; padding: 13px 14px; background: rgba(255,255,255,.7); border-left: 2px solid var(--saffron); border-radius: 4px; }
.practice strong, .reflection strong { display: block; margin-bottom: 4px; color: var(--forest); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.citations { margin-top: 14px; }
.citations details { border-top: 1px solid var(--line); }
.citations summary { padding: 10px 0; color: var(--saffron); cursor: pointer; font-weight: 800; }
.citations p { font-size: 12px; }
.citations .sanskrit { font-family: Georgia, serif; font-size: 15px; }
.context-used { display: block; margin-top: 12px; color: var(--muted); }

.chat-form { padding: 20px 22px; border-top: 1px solid var(--line); }
.chat-form > label { display: block; margin: 0 0 7px; font-size: 12px; font-weight: 800; }
.chat-form > label span { color: var(--muted); font-weight: 500; }
input, textarea, select { width: 100%; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 9px; outline: none; }
input, textarea { margin-bottom: 14px; padding: 12px 13px; }
textarea { resize: vertical; min-height: 82px; }
input:focus, textarea:focus, select:focus { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(216,122,52,.12); }
.form-actions { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.language-label { width: 145px; color: var(--muted); font-size: 11px; }
select { display: block; margin-top: 5px; padding: 9px; }
#send-button { min-height: 45px; padding: 0 20px; color: white; background: var(--forest); border: 0; border-radius: 7px; font-weight: 800; }
#send-button:hover { background: var(--forest-light); }
#send-button:disabled { cursor: wait; opacity: .65; }
.privacy-note { margin: 0; padding: 0 22px 19px; color: var(--muted); font-size: 10px; }
#clear-button { padding: 0; color: var(--forest); background: transparent; border: 0; text-decoration: underline; }

.principles { padding: 90px max(20px, calc((100vw - 1180px) / 2)); color: white; background: var(--forest); }
.principles > div:first-child { max-width: 720px; }
.principles .eyebrow { color: #f2ca9d; }
.principles h2 { margin: 18px 0 48px; font-size: clamp(38px, 5vw, 62px); }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.18); }
.principle-grid article { padding: 28px 34px; border-right: 1px solid rgba(255,255,255,.18); }
.principle-grid article:last-child { border: 0; }
.principle-grid b { color: #f2ca9d; font-family: Georgia, serif; }
.principle-grid h3 { margin: 18px 0 8px; font-size: 25px; }
.principle-grid p { margin: 0; color: rgba(255,255,255,.68); font-size: 13px; }

footer { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 50px 0 30px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.footer-brand strong, .footer-brand span { display: block; }
.footer-brand span, footer > p { color: var(--muted); font-size: 11px; }
.footer-links { display: flex; gap: 22px; font-size: 12px; font-weight: 750; }
footer > p { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--line); }

.legal { width: min(760px, calc(100% - 40px)); margin: 70px auto 120px; }
.legal h1 { font-size: clamp(46px, 7vw, 72px); }
.legal h2 { margin-top: 42px; font-size: 30px; }
.legal p, .legal li { color: var(--muted); }

@media (max-width: 900px) {
  nav a:not(.nav-contact) { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { position: static; padding-top: 0; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-grid article { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
}

@media (max-width: 560px) {
  .site-header { min-height: 74px; }
  .brand span { font-size: 15px; }
  .brand img { width: 34px; height: 34px; }
  .hero { width: calc(100% - 24px); padding: 48px 0 70px; gap: 45px; }
  h1 { font-size: 48px; }
  .chat-heading, .messages, .chat-form { padding-left: 15px; padding-right: 15px; }
  .privacy-note { padding-left: 15px; padding-right: 15px; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .language-label { width: 100%; }
  #send-button { width: 100%; }
  footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
