:root {
  color-scheme: light;
  --paper: #f2f5f0;
  --panel: #fff;
  --ink: #1d3029;
  --muted: #54665c;
  --line: #dce5dc;
  --green: #244f3f;
  --green-dark: #173c30;
  --tint: #e9f1eb;
  --lilac: #efedf8;
  --serif: "Georgia", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { min-width: 300px; margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--sans); }
button, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { opacity: .52; cursor: default; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #548265; outline-offset: 3px; }
[hidden] { display: none !important; }
figure, h1, h2, h3, p { margin: 0; }
[data-icon] { display: inline-grid; place-items: center; flex-shrink: 0; }
[data-icon] > svg { width: 1.1em; height: 1.1em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.topbar { background: #fafbf8; border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1440px; margin: auto; padding: 0 54px; height: 69px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-size: 1.15rem; letter-spacing: -.045em; }
.brand strong { font-weight: 700; }
.brand-mark { display: grid; place-items: center; background: var(--green-dark); height: 34px; width: 34px; border-radius: 10px; position: relative; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 18px; height: 10px; border: 1.3px solid #e4efdf; border-radius: 50%; transform: rotate(-40deg); }
.brand-mark::after { transform: rotate(40deg); }
.nav { display: flex; gap: 5px; align-items: center; }
.nav a { border-radius: 8px; padding: 8px 14px; color: var(--muted); font-size: .92rem; font-weight: 600; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--tint); color: var(--green-dark); }
.mode { justify-self: end; border: 1px solid #ddd8ee; background: var(--lilac); color: #52466c; border-radius: 27px; padding: 4px 11px; white-space: nowrap; font-size: .83rem; font-weight: 650; }
.shell { max-width: 1300px; margin: 0 auto; padding: 28px 42px 42px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 21px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #4a6659; font-size: .73rem; letter-spacing: .12em; font-weight: 700; }
.eyebrow span { width: 15px; height: 1px; background: #789585; }
h1 { font: 400 clamp(2.75rem, 5vw, 3.75rem)/1.05 var(--serif); letter-spacing: -.06em; margin: 8px 0; }
.section-head p { color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; min-height: 40px; padding: 9px 14px; border: 1px solid transparent; font-size: .9rem; font-weight: 650; }
.secondary { background: #fbfcfa; border-color: #ccd9cf; color: var(--green-dark); }
.secondary:hover { background: var(--tint); }
.primary { background: var(--green-dark); color: #fff; }
.primary:hover { background: var(--green); }
.new-button { margin-bottom: 2px; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 32.3%); gap: 20px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 4px 15px #16382606; }
.conversation { min-width: 0; overflow: hidden; }
.conversation-head { padding: 16px 20px; border-bottom: 1px solid #e5ebe5; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.conversation-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.conversation-title h2, .settings h2 { font-size: 1rem; line-height: 1.3; }
.conversation-title p { font-size: .86rem; color: var(--muted); margin-top: 2px; }
.tile { width: 39px; height: 39px; border-radius: 10px; display: inline-grid; flex-shrink: 0; place-items: center; background: var(--tint); color: var(--green); }
.timer { display: inline-flex; align-items: center; gap: 6px; color: #335748; background: #edf3ee; border-radius: 8px; padding: 5px 9px; font-size: .85rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.conversation-body { min-height: 259px; max-height: clamp(280px, 43vh, 520px); overflow: auto; overflow-wrap: anywhere; padding: 19px 21px 18px; }
.messages { display: grid; gap: 16px; }
.message { display: flex; align-items: flex-start; gap: 9px; }
.message.user { justify-content: flex-end; }
.message-icon { width: 29px; height: 29px; border-radius: 8px; background: #e5eee6; color: var(--green-dark); font-size: .91rem; }
.bubble { background: #f1f5f0; border: 1px solid #edf2ec; border-radius: 3px 13px 13px 13px; padding: 11px 14px; max-width: min(89%, 630px); }
.user .bubble { background: #edf0f8; border-color: #e8ebf5; border-radius: 13px 3px 13px 13px; }
.bubble p { font-size: .95rem; white-space: pre-wrap; }
.bubble .speaker { font-size: .79rem; font-weight: 700; color: var(--green); margin-bottom: 3px; }
.reply-part + .reply-part { margin-top: 10px; }
.reply-part strong { display: block; font-size: .8rem; color: var(--green-dark); margin-bottom: 2px; }
.sample-card { margin: 15px 0 0 38px; max-width: 560px; padding: 12px 14px; border: 1px solid #e3dfef; background: #faf9fd; border-radius: 11px; }
.sample-card h3 { font-size: .91rem; }
.sample-card p { color: #57566b; font-size: .85rem; margin: 4px 0 8px; }
.text-button { background: none; border: 0; padding: 0; color: var(--green); font-size: .86rem; font-weight: 700; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.sample-card .text-button { color: #534672; }
.composer-wrap { padding: 0 20px 12px; }
.composer { padding: 9px 10px 8px; border: 1px solid #d4dfd5; border-radius: 11px; background: #fcfdfb; }
.composer:focus-within { border-color: #6f9680; }
.composer textarea { resize: vertical; min-height: 42px; width: 100%; max-height: 220px; border: 0; background: transparent; color: var(--ink); outline: 0; padding: 1px 3px; font-size: .94rem; }
.composer textarea::placeholder { color: #647269; }
.composer-actions, .input-actions { display: flex; align-items: center; gap: 4px; }
.composer-actions { justify-content: space-between; }
.icon-button { background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 0; display: inline-grid; flex-shrink: 0; width: 34px; height: 34px; place-items: center; color: var(--green); }
.icon-button:hover, .icon-button[aria-pressed="true"] { background: var(--tint); }
.send { min-height: 34px; padding: 5px 10px; }
.composer-foot, .input-status { margin-top: 7px; color: var(--muted); font-size: .82rem; }
.composer-foot { display: flex; align-items: center; gap: 5px; }
.input-status:empty { display: none; }
.session-footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: #fafbf9; border-top: 1px solid #e5ebe5; padding: 9px 20px; font-size: .85rem; color: var(--muted); }
#session-status { display: flex; align-items: center; gap: 6px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #72947f; flex-shrink: 0; }
.sidebar { display: grid; gap: 14px; }
.portrait { position: relative; height: 190px; background: #24473f; overflow: hidden; border-radius: 15px; color: white; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 41%; }
.portrait::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, #0b1916de); pointer-events: none; }
.portrait figcaption { position: absolute; z-index: 1; inset: auto 13px 12px; display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.portrait strong { display: block; font: 400 1.43rem/1.15 var(--serif); margin-top: 2px; }
.portrait-kicker { color: #f0f7ef; font-size: .66rem; letter-spacing: .11em; font-weight: 700; }
.audio { background: #152a24a8; border: 1px solid #ffffff70; color: white; }
.audio:hover, .audio[aria-pressed="true"] { background: #47715d; }
.settings { padding: 14px; }
.settings-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.settings-head > span { color: #557662; font-size: 1.03rem; }
fieldset { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
legend, .experience { width: 100%; font-size: .86rem; font-weight: 680; }
legend { display: flex; justify-content: space-between; margin-bottom: 5px; }
legend span { color: var(--muted); font-size: .78rem; font-weight: 400; }
.options { display: grid; gap: 4px; }
.option { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid #e2e9e2; border-radius: 7px; background: #fff; text-align: left; padding: 5px 7px; font-size: .85rem; line-height: 1.25; }
.option strong { display: block; font-weight: 650; }
.option small { color: var(--muted); font-size: .76rem; }
.option[aria-pressed="true"] { background: #eef5ef; border-color: #cbded0; }
.option:hover { border-color: #73927d; }
.checkmark { width: 16px; height: 16px; border: 1px solid #9caf9f; border-radius: 4px; flex-shrink: 0; }
.option[aria-pressed="true"] .checkmark { background: var(--green); color: #fff; border-color: var(--green); }
.option[aria-pressed="false"] svg { visibility: hidden; }
.tones { display: grid; grid-template-columns: .73fr minmax(0, 1.58fr) .73fr; padding: 2px; gap: 2px; border: 1px solid #e1e9e1; border-radius: 8px; background: #f6f8f5; }
.tone { padding: 4px 1px; border-radius: 5px; border: 1px solid transparent; background: transparent; min-width: 0; color: var(--muted); font-size: .79rem; }
.tone[aria-checked="true"] { background: #fff; border-color: #d6e2d8; font-weight: 670; color: var(--green-dark); }
.experience { display: grid; gap: 4px; }
select { width: 100%; appearance: none; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); padding: 5px 27px 5px 8px; font-size: .84rem; background: linear-gradient(45deg, transparent 50%, #526f61 51%) right 14px center/5px 5px no-repeat, linear-gradient(135deg, #526f61 50%, transparent 51%) right 9px center/5px 5px no-repeat, #fff; }
.case-list { display: grid; gap: 13px; max-width: 870px; }
.history-card { padding: 15px 19px; overflow-wrap: anywhere; }
.history-card h2 { font-size: 1.06rem; }
.history-card h3 { font-size: .96rem; }
.history-card p { margin: 4px 0; color: var(--muted); }
.history-card small { color: var(--muted); font-size: .83rem; }
.history-card details { margin-top: 9px; }
.history-card summary { cursor: pointer; color: var(--green); font-weight: 650; }
.history-card ul { padding-left: 19px; margin-bottom: 0; }
.history-card li + li { margin-top: 8px; }
dialog { width: min(500px, calc(100% - 24px)); border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 15px; padding: 18px 20px 20px; box-shadow: 0 15px 65px #0e24183d; }
dialog::backdrop { background: #152b2180; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 5px; }
.dialog-head h2 { font: 400 1.9rem/1.15 var(--serif); }
dialog > p { color: var(--muted); }
.dialog-choices { display: grid; gap: 8px; margin-top: 13px; }
.choice { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fcfdfb; padding: 9px; text-align: left; }
.choice:hover { background: var(--tint); }
.choice small { display: block; color: var(--muted); font-size: .86rem; }
.summary-field { margin: 11px 0; }
.summary-field h3, .summary-field label { font-size: .9rem; font-weight: 700; }
.summary-field p { color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.summary-field textarea { width: 100%; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
@media (max-width: 900px) {
  .topbar-inner { padding-inline: 24px; }
  .shell { padding-inline: 22px; }
  .workspace { gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(255px, 34%); }
  .portrait { height: 185px; }
}
@media (max-width: 680px) {
  .topbar-inner { height: auto; padding: 10px 14px 6px; grid-template-columns: 1fr 1fr; row-gap: 6px; }
  .nav { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
  .nav a { padding: 6px 10px; }
  .shell { padding: 23px 12px 34px; }
  .section-head { align-items: start; margin-bottom: 15px; }
  .section-head p { font-size: .92rem; }
  .new-button { margin-top: 14px; padding: 5px 7px; min-height: 34px; font-size: .82rem; }
  .workspace { grid-template-columns: 1fr; }
  .conversation-head, .conversation-body, .composer-wrap, .session-footer { padding-inline: 12px; }
  .conversation-body { min-height: 245px; max-height: 430px; }
  .sample-card { margin-left: 0; }
  .portrait { height: 195px; }
  .sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 370px) { .section-head { display: block; } .new-button { margin-top: 8px; } }

.case-memory { margin: 7px 0 0; color: var(--muted); font-size: .85rem; }

.account-controls { justify-self: end; display: flex; gap: 7px; align-items: center; }
.account-button { font-size: .82rem; min-height: 33px; padding: 4px 8px; white-space: nowrap; }
.email-form { display: grid; gap: 7px; margin-block: 12px; }
.email-form label { font-size: .88rem; font-weight: 650; }
.email-form input { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; }
.email-form button, #verify-email { justify-self: start; margin-top: 4px; }
#logout-email { margin-top: 9px; }
#account-status:not(:empty) { margin-top: 8px; }
@media (max-width: 470px) {
  .account-controls .mode:has(+ .account-button:not([hidden])) { display: none; }
}
#import-demo { display: flex; margin-top: 10px; }
