:root {
  color-scheme: light;
  --navy-950: #081c27;
  --navy-900: #0d2a38;
  --navy-800: #153b4a;
  --navy-700: #245264;
  --teal-700: #14736e;
  --teal-600: #16877f;
  --teal-100: #dcefed;
  --teal-50: #eff8f7;
  --orange-600: #d9662b;
  --orange-500: #ec7a36;
  --orange-100: #fbe9db;
  --ink: #1b2b33;
  --muted: #5c6d75;
  --line: #d7dfe1;
  --line-strong: #bcc9cc;
  --paper: #ffffff;
  --canvas: #f2f4f3;
  --soft: #f8f9f8;
  --warning: #8d4c21;
  --error: #a43b32;
  --success: #20815f;
  --shadow: 0 18px 45px rgba(8, 28, 39, 0.08);
  --radius-sm: 5px;
  --radius-md: 9px;
  --radius-lg: 13px;
  --page-width: 1480px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
}

body.has-open-dialog {
  overflow: hidden;
}

button,
textarea,
input {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

svg {
  display: block;
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.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;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--orange-600);
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(236, 122, 54, 0.4);
  outline-offset: 3px;
}

.topbar {
  color: #f6fbfc;
  background: var(--navy-900);
  border-bottom: 3px solid var(--orange-500);
}

.topbar__inner {
  width: min(var(--page-width), calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-left: 4px solid var(--orange-500);
  font-family: "Arial Narrow", Inter, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand__copy {
  display: grid;
  gap: 2px;
}

.brand__copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.17rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand__copy span {
  color: #aec3cc;
  font-size: 0.69rem;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.guide-open {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  color: #edf6f8;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.guide-open:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.3);
}

.guide-open > svg {
  width: 21px;
  height: 21px;
  color: #f2aa72;
}

.guide-open__copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.guide-open__copy strong {
  font-size: 0.75rem;
  line-height: 1;
}

.guide-open__copy small {
  color: #aec3cc;
  font-size: 0.61rem;
  line-height: 1;
}

.system-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 205px;
  padding: 9px 9px 9px 13px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
}

.system-state__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: #8fa0a8;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(143, 160, 168, 0.14);
}

.system-state.is-online .system-state__dot {
  background: #65d4a7;
  box-shadow: 0 0 0 4px rgba(101, 212, 167, 0.15);
}

.system-state.is-offline .system-state__dot {
  background: #efaa72;
  box-shadow: 0 0 0 4px rgba(239, 170, 114, 0.16);
}

.system-state__copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  flex: 1;
}

.system-state__label {
  font-size: 0.76rem;
  font-weight: 700;
}

.system-state__provider {
  max-width: 150px;
  overflow: hidden;
  color: #aec3cc;
  font-size: 0.66rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  padding: 0;
  color: #c7d7dc;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.icon-button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.icon-button.is-refreshing svg {
  animation: rotate 850ms linear infinite;
}

.centre-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.centre-nav__inner {
  width: min(var(--page-width), calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.centre-nav__label,
.version-mark {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.version-mark {
  margin-left: auto;
  white-space: nowrap;
}

.centre-switch {
  align-self: stretch;
  display: flex;
}

.centre-switch__button {
  position: relative;
  min-width: 245px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 26px;
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  cursor: pointer;
}

.centre-switch__button:last-child {
  border-right: 1px solid var(--line);
}

.centre-switch__button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
}

.centre-switch__button:hover {
  background: var(--soft);
}

.centre-switch__button.is-active {
  color: var(--navy-900);
  background: var(--teal-50);
}

.centre-switch__button.is-active::after {
  background: var(--teal-600);
}

.centre-switch__index {
  color: var(--teal-700);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
}

.centre-switch__button > span:last-child {
  display: grid;
  gap: 3px;
}

.centre-switch__button strong {
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.centre-switch__button small {
  color: var(--muted);
  font-size: 0.7rem;
}

.workspace {
  width: min(var(--page-width), calc(100% - 48px));
  margin: 28px auto 40px;
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  grid-template-areas: "rail chat";
  gap: 28px;
  align-items: start;
}

.briefing-rail {
  grid-area: rail;
  padding: 8px 6px 24px 0;
}

.path-summary {
  padding: 4px 14px 24px 2px;
  border-bottom: 1px solid var(--line-strong);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--teal-700);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.path-summary h1 {
  max-width: 310px;
  margin: 0;
  color: var(--navy-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 2vw, 2.15rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.path-summary > p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.62;
}

.starter-section {
  padding: 23px 0 25px;
  border-bottom: 1px solid var(--line-strong);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 10px 2px;
}

.section-heading h2,
.pack-preview h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 780;
  letter-spacing: 0.01em;
}

.section-heading > span {
  color: var(--orange-600);
}

.starter-list {
  display: grid;
}

.starter-button {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  width: 100%;
  padding: 11px 10px 12px 2px;
  text-align: left;
  color: #31464f;
  background: transparent;
  border: 0;
  border-top: 1px solid #e2e7e8;
  cursor: pointer;
}

.starter-button:last-child {
  border-bottom: 1px solid #e2e7e8;
}

.starter-button:hover {
  color: var(--teal-700);
  background: rgba(255, 255, 255, 0.52);
}

.starter-button__number {
  padding-top: 1px;
  color: var(--orange-600);
  font-size: 0.66rem;
  font-weight: 800;
}

.starter-button__text {
  font-size: 0.79rem;
  line-height: 1.46;
}

.pack-preview {
  padding: 24px 0 0;
}

.pack-preview__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pack-preview__heading .eyebrow {
  margin-bottom: 6px;
}

.future-label {
  padding: 4px 7px;
  color: var(--warning);
  background: var(--orange-100);
  border: 1px solid #efc7a8;
  border-radius: 999px;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pack-preview__intro {
  margin: 12px 12px 17px 0;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.5;
}

.workflow-list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-list::before {
  content: "";
  position: absolute;
  top: 13px;
  bottom: 13px;
  left: 10px;
  width: 1px;
  background: var(--line-strong);
}

.workflow-list li {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: start;
  padding: 7px 8px 7px 0;
}

.workflow-list__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: var(--teal-700);
  background: var(--canvas);
  border: 1px solid var(--teal-600);
  border-radius: 50%;
  font-size: 0.58rem;
  font-weight: 800;
}

.workflow-list__text strong {
  display: block;
  margin: 1px 0 2px;
  color: var(--ink);
  font-size: 0.73rem;
}

.workflow-list__text span {
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.35;
}

.pack-preview__output {
  margin-top: 14px;
  padding: 12px 13px;
  background: var(--navy-900);
  border-left: 4px solid var(--orange-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.pack-preview__output span,
.pack-preview__output strong {
  display: block;
}

.pack-preview__output span {
  margin-bottom: 4px;
  color: #9eb8c2;
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pack-preview__output strong {
  color: #f7fbfc;
  font-size: 0.71rem;
  font-weight: 650;
  line-height: 1.4;
}

.conversation {
  grid-area: chat;
  min-width: 0;
  min-height: 760px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--teal-700);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow);
}

.conversation__header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
}

.conversation__titleline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.assistant-avatar {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  color: var(--paper);
  background: var(--teal-700);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.assistant-avatar--small {
  width: 25px;
  height: 25px;
  font-size: 0.5rem;
}

.conversation__header h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 0.93rem;
  font-weight: 760;
}

.conversation__header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.quiet-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  cursor: pointer;
}

.quiet-button:hover {
  color: var(--navy-900);
  background: var(--soft);
  border-color: var(--line);
}

.mode-bar {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 22px;
  background: #f7f9f8;
  border-bottom: 1px solid var(--line);
}

.mode-bar__label {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mode-switch {
  display: inline-flex;
  padding: 2px;
  background: #e7eceb;
  border-radius: 7px;
}

.mode-switch__button {
  padding: 6px 9px;
  color: #53656c;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 650;
  cursor: pointer;
}

.mode-switch__button:hover {
  color: var(--navy-900);
}

.mode-switch__button.is-active {
  color: var(--navy-900);
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(8, 28, 39, 0.14);
}

.mode-bar > p {
  min-width: 0;
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 0.66rem;
  text-align: right;
}

.chat-log {
  height: clamp(430px, 54vh, 620px);
  min-height: 430px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 25px clamp(18px, 3.5vw, 52px) 18px;
  scroll-behavior: smooth;
}

.chat-entry + .chat-entry {
  margin-top: 24px;
}

.chat-entry__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.64rem;
}

.chat-entry__meta strong {
  color: var(--navy-900);
  font-size: 0.69rem;
}

.chat-entry__meta > span:last-child {
  color: #86949a;
}

.chat-entry--user {
  width: min(78%, 720px);
  margin-left: auto;
}

.chat-entry--user .chat-entry__meta {
  justify-content: flex-end;
  margin-right: 4px;
}

.user-message {
  padding: 13px 16px;
  color: #f5fafb;
  background: var(--navy-800);
  border-radius: var(--radius-md) var(--radius-sm) var(--radius-md) var(--radius-md);
  font-size: 0.87rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.assistant-intro {
  max-width: 850px;
  padding: clamp(19px, 3vw, 28px);
  background: var(--teal-50);
  border: 1px solid #c8dfdc;
  border-left: 4px solid var(--teal-600);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.assistant-intro p {
  margin: 0;
}

.assistant-intro__kicker {
  color: var(--teal-700);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.assistant-intro__title {
  margin-top: 8px !important;
  color: var(--navy-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.25;
}

.assistant-intro__title + p {
  margin-top: 10px;
  color: #3d555e;
  font-size: 0.83rem;
  line-height: 1.55;
}

.assistant-intro__note {
  margin-top: 17px !important;
  padding-top: 13px;
  color: var(--muted);
  border-top: 1px solid #c8dfdc;
  font-size: 0.72rem;
  line-height: 1.48;
}

.answer-frame {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--navy-800);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.answer-summary {
  padding: 18px 22px;
  color: #2c434c;
  background: #f7f9f8;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  line-height: 1.57;
}

.answer-summary:empty {
  display: none;
}

.answer-section {
  display: grid;
  grid-template-columns: minmax(145px, 22%) 1fr;
  background: var(--paper);
}

.answer-section + .answer-section {
  border-top: 1px solid var(--line);
}

.answer-section__label {
  padding: 18px 15px 18px 20px;
  background: #f7f9f8;
  border-right: 1px solid var(--line);
}

.answer-section__number {
  display: block;
  margin-bottom: 5px;
  color: var(--teal-700);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
}

.answer-section__label h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 0.7rem;
  line-height: 1.35;
}

.answer-section__body {
  min-width: 0;
  padding: 18px 22px;
  color: #30454e;
  font-size: 0.81rem;
  line-height: 1.62;
}

.answer-section__body p {
  margin: 0;
}

.answer-section__body p + p,
.answer-section__body ul + p,
.answer-section__body ol + p {
  margin-top: 10px;
}

.answer-section__body ul,
.answer-section__body ol {
  margin: 0;
  padding-left: 19px;
}

.answer-section__body li + li {
  margin-top: 5px;
}

.answer-section--recommendation .answer-section__number {
  color: var(--orange-600);
}

.answer-section--risk .answer-section__label {
  background: #fcf8f4;
}

.answer-section--risk .answer-section__number {
  color: var(--warning);
}

.answer-section--decision .answer-section__label {
  background: var(--navy-900);
}

.answer-section--decision .answer-section__number,
.answer-section--decision .answer-section__label h3 {
  color: white;
}

.answer-sources {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 13px 20px;
  color: var(--muted);
  background: #eef2f1;
  border-top: 1px solid var(--line);
  font-size: 0.66rem;
}

.answer-sources > strong {
  flex: 0 0 auto;
  color: var(--navy-900);
  font-size: 0.64rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-list a,
.source-list span {
  color: var(--teal-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.source-list a:hover {
  color: var(--orange-600);
}

.follow-ups {
  margin-top: 12px;
}

.follow-ups > p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.follow-ups__list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.follow-up-button {
  padding: 7px 10px;
  color: var(--teal-700);
  background: var(--paper);
  border: 1px solid #a9cbc8;
  border-radius: 999px;
  font-size: 0.68rem;
  cursor: pointer;
}

.follow-up-button:hover {
  color: var(--paper);
  background: var(--teal-700);
  border-color: var(--teal-700);
}

.thinking-state {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 18px 20px;
  background: var(--teal-50);
  border-left: 4px solid var(--teal-600);
}

.thinking-state > span {
  width: 7px;
  height: 7px;
  background: var(--teal-600);
  border-radius: 50%;
  animation: thinking 1.2s ease-in-out infinite;
}

.thinking-state > span:nth-child(2) {
  animation-delay: 140ms;
}

.thinking-state > span:nth-child(3) {
  animation-delay: 280ms;
}

.thinking-state p {
  margin: 0 0 0 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.error-message {
  padding: 16px 18px;
  color: #6d2824;
  background: #fdf1ef;
  border: 1px solid #e9c1bd;
  border-left: 4px solid var(--error);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.error-message strong,
.error-message span {
  display: block;
}

.error-message span {
  margin-top: 5px;
}

.composer-wrap {
  margin-top: auto;
  padding: 0 clamp(16px, 3.5vw, 42px) 13px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.context-panel {
  border-bottom: 1px solid #e4e8e8;
}

.context-panel summary {
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  list-style: none;
  font-size: 0.67rem;
  cursor: pointer;
}

.context-panel summary::-webkit-details-marker {
  display: none;
}

.context-panel summary > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 650;
}

.context-panel summary svg {
  color: var(--teal-700);
  transition: transform 160ms ease;
}

.context-panel[open] summary svg {
  transform: rotate(45deg);
}

.context-panel summary small {
  color: #8a979c;
  font-size: 0.62rem;
}

.context-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  padding: 3px 0 13px;
}

.context-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
}

.context-fields__wide {
  grid-column: 1 / -1;
}

.context-fields input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
}

.context-fields input:focus {
  background: white;
  border-color: var(--teal-600);
  outline: 2px solid rgba(22, 135, 127, 0.12);
}

.composer {
  margin-top: 13px;
  padding: 5px 6px 6px 15px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 7px 20px rgba(8, 28, 39, 0.06);
}

.composer:focus-within {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(22, 135, 127, 0.09), 0 7px 20px rgba(8, 28, 39, 0.06);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  max-height: 180px;
  resize: none;
  padding: 10px 10px 4px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 0.86rem;
  line-height: 1.48;
}

.composer textarea::placeholder {
  color: #849198;
}

.composer__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer__hint {
  color: #8a979c;
  font-size: 0.6rem;
}

kbd {
  display: inline-grid;
  min-width: 18px;
  min-height: 17px;
  place-items: center;
  margin-right: 2px;
  color: #68777e;
  background: #eef1f1;
  border: 1px solid #d7dede;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.56rem;
}

.send-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  color: #fff;
  background: var(--orange-600);
  border: 1px solid var(--orange-600);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
}

.send-button:hover {
  background: #bf5420;
  border-color: #bf5420;
}

.send-button:disabled {
  color: #dbe2e3;
  background: #8a999f;
  border-color: #8a999f;
  cursor: wait;
}

.trust-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 0;
  color: #738187;
  font-size: 0.61rem;
  line-height: 1.4;
  text-align: center;
}

.trust-note svg {
  flex: 0 0 auto;
  color: var(--teal-700);
}

.guide-dialog {
  position: fixed;
  inset: 0;
  width: min(1080px, calc(100vw - 48px));
  max-width: none;
  height: calc(100dvh - 32px);
  max-height: none;
  margin: 16px 16px 16px auto;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(8, 28, 39, 0.24);
  border-top: 4px solid var(--orange-500);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  box-shadow: -20px 0 70px rgba(4, 18, 27, 0.28);
}

.guide-dialog:not([open]) {
  display: none;
}

.guide-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: guide-drawer-in 180ms ease-out both;
}

.guide-dialog::backdrop {
  background: rgba(4, 18, 27, 0.62);
  backdrop-filter: blur(3px);
}

.guide-dialog__header {
  min-height: 79px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 18px 13px 22px;
  color: #f7fbfc;
  background: var(--navy-900);
}

.guide-dialog__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.guide-dialog__mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #f2aa72;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
}

.guide-dialog__mark svg {
  width: 19px;
  height: 19px;
}

.guide-dialog__eyebrow {
  margin: 0 0 3px;
  color: #9fc5cc;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guide-dialog__header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 550;
  letter-spacing: 0.01em;
}

.guide-dialog__header h2 + p {
  margin: 3px 0 0;
  overflow: hidden;
  color: #b5c9d0;
  font-size: 0.64rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.guide-dialog__close {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  color: #d8e6e9;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
}

.guide-dialog__close:hover {
  color: white;
  background: rgba(255, 255, 255, 0.13);
}

.guide-dialog__toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 18px 9px 22px;
  background: #f6f8f7;
  border-bottom: 1px solid var(--line);
}

.guide-draft-note {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.guide-draft-note__copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.guide-draft-note__copy strong {
  color: var(--navy-900);
  font-size: 0.65rem;
  font-weight: 720;
}

.guide-draft-note__label {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: var(--warning);
  background: var(--orange-100);
  border: 1px solid #efc7a8;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.guide-dialog__links {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.guide-dialog__links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: var(--navy-900);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.66rem;
  font-weight: 700;
  text-decoration: none;
}

.guide-dialog__links a:hover {
  color: var(--teal-700);
  border-color: #8ebbb7;
}

.guide-dialog__links svg {
  color: var(--teal-700);
}

.guide-dialog__viewer {
  position: relative;
  min-height: 0;
  flex: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #dfe4e4;
}

.guide-dialog__viewer iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: white;
  border: 0;
}

.guide-dialog__fallback {
  position: absolute;
  z-index: 0;
  max-width: 380px;
  margin: 0;
  padding: 24px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
}

.guide-dialog__fallback a {
  color: var(--teal-700);
}

.noscript-message {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 30;
  padding: 16px;
  color: white;
  background: var(--error);
  text-align: center;
}

@keyframes thinking {
  0%,
  70%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes guide-drawer-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (min-width: 821px) {
  html,
  body {
    height: 100%;
  }

  body {
    height: 100dvh;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
  }

  .workspace {
    min-height: 0;
    margin-top: 20px;
    margin-bottom: 20px;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
  }

  .briefing-rail {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .conversation {
    height: 100%;
    min-height: 0;
  }

  .chat-log {
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
  }

  .composer-wrap {
    flex: 0 0 auto;
  }
}

@media (max-width: 1080px) {
  .centre-nav__label,
  .version-mark {
    display: none;
  }

  .centre-switch {
    width: 100%;
  }

  .centre-switch__button {
    width: 50%;
    min-width: 0;
  }

  .workspace {
    grid-template-columns: 275px minmax(0, 1fr);
    gap: 20px;
  }

  .mode-bar > p {
    display: none;
  }
}

@media (max-width: 820px) {
  .topbar__inner,
  .centre-nav__inner,
  .workspace {
    width: min(100% - 28px, var(--page-width));
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "chat"
      "rail";
    margin-top: 18px;
  }

  .briefing-rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 4px 0 20px;
  }

  .path-summary {
    grid-column: 1 / -1;
  }

  .starter-section,
  .pack-preview {
    border-bottom: 0;
  }

  .conversation {
    height: calc(100dvh - 192px);
    min-height: 0;
  }

  .chat-log {
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
  }

  .composer-wrap {
    flex: 0 0 auto;
  }

  .guide-dialog {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-top: 4px solid var(--orange-500);
    border-radius: 0;
  }
}

@media (max-width: 620px) {
  .topbar__inner {
    min-height: 66px;
  }

  .brand__mark {
    width: 39px;
    height: 39px;
  }

  .brand__copy strong {
    font-size: 1rem;
  }

  .brand__copy span {
    display: none;
  }

  .topbar__actions {
    gap: 6px;
  }

  .guide-open {
    min-height: 43px;
    padding: 7px 9px;
  }

  .guide-open__copy small {
    display: none;
  }

  .system-state {
    min-width: 0;
    padding-left: 10px;
  }

  .system-state__provider {
    display: none;
  }

  .centre-nav__inner {
    min-height: 67px;
  }

  .centre-switch__button {
    padding: 9px 11px;
  }

  .centre-switch__button small {
    display: none;
  }

  .centre-switch__index {
    font-size: 0.9rem;
  }

  .workspace {
    width: 100%;
    margin: 0;
    gap: 0;
  }

  .conversation {
    height: calc(100dvh - 137px);
    min-height: 0;
    border: 0;
    border-top: 3px solid var(--teal-700);
    border-radius: 0;
    box-shadow: none;
  }

  .conversation__header {
    min-height: 67px;
    padding: 12px 15px;
  }

  .quiet-button {
    width: 35px;
    height: 35px;
    justify-content: center;
    padding: 0;
    border-color: var(--line);
  }

  .quiet-button span,
  .quiet-button:not(:has(span)) {
    font-size: 0;
  }

  .quiet-button {
    font-size: 0;
  }

  .quiet-button svg {
    width: 17px;
    height: 17px;
  }

  .mode-bar {
    display: block;
    padding: 8px 14px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .mode-bar__label {
    display: none;
  }

  .mode-switch {
    width: 100%;
  }

  .mode-switch__button {
    flex: 1;
  }

  .chat-log {
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    padding: 20px 14px 16px;
  }

  .chat-entry--user {
    width: 90%;
  }

  .answer-section {
    grid-template-columns: 1fr;
  }

  .answer-section__label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 11px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .answer-section__number {
    margin: 0;
  }

  .answer-section__body {
    padding: 14px;
  }

  .answer-sources {
    display: block;
    padding: 12px 14px;
  }

  .source-list {
    margin-top: 7px;
  }

  .composer-wrap {
    padding: 0 12px 10px;
  }

  .composer__hint {
    display: none;
  }

  .send-button {
    margin-left: auto;
  }

  .context-fields {
    grid-template-columns: 1fr;
  }

  .context-fields__wide {
    grid-column: auto;
  }

  .trust-note {
    align-items: flex-start;
    text-align: left;
  }

  .briefing-rail {
    grid-template-columns: 1fr;
    padding: 28px 18px 40px;
  }

  .path-summary {
    grid-column: auto;
  }

  .guide-dialog__header {
    min-height: 70px;
    padding: 10px 12px 10px 14px;
  }

  .guide-dialog__mark {
    width: 35px;
    height: 35px;
  }

  .guide-dialog__toolbar {
    display: grid;
    gap: 8px;
    padding: 9px 12px;
  }

  .guide-draft-note {
    align-items: flex-start;
  }

  .guide-dialog__links {
    width: 100%;
  }

  .guide-dialog__links a {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .guide-open {
    width: 42px;
    justify-content: center;
  }

  .guide-open__copy {
    display: none;
  }

  .guide-dialog__header h2 + p {
    max-width: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
