:root {
  --ink: #0f172a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --surface: #f3f4f6;
  --brand: #ef3636;
  --brand-2: #c81e1e;
  --accent: #111827;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 18px 42px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 8px 20px rgba(16, 24, 40, 0.06);
  --glass: rgba(255, 255, 255, 0.92);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 20%, rgba(239,54,54,.12), transparent 30%), linear-gradient(145deg,#0a0a0a,#252525); }
.login-panel { width: min(470px,100%); display: grid; gap: 24px; padding: 32px; border-top: 5px solid var(--brand); border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.32); }
.login-brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #6b7280; font-size: 13px; font-weight: 800; }
.login-copy { display: grid; gap: 8px; }
.login-copy > span { color: var(--brand); font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.login-copy h1, .login-copy p { margin: 0; }
.login-copy h1 { color: #111; font-size: clamp(28px,5vw,40px); }
.login-copy p { color: #6b7280; line-height: 1.6; }
.login-form { display: grid; gap: 16px; }
.login-form label { display: grid; gap: 7px; color: #111827; font-size: 13px; font-weight: 800; }
.login-form input { min-height: 50px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 0 14px; font: inherit; }
.login-form input:focus { border-color: var(--brand); outline: 3px solid rgba(239,54,54,.14); }
.login-form > button { min-height: 52px; border: 0; border-radius: 8px; background: #111; color: #fff; font-weight: 900; cursor: pointer; }
.login-error { margin: 0; color: #b91c1c; font-size: 13px; }
.entra-ready-note { display: grid; gap: 4px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; color: #64748b; font-size: 12px; line-height: 1.5; }
.entra-ready-note strong { color: #111827; }
.user-menu-button { width: 36px; min-width: 36px; height: 36px; padding: 0 !important; overflow: hidden; border-radius: 50% !important; background: var(--brand) !important; color: #fff !important; }
.user-menu-button.has-photo { border-color: rgba(255,255,255,.72) !important; background: #fff !important; }
.user-menu-button img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.chat-history-panel { position: sticky; top: 0; z-index: 12; width: min(720px,100%); margin: 0 auto 22px; padding: 18px; border: 1px solid #dbe2ea; border-radius: 14px; background: #fff; box-shadow: 0 16px 34px rgba(15,23,42,.1); }
.chat-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.chat-history-head > div { display: grid; gap: 3px; }
.chat-history-head span { color: var(--brand); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.chat-history-head .cloud-history-status { color: #64748b; font-size: 11px; font-weight: 700; }
.chat-history-head .cloud-history-status.ready { color: #166534; }
.chat-history-head .cloud-history-status.offline { color: #b45309; }
.chat-history-head > button { border: 0; background: transparent; color: #64748b; font-size: 26px; cursor: pointer; }
.chat-history-list { display: grid; gap: 8px; }
.chat-history-list article { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 10px; }
.chat-history-list article.active { border-color: var(--brand); background: #fff8f8; }
.history-open { display: grid; gap: 4px; border: 0; background: transparent; color: #111827; text-align: left; cursor: pointer; }
.history-open span { color: #64748b; font-size: 11px; }
.history-open .history-support-state { width: fit-content; border-radius: 999px; background: #ecfdf3; color: #166534; padding: 3px 7px; font-size: 10px; font-weight: 800; }
.history-open .history-support-state.waiting { background: #fff7ed; color: #9a3412; }
.history-delete { border: 0; background: transparent; color: #b91c1c; font-size: 11px; font-weight: 800; cursor: pointer; }
.history-empty { margin: 0; color: #64748b; }
.escalation-status-card { display: grid; gap: 7px; padding: 16px; border: 1px solid #f59e0b; border-left: 5px solid #f59e0b; border-radius: 10px; background: #fffbeb; }
.escalation-status-card.success { border-color: #16a34a; background: #f0fdf4; }
.escalation-status-card span { color: #92400e; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.escalation-status-card.success span { color: #166534; }
.escalation-status-card strong { color: #111827; }
.escalation-status-card p { margin: 0; color: #475569; font-size: 13px; line-height: 1.5; }
.support-end-button { justify-self: start; margin-top: 4px; padding: 9px 14px; border: 1px solid #111827; border-radius: 999px; background: #fff; color: #111827; font: inherit; font-weight: 800; cursor: pointer; }
.support-end-button:hover { background: #111827; color: #fff; }
.welcome-message-card { overflow: hidden; border: 1px solid #dbe2ea; border-top: 5px solid var(--brand); border-radius: 16px; background: linear-gradient(145deg,#fff 0%,#fafafa 100%); box-shadow: 0 18px 40px rgba(15,23,42,.1); }
.welcome-message-copy { display: grid; gap: 7px; padding: 22px 22px 18px; }
.welcome-message-copy > span { color: var(--brand); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.welcome-message-copy h2, .welcome-message-copy p { margin: 0; }
.welcome-message-copy h2 { color: #111; font-size: clamp(22px,4vw,30px); line-height: 1.2; }
.welcome-message-copy p { color: #64748b; font-size: 13px; }
.welcome-option-grid { display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid #e2e8f0; }
.welcome-option-grid button { position: relative; min-height: 124px; display: grid; align-content: start; gap: 7px; padding: 16px; border: 0; border-right: 1px solid #e2e8f0; background: #fff; color: #111827; text-align: left; cursor: pointer; }
.welcome-option-grid button:last-child { border-right: 0; }
.welcome-option-grid button:hover { background: #fff7f7; }
.welcome-option-grid button strong { font-size: 13px; }
.welcome-option-grid button span { color: #64748b; font-size: 11px; line-height: 1.5; }
.welcome-option-grid button small { margin-top: auto; color: var(--brand); font-size: 17px; }
@media (max-width: 620px) { .welcome-option-grid { grid-template-columns: 1fr; } .welcome-option-grid button { min-height: 92px; border-right: 0; border-bottom: 1px solid #e2e8f0; } }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 20;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.twogs-logo {
  width: 150px;
  height: 42px;
  border: 0;
  border-radius: 0;
  display: flex;
  align-items: flex-end;
  color: #0c0c0c;
  font-weight: 900;
  letter-spacing: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  font-size: 24px;
  line-height: 1;
  padding-top: 10px;
}

.twogs-logo.wordmark {
  font-family: "Plus Jakarta Sans", Arial Black, sans-serif;
  letter-spacing: -0.06em;
}

.twogs-logo::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: 8px;
  background: var(--brand);
}

.twogs-logo.small-mark {
  width: 128px;
  height: 36px;
  font-size: 20px;
}

.brand-text strong {
  display: block;
  font-size: 19px;
  letter-spacing: 0;
  color: #111827;
}

.brand-text span,
.quote-meta span,
.small {
  color: var(--muted);
  font-size: 13px;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #374151;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  background: #ffffff;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-pill {
  border: 1px solid #fee2e2;
  background: #fff5f5;
  color: #991b1b;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.dot.online {
  background: var(--success);
}

.layout {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 390px minmax(460px, 1fr) 480px;
  gap: 20px;
}

.workspace-layout {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 340px;
  gap: 0;
  overflow: hidden;
}

.workspace-rail {
  display: none;
  background: #ffffff;
  color: #111827;
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.45) transparent;
}

.rail-new {
  width: 100%;
  background: #111827;
  color: #ffffff;
  box-shadow: none;
}

.rail-section {
  display: grid;
  gap: 8px;
}

.rail-item {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  padding: 0 12px;
  color: #374151;
  background: transparent;
  font-weight: 700;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, padding-left 140ms ease;
}

.rail-item.active,
.rail-item:hover {
  background: #fff5f5;
  border-color: #fee2e2;
  color: #991b1b;
  padding-left: 16px;
}

.rail-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fafb;
}

.rail-card strong {
  color: #111827;
}

.rail-card span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}

.rail-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #6b7280;
  font-size: 13px;
}

.workspace-main {
  min-width: 0;
  background: #f3f4f6;
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.chatgpt-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.client-hero {
  margin: 18px 32px 0;
  padding: 18px 20px;
  border: 1px solid #111827;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.12);
}

.client-hero span,
.hero-metrics span {
  display: block;
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.client-hero strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.1;
  max-width: 520px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 10px;
  min-width: 310px;
}

.hero-metrics div {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-metrics strong {
  margin-top: 5px;
  font-size: 15px;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chatgpt-head {
  padding: 18px 32px 16px;
  border-bottom: 1px solid rgba(219, 228, 238, 0.86);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
}

.chatgpt-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  color: #111827;
  line-height: 1.08;
}

.chatgpt-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  max-width: 660px;
}

.chat-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  min-width: 300px;
}

.model-badge {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 12px;
}

.prompt-strip {
  display: flex;
  gap: 10px;
  padding: 12px 32px 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.prompt-strip button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: #374151;
  background: #ffffff;
  font-weight: 800;
  white-space: nowrap;
}

.prompt-strip button:hover {
  border-color: #fecaca;
  background: #fff5f5;
  color: #991b1b;
}

.solution-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 32px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.solution-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 5px;
  min-height: 104px;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.solution-card span {
  color: #991b1b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.solution-card strong {
  color: #111827;
  font-size: 16px;
}

.solution-card small {
  color: var(--muted);
  font-weight: 800;
}

.solution-card:hover,
.solution-card.active {
  border-color: #fecaca;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.solution-card.active {
  background: #fff5f5;
}

.chatgpt-body {
  overflow: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.45) transparent;
  padding: 24px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #f3f4f6;
}

.chat-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 15px;
  align-items: flex-start;
}

.chat-row.user {
  grid-template-columns: minmax(0, 1fr) 46px;
}

.chat-row.user .avatar {
  grid-column: 2;
  grid-row: 1;
}

.chat-row.user .chat-copy {
  grid-column: 1;
  grid-row: 1;
}

.chat-row.user .speaker {
  text-align: right;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #ffffff;
  border: 1px solid #111827;
  font-size: 12px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.assistant-avatar {
  background:
    radial-gradient(circle at 38% 32%, rgba(239, 54, 54, 0.34), transparent 34%),
    linear-gradient(145deg, #202b3d, #0b1220 68%);
}

.assistant-avatar {
  border-color: rgba(239, 54, 54, 0.72);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.twog-bot-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
}

.twog-bot-icon::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 50%;
  width: 2px;
  height: 5px;
  border-radius: 999px;
  background: #ffffff;
  transform: translateX(-50%);
}

.twog-bot-icon::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 5px;
  height: 5px;
  border: 2px solid #111827;
  border-radius: 50%;
  background: #ef3636;
  transform: translate(-50%, -50%);
}

.twog-bot-face {
  position: absolute;
  right: 1px;
  bottom: 0;
  left: 1px;
  height: 15px;
  border: 2px solid #ffffff;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.twog-bot-eyes {
  position: absolute;
  top: 3px;
  left: 50%;
  display: flex;
  gap: 5px;
  transform: translateX(-50%);
}

.twog-bot-eye {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.72);
}

.twog-bot-mouth {
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: #ef3636;
  transform: translateX(-50%);
}

.chat-row.user .avatar {
  background: #f8fafc;
  color: #07185c;
  border-color: #dbe4f0;
}

.chat-copy {
  display: grid;
  gap: 7px;
}

.speaker-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.chat-row.user .speaker-line {
  justify-content: flex-end;
}

.message-meta {
  color: #8994a3;
  font-size: 11px;
  font-weight: 700;
}

.chatgpt-body .bubble {
  max-width: 760px;
  border-radius: 8px;
  border-color: var(--line);
  padding: 15px 17px;
  color: #1f2937;
}

.chat-row.user .bubble {
  margin-left: auto;
  background: #f8fbff;
  border-color: #cddaf0;
  color: #10213f;
}

.chat-row.assistant .bubble {
  background: #ffffff;
  border-left: 4px solid var(--brand);
}

.pdf-card {
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.pdf-card-head {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(239, 54, 54, 0.08), rgba(17, 24, 39, 0.05)),
    #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.pdf-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pdf-card-head span,
.pdf-card-body span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pdf-card-head strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.pdf-card-logo {
  width: 116px;
  height: 34px;
  color: #111827;
  font-size: 19px;
  margin-bottom: 8px;
}

.pdf-card-body {
  padding: 16px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}

.pdf-card-body .pdf-card-wide {
  grid-column: 1 / -1;
}

.pdf-card-body div {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 13px;
  background: #f8fafc;
}

.pdf-card-body strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
}

.pdf-card-body p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.pdf-card-body .pdf-total {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.pdf-card-body .pdf-total span,
.pdf-card-body .pdf-total strong {
  color: #ffffff;
}

.pdf-card-body .pdf-total strong {
  font-size: 22px;
}

.pdf-card-table {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  border-collapse: collapse;
  font-size: 11px;
}

.pdf-card-table th,
.pdf-card-table td {
  border-bottom: 1px solid #d8dee8;
  padding: 8px 6px;
  text-align: left;
}

.pdf-card-table th {
  color: #111827;
  background: #f4f4f4;
  font-size: 10px;
}

.office-artifact-card {
  overflow: hidden;
  border: 1px solid #d8dee8;
  border-left: 5px solid #2563eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.office-artifact-card.workbook { border-left-color: #14804a; }

.office-artifact-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
}

.office-artifact-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
}

.office-artifact-card.workbook .office-artifact-icon { background: #14804a; }
.office-artifact-head > div:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.office-artifact-head span, .office-artifact-head small { color: #667085; }
.office-artifact-head strong, .office-artifact-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.office-artifact-preview { border-top: 1px solid #e5e7eb; background: #f8fafc; }
.office-artifact-preview summary { cursor: pointer; padding: 13px 18px; font-weight: 700; }
.office-artifact-preview pre { max-height: 320px; margin: 0; padding: 0 18px 18px; overflow: auto; white-space: pre-wrap; font: inherit; line-height: 1.55; }
.office-table-wrap { overflow-x: auto; padding: 0 18px 18px; }
.office-table-wrap table { width: 100%; border-collapse: collapse; background: #fff; }
.office-table-wrap th, .office-table-wrap td { padding: 9px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.office-table-wrap th { background: #111827; color: #fff; }

@media (max-width: 720px) {
  .office-artifact-head { grid-template-columns: auto minmax(0, 1fr); }
  .office-artifact-head .btn { grid-column: 1 / -1; width: 100%; }
}

.chatgpt-composer {
  position: relative;
  padding: 14px 32px 18px;
  background: #f3f4f6;
  border-top: 1px solid var(--line);
}

.composer-shell {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08);
  overflow: hidden;
}

.attachment-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.attachment-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 0;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(100%, 360px);
  padding: 8px 8px 8px 11px;
  border: 1px solid #d6dae1;
  border-radius: 10px;
  background: #f8f9fb;
  color: #172033;
}

.attachment-chip-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.attachment-chip strong,
.attachment-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip strong {
  font-size: 12px;
}

.attachment-chip small {
  color: #687386;
  font-size: 10px;
}

.attachment-chip button {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 0;
  border-radius: 999px;
  background: #e8ebf0;
  color: #1c2433;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.attachment-chip button:hover {
  background: #dfe3e9;
}

.attachment-error {
  margin: 10px 14px 0;
  padding: 9px 11px;
  border-left: 3px solid #c72127;
  background: #fff4f4;
  color: #a61b21;
  font-size: 12px;
}

.chatgpt-composer textarea {
  min-height: 58px;
  max-height: 170px;
  resize: vertical;
  border: 0;
  width: 100%;
  padding: 16px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

.composer-footer {
  border-top: 1px solid #e0e0e0;
  padding: 10px 10px 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.composer-footer span {
  color: #768397;
  font-size: 12px;
}

.send-button {
  min-width: 72px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.attach-button {
  min-width: 64px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d7dce3;
  border-radius: 999px;
  background: #ffffff;
  color: #182033;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.attach-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.attach-button:disabled,
.attachment-chip button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.message-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(18, 31, 54, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.message-attachment strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.message-attachment small {
  color: #667085;
  font-size: 9px;
  font-weight: 800;
}

.workspace-drawer {
  background: #ffffff;
  border-left: 1px solid var(--line);
  padding: 14px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.45) transparent;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
}

.workspace-rail::-webkit-scrollbar,
.chatgpt-body::-webkit-scrollbar,
.workspace-drawer::-webkit-scrollbar {
  width: 10px;
}

.workspace-rail::-webkit-scrollbar-track,
.chatgpt-body::-webkit-scrollbar-track,
.workspace-drawer::-webkit-scrollbar-track {
  background: transparent;
}

.workspace-rail::-webkit-scrollbar-thumb,
.chatgpt-body::-webkit-scrollbar-thumb,
.workspace-drawer::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.35);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

.workspace-rail::-webkit-scrollbar-thumb:hover,
.chatgpt-body::-webkit-scrollbar-thumb:hover,
.workspace-drawer::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 114, 128, 0.55);
  border: 3px solid transparent;
  background-clip: content-box;
}

.drawer-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.drawer-card:hover {
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.08);
}

.details-card {
  padding: 0;
  overflow: hidden;
}

.details-card summary {
  padding: 15px 16px;
  cursor: pointer;
  font-weight: 900;
  color: var(--ink);
  background: #f9fafb;
  border-bottom: 1px solid #dde1e6;
  list-style: none;
}

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

.details-card summary::after {
  content: "Open";
  float: right;
  color: var(--brand);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.details-card[open] summary::after {
  content: "Edit";
}

.details-card[open] summary {
  border-bottom-color: #e5ebf2;
}

.drawer-fields {
  padding: 2px 16px 16px;
}

.field.compact {
  margin-top: 12px;
}

.field.compact textarea {
  min-height: 70px;
}

.field.compact label {
  color: #475569;
}

.drawer-fields .field input,
.drawer-fields .field select,
.drawer-fields .field textarea {
  min-height: 40px;
  background: rgba(255, 255, 255, 0.88);
}

.drawer-actions {
  display: flex;
  gap: 8px;
  padding: 14px 16px 0;
}

.workspace-drawer .quote-document {
  margin: 12px;
  padding: 14px;
  box-shadow: none;
}

.proposal-summary {
  margin: 14px 16px 0;
  padding: 14px;
  border: 1px solid #fee2e2;
  border-radius: 12px;
  background: #fff5f5;
}

.proposal-summary span {
  display: block;
  color: #991b1b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.proposal-summary strong {
  display: block;
  margin-top: 5px;
  color: #111827;
}

.proposal-summary p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.workspace-drawer .invoice-band,
.workspace-drawer .metrics-grid {
  grid-template-columns: 1fr 1fr;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.sidebar,
.quote-panel {
  padding: 20px;
}

.panel-title {
  margin: 0 0 6px;
  font-size: 19px;
}

.panel-kicker {
  color: var(--brand);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}

.progress-row strong {
  color: var(--ink);
}

.progress-track {
  height: 8px;
  background: #e7edf4;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 16px;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #111827);
  transition: width 180ms ease;
}

.field {
  margin-top: 13px;
}

.field label {
  display: block;
  color: #2f3a49;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 11px;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.composer textarea:focus {
  outline: none;
  border-color: var(--brand-2);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12);
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.primary {
  background: #111827;
  color: #fff;
  box-shadow: none;
}

.btn.secondary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--ink);
}

.btn.ghost {
  color: var(--brand);
  background: #ffffff;
  border-color: #fecaca;
}

.btn:hover:not(:disabled) {
  filter: brightness(0.96);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100vh - 114px);
}

.chat-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background:
    linear-gradient(90deg, #f7fbfc 0%, #ffffff 70%),
    #ffffff;
}

.chat-head h1 {
  font-size: 23px;
  margin: 0 0 4px;
}

.messages {
  padding: 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fbfcfe;
}

.message {
  display: grid;
  gap: 6px;
  max-width: 84%;
}

.message.user {
  align-self: flex-end;
}

.bubble {
  border: 1px solid #dce3ec;
  border-radius: 8px;
  padding: 13px 15px;
  background: #fff;
  line-height: 1.45;
  white-space: pre-wrap;
  box-shadow: var(--shadow-soft);
}

.message.user .bubble {
  background: #123447;
  border-color: #123447;
  color: #fff;
}

.speaker {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  padding: 0 2px;
}

.message.user .speaker {
  text-align: right;
}

.composer {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: #ffffff;
}

.composer textarea {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  min-height: 52px;
  max-height: 150px;
  resize: vertical;
  background: #fbfdff;
}

.quote-document {
  border: 1px solid #cfd6df;
  background: #fff;
  padding: 24px 26px;
  margin-top: 14px;
  border-radius: 0;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.08);
  color: #111827;
  font-family: Arial, "Plus Jakarta Sans", sans-serif;
  font-size: 11px;
}

.workspace-drawer .quote-document:hover {
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.1);
}

.quote-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 18px;
  position: relative;
}

.quote-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0, var(--brand) 34%, #111827 34%, #111827 100%);
}

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

.quote-logo .twogs-logo {
  width: 56px;
  height: 56px;
}

.quote-logo strong {
  font-size: 19px;
}

.quote-meta {
  text-align: right;
  min-width: 140px;
  display: grid;
  align-content: start;
  gap: 3px;
}

.quote-section {
  margin-top: 20px;
}

.quotation-top {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  align-items: center;
  min-height: 52px;
}

.quotation-top h2 {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.quote-wordmark {
  color: #111827;
  font-size: 24px;
}

.quote-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  margin-top: 22px;
}

.quote-detail-grid dl {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0;
}

.quote-detail-grid dt {
  font-weight: 800;
}

.quote-detail-grid dd {
  margin: 0;
  min-width: 0;
}

.quote-band-title {
  margin-top: 18px;
  padding: 5px 8px;
  background: #d9d9d9;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.involved-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  padding: 10px 4px 4px;
}

.involved-grid p {
  margin: 3px 0 0;
  line-height: 1.35;
}

.price-currency-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 0;
}

.quotation-section {
  margin-top: 0;
}

.quotation-table {
  border: 0;
  border-radius: 0;
  border-collapse: collapse;
  font-size: 10px;
}

.quotation-table th,
.quotation-table td,
.financial-table th,
.financial-table td {
  padding: 7px 5px;
  border-bottom: 1px solid #9ca3af;
}

.quotation-table th,
.financial-table th {
  background: #ffffff;
  color: #111827;
  font-size: 10px;
  line-height: 1.2;
  text-transform: none;
}

.quotation-table td strong {
  display: block;
  font-size: 10px;
}

.quotation-table td span {
  display: block;
  margin-top: 4px;
  color: #4b5563;
  font-size: 9px;
  line-height: 1.25;
}

.quotation-total-box {
  width: min(280px, 100%);
  margin: 12px 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 16px;
}

.quotation-total-box strong,
.quotation-total-box strong + span {
  font-weight: 900;
}

.quotation-empty {
  margin: 10px 0 0;
  text-align: center;
  color: #374151;
}

.financial-table {
  border: 0;
  border-radius: 0;
  border-collapse: collapse;
  font-size: 10px;
}

.quote-section h3 {
  font-size: 12px;
  margin: 0 0 8px;
  color: #991b1b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quote-section p {
  margin: 0;
  color: #2f3a49;
  line-height: 1.5;
}

.address-block {
  white-space: pre-wrap;
  margin-top: 4px !important;
  color: #5d6675 !important;
}

/* TWOG Assistant Builder layout, inspired by IBM watsonx Assistant */
.topbar {
  background: #161616;
  border-bottom-color: #393939;
}

.topbar .brand-text strong,
.topbar .twogs-logo {
  color: #ffffff;
}

.topbar .brand-text span {
  color: #c6c6c6;
}

.topbar .nav-pill,
.topbar .status {
  background: #262626;
  border-color: #525252;
  color: #f4f4f4;
  border-radius: 0;
}

.workspace-layout {
  grid-template-columns: minmax(760px, 1fr) 320px;
  background: #ffffff;
}

.workspace-rail {
  background: #f4f4f4;
  padding: 16px;
}

.flow-title {
  display: none;
}

.flow-title strong {
  font-size: 15px;
}

.flow-title span,
.start-card span {
  color: #6f6f6f;
  font-size: 12px;
}

.start-card {
  border: 1px solid #e0e0e0;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 6px;
}

.steps-label {
  display: none;
}

.step-list {
  display: none;
  gap: 16px;
  overflow: auto;
}

.step-card {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  min-height: 114px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  text-align: left;
  padding: 16px 12px;
}

.step-card.active {
  border-color: #111827;
  outline: 2px solid #b9d6ff;
}

.step-card.complete {
  opacity: 0.76;
}

.step-number {
  color: #393939;
  font-weight: 700;
  align-self: center;
}

.step-card strong {
  display: block;
  color: #393939;
  font-size: 13px;
  line-height: 1.45;
}

.step-card small {
  display: inline-flex;
  margin-top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
}

.workspace-main {
  background: #ffffff;
}

.builder-shell {
  width: 100%;
  padding: 0;
  align-content: start;
  grid-template-rows: auto auto auto auto auto;
}

.builder-shell > .builder-topline,
.builder-shell > .condition-row,
.builder-shell > .builder-editor,
.builder-shell > .prompt-strip,
.builder-shell > .solution-strip,
.builder-shell > .then-row {
  display: none;
}

.builder-shell > .chatgpt-body,
.builder-shell > .chatgpt-composer {
  display: none;
}

.main-chat-panel {
  margin-top: 0;
  border-left: 0;
  border-right: 0;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto;
  min-height: 430px;
  overflow: hidden;
}

.main-chat-head {
  min-height: 52px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.main-chat-head span {
  color: #6f6f6f;
  font-size: 12px;
}

.main-chat-panel .chatgpt-body {
  display: flex;
  overflow: auto;
  padding: 18px;
  background: #f9fafb;
}

.main-chat-panel .chatgpt-composer {
  display: block;
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
}

.main-chat-panel {
  min-height: 560px;
  border-color: #111827;
  box-shadow: 0 22px 50px rgba(17, 17, 17, 0.16);
}

.main-chat-head {
  background: #111111;
  color: #ffffff;
  font-size: 12px;
  border-bottom: 3px solid var(--brand);
}

.main-chat-head strong {
  font-size: 12px;
  font-weight: 800;
}

.chat-head-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.chat-head-actions button {
  border: 0;
  background: transparent;
  color: #d1d5db;
  font: inherit;
  font-size: 12px;
  padding: 4px 0;
}

.main-chat-panel .chatgpt-body {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 66px 32px 32px;
  background:
    linear-gradient(180deg, #ffffff 0%, #ffffff 54%, #f5f5f5 100%);
}

.askhr-hero {
  width: min(640px, 100%);
  margin: 0 auto;
}

.askhr-meta {
  margin-bottom: 12px;
  color: #ef3636;
  font-size: 12px;
  font-weight: 600;
}

.askhr-hero h2 {
  margin: 0;
  color: #111111;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 400;
}

.askhr-hero p {
  margin: 13px 0 24px;
  max-width: 600px;
  color: #687381;
  font-size: 13px;
  line-height: 1.65;
}

.askhr-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.guided-question-card {
  margin: 0 0 22px;
  border: 1px solid #111111;
  border-top: 4px solid var(--brand);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.09);
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.8fr) minmax(140px, 0.5fr);
  gap: 14px;
  align-items: end;
}

.guided-question-card > div:first-child {
  display: grid;
  gap: 7px;
}

.guided-question-card span,
.package-picker span {
  color: #ef3636;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guided-question-card strong {
  color: #111111;
  font-size: 18px;
  line-height: 1.25;
}

.guided-question-card select,
.package-picker select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #111111;
  border-radius: 3px;
  background: #ffffff;
  color: #111111;
  padding: 0 12px;
  font-weight: 700;
}

.guided-freeform {
  display: grid;
  gap: 6px;
}

.guided-freeform button {
  min-height: 42px;
  border: 1px solid #111111;
  border-radius: 3px;
  background: #111111;
  color: #ffffff;
  font-weight: 900;
}

.guided-freeform small {
  color: #6b7280;
}

.package-picker {
  display: grid;
  gap: 7px;
}

.askhr-card-grid button {
  min-height: 118px;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.86);
  padding: 16px;
  text-align: left;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  color: #2f3742;
}

.askhr-card-grid button:hover {
  border-color: #ef3636;
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.1);
}

.askhr-card-grid strong {
  font-size: 13px;
  font-weight: 800;
}

.askhr-card-grid span {
  color: #687381;
  font-size: 12px;
  line-height: 1.45;
}

.askhr-card-grid small {
  justify-self: end;
  color: #ef3636;
  font-size: 18px;
  line-height: 1;
}

.chat-message-stack {
  width: min(640px, 100%);
  margin: 8px auto 0;
  display: grid;
  gap: 16px;
}

.main-chat-panel .chat-row {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}

.main-chat-panel .chat-row.user {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.main-chat-panel .avatar {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  box-shadow: none;
  font-size: 10px;
}

.main-chat-panel .chatgpt-body .bubble {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  box-shadow: none;
}

.main-chat-panel .chat-row.assistant .bubble {
  border-left: 1px solid #e2e8f0;
}

.response-feedback {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
}

.response-feedback button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  filter: grayscale(1);
  line-height: 1;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.response-feedback button:hover:not(:disabled) {
  border-color: #ef3636;
  background: #fff5f5;
  filter: none;
  transform: translateY(-1px);
}

.response-feedback button.selected {
  border-color: #ef3636;
  background: #fff0f0;
  box-shadow: 0 0 0 2px rgb(239 54 54 / 12%);
  filter: none;
}

.response-feedback button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.response-feedback small {
  color: #15803d;
  font-size: 10px;
  font-weight: 800;
}

.response-feedback small.error {
  color: #b91c1c;
}

.suggested-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.suggested-actions button {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #07185c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.suggested-actions button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.proposal-intake-chat-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #111111;
  border-top: 5px solid var(--brand);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(17, 17, 17, 0.1);
}

.proposal-intake-heading,
.proposal-intake-question,
.proposal-intake-package {
  display: grid;
  gap: 6px;
}

.proposal-intake-heading > span,
.proposal-intake-question > span,
.proposal-intake-package > span {
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.proposal-intake-heading > strong {
  color: #111111;
  font-size: 20px;
}

.proposal-intake-heading p,
.proposal-intake-package small {
  margin: 0;
  color: #6b7280;
  line-height: 1.5;
}

.proposal-intake-question > strong {
  color: #111111;
  font-size: 18px;
  line-height: 1.3;
}

.proposal-intake-chat-card select,
.proposal-answer-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid #111111;
  border-radius: 6px;
  background: #ffffff;
  color: #111111;
  padding: 0 14px;
  font-weight: 800;
}

.proposal-answer-button {
  background: #111111;
  color: #ffffff;
  cursor: pointer;
}

.proposal-intake-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.proposal-intake-actions button {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.proposal-intake-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.proposal-intake-actions span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.main-chat-panel .chatgpt-composer {
  padding: 0 32px 26px;
  background: linear-gradient(180deg, #f5f5f5 0%, #eeeeee 100%);
  border-top: 0;
}

.main-chat-panel .composer-shell {
  width: min(640px, 100%);
  margin: 0 auto;
  border-color: #edf1f7;
  border-radius: 3px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

.main-chat-panel .chatgpt-composer textarea {
  min-height: 52px;
  max-height: 120px;
  resize: none;
  padding: 17px 18px 6px;
  font-size: 13px;
}

.main-chat-panel .composer-footer {
  border-top: 0;
  padding: 0 12px 10px 18px;
}

.main-chat-panel .composer-footer span {
  color: transparent;
  user-select: none;
}

.main-chat-panel .send-button {
  min-width: 34px;
  width: 34px;
  height: 30px;
  border-radius: 3px;
  background: transparent;
  color: #9ca3af;
  font-size: 18px;
  box-shadow: none;
}

.proposal-toolbox {
  border: 1px solid #e0e0e0;
  background: #ffffff;
  padding: 18px;
}

.proposal-toolbox h2 {
  margin: 6px 0;
  font-size: 18px;
}

.proposal-toolbox p {
  margin: 0;
  color: #6f6f6f;
  font-size: 13px;
  line-height: 1.45;
}

.builder-topline {
  padding-top: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.builder-topline h1 {
  margin: 0;
  font-size: 16px;
}

.builder-topline span {
  color: #6f6f6f;
  font-size: 13px;
}

.condition-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 0 56px;
}

.condition-row span {
  color: #393939;
}

.condition-row button {
  border: 0;
  border-bottom: 1px solid #8d8d8d;
  background: #f4f4f4;
  min-height: 40px;
  padding: 0 18px;
  color: #393939;
}

.condition-row .set-values {
  margin-left: auto;
  border: 1px solid #0f62fe;
  color: #0f62fe;
  background: #ffffff;
  min-width: 196px;
  text-align: left;
}

.builder-editor {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.assistant-copy-editor {
  width: 100%;
  min-height: 136px;
  border: 0;
  background: #f4f4f4;
  padding: 22px;
  resize: vertical;
  color: #393939;
  font-size: 15px;
  line-height: 1.5;
}

.response-chip {
  margin-top: 12px;
  margin-left: auto;
  background: #393939;
  color: #ffffff;
  width: max-content;
  padding: 10px 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  transform: translateY(-34px);
}

.then-row {
  margin-top: 24px;
  border-bottom: 1px solid #8d8d8d;
  background: #f4f4f4;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  color: #0f62fe;
}

.then-row button {
  border: 0;
  background: transparent;
  color: #0f62fe;
  font-weight: 700;
}

.workspace-drawer {
  background: #ffffff;
  border-left: 1px solid #e0e0e0;
  align-content: center;
}

.preview-phone {
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.14);
  overflow: hidden;
  min-height: 560px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.preview-head {
  min-height: 64px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.preview-head button {
  border: 0;
  background: transparent;
  color: #393939;
  font-weight: 800;
  margin-left: 8px;
}

.preview-body {
  padding: 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.preview-message {
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}

.preview-message span {
  color: #0f62fe;
  font-size: 12px;
  font-weight: 800;
}

.preview-message p {
  margin: 10px 0 0;
  color: #393939;
  font-size: 14px;
  line-height: 1.45;
}

.preview-message.user p {
  margin-left: auto;
  width: max-content;
  max-width: 90%;
  color: #ffffff;
  background: #393939;
  border-radius: 6px;
  padding: 10px 12px;
}

.preview-input {
  border-top: 1px solid #e0e0e0;
  display: grid;
  grid-template-columns: 1fr 46px;
}

.preview-input textarea {
  min-height: 48px;
  border: 0;
  resize: none;
  padding: 14px;
}

.preview-input button {
  border: 0;
  background: #ffffff;
  color: #9ca3af;
  font-size: 20px;
}

.quote-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 8px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.quote-table th,
.quote-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

.quote-table tr:last-child td {
  border-bottom: 0;
}

.quote-table th {
  color: #334155;
  background: #f4f4f4;
  font-size: 12px;
  text-transform: uppercase;
}

.quote-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 16px;
  background: #111827;
  border: 1px solid #111827;
  color: #ffffff;
  border-radius: 12px;
  font-weight: 900;
}

.pricing-card {
  margin-top: 16px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid var(--brand);
  background: #ffffff;
  border-radius: 14px;
  padding: 13px;
  display: grid;
  gap: 4px;
}

.pricing-card strong {
  color: var(--brand);
}

.pricing-card span {
  color: #425166;
  font-size: 13px;
  line-height: 1.4;
}

.invoice-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 20px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
}

.invoice-band div,
.metrics-grid div {
  padding: 12px;
  border-right: 1px solid #dde1e6;
  display: grid;
  gap: 4px;
}

.invoice-band div:last-child,
.metrics-grid div:nth-child(3n) {
  border-right: 0;
}

.invoice-band span,
.metrics-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-band strong,
.metrics-grid strong {
  font-size: 14px;
  color: var(--ink);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

.next-steps {
  padding-left: 18px;
  margin: 8px 0 0;
  color: #2f3a49;
}

.model-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.workspace-layout {
  grid-template-columns: minmax(0, 1fr) clamp(280px, 23vw, 340px);
}

.workspace-main {
  min-width: 0;
}

.builder-shell {
  width: 100%;
  padding: 0;
}

.main-chat-panel {
  width: 100%;
}

.askhr-hero,
.chat-message-stack,
.main-chat-panel .composer-shell {
  width: min(920px, 100%);
}

.guided-question-card {
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr) minmax(150px, 0.45fr);
}

.workspace-drawer {
  min-width: 0;
}

@media screen {
  .workspace-layout {
    grid-template-columns: minmax(720px, 1fr) clamp(280px, 23vw, 340px) !important;
    overflow: auto;
  }

  .workspace-main {
    grid-column: auto !important;
  }

  .workspace-drawer {
    grid-column: auto !important;
    border-left: 1px solid #e0e0e0 !important;
    border-top: 0 !important;
  }
}

@media (max-width: 1180px) {
  .workspace-layout {
    grid-template-columns: minmax(560px, 1fr);
    overflow: auto;
  }

  .workspace-drawer {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid #dfe6ef;
    grid-template-columns: 1fr 1fr;
  }

  .layout {
    grid-template-columns: 340px 1fr;
  }

  .quote-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  body,
  .app {
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }

  .topbar,
  .layout,
  .chat-head {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-right {
    justify-content: flex-start;
    width: 100%;
  }

  .layout {
    grid-template-columns: 1fr;
    padding-top: 14px;
    gap: 14px;
  }

  .workspace-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .workspace-rail {
    display: none;
  }

  .chatgpt-shell {
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .client-hero {
    margin: 16px 16px 0;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .client-hero strong {
    font-size: 22px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .chatgpt-head {
    flex-direction: column;
    padding: 20px 16px 14px;
  }

  .guided-question-card {
    grid-template-columns: 1fr;
  }

  .chat-actions {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .prompt-strip {
    padding: 12px 16px;
  }

  .solution-strip {
    grid-template-columns: 1fr;
    padding: 10px 16px 14px;
  }

  .chatgpt-head h1 {
    font-size: 24px;
  }

  .chatgpt-body {
    padding: 18px 16px 100px;
    overflow: visible;
  }

  .chat-row,
  .chat-row.user {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .chat-row.user .avatar {
    grid-column: 1;
  }

  .chat-row.user .chat-copy {
    grid-column: 2;
  }

  .chat-row.user .speaker {
    text-align: left;
  }

  .avatar {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .chatgpt-composer {
    padding: 14px 16px 18px;
  }

  .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .send-button {
    width: 100%;
  }

  .workspace-drawer {
    border-left: 0;
    padding: 14px;
    grid-template-columns: 1fr;
  }

  .pdf-card-body {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    min-height: 680px;
  }

  .message {
    max-width: 100%;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .model-inputs {
    grid-template-columns: 1fr;
  }

  .invoice-band,
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quote-header {
    flex-direction: column;
  }

  .quote-meta {
    text-align: left;
  }
}

@media screen {
  .topbar,
  .workspace-rail,
  .workspace-drawer,
  .proposal-toolbox,
  .details-card,
  .builder-topline,
  .condition-row,
  .builder-editor,
  .prompt-strip,
  .solution-strip,
  .then-row,
  .workspace-main > .chatgpt-composer {
    display: none !important;
  }

  .app {
    min-height: 100vh;
  }

  .workspace-layout {
    display: block !important;
    grid-template-columns: 1fr !important;
    height: 100vh;
    overflow: hidden !important;
    padding: 0 !important;
  }

  .workspace-main,
  .chatgpt-shell {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }

  .main-chat-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
  }

  .main-chat-head {
    min-height: 64px;
    padding: 0 clamp(18px, 3vw, 42px);
  }

  .chat-head-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
  }

  .twog-chat-mark {
    position: relative;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 1;
    padding-top: 9px;
    white-space: nowrap;
  }

  .twog-chat-mark::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 46px;
    height: 4px;
    background: var(--brand);
  }

  .chat-head-actions {
    gap: 12px;
  }

  .chat-head-actions button {
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    padding: 8px 12px;
  }

  .chat-head-actions button:hover {
    border-color: var(--brand);
    color: #ffffff;
  }

  .main-chat-panel .chatgpt-body {
    padding-left: clamp(18px, 5vw, 76px);
    padding-right: clamp(18px, 5vw, 76px);
  }
}

.quote-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.62);
  padding: 22px;
}

.quote-modal-panel {
  width: min(980px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.quote-modal-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border-bottom: 1px solid #d1d5db;
}

.quote-preview-document {
  margin: 18px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #cfd6df;
  color: #111827;
  font-size: 12px;
}

.partner-service-note,
.pdf-partner-note {
  margin: 10px 0 0;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}

.partner-service-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff7ed;
  border-left: 4px solid var(--brand);
}

.fee-explainer {
  margin-top: 12px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.fee-explainer strong,
.fee-explainer span {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  font-weight: 800;
  text-transform: uppercase;
}

.fee-explainer p {
  margin: 4px 0 0;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}

.product-detail-card {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-top: 4px solid var(--brand);
}

.product-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px;
}

.product-detail-head span,
.product-detail-card h3 {
  color: var(--brand);
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.product-detail-head strong {
  color: #111827;
  display: block;
  font-size: 20px;
}

.product-detail-head p,
.product-detail-card p,
.product-detail-card li,
.product-detail-card small {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}

.product-detail-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.product-detail-grid section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 14px;
}

.product-detail-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.sales-guidance-card {
  border: 1px solid #d8dee8;
  background: #ffffff;
}

.sales-guidance-card summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-top: 4px solid var(--brand);
}

.sales-guidance-card summary::marker {
  color: var(--brand);
}

.sales-guidance-card summary span,
.sales-guidance-card h3 {
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.sales-guidance-card summary strong {
  color: #111827;
  font-size: 15px;
  text-align: right;
}

.motion-strategy-band {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.4fr;
  gap: 12px;
  padding: 0 18px 16px;
}

.motion-strategy-band div {
  background: #111827;
  border-top: 3px solid var(--brand);
  color: #ffffff;
  padding: 14px;
}

.motion-strategy-band span {
  color: #fca5a5;
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.motion-strategy-band strong {
  color: #ffffff;
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}

.motion-strategy-band p {
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.motion-chart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 16px;
}

.motion-column {
  border: 1px solid #d8dee8;
  background: #f9fafb;
  min-width: 0;
}

.motion-column.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(239, 54, 54, 0.14);
}

.motion-column-head {
  background: #07185c;
  color: #ffffff;
  padding: 12px 14px;
}

.motion-column-head strong {
  display: block;
  font-size: 15px;
}

.motion-column-head span {
  color: #cbd5e1;
  font-size: 11px;
}

.motion-column article {
  margin: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.motion-column article.selected {
  border-color: var(--brand);
  border-left: 4px solid var(--brand);
}

.motion-column article strong {
  color: #07185c;
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.motion-column article p,
.motion-column article li {
  color: #4b5563;
  font-size: 11px;
  line-height: 1.35;
}

.motion-column article p {
  margin: 0 0 8px;
}

.motion-column article ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
}

.guidance-grid,
.guidance-lists {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 0 18px 16px;
}

.guidance-grid section,
.guidance-lists section,
.portfolio-match-list,
.guide-rule-strip {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 14px;
}

.guidance-grid p,
.guidance-lists li,
.portfolio-match-list p,
.portfolio-match-list small,
.guide-rule-strip span {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}

.persona-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.persona-list span {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 8px;
}

.guidance-lists ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.portfolio-match-list {
  margin: 0 18px 16px;
}

.portfolio-match-list article {
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
  margin-top: 10px;
}

.portfolio-match-list article strong {
  color: #111827;
  display: block;
  font-size: 13px;
}

.guide-rule-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 18px 18px;
}

.guide-rule-strip div {
  background: #ffffff;
  border-left: 3px solid var(--brand);
  padding: 10px;
}

.guide-rule-strip strong {
  color: #111827;
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

@media (max-width: 780px) {
  .product-detail-head,
  .product-detail-grid,
  .motion-strategy-band,
  .motion-chart,
  .guidance-grid,
  .guidance-lists,
  .guide-rule-strip {
    grid-template-columns: 1fr;
  }

  .sales-guidance-card summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .sales-guidance-card summary strong {
    text-align: left;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .workspace-rail,
  .workspace-main,
  .drawer-card:not(.details-card),
  .details-card:not([open]) summary,
  .drawer-actions,
  .drawer-fields,
  .sidebar,
  .chat-panel,
  .quote-panel > :not(.quote-document):not(.print-title) {
    display: none !important;
  }

  .workspace-layout,
  .workspace-drawer,
  .layout,
  .quote-panel {
    display: block;
    padding: 0;
    margin: 0;
    width: 100%;
    border: 0;
  }

  .details-card,
  .quote-panel,
  .quote-document {
    border: 0;
    box-shadow: none;
  }

  .details-card summary {
    display: none;
  }

  .quote-document {
    padding: 0;
    margin: 0;
  }

  .invoice-band,
  .metrics-grid,
  .quote-table {
    break-inside: avoid;
  }
}

/* Ask Seller focused proposal flow */
.workspace-layout {
  grid-template-columns: minmax(0, 1fr);
}

.workspace-rail {
  display: none;
}

.workspace-main {
  min-width: 0;
  padding: clamp(12px, 2vw, 28px);
}

.builder-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.main-chat-panel {
  min-height: calc(100vh - 120px);
  border: 1px solid #dedede;
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(17, 17, 17, 0.12);
}

.main-chat-head {
  min-height: 58px;
  padding: 0 22px;
}

.main-chat-panel .chatgpt-body {
  padding: clamp(28px, 5vw, 60px) clamp(18px, 4vw, 44px) 28px;
}

.askhr-hero,
.chat-message-stack,
.main-chat-panel .composer-shell {
  width: min(820px, 100%);
}

.askhr-hero h2 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.035em;
}

.askhr-hero > p {
  max-width: 690px;
  font-size: 15px;
}

.guided-question-card {
  grid-template-columns: minmax(260px, 1.3fr) minmax(210px, 0.8fr) minmax(190px, 0.6fr);
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(17, 17, 17, 0.08);
}

.question-progress {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #ececec;
}

.question-progress span {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: var(--brand);
  transition: width 180ms ease;
}

.package-picker small {
  min-height: 32px;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.4;
}

.proposal-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin: -4px 0 22px;
}

.proposal-actions > span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.proposal-actions .btn {
  min-height: 40px;
  border-radius: 999px;
}

.proposal-actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.seller-guide-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  background: #fafafa;
}

.seller-guide-panel .sales-guidance-card {
  margin: 0;
}

.main-chat-panel .chatgpt-composer {
  position: relative;
  z-index: 3;
  padding: 12px clamp(18px, 4vw, 44px) 22px;
  border-top: 1px solid #e4e4e4;
  background: rgba(250, 250, 250, 0.96);
}

.main-chat-panel .composer-shell {
  border: 1px solid #cfcfcf;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.main-chat-panel .composer-footer span {
  color: #747474;
  user-select: auto;
}

.main-chat-panel .send-button {
  width: auto;
  min-width: 42px;
  padding: 0 12px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-button {
  width: 38px;
  height: 38px;
  border: 1px solid #d7dce3;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 18px;
  cursor: pointer;
}

.voice-button:hover {
  border-color: #8b80ff;
  color: #6857ee;
}

@media (max-width: 620px) {
  .composer-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .composer-actions {
    align-self: flex-end;
  }

  .attachment-chip {
    width: 100%;
    max-width: none;
  }

  .attachment-chip-copy {
    flex: 1;
  }
}

.voice-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 38%, rgba(239, 54, 54, 0.2), transparent 30%),
    linear-gradient(145deg, rgba(8, 8, 8, 0.98), rgba(28, 28, 28, 0.98));
  backdrop-filter: blur(20px);
}

.voice-panel {
  display: grid;
  justify-items: center;
  width: min(920px, 100%);
  padding: 30px 34px 34px;
  border-top: 7px solid var(--brand);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(239, 54, 54, 0.04), transparent 34%),
    #ffffff;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.42);
}

.voice-brand {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.voice-brand small {
  color: #697180;
  font-size: 13px;
  font-weight: 800;
}

.voice-wordmark {
  display: grid;
  gap: 8px;
  color: #090909;
  font-size: 19px;
  letter-spacing: -0.04em;
}

.voice-wordmark span {
  width: 58px;
  height: 5px;
  background: var(--brand);
}

.voice-kicker {
  margin-bottom: 18px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.voice-orb {
  position: relative;
  width: clamp(150px, 22vw, 230px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(239, 54, 54, 0.9);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.16), transparent 30%),
    radial-gradient(circle at 50% 70%, #ef3636 0%, #b31515 26%, #171717 72%);
  box-shadow:
    0 28px 70px rgba(239, 54, 54, 0.24),
    0 0 0 10px rgba(239, 54, 54, 0.06),
    inset 0 -4px 14px rgba(0, 0, 0, 0.48);
}

.voice-orb > strong {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: clamp(20px, 4vw, 32px);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.voice-orb::before,
.voice-orb::after,
.voice-orb span {
  position: absolute;
  content: "";
  inset: -14px;
  border: 2px solid rgba(239, 54, 54, 0.24);
  border-radius: inherit;
  opacity: 0;
}

.voice-orb.listening::before {
  animation: voice-pulse 1.8s ease-out infinite;
}

.voice-orb.listening::after {
  animation: voice-pulse 1.8s 0.55s ease-out infinite;
}

.voice-orb.listening span {
  animation: voice-pulse 1.8s 1.1s ease-out infinite;
}

@keyframes voice-pulse {
  0% { opacity: 0.65; transform: scale(0.92); }
  100% { opacity: 0; transform: scale(1.32); }
}

.voice-status {
  margin: 24px 0 4px;
  color: #111111;
  font-size: 24px;
  font-weight: 900;
}

.voice-guidance {
  margin: 0 0 18px;
  color: #697180;
  font-size: 13px;
}

.voice-error {
  margin: -8px 0 18px;
  padding: 9px 14px;
  border-left: 4px solid var(--brand);
  background: #fff4f4;
  color: #a71919;
  text-align: center;
}

.voice-composer {
  width: 100%;
  padding: 24px 28px 16px;
  border: 1px solid #dfe3e8;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(17, 17, 17, 0.1);
}

.voice-composer textarea {
  width: 100%;
  min-height: 74px;
  resize: none;
  border: 0;
  outline: 0;
  color: #242830;
  font: inherit;
  font-size: 20px;
}

.voice-composer textarea::placeholder {
  color: #9ba5b4;
}

.voice-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.voice-controls button {
  min-width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #f1f2f4;
  color: #111111;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.voice-controls .voice-mic {
  color: var(--brand);
  font-size: 16px;
}

.voice-controls .voice-mic.active {
  background: var(--brand);
  color: #ffffff;
}

.voice-controls .voice-audio {
  width: auto;
  padding: 0 14px;
  letter-spacing: 0.04em;
}

.voice-controls .voice-send {
  width: auto;
  padding: 0 20px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
}

.voice-controls .voice-send:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.voice-controls .voice-close {
  background: #111111;
  color: #ffffff;
  font-size: 30px;
  font-weight: 300;
}

.answer-sources {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px;
  border-left: 3px solid var(--brand);
  background: #f3f4f6;
}

.employee-results {
  display: grid;
  gap: 12px;
}

.mail-results {
  display: grid;
  gap: 10px;
}

.mail-results > p {
  margin: 0;
  color: #475569;
  font-size: 13px;
}

.mail-result-card {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #ffffff;
}

.mail-result-card.unread {
  border-left: 5px solid var(--brand);
  background: #fffafa;
}

.mail-result-card > div {
  display: grid;
  gap: 2px;
}

.mail-result-card strong {
  color: #111111;
  font-size: 13px;
}

.mail-result-card span,
.mail-result-card small {
  color: #64748b;
  font-size: 10px;
}

.mail-result-card p {
  margin: 0;
  color: #475569;
  font-size: 11px;
  line-height: 1.5;
}

.mail-result-card a {
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
}

.email-draft-card,
.bitlocker-card {
  display: grid;
  gap: 9px;
  padding: 16px;
  border: 1px solid #dbe2ea;
  border-top: 5px solid var(--brand);
  border-radius: 14px;
  background: #ffffff;
}

.email-draft-card > span,
.bitlocker-card > span {
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.email-draft-card > strong,
.bitlocker-card > strong {
  color: #111111;
}

.email-draft-card > small,
.bitlocker-card > small {
  color: #64748b;
  font-size: 11px;
}

.email-draft-card > p,
.bitlocker-card > p {
  margin: 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.email-draft-card > div {
  display: flex;
  gap: 8px;
}

.email-draft-card button,
.bitlocker-card button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.email-draft-card button.secondary {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.bitlocker-key {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 10px;
  background: #111111;
  color: #ffffff;
}

.bitlocker-key small {
  color: #cbd5e1;
  font-size: 10px;
}

.bitlocker-key code {
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 12px;
}

.bitlocker-key button {
  justify-self: start;
  border: 1px solid #ef3636;
  background: #ef3636;
}

.employee-results-summary {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.employee-profile-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  align-items: start;
  padding: 15px;
  border: 1px solid #dbe2ea;
  border-left: 5px solid var(--brand);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.employee-profile-card img,
.employee-profile-fallback {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  object-fit: cover;
}

.employee-profile-fallback {
  display: grid;
  place-items: center;
  background: #111111;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.employee-profile-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.employee-profile-copy > strong {
  color: #111111;
  font-size: 15px;
}

.employee-profile-copy > span,
.employee-profile-copy > small {
  color: #64748b;
  font-size: 12px;
}

.employee-profile-copy > .employee-relationship {
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff1f1;
  color: #a71919;
  font-size: 10px;
  font-weight: 800;
}

.employee-profile-copy > a {
  overflow: hidden;
  color: #b91c1c;
  font-size: 12px;
  text-overflow: ellipsis;
}

.employee-show-more {
  justify-self: center;
  min-width: 220px;
  padding: 11px 18px;
  border: 1px solid #ef3636;
  border-radius: 999px;
  background: #ffffff;
  color: #b91c1c;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.employee-show-more:hover {
  background: #fff1f1;
}

.employee-free-slots {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.employee-free-slots > small {
  color: #111827;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.employee-free-slots > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.employee-free-slots span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff1f1;
  color: #a71919;
  font-size: 10px;
  font-weight: 800;
}

.grounding-state {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid #d7dce3;
  border-radius: 999px;
  background: #f8f8f8;
  color: #626b78;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.grounding-state.verified {
  border-color: #86b89a;
  background: #edf8f1;
  color: #176b3a;
}

.answer-sources > strong {
  color: #111111;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.answer-sources a {
  display: grid;
  gap: 3px;
  color: #111111;
  text-decoration: none;
}

.answer-sources a:hover span {
  color: var(--brand);
  text-decoration: underline;
}

.answer-sources span {
  font-size: 13px;
  font-weight: 800;
}

.answer-sources small {
  overflow: hidden;
  color: #626b78;
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  body,
  .app {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  .topbar {
    position: sticky;
    top: 0;
  }

  .topbar .brand-text,
  .topbar .nav-pill,
  .topbar .status {
    display: none;
  }

  .workspace-main {
    padding: 10px;
  }

  .main-chat-panel {
    min-height: calc(100vh - 78px);
    border-radius: 12px;
  }

  .main-chat-panel .chatgpt-body {
    padding: 26px 14px 18px;
  }

  .guided-question-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .proposal-actions {
    grid-template-columns: 1fr 1fr;
  }

  .proposal-actions > span {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .proposal-intake-actions {
    grid-template-columns: 1fr 1fr;
  }

  .proposal-intake-actions span {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .askhr-card-grid {
    grid-template-columns: 1fr;
  }

  .main-chat-panel .chatgpt-composer {
    position: sticky;
    bottom: 0;
    padding: 10px;
  }

  .main-chat-panel .composer-footer span {
    display: none;
  }

  .voice-overlay {
    align-items: end;
    padding: 14px;
  }

  .voice-panel {
    padding-bottom: 12px;
  }

  .voice-composer {
    padding: 20px 18px 14px;
    border-radius: 26px;
  }

  .voice-composer textarea {
    font-size: 17px;
  }
}

.government-opportunity-results,
.government-analysis-card,
.government-bid-plan-card,
.government-document-intake,
.government-document-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid #d8dee8;
  border-top: 5px solid var(--brand);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.government-results-head,
.government-analysis-head,
.government-document-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.government-results-head > div,
.government-analysis-head > div,
.government-document-head > div {
  display: grid;
  gap: 5px;
}

.government-results-head span,
.government-analysis-head > div > span,
.government-bid-plan-card > span,
.government-document-intake > span,
.government-document-head span {
  color: #c11f2a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.government-results-head strong,
.government-analysis-head > div > strong,
.government-bid-plan-card > strong,
.government-document-intake > strong,
.government-document-head strong {
  color: #101827;
  font-size: 20px;
  line-height: 1.25;
}

.government-results-head p,
.government-analysis-head p,
.government-bid-plan-card > p,
.government-document-intake > p,
.government-document-head p {
  margin: 0;
  color: #526177;
  line-height: 1.55;
}

.government-results-head > small {
  color: #64748b;
  font-size: 10px;
  text-align: right;
}

.government-search-warning {
  color: #9a6700 !important;
}

.government-opportunity-card {
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid #dce2eb;
  border-left: 5px solid var(--brand);
  border-radius: 14px;
  background: #fbfcfe;
}

.government-opportunity-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.government-opportunity-title > div:first-child {
  display: grid;
  gap: 4px;
}

.government-opportunity-title span {
  color: #69768a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.government-opportunity-title strong {
  color: #101827;
  font-size: 16px;
  line-height: 1.35;
}

.government-opportunity-title p,
.government-service-match {
  margin: 0;
  color: #526177;
  font-size: 12px;
  line-height: 1.5;
}

.government-fit-score {
  display: grid;
  min-width: 66px;
  padding: 10px;
  border: 1px solid #f4a6ac;
  border-radius: 12px;
  background: #fff4f5;
  color: #b91c1c;
  text-align: center;
}

.government-fit-score.pursue {
  border-color: #7bc99a;
  background: #eefaf2;
  color: #176b3a;
}

.government-fit-score strong {
  font-size: 23px;
  line-height: 1;
}

.government-fit-score span {
  font-size: 8px;
}

.government-opportunity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.government-opportunity-meta span {
  padding: 5px 8px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 9px;
  font-weight: 800;
}

.government-opportunity-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid #e3e7ee;
}

.government-opportunity-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.government-opportunity-footer > div:first-child {
  display: grid;
  gap: 2px;
}

.government-opportunity-footer span {
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.government-opportunity-footer strong {
  color: #111827;
  font-size: 12px;
}

.government-opportunity-footer button,
.government-opportunity-footer a,
.government-analysis-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #1f2937;
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.government-opportunity-footer button {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.government-recommendation {
  display: grid;
  min-width: 108px;
  padding: 12px 15px;
  border: 1px solid #d8dee8;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.government-recommendation.pursue {
  border-color: #72c492;
  background: #ecf9f1;
  color: #176b3a;
}

.government-recommendation.pass {
  border-color: #f2a3aa;
  background: #fff1f2;
  color: #a71919;
}

.government-recommendation strong {
  font-size: 18px;
}

.government-recommendation span {
  font-size: 10px;
  font-weight: 800;
}

.government-bid-range {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid #d8dee8;
  border-radius: 14px;
}

.government-bid-range > div {
  display: grid;
  gap: 5px;
  padding: 15px;
  background: #fafbfc;
  text-align: center;
}

.government-bid-range > div + div {
  border-left: 1px solid #d8dee8;
}

.government-bid-range .target {
  background: #fff3f4;
}

.government-bid-range span {
  color: #64748b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.government-bid-range strong {
  color: #111827;
  font-size: 17px;
}

.government-pricing-basis,
.government-pricing-warning {
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f3f6fa;
  color: #475569;
  font-size: 11px;
  line-height: 1.55;
}

.government-pricing-warning {
  border-left: 4px solid #eab308;
  background: #fffbeb;
  color: #854d0e;
}

.government-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.government-analysis-grid section,
.government-contact-panel,
.government-research-panel {
  padding: 16px;
  border: 1px solid #e0e5ed;
  border-radius: 12px;
  background: #fafbfc;
}

.government-analysis-grid h3,
.government-contact-panel h3,
.government-research-panel h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 12px;
}

.government-analysis-grid ul,
.government-analysis-grid ol,
.government-open-items ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: #526177;
  font-size: 11px;
  line-height: 1.5;
}

.government-contact-panel {
  display: grid;
  gap: 9px;
}

.government-contact-panel article {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 0;
  border-top: 1px solid #e2e7ef;
}

.government-contact-panel strong {
  color: #111827;
  font-size: 12px;
}

.government-contact-panel span,
.government-contact-panel p {
  margin: 0;
  color: #64748b;
  font-size: 11px;
}

.government-contact-panel a {
  color: #b91c1c;
  font-size: 11px;
}

.government-research-panel {
  display: grid;
  gap: 10px;
}

.government-research-panel a {
  display: grid;
  gap: 3px;
  color: #111827;
  text-decoration: none;
}

.government-research-panel a:hover strong {
  color: #b91c1c;
  text-decoration: underline;
}

.government-research-panel strong {
  font-size: 11px;
}

.government-research-panel span {
  color: #64748b;
  font-size: 10px;
  line-height: 1.45;
}

.government-analysis-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.government-bid-plan-card > .btn,
.government-document-intake > .btn {
  justify-self: start;
}

.government-intake-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.government-intake-grid label {
  display: grid;
  gap: 6px;
}

.government-intake-grid label span {
  color: #111827;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.government-intake-grid textarea {
  width: 100%;
  min-height: 70px;
  padding: 11px 12px;
  border: 1px solid #cfd6e1;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.government-intake-grid textarea:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(245, 51, 63, 0.12);
}

.government-document-head {
  align-items: center;
}

.government-open-items {
  padding: 14px;
  border: 1px solid #efc46b;
  border-radius: 12px;
  background: #fffaf0;
}

.government-open-items strong,
.government-draft-ready {
  color: #854d0e;
  font-size: 12px;
}

.government-draft-ready {
  margin: 0;
  color: #176b3a;
}

.government-document-preview {
  border: 1px solid #d8dee8;
  border-radius: 12px;
  background: #fafbfc;
}

.government-document-preview summary {
  padding: 13px 15px;
  color: #111827;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.government-document-preview pre {
  max-height: 520px;
  margin: 0;
  overflow: auto;
  padding: 18px;
  border-top: 1px solid #d8dee8;
  color: #334155;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .government-opportunity-results,
  .government-analysis-card,
  .government-bid-plan-card,
  .government-document-intake,
  .government-document-card {
    padding: 15px;
    border-radius: 13px;
  }

  .government-results-head,
  .government-analysis-head,
  .government-document-head,
  .government-opportunity-title,
  .government-opportunity-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .government-results-head > small {
    text-align: left;
  }

  .government-fit-score,
  .government-recommendation {
    width: max-content;
  }

  .government-opportunity-footer > div:last-child,
  .government-analysis-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .government-opportunity-footer button,
  .government-opportunity-footer a,
  .government-analysis-actions > * {
    width: 100%;
  }

  .government-bid-range,
  .government-analysis-grid,
  .government-intake-grid {
    grid-template-columns: 1fr;
  }

  .government-bid-range > div + div {
    border-top: 1px solid #d8dee8;
    border-left: 0;
  }
}

.sales-contacts-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid #d8dee8;
  border-top: 5px solid var(--brand);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.sales-contacts-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.sales-contacts-head > div {
  display: grid;
  gap: 5px;
}

.sales-contacts-head span {
  color: #c11f2a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sales-contacts-head strong {
  color: #101827;
  font-size: 20px;
  line-height: 1.25;
}

.sales-contacts-head p {
  margin: 0;
  color: #526177;
  line-height: 1.55;
}

.sales-search-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #dce2eb;
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
}

.sales-search-summary > div {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
}

.sales-search-summary > div + div {
  border-left: 1px solid #dce2eb;
}

.sales-search-summary span,
.sales-contact-playbook span {
  color: #69768a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sales-search-summary strong {
  color: #111827;
  font-size: 11px;
  line-height: 1.4;
}

.sales-contact-warning {
  margin: 0;
  padding: 10px 12px;
  border-left: 4px solid #d97706;
  background: #fff7ed;
  color: #92400e;
  font-size: 11px;
  line-height: 1.45;
}

.sales-contact-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  border: 1px solid #dce2eb;
  border-radius: 15px;
  overflow: hidden;
  background: #fbfcfe;
}

.sales-contact-rank {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 18px 10px;
  background: #111827;
  color: #ffffff;
  text-align: center;
}

.sales-contact-rank span {
  color: #fda4af;
  font-size: 10px;
  font-weight: 900;
}

.sales-contact-rank strong {
  font-size: 24px;
  line-height: 1;
}

.sales-contact-rank small {
  color: #dbe4f0;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.sales-contact-main {
  display: grid;
  gap: 13px;
  padding: 16px;
}

.sales-contact-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.sales-contact-initials {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #1f2937, #020617);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.sales-contact-identity > div:last-child {
  display: grid;
  gap: 2px;
}

.sales-contact-identity strong {
  color: #111827;
  font-size: 15px;
}

.sales-contact-identity span,
.sales-contact-identity p {
  margin: 0;
  color: #526177;
  font-size: 11px;
}

.sales-contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sales-contact-meta span {
  padding: 5px 8px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: #ffffff;
  color: #526177;
  font-size: 9px;
  font-weight: 800;
}

.sales-contact-fit {
  display: grid;
  gap: 6px;
}

.sales-contact-fit h3 {
  margin: 0;
  color: #111827;
  font-size: 11px;
  text-transform: uppercase;
}

.sales-contact-fit ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: #526177;
  font-size: 11px;
  line-height: 1.45;
}

.sales-contact-playbook {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) repeat(2, minmax(0, 1.65fr));
  border: 1px solid #dce2eb;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.sales-contact-playbook > div {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 11px 12px;
}

.sales-contact-playbook > div + div {
  border-left: 1px solid #dce2eb;
}

.sales-contact-playbook strong,
.sales-contact-playbook p {
  margin: 0;
  color: #334155;
  font-size: 10px;
  line-height: 1.5;
}

.sales-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sales-phone-type {
  color: #69768a;
  font-size: 9px;
  line-height: 1.45;
}

.sales-contact-compliance {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid #d9e7de;
  border-left: 5px solid #16834b;
  border-radius: 12px;
  background: #f1fbf5;
}

.sales-contact-compliance strong {
  color: #176b3a;
  font-size: 11px;
}

.sales-contact-compliance p,
.sales-contact-compliance small {
  margin: 0;
  color: #526177;
  font-size: 10px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .sales-search-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-search-summary > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #dce2eb;
  }

  .sales-search-summary > div:nth-child(4) {
    border-top: 1px solid #dce2eb;
  }

  .sales-contact-playbook {
    grid-template-columns: 1fr;
  }

  .sales-contact-playbook > div + div {
    border-top: 1px solid #dce2eb;
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .sales-contacts-card {
    padding: 15px;
    border-radius: 13px;
  }

  .sales-contacts-head {
    align-items: stretch;
    flex-direction: column;
  }

  .sales-contacts-head .btn {
    width: 100%;
  }

  .sales-search-summary {
    grid-template-columns: 1fr;
  }

  .sales-search-summary > div + div,
  .sales-search-summary > div:nth-child(3) {
    border-top: 1px solid #dce2eb;
    border-left: 0;
  }

  .sales-contact-row {
    grid-template-columns: 1fr;
  }

  .sales-contact-rank {
    grid-template-columns: auto auto auto;
    justify-content: start;
    gap: 9px;
    padding: 10px 14px;
  }

  .sales-contact-rank strong {
    font-size: 18px;
  }

  .sales-contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sales-contact-actions .btn {
    width: 100%;
  }
}

/* Company-readiness accessibility and safety states. */
:where(button, a[href], input, select, textarea):focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.16);
}

.welcome-option-grid button:focus-visible {
  position: relative;
  z-index: 1;
}

.main-chat-panel .chatgpt-composer textarea:disabled {
  cursor: wait;
  color: #64748b;
  background: #f8fafc;
  opacity: 1;
}

.main-chat-panel .composer-footer .composer-status {
  color: #64748b;
  user-select: auto;
}

.chat-row.assistant .bubble.urgent {
  border: 2px solid #b91c1c;
  border-left-width: 6px;
  background: #fff7ed;
  color: #7f1d1d;
  font-weight: 650;
}

@media (max-width: 640px) {
  .main-chat-panel .composer-footer .composer-status {
    display: inline;
    font-size: 10px;
  }
}

/* Employee self-service: Gusto payroll + Microsoft Entra */
.gusto-card {
  border: 1px solid #d8dee8;
  border-top: 5px solid #f5333f;
  border-radius: 18px;
  background: #fff;
  padding: 22px;
  color: #111827;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.gusto-card > p {
  margin: 12px 0 18px;
  color: #526079;
  line-height: 1.55;
}

.gusto-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.gusto-card-head > div {
  display: grid;
  gap: 4px;
}

.gusto-card-head span,
.gusto-card-head small {
  color: #687386;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gusto-card-head strong {
  font-size: 1.35rem;
}

.gusto-profile-grid,
.gusto-paystub dl,
.gusto-pto-preview dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid #e1e6ee;
  border-radius: 14px;
  overflow: hidden;
}

.gusto-profile-grid > div,
.gusto-paystub dl > div,
.gusto-pto-preview dl > div {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  background: #fbfcfe;
  border-bottom: 1px solid #e6eaf0;
}

.gusto-profile-grid dt,
.gusto-paystub dt,
.gusto-pto-preview dt {
  color: #687386;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.gusto-profile-grid dd,
.gusto-paystub dd,
.gusto-pto-preview dd {
  margin: 0;
  font-weight: 750;
}

.gusto-balance-highlight,
.gusto-next-paycheck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #eefbf3;
  border: 1px solid #a6dfbd;
}

.gusto-next-paycheck {
  display: grid;
  justify-content: stretch;
}

.gusto-balance-highlight span,
.gusto-next-paycheck span,
.gusto-next-paycheck small {
  color: #27623f;
}

.gusto-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.gusto-actions button,
.gusto-paystub button,
.gusto-payroll-support,
.gusto-request-toggle,
.gusto-pto-form button {
  border: 1px solid #111827;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  padding: 10px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.gusto-actions button.secondary,
.gusto-payroll-support,
.gusto-request-toggle {
  background: #fff;
  color: #111827;
  border-color: #ccd4df;
}

.gusto-actions button:hover,
.gusto-paystub button:hover,
.gusto-pto-form button:hover {
  background: #f5333f;
  border-color: #f5333f;
  color: #fff;
}

.gusto-balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.gusto-balance-grid article {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid #dce3ec;
  border-radius: 14px;
  background: #f8fafc;
}

.gusto-balance-grid article strong {
  font-size: 1.45rem;
}

.gusto-balance-grid article small {
  color: #687386;
}

.gusto-request-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.gusto-request-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #e6eaf0;
}

.gusto-request-list small {
  color: #27623f;
  font-weight: 800;
  text-transform: capitalize;
}

.gusto-request-toggle {
  margin-top: 18px;
}

.gusto-pto-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #dce3ec;
  border-radius: 14px;
  background: #fbfcfe;
}

.gusto-pto-form label {
  display: grid;
  gap: 7px;
}

.gusto-pto-form label > span {
  font-size: 0.85rem;
  font-weight: 800;
}

.gusto-pto-form input,
.gusto-pto-form select,
.gusto-pto-form textarea {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #cbd4e0;
  border-radius: 9px;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
}

.gusto-date-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.gusto-pto-preview {
  display: grid;
  gap: 13px;
  padding: 16px;
  border-left: 5px solid #16a05d;
  border-radius: 10px;
  background: #eefbf3;
}

.gusto-confirm {
  grid-template-columns: auto 1fr !important;
  align-items: center;
}

.gusto-confirm input {
  width: 18px;
  min-height: 18px;
  height: 18px;
}

.gusto-pto-form button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.gusto-error {
  margin: 0 !important;
  color: #b4232b !important;
  font-weight: 700;
}

.gusto-pay-card {
  display: grid;
  gap: 14px;
}

.gusto-paystub {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid #dce3ec;
  border-radius: 14px;
}

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

.gusto-paystub-title > div {
  display: grid;
  gap: 4px;
}

.gusto-paystub-title span {
  color: #687386;
  font-size: 0.86rem;
}

.gusto-payroll-support {
  justify-self: start;
}

@media (max-width: 720px) {
  .gusto-card {
    padding: 16px;
  }

  .gusto-card-head,
  .gusto-paystub-title,
  .gusto-balance-highlight {
    align-items: flex-start;
    flex-direction: column;
  }

  .gusto-profile-grid,
  .gusto-paystub dl,
  .gusto-pto-preview dl,
  .gusto-date-grid {
    grid-template-columns: 1fr;
  }

  .gusto-actions button,
  .gusto-paystub button,
  .gusto-payroll-support,
  .gusto-request-toggle {
    width: 100%;
  }
}

/* UI review implementation: balanced navigation, route identity, safer handoffs, and workspace tools. */
.main-chat-panel .chatgpt-body {
  padding-top: clamp(20px, 3vw, 30px);
}

.askhr-hero {
  display: grid;
  gap: 4px;
}

.askhr-meta {
  margin-bottom: 0;
  color: #7b8492;
  font-size: 11px;
  font-weight: 700;
}

.askhr-hero h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.askhr-hero > p {
  margin: 4px 0 8px;
  font-size: 13px;
  line-height: 1.45;
}

.welcome-message-card {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.welcome-message-copy {
  gap: 5px;
  padding: 16px 18px 14px;
}

.welcome-message-copy h2 {
  font-size: clamp(20px, 3vw, 25px);
}

.welcome-option-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
}

.welcome-option-grid .welcome-option {
  --category-accent: #5b6470;
  --category-ink: #353b44;
  --category-surface: #f2f3f5;
  min-height: 138px;
  align-content: start;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto 1fr;
  column-gap: 10px;
  row-gap: 8px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--category-accent) 28%, #ffffff);
  border-right: 1px solid color-mix(in srgb, var(--category-accent) 28%, #ffffff);
  border-radius: 14px;
  background: var(--category-surface);
  color: var(--category-ink);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.welcome-option-grid .welcome-option:last-child {
  border-right: 1px solid color-mix(in srgb, var(--category-accent) 28%, #ffffff);
}

.welcome-option-grid .welcome-option:hover {
  border-color: var(--category-accent);
  background: var(--category-surface);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--category-accent) 15%, transparent);
  transform: translateY(-2px);
}

.welcome-option.category-it {
  --category-accent: #1769aa;
  --category-ink: #0e4f83;
  --category-surface: #eaf4ff;
}

.welcome-option.category-hr {
  --category-accent: #12805f;
  --category-ink: #0b6047;
  --category-surface: #e8f7f1;
}

.welcome-option.category-employee {
  --category-accent: #b46a00;
  --category-ink: #794900;
  --category-surface: #fff4dc;
}

.welcome-option.category-sales {
  --category-accent: #c64c28;
  --category-ink: #843016;
  --category-surface: #fff0ea;
}

.welcome-option.category-government {
  --category-accent: #5a4cc7;
  --category-ink: #40359a;
  --category-surface: #f0efff;
}

.welcome-option.category-general {
  --category-accent: #5b6470;
  --category-ink: #353b44;
  --category-surface: #f1f2f4;
}

.welcome-option-icon {
  grid-column: 1;
  grid-row: 1;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--category-accent);
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.welcome-option-grid .welcome-option strong {
  grid-column: 1 / 3;
  grid-row: 2;
  color: var(--category-ink);
  font-size: 14px;
}

.welcome-option-grid .welcome-option .welcome-option-detail {
  grid-column: 1 / 4;
  grid-row: 3;
  color: color-mix(in srgb, var(--category-ink) 84%, #ffffff);
}

.welcome-option-grid .welcome-option small {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  color: var(--category-accent);
}

.grounding-state {
  --route-accent: #5b6470;
  --route-surface: #f1f2f4;
  border-color: color-mix(in srgb, var(--route-accent) 34%, #ffffff);
  background: var(--route-surface);
  color: var(--route-accent);
}

.grounding-state.route-it {
  --route-accent: #0e5e9c;
  --route-surface: #eaf4ff;
}

.grounding-state.route-hr {
  --route-accent: #0b6d4e;
  --route-surface: #e8f7f1;
}

.grounding-state.route-sales {
  --route-accent: #9b3e22;
  --route-surface: #fff0ea;
}

.grounding-state.route-government {
  --route-accent: #493ca8;
  --route-surface: #f0efff;
}

.grounding-state.route-general {
  --route-accent: #4f5966;
  --route-surface: #f1f2f4;
}

.grounding-state.verified::before {
  content: "✓";
  margin-right: 4px;
}

.chat-row.assistant.route-it .bubble {
  border-left-color: #1769aa;
}

.chat-row.assistant.route-hr .bubble {
  border-left-color: #12805f;
}

.chat-row.assistant.route-sales .bubble {
  border-left-color: #c64c28;
}

.chat-row.assistant.route-government .bubble {
  border-left-color: #5a4cc7;
}

.chat-row.assistant.route-general .bubble {
  border-left-color: #5b6470;
}

.handoff-confirmation {
  --handoff-accent: #b45309;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  max-width: 760px;
  padding: 18px;
  border: 1px solid #f59e0b;
  border-left: 5px solid #f59e0b;
  border-radius: 14px;
  background: #fff8e8;
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.08);
}

.handoff-warning-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f59e0b;
  color: #ffffff;
  font-weight: 900;
}

.handoff-confirmation-copy {
  display: grid;
  gap: 7px;
}

.handoff-confirmation-copy > span {
  color: #92400e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.handoff-confirmation-copy > strong {
  color: #422006;
  font-size: 16px;
}

.handoff-confirmation-copy p {
  margin: 0;
  color: #68430f;
  font-size: 13px;
  line-height: 1.5;
}

.handoff-confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 7px;
}

.handoff-confirmation-actions button {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
}

.handoff-confirm {
  border: 1px solid #d97706;
  background: #f59e0b;
  color: #2b1702;
}

.handoff-confirm:hover {
  background: #d97706;
  color: #ffffff;
}

.handoff-cancel {
  border: 1px solid #a8afb8;
  background: #ffffff;
  color: #303844;
}

.handoff-cancel:hover {
  border-color: #4b5563;
  background: #f8fafc;
}

.history-search {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.history-search span {
  color: #4b5563;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.history-search input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
}

.attachment-chip {
  width: min(100%, 520px);
  max-width: 100%;
  align-items: flex-start;
  padding: 10px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.attachment-preview {
  display: -webkit-box;
  overflow: hidden;
  color: #4b5563;
  font-size: 10px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.theme-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0 !important;
  border: 1px solid #4b5563 !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  font-size: 17px !important;
}

html[data-theme="dark"] {
  --ink: #e5edf7;
  --muted: #9aa8bb;
  --line: #334155;
  --panel: #111827;
  --surface: #08111f;
  --glass: rgba(17, 24, 39, 0.94);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .workspace-main,
html[data-theme="dark"] .main-chat-panel .chatgpt-body,
html[data-theme="dark"] .main-chat-panel .chatgpt-composer {
  background: #08111f;
  color: #e5edf7;
}

html[data-theme="dark"] .main-chat-panel,
html[data-theme="dark"] .composer-shell,
html[data-theme="dark"] .welcome-message-card,
html[data-theme="dark"] .chat-history-panel,
html[data-theme="dark"] .chat-history-list article,
html[data-theme="dark"] .chat-row.assistant .bubble,
html[data-theme="dark"] .gusto-card,
html[data-theme="dark"] .pdf-card,
html[data-theme="dark"] .government-opportunity-results,
html[data-theme="dark"] .sales-contacts-card {
  border-color: #334155;
  background: #111827;
  color: #e5edf7;
}

html[data-theme="dark"] .welcome-message-copy h2,
html[data-theme="dark"] .askhr-hero h2,
html[data-theme="dark"] .speaker,
html[data-theme="dark"] .history-open,
html[data-theme="dark"] .history-open strong,
html[data-theme="dark"] .chat-row.assistant .bubble,
html[data-theme="dark"] .gusto-card strong {
  color: #e5edf7;
}

html[data-theme="dark"] .welcome-message-copy p,
html[data-theme="dark"] .askhr-hero > p,
html[data-theme="dark"] .askhr-meta,
html[data-theme="dark"] .history-open span,
html[data-theme="dark"] .attachment-preview {
  color: #9aa8bb;
}

html[data-theme="dark"] .welcome-option-grid {
  background: #0c1625;
  border-color: #334155;
}

html[data-theme="dark"] .chat-row.user .bubble {
  border-color: #355179;
  background: #15253d;
  color: #e5edf7;
}

html[data-theme="dark"] .chat-row.user .avatar {
  border-color: #334155;
  background: #111827;
  color: #dbeafe;
}

html[data-theme="dark"] .chatgpt-composer textarea,
html[data-theme="dark"] .history-search input {
  background: #0f172a;
  color: #e5edf7;
}

html[data-theme="dark"] .composer-footer,
html[data-theme="dark"] .main-chat-panel .chatgpt-composer {
  border-color: #334155;
}

html[data-theme="dark"] .attach-button,
html[data-theme="dark"] .voice-button,
html[data-theme="dark"] .handoff-cancel {
  border-color: #475569;
  background: #172033;
  color: #e5edf7;
}

html[data-theme="dark"] .attachment-chip {
  border-color: #334155;
  background: linear-gradient(135deg, #172033, #111827);
  color: #e5edf7;
}

html[data-theme="dark"] .handoff-confirmation {
  border-color: #d97706;
  background: #2b1b08;
}

html[data-theme="dark"] .handoff-confirmation-copy > strong {
  color: #fde68a;
}

html[data-theme="dark"] .handoff-confirmation-copy p {
  color: #f9d897;
}

@media (max-width: 820px) {
  .welcome-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .main-chat-panel .chatgpt-body {
    gap: 16px;
    padding: 16px 12px 18px;
  }

  .main-chat-head {
    min-height: 54px;
    padding: 0 12px;
  }

  .chat-head-actions {
    gap: 10px;
  }

  .chat-head-actions button {
    font-size: 11px;
  }

  .askhr-hero h2 {
    font-size: 25px;
  }

  .welcome-option-grid {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 12px;
  }

  .welcome-option-grid .welcome-option {
    min-height: 112px;
    border-bottom: 1px solid color-mix(in srgb, var(--category-accent) 28%, #ffffff);
  }

  .main-chat-panel .chat-row,
  .main-chat-panel .chat-row.user {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
  }

  .chat-row.user .avatar {
    grid-column: 1;
  }

  .chat-row.user .chat-copy {
    grid-column: 2;
  }

  .chat-row.user .speaker {
    text-align: left;
  }

  .chat-row.user .speaker-line {
    justify-content: flex-start;
  }

  .avatar {
    width: 36px;
    height: 36px;
  }

  .speaker-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .grounding-state {
    margin-left: 0;
  }

  .handoff-confirmation {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .handoff-confirmation-actions {
    display: grid;
  }

  .handoff-confirmation-actions button {
    width: 100%;
  }

  .chat-history-panel {
    padding: 14px;
  }

  .theme-toggle {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-option-grid .welcome-option {
    transition: none;
  }
}

/* UI review v6: Carbon-style navigation and safer account controls. */
.chat-head-actions {
  gap: 9px;
}

.chat-head-actions .header-search-button,
.chat-head-actions .header-history-button,
.chat-head-actions .header-new-chat-button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  padding: 0 12px;
}

.chat-head-actions .header-search-button {
  width: 34px;
  min-width: 34px;
  display: grid;
  place-items: center;
  padding: 0;
}

.header-search-icon {
  position: relative;
  display: block;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.header-search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

.chat-head-actions .header-history-button {
  background: transparent;
  color: #ffffff;
}

.chat-head-actions .header-new-chat-button {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
  font-weight: 850;
}

.chat-head-actions .header-new-chat-button:hover {
  border-color: #ffffff;
  background: #d42e2e;
}

.account-menu-wrap {
  position: relative;
}

.chat-head-actions .user-menu-button {
  width: auto;
  min-width: 54px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: visible;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
}

.account-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.account-menu-chevron {
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
  transition: transform 140ms ease;
}

.user-menu-button[aria-expanded="true"] .account-menu-chevron {
  transform: rotate(180deg);
}

.account-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 11px);
  right: 0;
  width: min(310px, calc(100vw - 24px));
  display: grid;
  overflow: hidden;
  border: 1px solid #c9d1dc;
  border-radius: 4px;
  background: #ffffff;
  color: #161616;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.24);
}

.account-menu-profile {
  display: grid;
  gap: 4px;
  padding: 17px 18px;
  border-bottom: 1px solid #e0e0e0;
}

.account-menu-profile span {
  color: #6f7782;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-menu-profile strong {
  color: #161616;
  font-size: 14px;
}

.account-menu-profile small {
  overflow: hidden;
  color: #525b67;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu button {
  min-height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 0;
  padding: 11px 18px;
  background: #ffffff;
  color: #161616;
  text-align: left;
}

.account-menu button:hover {
  background: #f4f4f4;
  color: #161616;
}

.account-settings-button {
  border-bottom: 1px solid #e0e0e0 !important;
}

.account-settings-button > span,
.account-signout-button {
  font-weight: 750;
}

.account-settings-button small {
  color: #6f7782;
  font-size: 10px;
}

.account-signout-button {
  color: #a2191f !important;
}

.account-signout-confirm {
  display: grid;
  gap: 7px;
  padding: 15px 18px 17px;
  background: #fff7f7;
}

.account-signout-confirm strong {
  color: #750e13;
  font-size: 13px;
}

.account-signout-confirm p {
  margin: 0;
  color: #6f3b3e;
  font-size: 11px;
  line-height: 1.45;
}

.account-signout-confirm > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.account-signout-confirm > div button {
  min-height: 38px;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid #8d8d8d;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.account-signout-confirm .account-confirm-signout {
  border-color: #da1e28;
  background: #da1e28;
  color: #ffffff;
}

.account-signout-confirm .account-confirm-signout:hover {
  background: #a2191f;
  color: #ffffff;
}

.welcome-message-card {
  border-radius: 4px;
}

.welcome-option-grid {
  gap: 12px;
  background: #f4f4f4;
}

.welcome-option-grid .welcome-option {
  --category-accent: #5b6470;
  --category-ink: #353b44;
  --category-surface: #e8eaed;
  position: relative;
  min-height: 136px;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 1fr;
  column-gap: 12px;
  row-gap: 8px;
  padding: 16px 17px;
  border: 1px solid #d7dce3;
  border-top: 4px solid var(--category-accent);
  border-right: 1px solid #d7dce3;
  border-radius: 0;
  background: #ffffff;
  color: var(--category-ink);
  box-shadow: none;
}

.welcome-option-grid .welcome-option:last-child {
  border-right: 1px solid #d7dce3;
}

.welcome-option-grid .welcome-option:hover {
  border-color: var(--category-accent);
  border-top-color: var(--category-accent);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.welcome-option.category-general {
  --category-accent: #525a66;
  --category-ink: #303640;
  --category-surface: #e8eaed;
}

.welcome-option.category-it {
  --category-accent: #0f62fe;
  --category-ink: #0043ce;
  --category-surface: #d0e2ff;
}

.welcome-option.category-employee {
  --category-accent: #d12771;
  --category-ink: #9f1853;
  --category-surface: #ffd6e8;
}

.welcome-option.category-hr {
  --category-accent: #198038;
  --category-ink: #0e6027;
  --category-surface: #a7f0ba;
}

.welcome-option.category-sales {
  --category-accent: #007d79;
  --category-ink: #005d5d;
  --category-surface: #9ef0f0;
}

.welcome-option.category-government {
  --category-accent: #8a3ffc;
  --category-ink: #6929c4;
  --category-surface: #e8daff;
}

.welcome-option-icon {
  grid-column: 1;
  grid-row: 1;
  width: max-content;
  min-width: 0;
  height: 21px;
  padding: 0 7px;
  border-radius: 0;
  background: var(--category-surface);
  color: var(--category-ink) !important;
  font-size: 8px !important;
  letter-spacing: 0.08em;
}

.welcome-option-grid .welcome-option strong {
  grid-column: 1 / 3;
  grid-row: 2;
  color: #161616;
  font-size: 15px;
}

.welcome-option-grid .welcome-option .welcome-option-detail {
  grid-column: 1 / 3;
  grid-row: 3;
  padding-right: 24px;
  color: #525252;
}

.welcome-option-grid .welcome-option small {
  grid-column: 2;
  grid-row: 3;
  align-self: end;
  justify-self: end;
  color: var(--category-accent);
}

.grounding-state.route-employee {
  --route-accent: #9f1853;
  --route-surface: #ffd6e8;
}

.grounding-state.route-sales {
  --route-accent: #005d5d;
  --route-surface: #d9fbfb;
}

.chat-row.assistant.route-employee .bubble {
  border-left-color: #d12771;
}

.chat-row.assistant.route-sales .bubble {
  border-left-color: #007d79;
}

.history-search input:disabled {
  cursor: not-allowed;
  color: #8d8d8d;
  background: #f4f4f4;
}

html[data-theme="dark"] .account-menu,
html[data-theme="dark"] .account-menu button {
  border-color: #3f4b5e;
  background: #111827;
  color: #e5edf7;
}

html[data-theme="dark"] .account-menu-profile,
html[data-theme="dark"] .account-settings-button {
  border-color: #3f4b5e !important;
}

html[data-theme="dark"] .account-menu-profile strong,
html[data-theme="dark"] .account-menu button {
  color: #e5edf7;
}

html[data-theme="dark"] .account-menu-profile span,
html[data-theme="dark"] .account-menu-profile small,
html[data-theme="dark"] .account-settings-button small {
  color: #9aa8bb;
}

html[data-theme="dark"] .account-menu button:hover {
  background: #1f2937;
}

html[data-theme="dark"] .account-signout-confirm {
  background: #2b1518;
}

html[data-theme="dark"] .account-signout-confirm strong {
  color: #ffb3b8;
}

html[data-theme="dark"] .account-signout-confirm p {
  color: #efb8bc;
}

html[data-theme="dark"] .welcome-option-grid .welcome-option {
  border-color: #3f4b5e;
  border-top-color: var(--category-accent);
  background: #111827;
}

html[data-theme="dark"] .welcome-option-grid .welcome-option strong {
  color: #e5edf7;
}

html[data-theme="dark"] .welcome-option-grid .welcome-option .welcome-option-detail {
  color: #b8c4d6;
}

@media (max-width: 560px) {
  .chat-head-actions {
    gap: 7px;
  }

  .chat-head-actions .header-history-button {
    display: none;
  }

  .chat-head-actions .header-new-chat-button {
    min-width: 74px;
    padding: 0 9px;
  }

  .chat-head-actions .user-menu-button {
    min-width: 45px;
    gap: 3px;
  }

  .account-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .account-menu {
    position: fixed;
    top: 62px;
    right: 12px;
  }

  .welcome-option-grid .welcome-option {
    min-height: 116px;
  }
}

/* Reference UI: compact branded shell, pastel launch grid, and one-line composer. */
.workspace-main {
  background: #f6f6f4;
}

.main-chat-panel {
  width: min(1080px, 100%);
  margin: 0 auto;
  border: 0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(17, 24, 39, 0.1);
}

.main-chat-head {
  min-height: 76px;
  padding: 0 clamp(18px, 3vw, 30px);
  border-bottom: 4px solid #c9372c;
  border-radius: 24px 24px 0 0;
  background: #050505;
}

.twog-chat-mark {
  padding-top: 14px;
  font-size: clamp(16px, 2vw, 20px);
  letter-spacing: -0.055em;
}

.twog-chat-mark::before {
  width: 68px;
  height: 7px;
  background: #3874bd;
}

.chat-head-actions {
  gap: 12px;
}

.chat-head-actions .header-search-button,
.chat-head-actions .header-history-button,
.chat-head-actions .header-new-chat-button {
  min-height: 42px;
  border-radius: 14px;
  font-size: 13px;
}

.chat-head-actions .header-search-button {
  width: 42px;
  min-width: 42px;
  border-color: transparent;
}

.chat-head-actions .header-history-button {
  padding: 0 16px;
  border-color: #626262;
}

.chat-head-actions .header-history-button::before {
  content: "◔";
  margin-right: 7px;
  font-size: 16px;
}

.chat-head-actions .header-new-chat-button {
  padding: 0 18px;
  border-color: #d84134;
  background: #d84134;
}

.chat-head-actions .user-menu-button {
  min-width: 58px;
  height: 44px;
}

.account-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-color: rgba(255, 255, 255, 0.38);
  background: #3367a8;
  font-size: 13px;
}

.main-chat-panel .chatgpt-body {
  gap: 20px;
  padding: clamp(24px, 3vw, 34px) clamp(22px, 4vw, 42px) 20px;
  background: #ffffff;
}

.askhr-hero,
.chat-message-stack,
.main-chat-panel .composer-shell {
  width: 100%;
  max-width: none;
}

.askhr-hero {
  gap: 3px;
}

.askhr-meta {
  margin: 0;
  color: #8a8a86;
  font-size: clamp(14px, 1.7vw, 18px);
  font-weight: 650;
}

.askhr-hero h2 {
  margin: 0;
  color: #111111;
  font-size: clamp(25px, 3vw, 33px);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1.18;
}

.askhr-hero > p {
  display: none;
}

.chat-message-stack {
  margin-top: 0;
  gap: 18px;
}

.main-chat-panel .chat-row.type-welcome {
  display: block;
}

.chat-row.type-welcome > .avatar,
.chat-row.type-welcome .speaker-line {
  display: none;
}

.chat-row.type-welcome .chat-copy {
  width: 100%;
}

.welcome-message-card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.welcome-message-copy {
  display: none;
}

.welcome-option-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.welcome-option-grid .welcome-option {
  --category-accent: #858585;
  --category-ink: #222222;
  --category-surface: #f3f3f3;
  min-height: clamp(154px, 18vh, 178px);
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr auto;
  align-content: stretch;
  column-gap: 0;
  row-gap: 11px;
  padding: clamp(18px, 2.3vw, 24px);
  border: 1px solid color-mix(in srgb, var(--category-accent) 28%, #ffffff);
  border-top: 1px solid color-mix(in srgb, var(--category-accent) 28%, #ffffff);
  border-right: 1px solid color-mix(in srgb, var(--category-accent) 28%, #ffffff);
  border-radius: 0;
  background: var(--category-surface);
  color: var(--category-ink);
  box-shadow: none;
}

.welcome-option-grid .welcome-option:last-child {
  border-right: 1px solid color-mix(in srgb, var(--category-accent) 28%, #ffffff);
}

.welcome-option-grid .welcome-option:hover {
  border-color: var(--category-accent);
  border-top-color: var(--category-accent);
  background: var(--category-surface);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--category-accent) 14%, transparent);
  transform: translateY(-2px);
}

.welcome-option.category-general {
  --category-accent: #858585;
  --category-ink: #222222;
  --category-surface: #f4f4f4;
}

.welcome-option.category-it {
  --category-accent: #0f62fe;
  --category-ink: #1c1c1c;
  --category-surface: #edf4ff;
}

.welcome-option.category-employee {
  --category-accent: #d12771;
  --category-ink: #1c1c1c;
  --category-surface: #fff0f6;
}

.welcome-option.category-hr {
  --category-accent: #198038;
  --category-ink: #1c1c1c;
  --category-surface: #e9f9ee;
}

.welcome-option.category-sales {
  --category-accent: #007d79;
  --category-ink: #1c1c1c;
  --category-surface: #e5f8f8;
}

.welcome-option.category-government {
  --category-accent: #8a3ffc;
  --category-ink: #1c1c1c;
  --category-surface: #f5f0ff;
}

.welcome-option-icon {
  grid-column: 1;
  grid-row: 1;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border: 2px solid var(--category-accent);
  border-radius: 999px;
  background: transparent;
  color: var(--category-accent) !important;
  font-size: 11px !important;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.welcome-option-grid .welcome-option strong {
  grid-column: 1;
  grid-row: 2;
  color: var(--category-ink);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.22;
}

.welcome-option-grid .welcome-option .welcome-option-detail {
  grid-column: 1;
  grid-row: 3;
  padding: 0;
  color: #555555;
  font-size: clamp(12px, 1.35vw, 14px);
  line-height: 1.42;
}

.welcome-option-grid .welcome-option small {
  grid-column: 1;
  grid-row: 4;
  align-self: end;
  justify-self: start;
  color: var(--category-accent);
  font-size: 20px;
}

.main-chat-panel .chatgpt-composer {
  padding: 0 clamp(22px, 4vw, 42px) clamp(24px, 3vw, 34px);
  border: 0;
  background: #ffffff;
}

.main-chat-panel .composer-shell {
  overflow: hidden;
  border: 1px solid #dfdfdc;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: none;
}

.composer-entry-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
}

.main-chat-panel .chatgpt-composer textarea {
  min-height: 56px;
  max-height: 140px;
  padding: 17px 8px 10px;
  color: #2c2c2c;
  font-size: 15px;
  line-height: 1.45;
}

.composer-actions {
  gap: 7px;
}

.main-chat-panel .attach-button,
.main-chat-panel .voice-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #898985;
}

.main-chat-panel .attach-button {
  font-size: 21px;
  filter: grayscale(1);
}

.main-chat-panel .voice-button {
  position: relative;
  font-size: 0;
}

.main-chat-panel .voice-button::before {
  content: "";
  width: 8px;
  height: 15px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.main-chat-panel .voice-button::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 12px;
  width: 12px;
  height: 7px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 9px 9px;
}

.main-chat-panel .send-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  background: #c9372c;
  color: #ffffff;
  font-size: 24px;
  font-weight: 500;
}

.main-chat-panel .send-button:hover {
  background: #a92b23;
}

.main-chat-panel .send-button:disabled {
  background: #ead2cf;
  color: #ffffff;
}

.composer-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.attachment-tray,
.attachment-error {
  border-bottom: 1px solid #eeeeeb;
}

.handoff-confirmation {
  grid-template-columns: 28px minmax(0, 1fr);
  max-width: none;
  padding: 20px;
  border: 1px solid #f0a11e;
  border-left: 1px solid #f0a11e;
  border-radius: 14px;
  background: #fff5dd;
  box-shadow: none;
}

.handoff-warning-icon {
  width: 24px;
  height: 22px;
  padding-top: 6px;
  border-radius: 0;
  background: #f0a11e;
  color: #6b3d00;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  font-size: 10px;
}

.handoff-confirmation-copy > span {
  display: none;
}

.handoff-confirmation-copy > strong {
  color: #6b3d00;
}

.handoff-confirmation-copy p {
  color: #70420b;
}

.handoff-confirmation-actions {
  margin-top: 10px;
}

.handoff-confirmation-actions button {
  min-width: 180px;
  min-height: 46px;
  border-radius: 9px;
}

html[data-theme="dark"] .welcome-option-grid {
  background: transparent;
}

html[data-theme="dark"] .welcome-option-grid .welcome-option {
  border-color: color-mix(in srgb, var(--category-accent) 55%, #1e293b);
  border-top-color: color-mix(in srgb, var(--category-accent) 55%, #1e293b);
  background: color-mix(in srgb, var(--category-accent) 16%, #111827);
}

html[data-theme="dark"] .welcome-option-grid .welcome-option strong {
  color: #f4f7fb;
}

html[data-theme="dark"] .welcome-option-grid .welcome-option .welcome-option-detail {
  color: #c1cadd;
}

html[data-theme="dark"] .welcome-option-icon {
  background: transparent;
}

html[data-theme="dark"] .composer-entry-row {
  background: #0f172a;
}

.main-chat-panel.has-conversation .askhr-hero,
.main-chat-panel.has-conversation .chat-row.type-welcome {
  display: none;
}

.main-chat-panel.has-conversation .chatgpt-body {
  gap: 0;
  padding-top: 30px;
  background: #f8f7f4;
}

.main-chat-panel.has-conversation .chat-message-stack {
  gap: 22px;
}

.main-chat-panel.has-conversation .chat-row {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
}

.main-chat-panel.has-conversation .chat-row.user {
  grid-template-columns: minmax(0, 1fr) 38px;
}

.main-chat-panel.has-conversation .avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.main-chat-panel.has-conversation .speaker-line {
  min-height: 22px;
  align-items: center;
}

.main-chat-panel.has-conversation .speaker {
  color: #4c5665;
  font-size: 11px;
}

.main-chat-panel.has-conversation .message-meta {
  font-size: 10px;
}

.main-chat-panel.has-conversation .chatgpt-body .bubble {
  max-width: min(820px, 92%);
  padding: 16px 18px;
  border-radius: 14px;
  background: #ffffff;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.055);
}

.main-chat-panel.has-conversation .chat-row.assistant .bubble {
  border-left-width: 3px;
}

.main-chat-panel.has-conversation .chat-row.user .bubble {
  border-color: #d9e2ef;
  background: #f5f8fc;
  box-shadow: none;
}

.main-chat-panel.has-conversation .suggested-actions {
  gap: 7px;
  margin-top: 11px;
}

.main-chat-panel.has-conversation .suggested-actions button {
  min-height: 38px;
  padding: 8px 13px;
  border-color: #cbd2dc;
  border-radius: 999px;
  background: #ffffff;
  font-size: 11px;
}

.main-chat-panel.has-conversation .response-feedback {
  margin-top: 2px;
}

.main-chat-panel.has-conversation .escalation-status-card {
  padding: 18px 20px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(22, 101, 52, 0.06);
}

.main-chat-panel.has-conversation .chatgpt-composer {
  border-top: 1px solid #e7e5e0;
  background: #f8f7f4;
}

.main-chat-panel.has-conversation .composer-shell {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

html[data-theme="dark"] .main-chat-panel.has-conversation .chatgpt-body,
html[data-theme="dark"] .main-chat-panel.has-conversation .chatgpt-composer {
  background: #08111f;
}

html[data-theme="dark"] .main-chat-panel.has-conversation .speaker {
  color: #b8c4d6;
}

@media (max-width: 820px) {
  .welcome-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-option-grid .welcome-option {
    min-height: 160px;
  }
}

@media (max-width: 560px) {
  .workspace-main {
    padding: 0;
  }

  .main-chat-panel,
  .main-chat-head {
    border-radius: 0;
  }

  .main-chat-head {
    min-height: 64px;
    padding: 0 13px;
  }

  .twog-chat-mark {
    font-size: 14px;
  }

  .twog-chat-mark::before {
    width: 48px;
    height: 5px;
  }

  .chat-head-actions .header-search-button {
    width: 36px;
    min-width: 36px;
  }

  .chat-head-actions .header-new-chat-button {
    min-width: auto;
    padding: 0 10px;
  }

  .main-chat-panel .chatgpt-body {
    padding: 22px 14px 18px;
  }

  .welcome-option-grid {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 0;
  }

  .welcome-option-grid .welcome-option {
    min-height: 150px;
    row-gap: 12px;
    padding: 20px;
  }

  .welcome-option-icon {
    width: 42px;
    min-width: 42px;
    height: 42px;
  }

  .main-chat-panel .chatgpt-composer {
    padding: 0 12px 14px;
  }

  .composer-entry-row {
    min-height: 62px;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding: 0 7px;
  }

  .main-chat-panel .chatgpt-composer textarea {
    min-height: 54px;
    padding: 17px 6px 10px;
    font-size: 14px;
  }

  .main-chat-panel .attach-button,
  .main-chat-panel .voice-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .main-chat-panel .send-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }
}

/* Market-ready responsive shell: fixed viewport math, scroll-safe content, and compact mobile cards. */
.workspace-main {
  height: 100dvh;
  min-height: 100dvh;
  padding: clamp(10px, 1.5vw, 18px);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(56, 116, 189, 0.08), transparent 30%),
    radial-gradient(circle at 92% 100%, rgba(201, 55, 44, 0.07), transparent 28%),
    #f4f5f7;
}

.builder-shell {
  width: 100%;
  max-width: 1180px;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
}

.main-chat-panel {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 22px;
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.05);
}

.main-chat-head {
  min-height: 72px;
  border-bottom-width: 4px;
  border-radius: 22px 22px 0 0;
}

.main-chat-panel .chatgpt-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-padding-block: 20px;
}

.main-chat-panel .chatgpt-composer,
.main-chat-panel.has-conversation .chatgpt-composer {
  position: relative;
  inset: auto;
  z-index: 4;
  flex: 0 0 auto;
}

.main-chat-panel .composer-shell {
  border-color: #d7dbe1;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.main-chat-panel .composer-shell:focus-within {
  border-color: #3874bd;
  box-shadow:
    0 0 0 3px rgba(56, 116, 189, 0.14),
    0 12px 30px rgba(15, 23, 42, 0.1);
}

.welcome-option-grid {
  gap: 14px;
}

.welcome-option-grid .welcome-option {
  min-height: clamp(144px, 17vh, 176px);
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.welcome-option-grid .welcome-option:last-child {
  border-right: 1px solid color-mix(in srgb, var(--category-accent) 28%, #ffffff);
}

.welcome-option-grid .welcome-option:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--category-accent) 42%, transparent);
  outline-offset: 2px;
}

@media (max-width: 920px) {
  .main-chat-panel {
    border-radius: 18px;
  }

  .main-chat-head {
    min-height: 68px;
    border-radius: 18px 18px 0 0;
  }

  .main-chat-panel .chatgpt-body {
    gap: 16px;
    padding: 22px 22px 16px;
  }

  .welcome-option-grid .welcome-option {
    min-height: 132px;
    row-gap: 8px;
    padding: 17px;
  }

  .welcome-option-icon {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .main-chat-panel .chatgpt-composer {
    padding: 0 22px 20px;
  }
}

@media (max-width: 680px) {
  .workspace-main {
    padding: 8px;
  }

  .main-chat-panel,
  .main-chat-head {
    border-radius: 14px;
  }

  .main-chat-head {
    min-height: 64px;
    padding: 0 14px;
  }

  .twog-chat-mark {
    font-size: 15px;
  }

  .twog-chat-mark::before {
    width: 52px;
    height: 5px;
  }

  .chat-head-actions {
    gap: 6px;
  }

  .chat-head-actions .header-history-button {
    display: none;
  }

  .chat-head-actions .header-search-button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .chat-head-actions .header-new-chat-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }

  .chat-head-actions .user-menu-button {
    min-width: 44px;
    height: 40px;
    gap: 3px;
  }

  .account-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .main-chat-panel .chatgpt-body {
    padding: 19px 14px 14px;
  }

  .askhr-meta {
    font-size: 13px;
  }

  .askhr-hero h2 {
    font-size: clamp(23px, 6.7vw, 29px);
  }

  .welcome-option-grid {
    gap: 10px;
  }

  .welcome-option-grid .welcome-option {
    min-height: 122px;
    padding: 15px;
  }

  .main-chat-panel .chatgpt-composer,
  .main-chat-panel.has-conversation .chatgpt-composer {
    padding: 0 14px max(14px, env(safe-area-inset-bottom));
  }

  .composer-entry-row {
    min-height: 58px;
  }

  .main-chat-panel .chatgpt-composer textarea {
    min-height: 52px;
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .workspace-main {
    padding: 0;
  }

  .main-chat-panel,
  .main-chat-head {
    border-radius: 0;
  }

  .main-chat-panel {
    border-right: 0;
    border-left: 0;
  }

  .main-chat-head {
    min-height: 62px;
    padding: 0 12px;
  }

  .chat-head-actions .header-new-chat-button {
    padding: 0 10px;
  }

  .account-menu-chevron {
    display: none;
  }

  .welcome-option-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .welcome-option-grid .welcome-option {
    min-height: 104px;
    grid-template-columns: 40px minmax(0, 1fr) 20px;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 13px;
    row-gap: 3px;
    padding: 14px;
    border-radius: 15px;
  }

  .welcome-option-icon {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 40px;
    min-width: 40px;
    height: 40px;
  }

  .welcome-option-grid .welcome-option strong {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    font-size: 16px;
  }

  .welcome-option-grid .welcome-option .welcome-option-detail {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    font-size: 12px;
    line-height: 1.35;
  }

  .welcome-option-grid .welcome-option small {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: end;
  }

  .main-chat-panel.has-conversation .chatgpt-body {
    padding: 18px 12px 12px;
  }

  .main-chat-panel.has-conversation .chat-row,
  .main-chat-panel.has-conversation .chat-row.user {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
  }

  .main-chat-panel.has-conversation .chat-row.user .avatar {
    grid-column: 1;
  }

  .main-chat-panel.has-conversation .chat-row.user .chat-copy {
    grid-column: 2;
  }

  .main-chat-panel.has-conversation .avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .main-chat-panel.has-conversation .chatgpt-body .bubble {
    max-width: 100%;
    padding: 13px 14px;
    font-size: 14px;
  }

  .composer-entry-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding: 0 6px;
  }

  .main-chat-panel .attach-button,
  .main-chat-panel .voice-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .main-chat-panel .send-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }
}

@media (max-width: 380px) {
  .chat-head-actions .header-search-button {
    display: none;
  }

  .chat-head-actions .header-new-chat-button {
    font-size: 11px;
  }

  .main-chat-panel .chatgpt-body {
    padding-inline: 11px;
  }

  .main-chat-panel .chatgpt-composer,
  .main-chat-panel.has-conversation .chatgpt-composer {
    padding-inline: 10px;
  }
}
