/* Atlas CIS — approved palette from Corporate Identity Guidelines, June 2024.
   Interface tints below derive from the approved palette; semantic colours preserve status meaning. */
@font-face {
  font-family: "Atlas Poppins";
  src: url("/assets/poppins-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atlas Poppins";
  src: url("/assets/poppins-medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atlas Poppins";
  src: url("/assets/poppins-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atlas Noto Sans TC";
  src: url("/assets/noto-sans-tc-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atlas Noto Sans TC";
  src: url("/assets/noto-sans-tc-medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atlas Noto Sans TC";
  src: url("/assets/noto-sans-tc-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-navy: #031440;
  --brand-purple: #5343FE;
  --brand-cyan: #18B6FF;
  --brand-light-cyan: #9BE0F7;
  --brand-pale-blue: #D7E2F4;
  --brand-green: #007957;
  --brand-lime: #10D55E;
  --brand-orange: #FD7344;
  --brand-red: #FF3150;
  --brand-lavender: #B8B8FE;
  --brand-deep-purple: #1E00B9;
  --surface: #FFFFFF;
  --text: var(--brand-navy);
  --muted: color-mix(in srgb, var(--brand-navy) 70%, white);
  --disabled: color-mix(in srgb, var(--brand-navy) 35%, white);
  --surface-page: color-mix(in srgb, var(--brand-pale-blue) 24%, white);
  --surface-soft: color-mix(in srgb, var(--brand-pale-blue) 32%, white);
  --border: color-mix(in srgb, var(--brand-pale-blue) 70%, white);
  --border-strong: color-mix(in srgb, var(--brand-navy) 24%, white);
  --primary-soft: color-mix(in srgb, var(--brand-purple) 8%, white);
  --cyan-soft: color-mix(in srgb, var(--brand-light-cyan) 22%, white);
  --success-soft: color-mix(in srgb, var(--brand-green) 7%, white);
  --success-border: color-mix(in srgb, var(--brand-green) 24%, white);
  --warning-soft: color-mix(in srgb, var(--brand-orange) 9%, white);
  --warning-border: color-mix(in srgb, var(--brand-orange) 28%, white);
  --warning-text: color-mix(in srgb, var(--brand-orange) 42%, var(--brand-navy));
  --danger-soft: color-mix(in srgb, var(--brand-red) 7%, white);
  --danger-border: color-mix(in srgb, var(--brand-red) 27%, white);
  --danger-text: color-mix(in srgb, var(--brand-red) 65%, var(--brand-navy));
  --sidebar-text: var(--brand-pale-blue);
  --sidebar-muted: color-mix(in srgb, var(--brand-pale-blue) 80%, var(--brand-navy));
  --sidebar-surface: color-mix(in srgb, var(--brand-navy) 88%, var(--brand-pale-blue));
  --sidebar-border: color-mix(in srgb, var(--brand-navy) 74%, var(--brand-pale-blue));
  --overlay: color-mix(in srgb, var(--brand-navy) 40%, transparent);
  --shadow-color: color-mix(in srgb, var(--brand-navy) 12%, transparent);
  --radius: 12px;
  --shadow: 0 3px 14px color-mix(in srgb, var(--brand-navy) 3%, transparent);
  --chart-1: var(--brand-navy);
  --chart-2: var(--brand-purple);
  --chart-3: var(--brand-cyan);
  --chart-4: var(--brand-light-cyan);
  --chart-5: var(--brand-deep-purple);
  --chart-6: var(--brand-lavender);
  --chart-7: color-mix(in srgb, var(--brand-navy) 70%, var(--brand-cyan));
  --chart-8: var(--brand-pale-blue);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text);
  font-family: "Atlas Poppins","Atlas Noto Sans TC","PingFang TC",sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
button,input,select,textarea {
  font: inherit;
}
button,a,input,select,textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
button,a {
  touch-action: manipulation;
}
a {
  color: var(--brand-purple);
  text-decoration: none;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline: 3px solid var(--brand-cyan);
  outline-offset: 3px;
}
svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hidden {
  display: none!important;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  background: var(--surface);
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 16px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 234px;
  background: var(--brand-navy);
  color: var(--sidebar-text);
  padding: 31px 20px 18px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  margin: -10px 0 20px;
  min-height: 75px;
  flex-shrink: 0;
}
.workspace-switch {
  position: relative;
  margin-bottom: 34px;
}
.workspace {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--sidebar-border);
  border-radius: 9px;
  padding: 12px 10px;
  width: 100%;
  background: transparent;
  text-align: left;
  font-size: 12px;
  color: var(--surface);
  font-weight: 600;
}
.workspace:hover,.workspace[aria-expanded="true"] {
  background: var(--sidebar-surface);
  border-color: var(--brand-light-cyan);
}
.workspace:focus-visible {
  outline: 2px solid var(--brand-light-cyan);
  outline-offset: 3px;
}
.workspace-copy { min-width: 0; }
.workspace-copy strong { white-space: nowrap; }
.workspace-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 35;
  padding: 8px;
  border: 1px solid var(--sidebar-border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 30px #06143e33;
}
.workspace-menu-label {
  color: var(--muted);
  padding: 7px 8px 10px;
  font-size: 10px;
  letter-spacing: 1px;
}
.workspace-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.workspace-menu button:hover,.workspace-menu button:focus-visible,.workspace-menu button[aria-pressed="true"] {
  background: var(--primary-soft);
  color: var(--brand-purple);
}
.workspace-option-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 34px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--brand-purple);
}
.workspace-menu strong { display: block; font-size: 12px; }
.workspace-menu small { display: block; font-size: 10px; margin-top: 2px; }
.workspace-check { margin-left: auto; visibility: hidden; }
.workspace-menu [aria-pressed="true"] .workspace-check { visibility: visible; }
.workspace-icon {
  width: 31px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--sidebar-surface);
  color: var(--brand-light-cyan);
}
.workspace small {
  display: block;
  color: var(--sidebar-muted);
  font-size: 10px;
  font-weight: 400;
  margin-top: 2px;
}
.workspace-chevron {
  margin-left: auto;
  color: var(--sidebar-muted);
}
.nav-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--sidebar-muted);
  letter-spacing: 1.6px;
  padding: 0 13px 13px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  background: none;
  color: var(--sidebar-text);
  padding: 13px;
  margin-bottom: 7px;
  font-size: 13px;
  text-align: left;
  transition: background .18s,color .18s;
}
.nav-item svg {
  width: 18px;
  height: 18px;
}
.nav-item:hover {
  background: var(--sidebar-surface);
  color: var(--surface);
}
.nav-item.active {
  background: var(--brand-purple);
  color: var(--surface);
  box-shadow: none;
}
.nav-dot {
  width: 5px;
  height: 5px;
  background: var(--surface);
  border-radius: 50%;
  margin-left: auto;
}
.nav-item:not(.active) .nav-dot {
  display: none;
}
.nav-count {
  font-size: 10px;
  background: var(--sidebar-surface);
  color: var(--surface);
  border-radius: 5px;
  padding: 0 6px;
  margin-left: auto;
}
.sidebar-note {
  margin-top: auto;
  padding: 16px 13px 17px;
  background: var(--sidebar-surface);
  border: 1px solid var(--sidebar-border);
  border-radius: 9px;
}
.sidebar-note>span {
  display: inline-block;
  color: var(--brand-light-cyan);
  vertical-align: middle;
  margin-right: 6px;
}
.sidebar-note svg {
  width: 16px;
  height: 16px;
}
.sidebar-note strong {
  font-size: 11px;
  color: var(--surface);
}
.sidebar-note p {
  font-size: 10px;
  line-height: 1.9;
  margin: 8px 0 0;
  color: var(--sidebar-muted);
}
.sidebar-footer {
  margin-top: 22px;
  padding: 18px 4px 2px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: var(--sidebar-text);
}
.avatar,.top-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 33px;
  height: 33px;
  font-size: 10px;
  letter-spacing: 1px;
  background: var(--brand-pale-blue);
  color: var(--brand-navy);
  font-weight: 700;
}
.sidebar-footer small {
  display: block;
  font-size: 9px;
  color: var(--sidebar-muted);
  margin-top: 2px;
}
.status-light {
  width: 6px;
  height: 6px;
  background: var(--brand-lime);
  border-radius: 50%;
  margin-left: auto;
}
.main {
  margin-left: 234px;
  min-height: 100vh;
}
.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 13px;
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--text);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.local-chip {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}
.local-chip i {
  width: 5px;
  height: 5px;
  background: var(--brand-green);
  border-radius: 100%;
}
.top-avatar {
  background: var(--brand-pale-blue);
  color: var(--brand-navy);
}
.page-body {
  max-width: 1540px;
  margin: auto;
  padding: 33px 38px 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2.1px;
  color: var(--brand-deep-purple);
  font-weight: 650;
  margin-bottom: 6px;
}
.page-heading h1 {
  font-size: 27px;
  letter-spacing: .1px;
  margin: 0;
  font-weight: 700;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}
.heading-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 15px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.5;
  transition: background .15s,box-shadow .15s;
}
.button svg {
  width: 15px;
  height: 15px;
}
.button-primary {
  background: var(--brand-purple);
  color: var(--surface);
  box-shadow: none;
}
.button-primary:hover {
  background: var(--brand-deep-purple);
}
.button-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.button-secondary:hover {
  background: var(--primary-soft);
  border-color: var(--brand-purple);
}
.button-danger {
  color: var(--danger-text);
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
}
.button.small {
  font-size: 11px;
  padding: 8px 11px;
}
.sync-strip {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-size: 10px;
  color: var(--muted);
}
.sync-strip>div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-green);
  display: block;
  box-shadow: 0 0 0 3px var(--success-soft);
  flex-shrink: 0;
}
.pulse-dot.error {
  background: var(--brand-red);
}
.sync-divider {
  height: 11px;
  width: 1px;
  background: var(--surface-soft);
  margin: 0 4px;
}
.auto-refresh {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}
.auto-refresh input {
  position: absolute;
  opacity: 0;
  width: 30px;
  height: 20px;
}
.switch {
  display: block;
  position: relative;
  width: 25px;
  height: 14px;
  border-radius: 12px;
  background: var(--border-strong);
  transition: background .2s;
}
.switch:after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 2px;
  top: 2px;
  background: var(--surface);
  border-radius: 50%;
  transition: transform .2s;
}
.auto-refresh input:checked+.switch {
  background: var(--brand-purple);
}
.auto-refresh input:checked+.switch:after {
  transform: translateX(11px);
}
.auto-refresh input:focus-visible+.switch {
  outline: 2px solid var(--brand-purple);
  outline-offset: 3px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 17px;
  margin-bottom: 21px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 21px 17px;
  box-shadow: var(--shadow);
}
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.metric-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--brand-purple);
}
.metric-icon svg {
  width: 17px;
  height: 17px;
}
.metric-card.teal .metric-icon {
  background: var(--cyan-soft);
  color: var(--brand-navy);
}
.metric-card.amber .metric-icon {
  background: var(--warning-soft);
  color: var(--warning-text);
}
.metric-value {
  font-size: 31px;
  font-weight: 650;
  letter-spacing: -.6px;
  line-height: 1.2;
  margin: 9px 0 15px;
  color: var(--text);
}
.metric-value>span {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 7px;
}
.metric-value.pending {
  font-size: 25px;
  line-height: 37px;
  color: var(--text);
  letter-spacing: 0;
}
.metric-foot {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 11px;
}
.metric-foot .dot {
  width: 4px;
  height: 4px;
  background: var(--brand-purple);
  border-radius: 50%;
}
.metric-card.teal .dot {
  background: var(--brand-cyan);
}
.metric-card.amber .dot {
  background: var(--brand-orange);
}
.metric-foot b {
  font-weight: 500;
  color: var(--text);
}
.metric-card.primary {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: var(--surface);
}
.metric-card.primary .metric-top,
.metric-card.primary .metric-value,
.metric-card.primary .metric-foot b {
  color: var(--surface);
}
.metric-card.primary .metric-value>span,
.metric-card.primary .metric-foot {
  color: var(--brand-pale-blue);
}
.metric-card.primary .metric-icon {
  background: var(--sidebar-surface);
  color: var(--brand-light-cyan);
}
.metric-card.primary .metric-foot {
  border-color: var(--sidebar-border);
}
.metric-card.primary .metric-foot .dot {
  background: var(--brand-cyan);
  flex-shrink: 0;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 21px 23px 15px;
}
.panel-heading h2,.inventory-heading h2 {
  font-size: 14px;
  font-weight: 650;
  margin: 0;
  letter-spacing: .1px;
}
.panel-heading p,.inventory-heading p {
  font-size: 10px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.7;
}
.segmented {
  display: flex;
  flex-shrink: 0;
  gap: 1px;
  background: var(--surface-soft);
  padding: 3px;
  border-radius: 6px;
}
.segmented button {
  white-space: nowrap;
  font-size: 10px;
  padding: 4px 12px;
  color: var(--muted);
  background: transparent;
  border-radius: 4px;
}
.segmented button.active {
  background: var(--surface);
  color: var(--brand-deep-purple);
  box-shadow: var(--shadow);
}
.overview-grid {
  display: grid;
  grid-template-columns: 1.34fr 1fr;
  gap: 21px;
  margin-bottom: 21px;
}
.distribution-chart {
  padding: 10px 24px 8px;
  min-height: 232px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(75px,1fr) 3.6fr 43px;
  gap: 15px;
  align-items: center;
  margin: 0 0 18px;
}
.bar-label {
  font-size: 11px;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bar-track {
  height: 8px;
  background: var(--surface-soft);
  border-radius: 10px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 10px;
  background: var(--brand-navy);
  min-width: 0;
  transition: width .3s;
}
.bar-count {
  font-size: 11px;
  color: var(--text);
  font-weight: 600;
  text-align: right;
}
.bar-count small {
  font-size: 8px;
  color: var(--muted);
  font-weight: 400;
  display: block;
}
.panel-foot {
  padding: 10px 23px 14px;
  color: var(--muted);
  font-size: 9px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.small-icon {
  color: var(--brand-navy);
  background: var(--cyan-soft);
  border-radius: 8px;
  padding: 7px;
}
.small-icon svg {
  height: 17px;
  width: 17px;
}
.quality-overview {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 2px 24px 15px;
}
.quality-ring {
  width: 91px;
  height: 91px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: conic-gradient(var(--brand-purple) calc(var(--value)*1%), var(--brand-pale-blue) 0);
  position: relative;
}
.quality-ring:before {
  content: "";
  width: 73px;
  height: 73px;
  border-radius: 50%;
  background: var(--surface);
  position: absolute;
}
.quality-ring>div {
  z-index: 1;
  text-align: center;
}
.quality-ring strong {
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
}
.quality-ring small {
  display: block;
  font-size: 8px;
  color: var(--muted);
  margin-top: -1px;
}
.quality-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.quality-copy {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 5px;
  max-width: 210px;
}
.quality-progress {
  padding: 0 24px;
}
.quality-progress-row {
  margin-bottom: 12px;
}
.quality-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}
.quality-progress-label span:last-child {
  font-size: 9px;
  color: var(--muted);
}
.quality-progress .bar-track {
  height: 4px;
}
.quality-progress .bar-fill {
  background: var(--brand-cyan);
}
.quality-note {
  margin: 15px 23px 16px;
  padding: 9px 11px;
  border-radius: 6px;
  background: var(--warning-soft);
  color: var(--warning-text);
  font-size: 9px;
  line-height: 1.8;
  display: flex;
  gap: 7px;
  align-items: flex-start;
}
.quality-note svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}
.overview-bottom {
  display: grid;
  grid-template-columns: 1.34fr 1fr;
  gap: 21px;
  margin-bottom: 21px;
}
.text-button {
  background: transparent;
  color: var(--brand-deep-purple);
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  white-space: nowrap;
}
.text-button:hover {
  color: var(--brand-deep-purple);
}
.pipeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 23px;
  border-top: 1px solid var(--border);
  min-height: 72px;
}
.pipeline-row-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--cyan-soft);
  color: var(--brand-navy);
  flex-shrink: 0;
}
.pipeline-row-icon svg {
  width: 17px;
  height: 17px;
}
.pipeline-row-copy {
  flex: 1;
  min-width: 0;
}
.pipeline-row h3 {
  font-size: 11px;
  font-weight: 550;
  margin: 0;
  color: var(--text);
}
.pipeline-row p {
  margin: 3px 0 0;
  font-size: 9px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
  background: var(--surface-soft);
  color: var(--muted);
}
.badge.purple {
  background: var(--primary-soft);
  color: var(--brand-deep-purple);
}
.badge.teal {
  background: var(--success-soft);
  color: var(--brand-green);
}
.badge.amber {
  background: var(--warning-soft);
  color: var(--warning-text);
}
.badge.red {
  background: var(--danger-soft);
  color: var(--danger-text);
}
.badge.gray {
  background: var(--surface-soft);
  color: var(--muted);
}
.badge i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}
.count-chip {
  font-size: 9px;
  color: var(--brand-navy);
  background: var(--brand-pale-blue);
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 500;
}
.alert-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 23px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.alert-row:first-child {
  border-top: none;
  padding-top: 2px;
}
.alert-symbol {
  flex-shrink: 0;
  color: var(--warning-text);
  background: var(--warning-soft);
  border-radius: 6px;
  padding: 5px;
  margin-top: 1px;
}
.alert-symbol svg {
  width: 14px;
  height: 14px;
}
.alert-symbol.error {
  background: var(--danger-soft);
  color: var(--danger-text);
}
.alert-symbol.info {
  background: var(--cyan-soft);
  color: var(--brand-navy);
}
.alert-row h3 {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 3px;
}
.alert-row p {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}
.recent-panel {
  margin-bottom: 20px;
}
.table-scroll {
  position: relative;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  table-layout: fixed;
}
th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  padding: 11px 22px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 15px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  color: var(--muted);
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr.clickable {
  cursor: pointer;
}
tbody tr.clickable:hover {
  background: var(--surface-soft);
}
tbody tr.clickable:focus-visible {
  outline: 2px solid var(--brand-purple);
  outline-offset: -3px;
}
.question-cell {
  overflow: hidden;
}
.question-stem {
  font-size: 11px;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.question-id {
  font-size: 8px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.question-type {
  font-size: 10px;
  color: var(--text);
}
.level-badge {
  font-size: 9px;
  background: var(--brand-pale-blue);
  color: var(--brand-navy);
  border-radius: 4px;
  padding: 3px 6px;
}
.completeness {
  display: flex;
  gap: 7px;
  color: var(--disabled);
}
.completeness>span.complete {
  color: var(--brand-green);
}
.completeness svg {
  width: 13px;
  height: 13px;
}
.table-action {
  background: transparent;
  color: var(--brand-deep-purple);
  font-size: 16px;
  padding: 3px 6px;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  padding: 21px 0 23px;
  font-size: 8px;
  color: var(--muted);
  letter-spacing: .4px;
}
.footer-dot {
  margin: 0 7px;
}
.management-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 15px;
  background: var(--cyan-soft);
  border: 1px solid var(--brand-pale-blue);
  border-radius: 8px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.8;
  margin-bottom: 20px;
}
.management-note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.inventory-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 23px;
}
.inventory-heading h2 .count-chip {
  vertical-align: middle;
  margin-left: 5px;
}
.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 23px 22px;
  flex-wrap: wrap;
}
.search-field {
  position: relative;
  flex: 1;
  min-width: 210px;
}
.search-field>span {
  position: absolute;
  left: 11px;
  top: 11px;
  color: var(--muted);
}
.search-field svg {
  height: 15px;
  width: 15px;
}
.search-field input {
  width: 100%;
  padding-left: 34px!important;
}
.filters input:not([type=checkbox]),.filters select {
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--text);
  background: var(--surface);
  min-height: 37px;
}
.filters input::placeholder {
  color: var(--muted);
}
.filters select {
  max-width: 180px;
}
.archived-toggle {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
}
.archived-toggle input {
  accent-color: var(--brand-purple);
}
.active-filters {
  padding: 0 23px 15px;
  color: var(--muted);
  font-size: 10px;
}
.active-filters button {
  font-size: 10px;
  color: var(--brand-purple);
  background: none;
  padding: 0 0 0 9px;
}
.pagination {
  padding: 16px 23px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}
.pagination>div {
  display: flex;
  align-items: center;
  gap: 16px;
}
.icon-button {
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 6px;
  color: var(--brand-navy);
  font-size: 19px;
}
.icon-button:hover {
  background: var(--primary-soft);
}
.icon-button svg {
  width: 17px;
  height: 17px;
}
.empty-state {
  text-align: center;
  padding: 40px 25px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}
.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 6px;
}
.pipeline-cards,.source-cards {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.pipeline-card,.source-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.card-heading h2 {
  font-size: 14px;
  margin: 0;
  color: var(--text);
}
.pipeline-card p,.source-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  margin: 16px 0;
}
.card-meta {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 13px;
}
.external-link {
  font-size: 10px;
  color: var(--brand-deep-purple);
}
.external-link:hover {
  text-decoration: underline;
}
.source-summary {
  margin-bottom: 20px;
}
.source-summary-body {
  padding: 5px 23px 23px;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 20px;
}
.summary-field>span {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-bottom: 5px;
}
.summary-field strong {
  font-size: 11px;
  color: var(--text);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.source-detail {
  grid-column: 1/-1;
  padding: 12px 14px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}
.activity-item {
  padding: 14px 23px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
}
.activity-item time {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 125px;
}
.error-banner {
  border: 1px solid var(--danger-border);
  background: var(--danger-soft);
  color: var(--danger-text);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 18px;
  line-height: 1.7;
}
.error-banner button {
  background: transparent;
  color: var(--danger-text);
  text-decoration: underline;
  margin-left: 10px;
  font-size: 12px;
}
.loading-state {
  padding: 90px 20px 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.loading-state strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  margin-top: 9px;
}
.spinner {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 3px solid var(--brand-pale-blue);
  border-top-color: var(--brand-purple);
  animation: spin .7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.is-spinning svg {
  animation: spin 1s linear infinite;
}
.overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 40;
  backdrop-filter: blur(2px);
}
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(610px,100%);
  background: var(--surface);
  z-index: 50;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 60px var(--shadow-color);
}
.drawer-header {
  padding: 25px 28px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-header h2 {
  margin: 0;
  font-size: 21px;
  color: var(--text);
}
.drawer-meta {
  padding: 0 28px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.drawer-tabs {
  padding: 0 28px;
  display: flex;
  gap: 27px;
  border-bottom: 1px solid var(--border);
}
.drawer-tabs button {
  background: none;
  font-size: 12px;
  color: var(--muted);
  padding: 12px 1px;
  border-bottom: 2px solid transparent;
}
.drawer-tabs button.active {
  color: var(--brand-purple);
  border-bottom-color: var(--brand-purple);
  font-weight: 600;
}
.drawer-content {
  padding: 25px 28px;
  overflow: auto;
  flex: 1;
}
.detail-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .5px;
  margin-bottom: 9px;
}
.detail-stem {
  font-size: 14px;
  color: var(--text);
  line-height: 1.95;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 23px;
}
.option-row {
  display: flex;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 7px;
  margin-bottom: 9px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.option-row strong {
  width: 22px;
  flex-shrink: 0;
  color: var(--text);
}
.answer-box {
  padding: 13px 15px;
  border: 1px solid var(--success-border);
  background: var(--success-soft);
  border-radius: 7px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--brand-green);
  white-space: pre-wrap;
}
.answer-box strong {
  font-size: 10px;
  display: block;
  margin-bottom: 4px;
  color: var(--brand-green);
}
.prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 2;
  color: var(--text);
}
.explanation-generation {
  padding: 16px;
  margin: 0 0 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}
.explanation-generation-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.explanation-generation-top strong {
  font-size: 13px;
  color: var(--brand-navy);
}
.explanation-generation-top p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin: 5px 0 0;
}
.explanation-generation-top button {
  flex-shrink: 0;
  white-space: nowrap;
}
.explanation-generation-status {
  font-size: 11px;
  line-height: 1.8;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.explanation-generation-status.attention {
  color: var(--warning-text);
}
.explanation-document-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
@media(max-width:520px) {
  .explanation-generation-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}
.sticking-point {
  padding: 16px;
  border: 1px solid var(--warning-border);
  background: var(--warning-soft);
  border-radius: 9px;
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sticking-point>span {
  font-size: 10px;
  color: var(--warning-text);
  white-space: nowrap;
}
.source-field {
  margin-bottom: 20px;
}
.source-field strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 7px;
}
.source-field>div,.source-field>a {
  font-size: 12px;
  line-height: 1.85;
  color: var(--text);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.detail-transcript {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding-top: 20px;
}
.detail-transcript summary {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.detail-transcript p {
  font-size: 12px;
  color: var(--text);
  line-height: 1.9;
  white-space: pre-wrap;
}
.drawer-actions {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-soft);
}
.drawer-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 18px;
  padding: 11px 13px;
  background: var(--cyan-soft);
  border-radius: 7px;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 0;
  width: min(640px,calc(100vw - 32px));
  max-height: calc(100vh - 50px);
  box-shadow: 0 25px 90px var(--shadow-color);
  color: var(--text);
}
dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(2px);
}
#question-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 55px);
}
.form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 25px 18px;
  border-bottom: 1px solid var(--border);
}
.form-heading h2 {
  font-size: 20px;
  margin: 0;
  color: var(--text);
}
.form-body {
  padding: 0 25px 20px;
  overflow: auto;
}
.form-notice {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-soft);
  padding: 10px 12px;
  border-radius: 6px;
  margin: 17px 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 15px;
}
.form-body label {
  display: block;
  font-size: 11px;
  color: var(--text);
  margin-bottom: 15px;
}
.form-body label>span {
  color: var(--danger-text);
}
.form-body label>small {
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 6px;
}
.form-body input,.form-body textarea,.form-body select {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--text);
  background: var(--surface);
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.8;
}
.form-body input::placeholder,.form-body textarea::placeholder {
  color: var(--muted);
}
.form-body textarea {
  resize: vertical;
  min-height: 60px;
}
.form-review-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}
.form-footer {
  padding: 16px 25px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--surface-soft);
}
.toast {
  position: fixed;
  bottom: 26px;
  left: calc(50% + 117px);
  transform: translateX(-50%);
  padding: 13px 22px;
  background: var(--brand-navy);
  color: var(--surface);
  border-radius: 9px;
  box-shadow: 0 7px 30px var(--shadow-color);
  z-index: 100;
  font-size: 12px;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.brand-logo-full {
  display: block;
  width: 145px;
  height: auto;
  flex-shrink: 0;
}
.brand-logo-mark {
  display: none;
  width: 28px;
  height: auto;
}
.atlas-avatar-mark {
  display: block;
  width: 15px;
  height: auto;
}
.brand-footer-logo {
  display: block;
  width: 82px;
  height: auto;
  margin: 8px 0;
  flex-shrink: 0;
}
.page-footer>span {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo-full,.brand-logo-mark,.brand-footer-logo,.atlas-avatar-mark {
  object-fit: contain;
}
@media(min-width:1600px) {
  .page-body {
    padding-top: 40px;
  }
  .metric-card {
    padding: 24px;
  }
  .metric-value {
    font-size: 35px;
  }
  .distribution-chart {
    min-height: 250px;
  }
  .bar-row {
    margin-bottom: 21px;
  }
}
@media(max-width:1200px) {
  .sidebar {
    width: 207px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .main {
    margin-left: 207px;
  }
  .page-body {
    padding: 26px 26px 0;
  }
  .topbar {
    padding: 0 26px;
  }
  .metric-grid {
    gap: 12px;
  }
  .metric-card {
    padding: 17px;
  }
  .metric-value {
    font-size: 27px;
  }
  .metric-foot {
    font-size: 9px;
  }
  .overview-grid,.overview-bottom {
    grid-template-columns: 1.13fr 1fr;
    gap: 16px;
  }
  .panel-heading {
    padding: 19px 19px 15px;
  }
  .quality-overview {
    gap: 15px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .quality-ring {
    width: 80px;
    height: 80px;
  }
  .quality-ring:before {
    width: 64px;
    height: 64px;
  }
  .quality-ring strong {
    font-size: 19px;
  }
  th,td {
    padding-left: 18px;
    padding-right: 18px;
  }
  .toast {
    left: calc(50% + 104px);
  }
}
@media(max-width:1000px) {
  .sidebar {
    width: 207px;
    padding: 24px 15px 15px;
  }
  .workspace {
    font-size: 10px;
    padding: 10px 8px;
    gap: 8px;
  }
  .workspace small {
    font-size: 8px;
  }
  .workspace-icon {
    width: 27px;
    height: 29px;
  }
  .nav-item {
    font-size: 12px;
    padding: 12px 10px;
    gap: 9px;
  }
  .main {
    margin-left: 207px;
  }
  .page-body {
    padding: 24px 22px 0;
  }
  .topbar {
    padding: 0 22px;
    height: 62px;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .heading-actions {
    gap: 7px;
  }
  .button {
    padding: 9px 12px;
    font-size: 11px;
  }
  .metric-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 13px;
  }
  .metric-card {
    padding: 17px 20px;
  }
  .metric-value {
    margin: 7px 0 11px;
  }
  .overview-grid,.overview-bottom {
    grid-template-columns: 1fr;
  }
  .distribution-chart {
    min-height: unset;
    padding-bottom: 12px;
  }
  .quality-overview {
    padding-top: 5px;
  }
  .quality-progress {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .quality-note {
    margin-top: 2px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .sync-strip {
    font-size: 9px;
  }
  .sync-strip>div {
    gap: 6px;
  }
  .sync-divider {
    display: none;
  }
  .sync-strip #sync-time {
    flex-basis: 100%;
    margin-left: 12px;
  }
  .pipeline-cards,.source-cards {
    grid-template-columns: 1fr;
  }
  .toast {
    left: calc(50% + 104px);
  }
  .recent-panel th:nth-child(5),.recent-panel td:nth-child(5) {
    display: none;
  }
  .source-summary-body {
    grid-template-columns: 1fr 1fr;
  }
}
@media(max-width:720px) {
  .sidebar {
    width: 70px;
    padding: 22px 10px 15px;
  }
  .nav-label,.nav-item>.nav-count,.nav-item>.nav-dot,.sidebar-note,.sidebar-footer {
    display: none;
  }
  .workspace-switch { margin-bottom: 20px; }
  .workspace { justify-content: center; padding: 9px 3px; gap: 2px; }
  .workspace-copy { display: none; }
  .workspace-chevron { margin-left: 0; }
  .workspace-menu { right: auto; width: 210px; }
  .nav-item {
    font-size: 0;
    padding: 14px;
    gap: 0;
    justify-content: center;
    border-radius: 9px;
    margin-bottom: 11px;
  }
  .nav-item svg {
    width: 20px;
    height: 20px;
  }
  .main {
    margin-left: 70px;
  }
  .page-body {
    padding: 22px 16px 0;
  }
  .topbar {
    padding: 0 16px;
    height: 57px;
  }
  .topbar-right {
    gap: 10px;
  }
  .local-chip {
    font-size: 8px;
  }
  .top-avatar {
    width: 26px;
    height: 26px;
    font-size: 8px;
  }
  .breadcrumb {
    font-size: 10px;
    gap: 8px;
  }
  .page-heading {
    display: block;
    margin-bottom: 18px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading p {
    font-size: 11px;
    line-height: 1.9;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  .heading-actions {
    margin-top: 17px;
  }
  .sync-strip {
    align-items: flex-start;
    padding: 10px;
    gap: 8px;
  }
  .auto-refresh {
    font-size: 0;
  }
  .auto-refresh .switch {
    width: 25px;
  }
  .metric-grid {
    gap: 10px;
  }
  .metric-card {
    padding: 15px 14px;
  }
  .metric-top {
    font-size: 10px;
  }
  .metric-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }
  .metric-icon svg {
    height: 14px;
    width: 14px;
  }
  .metric-value {
    font-size: 25px;
    margin-top: 10px;
  }
  .metric-value.pending {
    font-size: 22px;
  }
  .metric-value>span {
    font-size: 9px;
    margin-left: 4px;
  }
  .metric-foot {
    font-size: 8px;
    gap: 4px;
    line-height: 1.9;
  }
  .panel-heading {
    padding: 18px 16px 14px;
  }
  .panel-heading h2,.inventory-heading h2 {
    font-size: 13px;
  }
  .panel-heading p {
    font-size: 9px;
  }
  .segmented button {
    padding: 4px 9px;
    font-size: 9px;
  }
  .distribution-chart {
    padding: 9px 17px 2px;
  }
  .bar-row {
    grid-template-columns: minmax(58px,1fr) 2.5fr 34px;
    gap: 10px;
  }
  .bar-label,.bar-count {
    font-size: 10px;
  }
  .panel-foot {
    padding: 10px 16px;
    font-size: 8px;
  }
  .overview-grid,.overview-bottom {
    gap: 16px;
    margin-bottom: 16px;
  }
  .quality-overview {
    padding: 0 17px 16px;
  }
  .quality-progress {
    padding: 0 17px;
    gap: 13px;
  }
  .quality-note {
    margin-left: 16px;
    margin-right: 16px;
  }
  .pipeline-row {
    padding: 12px 16px;
    gap: 10px;
  }
  .pipeline-row-icon {
    height: 29px;
    width: 29px;
  }
  .pipeline-row h3 {
    font-size: 10px;
  }
  .pipeline-row p {
    font-size: 8px;
  }
  .badge {
    font-size: 8px;
    padding: 3px 5px;
  }
  .alert-row {
    margin: 0 16px;
  }
  .page-footer {
    display: block;
    font-size: 8px;
  }
  .page-footer>span {
    display: flex;
    margin-bottom: 5px;
  }
  .table-scroll table {
    min-width: 600px;
  }
  .recent-panel .table-scroll table {
    min-width: 550px;
  }
  th,td {
    padding-left: 15px;
    padding-right: 15px;
  }
  .inventory-heading {
    padding: 18px 16px;
  }
  .inventory-heading p {
    font-size: 9px;
  }
  .filters {
    padding: 0 16px 18px;
    gap: 8px;
  }
  .search-field {
    flex-basis: 100%;
    min-width: 0;
  }
  .filters select {
    flex: 1;
    max-width: 100%;
    min-width: 75px;
    font-size: 9px;
    padding-left: 7px;
    padding-right: 7px;
  }
  .archived-toggle {
    font-size: 9px;
  }
  .pagination {
    padding: 14px 16px;
    font-size: 9px;
  }
  .pagination>div {
    gap: 10px;
  }
  .management-note {
    font-size: 10px;
    padding: 10px 12px;
  }
  .source-summary-body {
    grid-template-columns: 1fr;
    padding: 0 16px 18px;
    gap: 16px;
  }
  .source-detail {
    font-size: 10px;
  }
  .pipeline-card,.source-card {
    padding: 18px;
  }
  .card-heading h2 {
    font-size: 12px;
  }
  .pipeline-card p,.source-card p {
    font-size: 10px;
  }
  .activity-item {
    display: block;
    padding: 14px 16px;
  }
  .activity-item time {
    display: block;
    margin-bottom: 4px;
  }
  .toast {
    left: calc(50% + 35px);
    max-width: calc(100vw - 94px);
  }
  .drawer-header {
    padding: 23px 22px 17px;
  }
  .drawer-meta {
    padding-left: 22px;
    padding-right: 22px;
  }
  .drawer-tabs {
    padding: 0 22px;
  }
  .drawer-content {
    padding: 23px 22px;
  }
  .drawer-actions {
    padding: 16px 22px;
  }
  .brand {
    width: 56px;
    min-height: 56px;
    padding: 14px;
    margin: -5px -3px 20px;
  }
  .brand-logo-full {
    display: none;
  }
  .brand-logo-mark {
    display: block;
  }
  .atlas-avatar-mark {
    width: 13px;
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation-duration: .01ms!important;
    transition-duration: .01ms!important;
  }
}
.coverage-panel {
  margin-bottom: 21px;
}
.exam-coverage {
  padding: 0 23px 18px;
}
.exam-line {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.exam-line:first-child {
  border-top: 0;
  padding-top: 2px;
}
.exam-label {
  width: 64px;
  flex-shrink: 0;
}
.exam-label strong {
  display: block;
  font-size: 11px;
  color: var(--text);
  letter-spacing: .7px;
}
.exam-label>span {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
.exam-skills {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 11px;
  flex: 1;
}
.coverage-skill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  background: var(--surface-soft);
  border-radius: 7px;
  text-align: left;
  color: var(--muted);
}
.coverage-skill.connected {
  border: 1px solid var(--brand-light-cyan);
  background: var(--cyan-soft);
  color: var(--brand-navy);
}
.coverage-skill:hover {
  border-color: var(--brand-purple);
  background: var(--primary-soft);
}
.coverage-skill>span {
  font-size: 10px;
}
.coverage-skill>span small {
  display: block;
  font-size: 8px;
  color: var(--muted);
  margin-top: 1px;
}
.coverage-skill>strong {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}
.coverage-skill>strong small {
  font-size: 8px;
  font-weight: 400;
}
.coverage-skill .pending-label {
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
}
.coverage-count {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.45;
}
.coverage-count .coverage-set-total {
  display: block;
  color: var(--brand-navy);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.coverage-count .coverage-question-total {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  white-space: nowrap;
}
.optional-fields {
  border: 1px solid var(--border);
  padding: 12px 13px;
  margin: 0 0 17px;
  border-radius: 7px;
}
.optional-fields summary {
  font-size: 11px;
  color: var(--brand-deep-purple);
  cursor: pointer;
}
.optional-fields[open] summary {
  margin-bottom: 13px;
}
.optional-fields label:last-child {
  margin-bottom: 0;
}
.drawer-content .detail-label {
  color: var(--muted);
}
.source-detail,.pipeline-card p,.source-card p {
  color: var(--text);
}
.source-card .card-heading h2,.pipeline-card .card-heading h2 {
  color: var(--text);
}
@media(max-width:1200px) {
  .exam-skills {
    gap: 8px;
  }
  .coverage-skill {
    padding: 9px;
  }
  .exam-line {
    gap: 15px;
  }
  .coverage-skill>strong {
    font-size: 14px;
  }
  .coverage-count .coverage-set-total {
    font-size: 14px;
  }
}
@media(max-width:1000px) {
  .exam-label {
    width: 61px;
  }
  .coverage-skill>span small {
    display: none;
  }
  .coverage-skill {
    gap: 5px;
  }
}
@media(max-width:720px) {
  .exam-coverage {
    padding: 0 16px 15px;
  }
  .exam-line {
    gap: 12px;
    align-items: flex-start;
    padding-top: 13px;
  }
  .exam-label {
    width: 43px;
    padding-top: 8px;
  }
  .exam-label strong {
    font-size: 9px;
  }
  .exam-label>span {
    font-size: 8px;
    white-space: nowrap;
  }
  .exam-skills {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 7px;
  }
  .coverage-skill {
    padding: 9px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .coverage-skill>span small {
    display: block;
    font-size: 7px;
  }
  .coverage-skill>strong {
    font-size: 15px;
  }
  .coverage-skill>span {
    font-size: 9px;
  }
  .coverage-count {
    align-items: flex-start;
  }
  .coverage-count .coverage-set-total {
    font-size: 15px;
  }
  .coverage-count .coverage-question-total {
    font-size: 8px;
  }
.coverage-panel {
    margin-bottom: 16px;
  }
}

/* Question-set inventory and drill-in management. */
.set-table { min-width: 790px; }
.set-table th:nth-child(1) { width: 29%; }
.set-table th:nth-child(2) { width: 14%; }
.set-table th:nth-child(3) { width: 10%; }
.set-table th:nth-child(4) { width: 10%; }
.set-table th:nth-child(5) { width: 14%; }
.set-table th:nth-child(6) { width: 13%; }
.set-table th:nth-child(7) { width: 10%; }
.set-table th,.set-table td { padding-left: 16px; padding-right: 16px; }
.set-title {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.set-row-subtitle {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.75;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.set-row-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.set-profile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 8px 3px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.6;
  vertical-align: middle;
}
.profile-badge strong { font-size: inherit; font-weight: 600; white-space: nowrap; }
.profile-badge>span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-level-icon { width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; }
.profile-lower { color: var(--brand-green); background: var(--success-soft); border-color: var(--success-border); }
.profile-medium { color: color-mix(in srgb,var(--brand-cyan) 38%,var(--brand-navy)); background: var(--cyan-soft); border-color: color-mix(in srgb,var(--brand-cyan) 28%,white); }
.profile-upper { color: var(--brand-deep-purple); background: var(--primary-soft); border-color: color-mix(in srgb,var(--brand-purple) 22%,white); }
.profile-neutral { color: var(--muted); background: var(--surface-soft); border-color: var(--border); }
.set-progress { display: flex; flex-direction: column; gap: 3px; font-size: 10px; white-space: nowrap; }
.set-progress strong { color: var(--text); font-weight: 600; }
.set-number { color: var(--brand-navy); font-size: 17px; font-weight: 600; white-space: nowrap; }
.set-number small { color: var(--muted); font-size: 9px; font-weight: 400; }
.set-open { white-space: nowrap; }
#set-detail { margin-bottom: 20px; }
.set-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 17px 23px;
  border-bottom: 1px solid var(--border);
}
.set-detail-toolbar>div { display: flex; flex-wrap: wrap; gap: 8px; }
.set-detail-header { padding: 23px 23px 15px; }
.set-detail-header h2 { margin: 5px 0 7px; font-size: 23px; color: var(--text); overflow-wrap: anywhere; }
.set-detail-header p { margin: 5px 0 11px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.set-detail-header .badge { margin: 0 5px 5px 0; }
.set-detail-stats {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  padding: 0 23px 19px;
}
.set-detail-stats>div { padding: 13px 15px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); }
.set-detail-stats span { display: block; color: var(--muted); font-size: 10px; }
.set-detail-stats strong { display: block; color: var(--text); font-size: 22px; font-weight: 600; margin-top: 3px; }
.set-detail-stats strong small { color: var(--muted); font-size: 10px; font-weight: 400; }
.set-detail-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 0 23px 17px; }
.set-detail-filters .search-field { max-width: 520px; }
.set-detail-filters input:not([type=checkbox]) {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 10px;
  min-height: 37px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
}
.set-detail-filters input::placeholder { color: var(--muted); }
.set-detail-note { margin: 0 23px 17px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.set-shared-text { margin: 0 23px 20px; padding: 12px 15px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft); }
.set-shared-text summary { cursor: pointer; color: var(--brand-deep-purple); font-size: 11px; font-weight: 500; }
.set-shared-text[open] summary { margin-bottom: 12px; }
.set-shared-text p,.set-shared-text>div { margin: 0; color: var(--text); font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.set-members-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 23px 13px; }
.set-members-heading h3 { margin: 0; font-size: 14px; color: var(--text); }
.set-members-heading small { font-size: 10px; color: var(--muted); }
#set-detail .table-scroll table { min-width: 720px; }
#set-form-dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 55px); }
.set-form-impact { margin: 17px 0; padding: 12px 14px; border: 1px solid var(--brand-pale-blue); border-radius: 8px; background: var(--cyan-soft); color: var(--text); font-size: 11px; line-height: 1.8; }
.set-form-impact strong { color: var(--brand-navy); }
@media(max-width:1000px) {
  .set-table { min-width: 750px; }
  .set-detail-stats { gap: 9px; }
  .set-detail-stats>div { padding: 11px 12px; }
  .set-detail-header h2 { font-size: 21px; }
}
@media(max-width:720px) {
  .set-table { min-width: 700px; }
  .set-detail-toolbar { padding: 14px 16px; }
  .set-detail-header { padding: 18px 16px 13px; }
  .set-detail-header h2 { font-size: 19px; }
  .set-detail-stats { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 0 16px 16px; gap: 8px; }
  .set-detail-stats span { font-size: 9px; }
  .set-detail-stats strong { font-size: 20px; }
  .set-detail-filters { padding: 0 16px 14px; gap: 9px; }
  .set-detail-filters .search-field { max-width: none; }
  .set-detail-note { margin: 0 16px 14px; font-size: 9px; }
  .set-shared-text { margin: 0 16px 17px; padding: 11px 12px; }
  .set-shared-text p,.set-shared-text>div { font-size: 11px; }
  .set-members-heading { padding: 0 16px 12px; }
  .set-members-heading h3 { font-size: 13px; }
  .set-members-heading small { font-size: 9px; }
  .set-form-impact { font-size: 10px; padding: 10px 12px; }
}

/* Factory monitoring stays separate for each language skill. */
#pipeline-content.pipeline-cards { display: flex; flex-direction: column; gap: 20px; }
.pipeline-skill-group { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.pipeline-skill-heading { display: flex; align-items: center; gap: 13px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.pipeline-skill-icon { display: grid; place-items: center; width: 43px; height: 43px; flex-shrink: 0; border-radius: 10px; color: var(--brand-deep-purple); background: var(--primary-soft); }
.pipeline-skill-icon svg { width: 23px; height: 23px; }
.pipeline-skill-eyebrow { display: block; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: 1.1px; }
.pipeline-skill-heading h2 { margin: 3px 0 0; color: var(--text); font-size: 17px; font-weight: 600; }
.pipeline-skill-count { margin-left: auto; color: var(--muted); font-size: 10px; text-align: right; }
.pipeline-factory-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 18px 22px 22px; }
.pipeline-factory-card { min-width: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pipeline-factory-card.is-pending { background: color-mix(in srgb,var(--surface-soft) 45%,white); }
.pipeline-factory-heading { display: flex; align-items: center; gap: 9px; padding: 15px 15px 0; }
.pipeline-factory-letter { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; color: var(--brand-deep-purple); background: var(--primary-soft); border-radius: 7px; font-size: 12px; font-weight: 600; }
.pipeline-factory-heading h3 { margin: 0; font-size: 12px; font-weight: 600; color: var(--text); }
.pipeline-factory-heading .badge { margin-left: auto; }
.pipeline-observation { padding: 15px; }
.pipeline-observation + .pipeline-observation { border-top: 1px solid var(--border); }
.pipeline-observation-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 9px; color: var(--muted); }
.pipeline-observation-heading strong { font-size: 11px; color: var(--text); overflow-wrap: anywhere; }
.pipeline-observation p,.pipeline-pending-copy { margin: 12px 0 16px; font-size: 11px; color: var(--muted); line-height: 1.9; overflow-wrap: anywhere; }
.pipeline-observation .card-meta { font-size: 9px; gap: 7px; }
.pipeline-classification-note { display: block; color: var(--muted); font-size: 9px; margin-top: 8px; }
.pipeline-pending-copy { margin: 14px 15px 16px; }
.pipeline-pending-foot { margin: 0 15px 15px; padding-top: 12px; border-top: 1px dashed var(--border); color: var(--muted); font-size: 9px; line-height: 1.7; }
.pipeline-connection-note { margin: 0 15px 15px; padding: 10px 11px; color: var(--brand-deep-purple); background: var(--primary-soft); border-radius: 7px; font-size: 9px; line-height: 1.8; }
.pipeline-preview-count { flex-shrink: 0; color: var(--muted); font-size: 9px; }
.pipeline-unclassified { padding: 20px 22px; }
.pipeline-unclassified>h2 { margin: 0; font-size: 15px; color: var(--text); }
.pipeline-unclassified>p { margin: 8px 0 4px; font-size: 11px; line-height: 1.8; color: var(--muted); }
.pipeline-unclassified .pipeline-observation { padding: 15px 0; }
@media(max-width:1150px) {
  .pipeline-factory-grid { gap: 10px; padding: 16px; }
  .pipeline-factory-heading { flex-wrap: wrap; padding: 13px 12px 0; gap: 6px; }
  .pipeline-factory-heading h3 { font-size: 11px; }
  .pipeline-observation { padding: 12px; }
  .pipeline-observation-heading { flex-wrap: wrap; }
}
@media(max-width:900px) {
  .pipeline-factory-grid { grid-template-columns: 1fr; }
  .pipeline-factory-heading { padding: 15px 16px 0; gap: 9px; }
  .pipeline-factory-heading h3 { font-size: 12px; }
  .pipeline-observation { padding: 15px 16px; }
  .pipeline-skill-heading { flex-wrap: wrap; gap: 10px; padding: 17px 16px; }
  .pipeline-skill-heading h2 { font-size: 15px; }
  .pipeline-skill-count { font-size: 9px; }
  .pipeline-observation p,.pipeline-pending-copy { font-size: 11px; }
}
@media(max-width:480px) {
  .pipeline-skill-count { flex-basis: 100%; margin-left: 53px; text-align: left; }
  .pipeline-skill-heading { row-gap: 5px; }
  .pipeline-preview-count { max-width: 48px; text-align: right; line-height: 1.6; }
}

/* Read-only n8n connection and independently reported workflow observations. */
.n8n-monitor-panel { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding: 20px 22px; margin-bottom: 18px; }
.n8n-monitor-copy { min-width: 0; }
.n8n-monitor-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.n8n-monitor-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.n8n-monitor-copy>p { margin: 9px 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.n8n-monitor-times { display: flex; flex-wrap: wrap; gap: 5px 16px; color: var(--muted); font-size: 9px; line-height: 1.8; }
.n8n-monitor-copy>.n8n-monitor-error { color: var(--danger-text); margin-bottom: 0; }
.n8n-monitor-actions { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: 10px; }
.n8n-monitor-actions .button { white-space: nowrap; }
.n8n-workflow-name { display: flex; flex-direction: column; gap: 5px; }
.n8n-workflow-name strong { font-size: 11px; font-weight: 600; line-height: 1.8; overflow-wrap: anywhere; color: var(--text); }
.n8n-workflow-name>span { font-size: 9px; color: var(--muted); }
.n8n-workflow-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.n8n-workflow-facts { margin: 13px 0 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.n8n-workflow-facts dt { color: var(--muted); font-size: 9px; margin-bottom: 5px; }
.n8n-workflow-facts dd { margin: 0; display: flex; align-items: flex-start; flex-direction: column; gap: 5px; }
.n8n-workflow-facts dd small { font-size: 9px; color: var(--muted); overflow-wrap: anywhere; }
.n8n-execution-times { display: flex; flex-direction: column; gap: 3px; margin-top: 9px; color: var(--muted); font-size: 9px; }
.n8n-running-execution { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 11px; margin-top: 12px; border-radius: 8px; background: var(--primary-soft); font-size: 9px; color: var(--muted); }
.n8n-running-execution>div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.n8n-running-execution strong { color: var(--text); font-size: 9px; font-weight: 500; overflow-wrap: anywhere; }
.n8n-workflow-observation>.n8n-output-note { padding: 9px 10px; border-radius: 7px; background: var(--surface-soft); color: var(--text); font-size: 9px; line-height: 1.8; }
.n8n-workflow-links { display: flex; gap: 7px 14px; flex-wrap: wrap; }
.n8n-workflow-observation .card-meta { align-items: flex-start; flex-direction: column; }
#n8n-monitor-form { display: flex; flex-direction: column; max-height: calc(100vh - 55px); }
#n8n-monitor-form .form-heading,#n8n-monitor-form .form-footer { flex-shrink: 0; }
#n8n-monitor-form label[for=n8n-monitor-api-key] { margin-bottom: 0; }
#n8n-monitor-form input[readonly] { color: var(--muted); background: var(--surface-soft); overflow: hidden; text-overflow: ellipsis; }
.n8n-settings-note { color: var(--muted); font-size: 10px; line-height: 1.8; margin: 9px 0 15px; }
@media(max-width:900px) {
  .n8n-monitor-panel { align-items: flex-start; padding: 18px 16px; gap: 16px; }
  .n8n-monitor-heading h2 { font-size: 14px; }
}
@media(max-width:620px) {
  .n8n-monitor-panel { flex-direction: column; }
  .n8n-monitor-actions { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; }
  .n8n-monitor-times { flex-direction: column; gap: 3px; }
  #n8n-monitor-form .form-heading { gap: 12px; padding: 18px 16px; }
  #n8n-monitor-form .form-heading h2 { font-size: 18px; }
  #n8n-monitor-form .form-body { padding: 0 16px 16px; }
  #n8n-monitor-form .form-footer { padding: 14px 16px; flex-wrap: wrap; }
}

/* Keep the reading pane spacious while topic and audio details remain adjustable. */
#question-drawer { width: min(900px,100vw); height: 100dvh; overflow: hidden; }
#question-drawer.is-expanded { width: 100vw; }
#question-drawer > .drawer-header,
#question-drawer > .drawer-meta,
#question-drawer > .drawer-resize-row,
#question-drawer > .drawer-tabs,
#question-drawer > .drawer-actions { flex-shrink: 0; }
#question-drawer .drawer-header { padding: 16px 24px 10px; gap: 16px; }
#question-drawer .drawer-header .eyebrow { font-size: 10px; margin-bottom: 5px; }
#question-drawer .drawer-header h2 { font-size: 22px; line-height: 1.4; }
.drawer-header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
#question-drawer .drawer-header-tools button { min-height: 40px; }
#question-drawer .drawer-meta { padding: 0 24px 12px; gap: 7px; }
#question-drawer .drawer-summary { flex: 0 0 var(--drawer-summary-height,230px); min-height: 0; overflow: auto; overscroll-behavior: contain; background: var(--surface-soft); }
#question-drawer .drawer-topic-details { margin: 0; }
#question-drawer .drawer-topic-details > summary { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 24px; cursor: pointer; list-style: none; border-top: 1px solid var(--border); font-size: 13px; }
#question-drawer .drawer-topic-details > summary::-webkit-details-marker { display: none; }
#question-drawer .drawer-topic-details > summary::before { content: '›'; color: var(--brand-purple); font-size: 23px; line-height: 1; }
#question-drawer .drawer-topic-details[open] > summary::before { transform: rotate(90deg); }
#drawer-topic-summary { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.drawer-topic-prompt { margin-left: auto; flex-shrink: 0; color: var(--brand-deep-purple); font-size: 12px; }
#question-drawer #question-topics { padding: 4px 24px 14px; border: 0; font-size: 13px; }
#question-drawer #question-topics .topic-detail-head > strong { display: none; }
#question-drawer #question-topics p { font-size: 13px; margin: 8px 0; }
#question-drawer #question-audio { margin: 0 24px 12px; }
#question-drawer #question-audio .listening-player { padding: 12px 15px; background: var(--surface); }
#question-drawer #question-audio .listening-player-heading strong { font-size: 13px; }
#question-drawer #question-audio .audio-description { font-size: 12px; }
#question-drawer #question-audio .audio-filename { font-size: 12px; margin: 6px 0; }
#question-drawer #question-audio .audio-player-footer { margin-top: 6px; font-size: 12px; }
#question-drawer #question-audio .audio-player-footer .text-button { font-size: 12px; }
#question-drawer #question-audio .audio-status { margin-top: 6px; font-size: 12px; }
.drawer-resize-row { display: flex; align-items: stretch; gap: 8px; min-height: 42px; padding: 0 24px; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.drawer-resize-handle { display: flex; align-items: center; justify-content: center; gap: 10px; flex: 1; min-width: 0; color: var(--muted); font-size: 12px; cursor: ns-resize; touch-action: none; user-select: none; border-radius: 5px; }
.drawer-resize-grip { width: 32px; height: 7px; border-top: 2px solid var(--border-strong); border-bottom: 2px solid var(--border-strong); flex-shrink: 0; }
.drawer-resize-handle:hover,.drawer-resize-handle:focus-visible { color: var(--brand-deep-purple); background: var(--primary-soft); }
.drawer-resize-handle:focus-visible { outline: 2px solid var(--brand-purple); outline-offset: -2px; }
#drawer-summary-toggle { font-size: 12px; min-height: 42px; white-space: nowrap; }
#question-drawer.is-resizing { cursor: ns-resize; user-select: none; }
#question-drawer .drawer-tabs { padding: 0 24px; gap: 8px; background: var(--surface); }
#question-drawer .drawer-tabs button { min-height: 52px; padding: 12px 24px; font-size: 16px; border-bottom-width: 3px; }
#question-drawer .drawer-tabs button.active { background: var(--primary-soft); }
#question-drawer .drawer-content { flex: 1 1 0; min-height: 0; padding: 22px 28px 28px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#question-drawer .detail-stem { font-size: 20px; line-height: 1.8; margin-bottom: 20px; }
#question-drawer .prose,
#question-drawer .option-row,
#question-drawer .detail-transcript p,
#question-drawer .source-field > div,
#question-drawer .source-field > a,
#question-drawer .sticking-point { font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
#question-drawer .option-row { padding: 13px 16px; }
#question-drawer .option-row > :not(strong) { min-width: 0; }
#question-drawer .answer-box { font-size: 16px; line-height: 1.8; }
#question-drawer .detail-label,
#question-drawer .source-field strong,
#question-drawer .answer-box strong { font-size: 13px; overflow-wrap: anywhere; }
#question-drawer .drawer-note,
#question-drawer .detail-transcript summary,
#question-drawer .explanation-generation-top p,
#question-drawer .explanation-generation-status { font-size: 14px; line-height: 1.8; }
#question-drawer .detail-transcript summary { padding: 6px 0; }
#question-drawer .explanation-generation-top strong { font-size: 16px; }
#question-drawer .empty-state { font-size: 14px; }
#question-drawer .empty-state strong { font-size: 17px; }
#question-drawer .drawer-actions { padding: 10px 24px; }
#question-drawer .drawer-actions .button { min-height: 44px; font-size: 14px; }
@media(max-width:640px) {
  #question-drawer .drawer-header { padding: 12px 16px 8px; gap: 10px; }
  #question-drawer .drawer-header h2 { font-size: 20px; }
  #expand-drawer { display: none; }
  #question-drawer .drawer-meta { padding: 0 16px 10px; }
  #question-drawer .drawer-topic-details > summary { padding: 10px 16px; gap: 8px; }
  #question-drawer .drawer-topic-prompt { font-size: 11px; }
  #question-drawer #question-topics { padding: 4px 16px 12px; }
  #question-drawer #question-audio { margin: 0 12px 10px; }
  #question-drawer #question-audio .listening-player { padding: 10px 12px; }
  .drawer-resize-row { padding: 0 12px; gap: 6px; }
  .drawer-resize-handle { gap: 6px; font-size: 11px; }
  .drawer-resize-grip { width: 22px; }
  #drawer-summary-toggle { font-size: 11px; }
  #question-drawer .drawer-tabs { padding: 0 12px; gap: 0; }
  #question-drawer .drawer-tabs button { flex: 1; padding: 10px 8px; min-height: 48px; }
  #question-drawer .drawer-content { padding: 18px 16px 24px; }
  #question-drawer .detail-stem { font-size: 18px; }
  #question-drawer .drawer-actions { padding: 8px 16px; }
}
@media(max-height:500px) {
  #question-drawer .drawer-header { padding-top: 8px; padding-bottom: 6px; }
  #question-drawer .drawer-header .eyebrow { display: none; }
  #question-drawer .drawer-meta { padding-bottom: 6px; }
  #question-drawer .drawer-tabs button { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
  #question-drawer .drawer-actions { padding-top: 6px; padding-bottom: 6px; }
}

/* Keep all topic write-back actions reachable at narrow dialog widths. */
#backfill-dialog .topic-actions{flex-wrap:wrap}

/* Atlas human-review seal: only rendered for a fully verified current record. */
.certified-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.certified-heading>span:first-child { min-width: 0; overflow-wrap: anywhere; }
.review-seal { display: inline-flex; flex: 0 0 auto; width: .85em; height: .85em; color: #1285C6; vertical-align: middle; cursor: help; }
.review-seal svg { display: block; width: 100%; height: 100%; }
.question-heading { display: flex; align-items: center; gap: 7px; min-width: 0; margin-bottom: 4px; font-size: 11px; }
.question-heading .question-stem { margin-bottom: 0; min-width: 0; }
