:root {
  --console-navy: #172033;
  --console-navy-2: #202b42;
  --console-blue: #147eba;
  --console-blue-dark: #0f5f91;
  --focus: #0073bb;
  --accent: #ff9d1f;
  --success: #1d8102;
  --success-bg: #f2f8ef;
  --warning: #b45f06;
  --warning-bg: #fff7e8;
  --danger: #d13212;
  --danger-bg: #fff1ef;
  --info: #0972d3;
  --info-bg: #f1f8ff;
  --ink: #16191f;
  --muted: #5f6b7a;
  --subtle: #8d99a8;
  --line: #d5dbdb;
  --line-dark: #aab7b8;
  --panel: #ffffff;
  --canvas: #f2f3f3;
  --sidebar: #f7f8f8;
  --shadow: 0 1px 2px rgba(0, 28, 36, .15), 0 2px 8px rgba(0, 28, 36, .08);
  --shadow-large: 0 12px 34px rgba(0, 28, 36, .23);
  --radius: 8px;
  --header-height: 52px;
  --strip-height: 48px;
  --sidebar-width: 272px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .65; }
a { color: var(--info); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(25px, 2.7vw, 34px); line-height: 1.18; letter-spacing: -.6px; }
h2 { margin-bottom: 7px; font-size: 20px; line-height: 1.25; }
h3 { margin-bottom: 6px; }
hr { height: 1px; margin: 20px 0; border: 0; background: var(--line); }
code { padding: 2px 5px; border-radius: 4px; color: #5c1d6a; background: #f5eef7; font-family: "Courier New", monospace; font-size: .92em; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  z-index: 2000;
  top: -80px;
  left: 16px;
  padding: 10px 15px;
  color: #fff;
  background: #000;
  border-radius: 0 0 6px 6px;
  font-weight: 700;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid #539fe5; outline-offset: 2px; }

.global-header {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: #fff;
  background: var(--console-navy);
  box-shadow: 0 1px 0 rgba(255,255,255,.12);
}
.icon-button, .services-button, .header-link, .account-button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #fff;
  background: transparent;
}
.icon-button:hover, .services-button:hover, .header-link:hover, .account-button:hover { border-color: #879596; background: rgba(255,255,255,.08); }
.menu-button { display: none; width: 38px; padding: 9px; }
.menu-button span { display: block; height: 2px; margin: 3px 0; background: #fff; }
.console-brand { display: flex; align-items: center; gap: 9px; min-width: 172px; color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; letter-spacing: .2px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 28px; border: 1px solid #d5dbdb; border-radius: 3px; color: #ffb65c; font-size: 10px; font-weight: 900; letter-spacing: .5px; }
.services-button { padding: 5px 12px; font-weight: 700; }
.console-search { flex: 1 1 420px; max-width: 650px; height: 36px; display: flex; align-items: center; gap: 7px; margin-inline: auto; padding: 0 11px; color: #687078; background: #fff; border-radius: 3px; }
.console-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; }
.header-actions { display: flex; align-items: center; gap: 2px; }
.header-link { padding: 5px 9px; font-size: 13px; font-weight: 700; }
.region-control { white-space: nowrap; }
.account-button { display: flex; align-items: center; gap: 7px; padding: 3px 7px; text-align: left; }
.avatar-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #1b2435; background: #f4b04d; font-weight: 900; }
.account-copy { font-size: 11px; line-height: 1.1; }
.account-copy small { color: #b9c2cc; }

.service-strip {
  position: fixed;
  z-index: 900;
  inset: var(--header-height) 0 auto;
  height: var(--strip-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  color: #e7eef7;
  background: var(--console-navy-2);
  border-top: 1px solid #3b4659;
  border-bottom: 1px solid #111827;
}
.service-title { display: flex; align-items: center; gap: 9px; }
.service-symbol { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #62a5ce; border-radius: 6px; color: #87ceef; font-size: 10px; font-weight: 900; }
.environment-pill, .privacy-pill { padding: 3px 9px; border: 1px solid #536176; border-radius: 999px; color: #c7d0db; font-size: 11px; white-space: nowrap; }
.privacy-pill span { color: #59d06d; font-size: 10px; }
.strip-spacer { flex: 1; }
.utility-button { min-height: 31px; padding: 4px 10px; color: #e6edf5; background: #303c51; border: 1px solid #718096; border-radius: 4px; font-weight: 700; }
.utility-button:hover { background: #3b485e; }

.services-menu {
  position: fixed;
  z-index: 1200;
  top: calc(var(--header-height) - 1px);
  left: 190px;
  width: 330px;
  padding: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-dark);
  box-shadow: var(--shadow-large);
}
.services-menu strong { display: block; margin-bottom: 10px; }
.services-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px; border: 0; background: transparent; text-align: left; }
.services-menu button:hover { background: #f1f7fb; }
.services-menu button span { display: grid; place-items: center; width: 34px; height: 29px; border-radius: 4px; color: #fff; background: #367ba3; font-size: 9px; font-weight: 900; }

.app-shell { min-height: 100vh; padding-top: calc(var(--header-height) + var(--strip-height)); }
.service-navigation {
  position: fixed;
  z-index: 800;
  top: calc(var(--header-height) + var(--strip-height));
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}
.nav-header { display: flex; align-items: center; justify-content: space-between; padding: 17px 17px 13px; border-bottom: 1px solid var(--line); }
.nav-header strong { display: block; margin-top: 2px; }
.eyebrow, .card-kicker { display: block; color: #516170; font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.close-nav { display: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; }
.service-navigation nav { flex: 1; padding: 8px 0; }
.nav-group { margin-top: 10px; }
.nav-group > p { margin: 0; padding: 6px 17px 4px; color: #6b7785; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.nav-item { position: relative; width: 100%; min-height: 39px; display: flex; align-items: center; gap: 9px; padding: 7px 12px 7px 17px; border: 0; border-left: 4px solid transparent; color: #2d3748; background: transparent; text-align: left; font-size: 13px; }
.nav-item:hover { color: #0b5f91; background: #edf5f8; }
.nav-item.is-active { color: #0b5f91; background: #e7f2f8; border-left-color: #147eba; font-weight: 700; }
.nav-icon { width: 19px; color: #61778c; text-align: center; font-size: 16px; }
.task-state { margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #9ba9b5; border-radius: 50%; color: #657381; font-size: 10px; font-weight: 800; }
.task-state.is-complete { color: #fff; background: var(--success); border-color: var(--success); font-size: 0; }
.task-state.is-complete::after { content: "✓"; font-size: 12px; }
.nav-security-note { display: flex; gap: 9px; margin: 12px; padding: 11px; color: #2c5368; background: #eaf5f7; border: 1px solid #b8dade; border-radius: 6px; }
.nav-security-note > span { color: var(--success); }
.nav-security-note strong, .nav-security-note small { display: block; }
.nav-security-note small { color: #516170; line-height: 1.35; }
.navigation-scrim { position: fixed; z-index: 790; inset: calc(var(--header-height) + var(--strip-height)) 0 0; background: rgba(0,0,0,.5); }

.main-workspace { min-height: calc(100vh - var(--header-height) - var(--strip-height)); margin-left: var(--sidebar-width); padding: 0 28px 60px; }
.progress-header { position: sticky; z-index: 700; top: calc(var(--header-height) + var(--strip-height)); display: flex; align-items: center; gap: 18px; margin: 0 -28px 22px; padding: 9px 28px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0,28,36,.06); backdrop-filter: blur(7px); }
.progress-copy { flex: 0 0 auto; display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.progress-copy strong { color: #23354a; }
.progress-track { flex: 1; height: 7px; overflow: hidden; background: #e5e8e8; border-radius: 999px; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #147eba, #24a148); border-radius: inherit; transition: width .35s ease; }
.view { width: min(1320px, 100%); margin-inline: auto; }
.view[hidden] { display: none; }
.breadcrumbs { display: flex; gap: 8px; margin-bottom: 12px; color: #587286; font-size: 12px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-heading p { max-width: 850px; margin-bottom: 0; color: var(--muted); font-size: 15px; }
.difficulty-badge, .status-chip, .points-chip { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border: 1px solid #99aab5; border-radius: 999px; color: #475966; background: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-chip.success { color: #176000; background: #eaf5e5; border-color: #6da451; }
.status-chip.warning { color: #7c4700; background: #fff5e0; border-color: #d69b45; }
.status-chip.neutral { color: #42576c; background: #edf3f7; border-color: #a4b3c0; }
.points-chip { color: #0b5f91; background: #eef7fb; border-color: #8ebbd4; }

.card { margin-bottom: 18px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-title-row p { color: var(--muted); }
.overview-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(520px, 1.35fr); gap: 18px; }
.scenario-card { background: linear-gradient(145deg, #fff 60%, #f0f7fa); }
.feature-list { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.feature-list li { display: flex; gap: 8px; }
.feature-list li span { color: var(--success); font-weight: 900; }
.architecture-card { overflow: hidden; }
.architecture { display: block; width: 100%; height: auto; margin-top: 4px; }
.arch-node rect { fill: #f8fafb; stroke: #8da2b2; stroke-width: 2; }
.arch-node.secure rect { fill: #edf8ed; stroke: #4c9838; }
.arch-node.primary rect { fill: #edf6fb; stroke: #147eba; stroke-width: 3; }
.arch-node.warn rect { fill: #fff7e8; stroke: #d28c29; }
.arch-node text { fill: #2b4355; font-size: 15px; font-weight: 700; }
.arch-node .arch-abbr { fill: #147eba; font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.arch-caption text { fill: #657885; font-size: 11px; }
.governance-card { border-top: 4px solid #147eba; }

.notice { display: flex; gap: 12px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid; border-left-width: 5px; border-radius: 4px; }
.notice p { margin: 2px 0 0; }
.notice-icon { flex: 0 0 auto; width: 23px; height: 23px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; font-size: 12px; font-weight: 900; }
.info-notice { color: #164a6b; background: var(--info-bg); border-color: #69a8d1; }
.warning-notice { color: #6f450d; background: var(--warning-bg); border-color: #d5a14f; }
.success-notice { color: #265f1b; background: var(--success-bg); border-color: #79a969; }
.error-notice { color: #81250e; background: var(--danger-bg); border-color: #de7b66; }

.form-grid { display: grid; gap: 16px; margin-top: 14px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: #344452; font-weight: 700; }
.field > span b { color: var(--danger); }
.field input, .field select, .field textarea, .catalog-toolbar input, .catalog-toolbar select, .metric-grid input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #879596;
  border-radius: 4px;
  font-weight: 400;
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.45; }
.field input[readonly] { color: #4c5965; background: #f4f5f5; }
.field input:focus, .field select:focus, .field textarea:focus, .catalog-toolbar input:focus, .catalog-toolbar select:focus, .metric-grid input:focus { border-color: var(--focus); outline: 2px solid rgba(0,115,187,.28); }
.field input[type="range"] { min-height: 22px; padding: 0; border: 0; }
.field output { align-self: flex-end; margin-top: -28px; margin-right: -37px; }
.fieldset-box { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line-dark); border-radius: 6px; }
.fieldset-box legend { padding: 0 6px; font-weight: 800; }
.check-row, .radio-row { display: flex; align-items: flex-start; gap: 9px; padding: 6px 0; color: #2f3f4b; font-weight: 400; }
.check-row input, .radio-row input { flex: 0 0 auto; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #147eba; }
.check-row strong, .check-row small, .radio-row strong, .radio-row small { display: block; }
.check-row small, .radio-row small { color: var(--muted); line-height: 1.4; }
.form-actions, .sticky-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 17px; }
.sticky-actions { position: sticky; z-index: 50; bottom: 0; margin: 0 -28px; padding: 12px 28px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(0,28,36,.08); backdrop-filter: blur(7px); }
.inline-help { flex: 1; color: var(--muted); font-size: 12px; }
.form-message { min-height: 0; margin-top: 12px; }
.form-message:not(:empty) { padding: 10px 12px; border-left: 4px solid var(--danger); color: #7f210e; background: var(--danger-bg); }
.form-message.success:not(:empty) { border-left-color: var(--success); color: #1d5c12; background: var(--success-bg); }
.primary-button, .secondary-button, .success-button, .text-button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 800;
  text-decoration: none;
}
.primary-button { color: #fff; background: var(--console-blue); border: 1px solid var(--console-blue-dark); box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.primary-button:hover { background: var(--console-blue-dark); }
.secondary-button { color: #213547; background: #fff; border: 1px solid #879596; }
.secondary-button:hover { background: #f1f3f3; }
.success-button { color: #fff; background: var(--success); border: 1px solid #176600; }
.success-button:hover { background: #176600; }
.text-button { min-height: 30px; padding: 3px 7px; color: var(--info); background: transparent; border: 0; }
.text-button:hover { text-decoration: underline; }
.full-button { width: 100%; }

.catalog-toolbar { display: grid; grid-template-columns: minmax(250px, 1fr) 210px auto; align-items: end; gap: 14px; margin-bottom: 16px; }
.catalog-count { padding-bottom: 10px; color: var(--muted); font-size: 12px; }
.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.model-card { position: relative; display: flex; flex-direction: column; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.model-card.recommended { border-top: 4px solid var(--accent); padding-top: 15px; }
.model-card.is-selected { border-color: var(--console-blue); box-shadow: 0 0 0 2px rgba(20,126,186,.24), var(--shadow); }
.model-header { display: flex; align-items: flex-start; gap: 12px; min-height: 82px; }
.provider-mark { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; color: #fff; background: #53697a; border-radius: 8px; font-size: 20px; font-weight: 900; }
.model-header h2 { margin: 1px 0 0; font-size: 18px; }
.model-header p { margin: 0; color: var(--muted); }
.recommendation { color: #8b5300; font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.model-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 12px; }
.model-tags span { padding: 2px 7px; color: #3d5364; background: #edf3f6; border-radius: 999px; font-size: 10px; }
.model-metrics { display: grid; gap: 8px; margin: 0 0 16px; }
.model-metrics div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 7px; border-bottom: 1px solid #eaeded; }
.model-metrics dt { color: var(--muted); }
.model-metrics dd { margin: 0; text-align: right; font-weight: 700; }
.model-card .full-button { margin-top: auto; }
.model-card .field { margin-bottom: 14px; }
.decision-record { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; border-color: #8eb77c; }
.decision-record > div { display: flex; align-items: center; gap: 11px; }
.success-icon { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--success); border-radius: 50%; font-weight: 900; }

.wizard-stepper { display: flex; margin-bottom: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.wizard-stepper span { flex: 1; position: relative; padding: 9px 14px; color: #667581; border-right: 1px solid var(--line); font-size: 12px; text-align: center; }
.wizard-stepper span:last-child { border-right: 0; }
.wizard-stepper .is-current { color: #0b5f91; background: #eaf5fa; font-weight: 800; }
.form-card h2 { font-size: 18px; }
.section-help { margin-bottom: 10px; color: var(--muted); }
.table-wrap { width: 100%; overflow-x: auto; }
.config-table, .audit-table { width: 100%; border-collapse: collapse; }
.config-table th, .config-table td, .audit-table th, .audit-table td { padding: 9px 11px; border-bottom: 1px solid var(--line); text-align: left; }
.config-table th, .audit-table th { color: #41515d; background: #f5f7f7; font-size: 11px; letter-spacing: .2px; }
.config-table select { min-width: 125px; min-height: 34px; padding: 5px 8px; border: 1px solid #879596; border-radius: 4px; background: #fff; }
.not-applicable { color: var(--subtle); font-size: 12px; }
.sample-documents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 15px; }
.sample-documents span { padding: 10px; background: #f7f9fa; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; }
.sample-documents b { display: inline-grid; place-items: center; width: 32px; height: 24px; margin-right: 5px; color: #fff; background: #607b90; border-radius: 3px; font-size: 9px; }
.sample-documents small { display: block; margin: 3px 0 0 42px; color: var(--muted); }
.security-options { padding: 10px 14px; background: #f8fbfc; border: 1px solid var(--line); border-radius: 5px; }
.sync-card { border-left: 5px solid var(--info); }
.sync-pipeline { display: flex; align-items: center; gap: 9px; margin: 15px 0; padding: 12px; background: #f3f7f9; border-radius: 5px; }
.sync-pipeline span { flex: 1; padding: 7px; background: #fff; border: 1px solid var(--line); border-radius: 4px; text-align: center; font-size: 11px; }
.sync-pipeline i { color: var(--muted); font-style: normal; }

.playground-layout { display: grid; grid-template-columns: 275px minmax(0, 1fr); gap: 18px; }
.playground-config { align-self: start; }
.playground-config h2 { font-size: 18px; }
.config-summary { margin: 0; }
.config-summary div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.config-summary dt { color: var(--muted); font-size: 11px; }
.config-summary dd { margin: 2px 0 0; font-weight: 700; }
.chat-panel { padding: 0; overflow: hidden; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.chat-header > div { position: relative; padding-left: 17px; }
.chat-header strong, .chat-header small { display: block; }
.chat-header small { color: var(--muted); }
.online-dot { position: absolute; top: 5px; left: 0; width: 9px; height: 9px; background: var(--success); border-radius: 50%; }
.test-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 14px; background: #f7f8f8; border-bottom: 1px solid var(--line); }
.test-chips button { min-height: 32px; padding: 5px 9px; color: #304758; background: #fff; border: 1px solid #94a3af; border-radius: 999px; font-size: 11px; font-weight: 700; }
.test-chips button:hover { color: #0b5f91; border-color: #147eba; }
.test-chips button.is-passed { color: #1e6414; background: #edf7e9; border-color: #79a968; }
.test-chips button span { display: inline-grid; place-items: center; width: 19px; height: 19px; margin-right: 4px; color: #fff; background: #667c8c; border-radius: 50%; font-size: 9px; }
.test-chips button.is-passed span { background: var(--success); }
.messages { height: 430px; overflow-y: auto; padding: 17px; background: linear-gradient(#fff, #fbfcfc); }
.assistant-message, .user-message { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 15px; }
.user-message { flex-direction: row-reverse; }
.chat-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; color: #fff; background: #3e718d; border-radius: 50%; font-size: 9px; font-weight: 900; }
.user-message .chat-avatar { background: #765b92; }
.message-bubble { max-width: 80%; padding: 10px 12px; background: #f2f5f6; border: 1px solid #dce1e4; border-radius: 3px 12px 12px 12px; }
.user-message .message-bubble { background: #edf5fa; border-color: #c5ddea; border-radius: 12px 3px 12px 12px; }
.message-bubble strong { font-size: 11px; }
.message-bubble p { margin: 4px 0 0; white-space: pre-wrap; }
.message-bubble .citation { display: block; margin-top: 8px; padding: 7px; color: #2f5d75; background: #fff; border-left: 3px solid #147eba; font-size: 11px; }
.message-bubble .trace { margin-top: 8px; padding: 8px; color: #52616d; background: #fff; border: 1px dashed #aab7b8; font: 11px/1.5 "Courier New", monospace; }
.message-bubble.is-blocked { color: #6f320b; background: #fff7e8; border-color: #d9a65c; }
.message-bubble.is-action { color: #214b63; background: #eef8fc; border-color: #77afd0; }
.prompt-composer { display: flex; align-items: flex-end; gap: 9px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.prompt-composer textarea { flex: 1; min-height: 52px; max-height: 130px; padding: 9px; border: 1px solid #879596; border-radius: 4px; resize: vertical; }
.test-evidence { margin-top: 18px; }
.test-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.test-grid > div { display: flex; gap: 8px; padding: 11px; background: #f7f8f8; border: 1px solid var(--line); border-radius: 5px; }
.test-grid > div.is-passed { background: #eff8ec; border-color: #80af6d; }
.test-result-icon { flex: 0 0 auto; color: #6c7a85; font-weight: 900; }
.test-grid .is-passed .test-result-icon { color: var(--success); }
.test-grid strong, .test-grid small { display: block; }
.test-grid small { color: var(--muted); line-height: 1.35; }

.audit-card { margin-top: 18px; }
.audit-table td { font-family: "Courier New", monospace; font-size: 11px; }
.audit-table td:last-child { color: var(--success); font-family: Arial, sans-serif; font-weight: 800; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 13px 0; }
.metric-grid label { position: relative; display: flex; flex-direction: column; gap: 5px; color: #344452; font-size: 12px; font-weight: 700; }
.metric-grid b { position: absolute; right: 10px; bottom: 10px; }
.evaluation-results { border-left: 5px solid var(--success); }
.result-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 14px 0 17px; background: var(--line); border: 1px solid var(--line); }
.result-metrics div { padding: 17px; background: #fff; text-align: center; }
.result-metrics strong, .result-metrics span { display: block; }
.result-metrics strong { color: #164b6b; font-size: 28px; }
.result-metrics span { color: var(--muted); font-size: 11px; }

.review-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .65fr); gap: 18px; }
.control-list { display: grid; gap: 7px; margin-top: 11px; }
.control-list > div { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; padding: 10px; background: #f7f8f8; border: 1px solid var(--line); border-radius: 4px; }
.control-list > div.is-ready { background: #f0f8ed; border-color: #8cb97b; }
.control-icon { color: #6c7983; font-weight: 900; }
.is-ready .control-icon { color: var(--success); }
.control-list strong, .control-list small { display: block; }
.control-list small { color: var(--muted); }
.control-status { color: #6c7983; font-size: 11px; font-weight: 800; }
.is-ready .control-status { color: var(--success); }
.framework-card dl { margin: 12px 0; }
.framework-card dl div { padding: 9px 0; border-bottom: 1px solid var(--line); }
.framework-card dt { font-weight: 800; }
.framework-card dd { margin: 2px 0 0; color: var(--muted); }
.legal-caveat { padding: 9px; color: #6c4d1d; background: #fff8e9; border: 1px solid #e6c889; font-size: 11px; }

.guide-dialog, .confirmation-dialog, .completion-dialog { width: min(800px, calc(100% - 28px)); max-height: min(880px, calc(100vh - 30px)); padding: 0; color: var(--ink); background: #fff; border: 1px solid #879596; border-radius: 8px; box-shadow: var(--shadow-large); }
.completion-dialog { width: min(1050px, calc(100% - 28px)); }
dialog::backdrop { background: rgba(13, 22, 36, .72); backdrop-filter: blur(2px); }
.dialog-header { position: sticky; z-index: 4; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; }
.dialog-close { width: 36px; height: 36px; display: grid; place-items: center; color: #334452; background: #f2f3f3; border: 1px solid #9ca7ae; border-radius: 50%; font-size: 22px; }
.dialog-body { padding: 20px; overflow: auto; }
.guide-callout { padding: 13px; color: #214f69; background: #edf7fc; border: 1px solid #a2c8dd; border-left: 5px solid #147eba; }
.guide-callout.caution { margin: 16px 0; color: #70470d; background: #fff7e8; border-color: #d7a659; }
.guide-callout p { margin: 2px 0 0; }
.guide-steps { display: grid; gap: 6px; padding-left: 29px; }
.guide-steps li { padding: 7px; }
.guide-steps strong, .guide-steps span { display: block; }
.guide-steps span { color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px; border-top: 1px solid var(--line); }
.action-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.action-preview div { padding: 10px; background: #f5f7f8; border: 1px solid var(--line); }
.action-preview dt { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.action-preview dd { margin: 2px 0 0; font-weight: 800; }
.completion-body { display: flex; align-items: center; justify-content: center; gap: 28px; padding: 24px 24px 15px; background: linear-gradient(130deg, #f5fbff, #fff9ee); }
.score-ring { flex: 0 0 auto; width: 140px; height: 140px; display: grid; place-content: center; text-align: center; color: #fff; background: var(--console-navy); border: 8px solid #ffad42; border-radius: 50%; box-shadow: 0 0 0 6px #dceaf2; }
.score-ring strong { font-size: 48px; line-height: 1; }
.score-ring span { color: #bcd1df; }
.completion-copy h3 { margin: 9px 0 5px; font-size: 24px; }
.completion-copy p { color: var(--muted); }
.completion-copy ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 25px; margin: 0; padding-left: 20px; }
#certificateCanvas { display: block; width: min(830px, calc(100% - 40px)); height: auto; margin: 18px auto 0; border: 1px solid #a9b4bc; box-shadow: var(--shadow); }
.certificate-note { margin: 0; padding: 0 20px 17px; color: var(--muted); text-align: center; font-size: 11px; }

.toast { position: fixed; z-index: 1800; right: 20px; bottom: 20px; max-width: 360px; display: flex; align-items: center; gap: 9px; padding: 11px 14px; color: #fff; background: #1f2937; border-radius: 5px; box-shadow: var(--shadow-large); opacity: 0; transform: translateY(25px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast span { color: #69dc6e; }
.toast p { margin: 0; }
.noscript-message { position: fixed; z-index: 3000; inset: 0; display: grid; place-content: center; padding: 30px; color: #fff; background: #172033; text-align: center; }
.noscript-message strong { display: block; font-size: 24px; }

@media (max-width: 1120px) {
  .account-copy { display: none; }
  .overview-grid { grid-template-columns: 1fr; }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-grid .model-card:last-child { grid-column: span 2; }
  .test-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .review-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --header-height: 52px; --strip-height: 45px; }
  .menu-button { display: block; }
  .console-brand { min-width: auto; }
  .console-brand > span:last-child, .services-button, .region-control { display: none; }
  .console-search { flex-basis: auto; }
  .service-strip { padding-inline: 12px; }
  .environment-pill { display: none; }
  .service-navigation { z-index: 1000; width: min(315px, 90vw); transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow-large); }
  .service-navigation.is-open { transform: translateX(0); }
  .close-nav { display: block; }
  .main-workspace { margin-left: 0; padding-inline: 18px; }
  .progress-header { margin-inline: -18px; padding-inline: 18px; }
  .two-columns, .three-columns { grid-template-columns: 1fr; }
  .catalog-toolbar { grid-template-columns: 1fr 180px; }
  .catalog-count { grid-column: span 2; padding: 0; }
  .sample-documents { grid-template-columns: 1fr; }
  .playground-layout { grid-template-columns: 1fr; }
  .playground-config { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .playground-config h2 { grid-column: span 2; }
  .playground-config hr { display: none; }
  .result-metrics { grid-template-columns: repeat(2, 1fr); }
  .sticky-actions { margin-inline: -18px; padding-inline: 18px; }
}

@media (max-width: 620px) {
  .global-header { padding-inline: 7px; }
  .header-actions .header-link { display: none; }
  .console-search { height: 34px; }
  .service-title strong { font-size: 12px; }
  .privacy-pill { overflow: hidden; max-width: 130px; text-overflow: ellipsis; }
  .utility-button { font-size: 11px; }
  .main-workspace { padding-inline: 12px; }
  .progress-header { top: calc(var(--header-height) + var(--strip-height)); flex-direction: column; align-items: stretch; gap: 5px; margin-inline: -12px; padding: 7px 12px; }
  .progress-copy { justify-content: space-between; }
  .page-heading { flex-direction: column; }
  .card { padding: 15px; }
  .model-grid { grid-template-columns: 1fr; }
  .model-grid .model-card:last-child { grid-column: auto; }
  .catalog-toolbar { grid-template-columns: 1fr; }
  .catalog-count { grid-column: auto; }
  .wizard-stepper { display: grid; grid-template-columns: repeat(2, 1fr); }
  .wizard-stepper span { border-bottom: 1px solid var(--line); }
  .sync-pipeline { align-items: stretch; flex-direction: column; }
  .sync-pipeline i { transform: rotate(90deg); text-align: center; }
  .playground-config { display: block; }
  .playground-config h2 { grid-column: auto; }
  .messages { height: 380px; }
  .message-bubble { max-width: 88%; }
  .prompt-composer { align-items: stretch; flex-direction: column; }
  .test-grid, .metric-grid, .result-metrics { grid-template-columns: 1fr; }
  .control-list > div { grid-template-columns: 23px 1fr; }
  .control-status { grid-column: 2; }
  .sticky-actions, .form-actions { align-items: stretch; flex-direction: column; }
  .sticky-actions { margin-inline: -12px; padding: 10px 12px; }
  .sticky-actions button, .form-actions button { width: 100%; }
  .decision-record { align-items: stretch; flex-direction: column; }
  .action-preview { grid-template-columns: 1fr; }
  .completion-body { flex-direction: column; text-align: center; }
  .completion-copy ul { grid-template-columns: 1fr; text-align: left; }
  .completion-dialog .dialog-actions { flex-direction: column; }
  .completion-dialog .dialog-actions button { width: 100%; }
  .toast { right: 10px; bottom: 10px; left: 10px; }
}

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

@media (forced-colors: active) {
  .status-chip, .points-chip, .task-state, .card, .notice { border: 1px solid CanvasText; }
  .progress-track span, .task-state.is-complete, .success-icon { background: Highlight; }
}

@media print {
  .global-header, .service-strip, .service-navigation, .progress-header, .sticky-actions, .utility-button { display: none !important; }
  .app-shell { padding: 0; }
  .main-workspace { margin: 0; padding: 0; }
  .view[hidden] { display: none !important; }
  .card { box-shadow: none; break-inside: avoid; }
}
