@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/InterVariable.2bf3d951bf9d.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #686868;
  --line: #e5e5e5;
  --surface: #f7f7f7;
  --success: #256344;
  --success-bg: #eff7f1;
  --warning: #855513;
  --warning-bg: #fff8eb;
  --error: #ad3131;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 15px/1.6 Inter, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 4px; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.site-header { border-bottom: 1px solid var(--line); }
.demo-banner { background: var(--warning-bg); color: #71541e; border-bottom: 1px solid #efe3c9; }
.demo-banner p { max-width: 1176px; margin: 0 auto; padding: 10px 28px; font-size: 12px; }
.header-inner { max-width: 1176px; min-height: 76px; padding: 0 28px; margin: 0 auto; display: flex; align-items: center; gap: 40px; }
.brand { font-size: 30px; font-weight: 750; text-decoration: none; letter-spacing: -1.5px; line-height: 1; white-space: nowrap; }
.header-inner > .small { margin-left: auto; }
.main-nav, .account-nav { display: flex; align-items: center; gap: 24px; font-size: 13px; }
.main-nav a { padding: 27px 0 23px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; white-space: nowrap; }
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current] { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.main-nav .staff-nav { margin-left: 16px; }
.account-nav { margin-left: auto; gap: 16px; }
.account-nav form { margin: 0; }
.username { color: var(--muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.text-button { background: none; border: 0; padding: 10px 0; cursor: pointer; color: var(--muted); font-size: 13px; }
.text-button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.page { max-width: 1176px; margin: 0 auto; padding: 56px 28px 80px; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 12px; overflow-wrap: anywhere; font-weight: 600; }
h1 { font-size: clamp(25px, 3vw, 32px); letter-spacing: -1px; }
h2 { font-size: 19px; letter-spacing: -.4px; }
h3 { font-size: 16px; }
p { margin: 0 0 16px; overflow-wrap: anywhere; }
.intro { color: var(--muted); font-size: 16px; max-width: 650px; margin-bottom: 36px; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 500; margin-bottom: 10px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; min-width: 0; }
.home-grid { display: grid; grid-template-columns: 1.4fr 1fr; border: 1px solid var(--line); border-radius: 8px; margin-top: 40px; }
.home-tutorial { display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 28px; }
.home-tutorial video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; background: #171817; }
.home-primary, .home-secondary { padding: 32px; min-width: 0; }
.home-secondary { border-left: 1px solid var(--line); }
.home-grid h2 { margin-bottom: 12px; }
.home-grid .progress { margin-top: 28px; }
.home-grid .progress progress { flex: 1; max-width: 160px; }
.completion-note { margin: 12px 0 0; font-size: 13px; color: var(--success); }
.actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 28px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 44px; padding: 10px 16px; background: var(--ink); color: #fff; font-weight: 500; font-size: 13px; border: 1px solid var(--ink); border-radius: 5px; cursor: pointer; text-align: center; text-decoration: none; line-height: 1.5; }
.button:hover { background: #353535; }
.button.secondary { background: #fff; color: var(--ink); border-color: #d4d4d4; }
.button.secondary:hover { background: var(--surface); border-color: #aaa; }
.button:disabled { background: #eee; border-color: #e5e5e5; color: #737373; cursor: not-allowed; }
.badge { display: inline-flex; align-items: center; gap: 7px; border-radius: 4px; padding: 4px 8px; font-size: 12px; line-height: 1.5; background: #f2f2f2; color: #5c5c5c; font-weight: 500; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge.reviewed, .badge.decision-good, .badge.rating-4, .badge.rating-5 { background: var(--success-bg); color: var(--success); }
.badge.warning, .badge.decision-needs_improvement, .badge.rating-1, .badge.rating-2 { background: var(--warning-bg); color: var(--warning); }
.progress { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.progress span { white-space: nowrap; }
progress { appearance: none; border: 0; border-radius: 8px; overflow: hidden; width: 110px; height: 4px; background: var(--line); accent-color: var(--ink); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--ink); border-radius: 8px; }
progress::-moz-progress-bar { background: var(--ink); border-radius: 8px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 12px; }
.page-heading h1 { margin-bottom: 0; }
.page-heading .progress { flex-shrink: 0; }
.back-link { display: inline-block; margin-bottom: 24px; font-size: 13px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--ink); text-decoration: underline; }
.list-heading { display: flex; justify-content: space-between; padding: 0 46px 12px 16px; color: var(--muted); font-size: 12px; }
.example-list { border-top: 1px solid var(--line); }
.example-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 24px; padding: 22px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.example-row:hover { background: var(--surface); }
.example-row h2, .example-row h3 { margin-bottom: 4px; font-size: 15px; letter-spacing: 0; }
.example-row p { margin: 0; color: var(--muted); font-size: 13px; max-width: 650px; }
.example-row > span:last-child { color: var(--muted); }
.empty-state { padding: 40px 16px; color: var(--muted); }
.empty-state h2 { color: var(--ink); }
.empty-state p { max-width: 540px; }
.review-heading { margin-bottom: 32px; }
.review-heading h1 { font-size: clamp(24px, 2.5vw, 28px); }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 352px; align-items: start; gap: 32px; }
.conversation-column { display: grid; gap: 24px; min-width: 0; }
.review-workspace { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
.review-workspace .conversation-column { background: #f8fafb; border: 1px solid #edf0f2; border-radius: 10px; padding: 28px; }
.review-workspace .context { background: transparent; border-bottom: 1px solid #e3e9ed; border-radius: 0; padding: 0 0 24px; }
.review-workspace .transcript-card { background: transparent; }
.review-workspace .turn { width: fit-content; max-width: 90%; margin: 0 0 20px; }
.review-workspace .turn.agent { background: #eaf1f7; }
.review-workspace .turn.agent .speaker { color: #425e77; }
.review-workspace .turn.customer { border: 0; margin-left: auto; }
.review-workspace .turn:last-child { margin-bottom: 0; }
.review-workspace .feedback-panel textarea { min-height: 104px; }
.context { background: var(--surface); border: 0; }
.context h2 { font-size: 15px; }
.context p { font-size: 14px; }
.context p.small { font-size: 12px; }
.context p:last-child { margin-bottom: 0; }
.invoice-details { font-size: 13px; }
.invoice-details summary { color: var(--muted); }
.invoice-details > p { margin: 12px 0 0; }
.invoices { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.invoices li { padding: 10px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 12px; overflow-wrap: anywhere; }
.invoices span { color: var(--muted); }
.transcript-card { padding: 0; border: 0; }
.transcript-card > h2 { font-size: 15px; margin-bottom: 20px; }
.transcript { padding: 2px; }
.turn { margin: 0 32px 20px 0; padding: 16px 18px; background: var(--surface); border-radius: 6px; }
.turn.customer { background: #fff; border: 1px solid var(--line); margin-left: 32px; margin-right: 0; }
.speaker { font-size: 12px; font-weight: 600; }
.turn p { margin: 4px 0 0; white-space: pre-wrap; font-size: 14px; line-height: 1.75; }
.delivery-note { display: block; margin-top: 8px; font-size: 12px; }
.delivery-warning { color: var(--warning); }
.feedback-panel { position: sticky; top: 24px; }
.feedback-panel h2 { font-size: 17px; }
.feedback-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.feedback-heading h2 { margin: 0; }
.save-feedback { font-size: 12px; line-height: 1.5; color: var(--muted); }
.save-feedback[data-state="saved"] { color: var(--success); background: var(--success-bg); border-radius: 4px; padding: 3px 6px; }
.field { margin: 24px 0; }
label, legend { font-size: 13px; font-weight: 500; }
.field label { display: block; margin-bottom: 8px; }
input:not([type=radio]):not([type=hidden]), textarea { max-width: 100%; width: 100%; padding: 11px 12px; border: 1px solid #bdbdbd; border-radius: 5px; background: #fff; color: var(--ink); }
textarea { display: block; resize: vertical; min-height: 120px; font-size: 14px; }
textarea::placeholder { color: #737373; }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--error); }
input[type=radio] { accent-color: var(--ink); width: 17px; height: 17px; margin: 2px 10px 0 0; flex-shrink: 0; vertical-align: middle; }
fieldset { border: 0; margin: 24px 0 0; padding: 0; min-width: 0; }
legend { margin-bottom: 10px; padding: 0; }
#id_selection { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#id_selection label { padding: 16px 12px; border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: center; cursor: pointer; }
#id_selection label:hover { background: var(--surface); }
#id_selection label:has(input:checked) { border-color: var(--ink); background: var(--surface); }
.visually-hidden, .star-option input[type=radio] { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.star-rating { display: flex; justify-content: space-between; gap: 2px; }
.star-option { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 5px; cursor: pointer; }
.star-option svg { width: 32px; height: 32px; fill: none; stroke: #737373; stroke-width: 1.5; stroke-linejoin: round; }
.star-option:has(input:checked) svg, .star-option:has(~ .star-option input:checked) svg { fill: var(--ink); stroke: var(--ink); }
.star-option:hover { background: var(--surface); }
.star-option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.rating-caption { margin: 8px 0 4px; min-height: 21px; font-size: 13px; font-weight: 500; }
.rating-hint { color: var(--muted); font-weight: 400; }
.rating-value, .rating-field:has(input:checked) .rating-hint { display: none; }
.rating-field:has(input[value="1"]:checked) .rating-value-1,
.rating-field:has(input[value="2"]:checked) .rating-value-2,
.rating-field:has(input[value="3"]:checked) .rating-value-3,
.rating-field:has(input[value="4"]:checked) .rating-value-4,
.rating-field:has(input[value="5"]:checked) .rating-value-5 { display: inline; }
.rating-scale { margin: 0; font-size: 12px; color: var(--muted); }
.field-help { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.feedback-actions { display: grid; gap: 8px; }
.feedback-actions .errorlist { padding: 0; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.saved-note { background: var(--success-bg); color: var(--success); border-radius: 4px; padding: 10px 12px; font-size: 12px; }
.notice { padding: 12px 16px; border-left: 3px solid #a3a3a3; background: var(--surface); font-size: 13px; }
.notice.success { color: var(--success); background: var(--success-bg); border-color: var(--success); }
.notice.warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning); }
.notice.error { color: var(--error); background: #fff3f3; border-color: var(--error); }
.errorlist { color: var(--error); font-size: 13px; padding-left: 20px; }
.errorlist:empty { display: none; }
.login-card { max-width: 400px; margin: 32px auto; padding: 0; border: 0; }
.login-card h1 { font-size: 26px; }
.login-card .button { width: 100%; }
.login-card > .small { margin: 24px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.import-panel { max-width: 740px; margin: 24px 0 36px; }
.metadata { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; font-size: 12px; }
.feedback-list { display: grid; gap: 16px; border: 0; }
.feedback-comment { margin-bottom: 18px; overflow-wrap: anywhere; }
summary { cursor: pointer; font-weight: 500; padding: 4px 0; }
dt { margin-top: 12px; font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; color: var(--muted); }
.additional-note { border-top: 1px solid var(--line); padding-top: 20px; font-size: 13px; }
.skip-link { position: absolute; left: 16px; top: -100px; background: #fff; padding: 10px; z-index: 20; }
.skip-link:focus { top: 10px; }
.chat-setup { max-width: 600px; margin: 0 auto; }
.chat-start { padding: 28px; margin-bottom: 20px; }
.chat-start form fieldset { margin-top: 0; }
.chat-start .notice { margin: 20px 0 0; }
.page:has(.chat-workspace) { padding-top: 32px; }
.chat-intro { margin-bottom: 24px; }
.chat-workspace { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.chat-layout { position: relative; display: grid; gap: 20px; min-width: 0; padding: 24px; border: 1px solid #edf0f2; border-radius: 10px; background: #f8fafb; }
.chat-loading { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 32px; border-radius: inherit; background: rgb(248 250 251 / 96%); text-align: center; }
.chat-loading[hidden] { display: none; }
.chat-loading p { margin: 0; max-width: 360px; font-size: 17px; font-weight: 500; }
.chat-spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; }
.chat-layout .transcript { max-height: 50vh; min-height: 140px; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
.chat-layout .turn { width: fit-content; max-width: 90%; margin: 0 0 20px; }
.chat-layout .turn.agent { background: #eaf1f7; }
.chat-layout .turn.agent .speaker { color: #425e77; }
.chat-layout .turn.customer { border: 0; margin-left: auto; }
.chat-layout .turn:last-child { margin-bottom: 0; }
.chat-layout .field { margin: 0 0 12px; }
.chat-status { color: var(--muted); font-size: 13px; margin: -8px 0 20px; }
.chat-status.warning { color: var(--warning); }
.chat-composer { border-top: 1px solid var(--line); padding-top: 20px; }
.chat-composer textarea { min-height: 90px; }
.chat-context h2 { font-size: 16px; margin-bottom: 24px; }
.chat-context .eyebrow { margin-bottom: 4px; }
.chat-context h3 { font-size: 15px; margin-bottom: 8px; }
.chat-context .invoices li { display: grid; grid-template-columns: 1fr auto; padding: 16px 0; border-bottom: 1px solid var(--line); }
.chat-context .invoice-amount { color: var(--ink); }
.chat-context .invoice-due { grid-column: 1 / -1; }
.chat-context .field-help { margin-top: 20px; margin-bottom: 0; }
.chat-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.chat-actions .text-button { text-decoration: underline; }

@media (min-width: 761px) {
  .chat-layout .transcript { max-height: clamp(140px, calc(100dvh - 630px), 440px); }
}
@media (max-height: 960px) {
  .feedback-panel { position: static; }
}
@media (max-width: 1000px) {
  .header-inner { flex-wrap: wrap; gap: 0 24px; padding-top: 20px; }
  .account-nav { order: 1; }
  .main-nav { order: 2; width: 100%; overflow-x: auto; }
  .main-nav a { padding: 20px 0 14px; }
  .header-inner > .small { padding-bottom: 20px; }
  .header-inner:has(> .small) .brand { padding-bottom: 20px; }
  .review-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
}
@media (max-width: 760px) {
  .header-inner { padding-left: 20px; padding-right: 20px; }
  .demo-banner p { padding: 10px 20px; }
  .main-nav { gap: 22px; }
  .main-nav .staff-nav { margin-left: 0; }
  .username { max-width: 110px; }
  .page { padding: 32px 20px 48px; }
  .home-grid, .home-tutorial, .review-grid, .chat-workspace { grid-template-columns: 1fr; }
  .home-grid { margin-top: 28px; }
  .home-primary, .home-secondary { padding: 24px; }
  .home-secondary { border-left: 0; border-top: 1px solid var(--line); }
  .page-heading { flex-direction: column; }
  .intro { font-size: 15px; margin-bottom: 28px; }
  .card { padding: 20px; }
  .feedback-panel { position: static; }
  .transcript-card { padding: 0; }
  .list-heading { display: none; }
  .example-row { grid-template-columns: minmax(0, 1fr) 16px; gap: 12px; padding: 20px 4px; }
  .example-row .badge { grid-column: 1; grid-row: 2; justify-self: start; }
  .example-row > span:last-child { grid-column: 2; grid-row: 1; }
  .turn { margin-right: 16px; padding: 14px; }
  .turn.customer { margin-left: 16px; }
  .login-card { padding: 0; margin-top: 16px; }
  .chat-layout { padding: 20px 16px; }
  .chat-workspace { gap: 24px; }
  .review-workspace .conversation-column { padding: 20px 16px; }
  .review-workspace .turn { max-width: 94%; }
}
@media (max-width: 480px) {
  #id_selection { grid-template-columns: 1fr; gap: 8px; }
  #id_selection label { padding: 12px; }
  .header-inner { column-gap: 16px; }
  .brand { font-size: 30px; }
  .username, .header-inner > .small { display: none; }
  .header-inner:has(> .small) { padding-bottom: 20px; }
  .header-inner:has(> .small) .brand { padding-bottom: 0; }
}
@media (min-width: 761px) and (min-height: 760px) {
  .review-workspace .feedback-panel { position: sticky; }
}
@media (prefers-reduced-motion: no-preference) {
  .chat-spinner { animation: chat-spin .8s linear infinite; }
  .example-row { transition: background-color .12s ease, border-color .12s ease; }
  .save-feedback[data-state="saved"] { animation: saved-feedback .18s ease-out; }
}
@keyframes chat-spin {
  to { transform: rotate(360deg); }
}
@keyframes saved-feedback {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
