:root {
  --bg: #fbfbfa;
  --sb: #f5f5f4;
  --s1: #ffffff;
  --s2: #f7f7f6;
  --s3: #f0efed;
  --b1: #e8e8e6;
  --b2: #d4d4d2;
  --tx: #0a0a0b;
  --t2: #4a4a50;
  --t3: #8a8a92;
  --t4: #b0b0b8;
  --search: #5e9c6f;
  --search-d: #527f5c;
  --read: #5e6ad2;
  --read-d: #4a55b8;
  --research: #8957c9;
  --result: #c07b3a;
  --insight: #c04e68;
  --writing: #3aa3a3;
  --t-out: 280ms;
  --t-in: 360ms;
  --gap: 140ms;
  --eaze: cubic-bezier(0.32, 0.72, 0, 1);
}

body.slow-mo {
  --t-out: 1120ms;
  --t-in: 1440ms;
  --gap: 560ms;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--tx);
  font-family: "Inter", -apple-system, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  font-size: 13px;
  letter-spacing: -0.006em;
  overflow: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: #d8d7d3;
  border-radius: 3px;
  border: 1px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
  background: #b8b7b3;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.hov:hover {
  background: rgba(0, 0, 0, 0.035) !important;
}

.hov-soft:hover {
  background: rgba(0, 0, 0, 0.02) !important;
}

.hov-row:hover {
  background: rgba(0, 0, 0, 0.025) !important;
}

.kbd {
  align-items: center;
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 3px;
  color: var(--t3);
  display: inline-flex;
  font-family: "Inter", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  height: 18px;
  justify-content: center;
  letter-spacing: 0;
  min-width: 18px;
  padding: 0 5px;
}

.btn-p,
.btn-s {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  gap: 6px;
  letter-spacing: -0.006em;
}

.btn-p {
  background: #18181b;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
}

.btn-p:hover {
  background: #26262b;
}

.btn-s {
  background: var(--s1);
  border: 1px solid var(--b1);
  color: var(--tx);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 11px;
}

.btn-s:hover {
  background: var(--s2);
  border-color: var(--b2);
}

.btn-ghost {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--t2);
  display: inline-flex;
  gap: 6px;
  letter-spacing: -0.006em;
  padding: 5px 7px;
}

.btn-ghost:hover {
  background: var(--s2);
  color: var(--tx);
}

.btn-ghost:focus-visible {
  outline: 2px solid rgba(94, 106, 210, 0.3);
  outline-offset: 1px;
}

.btn-p:disabled,
.btn-s:disabled,
.btn-ghost:disabled {
  cursor: progress;
  opacity: 0.6;
}

.tag {
  align-items: center;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 4px;
  color: var(--t2);
  display: inline-flex;
  font-size: 11px;
  font-weight: 500;
  gap: 4px;
  letter-spacing: -0.003em;
  padding: 1px 7px;
  white-space: nowrap;
}

.tag-dot {
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 5px;
  width: 5px;
}

.icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.icon svg {
  display: block;
  height: 100%;
  width: 100%;
}

.mono {
  font-family: "JetBrains Mono", monospace;
  font-feature-settings: normal;
}

.pulse {
  animation: pulse 1.5s infinite;
}

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.app-shell {
  background: var(--bg);
  display: flex;
  height: 100vh;
}

.desktop-sidebar {
  background: var(--sb);
  border-right: 1px solid var(--b1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 100vh;
  position: relative;
  transition: width 180ms ease;
  width: 232px;
}

.desktop-sidebar[data-collapsed="true"] {
  width: 56px;
}

.sidebar-section--collapse {
  border-bottom: none;
  border-top: 1px solid var(--b1);
  padding: 8px 12px 10px;
}

.sidebar-collapse-btn {
  color: var(--t3);
}

.sidebar-collapse-btn:hover {
  color: var(--tx);
}

.sidebar-collapse-btn .sidebar-action-label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.desktop-sidebar[data-collapsed="true"] .sidebar-section {
  padding: 10px 6px;
}

.desktop-sidebar[data-collapsed="true"] .sidebar-section--collapse {
  padding: 8px 6px 10px;
}

.desktop-sidebar[data-collapsed="true"] .brand-copy,
.desktop-sidebar[data-collapsed="true"] .sidebar-action-label,
.desktop-sidebar[data-collapsed="true"] .sidebar-label,
.desktop-sidebar[data-collapsed="true"] .project-item-label,
.desktop-sidebar[data-collapsed="true"] .workflow-stage-copy,
.desktop-sidebar[data-collapsed="true"] .kbd,
.desktop-sidebar[data-collapsed="true"] .workflow-side-actions,
.desktop-sidebar[data-collapsed="true"] .workspace-switch > .icon:last-child,
.desktop-sidebar[data-collapsed="true"] .sidebar-account > .icon:last-child {
  display: none;
}

.desktop-sidebar[data-collapsed="true"] .workspace-switch,
.desktop-sidebar[data-collapsed="true"] .sidebar-action,
.desktop-sidebar[data-collapsed="true"] .project-item,
.desktop-sidebar[data-collapsed="true"] .sidebar-account,
.desktop-sidebar[data-collapsed="true"] .workflow-stage-btn {
  gap: 0;
  justify-content: center;
  padding: 6px;
}

.desktop-sidebar[data-collapsed="true"] .workflow-toggle {
  display: none;
}

.desktop-sidebar[data-collapsed="true"] .project-swatch {
  height: 12px;
  width: 12px;
}

.desktop-sidebar[data-collapsed="true"] .workflow-item {
  justify-content: center;
}

.sidebar-section {
  border-bottom: 1px solid var(--b1);
  padding: 10px 12px;
}

.sidebar-section--scroll {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.sidebar-section--scroll .workflow-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 10px;
}

.workspace-switch,
.sidebar-action,
.project-item,
.workflow-stage-btn,
.sidebar-account {
  border: none;
  color: inherit;
  text-align: left;
  width: 100%;
}

.workspace-switch {
  align-items: center;
  background: transparent;
  border-radius: 6px;
  display: flex;
  gap: 9px;
  padding: 6px 8px;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #5e6ad2, #8b5cf6);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  letter-spacing: -0.02em;
  width: 24px;
}

.brand-copy {
  flex: 1;
  min-width: 0;
}

.brand-title {
  color: var(--tx);
  display: block;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  color: var(--t3);
  display: block;
  font-size: 10.5px;
  line-height: 1.35;
}

.sidebar-label {
  color: var(--t3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 8px 6px;
  text-transform: uppercase;
}

.sidebar-action {
  align-items: center;
  background: transparent;
  border-radius: 5px;
  color: var(--t3);
  display: flex;
  gap: 8px;
  margin-bottom: 3px;
  padding: 5px 8px;
}

.sidebar-action:last-child {
  margin-bottom: 0;
}

.sidebar-action-label {
  flex: 1;
  font-size: 12.5px;
  min-width: 0;
}

.project-list,
.workflow-list {
  display: grid;
  gap: 1px;
}

.workflow-list {
  align-content: start;
  grid-auto-rows: max-content;
}

.project-item {
  align-items: center;
  background: transparent;
  border-radius: 5px;
  display: flex;
  gap: 9px;
  padding: 5px 8px;
}

.project-item.is-active {
  background: rgba(0, 0, 0, 0.045);
}

.project-swatch {
  border-radius: 2px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}

.project-item-label {
  color: var(--t2);
  display: block;
  flex: 1;
  font-size: 12.5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-item.is-active .project-item-label {
  color: var(--tx);
  font-weight: 550;
}

.workflow-toggle {
  align-items: center;
  background: transparent;
  border: none;
  color: var(--t3);
  display: flex;
  justify-content: space-between;
  padding: 4px 8px 8px;
  width: 100%;
}

.workflow-item {
  align-items: center;
  background: transparent;
  border-radius: 5px;
  display: flex;
  gap: 1px;
  position: relative;
}

.workflow-item.is-active {
  background: rgba(0, 0, 0, 0.05);
}

.workflow-stage-btn {
  align-items: center;
  background: transparent;
  border-radius: 5px;
  display: flex;
  flex: 1;
  gap: 8px;
  min-width: 0;
  padding: 4px 6px;
}

.workflow-item.is-active .workflow-stage-btn {
  background: transparent;
}

.workflow-stage-icon {
  align-items: center;
  border-radius: 4px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.workflow-stage-copy {
  flex: 1;
  min-width: 0;
}

.workflow-stage-label {
  color: var(--t2);
  display: block;
  font-size: 11px;
  font-weight: 450;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

.workflow-item.is-active .workflow-stage-label {
  color: var(--tx);
  font-weight: 550;
}

.workflow-item .workflow-side-actions {
  opacity: 0;
  transition: opacity 120ms ease;
}

.workflow-item:hover .workflow-side-actions,
.workflow-item.is-active .workflow-side-actions,
.workflow-item.menu-open .workflow-side-actions {
  opacity: 1;
}

.workflow-side-actions {
  display: flex;
  gap: 1px;
  margin-left: 2px;
  position: relative;
}

.sidebar-icon-btn {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--t3);
  display: inline-flex;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.sidebar-icon-btn:hover {
  background: rgba(0, 0, 0, 0.045);
  color: var(--t2);
}

.sidebar-menu {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 15, 15, 0.08), 0 1px 3px rgba(15, 15, 15, 0.06);
  min-width: 156px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: 24px;
  z-index: 20;
}

.sidebar-menu-item {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--t2);
  display: flex;
  font-size: 12.5px;
  padding: 7px 8px;
  text-align: left;
  width: 100%;
}

.sidebar-menu-item:hover {
  background: var(--s2);
  color: var(--tx);
}

.sidebar-menu-divider {
  background: var(--b1);
  height: 1px;
  margin: 6px 2px;
}

.sidebar-account {
  align-items: center;
  background: transparent;
  border-radius: 5px;
  display: flex;
  gap: 9px;
  padding: 6px 8px;
}

.account-mark {
  align-items: center;
  background: #c7b299;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 600;
  height: 22px;
  justify-content: center;
  letter-spacing: -0.02em;
  width: 22px;
}

.account-name {
  color: var(--t2);
  display: block;
  font-size: 12px;
  font-weight: 500;
}

.account-plan {
  color: var(--t3);
  display: block;
  font-size: 10px;
}

.workspace {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.main-topbar {
  align-items: center;
  background: var(--s1);
  border-bottom: 1px solid var(--b1);
  display: flex;
  flex-shrink: 0;
  height: 44px;
  justify-content: space-between;
  padding: 0 20px;
}

.topbar-stage {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.topbar-stage-badge {
  align-items: center;
  border-radius: 5px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.topbar-stage-label {
  color: var(--tx);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.topbar-separator {
  color: var(--t4);
  font-size: 11.5px;
}

.topbar-breadcrumb {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.topbar-breadcrumb-bridge,
.topbar-crumb-separator {
  color: var(--t4);
  flex: 0 0 auto;
  font-size: 11px;
}

.topbar-crumb-link {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--t2);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 12px;
  margin: 0;
  padding: 2px 6px;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.topbar-crumb-link:hover {
  background: var(--s2);
  color: var(--tx);
}

.topbar-crumb-link:focus-visible {
  outline: 2px solid var(--read);
  outline-offset: 2px;
}

.topbar-crumb-current {
  color: var(--t2);
  flex: 1 1 auto;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.stage-wrap {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.search-stage,
.placeholder-stage {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.search-filters {
  background: var(--s2);
  border-right: 1px solid var(--b1);
  flex-shrink: 0;
  overflow: auto;
  padding: 16px 18px;
  width: 200px;
}

.filter-eyebrow,
.preview-eyebrow,
.placeholder-eyebrow,
.placeholder-card-label,
.agent-panel-eyebrow {
  color: var(--t3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filter-eyebrow {
  font-size: 11px;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.filter-group {
  margin-bottom: 16px;
}

.filter-group-title {
  color: var(--t3);
  font-size: 11px;
  margin-bottom: 6px;
}

.filter-check {
  align-items: center;
  color: var(--t2);
  cursor: pointer;
  display: flex;
  font-size: 12.5px;
  gap: 7px;
  padding: 3px 0;
}

.filter-check-box {
  align-items: center;
  background: transparent;
  border: 1.5px solid var(--b2);
  border-radius: 3px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  height: 13px;
  justify-content: center;
  width: 13px;
}

.filter-check.is-checked .filter-check-box {
  background: var(--tx);
  border-color: var(--tx);
}

.filter-range {
  accent-color: var(--tx);
  width: 100%;
}

.filter-range-value {
  color: var(--t2);
  font-size: 11px;
  margin-top: 3px;
}

.filter-divider {
  border-top: 1px solid var(--b1);
  margin-top: 6px;
  padding-top: 14px;
}

.library-metric {
  align-items: baseline;
  display: flex;
  gap: 5px;
}

.library-metric-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.library-metric-label {
  color: var(--t3);
  font-size: 11px;
}

.library-project-name {
  color: var(--t3);
  font-size: 11px;
  margin-top: 6px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.results-pane {
  background: var(--s1);
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.search-toolbar {
  background: var(--s1);
  border-bottom: 1px solid var(--b1);
  padding: 14px 20px 12px;
}

.search-form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.search-input {
  align-items: center;
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 6px;
  display: flex;
  flex: 1;
  gap: 8px;
  padding: 7px 11px;
}

.search-input input {
  background: transparent;
  border: none;
  color: var(--tx);
  flex: 1;
  font-size: 13px;
  min-width: 0;
  outline: none;
}

.search-input input::placeholder {
  color: var(--t3);
}

.search-meta {
  align-items: center;
  color: var(--t3);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 10px;
}

.search-meta strong {
  color: var(--t2);
  font-weight: 500;
}

.search-meta-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 10px;
}

.sort-select {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 6px;
  color: var(--t2);
  font-size: 12px;
  padding: 4px 8px;
}

.search-agent {
  align-items: center;
  color: var(--search);
  display: inline-flex;
  gap: 4px;
}

.search-agent-dot {
  background: var(--search);
  border-radius: 999px;
  display: inline-flex;
  height: 5px;
  width: 5px;
}

.notice {
  align-items: flex-start;
  background: rgba(192, 123, 58, 0.08);
  border: 1px solid rgba(192, 123, 58, 0.24);
  border-radius: 6px;
  color: var(--t2);
  display: flex;
  font-size: 12px;
  gap: 8px;
  line-height: 1.6;
  margin-top: 10px;
  padding: 10px 12px;
}

.results-list {
  background: var(--s1);
  flex: 1;
  overflow: auto;
}

.paper-row {
  align-items: center;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--b1);
  border-left: 2px solid transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  gap: 12px;
  padding: 11px 20px;
  text-align: left;
  width: 100%;
}

.paper-row.is-selected {
  background: rgba(94, 106, 210, 0.04);
  border-left-color: var(--read);
}

.paper-main {
  flex: 1;
  min-width: 0;
}

.paper-title {
  color: var(--tx);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.45;
  margin-bottom: 5px;
}

.paper-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.paper-authors {
  color: var(--t3);
  font-size: 11.5px;
}

.paper-meta-separator {
  color: var(--t4);
  font-size: 10px;
}

.paper-score {
  color: var(--t2);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.paper-row.is-selected .paper-score {
  color: var(--read);
}

.search-preview {
  background: var(--s1);
  border-left: 1px solid var(--b1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 300px;
}

.search-preview-header {
  border-bottom: 1px solid var(--b1);
  padding: 16px 18px;
}

.preview-eyebrow {
  margin-bottom: 8px;
}

.preview-title {
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 10px;
}

.search-preview-body {
  flex: 1;
  overflow: auto;
  padding: 14px 18px;
}

.preview-section {
  margin-bottom: 14px;
}

.preview-section-title {
  color: var(--t3);
  font-size: 11px;
  margin-bottom: 6px;
}

.preview-copy {
  color: var(--t2);
  font-size: 12.5px;
  line-height: 1.65;
}

.preview-point {
  align-items: center;
  color: var(--t2);
  display: flex;
  font-size: 12.5px;
  gap: 8px;
  padding: 3px 0;
}

.preview-card {
  align-items: center;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 6px;
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
}

.preview-card-value {
  color: var(--read);
  flex: 1;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-preview-footer {
  border-top: 1px solid var(--b1);
  display: flex;
  gap: 7px;
  padding: 12px 18px;
}

.search-preview-footer .btn-p,
.search-preview-footer .btn-s {
  flex: 1;
  justify-content: center;
}

.empty-state,
.loading-state {
  color: var(--t3);
  font-size: 12.5px;
  line-height: 1.65;
  padding: 16px 18px;
}

.placeholder-main {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 28px 32px;
}

.placeholder-main-inner {
  max-width: 720px;
}

.placeholder-eyebrow {
  margin-bottom: 8px;
}

.placeholder-title {
  color: var(--tx);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.placeholder-copy {
  color: var(--t2);
  font-size: 13px;
  line-height: 1.75;
  margin-bottom: 18px;
}

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

.placeholder-card {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 8px;
  padding: 16px 18px;
}

.placeholder-card-label {
  margin-bottom: 10px;
}

.placeholder-card h3 {
  color: var(--tx);
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.placeholder-card p {
  color: var(--t2);
  font-size: 12.5px;
  line-height: 1.65;
}

.placeholder-tint {
  border-radius: 8px;
  margin-top: 16px;
  padding: 16px 18px;
}

.placeholder-tint p {
  color: var(--t2);
  font-size: 12.5px;
  line-height: 1.7;
}

.agent-panel {
  background: var(--s1);
  border-left: 1px solid var(--b1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 300px;
}

.agent-panel-header {
  align-items: center;
  border-bottom: 1px solid var(--b1);
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
}

.agent-panel-status {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  font-size: 13px;
  font-weight: 550;
}

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

.agent-panel-section {
  border-left: 2px solid var(--b1);
  padding-left: 12px;
}

.agent-panel-section p {
  color: var(--t2);
  font-size: 12.5px;
  line-height: 1.6;
}

.agent-panel-metrics {
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 7px;
  padding: 12px 14px;
}

.agent-panel-metric-row {
  align-items: center;
  border-bottom: 1px solid var(--b1);
  display: flex;
  font-size: 11.5px;
  justify-content: space-between;
  padding: 4px 0;
}

.agent-panel-metric-row:last-child {
  border-bottom: none;
}

.agent-panel-footer {
  border-top: 1px solid var(--b1);
  padding: 12px 18px;
}

.agent-panel-footer .btn-p {
  justify-content: center;
  width: 100%;
}

.reading-stage {
  background: var(--bg);
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

.reading-empty {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 12px;
  margin: auto;
  max-width: 680px;
  padding: 28px 30px;
}

.reading-stage-home {
  overflow: visible;
}

.reading-home {
  padding: 24px 20px 40px;
}

.reading-home-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 auto;
  max-width: 1360px;
  width: 100%;
}

.reading-home-hero,
.search-home-hero {
  display: grid;
  gap: 12px;
}

.reading-home-label,
.search-home-label {
  align-items: center;
  display: inline-flex;
  font-size: 11px;
  font-weight: 650;
  gap: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.reading-home-label {
  color: var(--read);
}

.search-home-label {
  color: var(--search);
}

.reading-home-title,
.search-home-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
  white-space: nowrap;
}

.reading-home-copy,
.search-home-copy {
  color: var(--t2);
  font-size: 14px;
  line-height: 1.55;
  max-width: 72ch;
}

.reading-home-metrics {
  background: var(--b1);
  border: 1px solid var(--b1);
  border-radius: 10px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.reading-home-metric {
  background: var(--s1);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 88px;
  min-height: 94px;
  padding: 14px 16px;
}

.reading-home-metric-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-width: 0;
}

.reading-home-metric-label-row {
  align-items: center;
  color: var(--t2);
  display: flex;
  gap: 6px;
}

.reading-home-metric-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.reading-home-metric-label {
  color: var(--t3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.reading-home-metric-value {
  color: var(--tx);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.reading-home-metric-diagram {
  align-items: center;
  display: flex;
  justify-content: flex-end;
}

.reading-home-metric-svg {
  height: 42px;
  width: 88px;
}

.reading-home-metric-axis {
  stroke: var(--b1);
  stroke-width: 1;
}

.reading-home-metric-fill {
  fill: rgba(10, 10, 11, 0.08);
}

.reading-home-metric-line {
  fill: none;
  stroke: var(--tx);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.reading-home-band-stack {
  display: grid;
  gap: 6px;
  width: 88px;
}

.reading-home-band {
  background: var(--s3);
  border-radius: 999px;
  display: block;
  height: 7px;
  overflow: hidden;
}

.reading-home-band i {
  background: var(--read);
  border-radius: 999px;
  display: block;
  height: 100%;
}

.reading-home-bars {
  align-items: end;
  display: flex;
  gap: 4px;
  height: 34px;
  justify-content: flex-end;
  width: 88px;
}

.reading-home-bar {
  background: rgba(58, 163, 163, 0.28);
  border-radius: 3px;
  display: block;
  min-height: 8px;
  width: 8px;
}

.reading-home-bar.is-active {
  background: var(--result);
}

.reading-home-dot-grid {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(4, 1fr);
  width: 68px;
}

.reading-home-dot {
  background: rgba(94, 106, 210, 0.18);
  border-radius: 999px;
  height: 8px;
  width: 8px;
}

.reading-home-dot.is-active {
  background: var(--search);
}

.reading-home-content {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

.reading-home-content.is-resizable {
  grid-template-columns: minmax(0, 1fr) 12px minmax(360px, var(--reading-home-preview-w, 420px));
}

.reading-home-panel,
.reading-home-preview {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 10px;
  min-height: 0;
}

.reading-home-panel {
  min-width: 0;
  overflow: hidden;
}

.reading-home-panel-head {
  padding: 18px 20px 0;
}

.reading-home-panel-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reading-home-panel-kicker {
  color: var(--t3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reading-home-panel-title {
  color: var(--tx);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.reading-home-list-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 14px 20px 16px;
}

.reading-home-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.reading-home-filter-chip {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--t2);
  display: inline-flex;
  font-size: 11.5px;
  gap: 6px;
  padding: 4px 10px;
}

.reading-home-filter-chip:hover {
  background: var(--s2);
}

.reading-home-filter-chip.is-on {
  background: var(--s3);
  color: var(--tx);
  font-weight: 500;
}

.reading-home-filter-count {
  color: var(--t4);
  font-size: 10.5px;
}

.reading-home-tool-row {
  display: flex;
  gap: 8px;
}

.reading-home-tool-btn {
  align-items: center;
  background: transparent;
  border: 1px solid var(--b1);
  border-radius: 6px;
  color: var(--t2);
  display: inline-flex;
  font-size: 11.5px;
  gap: 5px;
  padding: 4px 10px;
}

.reading-home-tool-btn:hover {
  background: var(--s2);
}

.reading-home-table {
  border-top: 1px solid var(--b1);
  overflow: auto;
}

.reading-home-table-head,
.reading-home-row {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 1fr) 120px 80px 96px 116px 24px;
  min-width: 820px;
  padding: 13px 20px;
}

.reading-home-table-head {
  background: var(--bg);
  color: var(--t4);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  min-height: 34px;
  padding-top: 9px;
  padding-bottom: 9px;
  text-transform: uppercase;
}

.reading-home-row {
  background: transparent;
  border: none;
  border-top: 1px solid var(--b1);
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  min-height: 58px;
  text-align: left;
  transition: background 80ms ease;
  width: 100%;
}

.reading-home-row:hover {
  background: var(--s2);
}

.reading-home-row.is-selected {
  background: rgba(94, 106, 210, 0.04);
  box-shadow: inset 2px 0 0 var(--read);
}

.reading-home-row-main {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.reading-home-row-file {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 18px;
  justify-content: center;
  margin-top: 1px;
  width: 18px;
}

.reading-home-row-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.reading-home-row-title {
  color: var(--tx);
  font-weight: 550;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-home-row-authors {
  color: var(--t3);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-home-row-mobile-meta {
  display: none;
}

.reading-home-cell {
  color: var(--t2);
  font-size: 11.5px;
}

.reading-home-pdf-chip {
  align-items: center;
  color: var(--t4);
  display: inline-flex;
  font-size: 11px;
  gap: 5px;
}

.reading-home-pdf-chip.is-on {
  color: var(--search);
}

.reading-home-status-pill {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10.5px;
  gap: 5px;
  line-height: 1;
  padding: 4px 8px;
  white-space: nowrap;
}

.reading-home-status-pill .dot {
  background: currentColor;
  border-radius: 999px;
  display: inline-flex;
  height: 6px;
  width: 6px;
}

.reading-home-row-menu {
  align-items: center;
  color: var(--t4);
  display: inline-flex;
  justify-content: flex-end;
}

.reading-home-table-foot {
  align-items: center;
  background: var(--bg);
  border-top: 1px solid var(--b1);
  color: var(--t3);
  display: flex;
  font-size: 11.5px;
  justify-content: space-between;
  min-width: 820px;
  padding: 10px 20px;
}

.reading-home-table-empty,
.reading-home-empty {
  align-items: center;
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
}

.reading-home-table-empty {
  border: none;
  border-radius: 0;
  min-height: 280px;
}

.reading-home-empty-icon {
  align-items: center;
  background: rgba(94, 106, 210, 0.08);
  border-radius: 999px;
  display: inline-flex;
  height: 56px;
  justify-content: center;
  width: 56px;
}

.reading-home-empty-title {
  color: var(--tx);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-top: 16px;
}

.reading-home-empty-copy {
  color: var(--t2);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 8px;
  max-width: 42ch;
}

.reading-home-resizer-wrap {
  align-items: stretch;
  display: flex;
  justify-content: center;
}

.reading-home-resizer {
  background: transparent;
  border: none;
  cursor: col-resize;
  position: relative;
  width: 12px;
}

.reading-home-resizer::before {
  background: var(--b1);
  border-radius: 999px;
  content: "";
  inset: 24px 5px;
  position: absolute;
  transition: background 160ms ease;
}

.reading-home-resizer:hover::before,
.reading-home-resize-active .reading-home-resizer::before {
  background: var(--read);
}

body.reading-home-resize-active {
  cursor: col-resize;
  user-select: none;
}

.reading-home-preview {
  min-width: 0;
  overflow: hidden;
}

.reading-home-preview-scroll {
  max-height: calc(100vh - 172px);
  overflow: auto;
}

.reading-home-preview.is-desktop .reading-home-preview-scroll {
  max-height: clamp(360px, calc(100dvh - 300px), 640px);
  overscroll-behavior: contain;
}

.reading-home-preview-header,
.reading-home-preview-meta,
.reading-home-preview-icon-row,
.reading-home-preview-footer {
  align-items: center;
  display: flex;
}

.reading-home-preview-header {
  justify-content: space-between;
}

.reading-home-preview-meta,
.reading-home-preview-icon-row,
.reading-home-preview-footer {
  gap: 8px;
}

.reading-home-preview-badge {
  align-items: center;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 999px;
  color: var(--t2);
  display: inline-flex;
  font-size: 10.5px;
  gap: 5px;
  padding: 4px 8px;
  white-space: nowrap;
}

.reading-home-preview-icon,
.reading-home-preview-close {
  align-items: center;
  background: transparent;
  border: 1px solid var(--b1);
  border-radius: 8px;
  color: var(--t2);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.reading-home-preview-icon:hover,
.reading-home-preview-close:hover {
  background: var(--s2);
}

.reading-home-preview-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.62rem, 2.1vw, 2.18rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-top: 18px;
  max-width: none;
}

.reading-home-preview-authors {
  color: var(--t3);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 10px;
}

.reading-home-preview-cta {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) max-content;
  margin-top: 14px;
  width: 100%;
}

.reading-home-preview-cta .btn-p,
.reading-home-preview-cta .btn-s {
  justify-content: center;
}

.reading-home-preview-cta .btn-p {
  min-width: 0;
}

.reading-home-preview-cta .btn-s {
  white-space: nowrap;
}

.reading-home-preview-scroll {
  padding: 18px 18px 20px;
}

.reading-home-preview-section {
  margin-top: 20px;
}

.reading-home-preview-section-title,
.reading-home-preview-stat-label {
  color: var(--t3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reading-home-preview-copy {
  color: var(--t2);
  font-size: 13px;
  line-height: 1.65;
  margin-top: 8px;
}

.reading-home-preview-terms {
  margin-top: 8px;
}

.reading-home-preview-stat-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.reading-home-preview-stat {
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 74px;
  padding: 12px;
}

.reading-home-preview-stat-value {
  color: var(--tx);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.reading-home-preview-footer {
  margin-top: 22px;
}

.reading-home-preview-footer .btn-p,
.reading-home-preview-footer .btn-s {
  justify-content: center;
}

.reading-home-preview-footer .btn-p {
  flex: 1;
}

.reading-home-preview-overlay {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  visibility: hidden;
  z-index: 80;
}

.reading-home-preview-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.reading-home-preview-backdrop {
  background: rgba(17, 24, 28, 0.22);
  inset: 0;
  position: absolute;
}

.reading-home-preview-panel {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.reading-home-preview-surface {
  pointer-events: auto;
}

@media (max-width: 1279px) {
  .reading-home-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reading-home-preview-overlay.is-drawer .reading-home-preview-panel {
    display: flex;
    justify-content: flex-end;
    padding-left: 88px;
  }

  .reading-home-preview-overlay.is-drawer .reading-home-preview-surface {
    align-items: stretch;
    display: flex;
    justify-content: flex-end;
    padding: 20px 20px 20px 0;
    width: 100%;
  }

  .reading-home-preview.is-drawer {
    border-radius: 12px 0 0 12px;
    box-shadow: -20px 0 36px rgba(10, 10, 11, 0.12);
    height: 100%;
    width: min(420px, calc(100vw - 88px));
  }

  .reading-home-preview.is-drawer .reading-home-preview-scroll {
    max-height: 100%;
  }
}

.reading-metabar {
  align-items: center;
  background: var(--s1);
  border-bottom: 1px solid var(--b1);
  display: flex;
  flex-shrink: 0;
  gap: 14px;
  min-height: 58px;
  padding: 0 20px;
}

.reading-metabar-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.reading-metabar-title {
  color: var(--tx);
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.012em;
  max-width: 540px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-metabar-byline {
  align-items: center;
  color: var(--t3);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px;
  margin-top: 2px;
}

.reading-metabar-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
  position: relative;
}

.reading-context-trigger[aria-expanded="true"] {
  background: var(--s2);
  color: var(--tx);
}

.reading-context-menu {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(10, 10, 11, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
}

.reading-context-menu-item {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--t2);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 12px;
  gap: 8px;
  padding: 7px 8px;
  text-align: left;
  width: 100%;
}

.reading-context-menu-item:hover {
  background: var(--s2);
  color: var(--tx);
}

.reading-context-menu-divider {
  background: var(--b1);
  height: 1px;
  margin: 4px 2px;
}

.reading-shell-main {
  display: flex;
  flex: 1;
  min-height: 0;
}

.reading-icon-rail {
  align-items: center;
  background: var(--sb);
  border-right: 1px solid var(--b1);
  display: flex;
  flex: 0 0 56px;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  min-height: 0;
  overflow: hidden;
  padding: 10px 0;
  width: 56px;
}

.reading-rail-btn {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--t3);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 38px;
  justify-content: center;
  position: relative;
  width: 40px;
}

.reading-rail-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--t2);
}

.reading-rail-btn.is-active {
  background: rgba(94, 106, 210, 0.08);
  color: var(--read);
}

.reading-rail-btn.is-active::before {
  background: var(--read);
  border-radius: 1px;
  bottom: 9px;
  content: "";
  left: -10px;
  position: absolute;
  top: 9px;
  width: 2px;
}

.reading-rail-btn .lbl {
  font-size: 9.5px;
  letter-spacing: 0.01em;
}

.reading-rail-btn .badge {
  align-items: center;
  background: var(--read);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 8.5px;
  font-weight: 600;
  height: 12px;
  justify-content: center;
  min-width: 12px;
  padding: 0 4px;
  position: absolute;
  right: 3px;
  top: 3px;
}

.reading-small-label {
  font-size: 8.5px;
}

.reading-rail-divider {
  background: var(--b1);
  height: 1px;
  margin: 4px 0;
  width: 24px;
}

.reading-rail-spacer {
  flex: 1;
}

.reading-sidebar-flip svg {
  transform: scaleX(-1);
  transform-origin: center;
}

.reading-float-panel {
  animation: slideIn 140ms ease-out;
  background: var(--sb);
  border-right: 1px solid var(--b1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-width: 0;
  width: 264px;
}

.reading-float-panel.is-wide {
  width: 308px;
}

.reading-float-panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px 10px;
}

.reading-float-panel-title {
  align-items: center;
  display: flex;
  font-size: 13.5px;
  font-weight: 600;
  gap: 7px;
  letter-spacing: -0.012em;
}

.reading-float-panel-close {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.reading-float-panel-close:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--t2);
}

.reading-float-search {
  align-items: center;
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 6px;
  color: var(--t3);
  display: flex;
  font-size: 12px;
  gap: 7px;
  margin: 0 12px 10px;
  padding: 6px 10px;
}

.reading-float-search input {
  background: transparent;
  border: none;
  color: var(--tx);
  flex: 1;
  font-family: inherit;
  font-size: 12px;
  outline: none;
}

.reading-float-panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 8px 10px;
}

.reading-float-panel-body.is-overview {
  padding: 0;
}

.reading-float-section {
  padding: 0 12px 10px;
}

.reading-float-section + .reading-float-section {
  border-top: 1px solid var(--b1);
  margin-top: 2px;
  padding-top: 10px;
}

.reading-float-section-head {
  align-items: center;
  color: var(--t3);
  display: flex;
  font-size: 10.5px;
  font-weight: 600;
  gap: 6px;
  letter-spacing: 0.08em;
  padding: 2px 2px 8px;
  text-transform: uppercase;
}

.reading-float-section-head .count {
  color: var(--t4);
  margin-left: auto;
}

.reading-float-section-head .more {
  background: transparent;
  border: none;
  border-radius: 3px;
  color: var(--t3);
  cursor: pointer;
  font-size: 10.5px;
  margin-left: 4px;
  padding: 1px 5px;
}

.reading-float-section-head .more:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--t2);
}

.reading-lib-item {
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 2px;
  padding: 8px 10px;
  text-align: left;
}

.reading-lib-item:hover:not(.is-active) {
  background: rgba(0, 0, 0, 0.03);
}

.reading-lib-item.is-active {
  background: rgba(94, 106, 210, 0.06);
}

.reading-lib-title {
  color: var(--tx);
  display: -webkit-box;
  font-size: 12.2px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  letter-spacing: -0.008em;
  line-height: 1.35;
  overflow: hidden;
}

.reading-lib-meta {
  align-items: center;
  color: var(--t3);
  display: flex;
  font-size: 10.5px;
  gap: 5px;
}

.reading-lib-bar,
.reading-mini-progress {
  background: var(--s3);
  border-radius: 2px;
  height: 3px;
  margin-top: 3px;
  overflow: hidden;
}

.reading-lib-bar i,
.reading-mini-progress i {
  background: var(--read);
  display: block;
  height: 100%;
}

.reading-lib-status {
  align-items: center;
  color: var(--search);
  display: flex;
  font-size: 10.5px;
  gap: 4px;
}

.reading-outline-panel-meta {
  padding: 0 14px 12px;
}

.reading-outline-panel-label,
.reading-highlight-panel-label,
.reading-mini-label {
  color: var(--t3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reading-outline-panel-label {
  margin-bottom: 5px;
}

.reading-outline-progress {
  color: var(--read);
  font-size: 10.5px;
  font-weight: 600;
  margin-top: 4px;
}

.reading-outline-item,
.reading-highlight-item,
.reading-highlight-category-btn {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--t2);
  cursor: pointer;
  display: flex;
  font-size: 12.2px;
  gap: 8px;
  margin: 1px 0;
  padding: 6px 10px 6px 12px;
  text-align: left;
  width: 100%;
}

.reading-outline-item:hover:not(.is-active),
.reading-highlight-item:hover,
.reading-highlight-category-btn:hover {
  background: rgba(0, 0, 0, 0.03);
}

.reading-outline-item.is-active {
  background: rgba(94, 106, 210, 0.05);
  border-left: 2px solid var(--read);
  color: var(--tx);
  font-weight: 550;
  padding-left: 10px;
}

.reading-outline-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
}

.reading-outline-item .reading-outline-progress {
  color: var(--t4);
  margin-left: auto;
  margin-top: 0;
}

.reading-highlight-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.reading-highlight-chip {
  align-items: center;
  border: 1px solid var(--b1);
  border-radius: 4px;
  display: inline-flex;
  font-size: 10.5px;
  gap: 4px;
  padding: 2px 7px;
}

.reading-highlight-chip .dot {
  border-radius: 50%;
  display: inline-flex;
  height: 5px;
  width: 5px;
}

.reading-highlight-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.reading-highlight-text {
  color: var(--t2);
  display: -webkit-box;
  font-size: 11.2px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
  overflow: hidden;
}

.reading-highlight-page {
  color: var(--t4);
  font-size: 10px;
}

.reading-highlight-rail {
  align-self: stretch;
  border-radius: 1.5px;
  flex: 0 0 3px;
  min-height: 24px;
}

.reading-highlight-category-btn {
  padding-right: 6px;
}

.reading-highlight-category-btn .swatch {
  border-radius: 1.5px;
  flex: 0 0 10px;
  height: 3px;
}

.reading-highlight-category-btn .mono {
  color: var(--t4);
  margin-left: auto;
}

.reading-highlight-panel {
  padding: 0 12px 10px;
}

.reading-highlight-divider {
  background: var(--b1);
  height: 1px;
  margin: 10px 4px;
}

.reading-compact-empty {
  background: var(--s1);
  border: 1px dashed var(--b1);
  border-radius: 6px;
  color: var(--t3);
  font-size: 11.5px;
  line-height: 1.5;
  padding: 10px 12px;
}

.reading-split {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.reading-split.is-vertical {
  flex-direction: column;
}

.reading-pane {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.reading-doc-pane {
  position: relative;
}

.pane-hdr {
  align-items: center;
  background: var(--s1);
  border-bottom: 1px solid var(--b1);
  display: flex;
  flex-shrink: 0;
  gap: 2px;
  height: 42px;
  padding: 0 12px;
}

.pane-tab {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  font-size: 12.5px;
  font-weight: 500;
  gap: 6px;
  padding: 6px 11px;
  position: relative;
}

.pane-tab:hover {
  background: rgba(0, 0, 0, 0.028);
  color: var(--t2);
}

.pane-tab.active {
  color: var(--tx);
}

.pane-tab.active::after {
  background: var(--read);
  border-radius: 1px 1px 0 0;
  bottom: -11px;
  content: "";
  height: 2px;
  left: 8px;
  position: absolute;
  right: 8px;
}

.pane-actions {
  align-items: center;
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.pane-icon-btn {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.pane-icon-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--t2);
}

.pane-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
}

.reading-pane-dot {
  background: var(--read);
  border-radius: 50%;
  display: inline-flex;
  height: 5px;
  width: 5px;
}

.reading-pane-meta {
  color: var(--t4);
  font-size: 10.5px;
}

.reading-orient-group {
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 6px;
  display: inline-flex;
  margin-right: 2px;
  overflow: hidden;
}

.reading-orient-btn {
  align-items: center;
  background: transparent;
  border: none;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 26px;
}

.reading-orient-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--t2);
}

.reading-orient-btn.is-on {
  background: var(--s1);
  box-shadow: inset 0 0 0 1px rgba(94, 106, 210, 0.3);
  color: var(--read);
}

.reading-resize-handle {
  background: var(--b1);
  flex-shrink: 0;
  position: relative;
}

.reading-resize-handle.is-horizontal {
  cursor: col-resize;
  width: 5px;
}

.reading-resize-handle.is-vertical {
  cursor: row-resize;
  height: 5px;
}

.reading-resize-handle:hover {
  background: var(--read);
}

.reading-resize-handle.is-horizontal::after {
  background: var(--b2);
  border-radius: 1px;
  content: "";
  height: 22px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
}

.reading-resize-handle.is-vertical::after {
  background: var(--b2);
  border-radius: 1px;
  content: "";
  height: 1px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
}

.reading-resize-active {
  user-select: none;
}

.reading-pdf {
  align-items: center;
  background: #f4f3ef;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
  padding: 24px 28px;
}

.reading-pdf-page {
  aspect-ratio: 210 / 297;
  background: #fff;
  border: 1px solid var(--b1);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(15, 15, 15, 0.04), 0 1px 2px rgba(15, 15, 15, 0.03);
  color: #1a1a1d;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 10.8px;
  line-height: 1.6;
  max-width: 600px;
  padding: 46px 52px 36px;
  position: relative;
  width: 92%;
}

.reading-pdf-page h1 {
  color: #0a0a0b;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}

.reading-pdf-page h2 {
  font-size: 12px;
  font-weight: 700;
  margin: 12px 0 5px;
}

.reading-pdf-page p {
  hyphens: auto;
  margin-bottom: 9px;
  text-align: justify;
}

.reading-pdf-author {
  color: #3a3a3e;
  font-size: 10px;
  margin-bottom: 10px;
}

.reading-pdf-heading {
  font-size: 10.5px;
  font-weight: 700;
  margin: 8px 0 4px;
}

.reading-pdf-page-number {
  bottom: 18px;
  color: var(--t3);
  font-size: 9px;
  position: absolute;
  right: 22px;
}

.reading-pdf-separator {
  color: var(--t3);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.reading-pdf-viewer {
  background: #f4f3ef;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
}

.reading-pdf-unsupported-card {
  align-items: center;
  background: color-mix(in srgb, var(--result) 8%, var(--s1));
  border-bottom: 1px solid color-mix(in srgb, var(--result) 18%, var(--b1));
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 13px 14px;
}

.reading-pdf-unsupported-title {
  color: var(--tx);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.reading-pdf-unsupported-copy {
  color: var(--t2);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 3px;
}

.reading-pdf-unsupported-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.reading-pdf-canvas-root {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  padding: 28px 24px 128px;
  scroll-behavior: smooth;
}

.reading-pdf-viewer.has-selection-dock .reading-pdf-canvas-root {
  padding-bottom: 128px;
}

.reading-pdf-loading {
  color: var(--t3);
  font-size: 12px;
  padding: 48px 16px;
  text-align: center;
}

.reading-pdf-loading.is-error {
  color: var(--result);
}

.reading-pdf-canvas-page {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: none;
  outline: 0 solid transparent;
  outline-offset: 0;
  position: relative;
  transition: outline-color 180ms ease, outline-offset 180ms ease;
  width: max-content;
}

.reading-pdf-page-surface {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--b1), 0 12px 30px rgba(15, 15, 15, 0.06), 0 2px 8px rgba(15, 15, 15, 0.05);
  overflow: hidden;
  position: relative;
}

.reading-pdf-canvas-page.is-targeted {
  outline: 3px solid color-mix(in srgb, var(--read) 28%, transparent);
  outline-offset: 6px;
}

.reading-pdf-canvas {
  display: block;
  max-width: none;
}

.reading-pdf-dock-layer {
  --dock-surface: var(--s1);
  --dock-surface-hover: var(--s2);
  --dock-surface-active: var(--s3);
  --dock-text-primary: var(--tx);
  --dock-text-secondary: var(--t2);
  --dock-text-tertiary: var(--t3);
  --dock-text-disabled: var(--t4);
  --dock-accent: var(--read);
  --dock-accent-soft: color-mix(in srgb, var(--read) 12%, var(--s1));
  --dock-accent-softer: color-mix(in srgb, var(--read) 7%, var(--s1));
  --dock-border-subtle: rgba(15, 17, 23, 0.06);
  --dock-border-default: rgba(15, 17, 23, 0.09);
  --dock-border-strong: rgba(15, 17, 23, 0.14);
  --dock-shadow-md: 0 4px 12px -2px rgba(15, 17, 23, 0.09), 0 0 0 1px rgba(15, 17, 23, 0.06);
  --dock-shadow-lg: 0 12px 32px -4px rgba(15, 17, 23, 0.13), 0 2px 6px -1px rgba(15, 17, 23, 0.06), 0 0 0 1px rgba(15, 17, 23, 0.06);
  --dock-shadow: 0 8px 28px -4px rgba(15, 17, 23, 0.18), 0 2px 8px -1px rgba(15, 17, 23, 0.1), 0 0 0 1px rgba(15, 17, 23, 0.08);
  --dock-r-sm: 6px;
  --dock-r-md: 8px;
  --dock-r-xl: 12px;
  --dock-r-full: 9999px;
  align-items: center;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  left: 0;
  padding-bottom: 22px;
  pointer-events: none;
  position: absolute;
  right: 0;
  z-index: 40;
}

.reading-pdf-dock-layer .sel-chip {
  align-items: center;
  background: var(--dock-surface);
  border: 1px solid var(--dock-border-default);
  border-radius: var(--dock-r-full);
  box-shadow: var(--dock-shadow-md);
  cursor: default;
  display: flex;
  gap: 8px;
  max-width: min(440px, calc(100% - 32px));
  opacity: 0;
  padding: 5px 8px 5px 12px;
  pointer-events: auto;
  transform: translateY(6px) scale(0.97);
  transition: opacity 200ms cubic-bezier(0.16, 1, 0.3, 1), transform 300ms cubic-bezier(0.25, 1.1, 0.5, 1.1);
}

.reading-pdf-dock-layer .sel-chip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reading-pdf-dock-layer .sel-chip-icon {
  align-items: center;
  color: var(--dock-accent);
  display: flex;
  flex-shrink: 0;
}

.reading-pdf-dock-layer .sel-chip-text {
  color: var(--dock-text-secondary);
  flex: 1;
  font-size: 12px;
  font-style: italic;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-pdf-dock-layer .sel-chip-dismiss {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: var(--dock-r-full);
  color: var(--dock-text-tertiary);
  cursor: pointer;
  display: flex;
  flex-shrink: 0;
  height: 20px;
  justify-content: center;
  transition: background 120ms ease, color 120ms ease;
  width: 20px;
}

.reading-pdf-dock-layer .sel-chip-dismiss:hover {
  background: var(--dock-surface-active);
  color: var(--dock-text-primary);
}

.reading-pdf-dock-layer .pdf-dock {
  align-items: center;
  background: var(--dock-surface);
  border: 1px solid var(--dock-border-default);
  border-radius: var(--dock-r-full);
  box-shadow: var(--dock-shadow);
  display: flex;
  gap: 1px;
  max-width: calc(100% - 20px);
  overflow-x: auto;
  padding: 5px 6px;
  pointer-events: auto;
  scrollbar-width: none;
}

.reading-pdf-dock-layer .pdf-dock::-webkit-scrollbar {
  display: none;
}

.reading-pdf-dock-layer .dock-btn {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: var(--dock-r-full);
  color: var(--dock-text-secondary);
  cursor: pointer;
  display: flex;
  font-family: "Pretendard Variable", "Inter", -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  gap: 5px;
  height: 32px;
  justify-content: center;
  letter-spacing: -0.012em;
  min-width: 32px;
  padding: 0 9px;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.reading-pdf-dock-layer .dock-btn:hover {
  background: var(--dock-surface-hover);
  color: var(--dock-text-primary);
}

.reading-pdf-dock-layer .dock-btn:active {
  background: var(--dock-surface-active);
  transform: scale(0.95);
}

.reading-pdf-dock-layer .dock-btn.on {
  background: var(--dock-accent-softer);
  color: var(--dock-accent);
}

.reading-pdf-dock-layer .dock-btn.on:hover {
  background: var(--dock-accent-soft);
}

.reading-pdf-dock-layer .zoom-val {
  color: var(--dock-text-tertiary);
  font-family: ui-monospace, SFMono-Regular, Menlo, "JetBrains Mono", monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  min-width: 38px;
  text-align: center;
  user-select: none;
}

.reading-pdf-dock-layer .dock-div {
  background: var(--dock-border-default);
  flex-shrink: 0;
  height: 18px;
  margin: 0 3px;
  width: 1px;
}

.reading-pdf-dock-layer .dock-sel-group {
  align-items: center;
  display: flex;
  gap: 1px;
}

.reading-pdf-dock-layer .lbl-wrap {
  display: grid;
  grid-template-columns: 0fr;
  overflow: hidden;
  transition: grid-template-columns 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reading-pdf-dock-layer .lbl {
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 160ms ease;
  white-space: nowrap;
}

.reading-pdf-dock-layer.has-selection .lbl-wrap {
  grid-template-columns: 1fr;
}

.reading-pdf-dock-layer.has-selection .lbl {
  opacity: 1;
  transition: opacity 180ms ease 110ms;
}

.reading-pdf-dock-layer .dock-sel-group button:nth-of-type(1) .lbl-wrap {
  transition-delay: 0ms;
}

.reading-pdf-dock-layer .dock-sel-group button:nth-of-type(2) .lbl-wrap {
  transition-delay: 40ms;
}

.reading-pdf-dock-layer .dock-sel-group button:nth-of-type(3) .lbl-wrap {
  transition-delay: 80ms;
}

.reading-pdf-dock-layer .dock-btn-highlight {
  color: #8c6400;
}

.reading-pdf-dock-layer .dock-btn-highlight:hover {
  background: #fff7e0;
  color: #6b4c00;
}

.reading-pdf-dock-layer .dock-btn-note {
  color: var(--dock-accent);
}

.reading-pdf-dock-layer .dock-btn-note:hover {
  background: var(--dock-accent-softer);
  color: var(--dock-accent);
}

.reading-doc-pane > .popup-panel {
  background: var(--s1);
  border: 1px solid rgba(15, 17, 23, 0.09);
  border-radius: 12px;
  bottom: 76px;
  box-shadow: 0 12px 32px -4px rgba(15, 17, 23, 0.13), 0 2px 6px -1px rgba(15, 17, 23, 0.06), 0 0 0 1px rgba(15, 17, 23, 0.06);
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-50%) translateY(10px) scale(0.97);
  transition: opacity 200ms cubic-bezier(0.16, 1, 0.3, 1), transform 300ms cubic-bezier(0.25, 1.1, 0.5, 1.1);
  z-index: 39;
}

.reading-doc-pane > .popup-panel.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.reading-doc-pane .popup-header {
  border-bottom: 1px solid rgba(15, 17, 23, 0.06);
  color: var(--t4);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  padding: 10px 12px 8px;
  text-transform: uppercase;
}

.reading-doc-pane .toc-panel {
  padding: 0 0 6px;
  width: min(264px, calc(100% - 32px));
}

.reading-doc-pane .toc-item {
  align-items: baseline;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin: 0 6px;
  padding: 7px 12px;
  text-align: left;
  transition: background 120ms ease;
  width: calc(100% - 12px);
}

.reading-doc-pane .toc-item:hover {
  background: var(--s2);
}

.reading-doc-pane .toc-item.cur {
  background: color-mix(in srgb, var(--read) 7%, var(--s1));
}

.reading-doc-pane .toc-num {
  color: var(--t4);
  flex-shrink: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  min-width: 18px;
}

.reading-doc-pane .toc-title {
  color: var(--tx);
  font-size: 12.5px;
  line-height: 1.4;
}

.reading-doc-pane .toc-item.cur .toc-title {
  color: var(--read);
  font-weight: 500;
}

.reading-doc-pane .page-grid-panel {
  max-height: min(420px, calc(100% - 112px));
  overflow: auto;
  padding: 0 0 10px;
  width: min(340px, calc(100% - 32px));
}

.reading-doc-pane .page-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 10px;
}

.reading-doc-pane .page-grid-item {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 4px;
  transition: background 120ms ease;
}

.reading-doc-pane .page-grid-item:hover {
  background: var(--s2);
}

.reading-doc-pane .page-grid-item.cur {
  background: color-mix(in srgb, var(--read) 7%, var(--s1));
}

.reading-doc-pane .page-grid-thumb {
  background: #fff;
  border: 1px solid rgba(15, 17, 23, 0.09);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(15, 17, 23, 0.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 3px;
  height: 78px;
  overflow: hidden;
  padding: 7px 5px;
  width: 58px;
}

.reading-doc-pane .page-grid-item.cur .page-grid-thumb {
  border-color: color-mix(in srgb, var(--read) 68%, var(--b1));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--read) 18%, var(--s1)), 0 1px 3px rgba(15, 17, 23, 0.06);
}

.reading-doc-pane .pgl {
  background: var(--b2);
  border-radius: 1px;
  height: 2.5px;
}

.reading-doc-pane .page-grid-item.cur .pgl {
  background: color-mix(in srgb, var(--read) 32%, var(--b2));
}

.reading-doc-pane .page-grid-num {
  color: var(--t3);
  font-size: 11px;
  font-weight: 500;
}

.reading-doc-pane .page-grid-item.cur .page-grid-num {
  color: var(--read);
  font-weight: 600;
}

.reading-doc-pane .pgl-55 { width: 55%; }
.reading-doc-pane .pgl-60 { width: 60%; }
.reading-doc-pane .pgl-65 { width: 65%; }
.reading-doc-pane .pgl-70 { width: 70%; }
.reading-doc-pane .pgl-75 { width: 75%; }
.reading-doc-pane .pgl-80 { width: 80%; }
.reading-doc-pane .pgl-85 { width: 85%; }
.reading-doc-pane .pgl-90 { width: 90%; }
.reading-doc-pane .pgl-100 { width: 100%; }

.reading-pdf-canvas-meta {
  color: var(--t3);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.reading-summary-wrap {
  margin: 0 auto;
  max-width: 760px;
  padding: 28px 36px;
}

.reading-summary-block {
  margin-bottom: 24px;
}

.reading-summary-label {
  align-items: center;
  color: var(--t3);
  display: inline-flex;
  font-size: 10px;
  font-weight: 600;
  gap: 6px;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.reading-summary-body {
  color: var(--tx);
  font-size: 13px;
  line-height: 1.72;
}

.reading-provenance-pill {
  align-items: center;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 999px;
  color: var(--t3);
  display: inline-flex;
  font-size: 10.5px;
  gap: 6px;
  margin-top: 10px;
  max-width: 100%;
  padding: 3px 8px;
}

.reading-provenance-pill.is-chat {
  margin-top: 8px;
}

.reading-provenance-pill .mono {
  color: var(--t4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-summary-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  list-style: none;
}

.reading-summary-list li {
  align-items: flex-start;
  color: var(--t2);
  display: flex;
  font-size: 12.8px;
  gap: 10px;
  line-height: 1.6;
}

.reading-summary-list .bullet {
  border-radius: 50%;
  flex-shrink: 0;
  height: 5px;
  margin-top: 7px;
  width: 5px;
}

.reading-empty-view {
  align-items: center;
  color: var(--t3);
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  justify-content: center;
  padding: 56px 32px;
  text-align: center;
}

.reading-empty-icon {
  align-items: center;
  background: rgba(94, 106, 210, 0.08);
  border-radius: 14px;
  display: inline-flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.reading-empty-title {
  color: var(--tx);
  font-size: 14px;
  font-weight: 550;
}

.reading-empty-copy {
  font-size: 12.5px;
  line-height: 1.55;
  max-width: 340px;
}

.reading-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.reading-chat-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.reading-chat-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  padding: 16px 18px;
}

.reading-chat-warning {
  align-items: flex-start;
  background: rgba(192, 123, 58, 0.08);
  border: 1px solid rgba(192, 123, 58, 0.22);
  border-radius: 7px;
  color: var(--result);
  display: flex;
  font-size: 11.5px;
  gap: 8px;
  padding: 10px 12px;
}

.reading-bubble {
  display: flex;
  gap: 10px;
}

.reading-bubble.user {
  align-self: flex-end;
  max-width: 86%;
}

.reading-bubble.user .reading-bubble-content {
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 10px 10px 2px 10px;
  padding: 8px 12px;
}

.reading-bubble.assistant {
  max-width: 94%;
}

.reading-bubble-avatar {
  align-items: center;
  background: rgba(94, 106, 210, 0.1);
  border-radius: 6px;
  color: var(--read);
  display: inline-flex;
  flex-shrink: 0;
  height: 22px;
  justify-content: center;
  margin-top: 1px;
  width: 22px;
}

.reading-bubble-content {
  color: var(--tx);
  font-size: 12.8px;
  line-height: 1.6;
}

.reading-cite-row {
  margin-top: 4px;
}

.reading-cite {
  align-items: center;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 4px;
  color: var(--t2);
  cursor: pointer;
  display: inline-flex;
  font-size: 11px;
  gap: 5px;
  margin: 6px 4px 0 0;
  padding: 2px 7px;
}

.reading-cite:hover {
  background: var(--s3);
  color: var(--tx);
}

.reading-cite .dot {
  background: var(--read);
  border-radius: 50%;
  height: 4px;
  width: 4px;
}

.reading-chat-input {
  background: var(--s1);
  border-top: 1px solid var(--b1);
  padding: 10px 14px 12px;
}

.reading-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.reading-chat-selection-status {
  animation: readingSelectionGrowUp 260ms cubic-bezier(0.16, 1, 0.3, 1);
  background: color-mix(in srgb, var(--read) 7%, var(--s1));
  border: 1px solid color-mix(in srgb, var(--read) 22%, var(--b1));
  border-radius: 8px;
  color: var(--read);
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  overflow: hidden;
  padding: 7px 9px;
  transform-origin: bottom center;
}

.reading-chat-message-context {
  align-self: flex-end;
  margin-bottom: -8px;
  max-width: 86%;
  width: min(360px, 86%);
}

.reading-chat-selection-status.is-message-context {
  border-radius: 9px 9px 3px 9px;
  box-shadow: 0 8px 18px rgba(20, 20, 24, 0.04);
  margin-bottom: 0;
  transform-origin: bottom right;
}

@keyframes readingSelectionGrowUp {
  from {
    clip-path: inset(100% 0 0 0 round 8px);
    opacity: 0;
    transform: translateY(8px) scaleY(0.92);
  }

  to {
    clip-path: inset(0 0 0 0 round 8px);
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.reading-chat-selection-main {
  align-items: center;
  display: flex;
  font-size: 11.5px;
  font-weight: 600;
  gap: 6px;
  letter-spacing: -0.006em;
  min-width: 0;
}

.reading-chat-selection-page {
  color: var(--t3);
  font-size: 10.5px;
  font-weight: 500;
  margin-left: auto;
}

.reading-chat-selection-preview {
  color: var(--t2);
  font-size: 11.5px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-chip {
  align-items: center;
  background: rgba(94, 106, 210, 0.08);
  border: 1px solid rgba(94, 106, 210, 0.24);
  border-radius: 4px;
  color: var(--read);
  display: inline-flex;
  font-size: 10.5px;
  gap: 4px;
  padding: 2px 7px;
}

.reading-chip .x {
  cursor: pointer;
  opacity: 0.7;
}

.reading-chat-input-box {
  align-items: flex-end;
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  padding: 7px 9px;
}

.reading-chat-input-box textarea {
  background: transparent;
  border: none;
  color: var(--tx);
  flex: 1;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  max-height: 120px;
  outline: none;
  resize: none;
}

.reading-chat-send {
  align-items: center;
  background: var(--tx);
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.reading-chat-footer {
  color: var(--t4);
  display: flex;
  font-size: 10.5px;
  justify-content: space-between;
  margin-top: 6px;
}

.reading-notes-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
}

.reading-notes-toolbar {
  align-items: center;
  display: flex;
  gap: 6px;
}

.reading-notes-toolbar .reading-mini-label {
  flex: 1;
}

.reading-notes-research-btn {
  color: var(--research);
  font-size: 11.5px;
  margin-left: auto;
  padding: 3px 8px;
}

.reading-note-card {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
}

.reading-note-head {
  align-items: center;
  display: flex;
  gap: 6px;
}

.reading-note-page {
  background: transparent;
  border: none;
  color: var(--t3);
  cursor: pointer;
  font: inherit;
  margin-left: auto;
}

.reading-note-page:disabled {
  cursor: default;
}

.reading-cite {
  font: inherit;
}

.reading-cite:disabled {
  cursor: default;
  opacity: 0.65;
}

.reading-section-jump {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

.reading-section-jump:disabled {
  cursor: default;
}

.reading-note-quote {
  background: var(--s2);
  border-left: 2px solid var(--b2);
  border-radius: 3px;
  color: var(--t2);
  font-size: 11.8px;
  font-style: italic;
  line-height: 1.55;
  padding: 6px 10px;
}

.reading-note-editor {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 6px;
  color: var(--tx);
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.55;
  min-height: 88px;
  outline: none;
  padding: 9px 10px;
  resize: vertical;
}

.reading-note-editor:focus {
  border-color: rgba(94, 106, 210, 0.4);
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.08);
}

.reading-note-actions {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.reading-note-create {
  color: var(--t2);
  justify-content: center;
  padding: 7px 10px;
}

.reading-assets-wrap {
  padding: 14px 16px;
}

.reading-assets-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.reading-asset-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reading-asset-card {
  appearance: none;
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 7px;
  color: inherit;
  cursor: pointer;
  display: block;
  font: inherit;
  overflow: hidden;
  padding: 0;
  text-align: left;
  transition: border-color 120ms ease;
  width: 100%;
}

.reading-asset-card:hover {
  border-color: var(--b2);
}

.reading-asset-thumb {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: var(--s2);
  border-bottom: 1px solid var(--b1);
  color: var(--t4);
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 14px;
  position: relative;
}

.reading-asset-thumb-image {
  border-radius: 6px;
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.reading-asset-meta {
  padding: 7px 10px;
}

.reading-asset-kind {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reading-asset-caption {
  color: var(--tx);
  display: -webkit-box;
  font-size: 11.5px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.4;
  margin-top: 2px;
  overflow: hidden;
}

.reading-asset-page {
  color: var(--t4);
  font-size: 10px;
  margin-top: 2px;
}

.reading-asset-detail {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 10px;
  margin-top: 14px;
  overflow: hidden;
}

.reading-asset-detail-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--b1);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 16px;
}

.reading-asset-detail-kicker {
  color: var(--read);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.reading-asset-detail-title {
  color: var(--tx);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.35;
  margin: 4px 0 0;
}

.reading-asset-detail-close {
  align-items: center;
  background: transparent;
  border: 1px solid var(--b1);
  border-radius: 7px;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.reading-asset-detail-close:hover {
  background: var(--s2);
  color: var(--tx);
}

.reading-asset-detail-body {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(160px, 0.9fr) minmax(0, 1fr);
  padding: 14px 16px;
}

.reading-asset-detail-preview {
  align-items: center;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 170px;
  padding: 14px;
}

.reading-asset-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.reading-asset-detail-row {
  align-items: center;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 7px;
  color: var(--t3);
  display: flex;
  font-size: 11.5px;
  justify-content: space-between;
  padding: 9px 10px;
}

.reading-asset-detail-row strong {
  color: var(--tx);
  font-weight: 600;
}

.reading-asset-detail-table {
  border: 1px solid var(--b1);
  border-radius: 7px;
  overflow: hidden;
}

.reading-asset-detail-table-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reading-asset-detail-table-row + .reading-asset-detail-table-row {
  border-top: 1px solid var(--b1);
}

.reading-asset-detail-table-row span {
  color: var(--t2);
  font-size: 10.5px;
  overflow: hidden;
  padding: 6px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reading-asset-detail-actions {
  border-top: 1px solid var(--b1);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 16px;
}

.reading-asset-thumb-figure {
  align-items: flex-end;
  display: flex;
  gap: 10px;
  height: 82%;
  justify-content: center;
  position: relative;
  width: 82%;
}

.reading-asset-thumb-bar {
  background: rgba(94, 106, 210, 0.55);
  border-radius: 6px 6px 0 0;
  width: 18px;
}

.reading-asset-thumb-bar:nth-child(2) {
  background: rgba(94, 156, 111, 0.55);
}

.reading-asset-thumb-bar:nth-child(3) {
  background: rgba(192, 123, 58, 0.55);
}

.reading-asset-thumb-bar:nth-child(4) {
  background: rgba(137, 87, 201, 0.55);
}

.reading-asset-thumb-axis {
  background: var(--t3);
  bottom: 2px;
  height: 1px;
  left: 8%;
  position: absolute;
  right: 8%;
}

.reading-asset-thumb-table {
  border: 1px solid var(--t3);
  color: #1a1a1d;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 9px;
  width: 86%;
}

.reading-asset-thumb-table-head,
.reading-asset-thumb-table-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.75fr;
}

.reading-asset-thumb-table-head {
  border-bottom: 1px solid #0a0a0b;
  font-weight: 700;
  padding: 3px 5px;
}

.reading-asset-thumb-table-row {
  border-bottom: 1px solid var(--b1);
  padding: 3px 5px;
}

.reading-asset-thumb-table-row:last-child {
  border-bottom: none;
}

.reading-wb-strip {
  align-items: center;
  background: var(--sb);
  border-left: 1px solid var(--b1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  padding: 10px 0;
  width: 42px;
}

.reading-wb-strip .reading-rail-btn {
  height: 34px;
  width: 32px;
}

.bottom-nav {
  display: none;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 1180px) {
  .reading-metabar {
    align-items: center;
    min-height: auto;
    padding: 12px 16px;
  }

  .reading-metabar-actions {
    margin-left: auto;
    width: auto;
  }

  .reading-metabar-title {
    max-width: none;
  }
}

@media (max-width: 900px) {
  .reading-shell-main {
    flex-direction: column;
  }

  .reading-icon-rail {
    border-bottom: 1px solid var(--b1);
    border-right: none;
    flex: 0 0 auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    width: 100%;
  }

  .reading-rail-btn {
    flex: 0 0 40px;
  }

  .reading-rail-btn.is-active::before {
    bottom: -8px;
    height: 2px;
    left: 10px;
    right: 10px;
    top: auto;
    width: auto;
  }

  .reading-rail-divider {
    height: 24px;
    margin: 0 4px;
    width: 1px;
  }

  .reading-float-panel,
  .reading-float-panel.is-wide {
    border-bottom: 1px solid var(--b1);
    border-right: none;
    max-height: 40vh;
    width: 100%;
  }

  .reading-split {
    flex-direction: column;
  }

  .reading-doc-pane,
  .reading-workbench-pane {
    flex: 1 1 auto !important;
    min-height: 420px;
  }

  .reading-resize-handle {
    display: none;
  }

  .reading-wb-strip {
    border-left: none;
    border-top: 1px solid var(--b1);
    flex-direction: row;
    overflow-x: auto;
    padding: 8px 10px;
    width: 100%;
  }

  .reading-wb-strip .reading-rail-btn:last-child {
    margin-left: auto;
  }

  .reading-pdf {
    padding: 18px 14px;
  }

  .reading-pdf-page {
    max-width: none;
    padding: 28px 24px 26px;
    width: 100%;
  }

  .reading-summary-wrap {
    padding: 22px 20px;
  }

  .reading-asset-grid {
    grid-template-columns: 1fr;
  }

  .reading-asset-detail-body {
    grid-template-columns: 1fr;
  }

  .reading-asset-detail-actions {
    flex-direction: column;
  }

  .reading-asset-detail-actions .btn-p,
  .reading-asset-detail-actions .btn-s {
    justify-content: center;
    width: 100%;
  }

  .reading-chat-footer {
    flex-direction: column;
    gap: 4px;
  }
}
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: 100vh;
  }

  .desktop-sidebar {
    display: none;
  }

  .workspace {
    min-height: 100vh;
  }

  .main-topbar {
    padding: 0 14px;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .topbar-actions {
    display: none;
  }

  .stage-wrap {
    overflow: visible;
  }

  .search-stage,
  .placeholder-stage,
  .reading-stage {
    flex-direction: column;
    min-height: auto;
  }

  .search-filters,
  .search-preview,
  .agent-panel,
  .reading-rail,
  .reader-agent-panel {
    border-left: none;
    border-right: none;
    width: 100%;
  }

  .search-filters {
    border-bottom: 1px solid var(--b1);
  }

  .search-preview,
  .agent-panel,
  .reader-agent-panel {
    border-top: 1px solid var(--b1);
  }

  .reading-main {
    overflow: visible;
    padding: 18px;
  }

  .reading-hero {
    flex-direction: column;
  }

  .reading-hero-meta {
    align-items: flex-start;
  }

  .reading-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .reading-rail-card {
    padding: 16px 18px 12px;
  }

  .reading-session-list {
    overflow: visible;
  }

  .search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .search-meta-row {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-select {
    width: 100%;
  }

  .placeholder-main {
    padding: 24px 18px 12px;
  }

  .placeholder-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bottom-nav {
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid var(--b1);
    bottom: 0;
    display: grid;
    gap: 0.25rem;
    grid-template-columns: repeat(6, 1fr);
    left: 0;
    padding: 0.5rem 0.55rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    position: sticky;
    right: 0;
    z-index: 30;
  }

  .bottom-nav button {
    align-content: center;
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--t3);
    display: grid;
    gap: 0.2rem;
    justify-items: center;
    min-height: 52px;
    padding: 6px 2px;
  }

  .bottom-nav button span {
    font-size: 9.5px;
  }

  .bottom-nav button.is-active {
    background: var(--stage-tint);
    color: var(--tx);
  }

  .bottom-nav button.is-active .icon {
    color: var(--stage-color);
  }

  .workspace {
    padding-bottom: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pingRing {
  0% {
    opacity: 0.9;
    transform: scale(0.6);
  }

  80%,
  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.main-topbar .btn-s {
  font-size: 11.5px;
  padding: 3px 8px;
}

.btn-g {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--t2);
  display: inline-flex;
  gap: 6px;
  letter-spacing: -0.006em;
  padding: 5px 10px;
}

.btn-g:hover {
  background: var(--s2);
  color: var(--tx);
}

.results-pane-focal {
  background: var(--s1);
}

.hero-wrap {
  background: linear-gradient(180deg, rgba(94, 156, 111, 0.04) 0%, rgba(94, 156, 111, 0) 100%);
  border-bottom: 1px solid var(--b1);
  padding: 20px 32px 18px;
  position: relative;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.hero-meta-scope {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.scope-empty {
  color: var(--t4);
  font-size: 11.5px;
  font-style: italic;
  margin-right: 4px;
}

.scope-chip {
  align-items: center;
  background: #fff;
  border: 1px solid var(--b1);
  border-radius: 999px;
  color: var(--t2);
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 500;
  gap: 5px;
  padding: 3px 4px 3px 8px;
}

.scope-chip-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scope-chip-label {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-chip .x-btn,
.filter-scope-chip .x {
  align-items: center;
  background: transparent;
  border: none;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
}

.scope-chip .x-btn {
  border-radius: 50%;
  height: 16px;
  width: 16px;
}

.scope-chip .x-btn:hover,
.filter-scope-chip .x:hover {
  background: var(--s2);
  color: var(--tx);
}

.scope-add {
  align-items: center;
  background: transparent;
  border: 1px dashed var(--b2);
  border-radius: 999px;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 500;
  gap: 4px;
  padding: 3px 9px;
}

.scope-add:hover {
  background: var(--s2);
  border-color: var(--t3);
  color: var(--tx);
}

.hero-input {
  align-items: center;
  background: #fff;
  border: 1px solid var(--b1);
  border-radius: 999px;
  display: flex;
  gap: 10px;
  padding: 6px 6px 6px 18px;
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.hero-lead-icon {
  color: var(--t3);
  display: inline-flex;
  flex-shrink: 0;
}

.hero-input input {
  background: transparent;
  border: none;
  color: var(--tx);
  flex: 1;
  font-size: 15px;
  letter-spacing: -0.012em;
  min-width: 0;
  outline: none;
  padding: 4px 0;
}

.hero-input input::placeholder {
  color: var(--t4);
}

.hero-submit {
  align-items: stretch;
  border-radius: 999px;
  display: inline-flex;
  flex-shrink: 0;
  gap: 3px;
  padding: 3px;
  transition: background 260ms ease;
}

.hero-submit-btn {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  gap: 0;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0;
  transition:
    background 240ms ease,
    box-shadow 240ms ease,
    color 200ms ease,
    min-width 280ms cubic-bezier(0.4, 0, 0.2, 1),
    padding 280ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.hero-submit-btn:hover:not(.active):not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
  color: var(--tx);
}

.hero-submit-btn:disabled {
  cursor: progress;
  opacity: 0.6;
}

.hero-submit-btn .expand {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  padding-left: 0;
  transition: max-width 280ms ease, opacity 200ms ease, padding-left 280ms ease;
  white-space: nowrap;
}

.hero-submit-btn.active .expand {
  max-width: 140px;
  opacity: 1;
  padding-left: 6px;
}

.hero-submit-btn .go {
  align-items: center;
  display: inline-flex;
}

.hero-submit-label {
  font-size: 13px;
  font-weight: 550;
}

.hero-submit-label-mobile {
  display: none;
}

/* Agent (scout) mode — green theming */
.hero-input.scout {
  border-color: rgba(94, 156, 111, 0.32);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), 0 8px 28px rgba(94, 156, 111, 0.08);
}

.hero-input.scout:focus-within {
  border-color: var(--search);
  box-shadow: 0 0 0 3px rgba(94, 156, 111, 0.14), 0 8px 28px rgba(94, 156, 111, 0.1);
}

.hero-input.scout .hero-submit {
  background: rgba(94, 156, 111, 0.1);
}

.hero-input.scout .hero-submit-btn[data-mode="scout"].active {
  background: var(--search);
  box-shadow: 0 1px 2px rgba(94, 156, 111, 0.28), 0 2px 10px rgba(94, 156, 111, 0.25);
  color: #fff;
  font-weight: 600;
  padding: 7px 10px 7px 10px;
}

.hero-input.scout .hero-submit-btn[data-mode="scout"].active:hover:not(:disabled) {
  background: var(--search-d);
}

/* Keyword mode — indigo theming */
.hero-input.keyword {
  border-color: rgba(94, 106, 210, 0.28);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), 0 8px 28px rgba(94, 106, 210, 0.07);
}

.hero-input.keyword:focus-within {
  border-color: var(--read);
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.14), 0 8px 28px rgba(94, 106, 210, 0.09);
}

.hero-input.keyword .hero-submit {
  background: rgba(94, 106, 210, 0.1);
}

.hero-input.keyword .hero-submit-btn[data-mode="keyword"].active {
  background: var(--read);
  box-shadow: 0 1px 2px rgba(94, 106, 210, 0.28), 0 2px 10px rgba(94, 106, 210, 0.25);
  color: #fff;
  font-weight: 600;
  padding: 7px 10px 7px 10px;
}

.hero-input.keyword .hero-submit-btn[data-mode="keyword"].active:hover:not(:disabled) {
  background: var(--read-d);
}

.pd {
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.pd::after {
  animation: pingRing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  background: inherit;
  border-radius: 50%;
  content: "";
  inset: 0;
  position: absolute;
}

.reasoning-line {
  align-items: center;
  color: var(--t3);
  display: inline-flex;
  font-family: "JetBrains Mono", monospace;
  font-feature-settings: normal;
  font-size: 10.5px;
  gap: 6px;
  letter-spacing: 0;
  line-height: 1.6;
}

.search-filters-focal {
  background: var(--s2);
  border-right: 1px solid var(--b1);
  overflow: auto;
  padding: 12px 14px 20px;
  position: relative;
  width: 208px;
}

.search-filters-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.search-filter-section {
  border-top: 1px solid var(--b1);
  margin-top: 12px;
  padding-top: 12px;
}

.search-filter-section:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.sec-hdr {
  align-items: center;
  background: transparent;
  border: none;
  color: var(--t3);
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 600;
  justify-content: space-between;
  letter-spacing: 0.05em;
  padding: 0;
  text-transform: uppercase;
  user-select: none;
  width: 100%;
}

.sec-hdr:hover {
  color: var(--t2);
}

.sec-hdr-copy {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.filter-count {
  color: var(--search);
  font-size: 10px;
  font-weight: 600;
}

.sec-body {
  margin-top: 8px;
  overflow: hidden;
}

.sec-body.closed {
  display: none;
}

.filter-scope-type {
  margin-bottom: 10px;
}

.filter-scope-type:last-child {
  margin-bottom: 0;
}

.filter-scope-type-hdr {
  align-items: center;
  color: var(--t3);
  display: flex;
  font-size: 11px;
  gap: 6px;
  margin-bottom: 5px;
}

.filter-scope-type-hdr span:first-of-type {
  color: var(--t2);
  font-weight: 500;
}

.filter-scope-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.filter-scope-chip {
  align-items: center;
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 5px;
  color: var(--t2);
  display: inline-flex;
  font-size: 11px;
  gap: 5px;
  margin: 2px 3px 2px 0;
  padding: 3px 4px 3px 7px;
}

.filter-scope-chip-label {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-scope-chip .x {
  border-radius: 3px;
  height: 14px;
  width: 14px;
}

.filter-option {
  align-items: center;
  color: var(--t2);
  cursor: pointer;
  display: flex;
  font-size: 12.5px;
  gap: 7px;
  padding: 3px 0;
}

.filter-option-box {
  align-items: center;
  background: transparent;
  border: 1.5px solid var(--b2);
  border-radius: 3px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  height: 13px;
  justify-content: center;
  width: 13px;
}

.filter-option.is-checked .filter-option-box {
  background: var(--tx);
  border-color: var(--tx);
}

.filter-option-dot {
  border-radius: 50%;
  flex: 0 0 auto;
  height: 6px;
  width: 6px;
}

.filter-library-card {
  margin-top: 12px;
  padding-top: 12px;
}

.filter-library-tags {
  margin-top: 8px;
}

.compact-empty {
  padding: 6px 0;
}

.collapsed-strip-divider {
  background: var(--b1);
  height: 1px;
  margin: 4px 0;
  width: 20px;
}

.sidebar-collapsed-strip,
.preview-collapsed-strip {
  align-items: center;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  padding: 10px 0;
  width: 40px;
}

.sidebar-collapsed-strip {
  background: var(--s2);
  border-right: 1px solid var(--b1);
}

.preview-collapsed-strip {
  background: var(--s1);
  border-left: 1px solid var(--b1);
}

.panel-toggle-btn {
  align-items: center;
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 5px;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  flex-shrink: 0;
  height: 24px;
  justify-content: center;
  transition: background 120ms ease, color 120ms ease;
  width: 24px;
}

.panel-toggle-btn:hover {
  background: var(--s2);
  border-color: var(--b2);
  color: var(--t2);
}

.results-list {
  flex: 1;
  overflow: auto;
  padding: 18px 32px 40px;
}

.results-list-inner {
  margin: 0 auto;
  max-width: 760px;
}

.results-summary-row {
  align-items: baseline;
  border-bottom: 1px solid var(--b1);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.results-summary-copy {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.results-summary-count {
  color: var(--tx);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.results-summary-sub {
  color: var(--t3);
  font-size: 11.5px;
}

.results-summary-actions {
  display: flex;
  gap: 6px;
}

.results-summary-btn {
  font-size: 11.5px;
  padding: 4px 8px;
}

.paper-row {
  animation: fadeIn 180ms ease;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--b1);
  color: inherit;
  cursor: pointer;
  display: flex;
  gap: 14px;
  padding: 14px 0;
  text-align: left;
  width: 100%;
}

.paper-row:hover {
  background: transparent;
}

.paper-row.is-selected {
  background: transparent;
}

.paper-venue-bar {
  align-self: stretch;
  border-radius: 2px;
  flex: 0 0 auto;
  width: 4px;
}

.paper-content {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.paper-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.paper-title {
  color: var(--tx);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-bottom: 5px;
}

.paper-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.paper-authors {
  color: var(--t2);
  font-size: 12px;
  font-weight: 500;
}

.paper-year {
  color: var(--t3);
  font-size: 12px;
}

.paper-meta-separator {
  color: var(--t4);
  font-size: 10px;
}

.paper-cites {
  align-items: center;
  color: var(--t3);
  display: inline-flex;
  font-size: 11.5px;
  gap: 3px;
}

.paper-summary {
  color: var(--t2);
  display: block;
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 6px;
}

.paper-reasoning {
  font-size: 11px;
}

.paper-score-wrap {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  width: 80px;
}

.paper-score {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.paper-relevance-bar {
  background: var(--s3);
  border-radius: 999px;
  display: block;
  height: 3px;
  overflow: hidden;
  width: 68px;
}

.paper-relevance-bar-fill {
  display: block;
  height: 100%;
}

.paper-score-label {
  color: var(--t3);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-preview-focal {
  background: var(--s1);
  border-left: 1px solid var(--b1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 300px;
}

.preview-backdrop {
  display: none;
}

.preview-close-mobile {
  display: none;
}

.search-preview-header-focal {
  align-items: flex-start;
  border-bottom: 1px solid var(--b1);
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}

.preview-heading {
  flex: 1;
  min-width: 0;
}

.search-preview-body {
  flex: 1;
  overflow: auto;
  padding: 14px 16px;
}

.search-preview-empty {
  padding: 16px;
}

.preview-reasoning-line {
  font-size: 11.5px;
}

.search-preview-footer {
  border-top: 1px solid var(--b1);
  display: flex;
  gap: 7px;
  padding: 12px 16px;
}

.search-preview-footer .btn-p,
.search-preview-footer .btn-s {
  flex: 1;
  justify-content: center;
}

.search-results-empty {
  padding: 22px 0;
}

.popover {
  animation: slideDown 140ms ease;
  background: #fff;
  border: 1px solid var(--b1);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(10, 10, 11, 0.09), 0 2px 6px rgba(10, 10, 11, 0.05);
  padding: 10px;
  width: 360px;
  z-index: 80;
}

.popover-search {
  align-items: center;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 7px;
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  padding: 7px 10px;
}

.popover-search input {
  background: transparent;
  border: none;
  flex: 1;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.popover-tabs {
  border-bottom: 1px solid var(--b1);
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
}

.popover-tab {
  align-items: center;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  gap: 5px;
  justify-content: center;
  letter-spacing: -0.008em;
  padding: 7px 10px;
}

.popover-tab.active {
  border-bottom-color: var(--tx);
  color: var(--tx);
  font-weight: 600;
}

.popover-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 260px;
  overflow: auto;
}

.popover-section {
  color: var(--t3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 8px 4px;
  text-transform: uppercase;
}

.popover-section-recent {
  margin-top: 4px;
}

.popover-item {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 7px 8px;
  text-align: left;
  width: 100%;
}

.popover-item:hover {
  background: var(--s2);
}

.popover-item.active {
  background: var(--s2);
  cursor: default;
}

.popover-item-copy {
  flex: 1;
  min-width: 0;
}

.popover-item-title {
  color: var(--tx);
  font-size: 12.5px;
  font-weight: 500;
}

.popover-item-meta {
  color: var(--t3);
  font-size: 10.5px;
  margin-top: 1px;
}

.popover-empty {
  color: var(--t3);
  font-size: 12px;
  padding: 22px 12px;
  text-align: center;
}

.popover-footer {
  align-items: center;
  border-top: 1px solid var(--b1);
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
}

.popover-tip {
  color: var(--t3);
  font-size: 10.5px;
}

.popover-footer-spacer {
  flex: 1;
}

.popover-close-btn {
  font-size: 11.5px;
  padding: 3px 8px;
}

.search-stage-dashboard {
  background: var(--bg);
  display: block;
  overflow: hidden;
  position: relative;
}

.search-dashboard {
  margin: 0 auto;
  max-width: 1240px;
  padding: 26px 32px 80px;
}

.dashboard-hero-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
  width: 100%;
}

.dashboard-hero {
  align-self: center;
  align-items: center;
  background: #fff;
  border: 1px solid var(--b1);
  border-radius: 999px;
  display: flex;
  gap: 10px;
  padding: 6px 6px 6px 18px;
  transition: border-color 220ms ease, box-shadow 220ms ease;
  width: min(680px, 100%);
}

.dashboard-hero input {
  background: transparent;
  border: 0;
  color: var(--tx);
  flex: 1;
  font-family: inherit;
  font-size: 15px;
  min-width: 0;
  outline: 0;
  padding: 4px 0;
}

.dashboard-hero input::placeholder {
  color: var(--t4);
}

.dashboard-lead-icon {
  color: var(--t3);
  display: inline-flex;
  flex-shrink: 0;
}

.dashboard-hero.scout {
  border-color: rgba(94, 156, 111, 0.32);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), 0 8px 28px rgba(94, 156, 111, 0.08);
}

.dashboard-hero.scout:focus-within {
  border-color: var(--search);
  box-shadow: 0 0 0 3px rgba(94, 156, 111, 0.14), 0 8px 28px rgba(94, 156, 111, 0.1);
}

.dashboard-hero.keyword {
  border-color: rgba(94, 106, 210, 0.28);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), 0 8px 28px rgba(94, 106, 210, 0.07);
}

.dashboard-hero.keyword:focus-within {
  border-color: var(--read);
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.14), 0 8px 28px rgba(94, 106, 210, 0.09);
}

.dashboard-submit {
  border-radius: 999px;
  display: inline-flex;
  flex-shrink: 0;
  gap: 3px;
  padding: 3px;
  transition: background 260ms ease;
}

.dashboard-hero.scout .dashboard-submit {
  background: rgba(94, 156, 111, 0.1);
}

.dashboard-hero.keyword .dashboard-submit {
  background: rgba(94, 106, 210, 0.1);
}

.dashboard-sbtn {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0;
  transition:
    background 240ms ease,
    box-shadow 240ms ease,
    color 200ms ease,
    min-width 280ms cubic-bezier(0.4, 0, 0.2, 1),
    padding 280ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.dashboard-sbtn:hover:not(.active):not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
  color: var(--tx);
}

.dashboard-sbtn:disabled {
  cursor: progress;
  opacity: 0.7;
}

.dashboard-sbtn-copy {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  padding-left: 0;
  transition: max-width 280ms ease, opacity 200ms ease, padding-left 280ms ease;
  white-space: nowrap;
}

.dashboard-sbtn.active .dashboard-sbtn-copy {
  max-width: 140px;
  opacity: 1;
  padding-left: 6px;
}

.dashboard-sbtn[data-mode="scout"].active {
  background: var(--search);
  box-shadow: 0 1px 2px rgba(94, 156, 111, 0.28), 0 2px 10px rgba(94, 156, 111, 0.25);
  color: #fff;
  font-weight: 600;
  padding: 7px 10px;
}

.dashboard-sbtn[data-mode="scout"].active:hover:not(:disabled) {
  background: var(--search-d);
}

.dashboard-sbtn[data-mode="keyword"].active {
  background: var(--read);
  box-shadow: 0 1px 2px rgba(94, 106, 210, 0.28), 0 2px 10px rgba(94, 106, 210, 0.25);
  color: #fff;
  font-weight: 600;
  padding: 7px 10px;
}

.dashboard-sbtn[data-mode="keyword"].active:hover:not(:disabled) {
  background: var(--read-d);
}

body.is-pressed .dashboard-sbtn.active[data-mode="scout"] {
  animation: aresAgentRingout 700ms var(--eaze);
}

.dashboard-hero.is-invalid {
  animation: aresAgentShake 260ms ease;
  border-color: var(--search);
}

.search-agentic-entry .stage-home,
.search-agentic-entry .stage-run {
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: absolute;
}

.search-agentic-entry .stage-home {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--t-out) ease,
    transform var(--t-out) var(--eaze);
}

.search-agentic-entry .stage-run {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity var(--t-in) ease,
    transform var(--t-in) var(--eaze);
}

body.is-run .search-agentic-entry .stage-home {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

body.is-run .search-agentic-entry .stage-run {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay:
    calc(var(--t-out) + var(--gap)),
    calc(var(--t-out) + var(--gap));
}

.run-badge {
  align-items: center;
  background: rgba(94, 156, 111, 0.1);
  border: 1px solid rgba(94, 156, 111, 0.2);
  border-radius: 999px;
  color: var(--t2);
  display: inline-flex;
  font-size: 11.5px;
  gap: 7px;
  opacity: 0;
  padding: 4px 11px;
  transform: translateY(4px);
  transition:
    opacity var(--t-in) ease,
    transform var(--t-in) var(--eaze);
}

body.is-run .run-badge {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--t-out) + var(--gap) + 200ms);
}

.run-badge .dot,
.q-run-line .live-mark .dot {
  animation: pulse 1.4s ease-in-out infinite;
  background: var(--search);
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.run-inner {
  margin: 0 auto;
  max-width: 740px;
  min-height: 100%;
  padding: 32px 16px 80px;
}

.q-block {
  margin-bottom: 24px;
}

.q-run-line {
  align-items: center;
  color: var(--t3);
  display: flex;
  font-size: 11px;
  gap: 8px;
  margin-bottom: 10px;
}

.q-run-line .badge {
  background: rgba(94, 156, 111, 0.1);
  border-radius: 4px;
  color: var(--search);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  text-transform: uppercase;
}

.q-run-line .live-mark {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  margin-left: auto;
}

.q-run-line .live-mark .dot {
  height: 5px;
  width: 5px;
}

.q-text {
  color: var(--tx);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.32;
  margin-bottom: 12px;
  outline: none;
}

.q-text:focus-visible {
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(94, 156, 111, 0.16);
}

.q-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.q-pill {
  align-items: center;
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 999px;
  color: var(--t2);
  display: inline-flex;
  font-size: 11.5px;
  gap: 5px;
  padding: 3px 10px;
}

.q-pill .icon {
  color: var(--t3);
}

.phase-divider {
  align-items: center;
  color: var(--t3);
  display: flex;
  font-size: 11px;
  gap: 12px;
  margin: 22px 0 14px;
}

.phase-divider::before,
.phase-divider::after {
  background: var(--b1);
  content: "";
  flex: 1;
  height: 1px;
}

.pd-inner {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.pd-tag {
  background: rgba(94, 156, 111, 0.1);
  border-radius: 4px;
  color: var(--search);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  padding: 2px 7px;
}

.phase-card {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 10px;
  padding: 14px 16px;
}

.pc-h {
  align-items: center;
  color: var(--tx);
  display: flex;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
  margin-bottom: 6px;
}

.pc-h .step-cur {
  color: var(--t3);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  margin-left: auto;
}

.pc-bullets {
  color: var(--t2);
  line-height: 1.6;
  padding-left: 14px;
}

.pc-bullets li {
  font-size: 12px;
  list-style: disc;
  margin-bottom: 4px;
}

.pc-bullets li b {
  color: var(--tx);
  font-weight: 500;
}

.pc-stream-cursor {
  animation: aresAgentBlink 900ms steps(2) infinite;
  background: var(--search);
  display: inline-block;
  height: 12px;
  margin-left: 2px;
  vertical-align: -2px;
  width: 7px;
}

.agent-trace {
  border-top: 1px solid var(--b1);
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
}

.agent-trace-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 8px;
}

.agent-trace-dot {
  background: var(--t4);
  border-radius: 50%;
  height: 6px;
  margin-top: 7px;
  width: 6px;
}

.agent-trace-item.running .agent-trace-dot {
  animation: pulse 1.3s ease-in-out infinite;
  background: var(--result);
}

.agent-trace-item.done .agent-trace-dot,
.agent-trace-item.tool.done .agent-trace-dot,
.agent-trace-item.agent.done .agent-trace-dot,
.agent-trace-item.agent_message.done .agent-trace-dot {
  background: var(--search);
}

.agent-trace-item.error .agent-trace-dot {
  background: var(--insight);
}

.agent-trace-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.agent-trace-k {
  color: var(--t3);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.agent-trace-title {
  color: var(--tx);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.35;
}

.agent-trace-detail {
  color: var(--t2);
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.run-inline-badge {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.stage-run .q-block,
.stage-run .phase-divider,
.stage-run .phase-card {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity var(--t-in) ease,
    transform var(--t-in) var(--eaze);
}

body.is-run .stage-run .q-block {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--t-out) + var(--gap));
}

body.is-run .stage-run .phase-divider {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--t-out) + var(--gap) + 180ms);
}

body.is-run .stage-run .phase-card {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--t-out) + var(--gap) + 320ms);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-out: 0ms;
    --t-in: 0ms;
    --gap: 0ms;
  }

  body.is-pressed .dashboard-sbtn.active[data-mode="scout"],
  .dashboard-hero.is-invalid,
  .pc-stream-cursor,
  .run-badge .dot,
  .q-run-line .live-mark .dot {
    animation: none !important;
  }
}

.dashboard-scope-row {
  align-self: center;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  max-width: 680px;
  width: min(680px, 100%);
}

.dashboard-scope-label {
  color: var(--t3);
  font-size: 11px;
  margin-right: 2px;
}

.dashboard-scope-chip {
  align-items: center;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 11px;
  color: var(--t2);
  display: inline-flex;
  font-size: 11px;
  gap: 4px;
  padding: 2px 9px;
}

.dashboard-scope-chip-remove {
  background: transparent;
  border: none;
  color: var(--t4);
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  margin-left: 2px;
  padding: 0;
}

.dashboard-scope-chip-remove:hover {
  color: var(--t2);
}

.dashboard-scope-add {
  align-items: center;
  background: transparent;
  border: 1px dashed var(--b2);
  border-radius: 11px;
  color: var(--t3);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 11px;
  gap: 3px;
  padding: 2px 9px;
}

.dashboard-scope-add:hover {
  border-color: var(--t3);
  color: var(--t2);
}

.dashboard-sec-head {
  align-items: baseline;
  display: flex;
  gap: 10px;
  margin: 36px 0 12px;
}

.dashboard-sec-head h2 {
  color: var(--t3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-sec-head .hint {
  color: var(--t4);
  font-size: 11.5px;
}

.dashboard-kpi-grid {
  background: var(--b1);
  border: 1px solid var(--b1);
  border-radius: 10px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(5, 1fr);
  overflow: hidden;
}

.dashboard-kpi {
  background: var(--s1);
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 18px 15px;
}

.dashboard-kpi-label {
  color: var(--t3);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-kpi-val {
  color: var(--tx);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 2px;
}

.dashboard-kpi-val .of {
  color: var(--t4);
  font-size: 12px;
  font-weight: 400;
  margin-left: 2px;
}

.dashboard-kpi-sub {
  color: var(--t3);
  font-size: 11px;
  margin-top: 4px;
}

.dashboard-kpi-sub .up {
  color: var(--search);
  font-weight: 500;
}

.dashboard-kpi-sub .down {
  color: var(--result);
  font-weight: 500;
}

.dashboard-kpi-chart {
  margin-top: 14px;
}

.dashboard-kpi-chart-legend {
  color: var(--t4);
  display: flex;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  justify-content: space-between;
  letter-spacing: 0.02em;
  margin-top: 5px;
}

.dashboard-kc-area {
  display: block;
  height: 34px;
  overflow: visible;
  width: 100%;
}

.dashboard-kc-bars {
  align-items: flex-end;
  display: flex;
  gap: 4px;
  height: 34px;
  padding: 0 2px;
}

.dashboard-kc-bars .b {
  background: var(--writing);
  border-radius: 3px;
  flex: 1;
  min-height: 5px;
  min-width: 0;
}

.dashboard-kc-bars .b.dim {
  background: rgba(58, 163, 163, 0.32);
}

.dashboard-kc-seg {
  display: flex;
  gap: 2px;
  height: 10px;
  width: 100%;
}

.dashboard-kc-seg .s {
  border-radius: 999px;
  height: 100%;
  min-width: 2px;
}

.dashboard-kc-seg .dashed {
  background: transparent;
  border: 1px dashed var(--result);
  border-radius: 999px;
  box-sizing: border-box;
  flex: 1;
  height: 100%;
  min-width: 2px;
}

.dashboard-chart-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 2fr 1fr;
}

.dashboard-card {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 20px;
}

.dashboard-card-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dashboard-card-title {
  color: var(--tx);
  font-size: 12.5px;
  font-weight: 600;
}

.dashboard-card-sub {
  color: var(--t3);
  font-size: 11px;
  margin-top: 2px;
}

.dashboard-toggle-group {
  background: var(--s2);
  border-radius: 6px;
  display: inline-flex;
  gap: 1px;
  padding: 2px;
}

.dashboard-toggle-group button {
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--t3);
  cursor: pointer;
  font-family: inherit;
  font-size: 10.5px;
  padding: 3px 8px;
}

.dashboard-toggle-group button.active {
  background: var(--s1);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
  color: var(--tx);
}

.dashboard-chart-area {
  height: 170px;
  width: 100%;
}

.dashboard-funnel {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 2px 0;
}

.dashboard-funnel-row {
  align-items: center;
  display: flex;
  font-size: 11.5px;
  gap: 10px;
}

.dashboard-funnel-label {
  color: var(--t2);
  flex-shrink: 0;
  width: 88px;
}

.dashboard-funnel-bar {
  background: var(--s3);
  border-radius: 3px;
  flex: 1;
  height: 6px;
  overflow: hidden;
  position: relative;
}

.dashboard-funnel-bar span {
  border-radius: 3px;
  display: block;
  height: 100%;
}

.dashboard-funnel-val {
  color: var(--t2);
  font-size: 11.5px;
  text-align: right;
  width: 38px;
}

.dashboard-funnel-pct {
  color: var(--t4);
  font-size: 10.5px;
  text-align: right;
  width: 36px;
}

.dashboard-tbl-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 36px 0 12px;
}

.dashboard-tbl-head h2 {
  color: var(--t3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-right: 8px;
  text-transform: uppercase;
}

.dashboard-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.dashboard-f-chip {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--t2);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 11.5px;
  gap: 6px;
  padding: 4px 10px;
}

.dashboard-f-chip:hover {
  background: var(--s2);
}

.dashboard-f-chip.active {
  background: var(--s3);
  color: var(--tx);
  font-weight: 500;
}

.dashboard-f-chip .n {
  color: var(--t4);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.dashboard-f-chip.active .n {
  color: var(--t3);
}

.dashboard-tool {
  margin-left: auto;
}

.dashboard-tool-btn {
  align-items: center;
  background: transparent;
  border: 1px solid var(--b1);
  border-radius: 6px;
  color: var(--t2);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 11.5px;
  gap: 5px;
  padding: 4px 10px;
}

.dashboard-tool-btn:hover {
  background: var(--s2);
}

.dashboard-tbl {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 10px;
  overflow: auto;
}

.dashboard-tbl-row {
  align-items: center;
  border-bottom: 1px solid var(--b1);
  display: grid;
  font-size: 12.5px;
  gap: 14px;
  grid-template-columns: minmax(320px, 1fr) 110px 80px 160px 220px 100px 90px;
  min-height: 52px;
  min-width: 1094px;
  padding: 13px 20px;
}

.dashboard-tbl-row:last-of-type {
  border-bottom: none;
}

.dashboard-tbl-row.header {
  background: var(--bg);
  color: var(--t4);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  min-height: 34px;
  padding: 9px 20px;
  text-transform: uppercase;
}

.dashboard-tbl-row.data {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 80ms;
  width: 100%;
}

.dashboard-tbl-row.data:hover {
  background: var(--s2);
}

.dashboard-tbl-row.selected {
  background: rgba(94, 106, 210, 0.04);
  box-shadow: inset 2px 0 0 var(--accent);
}

.dashboard-tbl-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dashboard-tbl-title .t {
  color: var(--tx);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-tbl-title .a {
  color: var(--t3);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-venue {
  align-items: center;
  color: var(--t2);
  display: inline-flex;
  font-size: 11.5px;
  gap: 6px;
}

.dashboard-venue .vbar {
  border-radius: 2px;
  height: 11px;
  width: 3px;
}

.dashboard-year {
  color: var(--t3);
  font-size: 11.5px;
}

.dashboard-cell-folder {
  align-items: center;
  border-radius: 5px;
  color: var(--t2);
  cursor: default;
  display: inline-flex;
  font-size: 11.5px;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 8px 3px 6px;
}

.dashboard-cell-folder:hover {
  background: var(--s3);
}

.dashboard-cell-folder .swatch {
  border-radius: 2px;
  flex-shrink: 0;
  height: 7px;
  width: 7px;
}

.dashboard-cell-folder.empty {
  color: var(--t4);
  padding-left: 8px;
}

.dashboard-cell-folder.empty:hover {
  background: transparent;
  color: var(--accent);
}

.dashboard-cell-tags {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.dashboard-tag-pill {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-size: 10.5px;
  line-height: 1.4;
  padding: 2px 7px;
  white-space: nowrap;
}

.dashboard-tag-pill.auto {
  background: rgba(94, 106, 210, 0.08);
  color: #434ba8;
}

.dashboard-tag-pill.muted {
  background: var(--s2);
  color: var(--t3);
}

.dashboard-tag-add {
  color: var(--t4);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
}

.dashboard-tag-add:hover {
  color: var(--t2);
}

.dashboard-cell-queue {
  align-items: center;
  color: var(--t4);
  display: inline-flex;
  font-size: 11px;
  gap: 5px;
}

.dashboard-cell-queue.on {
  color: #2e7873;
}

.dashboard-cell-queue .dot {
  background: var(--writing);
  border-radius: 50%;
  height: 5px;
  width: 5px;
}

.dashboard-cell-pdf {
  align-items: center;
  color: var(--t4);
  cursor: default;
  display: inline-flex;
  font-size: 11px;
  gap: 5px;
}

.dashboard-cell-pdf.empty:hover {
  color: var(--accent);
}

.dashboard-cell-pdf.on {
  color: var(--search);
}

.dashboard-worklist-empty {
  border-top: 1px solid var(--b1);
  margin: 0;
  padding: 22px 20px;
}

.dashboard-tbl-foot {
  align-items: center;
  background: var(--bg);
  border-top: 1px solid var(--b1);
  color: var(--t3);
  display: flex;
  font-size: 11.5px;
  justify-content: space-between;
  min-width: 1094px;
  padding: 10px 20px;
}

.dashboard-page-btns {
  display: flex;
  gap: 2px;
}

.dashboard-page-btn {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--t3);
  cursor: pointer;
  display: grid;
  font-family: inherit;
  font-size: 11px;
  height: 24px;
  place-items: center;
  width: 24px;
}

.dashboard-page-btn:hover {
  background: var(--s2);
  color: var(--t2);
}

.dashboard-page-btn.active {
  background: var(--s3);
  color: var(--tx);
}

@media (min-width: 901px) and (max-width: 1279px) {
  .search-stage[data-search-layout="tablet"] {
    position: relative;
  }

  .search-stage[data-search-layout="tablet"] .results-pane-focal {
    position: relative;
    z-index: 1;
  }

  .search-stage[data-search-layout="tablet"] .panel-backdrop {
    animation: fadeIn 180ms ease-out;
    background: rgba(17, 24, 28, 0.18);
    inset: 0;
    position: absolute;
    z-index: 55;
  }

  .search-stage[data-search-layout="tablet"] .search-filters-focal,
  .search-stage[data-search-layout="tablet"] .search-preview-focal {
    bottom: 0;
    max-width: calc(100% - 88px);
    position: absolute;
    top: 0;
    z-index: 60;
  }

  .search-stage[data-search-layout="tablet"] .search-filters-focal {
    animation: slideInLeft 220ms cubic-bezier(0.2, 0.8, 0.25, 1);
    box-shadow: 20px 0 36px rgba(10, 10, 11, 0.12);
    left: 0;
    width: min(320px, calc(100% - 88px));
  }

  .search-stage[data-search-layout="tablet"] .search-preview-focal {
    animation: slideInRight 220ms cubic-bezier(0.2, 0.8, 0.25, 1);
    box-shadow: -20px 0 36px rgba(10, 10, 11, 0.12);
    right: 0;
    width: min(360px, calc(100% - 88px));
  }

  .search-stage[data-search-layout="tablet"] .search-preview-focal.is-empty {
    display: flex;
  }

  .search-stage[data-search-layout="tablet"] .preview-backdrop {
    display: block;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: 100vh;
  }

  .workspace {
    min-height: 100vh;
  }

  .stage-wrap {
    overflow: visible;
  }

  .reading-home {
    padding: 18px 18px 32px;
  }

  .reading-home-title {
    white-space: normal;
  }

  .search-home-title {
    white-space: normal;
  }

  .reading-home-copy {
    max-width: none;
  }

  .reading-home-metrics {
    grid-template-columns: 1fr;
  }

  .reading-home-list-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .reading-home-tool-row {
    width: 100%;
  }

  .reading-home-tool-btn {
    flex: 1;
    justify-content: center;
  }

  .reading-home-table {
    overflow: visible;
  }

  .reading-home-table-head {
    display: none;
  }

  .reading-home-row {
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    padding: 14px 16px;
  }

  .reading-home-row .reading-home-cell,
  .reading-home-row > .reading-home-pdf-chip,
  .reading-home-row .reading-home-status-cell {
    display: none;
  }

  .reading-home-row-mobile-meta {
    align-items: center;
    color: var(--t3);
    display: flex;
    flex-wrap: wrap;
    font-size: 11px;
    gap: 8px;
    margin-top: 2px;
  }

  .reading-home-table-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }

  .reading-home-preview-overlay.is-modal .reading-home-preview-panel {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: 20px;
  }

  .reading-home-preview-overlay.is-modal .reading-home-preview-surface {
    width: min(100%, 480px);
  }

  .reading-home-preview.is-modal {
    max-height: calc(100vh - 40px);
    width: min(100%, 480px);
  }

  .reading-home-preview.is-modal .reading-home-preview-scroll {
    max-height: calc(100vh - 80px);
  }

  .reading-home-preview-stat-grid {
    grid-template-columns: 1fr;
  }

  .reading-home-preview-footer {
    flex-direction: column;
  }

  .reading-home-preview-footer .btn-p,
  .reading-home-preview-footer .btn-s {
    width: 100%;
  }

  .search-stage {
    flex-direction: column;
    min-height: auto;
  }

  .search-stage-dashboard {
    overflow: visible;
  }

  /* Lift results-pane children (hero, results-list) into search-stage flow
     so visual order becomes: search hero → filter → results → preview. */
  .results-pane-focal {
    display: contents;
  }

  .hero-wrap {
    order: 1;
  }

  .sidebar-collapsed-strip,
  .search-filters-focal {
    order: 2;
  }

  .results-list {
    order: 3;
    overflow: visible;
    padding: 16px 18px 32px;
  }

  .preview-collapsed-strip,
  .search-preview-focal {
    order: 4;
  }

  .search-filters-focal,
  .search-preview-focal {
    border-left: none;
    border-right: none;
    width: 100%;
  }

  .search-filters-focal {
    border-bottom: 1px solid var(--b1);
    border-top: 1px solid var(--b1);
    max-height: none;
    overflow: visible;
    padding: 14px 16px 18px;
  }

  .search-preview-focal {
    border-top: 1px solid var(--b1);
  }

  .sidebar-collapsed-strip,
  .preview-collapsed-strip {
    align-items: center;
    background: var(--s1);
    border-bottom: none;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--b1);
    flex-direction: row;
    gap: 0;
    justify-content: center;
    padding: 10px 16px;
    width: 100%;
  }

  .sidebar-collapsed-strip .panel-toggle-btn,
  .preview-collapsed-strip .panel-toggle-btn {
    border-radius: 999px;
    padding: 7px 14px;
  }

  .sidebar-collapsed-strip .panel-toggle-btn:not(:first-of-type),
  .sidebar-collapsed-strip .collapsed-strip-divider,
  .preview-collapsed-strip .panel-toggle-btn:not(:first-of-type),
  .preview-collapsed-strip .collapsed-strip-divider {
    display: none;
  }

  .sidebar-collapsed-strip .panel-toggle-btn:first-of-type::after {
    color: var(--t2);
    content: "필터";
    font-size: 12px;
    font-weight: 500;
    margin-left: 6px;
  }

  .preview-collapsed-strip .panel-toggle-btn:first-of-type::after {
    color: var(--t2);
    content: "프리뷰";
    font-size: 12px;
    font-weight: 500;
    margin-left: 6px;
  }

  .hero-wrap {
    padding: 18px 18px 16px;
  }

  .search-dashboard {
    padding: 18px 18px 40px;
  }

  .dashboard-sec-head,
  .dashboard-tbl-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-tool {
    margin-left: 0;
  }

  .dashboard-hero {
    gap: 8px;
    padding: 5px 5px 5px 14px;
  }

  .dashboard-hero input {
    font-size: 14px;
  }

  .dashboard-sbtn {
    height: 26px;
    min-width: 26px;
  }

  .dashboard-sbtn.active .dashboard-sbtn-copy {
    max-width: 100px;
    padding-left: 5px;
  }

  .dashboard-sbtn[data-mode="scout"].active,
  .dashboard-sbtn[data-mode="keyword"].active {
    padding: 5px 9px 5px 8px;
  }

  .dashboard-scope-row {
    justify-content: flex-start;
  }

  .dashboard-kpi-grid,
  .dashboard-chart-row {
    grid-template-columns: 1fr;
  }

  .dashboard-card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .hero-input {
    gap: 8px;
    padding: 5px 5px 5px 14px;
  }

  .hero-input input {
    font-size: 14px;
  }

  .hero-submit-btn {
    height: 26px;
    min-width: 26px;
  }

  .hero-submit-label {
    font-size: 12.5px;
  }

  .hero-input.scout .hero-submit-btn[data-mode="scout"].active,
  .hero-input.keyword .hero-submit-btn[data-mode="keyword"].active {
    padding: 5px 9px 5px 8px;
  }

  .hero-submit-btn .expand {
    gap: 4px;
  }

  .hero-submit-btn.active .expand {
    max-width: 100px;
    padding-left: 5px;
  }

  .hero-submit-label-desktop {
    display: none;
  }

  .hero-submit-label-mobile {
    display: inline;
  }

  .results-list {
    padding: 18px 18px 32px;
  }

  .results-list-inner {
    max-width: none;
  }

  .results-summary-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .results-summary-actions {
    width: 100%;
  }

  .paper-score-wrap {
    width: 72px;
  }

  .search-filters-focal .search-filters-header {
    margin-bottom: 6px;
  }

  .search-filters-focal .filter-eyebrow {
    font-size: 11px;
    letter-spacing: 0.04em;
    margin-bottom: 0;
  }

  .search-filters-focal .search-filter-section {
    margin-top: 10px;
    padding-top: 10px;
  }

  .search-filters-focal .sec-hdr {
    padding: 6px 0;
  }

  /* Turn section body into a horizontal chip row */
  .search-filters-focal .sec-body {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 2px;
  }

  .search-filters-focal .sec-body.closed {
    display: none;
  }

  /* Convert checkbox-style filter options into pill chips */
  .search-filters-focal .filter-option {
    background: var(--s1);
    border: 1px solid var(--b1);
    border-radius: 999px;
    color: var(--t2);
    font-size: 12px;
    font-weight: 500;
    gap: 5px;
    padding: 5px 11px;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  }

  .search-filters-focal .filter-option.is-checked {
    background: var(--tx);
    border-color: var(--tx);
    color: #fff;
  }

  .search-filters-focal .filter-option-box {
    display: none;
  }

  .search-filters-focal .filter-option-dot {
    height: 7px;
    width: 7px;
  }

  /* Relevance slider full width on its own row */
  .search-filters-focal .sec-body .filter-range {
    flex: 1 1 100%;
  }

  .search-filters-focal .sec-body .filter-range-value {
    flex: 1 1 100%;
  }

  /* Scope section already uses its own chip layout; ensure it spans full */
  .search-filters-focal .filter-scope-type {
    flex: 1 1 100%;
  }

  .search-filters-focal .filter-library-card {
    margin-top: 12px;
    padding-top: 12px;
  }

  .search-preview-focal.is-empty,
  .preview-collapsed-strip.is-empty,
  .preview-collapsed-strip {
    display: none;
  }

  /* Bottom-sheet modal on mobile */
  .preview-backdrop {
    animation: fadeIn 180ms ease-out;
    backdrop-filter: blur(2px);
    background: rgba(17, 24, 28, 0.5);
    display: block;
    inset: 0;
    position: fixed;
    z-index: 90;
  }

  .search-preview-focal:not(.is-empty) {
    animation: slideUp 220ms cubic-bezier(0.2, 0.8, 0.25, 1);
    border: none;
    border-top: 1px solid var(--b1);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    bottom: 0;
    box-shadow: 0 -12px 42px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    left: 0;
    max-height: 85vh;
    position: fixed;
    right: 0;
    z-index: 100;
  }

  /* Grab-handle indicator at top of bottom sheet */
  .search-preview-focal:not(.is-empty)::before {
    background: var(--b2);
    border-radius: 999px;
    content: "";
    height: 4px;
    left: 50%;
    position: absolute;
    top: 8px;
    transform: translateX(-50%);
    width: 40px;
  }

  .search-preview-focal:not(.is-empty) .search-preview-header-focal {
    padding: 22px 16px 12px;
  }

  .search-preview-focal:not(.is-empty) .search-preview-body {
    -webkit-overflow-scrolling: touch;
    overflow: auto;
  }

  .search-preview-focal .search-preview-empty {
    display: none;
  }

  .search-preview-focal .preview-title {
    font-size: 14px;
  }

  .preview-close-desktop {
    display: none;
  }

  .preview-close-mobile {
    display: inline-flex;
  }

  /* Lock body scroll while modal is open */
  body:has(.search-preview-focal:not(.is-empty)) {
    overflow: hidden;
  }

  .scope-picker-popover {
    left: 12px !important;
    right: 12px;
    width: auto;
  }
}

/* ============================================================
   Search Tab Animations
   - Component entrance (stagger fade-up)
   - Home ↔ Results search-bar morph (View Transitions API)
   - Agent ↔ Keyword mode transition polish
   - Chart entrance (reveal + grow)
   ============================================================ */

@keyframes aresFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes aresFadeInSoft {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes aresChartReveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes aresGrowY {
  from { transform: scaleY(0.001); }
  to   { transform: scaleY(1); }
}

@keyframes aresGrowX {
  from { transform: scaleX(0.001); }
  to   { transform: scaleX(1); }
}

@keyframes aresModePop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.035); }
  100% { transform: scale(1); }
}

@keyframes aresAgentRingout {
  0% { box-shadow: 0 0 0 0 rgba(94, 156, 111, 0.45); }
  100% { box-shadow: 0 0 0 22px rgba(94, 156, 111, 0); }
}

@keyframes aresAgentShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@keyframes aresAgentBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ----- Search home (dashboard) entrance -----
   Delays use `calc(var(--sb, 0ms) + Nms)` so a morphing re-entry can shift
   the entire cascade via a single `data-ares-morph="true"` data attribute.
*/
.search-dashboard {
  --sb: 0ms;
}
[data-ares-morph="true"] .search-dashboard {
  --sb: 180ms;
}

.search-dashboard .search-home-hero {
  animation: aresFadeUp 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 80ms);
}
.search-dashboard .dashboard-hero-wrap .dashboard-hero {
  animation: aresFadeUp 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 140ms);
}
.search-dashboard .dashboard-hero-wrap .dashboard-scope-row {
  animation: aresFadeUp 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 220ms);
}
.search-dashboard .dashboard-sec-head {
  animation: aresFadeUp 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 300ms);
}

.search-dashboard .dashboard-kpi-grid .dashboard-kpi {
  animation: aresFadeUp 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.search-dashboard .dashboard-kpi-grid .dashboard-kpi:nth-child(1) { animation-delay: calc(var(--sb, 0ms) + 340ms); }
.search-dashboard .dashboard-kpi-grid .dashboard-kpi:nth-child(2) { animation-delay: calc(var(--sb, 0ms) + 400ms); }
.search-dashboard .dashboard-kpi-grid .dashboard-kpi:nth-child(3) { animation-delay: calc(var(--sb, 0ms) + 460ms); }
.search-dashboard .dashboard-kpi-grid .dashboard-kpi:nth-child(4) { animation-delay: calc(var(--sb, 0ms) + 520ms); }
.search-dashboard .dashboard-kpi-grid .dashboard-kpi:nth-child(5) { animation-delay: calc(var(--sb, 0ms) + 580ms); }

.search-dashboard .dashboard-chart-row .dashboard-card {
  animation: aresFadeUp 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.search-dashboard .dashboard-chart-row .dashboard-card:nth-child(1) { animation-delay: calc(var(--sb, 0ms) + 500ms); }
.search-dashboard .dashboard-chart-row .dashboard-card:nth-child(2) { animation-delay: calc(var(--sb, 0ms) + 580ms); }

.search-dashboard .dashboard-tbl-head {
  animation: aresFadeUp 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 620ms);
}
.search-dashboard .dashboard-tbl .dashboard-tbl-row.header {
  animation: aresFadeInSoft 340ms ease both;
  animation-delay: calc(var(--sb, 0ms) + 660ms);
}
.search-dashboard .dashboard-tbl .dashboard-tbl-row.data {
  animation: aresFadeUp 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.search-dashboard .dashboard-tbl .dashboard-tbl-row.data:nth-of-type(1) { animation-delay: calc(var(--sb, 0ms) + 700ms); }
.search-dashboard .dashboard-tbl .dashboard-tbl-row.data:nth-of-type(2) { animation-delay: calc(var(--sb, 0ms) + 740ms); }
.search-dashboard .dashboard-tbl .dashboard-tbl-row.data:nth-of-type(3) { animation-delay: calc(var(--sb, 0ms) + 780ms); }
.search-dashboard .dashboard-tbl .dashboard-tbl-row.data:nth-of-type(4) { animation-delay: calc(var(--sb, 0ms) + 820ms); }
.search-dashboard .dashboard-tbl .dashboard-tbl-row.data:nth-of-type(5) { animation-delay: calc(var(--sb, 0ms) + 860ms); }
.search-dashboard .dashboard-tbl .dashboard-tbl-row.data:nth-of-type(6) { animation-delay: calc(var(--sb, 0ms) + 900ms); }
.search-dashboard .dashboard-tbl .dashboard-tbl-row.data:nth-of-type(7) { animation-delay: calc(var(--sb, 0ms) + 940ms); }
.search-dashboard .dashboard-tbl .dashboard-tbl-row.data:nth-of-type(n+8) { animation-delay: calc(var(--sb, 0ms) + 980ms); }
.search-dashboard .dashboard-tbl-foot {
  animation: aresFadeInSoft 360ms ease both;
  animation-delay: calc(var(--sb, 0ms) + 1020ms);
}

/* ----- Results pane entrance (top→bottom stagger, shifted by --sb on morph) ----- */
.results-pane {
  --sb: 0ms;
}
[data-ares-morph="true"] .results-pane {
  --sb: 200ms;
}

.results-pane .results-back-row {
  animation: aresFadeUp 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 120ms);
}
.results-pane .hero-meta {
  animation: aresFadeUp 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 220ms);
}
.results-pane .results-summary-row {
  animation: aresFadeUp 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 300ms);
}
.results-pane .results-list-inner .paper-row {
  animation: aresFadeUp 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.results-pane .results-list-inner .paper-row:nth-of-type(1)  { animation-delay: calc(var(--sb, 0ms) + 380ms); }
.results-pane .results-list-inner .paper-row:nth-of-type(2)  { animation-delay: calc(var(--sb, 0ms) + 440ms); }
.results-pane .results-list-inner .paper-row:nth-of-type(3)  { animation-delay: calc(var(--sb, 0ms) + 500ms); }
.results-pane .results-list-inner .paper-row:nth-of-type(4)  { animation-delay: calc(var(--sb, 0ms) + 560ms); }
.results-pane .results-list-inner .paper-row:nth-of-type(5)  { animation-delay: calc(var(--sb, 0ms) + 620ms); }
.results-pane .results-list-inner .paper-row:nth-of-type(6)  { animation-delay: calc(var(--sb, 0ms) + 680ms); }
.results-pane .results-list-inner .paper-row:nth-of-type(7)  { animation-delay: calc(var(--sb, 0ms) + 740ms); }
.results-pane .results-list-inner .paper-row:nth-of-type(8)  { animation-delay: calc(var(--sb, 0ms) + 800ms); }
.results-pane .results-list-inner .paper-row:nth-of-type(9)  { animation-delay: calc(var(--sb, 0ms) + 860ms); }
.results-pane .results-list-inner .paper-row:nth-of-type(10) { animation-delay: calc(var(--sb, 0ms) + 920ms); }
.results-pane .results-list-inner .paper-row:nth-of-type(n+11) { animation-delay: calc(var(--sb, 0ms) + 960ms); }

.results-pane .search-results-empty,
.results-pane .loading-state {
  animation: aresFadeUp 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 380ms);
}

/* Back-to-home button */
.results-back-row {
  align-items: center;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}
.results-back-btn {
  align-items: center;
  background: transparent;
  border: 1px solid var(--b1);
  border-radius: 999px;
  color: var(--t2);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 12px;
  font-weight: 550;
  gap: 6px;
  letter-spacing: -0.006em;
  padding: 5px 12px 5px 10px;
  transition:
    background 200ms ease,
    border-color 200ms ease,
    color 200ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 200ms ease;
}
.results-back-btn:hover {
  background: #fff;
  border-color: var(--b2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 4px 14px rgba(0, 0, 0, 0.04);
  color: var(--tx);
  transform: translateX(-2px);
}
.results-back-btn:focus-visible {
  outline: 2px solid var(--read);
  outline-offset: 2px;
}
.results-back-btn .icon {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.results-back-btn:hover .icon {
  transform: translateX(-2px);
}

/* Preview aside subtle fade-in when it is populated */
.search-preview-focal:not(.is-empty) {
  animation: aresFadeUp 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----- View Transitions API (home ↔ results morph) ----- */
.dashboard-hero {
  view-transition-name: ares-search-bar;
}
.results-pane .hero-input {
  view-transition-name: ares-search-bar;
}
.search-dashboard .search-home-hero {
  view-transition-name: ares-search-title;
}
.dashboard-hero-wrap .dashboard-scope-row,
.results-pane .hero-meta-scope {
  view-transition-name: ares-search-scope;
}

/* Root crossfade — softens the surrounding content transition */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 420ms;
  animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Search bar morph — expressive, slow-ended easing for the position/size tween */
::view-transition-group(ares-search-bar) {
  animation-duration: 680ms;
  animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}
::view-transition-image-pair(ares-search-bar) {
  animation-duration: 680ms;
  animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
  isolation: auto;
}
::view-transition-old(ares-search-bar),
::view-transition-new(ares-search-bar) {
  animation-duration: 420ms;
  animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Title + scope row — slightly quicker fade than the bar */
::view-transition-group(ares-search-title),
::view-transition-group(ares-search-scope) {
  animation-duration: 560ms;
  animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}
::view-transition-old(ares-search-title),
::view-transition-new(ares-search-title),
::view-transition-old(ares-search-scope),
::view-transition-new(ares-search-scope) {
  animation-duration: 420ms;
  animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ----- Mode transition polish ----- */
.dashboard-hero,
.hero-input {
  transition:
    border-color 360ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 360ms cubic-bezier(0.4, 0, 0.2, 1);
}
.dashboard-submit,
.hero-submit {
  transition: background 340ms cubic-bezier(0.4, 0, 0.2, 1);
}
.dashboard-sbtn,
.hero-submit-btn {
  transition:
    background 320ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 320ms cubic-bezier(0.4, 0, 0.2, 1),
    color 260ms ease,
    min-width 340ms cubic-bezier(0.4, 0, 0.2, 1),
    padding 340ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 240ms ease;
}
.dashboard-sbtn .dashboard-sbtn-copy,
.hero-submit-btn .expand {
  transition:
    max-width 340ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 260ms ease,
    padding-left 340ms cubic-bezier(0.4, 0, 0.2, 1);
}
.dashboard-sbtn.is-just-activated,
.hero-submit-btn.is-just-activated {
  animation: aresModePop 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----- Chart entrance ----- */
.search-dashboard .dashboard-kpi-chart {
  animation: aresFadeInSoft 520ms ease both;
  animation-delay: calc(var(--sb, 0ms) + 420ms);
}
.search-dashboard .dashboard-kpi-chart .dashboard-kc-area {
  animation: aresChartReveal 900ms cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 500ms);
}
.search-dashboard .dashboard-chart-row .dashboard-card .dashboard-chart-area {
  animation: aresChartReveal 1000ms cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 600ms);
}
.search-dashboard .dashboard-kc-bars {
  animation: aresFadeInSoft 420ms ease both;
  animation-delay: calc(var(--sb, 0ms) + 440ms);
}
.search-dashboard .dashboard-kc-bars .b {
  transform-origin: bottom;
  animation: aresGrowY 640ms cubic-bezier(0.34, 1.12, 0.64, 1) both;
}
.search-dashboard .dashboard-kc-bars .b:nth-child(1) { animation-delay: calc(var(--sb, 0ms) + 500ms); }
.search-dashboard .dashboard-kc-bars .b:nth-child(2) { animation-delay: calc(var(--sb, 0ms) + 540ms); }
.search-dashboard .dashboard-kc-bars .b:nth-child(3) { animation-delay: calc(var(--sb, 0ms) + 580ms); }
.search-dashboard .dashboard-kc-bars .b:nth-child(4) { animation-delay: calc(var(--sb, 0ms) + 620ms); }
.search-dashboard .dashboard-kc-bars .b:nth-child(5) { animation-delay: calc(var(--sb, 0ms) + 660ms); }
.search-dashboard .dashboard-kc-bars .b:nth-child(6) { animation-delay: calc(var(--sb, 0ms) + 700ms); }
.search-dashboard .dashboard-kc-bars .b:nth-child(7) { animation-delay: calc(var(--sb, 0ms) + 740ms); }
.search-dashboard .dashboard-kc-seg {
  transform-origin: left;
  animation: aresGrowX 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sb, 0ms) + 480ms);
}
.search-dashboard .dashboard-funnel .dashboard-funnel-row {
  animation: aresFadeUp 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.search-dashboard .dashboard-funnel .dashboard-funnel-row:nth-child(1) { animation-delay: calc(var(--sb, 0ms) + 620ms); }
.search-dashboard .dashboard-funnel .dashboard-funnel-row:nth-child(2) { animation-delay: calc(var(--sb, 0ms) + 680ms); }
.search-dashboard .dashboard-funnel .dashboard-funnel-row:nth-child(3) { animation-delay: calc(var(--sb, 0ms) + 740ms); }
.search-dashboard .dashboard-funnel .dashboard-funnel-row:nth-child(4) { animation-delay: calc(var(--sb, 0ms) + 800ms); }
.search-dashboard .dashboard-funnel .dashboard-funnel-row:nth-child(5) { animation-delay: calc(var(--sb, 0ms) + 860ms); }
.search-dashboard .dashboard-funnel-bar span {
  transform-origin: left;
  animation: aresGrowX 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.search-dashboard .dashboard-funnel .dashboard-funnel-row:nth-child(1) .dashboard-funnel-bar span { animation-delay: calc(var(--sb, 0ms) + 660ms); }
.search-dashboard .dashboard-funnel .dashboard-funnel-row:nth-child(2) .dashboard-funnel-bar span { animation-delay: calc(var(--sb, 0ms) + 720ms); }
.search-dashboard .dashboard-funnel .dashboard-funnel-row:nth-child(3) .dashboard-funnel-bar span { animation-delay: calc(var(--sb, 0ms) + 780ms); }
.search-dashboard .dashboard-funnel .dashboard-funnel-row:nth-child(4) .dashboard-funnel-bar span { animation-delay: calc(var(--sb, 0ms) + 840ms); }
.search-dashboard .dashboard-funnel .dashboard-funnel-row:nth-child(5) .dashboard-funnel-bar span { animation-delay: calc(var(--sb, 0ms) + 900ms); }

/* ============================================================
   Reading Tab Animations
   Gated by `[data-ares-morph="true"]` so they fire only on
   View-Transition-driven entries (tab switch, home↔detail).
   Intra-view clicks (filter/row select/rail toggle) re-render
   without the flag → no replay.
   ============================================================ */

/* ----- Reading Home ----- */
[data-ares-morph="true"] .reading-stage-home .reading-home-hero {
  animation: aresFadeUp 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 80ms;
}
[data-ares-morph="true"] .reading-stage-home .reading-home-metrics .reading-home-metric {
  animation: aresFadeUp 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
[data-ares-morph="true"] .reading-stage-home .reading-home-metrics .reading-home-metric:nth-child(1) { animation-delay: 160ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-metrics .reading-home-metric:nth-child(2) { animation-delay: 220ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-metrics .reading-home-metric:nth-child(3) { animation-delay: 280ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-metrics .reading-home-metric:nth-child(4) { animation-delay: 340ms; }

/* Micro-chart reveal inside metric cards */
[data-ares-morph="true"] .reading-stage-home .reading-home-metric-svg {
  animation: aresChartReveal 900ms cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 360ms;
}
[data-ares-morph="true"] .reading-stage-home .reading-home-band i,
[data-ares-morph="true"] .reading-stage-home .reading-home-bars i {
  animation: aresGrowX 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: left;
  animation-delay: 400ms;
}

/* Panel + preview */
[data-ares-morph="true"] .reading-stage-home .reading-home-panel {
  animation: aresFadeUp 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 380ms;
}
[data-ares-morph="true"] .reading-stage-home .reading-home-preview-panel,
[data-ares-morph="true"] .reading-stage-home .reading-home-preview-overlay.is-open {
  animation: aresFadeUp 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 460ms;
}
[data-ares-morph="true"] .reading-stage-home .reading-home-resizer-wrap {
  animation: aresFadeInSoft 420ms ease both;
  animation-delay: 500ms;
}

/* Worklist table rows — staggered top→bottom */
[data-ares-morph="true"] .reading-stage-home .reading-home-table-head {
  animation: aresFadeInSoft 320ms ease both;
  animation-delay: 440ms;
}
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row {
  animation: aresFadeUp 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row:nth-of-type(1)  { animation-delay: 500ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row:nth-of-type(2)  { animation-delay: 550ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row:nth-of-type(3)  { animation-delay: 600ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row:nth-of-type(4)  { animation-delay: 650ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row:nth-of-type(5)  { animation-delay: 700ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row:nth-of-type(6)  { animation-delay: 750ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row:nth-of-type(7)  { animation-delay: 800ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row:nth-of-type(8)  { animation-delay: 850ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row:nth-of-type(9)  { animation-delay: 900ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row:nth-of-type(10) { animation-delay: 950ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row:nth-of-type(n+11) { animation-delay: 1000ms; }
[data-ares-morph="true"] .reading-stage-home .reading-home-table-foot {
  animation: aresFadeInSoft 320ms ease both;
  animation-delay: 1020ms;
}
[data-ares-morph="true"] .reading-stage-home .reading-home-table-empty,
[data-ares-morph="true"] .reading-stage-home .reading-home-empty {
  animation: aresFadeUp 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 500ms;
}

/* Loading / empty stage variants */
[data-ares-morph="true"] .reading-stage-home.reading-home--loading .reading-home-hero,
[data-ares-morph="true"] .reading-stage .reading-empty {
  animation: aresFadeUp 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 120ms;
}

/* ----- Reading Detail (Workbench) ----- */
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-metabar {
  animation: aresFadeUp 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 80ms;
}
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-icon-rail .reading-rail-btn {
  animation: aresFadeUp 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-icon-rail .reading-rail-btn:nth-of-type(1) { animation-delay: 180ms; }
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-icon-rail .reading-rail-btn:nth-of-type(2) { animation-delay: 220ms; }
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-icon-rail .reading-rail-btn:nth-of-type(3) { animation-delay: 260ms; }
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-icon-rail .reading-rail-btn:nth-of-type(4) { animation-delay: 300ms; }
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-icon-rail .reading-rail-btn:nth-of-type(5) { animation-delay: 340ms; }
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-icon-rail .reading-rail-divider {
  animation: aresFadeInSoft 280ms ease both;
  animation-delay: 260ms;
}
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-float-panel {
  animation: aresFadeUp 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 260ms;
}
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-split .reading-doc-pane {
  animation: aresFadeUp 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 260ms;
}
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-split .reading-workbench-pane {
  animation: aresFadeUp 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 340ms;
}
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-split .reading-resize-handle {
  animation: aresFadeInSoft 420ms ease both;
  animation-delay: 420ms;
}

/* Metabar inner stagger — breadcrumb → title → actions */
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-metabar .reading-crumb-group {
  animation: aresFadeUp 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 120ms;
}
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-metabar .reading-metabar-copy {
  animation: aresFadeUp 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 180ms;
}
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-metabar .reading-metabar-actions {
  animation: aresFadeUp 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 240ms;
}

/* Pane headers fade in after panes */
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-doc-pane .pane-hdr,
[data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-workbench-pane .pane-hdr {
  animation: aresFadeInSoft 320ms ease both;
  animation-delay: 380ms;
}

/* View-transition morph between reading views (home hero ↔ detail metabar) */
.reading-stage-home .reading-home-hero,
.reading-stage:not(.reading-stage-home) .reading-metabar {
  view-transition-name: ares-reading-header;
}
::view-transition-group(ares-reading-header) {
  animation-duration: 560ms;
  animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}
::view-transition-old(ares-reading-header),
::view-transition-new(ares-reading-header) {
  animation-duration: 380ms;
  animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-reduced-motion: reduce) {
  .search-dashboard .search-home-hero,
  .search-dashboard .dashboard-hero-wrap .dashboard-hero,
  .search-dashboard .dashboard-hero-wrap .dashboard-scope-row,
  .search-dashboard .dashboard-sec-head,
  .search-dashboard .dashboard-kpi-grid .dashboard-kpi,
  .search-dashboard .dashboard-chart-row .dashboard-card,
  .search-dashboard .dashboard-tbl-head,
  .search-dashboard .dashboard-tbl .dashboard-tbl-row.header,
  .search-dashboard .dashboard-tbl .dashboard-tbl-row.data,
  .search-dashboard .dashboard-tbl-foot,
  .results-pane .hero-wrap,
  .results-pane .results-back-row,
  .results-pane .hero-meta,
  .results-pane .results-summary-row,
  .results-pane .results-list-inner .paper-row,
  .results-pane .search-results-empty,
  .results-pane .loading-state,
  .search-preview-focal:not(.is-empty),
  .search-dashboard .dashboard-kpi-chart,
  .search-dashboard .dashboard-kpi-chart .dashboard-kc-area,
  .search-dashboard .dashboard-chart-row .dashboard-card .dashboard-chart-area,
  .search-dashboard .dashboard-kc-bars,
  .search-dashboard .dashboard-kc-bars .b,
  .search-dashboard .dashboard-kc-seg,
  .search-dashboard .dashboard-funnel .dashboard-funnel-row,
  .search-dashboard .dashboard-funnel-bar span,
  .dashboard-sbtn.is-just-activated,
  .hero-submit-btn.is-just-activated,
  [data-ares-morph="true"] .reading-stage-home .reading-home-hero,
  [data-ares-morph="true"] .reading-stage-home .reading-home-metrics .reading-home-metric,
  [data-ares-morph="true"] .reading-stage-home .reading-home-metric-svg,
  [data-ares-morph="true"] .reading-stage-home .reading-home-band i,
  [data-ares-morph="true"] .reading-stage-home .reading-home-bars i,
  [data-ares-morph="true"] .reading-stage-home .reading-home-panel,
  [data-ares-morph="true"] .reading-stage-home .reading-home-preview-panel,
  [data-ares-morph="true"] .reading-stage-home .reading-home-preview-overlay.is-open,
  [data-ares-morph="true"] .reading-stage-home .reading-home-resizer-wrap,
  [data-ares-morph="true"] .reading-stage-home .reading-home-table-head,
  [data-ares-morph="true"] .reading-stage-home .reading-home-table .reading-home-row,
  [data-ares-morph="true"] .reading-stage-home .reading-home-table-foot,
  [data-ares-morph="true"] .reading-stage-home .reading-home-table-empty,
  [data-ares-morph="true"] .reading-stage-home .reading-home-empty,
  [data-ares-morph="true"] .reading-stage .reading-empty,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-metabar,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-icon-rail .reading-rail-btn,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-icon-rail .reading-rail-divider,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-float-panel,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-split .reading-doc-pane,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-split .reading-workbench-pane,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-split .reading-resize-handle,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-metabar .reading-crumb-group,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-metabar .reading-metabar-copy,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-metabar .reading-metabar-actions,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-doc-pane .pane-hdr,
  [data-ares-morph="true"] .reading-stage:not(.reading-stage-home) .reading-workbench-pane .pane-hdr {
    animation: none !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
.reading-pdf-text-layer.textLayer {
  --min-font-size: 1;
  --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));
  --min-font-size-inv: calc(1 / var(--min-font-size));
  caret-color: CanvasText;
  color-scheme: only light;
  forced-color-adjust: none;
  inset: 0;
  line-height: 1;
  opacity: 1;
  overflow: clip;
  pointer-events: auto;
  position: absolute;
  text-align: initial;
  text-size-adjust: none;
  transform-origin: 0 0;
  user-select: text;
  z-index: 2;
}

.reading-pdf-text-layer.textLayer :is(span, br) {
  color: transparent;
  cursor: text;
  position: absolute;
  transform-origin: 0% 0%;
  user-select: text;
  white-space: pre;
}

.reading-pdf-text-layer.textLayer > :not(.markedContent),
.reading-pdf-text-layer.textLayer .markedContent span:not(.markedContent) {
  --font-height: 0;
  --rotate: 0deg;
  --scale-x: 1;
  font-size: calc(var(--text-scale-factor) * var(--font-height));
  transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
  z-index: 1;
}

.reading-pdf-text-layer.textLayer .markedContent {
  display: contents;
}

.reading-pdf-text-layer.textLayer span[role="img"],
.reading-pdf-text-layer.textLayer .endOfContent {
  cursor: default;
  user-select: none;
}

.reading-pdf-text-layer.textLayer ::selection {
  background: color-mix(in srgb, var(--read) 34%, transparent);
}

.sidebar-section--collapse {
  margin-top: auto;
}

.sidebar-collapse-btn.sidebar-action {
  gap: 7px;
}

.sidebar-collapse-btn.sidebar-action:hover {
  background: var(--s2);
}

.sidebar-collapse-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  width: 16px;
}

.desktop-sidebar[data-collapsed="true"] .sidebar-collapse-btn.sidebar-action {
  justify-content: center;
}

.reading-bubble.user {
  justify-content: flex-end;
}

.reading-bubble.user .reading-bubble-content {
  background: var(--read);
  border: 1px solid color-mix(in srgb, var(--read) 86%, #fff);
  box-shadow: 0 10px 24px rgba(94, 106, 210, 0.22), 0 2px 7px rgba(94, 106, 210, 0.16);
  color: #fff;
}

.reading-bubble.user .reading-cite,
.reading-bubble.user .reading-provenance-pill {
  color: #fff;
}

.reading-bubble.is-pending.user {
  animation: readingUserBubbleRise 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transform-origin: bottom right;
}

.reading-bubble.is-typing {
  animation: readingAgentTypingAppear 220ms cubic-bezier(0.16, 1, 0.3, 1) 280ms both;
  opacity: 0;
  transform-origin: bottom left;
}

.reading-typing-dots {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  min-height: 18px;
  padding: 2px 0;
}

.reading-typing-dots i {
  animation: readingTypingPulse 920ms ease-in-out infinite;
  background: var(--read);
  border-radius: 50%;
  display: block;
  height: 5px;
  opacity: 0.35;
  width: 5px;
}

.reading-typing-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.reading-typing-dots i:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes readingUserBubbleRise {
  from {
    opacity: 0;
    transform: translateY(58px) scale(0.96);
  }

  64% {
    opacity: 1;
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes readingAgentTypingAppear {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes readingTypingPulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}
