:root {
  --ink: #17383b;
  --muted: #607779;
  --teal: #075e66;
  --teal-dark: #063f45;
  --green: #2e8a67;
  --cream: #f7f4ea;
  --paper: #fffef9;
  --line: #dce7e4;
  --shadow: 0 18px 55px rgba(8, 63, 69, .12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; background: radial-gradient(circle at 15% 0%, #dff2eb 0, transparent 32rem), var(--cream); }
button, textarea { font: inherit; }
button { cursor: pointer; }

.topbar { height: 72px; padding: 0 clamp(18px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(7, 94, 102, .1); background: rgba(255, 254, 249, .82); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, var(--teal), var(--green)); color: white; font-weight: 800; font-size: 1.35rem; box-shadow: 0 8px 24px rgba(7, 94, 102, .22); }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); margin-top: 1px; }
.text-button { border: 0; background: transparent; color: var(--teal); padding: 10px; }

.app-shell { width: min(100% - 28px, 1000px); margin: 0 auto; padding: clamp(36px, 7vw, 82px) 0 56px; }
.welcome { text-align: center; }
.eyebrow { color: var(--green); font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
h1 { max-width: 790px; margin: 18px auto 16px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.25rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -.04em; }
.lead { max-width: 700px; margin: 0 auto; color: var(--muted); font-size: clamp(1.04rem, 2vw, 1.22rem); line-height: 1.65; }
.path-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 38px auto 24px; text-align: left; }
.path-card { position: relative; min-height: 148px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 254, 249, .88); color: var(--ink); box-shadow: 0 6px 24px rgba(8, 63, 69, .04); transition: .2s ease; }
.path-card:hover, .path-card:focus-visible, .path-card.selected { transform: translateY(-2px); border-color: var(--green); box-shadow: var(--shadow); outline: none; }
.path-card.selected::after { content: "✓"; position: absolute; top: 16px; right: 17px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--green); }
.path-icon { display: block; font-size: 1.55rem; margin-bottom: 12px; }
.path-card strong, .path-card small { display: block; }
.path-card strong { font-size: 1.04rem; }
.path-card small { color: var(--muted); line-height: 1.45; margin-top: 6px; max-width: 33ch; }
.notice { max-width: 760px; margin: 22px auto; padding: 20px 22px; text-align: left; border: 1px solid #e7dcc0; border-radius: 16px; background: #fffaf0; }
.notice p { margin: 6px 0 16px; color: #6b6047; line-height: 1.5; }
.consent { display: flex; align-items: flex-start; gap: 10px; line-height: 1.45; }
.consent input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--green); }
.primary-button { border: 0; border-radius: 999px; padding: 14px 25px; background: linear-gradient(135deg, var(--teal), var(--green)); color: white; font-weight: 750; box-shadow: 0 10px 28px rgba(7, 94, 102, .22); }
.primary-button:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

.chat { height: calc(100vh - 150px); min-height: 580px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: rgba(255, 254, 249, .94); box-shadow: var(--shadow); }
.messages { flex: 1; overflow-y: auto; padding: clamp(18px, 4vw, 42px); }
.message { max-width: 78%; margin: 0 0 18px; padding: 15px 17px; border-radius: 18px; line-height: 1.62; white-space: pre-wrap; }
.message.assistant { background: #edf6f2; border-bottom-left-radius: 5px; }
.message.user { margin-left: auto; color: white; background: var(--teal); border-bottom-right-radius: 5px; }
.message.status { color: var(--muted); background: transparent; padding-left: 0; font-style: italic; }
.composer { display: flex; gap: 10px; padding: 15px; border-top: 1px solid var(--line); background: white; }
.composer textarea { flex: 1; min-height: 48px; max-height: 150px; resize: none; padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); outline: none; }
.composer textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46, 138, 103, .12); }
.composer button { align-self: flex-end; height: 48px; border: 0; border-radius: 14px; padding: 0 20px; background: var(--teal); color: white; font-weight: 700; }
.composer button:disabled { opacity: .5; }
.composer-help { margin: 0; padding: 0 18px 14px; color: var(--muted); font-size: .78rem; background: white; }

dialog { width: min(92vw, 620px); border: 0; border-radius: 24px; padding: 0; color: var(--ink); box-shadow: 0 30px 90px rgba(3, 35, 38, .3); }
dialog::backdrop { background: rgba(4, 32, 35, .58); backdrop-filter: blur(4px); }
.dialog-content { position: relative; padding: 30px; }
.dialog-content h2 { font-family: Georgia, serif; font-size: 2rem; margin: 0 0 12px; }
.dialog-content p, .dialog-content li { line-height: 1.55; color: var(--muted); }
.dialog-content li { margin-bottom: 8px; }
.dialog-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #edf3f1; font-size: 1.5rem; }
.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; }

@media (max-width: 680px) {
  .topbar { height: 64px; }
  .brand small { display: none; }
  .text-button { font-size: .83rem; }
  .app-shell { padding-top: 30px; }
  .path-grid { grid-template-columns: 1fr; margin-top: 28px; }
  .path-card { min-height: 120px; }
  .chat { height: calc(100vh - 100px); min-height: 500px; border-radius: 18px; }
  .message { max-width: 90%; }
  .composer { padding: 10px; }
  .composer button { padding: 0 14px; }
}
