:root {
  --brand: #3882f6;
  --brand-dark: #2563eb;
  --brand-deep: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-soft-border: #bfdbfe;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --paper: #f8fafc;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--paper);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
}

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

button, input, select {
  font: inherit;
}

button, a, select {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid rgba(56, 130, 246, 0.45);
  outline-offset: 2px;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1376px;
  margin: auto;
  padding: 10px 40px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.brand-logo {
  height: 52px;
  width: auto;
  display: block;
  mix-blend-mode: multiply;
}

.header-inner nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 28px;
  font-size: 15px;
  white-space: nowrap;
}

.header-inner nav a {
  color: var(--ink-2);
  transition: color .15s;
}

.header-inner nav a:hover {
  color: var(--brand-dark);
}

.header-inner nav .active {
  font-weight: 650;
  color: var(--brand-deep);
}

.header-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 550;
}

main {
  max-width: 1376px;
  margin: auto;
  padding: 0 40px;
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 20px;
}

.eyebrow {
  color: var(--brand-deep);
  font-size: 12px;
  letter-spacing: 1.4px;
  font-weight: 700;
}

.tiny-cross {
  margin-right: 6px;
  font-size: 15px;
  color: var(--brand);
}

h1 {
  font-size: 34px;
  line-height: 1.3;
  letter-spacing: -0.8px;
  margin: 10px 0 8px;
  font-weight: 750;
}

h1 span {
  color: var(--brand);
}

.intro p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

.intro-side {
  text-align: right;
  border-left: 1px solid var(--border);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.intro-side span, .intro-side small {
  font-size: 13px;
  color: var(--muted);
}

.intro-side strong {
  font-size: 20px;
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.intro-side .source-link {
  margin-top: 10px;
}

.search-panel {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  padding: 22px 26px 0;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(56, 130, 246, 0.22);
}

form {
  display: flex;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 9px;
  flex: 1;
  padding: 0 16px;
  min-width: 0;
  gap: 10px;
}

.search-box svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  flex-shrink: 0;
}

.search-box input {
  width: 100%;
  padding: 12px 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.search-box kbd {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0 6px;
  border-radius: 4px;
  font-size: 12px;
}

.primary {
  background: #fff;
  color: var(--brand-deep);
  border: 0;
  padding: 0 28px;
  border-radius: 9px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: background-color .15s, transform .1s;
}

.primary:hover {
  background: var(--brand-soft);
}

.search-bar-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
}

.quick-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.quick-roles button {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: rgba(255, 255, 255, 0.82);
  padding: 0 3px 11px;
  font-size: 15px;
  font-weight: 500;
}

.quick-roles button:hover {
  color: #fff;
}

.quick-roles button.selected {
  color: #fff;
  border-bottom-color: #fff;
  font-weight: 700;
}

.quick-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
}

.toggle-chip {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transition: background-color .15s, color .15s, border-color .15s;
}

.toggle-chip:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.toggle-chip.selected {
  background: #fff;
  color: var(--brand-deep);
  border-color: #fff;
  font-weight: 650;
}

.overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0 26px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 0;
}

.overview.overview-5 {
  grid-template-columns: repeat(5, 1fr);
}

.overview div {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-right: 1px solid var(--border);
}

.overview div:last-child {
  border-right: 0;
}

.overview span {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.overview strong {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

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

.deadline-banner {
  margin: 18px 0 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}

.deadline-banner-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.deadline-banner-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.deadline-pill {
  background: #fff7ed;
  color: #d9480f;
  border: 1px solid #fdba74;
  font-size: 12px;
  font-weight: 650;
  padding: 2px 9px;
  border-radius: 999px;
}

.deadline-banner-title h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.update-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.update-meta strong {
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

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

.workspace {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 18px 24px;
  align-items: start;
}

.filters {
  grid-column: 1;
  grid-row: 1;
  position: static;
}

.result-section {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
}

.side-notes {
  grid-column: 1;
  grid-row: 2;
  position: static;
  margin-top: 0;
}

.filters {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.filter-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}

.filter-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-collapse-btn {
  display: none;
}

h2 {
  font-size: 19px;
  line-height: 1.4;
  margin: 0;
  font-weight: 650;
}

.filter-title h2 {
  font-size: 16px;
}

#reset {
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--muted);
  padding: 0;
}

#reset:hover {
  color: var(--brand-dark);
}

.filters-body > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 14px 0 6px;
}

select {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  padding: 8px 9px;
  max-width: 100%;
}

.filters select {
  width: 100%;
  font-size: 14px;
}

.hospital-filter {
  width: 100%;
  padding: 7px 9px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
}

.filter-tip {
  border-top: 1px solid var(--border);
  margin-top: 20px;
  padding-top: 16px;
}

.filter-tip strong {
  font-size: 13px;
  color: var(--ink);
}

.filter-tip p {
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
  margin: 6px 0 0;
}

.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.list-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

.sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.sort-label select {
  padding: 7px 8px;
}

.filter-summary {
  font-size: 13px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft-border);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.filter-summary:empty {
  display: none;
}

.job {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 13px;
  transition: border-color .2s, box-shadow .2s;
}

.job:hover {
  border-color: #93c5fd;
  box-shadow: 0 6px 20px rgba(56, 130, 246, 0.08);
}

.job-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.hospital-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.hospital-symbol {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 17px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.hospital-name {
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.hospital-meta {
  font-size: 12px;
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: #e2fbe8;
  color: #0f8a3c;
  border: 1px solid #7ce89e;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.status.ongoing {
  background: #e8f1ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.status.ongoing::before {
  background: #3882f6;
}

.status.closed {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

.status.closed::before {
  background: #94a3b8;
}

.status.unknown {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}

.status.unknown::before {
  background: #f59e0b;
}

.status.urgent {
  background: #ffedd5;
  color: #d9480f;
  border-color: #fdba74;
}

.status.urgent::before {
  background: #f97316;
}

.job h3 {
  margin: 14px 0 9px;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.job-title {
  color: var(--ink);
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
}

.job-title:hover {
  color: var(--brand-dark);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  font-size: 12px;
  background: #f1f5f9;
  color: #475569;
  padding: 3px 9px;
  border-radius: 5px;
}

.tag.role {
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 550;
}

.summary {
  font-size: 14px;
  color: var(--ink-2);
  margin: 11px 0 15px;
  line-height: 1.75;
}

.job .summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #f1f5f9;
  padding-top: 13px;
}

.dates {
  font-size: 12px;
  color: var(--muted);
}

.deadline {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 2px;
}

.job-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.detail-btn {
  border: 1px solid var(--brand-soft-border);
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  transition: background-color .15s;
}

.detail-btn:hover {
  background: #dbeafe;
}

.source-link {
  font-size: 13px;
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.list-foot {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 16px 0;
}

.deadline-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px;
}

.side-eyebrow {
  font-size: 12px;
  color: var(--brand-deep);
  font-weight: 600;
  margin-bottom: 4px;
}

.deadline-panel h2 {
  font-size: 16px;
  margin-bottom: 14px;
}

.due-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--paper);
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
  transition: border-color .15s, background-color .15s;
}

.due-item:hover {
  border-color: #93c5fd;
  background: var(--brand-soft);
}

.date-tile {
  width: 44px;
  flex-shrink: 0;
  background: var(--brand-soft);
  color: var(--brand-deep);
  border-radius: 8px;
  padding: 4px 0;
  text-align: center;
}

.date-tile small {
  display: block;
  font-size: 11px;
  color: var(--brand-dark);
}

.date-tile strong {
  font-size: 21px;
  line-height: 1.2;
  font-weight: 700;
}

.due-info {
  font-size: 13px;
  min-width: 0;
}

.due-info .job-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
}

.due-info span {
  font-size: 12px;
  color: var(--muted);
}

.due-info .remaining {
  color: #c2410c;
  font-weight: 550;
  display: block;
}

.coverage {
  margin-top: 0;
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft-border);
  padding: 20px 18px;
  border-radius: 12px;
}

.coverage-label {
  font-size: 12px;
  color: var(--brand-deep);
  font-weight: 650;
}

.coverage h3 {
  font-size: 17px;
  margin: 8px 0;
  color: var(--ink);
}

.coverage p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.8;
  margin: 0 0 10px;
}

.coverage .wechat-tip {
  margin: 12px 0 0;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid var(--brand-soft-border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--brand-deep);
  line-height: 1.6;
}

.coverage-bottom {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--brand-soft-border);
  font-size: 12px;
  color: var(--brand-deep);
  display: flex;
  justify-content: space-between;
}

.coverage-bottom span {
  font-weight: 650;
}

.sources-page-list {
  padding-bottom: 42px;
}

#source-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.source-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: border-color .15s;
}

.source-card strong {
  font-size: 14px;
  display: block;
  font-weight: 600;
}

.source-card small {
  font-size: 12px;
  color: var(--muted);
}

.source-card:hover {
  border-color: var(--brand);
}

footer {
  border-top: 1px solid var(--border);
  max-width: 1296px;
  margin: 0 auto;
  padding: 23px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

footer > div {
  display: flex;
  gap: 18px;
  align-items: center;
}

.footer-brand {
  font-weight: 700;
  font-size: 16px;
  color: var(--brand-deep);
}

footer p {
  margin: 0;
}

.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  padding: 10px;
  background: #fff;
  z-index: 30;
}

.skip:focus {
  top: 10px;
}

.empty {
  padding: 55px 25px;
  background: #fff;
  border: 1px dashed var(--border);
  text-align: center;
  border-radius: 12px;
}

.empty h3 {
  font-size: 19px;
}

.empty p {
  color: var(--muted);
  font-size: 14px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  margin-top: 24px;
  font-size: 13px;
}

.pagination button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 8px 14px;
  color: var(--brand-deep);
  font-weight: 550;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.pagination button:disabled {
  opacity: .4;
  cursor: default;
}

.page-jump {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-jump input {
  width: 66px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: center;
}

.page-jump label, .page-jump span {
  white-space: nowrap;
}

dialog {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  max-width: 760px;
  width: calc(100% - 32px);
  color: var(--ink);
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
}

dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
}

.dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 12px 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dialog-bar-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

.dialog-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dialog-close {
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: none;
  padding: 2px 6px;
}

#detail-content {
  padding: 22px 28px 28px;
  overflow-y: auto;
}

.dialog-title {
  font-size: 24px;
  margin: 14px 0 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  font-size: 14px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.detail-grid dt {
  color: var(--muted);
}

.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.dialog-summary {
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.detail-list {
  padding-left: 22px;
  line-height: 1.9;
  font-size: 14px;
  color: var(--ink-2);
}

.detail-list li + li {
  margin-top: 8px;
}

.announcement {
  font-size: 13px;
  color: var(--muted);
}

.detail-provenance {
  border-top: 1px solid var(--border);
  margin-top: 26px;
  padding-top: 10px;
}

.detail-provenance p {
  font-size: 12px;
  color: var(--muted);
}

.provenance-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.dialog-link {
  display: inline-block;
  background: var(--brand);
  padding: 9px 16px;
  border-radius: 7px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.dialog-link:hover {
  background: var(--brand-dark);
}

.inline-link {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

.dialog-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}

.error-retry {
  border: 0;
  background: var(--brand);
  color: #fff;
  padding: 9px 20px;
  border-radius: 6px;
}

/* Floating back-to-top button */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 30;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(56, 130, 246, 0.36);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, background-color .15s;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--brand-dark);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top span {
  font-size: 10px;
  line-height: 1;
  font-weight: 650;
}

/* Chengdu hospital directory */
.directory-explain {
  padding: 24px 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 0 0 24px;
}

.directory-explain h2 {
  font-size: 20px;
  margin: 0 0 12px;
}

.directory-explain p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
  max-width: 1100px;
}

.dir-topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 18px 0 12px;
}

.dir-topbar-left {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.dir-title {
  font-size: 22px;
  line-height: 1.3;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.dir-meta {
  font-size: 12px;
  color: var(--muted);
}

.dir-meta strong {
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.directory-explain-compact {
  padding: 12px 18px;
  margin: 0 0 18px;
}

.directory-explain-compact summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-deep);
}

.directory-explain-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.directory-explain li {
  margin: 8px 0;
  line-height: 1.8;
  color: var(--ink-2);
}

summary {
  cursor: pointer;
  color: var(--brand-deep);
  font-weight: 550;
}

.directory-filters {
  padding: 20px 24px;
  margin-bottom: 16px;
}

.directory-selects {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 18px;
}

.directory-selects label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  flex: 1;
  min-width: 150px;
}

.directory-selects select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  min-height: 42px;
}

.directory-filters #directory-reset {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  min-height: 42px;
  padding: 0 16px;
  border-radius: 7px;
}

.directory-filters #directory-reset:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #fff;
}

.directory-card h3 {
  font-size: 19px;
  margin: 0 0 5px;
}

.directory-card .job-top {
  align-items: flex-start;
  gap: 12px;
}

.directory-card .status {
  white-space: normal;
  text-align: center;
}

.directory-progress {
  font-size: 13px;
  color: var(--ink-2);
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 14px;
  margin-top: 18px;
}

.directory-links {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.directory-links div {
  display: grid;
  gap: 5px;
}

.directory-links span {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}

.directory-links a {
  font-size: 14px;
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.more-links {
  margin-top: 4px;
}

.more-links-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--brand-soft-border);
}

.directory-card details {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.directory-card .detail-btn {
  text-decoration: none;
  text-align: center;
}

@media (min-width: 1450px) {
  .workspace {
    grid-template-columns: 256px minmax(0, 1fr);
    gap: 18px 26px;
  }
}

@media (max-width: 1150px) {
  .workspace {
    grid-template-columns: 216px minmax(0, 1fr);
  }
  .side-notes {
    position: static;
    grid-column: 1;
    grid-row: 2;
    display: block;
    margin-top: 0;
  }
  .coverage {
    margin-top: 0;
  }
  .header-inner {
    gap: 32px;
  }
  .header-note {
    display: none;
  }
  .overview.overview-5 {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 0;
  }
  .overview.overview-5 div:nth-child(3) {
    border-right: 0;
  }
  .job h3 {
    font-size: 18px;
  }
  footer {
    margin: 0 40px;
  }
}

@media (max-width: 1024px) and (min-width: 721px) {
  #source-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) and (min-width: 721px) {
  .deadline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  header {
    position: static;
  }
  .header-inner {
    padding: 8px 16px;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
  }
  .brand-logo {
    height: 44px;
    width: auto;
  }
  .header-inner nav {
    width: auto;
    gap: 18px;
    font-size: 14px;
    flex-shrink: 0;
  }
  main {
    padding: 0 16px;
  }
  .intro {
    padding: 20px 0 14px;
    display: block;
  }
  h1 {
    font-size: 26px;
    letter-spacing: -.4px;
  }
  .intro p {
    font-size: 14px;
  }
  .intro-side {
    padding: 0;
    border: 0;
    text-align: left;
    margin-top: 12px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: center;
  }
  .intro-side strong {
    font-size: 14px;
  }
  .intro-side small {
    font-size: 12px;
    width: 100%;
  }
  .search-panel {
    padding: 16px 14px 0;
  }
  .directory-filters {
    padding: 16px 14px 18px;
  }
  form {
    gap: 8px;
  }
  .search-box {
    padding: 0 11px;
    gap: 8px;
  }
  .search-box input {
    font-size: 14px;
  }
  .search-box kbd {
    display: none;
  }
  .primary {
    padding: 0 14px;
    font-size: 14px;
  }
  .search-bar-bottom {
    gap: 8px;
  }
  .quick-roles {
    gap: 18px;
  }
  .quick-roles button {
    font-size: 14px;
    padding-bottom: 9px;
  }
  .quick-toggles {
    width: 100%;
    padding-bottom: 12px;
  }
  .overview,
  .overview.overview-5 {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px 0;
    gap: 12px 0;
    margin: 14px 0 16px;
  }
  .overview div,
  .overview.overview-5 div {
    justify-content: space-between;
    padding: 0 14px;
  }
  .overview div:nth-child(2n),
  .overview.overview-5 div:nth-child(2n) {
    border-right: 0;
  }
  .overview.overview-5 div:nth-child(3) {
    border-right: 1px solid var(--border);
  }
  .overview.overview-5 div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-top: 1px solid var(--border);
    padding-top: 10px;
  }
  .overview span {
    font-size: 12px;
  }
  .overview strong {
    font-size: 21px;
  }
  .deadline-banner {
    margin: 12px 0 12px;
    padding: 12px 14px;
  }
  .deadline-banner-head {
    margin-bottom: 10px;
  }
  .deadline-grid {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .due-item {
    flex: 0 0 256px;
    scroll-snap-align: start;
  }
  .workspace {
    display: block;
  }
  .side-notes {
    margin-top: 18px;
  }
  .filters {
    position: static;
    display: block;
    padding: 12px 14px;
    margin-bottom: 16px;
  }
  .filter-title {
    margin-bottom: 0;
  }
  .filter-collapse-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--brand-soft);
    color: var(--brand-deep);
    border: 1px solid var(--brand-soft-border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 600;
  }
  .filters-body {
    display: none;
  }
  .filters.mobile-open .filters-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .filters.mobile-open .filters-body > label {
    font-size: 13px;
    margin: 4px 0 0;
  }
  .filters.mobile-open .filters-body > label[for=institution-category] {
    grid-row: 1;
    grid-column: 1 / -1;
  }
  .filters.mobile-open .filters-body > #institution-category {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .filters.mobile-open .filters-body > label[for=city] {
    grid-row: 3;
    grid-column: 1;
  }
  .filters.mobile-open .filters-body > #city {
    grid-row: 4;
    grid-column: 1;
  }
  .filters.mobile-open .filters-body > label[for=education] {
    grid-row: 3;
    grid-column: 2;
  }
  .filters.mobile-open .filters-body > #education {
    grid-row: 4;
    grid-column: 2;
  }
  .filters.mobile-open .filters-body > label[for=hospital] {
    grid-row: 5;
    grid-column: 1 / -1;
  }
  .filters.mobile-open .filters-body > #hospital-filter {
    grid-row: 6;
    grid-column: 1 / -1;
    margin-bottom: 2px;
  }
  .filters.mobile-open .filters-body > #hospital {
    grid-row: 7;
    grid-column: 1 / -1;
  }
  .filters.mobile-open .filters-body > label[for=status] {
    grid-row: 8;
    grid-column: 1 / -1;
  }
  .filters.mobile-open .filters-body > #status {
    grid-row: 9;
    grid-column: 1 / -1;
  }
  .filter-tip {
    display: none;
  }
  .side-notes {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }
  .job {
    padding: 18px 16px;
  }
  .job h3 {
    font-size: 17px;
    margin-top: 12px;
  }
  .job-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .job-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .list-heading h2 {
    font-size: 18px;
  }
  .sort-label {
    font-size: 0;
  }
  .sort-label select {
    font-size: 12px;
  }
  .summary {
    font-size: 14px;
  }
  .sources {
    margin-top: 23px;
    padding-top: 25px;
  }
  .source-toolbar input {
    max-width: none;
    width: 100%;
  }
  #source-list {
    grid-template-columns: 1fr;
  }
  .section-heading h2 {
    font-size: 21px;
  }
  footer {
    margin: 0 16px;
    display: block;
    padding: 20px 0 36px;
  }
  footer > div {
    gap: 12px;
    flex-wrap: wrap;
  }
  footer p {
    margin-top: 9px;
  }
  .dialog-bar {
    padding: 10px 14px 10px 20px;
  }
  #detail-content {
    padding: 18px 20px 22px;
  }
  .detail-grid {
    grid-template-columns: 85px 1fr;
  }
  .dialog-title {
    font-size: 21px;
  }
  .directory-card .job-top {
    flex-direction: column;
  }
  .dir-topbar {
    padding: 14px 0 10px;
  }
  .dir-title {
    font-size: 19px;
  }
  .directory-explain-compact {
    padding: 11px 14px;
    margin-bottom: 14px;
  }
  .directory-selects {
    gap: 12px;
  }
  .directory-selects label {
    min-width: 130px;
  }
  .directory-card .job-bottom {
    align-items: flex-start;
    gap: 15px;
    flex-direction: column;
  }
  .back-to-top {
    right: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
