:root {
  --ink: #0b1f2a;
  --muted: #5a6a73;
  --navy: #061a28;
  --navy-2: #0b2a3a;
  --teal: #0d6b68;
  --teal-dark: #074d4c;
  --lime: #b9ea63;
  --orange: #ef7b45;
  --paper: #ffffff;
  --soft: #f3f6f7;
  --soft-teal: #eaf4f2;
  --line: #d7e0e3;
  --max: 1240px;
  --shadow: 0 18px 44px rgba(6, 26, 40, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", Arial, sans-serif;
  line-height: 1.6;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  background: white;
  padding: 10px 14px;
  border-radius: 6px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.nav-wrap {
  max-width: var(--max);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--teal);
  border-radius: 8px 8px 8px 2px;
}
.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav a,
.nav-subscribe {
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}
.main-nav a:hover,
.nav-subscribe:hover { color: var(--teal); }
.nav-subscribe {
  padding: 10px 16px;
  color: white;
  background: var(--navy);
  border-radius: 7px;
}
.nav-subscribe:hover { color: white; background: var(--teal-dark); }
.menu-toggle { display: none; }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 52px 24px 72px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.light-eyebrow { color: var(--lime); }
h1, h2, h3, h4 {
  margin-top: 0;
  font-family: "Manrope", sans-serif;
  line-height: 1.14;
}
h1 { font-size: clamp(2.35rem, 5vw, 4.6rem); margin-bottom: 0; letter-spacing: -.04em; }
h2 { font-size: clamp(1.9rem, 3.2vw, 3rem); letter-spacing: -.025em; }
h3 { font-size: 1.24rem; }
p { margin-top: 0; }

.news-front { padding-top: 38px; }
.news-masthead {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
}
.access-cluster {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.access-badge {
  padding: 8px 12px;
  color: var(--teal-dark);
  background: var(--soft-teal);
  border: 1px solid #c8dfda;
  border-radius: 999px;
  font-weight: 800;
  font-size: .88rem;
}
.text-button {
  border: 0;
  padding: 0;
  color: var(--teal-dark);
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}
.news-rule {
  height: 5px;
  margin: 22px 0 18px;
  background: linear-gradient(90deg, var(--navy) 0 72%, var(--orange) 72% 86%, var(--teal) 86%);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 25px;
}
.filter-chip {
  border: 1px solid var(--line);
  padding: 8px 13px;
  background: white;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: .9rem;
}
.filter-chip:hover,
.filter-chip.active { color: white; background: var(--navy); border-color: var(--navy); }

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.lead-news {
  min-height: 410px;
  padding: 30px 34px 34px 0;
  border-right: 1px solid var(--line);
}
.lead-news .news-label,
.news-list-item .news-label,
.news-card .news-label {
  color: var(--teal);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lead-news h2 {
  margin: 12px 0 16px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}
.lead-news p { max-width: 760px; color: var(--muted); font-size: 1.08rem; }
.news-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: .88rem;
}
.news-link,
.commentary-feature a,
.job-card a {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.news-link:hover,
.commentary-feature a:hover,
.job-card a:hover { color: var(--orange); }
.news-list { padding-left: 28px; }
.news-list-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.news-list-item:last-child { border-bottom: 0; }
.news-list-item h3 { margin: 7px 0 8px; font-size: 1.08rem; }
.news-list-item .news-source-row { margin-bottom: 0; font-size: .8rem; }
.section-bar {
  margin: 38px 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  border-bottom: 2px solid var(--navy);
}
.section-bar h2 { margin-bottom: 10px; font-size: 1.45rem; }
.updated-label { color: var(--muted); font-size: .83rem; }
.news-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.news-card {
  padding-top: 16px;
  border-top: 4px solid var(--teal);
}
.news-card h3 { margin: 10px 0 10px; }
.news-card p { color: var(--muted); font-size: .95rem; }

.journal-panel {
  margin-top: 54px;
  padding: 30px;
  background: var(--soft);
  border-left: 5px solid var(--orange);
}
.journal-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}
.journal-panel-heading h2 { margin-bottom: 4px; font-size: 1.8rem; }
.journal-strip {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.journal-card {
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
}
.journal-card h3 { font-size: 1.05rem; margin: 10px 0; }
.journal-card p { color: var(--muted); font-size: .88rem; }
.journal-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.source-pill { font-weight: 800; color: var(--teal-dark); }
.fine-print { margin: 18px 0 0; color: var(--muted); font-size: .82rem; }

.bio-section { background: var(--navy); color: white; }
.bio-wrap,
.workflow-wrap,
.jobs-wrap,
.subscribe-band,
.footer-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.bio-wrap {
  padding-top: 78px;
  padding-bottom: 65px;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 68px;
}
.bio-intro h2 { font-size: clamp(2.3rem, 4.3vw, 4.3rem); }
.bio-lead { color: #bed0d8; font-size: 1.08rem; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  padding: 12px 18px;
  border-radius: 7px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.primary { color: white; background: var(--teal-dark); }
.primary:hover { background: var(--navy); }
.lime-button { margin-top: 12px; color: var(--navy); background: var(--lime); }
.lime-button:hover { background: #d1f396; }
.bio-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.bio-proof-grid article {
  padding: 24px;
  background: var(--navy-2);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
}
.bio-proof-grid span { color: var(--lime); font-family: "Manrope", sans-serif; font-weight: 800; }
.bio-proof-grid h3 { margin: 12px 0 8px; }
.bio-proof-grid p { margin: 0; color: #bcd0d8; font-size: .92rem; }
.workflow-wrap { padding-top: 54px; padding-bottom: 72px; color: var(--ink); background: var(--soft-teal); }
.workflow-heading { max-width: 700px; }
.workflow-heading h3 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
.workflow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.workflow-grid article { padding: 22px; background: white; border-top: 4px solid var(--teal); }
.workflow-grid strong { display: grid; width: 34px; height: 34px; place-items: center; color: white; background: var(--teal); border-radius: 50%; }
.workflow-grid h4 { margin: 15px 0 8px; font-size: 1.1rem; }
.workflow-grid p { margin: 0; color: var(--muted); font-size: .9rem; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.section-heading > div { max-width: 760px; }
.section-heading h2 { margin-bottom: 10px; }
.section-heading p:last-child { color: var(--muted); }
.commentary-section { padding-top: 76px; }
.commentary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.commentary-feature {
  min-height: 320px;
  padding: 34px;
  background: var(--soft);
  border-top: 6px solid var(--orange);
}
.commentary-feature:nth-child(2) { border-top-color: var(--teal); }
.commentary-kicker { color: var(--teal-dark); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.commentary-feature h3 { margin: 18px 0 14px; font-size: clamp(1.5rem, 2.6vw, 2.35rem); }
.commentary-feature p { color: var(--muted); }

.jobs-section { padding: 70px 0; color: white; background: #0a2734; }
.jobs-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.jobs-heading > div { max-width: 760px; }
.jobs-heading h2 { margin-bottom: 10px; }
.jobs-heading p:last-child { color: #b8ccd3; }
.outline-light { color: white; background: transparent; border: 1px solid rgba(255,255,255,.55); }
.outline-light:hover { background: white; color: var(--navy); }
.jobs-audience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0 0 24px; }
.jobs-audience-card { padding: 24px; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; background: rgba(255,255,255,.07); }
.jobs-audience-card h3 { margin: 8px 0 8px; color: white; }
.jobs-audience-card p:not(.eyebrow) { color: #c7d8de; }
.jobs-audience-card .button { margin-top: 8px; }
.employer-card { background: rgba(0,166,214,.10); }
.jobs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.job-card { padding: 22px; color: var(--ink); background: white; border-radius: 8px; }
.job-card h3 { margin: 12px 0 8px; }
.job-card p { color: var(--muted); font-size: .9rem; }
.job-card .job-meta { color: var(--teal); font-size: .8rem; font-weight: 800; }
.empty-dark { grid-column: 1 / -1; padding: 30px; color: #c7d8de; border: 1px dashed rgba(255,255,255,.3); }

.subscribe-band {
  margin-top: 0;
  padding-top: 58px;
  padding-bottom: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  background: white;
}
.subscribe-band > div { max-width: 760px; }
.subscribe-band h2 { margin-bottom: 8px; }
.subscribe-band p:last-child { color: var(--muted); margin-bottom: 0; }

.site-footer { color: #b9cbd2; background: var(--navy); }
.footer-wrap { padding-top: 30px; padding-bottom: 30px; display: flex; justify-content: space-between; gap: 20px; }
.footer-wrap p { margin: 5px 0 0; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: white; }

.site-dialog {
  width: min(620px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 30px 100px rgba(0,0,0,.35);
}
.site-dialog::backdrop { background: rgba(3,18,28,.72); backdrop-filter: blur(4px); }
.dialog-shell { position: relative; padding: 34px; }
.wide-dialog { width: 100%; max-width: 760px; }
.dialog-close { position: absolute; right: 16px; top: 12px; border: 0; background: transparent; font-size: 2rem; cursor: pointer; }
.dialog-note { color: var(--muted); font-size: .82rem; }
.subscription-form label:not(.checkbox-row),
.form-grid label { display: grid; gap: 6px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #bac8ce;
  border-radius: 6px;
  background: white;
}
.subscription-form { display: grid; gap: 15px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: .9rem; }
.checkbox-row input { width: auto; margin-top: 5px; }
.full-button { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.full-field { grid-column: 1 / -1; }
.hidden-field { display: none; }
.form-status { margin: 0; color: var(--teal-dark); font-weight: 700; }

.skeleton-block,
.skeleton-card,
.headline-skeleton,
.journal-skeleton {
  background: linear-gradient(90deg, #edf1f2 25%, #f8fafb 50%, #edf1f2 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s infinite;
}
.skeleton-card { min-height: 220px; }
.headline-skeleton { height: 74px; margin: 18px 0; }
.journal-skeleton { height: 170px; }
.error-card { grid-column: 1 / -1; padding: 24px; color: #7d2b20; background: #fff0ec; border: 1px solid #f0c3b8; }
.unavailable-link { color: var(--muted); font-weight: 700; }
@keyframes pulse { to { background-position: -200% 0; } }

@media (max-width: 980px) {
  .menu-toggle { display: block; margin-left: auto; border: 1px solid var(--line); padding: 8px 12px; background: white; border-radius: 6px; }
  .main-nav { display: none; position: absolute; top: 71px; left: 0; right: 0; padding: 18px 24px; flex-direction: column; align-items: stretch; background: white; border-bottom: 1px solid var(--line); }
  .main-nav.open { display: flex; }
  .news-layout { grid-template-columns: 1fr; }
  .lead-news { min-height: 0; padding-right: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .news-list { padding-left: 0; }
  .news-card-grid, .journal-strip, .jobs-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .bio-wrap { grid-template-columns: 1fr; }
  .workflow-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .section { padding-left: 18px; padding-right: 18px; }
  .news-masthead, .journal-panel-heading, .section-heading, .jobs-heading, .subscribe-band, .footer-wrap { align-items: flex-start; flex-direction: column; }
  .access-cluster { align-items: flex-start; }
  .news-card-grid, .journal-strip, .bio-proof-grid, .workflow-grid, .commentary-grid, .jobs-grid, .form-grid { grid-template-columns: 1fr; }
  .bio-wrap, .workflow-wrap, .jobs-wrap, .subscribe-band, .footer-wrap { padding-left: 18px; padding-right: 18px; }
  .lead-news h2 { font-size: 2rem; }
  .lead-news { padding-top: 22px; }
  .journal-panel { padding: 22px; }
  .full-field { grid-column: auto; }
}


/* Scientific jobs search and Canadian funding watch */
.jobs-search-panel,
.funding-search-panel {
  display: grid;
  grid-template-columns: 1.35fr 1.1fr .9fr .9fr auto auto;
  gap: 12px;
  align-items: end;
  margin: 26px 0 18px;
  padding: 20px;
  border-radius: 10px;
}
.jobs-search-panel { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); }
.funding-search-panel { background: var(--soft); border: 1px solid var(--line); grid-template-columns: 1.35fr 1fr 1fr .75fr auto; }
.jobs-search-panel label,
.funding-search-panel label { display: grid; gap: 6px; font-size: .82rem; font-weight: 800; }
.jobs-search-panel input,
.jobs-search-panel select { border-color: rgba(255,255,255,.22); }
.check-control { display: flex !important; align-items: center; gap: 9px !important; min-height: 45px; }
.check-control input { width: auto; }
.light-button { color: var(--navy); background: white; white-space: nowrap; }
.light-button:hover { background: var(--lime); }
.soft-button { color: var(--ink); background: #e6edef; white-space: nowrap; }
.soft-button:hover { background: #d5e1e4; }
.results-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 10px 0 20px; }
.results-count { margin: 0; font-weight: 800; }
.light-updated { color: #b8ccd3; }
.job-card { display: flex; flex-direction: column; min-height: 390px; }
.job-topline, .funding-topline, .job-card-footer, .job-detail-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.job-category, .remote-pill, .status-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.job-category { color: #07545b; background: #e8f5f3; }
.remote-pill { color: #5a3b00; background: #fff0c9; }
.job-employer { color: var(--navy); }
.job-location { margin: 5px 0 12px; color: var(--teal-dark); font-weight: 700; font-size: .9rem; }
.job-detail-row { justify-content: flex-start; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.job-card-footer { margin-top: 14px; font-size: .82rem; }
.job-card-footer > span { color: var(--muted); }
.source-directory { margin-top: 48px; padding-top: 34px; border-top: 1px solid rgba(255,255,255,.2); }
.source-directory-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.source-directory-heading h3 { margin-bottom: 0; font-size: 1.55rem; }
.source-directory-heading > p { max-width: 560px; color: #b8ccd3; }
.source-link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.source-link-grid a { display: grid; gap: 4px; padding: 18px; color: white; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 8px; text-decoration: none; }
.source-link-grid a:hover { border-color: var(--lime); transform: translateY(-1px); }
.source-link-grid span { color: #b8ccd3; font-size: .84rem; }

.funding-section { padding-top: 78px; padding-bottom: 82px; }
.funding-heading { margin-bottom: 10px; }
.funding-results-row { border-bottom: 2px solid var(--navy); padding-bottom: 10px; }
.funding-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.funding-card { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-top: 5px solid var(--teal); background: white; box-shadow: var(--shadow); }
.funding-card:nth-child(3n+2) { border-top-color: var(--orange); }
.funding-card:nth-child(3n) { border-top-color: var(--navy); }
.funding-topline > span:first-child { color: var(--teal-dark); font-weight: 800; font-size: .82rem; }
.status-open { color: #175d30; background: #e5f6e9; }
.status-upcoming { color: #6d4d00; background: #fff3cf; }
.status-rolling { color: #294f76; background: #e5f0fb; }
.funding-card h3 { margin: 15px 0 10px; font-size: 1.45rem; }
.funding-card > p { color: var(--muted); }
.funding-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 10px 0 20px; }
.funding-details div { padding: 10px 12px; background: var(--soft); }
.funding-details dt { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.funding-details dd { margin: 3px 0 0; font-size: .86rem; font-weight: 700; }
.funding-link { margin-top: auto; color: var(--teal-dark); font-weight: 800; text-underline-offset: 4px; }
.funding-source-panel { margin-top: 42px; padding: 28px; background: var(--soft-teal); border-left: 5px solid var(--teal); }
.funding-source-panel h3 { margin-bottom: 16px; }
.funding-source-links { display: flex; flex-wrap: wrap; gap: 10px; }
.funding-source-links a { padding: 9px 12px; background: white; border: 1px solid #c9dcd8; border-radius: 999px; color: var(--teal-dark); font-weight: 700; text-decoration: none; }
.funding-source-links a:hover { color: white; background: var(--teal-dark); }

@media (max-width: 1120px) {
  .jobs-search-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .funding-search-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .jobs-search-panel, .funding-search-panel { grid-template-columns: 1fr 1fr; }
  .source-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funding-grid { grid-template-columns: 1fr; }
  .source-directory-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .jobs-search-panel, .funding-search-panel, .source-link-grid { grid-template-columns: 1fr; }
  .results-row { align-items: flex-start; flex-direction: column; }
  .funding-details { grid-template-columns: 1fr; }
}

@media (max-width: 760px) { .jobs-audience-grid { grid-template-columns: 1fr; } }
