@font-face {
  font-family: Jost;
  src: url("./assets/jost-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: Jost;
  src: url("./assets/jost-latin-ext.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: Jost;
  src: url("./assets/jost-cyrillic.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
:root {
  color-scheme: light;
  --ink: #000548;
  --muted: #5c6178;
  --line: #dcdfe8;
  --field: #858ba2;
  --paper: #f7f8fb;
  --white: #fff;
  --blue: #21409a;
  --blue-dark: #1a347f;
  --blue-pale: #e3e8f6;
  --green: #17704a;
  --amber: #8f4a12;
  --red: #b3261e;
  --large: 27px;
  --normal: 17px;
  --small: 15px;
}
* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--normal)/1.5 Jost, Tahoma, "Segoe UI", Arial, sans-serif;
}
[hidden] { display: none !important; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
input, textarea { caret-color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--blue-pale); color: var(--ink); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.icon { display: inline-grid; place-items: center; flex: none; }
.head {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  padding: 8px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.logo { display: block; height: 28px; width: auto; }
.save-status { margin: 0 0 0 auto; color: var(--muted); font-size: var(--small); text-align: right; }
.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 10px;
  min-height: 38px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--small);
  line-height: 1.4;
  text-align: center;
}
.banner .link { color: var(--ink); }
#resume-short { display: none; }
.manual-link { width: min(100%, 390px) !important; }
.layout {
  display: grid;
  grid-template: "main facts" / minmax(0, 1fr) 260px;
  gap: 56px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 36px 32px 44px;
}
.main { grid-area: main; min-width: 0; }
.facts { grid-area: facts; min-width: 0; padding-top: 6px; }
.main h1 {
  margin: 0 0 6px;
  font-weight: 500;
  font-size: var(--large);
  line-height: 1.2;
  text-wrap: balance;
}
.intro {
  max-width: 62ch;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: var(--small);
  line-height: 1.45;
  text-wrap: pretty;
}
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: var(--small);
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: var(--field);
  text-underline-offset: 3px;
}
.link:hover { color: var(--ink); text-decoration-color: currentColor; }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 21px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
}
.primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.primary:disabled { border-color: var(--line); background: var(--line); color: var(--muted); cursor: default; }
.primary-small { min-height: 36px; padding: 0 16px; font-size: var(--small); }
.kicker, .small {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: var(--small);
  line-height: 1.4;
}
.small { margin: 0; }
.rows { margin: 0; padding: 0; list-style: none; }
.fact-row { padding: 0 0 14px; }
.fact-row:last-child { padding: 0; }
.key { display: block; color: var(--muted); font-size: var(--small); line-height: 1.4; }
.value { display: block; overflow-wrap: anywhere; }
.fact-changed { margin: 2px 0 0; color: var(--amber); font-size: var(--small); }
.fact-followup { margin-top: 20px; }
.fact-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.fact-action { margin-top: 14px; }
.fact-header { display: none; }

.progress { margin-bottom: 12px; }
.progress-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  min-height: 24px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--small);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.progress-track { display: block; width: 100%; height: 4px; border: 0; overflow: hidden; border-radius: 999px; background: var(--line); appearance: none; }
.progress-track::-webkit-progress-bar { background: var(--line); }
.progress-track::-webkit-progress-value { border-radius: 999px; background: var(--blue); }
.progress-track::-moz-progress-bar { border-radius: 999px; background: var(--blue); }
.receipt { color: var(--green); }
.chat { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.chat.dragging { outline: 2px dashed var(--blue); outline-offset: 3px; }
.stream {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 21px 22px 19px;
  border-radius: 12px 12px 0 0;
  scrollbar-width: thin;
  scrollbar-color: var(--field) transparent;
  overscroll-behavior-y: contain;
}
.message { max-width: 54ch; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: pretty; }
.question-prompt { font-weight: 500; }
.message.client {
  align-self: flex-end;
  padding: 8px 14px;
  border-radius: 16px 16px 4px 16px;
  background: var(--blue-pale);
}
.message.file { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.message.file a { overflow-wrap: anywhere; }
.file-scope, .file-suggestion { flex: 0 0 100%; }
.record { align-self: flex-start; width: min(100%, 480px); }
.record-heading { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; color: var(--green); font-size: var(--small); line-height: 1.4; }
.record-row {
  display: grid;
  grid-template-columns: minmax(0, 10.5em) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1px 12px;
  padding: 3px 0;
}
.record-row .previous, .record-row .source { display: block; font-size: var(--small); line-height: 1.35; }
.record-row .previous { color: var(--amber); }
.record-row .source { color: var(--muted); }
.record-row .undone { color: var(--muted); text-decoration: line-through; }
.dock { border-top: 1px solid var(--line); background: var(--paper); }
.dock-form { display: grid; gap: 10px; padding: 16px 22px; }
.dock-fields { display: grid; gap: 10px; }
.field-row { display: grid; grid-template-columns: minmax(0, 185px) minmax(0, 1fr); gap: 6px 16px; align-items: start; }
.field-label { padding-top: 9px; line-height: 1.4; }
.field-control { min-width: 0; }
.fact-content .field-row { display: block; }
.fact-content .field-label { display: block; margin: 0 0 5px; padding: 0; color: var(--muted); font-size: var(--small); }
.input, .unit, .tags {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: var(--white);
}
.input { display: block; min-width: 0; padding: 8px 12px; line-height: 1.4; }
.input.upper { text-transform: uppercase; }
.input.upper::placeholder { text-transform: none; }
textarea.input { resize: vertical; }
.input::placeholder, .tags input::placeholder, .composer textarea::placeholder { color: #6b7088; }
.input:focus, .unit:focus-within, .tags:focus-within { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 1px; }
.unit { display: flex; align-items: center; }
.unit .input { flex: 1; min-height: 42px; border: 0; background: transparent; outline: 0; }
.unit .input:disabled { color: var(--muted); }
.unit-label { padding: 0 12px; color: var(--muted); font-size: var(--small); white-space: nowrap; }
.unit-label:first-child { padding-right: 0; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 6px; }
.tags input { flex: 1; min-width: min(100%, 135px); min-height: 32px; padding: 0 6px; border: 0; background: transparent; outline: 0; }
.chips { display: contents; }
.tag { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 2px 2px 2px 10px; border-radius: 999px; background: var(--blue-pale); font-size: var(--small); }
.tag-remove { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.tag-remove:hover { color: var(--ink); }
.options {
  position: fixed;
  z-index: 10;
  inset: auto;
  max-height: 224px;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 6px 20px #00054820;
  list-style: none;
}
.options li { min-height: 34px; padding: 4px 8px; border-radius: 4px; }
.options li[role="option"] { cursor: pointer; }
.options li[role="option"]:hover, .options li[aria-selected="true"] { background: var(--blue-pale); }
.options .custom-option { color: var(--blue); }
.no-option { color: var(--muted); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 40px; padding: 0 16px; border: 1px solid var(--field); border-radius: 999px; background: var(--white); line-height: 1.2; }
.pill:hover { border-color: var(--ink); }
.pill[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--white); }
.check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: var(--small); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.error, .field-source, .field-hint { margin: 5px 0 0; font-size: var(--small); line-height: 1.4; overflow-wrap: anywhere; }
.error { color: var(--red); }
.field-source { color: var(--green); }
.field-hint { color: var(--muted); }
.dock-actions { display: flex; flex-direction: row-reverse; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 4px; }
.chat-foot { padding: 12px 14px 14px; }
.composer { display: flex; align-items: flex-end; gap: 2px; padding: 4px 6px; border: 1px solid var(--field); border-radius: 26px; background: var(--white); }
.composer:focus-within { border-color: var(--blue); }
.composer-input {
  flex: 1;
  min-width: 0;
  position: relative;
}
.composer-input::after, .composer textarea {
  box-sizing: border-box;
  min-height: 36px;
  max-height: 140px;
  padding: 5px 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Size the field for wrapped text even without native field-sizing support. */
.composer-input::after {
  content: attr(data-text) "\200b";
  display: block;
  visibility: hidden;
  overflow: hidden;
}
.composer textarea {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  resize: none;
}
.composer textarea:focus-visible { outline: 0; }
.composer:has(textarea:focus-visible) { outline: 2px solid var(--blue); outline-offset: 1px; }
.icon-button, .send-button {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
}
.icon-button:hover, .icon-button[aria-pressed="true"] { background: var(--blue-pale); color: var(--ink); }
.icon-button[aria-disabled="true"] { color: var(--muted); cursor: help; }
.send-button { background: var(--blue); color: var(--white); }
.send-button:hover { background: var(--blue-dark); }
.send-button:disabled { background: var(--line); color: var(--muted); cursor: default; }
.composer-status { margin: 6px 8px 0; color: var(--muted); font-size: var(--small); line-height: 1.4; }
.message-activity { display: flex; align-items: center; gap: 8px; margin: 0 8px 7px; }
.activity-dots { display: inline-flex; align-items: center; gap: 3px; }
.activity-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: activity-dot 1.2s ease-in-out infinite;
}
.activity-dots i:nth-child(2) { animation-delay: 120ms; }
.activity-dots i:nth-child(3) { animation-delay: 240ms; }
@keyframes activity-dot {
  0%, 60%, 100% { opacity: .45; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.lookup { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.lookup-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 18px 8px 22px;
  border: 0;
  border-radius: 12px;
  background: none;
  text-align: left;
}
.lookup-toggle:hover { background: var(--paper); }
.lookup-title { margin-right: auto; }
.lookup-toggle .icon { color: var(--muted); transition: transform 150ms ease; }
.lookup-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.lookup-body { padding: 4px 22px 20px; }
.lookup-section + .lookup-section { margin-top: 20px; }
.topic {
  display: grid;
  grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0 16px;
  width: 100%;
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  background: none;
  text-align: left;
  line-height: 1.4;
}
.topic.question .topic-label { grid-column: 1 / 3; }
.topic .action { grid-column: 3; text-align: right; }
button.topic .action { text-decoration: underline; text-decoration-color: var(--field); text-underline-offset: 3px; }
button.topic:hover .action { color: var(--ink); text-decoration-color: currentColor; }

@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 36px; padding: 28px 24px 36px; }
}
@media (min-width: 721px) and (min-height: 630px) {
  .typed-portal {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: 100dvh;
  }
  .layout { width: 100%; grid-template-rows: minmax(0, 1fr); padding-block: 24px; }
  .facts { align-self: start; max-height: 100%; overflow-y: auto; scrollbar-width: thin; }
  .main { display: flex; flex-direction: column; min-height: 0; }
  .main > :not(.chat) { flex: none; }
  .intro { margin-bottom: 16px; }
  .chat { display: grid; grid-template-rows: minmax(88px, 1fr) minmax(0, max-content) auto; min-height: 0; }
  .stream { min-height: 0; overflow-y: auto; }
  .dock { display: flex; flex-direction: column; min-height: 0; }
  .dock-form { min-height: 0; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; padding-block: 12px; }
  .dock-fields, .lookup-body { min-height: 0; overflow-y: auto; scrollbar-width: thin; overscroll-behavior-y: contain; }
  .dock-fields { gap: 8px; margin: -4px; padding: 4px; }
  .chat-foot { grid-row: 3; }
  .lookup-body { max-height: clamp(96px, 24dvh, 220px); }
}
@media (max-width: 720px) {
  .head { min-height: 52px; padding: 6px 16px; }
  .logo { height: 23px; }
  .banner { min-height: 44px; gap: 0 8px; padding: 0 14px; }
  .banner .link { min-height: 44px; }
  #resume { display: none; }
  #resume-short { display: inline; }
  .layout { grid-template: "facts" "main" / minmax(0, 1fr); gap: 0; padding: 0; }
  .facts { padding: 0 16px; border-bottom: 1px solid var(--line); }
  .fact-header { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 0; border: 0; background: none; text-align: left; }
  .fact-header .risk-name { overflow-wrap: anywhere; font-weight: 500; }
  .fact-header .action { text-align: right; }
  .facts:not(.facts-open) .fact-content { display: none; }
  .fact-content { padding-bottom: 16px; }
  .fact-content .link, .fact-content .primary { min-height: 44px; }
  .main { padding: 21px 16px 28px; }
  .main h1 { font-size: 24px; }
  .intro { margin-bottom: 16px; }
  .progress-row { align-items: center; }
  .progress-row .link, .record-row .link, .message.file .link { min-height: 44px; }
  .record-row .link { min-width: 44px; }
  .stream { padding: 16px; }
  .dock-form { padding: 14px 16px; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .field-label { padding: 0; color: var(--muted); font-size: var(--small); }
  .dock-actions { flex-direction: column; align-items: stretch; gap: 2px; }
  .dock-actions .primary, .dock-actions .link, .pill, .tag-remove, .options li, .check { min-height: 44px; }
  .tag-remove { width: 44px; }
  .chat-foot { padding: 10px 12px 12px; }
  .icon-button, .send-button { width: 44px; height: 44px; }
  .composer-input::after, .composer textarea { min-height: 44px; padding-top: 9px; }
  .record-row { grid-template-columns: minmax(0, 1fr) auto; }
  .record-row .key, .record-row .value { grid-column: 1; }
  .record-row > .link, .record-row > .undone-state { grid-area: 1 / 2 / span 2; align-self: center; }
  .lookup-toggle { padding: 8px 12px 8px 16px; }
  .lookup-body { padding: 4px 16px 16px; }
  .topic { min-height: 44px; align-items: center; grid-template-columns: minmax(0, 1fr) auto; }
  .topic .topic-label, .topic.question .topic-label, .topic .value { grid-column: 1; }
  .topic .action { grid-area: 1 / 2 / span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .lookup-toggle .icon { transition: none; }
  .activity-dots i { animation: none; }
}
