@font-face {
  font-family: Cinzel;
  src: url('fonts/Cinzel-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Cinzel;
  src: url('fonts/Cinzel-SemiBold.ttf') format('truetype');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Crimson Text';
  src: url('fonts/CrimsonText-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Crimson Text';
  src: url('fonts/CrimsonText-SemiBold.ttf') format('truetype');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --brand: #860021;
  --brand-dark: #5c0016;
  --gold: #d9a441;
  --ink: #191919;
  --muted: #706c69;
  --line: #e2e1e0;
  --paper: #faf9f7;
  --surface: #f2f1f0;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.5;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
::selection { background: var(--brand); color: white; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
[hidden] { display: none !important; }

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-direction: column;
  background: white;
  box-shadow: 0 16px 70px rgba(25, 25, 25, .08);
}
.topbar {
  min-height: 88px;
  padding: 10px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 4px solid var(--brand);
  border-bottom: 1px solid var(--line);
  background: white;
}
.brand { display: flex; align-items: center; min-width: 0; gap: 19px; }
.brand-logo { width: 116px; height: 68px; object-fit: contain; flex: none; }
.brand-divider { width: 1px; height: 35px; background: var(--line); flex: none; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { color: var(--brand); font-family: Cinzel, Georgia, serif; font-size: 13px; font-weight: 600; white-space: nowrap; }
.brand-copy span { color: var(--muted); font-size: 11px; letter-spacing: .03em; }
.account-button {
  border: 1px solid #ddc4c8;
  border-radius: 4px;
  background: white;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background .16s, border-color .16s;
}
.account-button:hover { background: #fbf4f3; border-color: var(--brand); }
.account-button span { font-size: 16px; line-height: 1; }
.footer {
  min-height: 43px;
  padding: 10px 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: #706c69;
  font-size: 10px;
  letter-spacing: .04em;
}
.footer-rule { width: 18px; height: 2px; background: var(--gold); flex: none; }
.footer-separator { color: var(--brand); margin: 0 4px; }

.eyebrow {
  display: block;
  margin: 0 0 12px;
  color: var(--brand);
  font-family: Cinzel, Georgia, serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .11em;
  line-height: 1.5;
  text-transform: uppercase;
}
.login-screen {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 580px;
}
.login-story {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 76px clamp(36px, 7vw, 94px);
  background: linear-gradient(145deg, #72001b 0%, var(--brand-dark) 75%);
  color: white;
}
.login-story::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  right: -260px;
  bottom: -265px;
  box-shadow: 0 0 0 75px rgba(255,255,255,.025), 0 0 0 150px rgba(255,255,255,.02);
}
.login-story-rule, .welcome-rule { display: block; width: 38px; height: 3px; background: var(--gold); }
.login-story-rule { margin-bottom: 38px; }
.login-story .eyebrow { color: #e5c679; margin-bottom: 13px; }
.login-story h1 {
  max-width: 430px;
  margin: 0;
  color: white;
  font-family: 'Crimson Text', Georgia, serif;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.025em;
}
.login-story p:not(.eyebrow) { max-width: 350px; margin: 25px 0 0; color: #f3dfe3; line-height: 1.75; }
.login-story-logo { width: 128px; height: auto; margin-top: 72px; opacity: .96; }
.login-area {
  display: grid;
  place-items: center;
  padding: 55px clamp(28px, 6vw, 74px);
  background: var(--paper);
}
.login-card { width: min(100%, 380px); }
.login-card .eyebrow { margin-bottom: 13px; }
.login-card h2, .section-heading h2 {
  margin: 0;
  font-family: 'Crimson Text', Georgia, serif;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.08;
}
.login-card h2 { font-size: 46px; }
.intro { margin: 12px 0 34px; color: var(--muted); line-height: 1.65; }
.login-form { display: flex; flex-direction: column; }
.login-form label, .input-label { display: block; margin: 0 0 8px; color: #3d3534; font-size: 12px; font-weight: 700; }
.login-form input {
  width: 100%;
  height: 47px;
  margin: 0 0 21px;
  padding: 0 14px;
  border: 1px solid #d8d4d1;
  border-radius: 4px;
  background: white;
  color: var(--ink);
  transition: border-color .16s, box-shadow .16s;
}
.login-form input:hover, .transcript-input:hover { border-color: #bfaeae; }
.login-form input:focus, .transcript-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(134,0,33,.09); outline: 0; }
.primary-button {
  min-height: 47px;
  width: 100%;
  margin-top: 2px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--brand);
  border-radius: 4px;
  background: var(--brand);
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .015em;
  transition: background .16s, transform .16s;
}
.primary-button:hover, .send-button:hover { background: var(--brand-dark); }
.primary-button:not(:disabled):active { transform: translateY(1px); }
.primary-button span { font-size: 18px; line-height: 1; }
.error-message { min-height: 20px; color: #a11b2f; font-size: 12px; }

.workspace { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; background: white; }
.status-banner {
  margin: 22px 42px 0;
  padding: 11px 14px;
  border-left: 3px solid var(--gold);
  background: #fcf8ee;
  color: #675228;
  font-size: 11px;
  line-height: 1.5;
}
.status-banner.ready { border-left-color: var(--brand); background: #fbf4f4; color: var(--brand-dark); }
.tabs { display: flex; gap: 27px; margin: 0 42px; padding-top: 22px; border-bottom: 1px solid var(--line); }
.tab {
  position: relative;
  margin-bottom: -1px;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: #77716e;
  font-family: Cinzel, Georgia, serif;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.tab:hover { color: var(--brand); }
.tab.active { border-bottom-color: var(--brand); color: var(--brand); }
.view { flex: 1; display: flex; flex-direction: column; min-height: 0; background: white; }
.section-heading { padding: 33px 42px 22px; }
.section-heading .eyebrow { margin-bottom: 6px; }
.section-heading h2 { font-size: 35px; }
.section-heading > p:last-child:not(.eyebrow) { max-width: 650px; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.conversation { flex: 1; min-height: 200px; overflow: auto; padding: 0 42px 28px; display: flex; flex-direction: column; gap: 16px; }
.welcome-card {
  position: relative;
  max-width: 650px;
  overflow: hidden;
  padding: 28px 30px;
  border: 1px solid #eadedb;
  border-radius: 5px;
  background: linear-gradient(125deg, #fbf5f2, #fffdfb 82%);
}
.welcome-card::after { content: 'G'; position: absolute; right: -8px; top: -55px; color: rgba(134,0,33,.035); font-family: Cinzel, Georgia, serif; font-size: 210px; pointer-events: none; }
.welcome-rule { width: 27px; height: 2px; margin-bottom: 16px; }
.welcome-card .eyebrow { position: relative; z-index: 1; margin-bottom: 5px; }
.welcome-card strong { position: relative; z-index: 1; display: block; font-family: 'Crimson Text', Georgia, serif; font-size: 29px; font-weight: 600; line-height: 1; }
.welcome-card p { position: relative; z-index: 1; max-width: 470px; margin: 11px 0 20px; color: #5f5956; font-size: 12px; line-height: 1.65; }
.welcome-card button {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 10px 13px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #d7bcb9;
  border-radius: 4px;
  background: white;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}
.welcome-card button:hover { background: #fdf7f5; border-color: var(--brand); }
.message-user { align-self: flex-end; max-width: 88%; padding: 11px 15px; border-radius: 11px 11px 3px 11px; background: var(--brand); color: white; font-size: 12px; overflow-wrap: anywhere; }
.message-assistant { max-width: 760px; padding: 17px 19px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 4px; background: white; box-shadow: 0 5px 18px rgba(25,25,25,.035); font-size: 12px; }
.answer-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.answer-heading strong { font-family: 'Crimson Text', Georgia, serif; font-size: 20px; font-weight: 600; }
.count-pill { padding: 4px 8px; border-radius: 3px; background: #f7e9e9; color: var(--brand); font-size: 10px; white-space: nowrap; }
.result-card { padding: 12px 0 7px; border-top: 1px solid #eee8e5; }
.result-card-title { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.result-card a, .report-action a { color: var(--brand); font-weight: 700; text-decoration: none; }
.result-card a:hover, .report-action a:hover { text-decoration: underline; }
.result-meta { margin: 6px 0; color: #6e6966; font-size: 11px; }
.select-button { border: 0; background: none; color: var(--brand); font-size: 11px; font-weight: 700; padding: 4px 0; text-align: left; }
.select-button:hover { text-decoration: underline; }
.selected-source { color: var(--brand); font-size: 10px; }
.hint { margin: 9px 0 0; color: #746e6b; font-size: 11px; line-height: 1.55; }
.error-card { border-color: #efd8d8; border-left-color: #b53243; background: #fff8f8; color: #922634; }
.composer { margin: auto 42px 28px; padding: 12px 15px 11px; border: 1px solid #d9d3d0; border-radius: 6px; background: white; box-shadow: 0 8px 26px rgba(25,25,25,.045); }
.composer:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(134,0,33,.07); }
.composer textarea { width: 100%; min-height: 48px; max-height: 130px; padding: 1px 0 0; border: 0; resize: none; outline: 0 !important; color: var(--ink); font-size: 12px; }
.composer textarea::placeholder, .transcript-input::placeholder { color: #918c89; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; }
.quiet-button { padding: 5px 2px; border: 0; background: none; color: var(--brand); font-size: 11px; font-weight: 700; }
.quiet-button.listening { color: #c44343; }
.send-button { width: 34px; height: 34px; border: 0; border-radius: 4px; background: var(--brand); color: white; font-size: 19px; line-height: 1; }

.calls-view { overflow: auto; padding-bottom: 30px; }
.upload-card { min-height: 125px; margin: 0 42px 20px; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px dashed #c9a7aa; border-radius: 5px; background: #fdf9f8; color: var(--brand); text-align: center; cursor: pointer; }
.upload-card:hover { border-color: var(--brand); background: #fbf3f1; }
.upload-card > span { font-size: 24px; line-height: 1; }
.upload-card strong { font-size: 12px; }
.upload-card small { color: var(--muted); font-size: 10px; }
.input-label { margin: 0 42px 8px; }
.transcript-input { min-height: 165px; margin: 0 42px; padding: 13px; border: 1px solid #d8d4d1; border-radius: 4px; background: white; color: var(--ink); resize: vertical; font-size: 12px; }
.calls-view > .primary-button { width: auto; min-width: 185px; margin: 17px 42px 22px; }
.availability-note { margin: -8px 42px 22px; color: var(--muted); font-size: 11px; }
.report { padding: 0 42px; }
.report-card { padding: 17px 19px; margin: 0 0 10px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 4px; background: white; }
.report-card h3 { margin: 0 0 8px; color: var(--brand); font-family: 'Crimson Text', Georgia, serif; font-size: 19px; font-weight: 600; }
.report-card p { margin: 0; color: #4e4845; font-size: 12px; white-space: pre-wrap; }
.report-action { padding: 11px 0; border-top: 1px solid #eee8e5; }
.report-action:first-of-type { border-top: 0; }
.report-action p { margin: 0 0 9px; }
.report-action .action-meta { color: var(--muted); font-size: 11px; }
.report-action button:not(.select-button) { padding: 7px 10px; border: 1px solid #d5b9bb; border-radius: 4px; background: #fcf7f5; color: var(--brand); font-size: 10px; font-weight: 700; }

.account-panel { position: absolute; z-index: 10; top: 0; right: 0; width: min(360px, 100%); height: 100%; min-height: 460px; padding: 25px 25px 35px; border-left: 1px solid var(--line); background: var(--paper); box-shadow: -16px 0 35px rgba(25,25,25,.13); overflow: auto; }
.account-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 14px; border-bottom: 2px solid var(--brand); }
.account-title strong { font-family: 'Crimson Text', Georgia, serif; font-size: 23px; font-weight: 600; }
.icon-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--brand); font-size: 21px; line-height: 1; }
.account-panel > p { color: var(--muted); font-size: 12px; }
.account-status { display: grid; gap: 10px; margin: 22px 0; font-size: 11px; }
.account-status div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.account-status b { color: var(--brand); text-align: right; }
.secondary-button { width: 100%; padding: 11px; border: 1px solid var(--brand); border-radius: 4px; background: var(--brand); color: white; font-size: 12px; font-weight: 700; }
.secondary-button:hover { background: var(--brand-dark); }
.text-button { display: block; padding: 10px 0; border: 0; background: none; color: var(--brand); font-size: 11px; font-weight: 700; }
.text-button.danger { color: #9e4343; }
.privacy-note { margin-top: 25px !important; color: #89827e !important; font-size: 10px !important; line-height: 1.6; }

@media (max-width: 700px) {
  .topbar { min-height: 75px; padding: 7px 19px; }
  .brand { gap: 10px; }
  .brand-logo { width: 91px; height: 55px; }
  .brand-divider { height: 28px; }
  .brand-copy strong { font-size: 10px; }
  .brand-copy span { font-size: 9px; }
  .account-button { padding: 8px 9px; font-size: 11px; gap: 6px; }
  .footer { padding: 9px 20px; font-size: 9px; }
  .login-screen { display: flex; flex-direction: column; min-height: 0; }
  .login-story { min-height: 235px; padding: 26px 29px; }
  .login-story-rule { margin-bottom: 17px; }
  .login-story h1 { font-size: 38px; }
  .login-story p:not(.eyebrow), .login-story-logo { display: none; }
  .login-area { flex: 1; padding: 32px 28px 38px; }
  .login-card h2 { font-size: 39px; }
  .intro { margin-bottom: 26px; }
  .status-banner { margin: 17px 19px 0; }
  .tabs { margin: 0 20px; padding-top: 16px; gap: 23px; }
  .section-heading { padding: 24px 20px 17px; }
  .section-heading h2 { font-size: 28px; }
  .conversation { padding: 0 20px 20px; }
  .welcome-card { padding: 22px 20px; }
  .composer { margin: auto 19px 20px; }
  .upload-card { margin: 0 20px 18px; }
  .input-label { margin: 0 20px 8px; }
  .transcript-input { margin: 0 20px; }
  .calls-view > .primary-button { margin: 15px 20px 22px; }
  .availability-note { margin: -7px 20px 20px; }
  .report { padding: 0 20px; }
}
@media (max-width: 350px) {
  .brand-copy, .brand-divider { display: none; }
  .login-story { min-height: 215px; }
  .login-story h1 { font-size: 34px; }
  .tab { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
