:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8f1fb;
  background: #08111d;
  color-scheme: dark;
  font-synthesis: none;
  --panel: #101c2c;
  --panel-soft: #132338;
  --edge: #23374d;
  --muted: #8fa6bc;
  --accent: #40d1d4;
}
* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; min-width: 320px; }
button, select, input { font: inherit; }
button, .btn, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, select:focus-visible, a:focus-visible, input:focus-visible + span {
  outline: 2px solid #51d7db;
  outline-offset: 3px;
}
.topbar {
  height: 70px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #0e1b2b;
  border-bottom: 1px solid #263b51;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-icon {
  display: grid; place-items: center;
  width: 41px; height: 41px;
  border: 1px solid #2d7680; border-radius: 12px;
  color: #44e5e0; font-size: 27px; font-weight: 700;
  background: linear-gradient(145deg, #123447, #0e1b2b);
}
.brand strong { font-size: 20px; letter-spacing: -.4px; }
.brand small { display: block; margin-top: 2px; color: #91a8c0; font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 12px; border: 1px solid #37516b;
  border-radius: 9px; background: #182c43; color: #e1effc;
  font-size: 12px; font-weight: 650; white-space: nowrap;
  text-decoration: none; transition: background-color .16s, border-color .16s, box-shadow .16s;
}
.btn:hover:not(:disabled) { background: #243d56; border-color: #52718f; }
.btn.primary { border-color: #37c3c8; background: #20b2bb; color: #062632; font-weight: 750; }
.btn.primary:hover:not(:disabled) { background: #42ccd0; }
.btn.full { width: 100%; margin-top: 11px; }
.btn.disabled { pointer-events: none; opacity: .38; }
.workspace { display: flex; height: calc(100dvh - 70px); min-height: 540px; }
.sidebar {
  display: flex; flex-direction: column;
  width: 308px; flex-shrink: 0; min-height: 0;
  border-right: 1px solid #243a4f;
  background: #0f1b2c;
}
.sidebar-heading {
  display: flex; align-items: center; gap: 11px;
  min-height: 64px; padding: 14px 19px;
  border-bottom: 1px solid #25384c;
  background: #122135;
}
.sidebar-heading-icon {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  font-size: 21px; color: #52d9de; background: #1b3a4c;
}
.sidebar-heading strong { display: block; font-size: 13px; letter-spacing: .1px; }
.sidebar-heading span:not(.sidebar-heading-icon) { color: var(--muted); font-size: 10px; }
.sidebar-scroll-shell {
  position: relative;
  min-height: 0;
  flex: 1;
  isolation: isolate;
}
.sidebar-content {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none; /* Hidden native bar; custom 4px overlay stays consistent across browsers. */
  -ms-overflow-style: none;
}
.sidebar-content::-webkit-scrollbar { display: none; width: 0; }
.sidebar-content:focus-visible { outline: 1px solid rgba(64, 209, 212, .55); outline-offset: -2px; }
.sidebar-scrollbar {
  position: absolute;
  z-index: 4;
  inset: 12px 3px 12px auto;
  width: 9px;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  background: rgba(117, 154, 174, .055);
  transition: opacity .2s ease, background .2s ease;
}
.sidebar-scrollbar.has-overflow { opacity: .58; pointer-events: auto; }
.sidebar-scroll-shell:hover .sidebar-scrollbar.has-overflow,
.sidebar-scrollbar.is-dragging { opacity: 1; background: rgba(117, 154, 174, .10); }
.sidebar-scrollbar-thumb {
  position: absolute;
  top: 0;
  right: 2px;
  width: 4px;
  min-height: 32px;
  border-radius: 100px;
  background: linear-gradient(180deg, #4f8598, #32576d);
  box-shadow: 0 0 0 1px rgba(120, 207, 214, .04);
  will-change: transform;
}
.sidebar-scroll-shell:hover .sidebar-scrollbar-thumb,
.sidebar-scrollbar.is-dragging .sidebar-scrollbar-thumb {
  background: linear-gradient(180deg, #75dee0, #38a9ba);
  box-shadow: 0 0 9px rgba(67, 210, 208, .20);
}
.sidebar-footer {
  display: flex; align-items: center; gap: 8px; min-height: 43px;
  padding: 11px 19px; border-top: 1px solid #24374c;
  color: #8099b1; font-size: 10px; letter-spacing: .2px;
  background: #101d30;
}
.sidebar-footer-dot { width: 6px; height: 6px; background: #39c2b7; border-radius: 50%; }
.section { padding: 21px 19px 22px; border-bottom: 1px solid #223449; }
.section-title {
  display: block; margin-bottom: 14px;
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: #5ed7dc;
}
.dataset { font-size: 13px; font-weight: 750; overflow-wrap: anywhere; line-height: 1.4; }
.dataset small { display: block; margin-top: 7px; color: #88a0b9; font-size: 11px; font-weight: 400; line-height: 1.55; }
.dataset-info { margin-top: 14px; color: #aac0d3; font-size: 11px; white-space: pre-line; line-height: 1.8; }
.input-label { display: block; margin: 12px 0 8px; color: #b3c9dd; font-size: 11px; }
.input-label b { float: right; color: #64d9d9; }
select {
  width: 100%; min-height: 43px; padding: 10px 12px;
  background: #192c43; color: #f2f8ff;
  border: 1px solid #37516d; border-radius: 8px;
  outline: none; font-size: 12px;
}
select:hover { border-color: #52839a; }
select option { background: #16283c; color: #ebf5ff; }
select:disabled { opacity: .6; cursor: progress; }
.model-health { margin: 10px 1px 1px; color: #8fa8c0; font-size: 10.5px; line-height: 1.55; }
.model-health[data-state=ready] { color: #5fdec3; }
.model-health[data-state=warning] { color: #ffc78d; }
.mini { color: #8ba4bd; font-size: 11px; line-height: 1.7; margin-top: 12px; }
.control-line { font-size: 12px; display: flex; align-items: center; justify-content: space-between; margin: 8px 0 16px; }
.control-line input { width: 18px; height: 18px; accent-color: #43c9cf; }
input[type=range] { width: 100%; cursor: pointer; accent-color: #42c7cb; }
.zoom-row { display: flex; align-items: center; gap: 6px; }
.zoom-row .btn { padding: 8px 11px; }
.zoom-row span { flex: 1; text-align: center; font-size: 12px; color: #deedf9; }
.section.info { color: #8ba3bd; font-size: 11px; line-height: 1.75; }
.main { display: flex; flex-direction: column; min-width: 0; flex: 1; padding: 12px 17px 16px; gap: 10px; }
.viewer-toolbar {
  min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 2px;
}
/* A single accessible switch controls both MRI modalities and all four views. */
.viewer-toolbar { 
  min-height: 54px;
  padding: 8px 13px;
  border: 1px solid #253c51;
  border-radius: 11px;
  background: linear-gradient(120deg, #102137, #101d30);
}
.modality-toolbar-group { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-width: 0; }
.toolbar-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 1.15px; color: #89a9c1; white-space: nowrap; }
.modality-switch {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid #2c485f;
  border-radius: 100px;
  background: #0b1a2b;
  color: #8daac1;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .17);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.modality-switch:disabled { opacity: 1; cursor: not-allowed; }
.modality-switch:not(:disabled):hover {
  border-color: #4b93a1;
  background: #12283d;
  box-shadow: 0 0 0 3px rgba(64, 209, 212, .045);
}
.modality-switch:focus-visible { outline: 2px solid #55d9df; outline-offset: 3px; }
.modality-name { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; color: #7f9db4; font-size: 11px; font-weight: 700; transition: color .2s ease; }
.modality-name small { font-size: 9px; font-weight: 500; color: #658399; }
.modality-switch[data-mode="t2w"] .modality-name-t2w,
.modality-switch[data-mode="tof"] .modality-name-tof { color: #9bf5f1; }
.modality-switch[data-mode="t2w"] .modality-name-t2w small,
.modality-switch[data-mode="tof"] .modality-name-tof small { color: #60c0c6; }
.modality-track {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 47px;
  height: 24px;
  border-radius: 24px;
  border: 1px solid #3d6679;
  background: #274659;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.32);
  transition: background .2s ease, border-color .2s ease;
}
.modality-track::before, .modality-track::after {
  content: '';
  position: absolute;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(201, 237, 244, .5);
}
.modality-track::before { left: 10px; }
.modality-track::after { right: 10px; }
.modality-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f2ffff, #b7d8e1);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .38);
  transform: translateX(0);
  transition: transform .22s cubic-bezier(.2,.8,.2,1), background .2s ease;
}
.modality-switch[data-mode="tof"] .modality-track { background: #147882; border-color: #36a6ad; }
.modality-switch[data-mode="tof"] .modality-knob { transform: translateX(23px); background: linear-gradient(145deg, #fff, #bcffff); }
.modality-switch:disabled .modality-track { opacity: .47; }
.modality-ready-indicator { display: inline-flex; align-items: center; gap: 7px; color: #758da6; font-size: 10px; white-space: nowrap; }
.modality-ready-indicator::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #5a7188; }
.modality-ready-indicator.is-ready { color: #91c6c6; }
.modality-ready-indicator.is-ready::before { background: #3ccab8; box-shadow: 0 0 0 3px rgba(60,202,184,.09); }
@media (prefers-reduced-motion: reduce) {
 .modality-knob, .modality-track, .modality-switch, .sidebar-scrollbar { transition: none; }
}
.display-caption { color: #90a8bf; font-size: 11px; white-space: nowrap; }
.status-row { min-height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #93aec2; font-size: 11px; }
.status { display: flex; align-items: center; gap: 9px; min-width: 0; }
.status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status i { display: block; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: #38d6bc; box-shadow: 0 0 0 3px rgba(56,214,188,.08); }
.status.error i { background: #ff7777; box-shadow: none; }
#coords { max-width: 48%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.viewport-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0,1fr)); gap: 12px; }
.viewport { min-width: 0; min-height: 0; position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #294259; border-radius: 11px; background: #060c15; }
.viewport.selected { border-color: #38c8ce; box-shadow: 0 0 0 1px rgba(62,203,206,.16); }
.view-title { min-height: 37px; height: 37px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #1b2e41; background: #111e2e; font-size: 12px; }
.view-title strong { font-weight: 750; }
.view-title span { font-size: 10px; color: #80adbe; }

/* Compact viewer maximize/restore controls: one on each of the four panels. */
.view-title-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.view-expand-button {
 appearance: none; display: grid; place-items: center; flex: none;
 width: 27px; height: 27px; padding: 0;
 border: 1px solid #2b445a; border-radius: 7px;
 color: #9db6cc; background: #16283b;
 transition: color .14s ease, background-color .14s ease, border-color .14s ease;
}
.view-expand-button:hover { color: #69e3e2; border-color: #4c9ba8; background: #203c50; }
.view-expand-button[aria-pressed="true"] { color: #6bf0e5; background: #1b3c4d; border-color: #388f9e; }
.view-expand-button .icon-restore { display: none; }
.view-expand-button[aria-pressed="true"] .icon-expand { display: none; }
.view-expand-button[aria-pressed="true"] .icon-restore { display: initial; }
.view-expand-button:focus-visible { outline: 2px solid #59dcdf; outline-offset: 2px; }
/* No DOM reparenting: preserving canvases keeps the active edit state and camera. */
.viewport-grid.is-maximized { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.viewport-grid.is-maximized > .viewport { display: none; }
.viewport-grid.is-maximized > .viewport.is-maximized {
 display: flex; grid-column: 1 / -1; grid-row: 1 / -1;
}

canvas[id=axial], canvas[id=coronal], canvas[id=sagittal] { display: block; flex: 1; min-height: 0; width: 100%; touch-action: none; cursor: crosshair; }
.view-bottom { min-height: 32px; height: 32px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: #111d2b; border-top: 1px solid #1b3043; }
.view-bottom .slice { flex: 1; margin: 0; }
.view-bottom output { width: 69px; text-align: right; font-size: 10px; color: #a4b8cb; }
#three { position: absolute; inset: 37px 0 0; }
#three canvas { display: block; }
.bottom-badge { position: absolute; bottom: 12px; left: 13px; color: #7e9db5; font-size: 10px; pointer-events: none; }
@media (max-width: 1000px) {
  .sidebar { width: 275px; }
  .main { padding: 10px; }
  .topbar { padding: 0 14px; }
  .display-caption { display: none; }
}
@media (max-width: 700px) {
  .topbar { height: auto; min-height: 68px; padding: 10px 12px; flex-wrap: wrap; }
  .brand strong { font-size: 17px; }
  .brand small { display: none; }
  .top-actions { width: 100%; justify-content: space-between; }
  .top-actions .btn { flex: 1; padding: 8px; font-size: 11px; }
  .workspace { height: auto; min-height: 0; display: block; }
  .sidebar { width: 100%; border-right: 0; }
  .sidebar-scroll-shell { flex: 0 0 320px; height: 320px; max-height: 320px; }
  .main { height: 1090px; }
  .viewport-grid { grid-template-columns: 1fr; grid-template-rows: repeat(4, minmax(0,1fr)); }
  .modality-toolbar-group { gap: 8px; }
  .modality-switch { gap: 8px; padding: 5px 9px; }
  .modality-ready-indicator { display: none; }
  .status-row #coords { display: none; }
}

/* Segmentation comparison: clear mask identities without wasting sidebar space. */
.section-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 11px; }
.section-title-row .section-title { margin-bottom: 0; }
.mask-count {
  font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: #95b2c8; background: #1a3046; border: 1px solid #29485f;
  padding: 4px 7px; border-radius: 100px; white-space: nowrap;
}
.mask-list { display: flex; flex-direction: column; gap: 7px; }
.mask-empty {
  border: 1px dashed #37516a; border-radius: 10px; padding: 16px 12px;
  color: #94acc2; background: rgba(30, 53, 77, .30);
  font-size: 11px; line-height: 1.55;
}
.mask-row {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  padding: 9px 8px; border: 1px solid #2b435a; border-radius: 10px;
  background: #132339; transition: border-color .17s ease, background .17s ease;
}
.mask-row:hover { border-color: #467085; background: #192d44; }
.mask-row.is-visible { border-color: #3c6b78; background: #172e41; }
.mask-main { display: flex; min-width: 0; flex: 1; align-items: center; gap: 8px; cursor: pointer; }
.mask-main input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto;
  width: 15px; height: 15px; margin: 0; border-radius: 4px;
  border: 1px solid #66849b; background: #0b1a2a;
  display: grid; place-items: center; cursor: pointer;
}
.mask-main input[type=checkbox]:checked { background: #45cad0; border-color: #45cad0; }
.mask-main input[type=checkbox]:checked::after {
  content: ''; display: block; width: 6px; height: 3px;
  border-bottom: 2px solid #042530; border-left: 2px solid #042530;
  transform: rotate(-45deg) translateY(-1px);
}
.mask-main input[type=checkbox]:focus-visible { outline: 2px solid #6ceaf1; outline-offset: 3px; }
.mask-swatch { width: 9px; height: 26px; border-radius: 8px; flex: 0 0 auto; border: 1px solid #46647a; }
.mask-labels { min-width: 0; flex: 1; }
.mask-labels strong { display: block; color: #eef7ff; font-size: 11px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.mask-labels small { display: block; margin-top: 4px; color: #849db5; font-size: 9.5px; line-height: 1.3; }
.mask-download {
  width: 27px; height: 28px; flex: 0 0 auto; display: grid; place-items: center;
  color: #82d7db; text-decoration: none; border-radius: 7px;
  border: 1px solid #355267; background: rgba(38, 69, 89, .3);
  transition: background-color .15s ease;
}
.mask-download:hover { color: #e8ffff; background: #225266; }
.mask-download:focus-visible { outline: 2px solid #6ceaf1; outline-offset: 2px; }
.export-selected:disabled { cursor: not-allowed; opacity: .38; }

/* DuoRefine research viewer branding. Logo derived only from the provided artwork. */
.topbar { height: 84px; padding-inline: 22px; }
.workspace { height: calc(100dvh - 84px); }
.brand { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; flex-shrink: 0; min-width: 218px; }
.brand-logo { width: 212px; max-width: 100%; height: 48px; object-fit: contain; object-position: left center; display: block; }
.brand-subtitle { margin-left: 4px; margin-top: -1px; font-size: 10px; letter-spacing: .20px; color: #9bb7c8; }
.manual-hint { color: #8aaec0; padding-top: 8px; font-size: 10px; line-height: 1.5; }
.masks-section { background: linear-gradient(180deg, rgba(28,60,74,.16), transparent 120px); }
.mask-list { max-height: 310px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #376477 transparent; }
.mask-list::-webkit-scrollbar { width: 4px; }
.mask-list::-webkit-scrollbar-thumb { border-radius: 12px; background: #376477; }
.mask-list::-webkit-scrollbar-thumb:hover { background: #42b4bf; }
@media (max-width: 660px) {
  .topbar { min-height: 84px; height: auto; gap: 10px; padding: 10px 12px; }
  .workspace { height: auto; min-height: calc(100dvh - 84px); }
  .brand { min-width: 142px; }
  .brand-logo { width: 162px; height: 39px; }
  .brand-subtitle { font-size: 8px; }
}

/* Contour-based mask editing */
.mask-row.is-edit-target { border-color: #68dadd; box-shadow: inset 2px 0 0 #42dbdb, 0 0 0 1px rgba(76,213,217,.15); }
.mask-pick { border: 1px solid #355d70; border-radius: 6px; color:#a0c7d8; background:#112c42; padding:6px 7px; font-size:10px; font-weight:700; flex:0 0 auto; }
.mask-pick[aria-pressed="true"] { color:#052631; background:#61d9dc; border-color:#61d9dc; }
.mask-pick:hover:not(:disabled) { border-color:#78e3e5; }
.mask-editor-section { background:linear-gradient(145deg,rgba(19,91,100,.12),transparent 160px); }
.editor-badge { padding:4px 7px; border:1px solid #33556d; border-radius:100px; font-size:10px; color:#8caec2; }
.editor-badge.on { color:#72ebd9; border-color:#448e91; background:rgba(52,184,174,.11); }
.editor-target { font-size:11px; line-height:1.5; padding:9px 10px; border:1px solid #2b485d; border-radius:8px; background:#102337; color:#b4d5e4; overflow-wrap:anywhere; }
.editor-start { border-color:#2c8790; color:#a4f4ef; }
.editor-guide { font-size:11px; color:#9cb7ca; line-height:1.7; margin:11px 0; }
.editor-buttons { display:flex; gap:7px; margin-top:12px; }
.editor-buttons .btn { flex:1; min-width:0; white-space:normal; line-height:1.35; }
.mask-editing canvas[id="axial"], .mask-editing canvas[id="coronal"], .mask-editing canvas[id="sagittal"] { cursor:crosshair; touch-action:none; }
.mask-editing .viewport.selected { border-color:#45dcd5; box-shadow:inset 0 0 0 1px rgba(69,220,213,.18); }
[hidden] { display:none !important; }

/* Small false-positive island removal: deliberate selection and explicit Delete. */
.editor-island-toolbar {
 margin-top: 12px; display: flex; flex-direction: column; gap: 8px;
 border: 1px solid #31516a; background: #0d2234; padding: 10px;
 border-radius: 10px;
}
.editor-island-toolbar .btn { width: 100%; white-space: normal; line-height: 1.4; }
.island-select { color: #cce6ef; border-color: #456479; background: #19344a; }
.island-select.is-active, .island-select[aria-pressed="true"] {
 border-color: #eebd68; color: #ffdf9b;
 background: rgba(194, 125, 33, .16);
}
/* A separate exit control avoids accidentally toggling off repeated island selection. */
.island-done { color: #9dc6d9; background: #14293c; border-color: #34536b; }
.island-done:hover { background: #203c54; color: #e3f8ff; }
.island-delete { border-color: #bf7556; background: rgba(135, 65, 35, .2); color: #ffc9a9; }
.island-delete:not(:disabled):hover { background: rgba(176, 77, 35, .34); }
.island-delete:disabled { opacity: .38; cursor: not-allowed; }
.island-help { color: #a4c2d3; line-height: 1.55; font-size: 10px; }
.mask-editing:has(.island-select.is-active) canvas[id="axial"],
.mask-editing:has(.island-select.is-active) canvas[id="coronal"],
.mask-editing:has(.island-select.is-active) canvas[id="sagittal"] { cursor: cell; }


/* A selection must be clearly actionable, even before a fragment is picked. */
.editor-island-toolbar .island-delete:not(:disabled) {
  border: 1px solid #bd7a35;
  background: #543921;
  color: #ffdda5;
  opacity: 1;
}
.editor-island-toolbar .island-delete:not(:disabled):hover {
  background: #70502b;
  border-color: #ffbc55;
}
.editor-island-toolbar .island-delete.has-selection {
  background: #ffb84d;
  border-color: #ffcf6f;
  color: #30200b;
  box-shadow: 0 0 0 2px rgba(255,185,66,.17);
}
.editor-island-toolbar .island-delete.has-selection:hover {
  background: #ffd077;
}
/* Editable source mask is displayed alone in 2D during an editing session. */
body.mask-editing canvas#axial,
body.mask-editing canvas#coronal,
body.mask-editing canvas#sagittal { cursor: crosshair; }


/* DuoRefine branding */
.topbar .brand {
  --logo-width: 280px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  flex-shrink: 0;
}

/* Main logo */
.topbar .brand-logo {
  display: block;
  width: var(--logo-width);
  height: auto;
  object-fit: contain;
}

/* Subtitle aligned under DuoRefine text */
.topbar .brand-subtitle {
  display: block;
  margin-left: calc(var(--logo-width) * 0.38);
  margin-top: -8px;

  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: #94aeca;
  white-space: nowrap;
}

/* Smaller displays */
@media (max-width: 600px) {
  .topbar .brand {
    --logo-width: 180px;
  }

  .topbar .brand-subtitle {
    font-size: 10px;
  }
}

