/* Locus product UI shell — Klein blue + ivory, sans-serif only */

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  --font-sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

html,
body,
button,
input,
textarea,
select,
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
}

html:has(body.locus-shell) {
  scrollbar-gutter: auto;
}

body.locus-shell {
  background: var(--color-canvas);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
}

body.locus-shell main,
body.locus-shell .subpage-main,
body.locus-shell .dashboard {
  display: block;
  padding: 0;
  max-width: none;
  margin: 0 auto;
}

body.locus-shell main.locus-page {
  padding: var(--space-title) 0 var(--space-page-bottom);
}

body.locus-shell main.workspace-page.is-first-visit {
  padding-top: 56px;
}

.page-container {
  width: min(
    calc(100% - 2 * var(--page-gutter-desktop)),
    var(--page-max)
  );
  margin-inline: auto;
}

#app-nav {
  position: sticky;
  top: 0;
  z-index: 40;
}

.locus-header {
  display: block;
  min-height: 64px;
  padding: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.locus-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.locus-brand.logo-home {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  min-height: 64px;
  color: var(--color-brand-700);
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.logo-home::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #002FA7;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
  pointer-events: none;
}

.logo-home:hover {
  transform: translateY(-1px);
}

.logo-home:hover::after {
  transform: scaleX(0.38);
}

.logo-home[aria-current="page"]::after,
.logo-home[aria-current="page"]:hover::after {
  transform: scaleX(1);
}

body.locus-shell .logo-home:focus-visible {
  outline: 2px solid var(--ink-blue);
  outline-offset: 4px;
}

.logo-home::before {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 50;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--carbon);
  color: var(--surface);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 120ms ease, transform 120ms ease;
  transition-delay: 0ms;
}

.logo-home:hover::before {
  opacity: 1;
  transform: none;
  transition-delay: 500ms;
}

@media (prefers-reduced-motion: reduce) {
  .logo-home,
  .logo-home::after,
  .logo-home::before {
    transition: none;
  }
  .logo-home:hover {
    transform: none;
  }
}

.locus-wordmark {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1;
  color: #002FA7;
}

.locus-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.locus-nav-link {
  display: inline-flex;
  align-items: center;
  height: 64px;
  padding: 0 12px;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.locus-nav-link:hover,
.locus-nav-link.is-active {
  color: var(--color-brand-700);
}

.locus-nav-link.is-active {
  border-bottom-color: var(--color-brand-700);
}

.locus-header .header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px 16px;
}

.header-favorites-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--carbon-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.header-favorites-link:hover,
.header-favorites-link.is-active {
  color: var(--ink-blue);
}

.header-favorites-link.is-active {
  font-weight: 600;
}

.locus-header .btn-account-settings {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-radius: var(--radius-pill);
}

body.locus-shell .username-label {
  color: var(--carbon);
  font-weight: 500;
}

.locus-page {
  width: min(
    calc(100% - 2 * var(--page-gutter-desktop)),
    var(--page-max)
  );
  margin-inline: auto;
  padding: var(--space-title) 0 var(--space-page-bottom);
}

.locus-kicker {
  display: none;
}

.locus-title {
  font-family: var(--font-sans);
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  color: var(--carbon);
}

.locus-lede {
  margin-top: var(--space-lede);
  font-size: 16px;
  line-height: 24px;
  color: var(--carbon-muted);
  max-width: 44rem;
}

.locus-lede.is-link {
  color: var(--color-brand-700);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  display: inline;
}

.locus-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.locus-stack > * + * {
  margin-top: var(--space-section);
}

.locus-section-title {
  font-size: 21px;
  line-height: 28px;
  font-weight: 600;
  margin-bottom: var(--space-section-title);
}

.locus-meta {
  font-size: 14px;
  line-height: 22px;
  color: var(--carbon-muted);
}

.locus-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface-muted);
}

.locus-tag.is-required {
  color: var(--carbon);
  background: var(--paper-light);
  border-color: var(--border-default);
}

.locus-tag.is-ai {
  color: var(--color-warning);
  background: var(--color-warning-bg);
}

.locus-tag.is-done {
  color: var(--color-success);
  background: var(--color-success-bg);
}

/* Login: warm paper + Klein-blue halftone, fading before the form */
body.auth-page {
  display: block;
  background: var(--color-canvas);
}

.auth-canvas {
  position: relative;
  min-height: 100vh;
  background: var(--color-canvas);
  overflow: hidden;
}

.auth-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#002FA7 1.2px, transparent 1.35px);
  background-size: 16px 16px;
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 20%, transparent 48%);
  mask-image: linear-gradient(90deg, #000 0%, #000 20%, transparent 48%);
}

.auth-dotmark {
  position: absolute;
  left: 0;
  top: 48%;
  z-index: 0;
  width: min(56vw, 860px);
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
  opacity: 0.55;
}

.auth-dotmark svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

@media (max-width: 640px) {
  .auth-dotmark {
    width: 86vw;
    top: 18%;
    opacity: 0.28;
  }
}

/* Experience sub-navigation: one evidence category at a time. */
.profile-nav-group {
  width: 100%;
}

.profile-nav-sublist {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 3px 0 8px;
  padding-left: 12px;
}

.profile-nav-sublist::before {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 11px;
  width: 1px;
  background: rgba(25, 29, 38, .12);
}

.profile-nav button.profile-nav-subitem {
  position: relative;
  min-height: 34px;
  padding: 6px 8px 6px 14px;
  border-radius: 6px;
  font-size: 12px;
}

.profile-nav button.profile-nav-subitem::before {
  content: "";
  position: absolute;
  left: -3px;
  width: 5px;
  height: 5px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #b2b6be;
}

.profile-nav button.profile-nav-subitem.is-active::before {
  background: var(--ink-blue);
}

.profile-nav button.profile-nav-subitem .profile-nav-state {
  font-size: 10px;
}

body.locus-shell .profile-page-form [data-phd-section="experience"] .phd-language-picker,
body.locus-shell .profile-page-form [data-phd-section="experience"] > .phd-accordion-body > .phd-optional-actions {
  display: none;
}

body.locus-shell .profile-page-form [data-phd-section="experience"] .phd-exp-panel {
  display: none !important;
}

body.locus-shell .profile-page-form [data-phd-section="experience"] .phd-exp-panel.profile-exp-active {
  display: block !important;
}

body.locus-shell .profile-page-form [data-phd-section="experience"] > .phd-accordion-body > .phd-profile-note {
  margin-bottom: 14px;
}

body.locus-shell .profile-page-form [data-phd-section="experience"] .phd-exp-panel.profile-exp-active {
  padding-top: 12px;
  border-top: 0;
}

body.locus-shell .profile-page-form [data-phd-section="experience"] .phd-exp-panel.profile-exp-active > .phd-edu-card-head {
  display: none;
}

.experience-section-lede {
  margin: 0 0 20px;
  max-width: 60ch;
  color: var(--carbon-muted);
  font-size: 13px;
  line-height: 21px;
}

.auth-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 440px);
  gap: clamp(32px, 7vw, 96px);
  align-items: center;
  min-height: 100vh;
  padding: 48px 0;
  max-width: 1120px;
}

.auth-brand .locus-wordmark {
  font-size: 20px;
}

.auth-headline {
  margin-top: 48px;
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.28;
  font-weight: 600;
  color: var(--color-text-primary);
}

.auth-headline span {
  display: block;
}

@media (min-width: 641px) {
  .auth-headline span:nth-child(2),
  .auth-headline span:nth-child(3) {
    display: inline;
  }
}

.auth-lead {
  margin-top: 20px;
  max-width: 36rem;
  font-size: 16px;
  line-height: 26px;
  color: var(--color-text-secondary);
}

.auth-disclaimer {
  margin-top: 12px;
  max-width: 36rem;
  font-size: 13px;
  line-height: 20px;
  color: var(--color-text-tertiary);
}

.auth-form {
  width: 100%;
  max-width: 440px;
}

.auth-form .auth-title {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 600;
  margin-top: -5px;
  margin-bottom: 8px;
  text-align: left;
}

.auth-form .auth-subtitle {
  text-align: left;
  margin-top: 0;
  margin-bottom: 24px;
}

body.auth-page .field input {
  height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
}

body.auth-page .btn-auth {
  height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  background: var(--ink-blue);
  box-shadow: none;
  font-family: var(--font-sans);
}

.auth-privacy {
  margin-top: 24px;
  font-size: 12px;
  line-height: 18px;
  color: var(--color-text-tertiary);
}

/* Workspace */
.workspace-page {
  max-width: 1080px;
}

.workspace-page.is-first-visit {
  max-width: 1200px;
}

.workspace-kicker {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  color: var(--ink-blue);
  text-transform: uppercase;
}

.workspace-page.is-first-visit .locus-title {
  font-size: 40px;
  line-height: 48px;
}

.workspace-page.is-first-visit .workspace-head {
  align-items: flex-start;
}

.workspace-cycle {
  margin-bottom: var(--space-header-content);
}

.workspace-cycle .locus-meta {
  margin-top: 8px;
}

.track-summary-card,
.next-action-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 24px;
  box-shadow: none;
}

.track-summary-card h2,
.next-action-card h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.track-summary-card h3 {
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
}

.track-summary-meta,
.progress-counts {
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.track-summary-actions,
.next-action-card .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.progress-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.recent-finds {
  display: grid;
  gap: 0;
}

.opportunity-mini {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  color: inherit;
  text-decoration: none;
}

.opportunity-mini:last-child { border-bottom: 0; }

.opportunity-mini h3 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

/* Profile document page */
.profile-layout {
  display: grid;
  grid-template-columns: 192px minmax(0, 760px) 240px;
  column-gap: 32px;
  row-gap: 32px;
  align-items: start;
}

.profile-nav,
.profile-aside {
  position: sticky;
  top: 88px;
}

.profile-aside {
  margin-left: 0;
  min-width: 0;
}

.profile-nav a,
.profile-nav button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  color: var(--carbon-muted);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.profile-nav a:hover,
.profile-nav button:hover {
  background: #ECE7DC;
  color: #191D26;
}

.profile-nav a.is-active,
.profile-nav button.is-active,
.profile-nav a.is-active:hover,
.profile-nav button.is-active:hover {
  background: #E9EEFF;
  color: #002FA7;
  font-weight: 600;
}

.profile-nav-state {
  font-size: 12px;
  font-weight: 500;
  color: var(--carbon-muted);
  white-space: nowrap;
}

.profile-nav a.is-active .profile-nav-state,
.profile-nav button.is-active .profile-nav-state {
  color: #002FA7;
}

.profile-aside p {
  font-size: 13px;
  line-height: 20px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.profile-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.profile-draft-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--carbon-muted);
  flex-shrink: 0;
}

.cv-prefill-band {
  padding: 24px 28px;
  background: #E9EEFF;
  border: 0;
  border-left: 3px solid #002FA7;
  border-radius: 0 10px 10px 0;
  box-shadow: none;
}

.cv-prefill-band-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.cv-prefill-copy h2 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  color: var(--carbon);
}

.cv-prefill-lede {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--carbon-muted);
}

.cv-prefill-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--carbon-faint);
}

.cv-prefill-ops {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cv-selected-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--carbon);
}

.profile-manual-split {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  font-size: 13px;
  line-height: 1;
  color: var(--carbon-muted);
}

.profile-manual-split::before,
.profile-manual-split::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.profile-form-surface {
  background: #FFFDF8;
  border: 1px solid rgba(25, 29, 38, 0.12);
  border-radius: 10px;
  padding: 32px;
  box-shadow: none;
  max-width: 760px;
}

.profile-form-surface > .locus-section-title {
  margin: 0 0 8px;
}

.profile-form-section {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.profile-form-section + .profile-form-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(25, 29, 38, 0.10);
}

.profile-form-surface .profile-field + .profile-field,
.profile-form-surface .phd-question-stack > .profile-field + .profile-field,
body.locus-shell .profile-form-surface .phd-question-stack > label + label {
  margin-top: 24px;
}

.profile-form-surface .phd-question-stack {
  gap: 0;
}

.profile-form-surface .phd-profile-note {
  margin: 0 0 24px;
}

.profile-form-surface .phd-field-hint {
  margin: 0 0 24px;
}

.profile-form-surface label {
  margin-bottom: 0;
}

.profile-form-surface label input,
.profile-form-surface label select,
.profile-form-surface label textarea {
  margin-top: 8px;
}

.profile-aside .locus-section-title {
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
}

.profile-aside .locus-section-title::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-bottom: 10px;
  background: #002FA7;
}

.profile-form-surface .phd-profile-builder,
.profile-form-surface .phd-accordion,
.profile-form-surface .phd-accordion-body,
.profile-form-surface .phd-edu-card,
.profile-form-surface .phd-lang-card,
.profile-form-surface .phd-exp-panel,
.profile-form-surface .phd-field-cluster,
.profile-form-surface .phd-gpa-cluster,
.profile-form-surface .phd-direction-block,
.profile-form-surface .phd-direction-disciplines,
.profile-form-surface .phd-advanced-fold,
.profile-form-surface .phd-language-picker,
.profile-form-surface .phd-search-strategy-block,
.profile-form-surface .draft-restore-banner {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.profile-form-surface .phd-edu-card + .phd-edu-card {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(25, 29, 38, 0.10);
}

.profile-form-surface .phd-field-cluster-title {
  color: var(--carbon);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  margin: 0 0 8px;
}

.profile-form-surface .phd-edu-card-title {
  font-size: 15px;
  font-weight: 600;
}

.profile-form-surface .phd-edu-card-head {
  margin-bottom: 4px;
}

.profile-form-surface .phd-edu-summary-text {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--carbon-muted);
  white-space: pre-line;
}

.profile-form-surface .phd-edu-card:not(.is-editing) .phd-edu-card-fields {
  display: none;
}

.profile-form-surface .phd-edu-card.is-editing .phd-edu-summary-text {
  display: none;
}

.profile-form-surface .phd-edu-card-fields {
  margin-top: 16px;
}

.profile-form-surface .phd-edu-card-fields > * + * {
  margin-top: 16px;
}

.add-education-action {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0;
  color: #002FA7;
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.add-education-action:hover {
  color: #00237E;
  text-decoration: underline;
  text-underline-offset: 4px;
  background: transparent;
}

.add-education-stage {
  margin-top: 16px;
  padding-left: 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.add-education-stage-title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--carbon);
}

.add-education-stage-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.edu-text-action {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #002FA7;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.edu-text-action:hover {
  color: #00237E;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phd-edu-card-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.profile-form-col {
  min-width: 0;
  max-width: 760px;
  width: 100%;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 760px;
  margin-top: 24px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  position: static;
}

body.locus-shell .profile-main .btn-draft:hover,
body.locus-shell .profile-main .btn-cancel:hover {
  background: #ECE7DC;
  color: #191D26;
  opacity: 1;
}

body.locus-shell .profile-main .btn-save {
  transition: background 150ms ease, transform 150ms ease;
}

body.locus-shell .profile-main .btn-save:hover:not(:disabled) {
  background: #00237E;
  transform: translateY(-1px);
  box-shadow: none;
}

body.locus-shell .profile-main .btn-save:disabled,
body.locus-shell .profile-main .btn-save:disabled:hover {
  transform: none;
  opacity: 0.45;
  cursor: not-allowed;
}

body.locus-shell #modal-overlay.profile-page-form {
  position: static;
  display: block;
  background: none;
  padding: 0;
}

body.locus-shell #modal-overlay.profile-page-form.hidden {
  display: block;
}

body.locus-shell .profile-page-form .modal.modal-phd-form {
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

body.locus-shell .profile-page-form .phd-accordion {
  border: 0;
  border-radius: 0;
  background: transparent;
  margin-bottom: 0;
  box-shadow: none;
  overflow: visible;
}

.profile-form-surface .btn-phd-lang-hide {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #002FA7;
  padding: 0;
}

.profile-form-surface .btn-phd-lang-hide:hover {
  background: transparent;
  color: #00237E;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.locus-shell .profile-form-surface .phd-profile-builder {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  max-height: none;
  overflow: visible;
}

body.locus-shell .profile-page-form .phd-accordion:not([open]) {
  display: none;
}

body.locus-shell .profile-page-form .phd-accordion > summary {
  display: none;
}

body.locus-shell .profile-page-form .phd-accordion-body {
  padding: 0;
  border: 0;
}

body.locus-shell .profile-page-form .phd-profile-section {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

body.locus-shell #phd-mode-group {
  display: none !important;
}

body.locus-shell .phd-options {
  background: transparent;
  border: 0;
  box-shadow: none;
  max-width: none;
  max-height: none;
  overflow: visible;
  width: 100%;
  padding: 0;
}

body.locus-shell .phd-memo-summary {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
}

body.locus-shell .phd-item {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: none;
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

body.locus-shell .phd-item:hover {
  border-color: var(--border-default);
  background: var(--paper-light);
}

body.locus-shell .profile-page-form .cv-prefill-section {
  display: none;
}

body.locus-shell .profile-page-form .cv-prefill-section h3 {
  color: var(--color-text-primary);
  font-size: 15px;
  margin-bottom: 4px;
}

body.locus-shell .profile-page-form .cv-privacy-notice,
body.locus-shell .profile-page-form .cv-prefill-section p {
  color: var(--color-text-secondary);
}

body.locus-shell .profile-page-form #cv-pdf-file {
  background: var(--surface);
  color: var(--carbon);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
}

body.locus-shell .profile-page-form .btn-cv-prefill {
  background: var(--ink-blue);
  color: #fff;
  border-radius: var(--radius-sm);
  height: var(--control-height);
  min-height: var(--control-height);
  box-shadow: none;
}

body.locus-shell .cv-prefill-band .cv-prefill-status,
body.locus-shell .cv-prefill-band .cv-prefill-status.parsing,
body.locus-shell .cv-prefill-band .cv-prefill-status.pending,
body.locus-shell .cv-prefill-band .cv-prefill-status.imported,
body.locus-shell .cv-prefill-band .cv-prefill-status.error {
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  line-height: 20px;
}

body.locus-shell .cv-prefill-band .cv-prefill-status.parsing,
body.locus-shell .cv-prefill-band .cv-prefill-status.pending {
  color: var(--ink-blue);
}

body.locus-shell .cv-prefill-band .cv-prefill-status.imported {
  color: var(--color-success);
}

body.locus-shell .cv-prefill-band .cv-prefill-status.error {
  color: var(--color-danger);
}

body.locus-shell .cv-prefill-band .cv-prefill-review {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 47, 167, 0.12);
}

body.locus-shell .cv-prefill-band .cv-prefill-review h3,
body.locus-shell .cv-prefill-band .cv-prefill-review h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--carbon);
}

body.locus-shell .cv-prefill-band .cv-prefill-content {
  max-height: none;
  overflow: visible;
  margin: 0 0 16px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

body.locus-shell .cv-prefill-band .cv-field-label {
  color: var(--carbon-muted);
  text-transform: none;
  letter-spacing: 0;
}

body.locus-shell .cv-prefill-band .cv-field-value {
  background: rgba(255, 255, 255, 0.72);
  color: var(--carbon);
}

body.locus-shell .cv-prefill-band .cv-field-empty {
  color: var(--carbon-faint);
}

body.locus-shell .cv-prefill-band .cv-field-confirmation {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(25, 29, 38, 0.12);
}

body.locus-shell .profile-main .phd-language-picker label {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

@media (max-width: 800px) {
  .cv-prefill-band-main {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Explore */
.explore-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.track-selector-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.track-selector {
  position: relative;
}

.track-selector-btn,
.export-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--control-height-sm);
  height: var(--control-height-sm);
  padding: 0 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  cursor: pointer;
}

.track-selector-menu,
.export-menu-list,
.card-more-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  min-width: 220px;
  padding: 8px 0;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-menu);
}

.track-selector-menu a,
.track-selector-menu button,
.export-menu-list button,
.card-more-menu a,
.card-more-menu button {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.track-selector-menu a:hover,
.track-selector-menu button:hover,
.export-menu-list button:hover,
.card-more-menu a:hover,
.card-more-menu button:hover {
  background: var(--color-brand-050);
}

.explore-anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0 32px;
  font-size: 14px;
}

.explore-anchors a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.explore-anchors a:hover {
  color: var(--color-brand-700);
}

.explore-section {
  padding: 0 0 var(--space-section);
}

.explore-section > h2 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: var(--space-section-title);
}

.search-conditions {
  font-size: 14px;
  line-height: 22px;
  color: var(--color-text-secondary);
}

.explore-shell {
  display: grid;
  grid-template-columns: minmax(420px, 440px) minmax(640px, 1fr);
  gap: 24px;
  align-items: start;
}

.explore-list-col {
  min-width: 0;
}

.explore-filters {
  margin-bottom: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.explore-filters summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
}

.explore-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.explore-detail {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 112px);
  overflow: auto;
}

body.locus-shell .explore-list.phd-list,
body.locus-shell .phd-list.explore-list {
  max-height: none;
  overflow: visible;
  padding: 0;
}

body.locus-shell .phd-memo-content {
  max-height: none;
  overflow: visible;
}

body.locus-shell .explore-list .phd-item.is-selected {
  background: var(--ink-blue-pale);
  border-color: transparent;
  box-shadow: inset 2px 0 0 var(--ink-blue);
}

.phd-item-compact .phd-item-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.phd-item-compact .phd-item-meta,
.phd-item-compact .phd-item-reason {
  margin-top: 6px;
  font-size: 14px;
  line-height: 22px;
  color: var(--carbon-muted);
}

.phd-item-compact .phd-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.search-stage {
  padding: 0 0 16px;
}

.search-stage ol {
  list-style: none;
  margin-top: 12px;
}

.search-stage li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.search-stage li.is-current {
  color: var(--color-brand-700);
  font-weight: 600;
}

.search-stage li.is-done { color: var(--color-success); }

.disclaimer {
  font-size: 13px;
  line-height: 20px;
  color: var(--color-text-secondary);
  padding: 0 0 16px;
}

.ai-judgment {
  background: var(--color-brand-050);
  border-left: 2px solid var(--color-brand-700);
  padding: 8px 12px;
  margin: 8px 0;
}

.evidence-block {
  border-top: 1px solid var(--color-border);
  margin-top: 12px;
  padding-top: 12px;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.pipeline-col {
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.pipeline-col h2 {
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 12px;
}

.pipeline-card {
  border-top: 1px solid var(--color-border);
  padding: 12px 0;
}

.pipeline-card select,
.pipeline-card input,
.pipeline-card textarea {
  width: 100%;
  margin-top: 6px;
  font: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  padding: 6px 8px;
  background: var(--color-surface);
}

.export-menu {
  position: relative;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body.locus-shell .phd-workspace-main {
  max-width: none;
  padding: var(--space-title) 0 var(--space-page-bottom);
}

#phd-list-mode .phd-workspace-panel {
  max-width: 760px;
}

body.locus-shell .phd-doc-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.locus-shell .phd-doc-card {
  min-height: 0;
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: none;
}

body.locus-shell .phd-doc-card:hover {
  transform: none;
  box-shadow: none;
}

body.locus-shell .phd-doc-card-top {
  position: relative;
}

.card-more {
  position: relative;
}

.card-more-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  font-size: 18px;
  letter-spacing: 1px;
  cursor: pointer;
  color: var(--carbon-muted);
  border-radius: var(--radius-sm);
}

.card-more-btn:hover {
  background: var(--paper-light);
  color: var(--carbon);
}

body.locus-shell a:focus-visible,
body.locus-shell button:focus-visible,
body.locus-shell input:focus-visible,
body.locus-shell select:focus-visible,
body.locus-shell textarea:focus-visible {
  outline: 2px solid var(--color-brand-600);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1280px) {
  .explore-shell {
    grid-template-columns: minmax(420px, 440px) minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .profile-layout {
    grid-template-columns: 192px minmax(0, 1fr);
    column-gap: 32px;
  }
  .profile-aside { display: none; }
  .profile-module-note { display: block; }
}

@media (max-width: 1024px) {
  .page-container,
  .locus-page {
    width: min(calc(100% - 2 * var(--page-gutter-tablet)), var(--page-max));
  }
  .locus-header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 0;
  }
}

@media (max-width: 900px) {
  .explore-shell,
  .auth-layout,
  .pipeline-board {
    grid-template-columns: 1fr;
  }
  .explore-detail {
    position: static;
    max-height: none;
  }
}

@media (max-width: 800px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-nav,
  .profile-aside {
    position: static;
  }
  .profile-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .profile-nav a,
  .profile-nav button {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
  }
  .profile-nav a:hover,
  .profile-nav button:hover {
    background: #ECE7DC;
    color: #191D26;
  }
  .profile-nav a.is-active,
  .profile-nav button.is-active {
    border: 0;
    background: #E9EEFF;
    color: #002FA7;
  }
}

@media (max-width: 640px) {
  .page-container,
  .locus-page {
    width: min(calc(100% - 2 * var(--page-gutter-mobile)), var(--page-max));
  }
  .auth-headline span { display: block; }
}

.text-link {
  color: var(--color-brand-700);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.workspace-head,
.search-summary-row,
.profile-status-row,
.explore-page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.onboard-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 420px;
  padding: 56px 64px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.onboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(#002FA7 1.15px, transparent 1.3px);
  background-size: 36px 13px;
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(105deg, #000 0%, #000 28%, transparent 68%);
  mask-image: linear-gradient(105deg, #000 0%, #000 28%, transparent 68%);
}

.onboard-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 48px 96px;
  align-items: start;
}

.onboard-step-num {
  margin: 0 0 20px;
  font-size: 72px;
  line-height: 0.88;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink-blue);
  font-variant-numeric: tabular-nums;
}

.onboard-hero-copy h2 {
  margin: 0;
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  color: var(--carbon);
}

.onboard-hero-lede {
  margin: 12px 0 28px;
  max-width: 22em;
  font-size: 16px;
  line-height: 26px;
  color: var(--carbon-muted);
}

.onboard-hero-cta {
  display: inline-flex;
}

.onboard-hero-hint {
  margin-top: 16px;
  font-size: 13px;
  line-height: 20px;
  color: var(--carbon-faint);
}

.onboard-path {
  padding-top: 12px;
}

.onboard-path-title {
  margin: 0 0 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--carbon-muted);
}

.onboard-path-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.onboard-path-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  position: relative;
  padding-bottom: 28px;
}

.onboard-path-step:last-child {
  padding-bottom: 0;
}

.onboard-path-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 4px;
  width: 1px;
  background: var(--border-subtle);
}

.onboard-path-index {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--carbon-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.onboard-path-step.is-current .onboard-path-index {
  border-color: var(--ink-blue);
  background: var(--ink-blue);
  color: #fff;
}

.onboard-path-name {
  margin: 2px 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--carbon);
}

.onboard-path-desc {
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--carbon-muted);
}

@media (max-width: 900px) {
  .onboard-hero {
    padding: 36px 28px;
  }
  .onboard-hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .onboard-step-num {
    font-size: 56px;
  }
  .workspace-page.is-first-visit .locus-title {
    font-size: 32px;
    line-height: 40px;
  }
}

.onboard-card,
.workspace-track-card,
.favorite-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 24px;
  box-shadow: none;
}

.workspace-track-list,
.favorites-grid {
  display: grid;
  gap: var(--space-card);
}

.favorites-page {
  max-width: 1080px;
}

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

.favorite-card {
  min-height: 132px;
}

.workspace-track-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.workspace-track-card:hover {
  border-color: var(--border-default);
}

.workspace-track-card h3 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  color: var(--carbon);
}

.workspace-track-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  min-height: 100%;
}

.track-intent {
  margin-top: 8px;
  font-size: 14px;
  line-height: 22px;
  color: var(--color-text-secondary);
}

.profile-status-row {
  margin: 0 0 var(--space-section);
  padding: 0;
}

.search-summary-row {
  margin: 0 0 var(--space-header-content);
  padding: 0;
  align-items: center;
}

.basis-summary {
  margin-top: 8px;
  max-width: 42rem;
  font-size: 14px;
  line-height: 22px;
  color: var(--color-text-secondary);
}

.direction-settings-panel {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: var(--space-section);
  background: var(--surface);
  box-shadow: none;
}

.direction-settings-panel label {
  display: block;
  margin: var(--space-field) 0;
  font-size: 14px;
  font-weight: 600;
}

.direction-settings-panel input,
.direction-settings-panel textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  font: inherit;
  font-weight: 400;
}

.empty-results {
  padding: 24px 0;
}

.explore-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.locus-shell .profile-page-form .phd-memo-title-field,
body.locus-shell .profile-page-form [data-phd-section="direction"] {
  display: none !important;
}

body.locus-shell .profile-page-form,
body.locus-shell .profile-page-form .modal,
body.locus-shell .profile-page-form .phd-profile-builder,
body.locus-shell .profile-page-form .modal.modal-phd-form {
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}

/* Review 04 — control scale, radius map, no card shadows */
body.locus-shell {
  font-size: 15px;
  line-height: 1.5;
  color: var(--carbon);
}

body.locus-shell .btn,
body.locus-shell .btn-draft,
body.locus-shell .btn-cancel,
body.locus-shell .btn-cv-prefill,
body.locus-shell .btn-apply-cv-prefill,
body.locus-shell .btn-dismiss-cv-prefill {
  border-radius: var(--radius-sm);
  min-height: var(--control-height-sm);
  height: var(--control-height-sm);
  box-shadow: none;
}

body.locus-shell .btn-save,
body.locus-shell .btn-auth {
  border-radius: var(--radius-sm);
  min-height: var(--control-height);
  height: var(--control-height);
}

body.locus-shell input[type="text"],
body.locus-shell input[type="number"],
body.locus-shell input[type="password"],
body.locus-shell input[type="url"],
body.locus-shell input[type="email"],
body.locus-shell select {
  height: var(--control-height);
  min-height: var(--control-height);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--surface);
  color: var(--carbon);
  font-size: 15px;
  padding: 0 12px;
  box-shadow: none;
}

body.locus-shell textarea {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--surface);
  color: var(--carbon);
  font-size: 15px;
  line-height: 1.5;
  padding: 12px;
  min-height: 88px;
  box-shadow: none;
}

body.locus-shell input:focus,
body.locus-shell select:focus,
body.locus-shell textarea:focus {
  border-color: transparent;
  outline: 2px solid var(--ink-blue);
  outline-offset: 2px;
}

body.locus-shell .profile-page-form label,
body.locus-shell .phd-profile-builder label,
body.locus-shell .direction-settings-panel label {
  font-size: 14px;
  font-weight: 600;
  color: var(--carbon);
}

body.locus-shell .phd-profile-note,
body.locus-shell .profile-module-note {
  font-size: 14px;
  line-height: 22px;
  color: var(--carbon-muted);
}

.profile-module-note {
  display: none;
  margin: 0 0 16px;
}

@media (max-width: 1100px) {
  .profile-module-note { display: block; }
}

body.locus-shell .memo-card,
body.locus-shell .phd-doc-card,
body.locus-shell .workspace-track-card,
body.locus-shell .favorite-card,
body.locus-shell .onboard-card,
body.locus-shell .direction-settings-panel {
  box-shadow: none;
}

body.locus-shell .memo-card:hover,
body.locus-shell .phd-doc-card:hover {
  box-shadow: none;
  transform: none;
}

.facet-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.facet-chip,
.favorites-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--carbon);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.facet-chip.is-active,
.favorites-chip.is-active {
  border-color: var(--ink-blue);
  background: var(--ink-blue-pale);
  color: var(--ink-blue);
}

.facet-chip .facet-count {
  margin-left: 6px;
  color: var(--carbon-muted);
  font-weight: 500;
}

.facet-chip.is-active .facet-count {
  color: var(--ink-blue);
}

.explore-filters-advanced {
  margin: 0 0 16px;
}

.explore-filters-advanced summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--carbon-muted);
  padding: 8px 0;
}

.favorites-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 0 0 var(--space-header-content);
}

.favorites-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.favorites-toolbar-end {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.favorite-card .phd-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.favorite-card h3 {
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  color: var(--carbon);
}

.favorite-scan-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--carbon-muted);
}

.favorite-card details.favorite-more {
  margin-top: 12px;
}

.favorite-card details.favorite-more summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-blue);
  list-style: none;
}

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

.workspace-track-actions .card-more-menu {
  left: auto;
  right: 0;
}

  .results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-section-title);
  }

.explore-list-col .explore-filters,
.explore-list-col .facet-row {
  position: relative;
}

body.locus-shell .phd-question-stack > * + *,
body.locus-shell .phd-profile-builder .phd-question-stack > label + label {
  margin-top: var(--space-field);
}

body.locus-shell .modal:not(.modal-phd-form) {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
}

body.locus-shell .tooltip,
body.locus-shell [role="tooltip"] {
  border-radius: 6px;
}

body.locus-shell .phd-workspace-title {
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  color: var(--carbon);
}

body.locus-shell .phd-workspace-desc {
  margin-top: var(--space-lede);
  font-size: 16px;
  color: var(--carbon-muted);
}

body.locus-shell .phd-doc-card,
body.locus-shell .phd-empty-state,
body.locus-shell .feature-card {
  border-radius: var(--radius-md);
  box-shadow: none;
}

body.locus-shell .phd-doc-card:hover,
body.locus-shell .feature-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-default);
}

body.locus-shell .phd-region-btn,
body.locus-shell .phd-mode-btn,
body.locus-shell .phd-prec-btn {
  border-radius: var(--radius-sm);
  min-height: 40px;
}

body.locus-shell .phd-region-btn.active,
body.locus-shell .phd-mode-btn.active,
body.locus-shell .phd-prec-btn.active {
  border-color: var(--ink-blue);
  background: var(--ink-blue-pale);
  color: var(--carbon);
}

body.locus-shell #cv-pdf-file::file-selector-button {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--carbon);
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}

body.locus-shell #cv-pdf-file::file-selector-button:hover {
  background: var(--paper-light);
  border-color: var(--border-default);
}

.onboard-card {
  max-width: 640px;
}

body.locus-shell .phd-empty-state {
  background: transparent;
  border: 0;
  padding: 24px 0 8px;
  box-shadow: none;
  text-align: left;
}

@media (max-width: 820px) {
  body.locus-shell .phd-workspace-main {
    padding: var(--space-title) 0 var(--space-page-bottom);
  }
}

/* Workspace refinement — clearer hierarchy without changing product behavior */
.workspace-page:not(.is-first-visit) {
  max-width: 1180px;
}

.workspace-page:not(.is-first-visit) .workspace-head {
  align-items: flex-end;
  margin-bottom: 28px;
}

.workspace-eyebrow,
.workspace-section-index {
  margin: 0 0 8px;
  color: var(--ink-blue);
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: .14em;
}

.workspace-intro {
  margin: 8px 0 0;
  color: var(--carbon-muted);
  font-size: 15px;
  line-height: 24px;
}

.workspace-page:not(.is-first-visit) .profile-status-row {
  align-items: center;
  margin-bottom: 56px;
  padding: 18px 20px;
  border: 1px solid rgba(31, 122, 85, .18);
  border-radius: var(--radius-md);
  background: rgba(234, 246, 239, .55);
}

.profile-status-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.profile-status-mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-success);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.profile-status-label {
  margin: 0;
  color: var(--carbon);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.profile-status-detail {
  margin: 2px 0 0;
  color: var(--carbon-muted);
  font-size: 13px;
  line-height: 20px;
}

.profile-status-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
}

.workspace-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.workspace-section-head .locus-section-title {
  margin: 0;
  font-size: 22px;
  line-height: 30px;
}

.workspace-section-index {
  margin-bottom: 2px;
}

.workspace-section-count {
  margin: 0 0 4px;
  color: var(--carbon-faint);
  font-size: 13px;
}

.workspace-section-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.workspace-section-actions .workspace-section-count {
  margin: 0;
}

.workspace-page:not(.is-first-visit) .workspace-track-list {
  gap: 12px;
}

.workspace-page:not(.is-first-visit) .workspace-track-card {
  position: relative;
  align-items: center;
  min-height: 152px;
  padding: 26px 28px 24px;
  border-color: rgba(17, 24, 39, .12);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.workspace-page:not(.is-first-visit) .workspace-track-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  border-radius: 2px;
  background: var(--ink-blue);
  opacity: 0;
  transition: opacity 160ms ease;
}

.workspace-page:not(.is-first-visit) .workspace-track-card:hover {
  border-color: rgba(0, 47, 167, .28);
  background: #fffefa;
}

.workspace-page:not(.is-first-visit) .workspace-track-card:hover::before {
  opacity: 1;
}

.workspace-page:not(.is-first-visit) .workspace-track-card h3 {
  max-width: 760px;
  font-size: 21px;
  line-height: 29px;
  letter-spacing: -.01em;
}

.workspace-page:not(.is-first-visit) .track-intent {
  max-width: 760px;
  margin-top: 7px;
}

.workspace-page:not(.is-first-visit) .track-summary-meta {
  margin-top: 14px;
  color: var(--carbon-faint);
  font-size: 12px;
  line-height: 18px;
}

.workspace-page:not(.is-first-visit) .workspace-track-actions {
  min-width: 128px;
}

@media (max-width: 720px) {
  .workspace-page:not(.is-first-visit) .workspace-head {
    align-items: flex-start;
  }

  .workspace-page:not(.is-first-visit) .profile-status-row {
    align-items: flex-start;
    margin-bottom: 40px;
  }

  .profile-status-link {
    margin-left: 46px;
  }

  .workspace-page:not(.is-first-visit) .workspace-track-card {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 22px;
  }

  .workspace-page:not(.is-first-visit) .workspace-track-actions {
    width: 100%;
    min-width: 0;
    flex-direction: row-reverse;
    align-items: center;
  }
}

#section-runs {
  margin-top: 8px;
  padding: 0;
  border-top: 1px solid var(--border-subtle);
}

#section-runs > summary {
  cursor: pointer;
  padding: 20px 0;
  color: var(--carbon-muted);
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
}

#section-runs[open] > summary {
  color: var(--carbon);
}

#section-runs .phd-result-runs {
  padding: 0 0 24px;
}

#section-runs .phd-result-runs-bar {
  padding: 0;
  border: 0;
  background: transparent;
}

#section-runs .phd-result-run-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#section-runs .phd-run-pill {
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: var(--surface);
}

#section-runs .phd-run-pill.active {
  border-color: rgba(0, 47, 167, .28);
  background: var(--ink-blue-pale);
}

/* Profile form refinement — compact, readable repeated-entry forms */
.profile-form-surface {
  padding: 28px 30px 32px;
}

.profile-form-surface > .locus-section-title {
  font-size: 21px;
  line-height: 29px;
}

body.locus-shell .profile-form-surface label,
body.locus-shell .profile-form-surface .phd-profile-builder label {
  color: #2c3038;
  font-size: 13px;
  line-height: 19px;
  font-weight: 600;
}

body.locus-shell .profile-form-surface input[type="text"],
body.locus-shell .profile-form-surface input[type="number"],
body.locus-shell .profile-form-surface input[type="url"],
body.locus-shell .profile-form-surface input[type="email"],
body.locus-shell .profile-form-surface select {
  height: 42px;
  min-height: 42px;
  font-size: 14px;
}

body.locus-shell .profile-form-surface textarea {
  min-height: 82px;
  font-size: 14px;
  line-height: 21px;
}

.profile-form-surface label input,
.profile-form-surface label select,
.profile-form-surface label textarea {
  margin-top: 6px;
}

.profile-form-surface .profile-field + .profile-field,
.profile-form-surface .phd-question-stack > .profile-field + .profile-field,
body.locus-shell .profile-form-surface .phd-question-stack > label + label {
  margin-top: 20px;
}

.profile-form-surface .phd-profile-note {
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 21px;
}

.profile-form-surface .phd-field-hint {
  margin: 3px 0 8px;
  color: #757c89;
  font-size: 12px;
  line-height: 18px;
}

.profile-form-surface .profile-form-section + .profile-form-section {
  margin-top: 28px;
  padding-top: 24px;
}

.profile-form-surface .phd-field-cluster-title {
  font-size: 14px;
  line-height: 21px;
}

/* Give each experience type a quiet section boundary. */
.profile-form-surface .phd-exp-panel {
  padding: 22px 0 4px;
  border-top: 1px solid rgba(25, 29, 38, .10);
}

.profile-form-surface .phd-exp-panel + .phd-exp-panel {
  margin-top: 24px;
}

.profile-form-surface .phd-exp-panel > .phd-edu-card-head {
  margin-bottom: 16px;
}

.profile-form-surface .phd-exp-panel > .phd-edu-card-head strong {
  color: var(--carbon);
  font-size: 14px;
  line-height: 21px;
  font-weight: 650;
}

#phd-research-output-list,
#phd-research-experience-list,
#phd-project-experience-list {
  counter-reset: profile-entry;
}

.profile-form-surface .phd-research-output-row,
.profile-form-surface .phd-research-experience-row,
.profile-form-surface .phd-project-experience-row {
  counter-increment: profile-entry;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  margin: 0;
  padding: 20px 0 16px;
  border: 0;
  border-top: 1px solid rgba(25, 29, 38, .10);
  border-radius: 0;
  background: transparent;
}

.profile-form-surface .phd-research-output-row::before,
.profile-form-surface .phd-research-experience-row::before,
.profile-form-surface .phd-project-experience-row::before {
  content: "记录 " counter(profile-entry, decimal-leading-zero);
  position: static;
  grid-column: 1 / -1;
  color: var(--carbon-muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: .08em;
}

.profile-form-surface .phd-research-output-row > label:first-of-type,
.profile-form-surface .phd-research-experience-row > label:first-of-type,
.profile-form-surface .phd-project-experience-row > label:first-of-type {
  grid-column: 1 / -1;
}

.profile-form-surface .phd-research-output-row .phd-field-hint,
.profile-form-surface .phd-research-experience-row .phd-field-hint,
.profile-form-surface .phd-project-experience-row .phd-field-hint {
  min-height: 36px;
  margin-bottom: 5px;
  font-weight: 400;
}

.profile-form-surface .phd-remove-output,
.profile-form-surface .phd-remove-research-experience,
.profile-form-surface .phd-remove-project-experience,
.profile-form-surface .phd-remove-evidence-record {
  justify-self: start;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #002FA7;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.profile-form-surface .phd-remove-output:hover,
.profile-form-surface .phd-remove-research-experience:hover,
.profile-form-surface .phd-remove-project-experience:hover,
.profile-form-surface .phd-remove-evidence-record:hover {
  border: 0;
  background: transparent;
  color: #00237E;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-form-surface #phd-add-research-output,
.profile-form-surface #phd-add-research-experience,
.profile-form-surface #phd-add-project-experience {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #002FA7;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.profile-form-surface #phd-add-research-output:hover,
.profile-form-surface #phd-add-research-experience:hover,
.profile-form-surface #phd-add-project-experience:hover {
  border: 0;
  background: transparent;
  color: #00237E;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 640px) {
  .profile-form-surface {
    padding: 24px 20px 28px;
  }

  .profile-form-surface .phd-research-output-row,
  .profile-form-surface .phd-research-experience-row,
  .profile-form-surface .phd-project-experience-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 0 14px;
  }

  .profile-form-surface .phd-research-output-row > label:first-of-type,
  .profile-form-surface .phd-research-experience-row > label:first-of-type,
  .profile-form-surface .phd-project-experience-row > label:first-of-type {
    grid-column: auto;
  }

  .profile-form-surface .phd-research-output-row .phd-field-hint,
  .profile-form-surface .phd-research-experience-row .phd-field-hint,
  .profile-form-surface .phd-project-experience-row .phd-field-hint {
    min-height: 0;
  }
}

/* Direct education editing: degree choice reveals fields without a second click. */
body.locus-shell .profile-page-form .phd-edu-card:not(.hidden) .phd-edu-card-fields {
  display: block;
  margin-top: 12px;
}

body.locus-shell .profile-page-form .phd-edu-card:not(.hidden) .phd-edu-summary-text,
body.locus-shell .profile-page-form .phd-edu-card [data-edu-edit] {
  display: none;
}

body.locus-shell .profile-page-form .phd-edu-card:not(.hidden) {
  padding-top: 4px;
}

/* Each publication record owns its status; the old outer selector remains as hidden compatibility state. */
body.locus-shell .profile-page-form .phd-research-output-editor > label:first-child {
  display: none;
}

body.locus-shell .profile-page-form #phd-research-output-list {
  display: block !important;
}

body.locus-shell .profile-page-form #phd-add-research-output {
  display: inline-flex !important;
}

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

.work-summary-guide span {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--carbon-muted);
  font-size: 12px;
  line-height: 18px;
}

.work-summary-guide strong {
  display: block;
  margin-bottom: 2px;
  color: var(--carbon);
  font-size: 12px;
  font-weight: 600;
}

body.locus-shell .profile-page-form [data-phd-section="language"] .add-education-action {
  margin-bottom: 8px;
}

body.locus-shell .profile-page-form [data-phd-section="language"] .phd-lang-card + .phd-lang-card {
  margin-top: 20px;
}

@media (max-width: 640px) {
  .work-summary-guide {
    grid-template-columns: 1fr;
  }
}

/* CV review uses the existing Locus action hierarchy. */
body.locus-shell .cv-prefill-band .cv-prefill-review {
  margin-top: 20px;
  padding-top: 20px;
}

body.locus-shell .cv-prefill-band .cv-prefill-review h3 {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 24px;
}

body.locus-shell .cv-prefill-band .cv-field-group {
  margin-bottom: 14px;
}

body.locus-shell .cv-prefill-band .cv-field-label {
  margin-bottom: 5px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
}

body.locus-shell .cv-prefill-band .cv-field-value {
  padding: 9px 11px;
  border: 1px solid rgba(25, 29, 38, .10);
  border-radius: 6px;
  font-size: 13px;
  line-height: 20px;
}

body.locus-shell .cv-prefill-band .cv-field-confirmation {
  padding: 10px 11px;
  border-color: rgba(166, 83, 33, .22);
  border-radius: 6px;
  background: rgba(255, 241, 229, .72);
}

body.locus-shell .cv-prefill-band .cv-field-confirmation-label {
  color: var(--color-warning);
  font-size: 12px;
  line-height: 18px;
}

body.locus-shell .cv-prefill-band .cv-field-confirmation-value {
  color: var(--carbon);
  font-size: 13px;
  line-height: 20px;
}

body.locus-shell .cv-prefill-band .cv-prefill-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

body.locus-shell .cv-prefill-band .btn-apply-cv-prefill {
  order: 2;
  border: 1px solid var(--ink-blue);
  background: var(--ink-blue);
  color: #fff;
}

body.locus-shell .cv-prefill-band .btn-apply-cv-prefill:hover {
  border-color: var(--ink-blue-hover);
  background: var(--ink-blue-hover);
  color: #fff;
  transform: none;
}

body.locus-shell .cv-prefill-band .btn-dismiss-cv-prefill {
  order: 1;
  border: 1px solid var(--border-default);
  background: rgba(255, 253, 248, .72);
  color: var(--carbon-muted);
}

body.locus-shell .cv-prefill-band .btn-dismiss-cv-prefill:hover {
  border-color: var(--border-default);
  background: var(--paper-light);
  color: var(--carbon);
  transform: none;
}

/* Workspace always exposes profile + directions after the first saved draft. */
.profile-status-row.is-incomplete {
  border-color: rgba(0, 47, 167, .14);
  background: rgba(233, 238, 255, .42);
}

.profile-status-row.is-incomplete .profile-status-mark {
  background: var(--ink-blue-pale);
  color: var(--ink-blue);
  font-size: 10px;
}

.workspace-head .btn:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.workspace-track-empty {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  min-height: 132px;
  padding: 24px 28px;
  border: 1px dashed rgba(25, 29, 38, .18);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, .45);
}

.workspace-track-empty h3 {
  margin: 0;
  font-size: 17px;
  line-height: 25px;
  font-weight: 600;
}

.workspace-track-empty p {
  margin: 5px 0 0;
  color: var(--carbon-muted);
  font-size: 13px;
  line-height: 21px;
}

/* Direction setup: three quiet steps and one save action. */
.direction-settings-panel {
  max-width: 900px;
  margin: 8px auto 48px;
  padding: 30px 32px 28px;
}

body.locus-shell .direction-settings-panel .phd-options,
body.locus-shell .direction-settings-panel .phd-opt-group {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.direction-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.direction-settings-step,
.direction-form-index {
  margin: 0 0 4px;
  color: var(--ink-blue);
  font-size: 10px;
  line-height: 15px;
  font-weight: 700;
  letter-spacing: .14em;
}

.direction-settings-head .locus-section-title {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
}

.direction-settings-head .locus-meta {
  margin-top: 6px;
}

.direction-form-section,
.direction-settings-panel .phd-opt-group {
  padding: 0 0 26px;
}

.direction-settings-panel .phd-opt-group + .phd-opt-group {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.direction-form-section {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.direction-form-section h3,
.direction-settings-panel .phd-opt-label {
  margin: 0 0 18px;
  color: var(--carbon);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

body.locus-shell .direction-form-section > label {
  display: block;
  margin: 0;
  font-size: 13px;
}

body.locus-shell .direction-form-section > label + label {
  margin-top: 18px;
}

.direction-settings-panel .phd-region-row {
  gap: 8px;
}

.direction-settings-panel .phd-region-btn {
  flex: 0 0 auto;
  min-width: 82px;
  padding-inline: 14px;
}

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

body.locus-shell .direction-method-row .phd-prec-btn {
  min-height: 96px;
  height: auto;
  padding: 16px 18px;
  text-align: left;
}

.direction-method-row .phd-prec-btn span,
.direction-method-row .phd-prec-btn small {
  display: block;
}

.direction-method-row .phd-prec-btn b {
  font-size: 14px;
  line-height: 21px;
}

.direction-method-row .phd-prec-btn small {
  margin-top: 6px;
  color: var(--carbon-muted);
  font-size: 12px;
  line-height: 19px;
  font-weight: 400;
}

.direction-method-row .phd-prec-btn.active small {
  color: #4f5d7a;
}

.direction-settings-panel > .cta-row {
  justify-content: flex-end;
  margin-top: 0;
}

.search-summary-row.is-editing {
  display: none;
}

.search-summary-row.is-editing + .search-launch-row {
  display: none;
}

.search-settings-heading {
  align-items: center;
}

.search-settings-heading > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.search-settings-edit {
  margin-left: auto;
  white-space: nowrap;
}

.search-launch-row {
  max-width: 900px;
  margin: -28px auto 44px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  border-top: 1px solid var(--line, #ded8ca);
}

.search-launch-row .direction-method-row {
  margin-top: 10px;
}

.search-launch-row #phd-search-cta {
  min-width: 118px;
}

.phd-item-head .phd-dislike-btn {
  width: 30px;
  height: 30px;
  margin-left: 6px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #918b80;
  font: 400 23px/28px Arial, sans-serif;
  cursor: pointer;
}

.phd-item-head .phd-dislike-btn:hover {
  background: #f0ece4;
  color: #403d38;
}

@media (max-width: 720px) {
  .search-launch-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

/* Workspace direction cards */
.workspace-page:not(.is-first-visit) .workspace-track-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.workspace-page:not(.is-first-visit) .workspace-track-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 300px;
  padding: 24px;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  border-radius: 14px;
  background: #fffdfa;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  box-sizing: border-box;
  overflow: hidden;
  cursor: pointer;
}

.workspace-page:not(.is-first-visit) .workspace-track-card:focus-visible {
  outline: 2px solid var(--ink-blue);
  outline-offset: 3px;
}

.workspace-page:not(.is-first-visit) .workspace-track-card::before {
  left: 24px;
  right: 24px;
  top: -1px;
  bottom: auto;
  width: auto;
  height: 3px;
  border-radius: 0 0 3px 3px;
}

.workspace-page:not(.is-first-visit) .workspace-track-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(40, 35, 25, .07);
}

.workspace-page:not(.is-first-visit) .workspace-track-card h3 {
  margin: 22px 0 0;
  font-size: 19px;
  line-height: 27px;
}

.workspace-page:not(.is-first-visit) .track-intent {
  min-height: 42px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.track-card-topline,
.track-card-tools,
.track-metrics {
  display: flex;
  align-items: center;
}

.track-card-topline {
  justify-content: space-between;
  gap: 12px;
}

.track-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-blue);
  font-size: 12px;
  font-weight: 700;
}

.track-status-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-blue);
}

.workspace-track-card.is-draft .track-status-badge,
.workspace-track-card.is-draft .track-region {
  color: var(--carbon-faint);
}

.workspace-track-card.is-draft .track-status-badge i { background: var(--carbon-faint); }

.track-region {
  color: var(--carbon-muted);
  font-size: 12px;
}

.track-metrics {
  margin-top: 20px;
  padding: 15px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.track-metrics > div {
  min-width: 0;
  padding: 0 18px;
  flex: 1;
  border-right: 1px solid var(--border-subtle);
}

.track-metrics > div:first-child { padding-left: 0; }
.track-metrics > div:last-child { padding-right: 0; border-right: 0; }
.track-metrics strong, .track-metrics span { display: block; }
.track-metrics strong { color: var(--carbon); font-size: 23px; line-height: 28px; font-weight: 600; }
.track-metrics span { margin-top: 2px; color: var(--carbon-faint); font-size: 11px; }

.workspace-page:not(.is-first-visit) .workspace-track-actions {
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin-top: 22px;
  padding-top: 0;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  position: static;
  box-sizing: border-box;
  border-top: 0;
  flex: 0 0 auto;
}

.track-card-tools { gap: 14px; margin-left: auto; padding-left: 14px; }
.track-card-tools .text-link { font-size: 12px; }
.track-card-tools .track-delete { color: #8b5149; }

.workspace-page:not(.is-first-visit) .track-card-main {
  min-height: 0;
  flex: 1 1 auto;
}

@media (max-width: 760px) {
  .workspace-page:not(.is-first-visit) .workspace-track-list { grid-template-columns: 1fr; }
  .workspace-page:not(.is-first-visit) .workspace-track-card { min-height: 0; }
}

/* Direction workspace — one aligned, continuous reading column */
body.locus-shell #phd-app {
  width: min(1180px, calc(100vw - 40px));
  margin-inline: auto;
}

#phd-app .explore-page-head,
#phd-app .search-summary-row,
#phd-app .search-launch-row,
#phd-app .direction-settings-panel,
#phd-app .explore-section {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

#phd-app .explore-page-head {
  margin-bottom: 26px;
}

#phd-app #track-page-title {
  max-width: 980px;
  margin-top: 8px;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.16;
  letter-spacing: -.025em;
}

#phd-app .basis-summary {
  max-width: none;
  margin-top: 10px;
}

#phd-app .search-summary-row {
  margin: 0 0 12px;
}

#phd-app .search-conditions {
  padding: 18px 22px;
}

#phd-app .search-settings-heading {
  margin-bottom: 12px;
}

#phd-app .search-settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px 24px;
}

#phd-app .search-settings-grid .search-setting-primary {
  padding-bottom: 12px;
}

#phd-app .search-launch-row {
  margin: 0 0 52px;
  padding: 14px 0 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-top: 0;
}

#phd-app .search-method-control {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

#phd-app .search-method-control > .search-condition-label {
  flex: 0 0 auto;
  margin: 0;
  color: var(--carbon-muted);
  font-size: 12px;
}

#phd-app .direction-method-row {
  display: inline-flex;
  width: auto;
  margin: 0;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: rgba(255, 255, 255, .5);
}

body.locus-shell #phd-app .direction-method-row .phd-prec-btn {
  min-height: 58px;
  width: auto;
  min-width: 278px;
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  text-align: left;
  white-space: nowrap;
}

#phd-app .direction-method-row .phd-prec-btn b {
  font-size: 13px;
  line-height: 20px;
}

#phd-app .direction-method-row .phd-prec-btn small {
  display: block;
  margin-top: 2px;
  color: var(--carbon-faint);
  font-size: 11px;
  line-height: 17px;
  font-weight: 400;
  white-space: nowrap;
}

body.locus-shell #phd-app .direction-method-row .phd-prec-btn.active {
  background: var(--surface);
  color: var(--ink-blue);
  box-shadow: 0 1px 4px rgba(35, 31, 24, .1);
}

body.locus-shell #phd-app .direction-method-row .phd-prec-btn.active small {
  color: var(--carbon-muted);
}

#phd-app .results-toolbar {
  align-items: baseline;
  margin-bottom: 18px;
  padding-bottom: 0;
}

#phd-app .results-toolbar .locus-section-title {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
}

#phd-app .results-count {
  color: var(--carbon-faint);
  font-size: 13px;
}

#phd-app .explore-filters {
  margin-bottom: 22px;
}

#phd-app #explore-advanced-filters {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

#phd-app .advanced-filter-group {
  padding: 16px 0;
}

#phd-app .advanced-filter-group + .advanced-filter-group {
  border-top: 1px solid var(--border-subtle);
}

#phd-app .advanced-filter-label {
  margin: 0 0 10px;
  color: var(--carbon-muted);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
}

#phd-app .advanced-filter-group .facet-row {
  gap: 8px;
}

/* Favorites — compact scan-first cards */
.favorites-page {
  max-width: 1080px;
}

.favorites-chip [data-fav-count] {
  margin-left: 5px;
  color: var(--carbon-faint);
  font-size: 12px;
}

.favorites-chip.is-active [data-fav-count] {
  color: var(--ink-blue);
}

.favorites-grid {
  gap: 14px;
}

body.locus-shell .favorite-card {
  padding: 24px 26px 20px;
  border-radius: 12px;
  background: var(--surface);
}

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

.favorite-card-head > div {
  min-width: 0;
}

.favorite-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 27px;
}

.favorite-institution {
  margin: 5px 0 0;
  color: var(--carbon-muted);
  font-size: 13px;
  line-height: 20px;
}

.favorite-direction {
  margin: 16px 0 0;
  color: var(--carbon);
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
}

.favorite-visible-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.favorite-match-preview {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(245, 241, 232, .65);
}

.favorite-detail-kicker {
  margin: 0 0 4px;
  color: var(--carbon-faint);
  font-size: 11px;
  line-height: 17px;
  font-weight: 600;
}

.favorite-match-preview > p:last-child {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--carbon-muted);
  font-size: 13px;
  line-height: 21px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.phd-favorite-details {
  margin-top: 10px;
}

.phd-favorite-details > summary {
  width: fit-content;
  padding: 2px 0;
  cursor: pointer;
  list-style: none;
  color: var(--ink-blue);
  font-size: 12px;
  line-height: 18px;
}

.phd-favorite-details > summary::-webkit-details-marker {
  display: none;
}

.phd-favorite-details[open] > summary {
  margin-bottom: 10px;
}

.phd-favorite-details-body {
  padding-left: 14px;
  border-left: 2px solid var(--border-subtle);
}

.favorite-detail-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.favorite-detail-sections > section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: rgba(255, 255, 255, .45);
}

.favorite-detail-sections h4 {
  margin: 0 0 13px;
  color: var(--carbon);
  font-size: 13px;
  line-height: 20px;
  font-weight: 650;
}

.favorite-detail-sections dl {
  margin: 0;
}

.favorite-detail-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(28, 32, 38, .07);
}

.favorite-detail-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.favorite-detail-row dt,
.favorite-detail-row dd {
  margin: 0;
  font-size: 12px;
  line-height: 19px;
}

.favorite-detail-row dt {
  color: var(--carbon-faint);
  font-weight: 500;
}

.favorite-detail-row dd {
  color: var(--carbon-muted);
  overflow-wrap: anywhere;
}

.favorite-evidence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.favorite-evidence-links a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-blue);
  font-size: 11px;
  text-decoration: none;
}

.favorite-evidence-links a:hover {
  border-color: rgba(0, 47, 167, .28);
}

.favorite-detail-empty {
  margin: 0;
  color: var(--carbon-faint);
  font-size: 12px;
  line-height: 19px;
}

.favorite-recent-papers {
  margin-top: 16px;
}

.favorite-recent-papers > p {
  margin: 0 0 7px;
  color: var(--carbon-faint);
  font-size: 11px;
  font-weight: 600;
}

.favorite-recent-papers ul {
  margin: 0;
  padding-left: 18px;
  color: var(--carbon-muted);
  font-size: 12px;
  line-height: 20px;
}

.favorite-recent-papers a {
  color: var(--ink-blue);
}

.phd-favorite-detail-block + .phd-favorite-detail-block {
  margin-top: 12px;
}

.phd-favorite-detail-label {
  margin-bottom: 3px;
  color: var(--carbon-faint);
  font-size: 11px;
  font-weight: 600;
}

.phd-favorite-detail-block p {
  margin: 0;
  color: var(--carbon-muted);
  font-size: 13px;
  line-height: 21px;
}

.favorite-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.favorite-organize-controls {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.favorite-organize-controls > label {
  display: grid;
  gap: 5px;
  color: var(--carbon-faint);
  font-size: 11px;
}

.favorite-organize-controls select {
  min-width: 112px;
  height: 36px;
}

body.locus-shell .favorite-note-input {
  display: block;
  width: 260px;
  height: 36px;
  min-height: 36px;
  max-height: 62px;
  margin: 0;
  padding: 7px 10px;
  box-sizing: border-box;
  resize: none;
  overflow-x: hidden;
  overflow-y: hidden;
  font-size: 12px;
  line-height: 20px;
}

.favorite-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
  color: var(--carbon-faint);
  font-size: 11px;
  line-height: 18px;
}

.favorite-card-meta .text-link {
  font-size: 12px;
}

@media (max-width: 760px) {
  .favorite-card-footer { align-items: stretch; flex-direction: column; }
  .favorite-organize-controls { align-items: stretch; flex-direction: column; }
  body.locus-shell .favorite-note-input { width: 100%; box-sizing: border-box; }
  .favorite-card-meta { justify-content: flex-start; }
  .favorite-detail-sections { grid-template-columns: 1fr; }
  .favorite-detail-row { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 760px) {
  body.locus-shell #phd-app { width: min(100% - 28px, 1180px); }
  #phd-app .search-settings-grid { grid-template-columns: 1fr; }
  #phd-app .search-method-control { align-items: flex-start; flex-direction: column; }
  #phd-app .direction-method-row { display: grid; width: 100%; }
  body.locus-shell #phd-app .direction-method-row .phd-prec-btn { min-width: 0; white-space: normal; }
  #phd-app .direction-method-row .phd-prec-btn small { white-space: normal; }
  #phd-app .search-launch-row { grid-template-columns: 1fr; }
  #phd-app #phd-search-cta { width: 100%; }
}

.search-condition-label {
  margin-bottom: 3px;
  color: var(--carbon-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}

.search-summary-row {
  align-items: stretch;
  gap: 14px;
  margin-top: 28px;
}

.search-conditions {
  flex: 1 1 680px;
  padding: 20px 22px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.search-settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.search-settings-heading .search-condition-label {
  margin: 0;
  color: var(--carbon);
  font-size: 14px;
  line-height: 21px;
  letter-spacing: 0;
}

.search-settings-state {
  margin: 0;
  color: var(--color-success);
  font-size: 11px;
  font-weight: 600;
}

.search-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
}

.search-settings-grid > div {
  min-width: 0;
}

.search-settings-grid .search-setting-primary {
  grid-column: 1 / -1;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.search-settings-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--carbon-faint);
  font-size: 10px;
  line-height: 15px;
  font-weight: 600;
  letter-spacing: .05em;
}

.search-settings-grid strong,
.search-settings-grid p {
  display: block;
  margin: 0;
  color: var(--carbon);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}

.search-summary-row > #phd-search-cta {
  align-self: flex-end;
  flex: 0 0 auto;
}

/* Secondary management and export actions live in one menu. */
.card-more-menu .export-menu {
  display: contents;
}

.card-more-menu .track-menu-label {
  margin: 5px 10px 3px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  color: var(--carbon-faint);
  font-size: 10px;
  line-height: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Full-width opportunity cards replace the click-to-read split pane. */
.explore-shell.explore-shell-full {
  display: block;
}

.explore-shell.explore-shell-full.hidden {
  display: none;
}

.explore-shell-full .explore-list-col {
  width: 100%;
}

body.locus-shell .explore-shell-full .explore-list {
  display: grid;
  gap: 12px;
}

body.locus-shell .opportunity-result-card {
  cursor: default;
  padding: 24px 26px;
  border-color: rgba(25, 29, 38, .12);
  border-radius: var(--radius-md);
  background: var(--surface);
}

body.locus-shell .opportunity-result-card:hover {
  border-color: rgba(0, 47, 167, .24);
  background: var(--surface);
}

.opportunity-result-card .phd-item-head {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.opportunity-result-card .phd-rank {
  color: var(--carbon-muted);
  font-size: 12px;
  line-height: 20px;
}

.opportunity-result-card .phd-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 7px 0;
  color: var(--carbon);
  font-size: 13px;
  line-height: 21px;
}

.opportunity-result-card .phd-row b {
  color: var(--carbon-muted);
  font-weight: 500;
}

.opportunity-result-card .phd-source,
.opportunity-result-card .advisor-evidence,
.opportunity-result-card .phd-language-gate,
.opportunity-result-card .phd-verification-warning {
  margin-top: 14px;
  font-size: 12px;
  line-height: 19px;
}

.opportunity-result-card .phd-local-actions {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.competitiveness-summary {
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(0, 47, 167, .12);
  border-radius: var(--radius-md);
  background: rgba(233, 238, 255, .36);
  font-size: 13px;
  line-height: 22px;
}

@media (max-width: 720px) {
  .workspace-track-empty {
    align-items: flex-start;
    flex-direction: column;
  }

  .direction-settings-panel {
    padding: 24px 20px;
  }

  .direction-method-row {
    grid-template-columns: 1fr;
  }

  .opportunity-result-card .phd-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

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

  .search-settings-grid .search-setting-primary {
    grid-column: auto;
  }
}

/* Profile publication controls must respect runtime hidden state. */
body.locus-shell .profile-page-form #phd-research-output-list.hidden,
body.locus-shell .profile-page-form #phd-add-research-output.hidden {
  display: none !important;
}
