:root {
  --ink: #182c34;
  --muted: #586b75;
  --line: #dce5e9;
  --surface-soft: #f3f7fa;
  --page-text: var(--ink);
  --page-muted: var(--muted);
  --page-line: var(--line);
  --portal-top-height: 124px;
  --portal-sticky-height: 220px;
}

html { scroll-padding-top: calc(var(--portal-sticky-height) + 20px); }
.portal-skip { position: fixed; top: 8px; left: 16px; z-index: 10000; padding: 12px 18px; background: #087c72; color: white; border-radius: 4px; transform: translateY(-160%); }
.portal-skip:focus { transform: none; }
.portal-drawer-tools { display: none; }
.portal-nav-filtered { display: none !important; }
@media (max-width: 800px) {
  .portal-drawer-tools { display: block; grid-column: 1 / -1; margin-bottom: 12px; }
  .portal-drawer-tools > div { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
  .portal-drawer-tools > label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 5px; padding: 8px 12px; }
  .portal-drawer-tools input { width: 100%; min-width: 0; min-height: 30px; border: 0; background: white; font-size: 14px; }
  .portal-drawer-tools svg { width: 18px; height: 18px; flex-shrink: 0; }
  .portal-drawer-tools .icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 5px; cursor: pointer; }
  .portal-drawer-tools p { font-size: 14px; color: var(--muted); margin: 16px 0; }
  .sidebar .nav-group-label, .page-sidebar section > h2 { display: block; grid-column: 1 / -1; margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; }
  .page-sidebar-head { display: none; }
  .sidebar .nav-list { margin: 0; }
}
body { font-size: 16px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #087c72;
  outline-offset: 3px;
}
.portal-header-main, .portal-primary-row, .main-content > .view,
.page-main, .listings-page .page-main, .workspace-hero .hero-overlay {
  width: min(1360px, calc(100% - 64px));
}
.portal-header-main { height: 74px; }
.portal-header-search { max-width: 560px; background: #f3f7fa; border-color: #dce5e9; }
.portal-header-search input { font-size: 14px; min-height: 22px; }
.portal-header .icon-button, .portal-header .page-icon-button {
  width: 44px; height: 44px; flex-basis: 44px;
}
.portal-publish, .portal-header .page-app-button { font-size: 14px; font-weight: 600; min-height: 44px; }
.portal-primary-row { min-height: 50px; }
.portal-primary-nav { gap: 36px; }
.portal-primary-nav a, .portal-header.page-topbar .portal-primary-nav a {
  min-height: 50px; font-size: 15px; font-weight: 600;
}
.portal-primary-nav a svg { width: 19px; height: 19px; }
.app-shell > .sidebar, .page-shell > .page-sidebar {
  position: sticky; top: var(--portal-top-height); z-index: 34;
  width: min(1360px, calc(100% - 64px)); max-width: none;
  padding: 8px 0; background: #fff;
}
.sidebar .nav-list, .page-sidebar { gap: 2px 20px; }
.sidebar .nav-item, .page-sidebar a {
  font-size: 14px; font-weight: 500; min-height: 38px; padding: 9px 0;
}
.sidebar .nav-item svg, .page-sidebar a svg { width: 17px; height: 17px; }
.sidebar .nav-item.is-active, .page-sidebar a.is-active { font-weight: 650; }
.main-content > .view { margin-top: 32px; margin-bottom: 64px; }
.section-head { gap: 16px; margin-bottom: 24px; }
.section-head h2, .page-heading h1 { font-size: 32px; line-height: 1.25; font-weight: 700; }
.eyebrow, .page-heading > p { font-size: 12px; line-height: 1.5; font-weight: 600; }
.page-heading > div, .page-lead { font-size: 16px; line-height: 1.65; }
.page-breadcrumbs { font-size: 13px; }
.primary-button, .secondary-button, .page-primary, .page-secondary {
  min-height: 44px; font-size: 14px; font-weight: 600; border-radius: 6px;
}
.field > span, .field > label { font-size: 14px; font-weight: 500; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),
.field select { min-height: 46px; font-size: 14px; padding: 11px 12px; border-color: #cbd8df; }
.field textarea { font-size: 15px; line-height: 1.6; }
.tabs .tab { min-height: 44px; font-size: 14px; font-weight: 600; }
.tabbar { flex-wrap: wrap; gap: 4px 10px; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.tabbar .tab { min-height: 44px; padding: 10px 12px; font-size: 14px; font-weight: 600; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); }
.tabbar .tab.is-active, #view-normative .normative-tabs .tab.is-active, #view-tests .tabbar .tab.is-active {
  color: #075f57; background: transparent; border-bottom-color: #087c72;
}
.tabs .tab.is-active, #view-tests .tabs .tab.is-active, .page-tabs a.is-active {
  color: #fff; background: #087c72;
}
.panel, .activity-card, .manufacturer-card, .company-card, .page-card,
.resource-card, .professional-test-card { box-shadow: none; border-color: var(--line); border-radius: 6px; }
.page-card:hover, .resource-card:hover, .professional-test-card:hover {
  border-color: #97b9bd; box-shadow: 0 5px 18px #182c340a;
}
.page-card h2, .resource-card h3, #view-tests .professional-test-card h3 { font-size: 17px; line-height: 1.45; font-weight: 600; }
.resource-card p, .page-card-body > p, .professional-test-card p { font-size: 14px; line-height: 1.65; }
.resource-card small, .page-card-meta, .professional-test-card small { font-size: 12px; }

.workspace-hero { height: 340px; }
.workspace-hero .hero-copy { width: 44%; }
.workspace-hero .eyebrow { font-size: 12px; }
.workspace-hero .hero-copy > p:not(.eyebrow) { font-size: 22px; }
.portal-hero-links > a { font-size: 14px; min-height: 44px; }
.home-quick { gap: 32px; padding-block: 28px; }
.home-quick strong { font-size: 16px; }
.home-quick small { font-size: 13px; line-height: 1.45; }
.home-heading { margin-bottom: 24px; }
.home-heading h2 { font-size: 30px; font-weight: 700; }
.home-heading small { font-size: 11px; line-height: 1.5; }
.home-heading > a { font-size: 14px; min-height: 44px; }
.home-section { padding-block: 36px; }
.home-listings { gap: 24px; }
.home-listing-photo { aspect-ratio: 1.5; }
.home-listing h3 { font-size: 16px; line-height: 1.5; }
.home-listing-price { font-size: 22px; }
.home-listing footer, .home-listing-contact { font-size: 13px; }
.home-listing-publish { background: #fff3ef; padding: 28px; border-left: 3px solid #e94336; border-radius: 0; }
.home-listing-publish strong { font-size: 22px; max-width: 36ch; }
.home-listing-publish span, .home-listing-publish a { font-size: 14px; line-height: 1.6; }
.home-listings[data-count="0"] > .home-notice { grid-column: span 2; }
.home-listings[data-count="0"] > .home-listing-publish { grid-column: span 2; }
.home-listings[data-count="1"] > .home-listing-publish { grid-column: span 3; }
.home-listings[data-count="2"] > .home-listing-publish { grid-column: span 2; }
.home-jobs-band { background: #eff6fc; border-color: #dce8f0; }
.home-jobs-layout { grid-template-columns: minmax(0, 1fr) 300px; }
.home-job { padding-block: 24px; border-color: #d6e3ec; }
.home-job h3, .home-job-salary { font-size: 18px; font-weight: 650; }
.home-job-employer { font-size: 14px; }
.home-job-meta { font-size: 12px; }
.home-career { border-radius: 0; background: transparent; padding: 8px 0 0 28px; border-left: 1px solid #c4d9e7; }
.home-career h3 { font-size: 24px; }
.home-career p { font-size: 14px; }
.home-career > a { font-size: 14px; background: #1764a0; }
.home-calculator { padding: 24px; }
.home-calculator h3 { font-size: 19px; }
.home-calculator > p, .home-calc-fields label { font-size: 13px; }
.home-calc-fields input { min-height: 46px; background: #f5f8fb; border-color: #dce5e9; }
.home-calc-result > span { font-size: 13px; }
.home-calc-result small, .home-calculation-note, .home-calc-fields > p { font-size: 12px; line-height: 1.6; }

/* Keep unsold placements compact without changing paid creatives. */
.ad-card.is-house, #view-jobs .ad-card.is-house {
  grid-template-columns: 72px minmax(0, 1fr); min-height: 98px;
  border: 1px dashed #aebfc8; border-radius: 6px; background: #f5f9fc;
}
.ad-card.is-house .ad-card-media, #view-jobs .ad-card.is-house .ad-card-media {
  min-height: 0; aspect-ratio: auto; background: transparent; color: #1764a0;
}
.ad-card.is-house .ad-card-media svg, #view-jobs .ad-card.is-house .ad-card-media svg { width: 28px; height: 28px; }
.ad-card.is-house .ad-card-copy, #view-jobs .ad-card.is-house .ad-card-copy { padding: 14px 16px 14px 0; }
.ad-card.is-house .ad-disclosure { margin-bottom: 5px; font-size: 11px; }
.ad-card.is-house h3 { font-size: 17px; }
.ad-card.is-house p { display: none; }
.ad-card.is-house .ad-card-action { font-size: 13px; font-weight: 600; }

#view-jobs .job-filter-panel, .classified-filters, .classified-contact-panel,
.professional-reader-toc { top: calc(var(--portal-sticky-height) + 16px); }
.professional-reader-toc { max-height: calc(100dvh - var(--portal-sticky-height) - 40px); }
#view-jobs .job-row { padding: 22px; }
#view-jobs .job-category { font-weight: 500; color: #315c74; background: #edf5fa; }
#view-jobs .job-listing-main > p { font-size: 14px; line-height: 1.65; }
#view-jobs .job-title-button { font-weight: 650; }
#view-jobs .job-filter-panel { border-color: #dce5e9; }
#view-jobs .job-filter-form {
  display: flex; flex-direction: column; gap: 0; padding: 0;
  max-height: calc(100dvh - var(--portal-sticky-height) - 86px);
  min-height: 0;
}
#view-jobs .job-filter-fields {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px;
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px; scrollbar-gutter: stable;
}
#view-jobs .job-filter-actions {
  flex-shrink: 0; padding: 12px 14px; background: var(--surface);
  border-top: 1px solid var(--line);
}
@media (max-width: 1120px) {
  #view-jobs .job-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  #view-jobs .job-filter-fields { grid-template-columns: minmax(0, 1fr); }
  #view-jobs .job-filter-form { max-height: min(560px, calc(100dvh - var(--portal-sticky-height) - 86px)); }
}
#view-tests .professional-test-filter-panel { background: #f3f7fa; border-color: #dce5e9; }
#view-tests .test-filter-field > span { font-size: 13px; }
#view-tests .test-filter-field > span b { background: #1764a0; color: #fff; }
#view-tests .test-filter-trigger { min-height: 62px; background: #fff; }
#view-tests .test-filter-trigger strong { font-size: 14px; font-weight: 600; }
#view-tests .test-filter-trigger small { font-size: 12px; }
#view-tests .professional-test-card { border-top: 3px solid #1764a0; }
#view-normative .normative-type-button strong { font-size: 14px; }
#view-normative .normative-source-option { font-size: 13px; min-height: 40px; }
#view-normative .normative-document-title { font-size: 16px; line-height: 1.5; }
.classified-card h2 { font-size: 17px; line-height: 1.45; }
.classified-price { font-size: 22px; }
.site-footer, .page-footer { font-size: 13px; line-height: 1.7; }

@media (min-width: 1400px) {
  .home-jobs-band { margin-inline: calc((1360px - 100vw) / 2); padding-inline: max(32px, calc((100vw - 1360px) / 2)); }
}
@media (min-width: 801px) and (max-width: 1399px) {
  .home-jobs-band { margin-inline: -32px; padding-inline: 32px; }
}
@media (max-width: 1100px) {
  .sidebar .nav-list, .page-sidebar { column-gap: 16px; }
  .sidebar .nav-item, .page-sidebar a { font-size: 13px; }
  .home-job-top { flex-wrap: wrap; gap: 6px 20px; }
  .home-job-salary { white-space: normal; }
}
@media (max-width: 800px) {
  :root { --portal-top-height: 122px; --portal-sticky-height: 122px; }
  .portal-header-main, .portal-primary-row, .main-content > .view,
  .page-main, .listings-page .page-main, .workspace-hero .hero-overlay { width: calc(100% - 32px); }
  .portal-header-main { height: 72px; gap: 8px; }
  .portal-header-actions, .portal-header .page-topbar-actions { gap: 4px; }
  .portal-primary-nav { display: flex; width: 100%; gap: 20px; overflow-x: auto; scrollbar-width: thin; }
  .portal-primary-nav a, .portal-header.page-topbar .portal-primary-nav a { flex: 0 0 auto; justify-content: center; min-height: 50px; font-size: 13px; gap: 5px; }
  .portal-primary-nav a svg { display: none; }
  .portal-primary-row { gap: 0; }
  .portal-header .portal-menu-toggle { display: inline-grid; }
  .app-shell > .sidebar, .page-shell > .page-sidebar {
    position: fixed; top: var(--portal-top-height); width: 100%; max-width: none;
    max-height: calc(100dvh - var(--portal-top-height)); padding: 16px;
    border-bottom: 1px solid var(--line); z-index: 40;
  }
  .sidebar .nav-list, .page-sidebar.is-open { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
  .sidebar .nav-item, .page-sidebar a { min-height: 44px; font-size: 14px; white-space: normal; }
  .sidebar-backdrop, .page-sidebar-backdrop { inset: var(--portal-top-height) 0 0; }
  .workspace-hero { height: 280px; }
  .workspace-hero .hero-copy { width: 61%; }
  .workspace-hero h1 { font-size: 46px; }
  .workspace-hero .hero-copy > p:not(.eyebrow) { font-size: 17px; }
  .portal-hero-links { gap: 10px; }
  .portal-hero-links > a, .portal-hero-links .primary-button { font-size: 13px; min-height: 44px; }
  .home-quick { gap: 16px; padding-block: 22px; }
  .home-quick strong { font-size: 14px; }
  .home-quick small { display: none; }
  .home-heading { align-items: center; flex-wrap: wrap; gap: 8px 16px; }
  .home-heading h2 { font-size: 26px; }
  .home-heading small { font-size: 10px; }
  .home-heading > a { font-size: 13px; }
  .home-section { padding-block: 28px; }
  .home-listings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .home-listings[data-count] > .home-listing-publish { grid-column: auto; padding: 18px; }
  .home-listings[data-count="0"] > .home-notice { grid-column: 1 / -1; }
  .home-listings[data-count="0"] > .home-listing-publish { grid-column: 1 / -1; }
  .home-listings[data-count="1"] > .home-listing { grid-column: 1 / -1; max-width: 440px; }
  .home-listings[data-count] > .home-listing-publish { grid-column: 1 / -1; min-height: 0; gap: 12px; }
  .home-listing-publish strong { font-size: 18px; }
  .home-listing-publish span, .home-listing-publish a { font-size: 13px; }
  .home-listing-price { font-size: 19px; }
  .home-listing h3 { font-size: 15px; }
  .home-jobs-band { margin-inline: -16px; padding-inline: 16px; }
  .home-jobs-layout { grid-template-columns: 1fr; }
  .home-job h3, .home-job-salary { font-size: 17px; }
  .home-job-employer { font-size: 13px; }
  .home-job-meta { font-size: 12px; }
  .home-calculators { grid-template-columns: 1fr; }
  .home-calculator { padding: 22px; }
  .section-head h2, .page-heading h1 { font-size: 27px; }
  .section-head { margin-bottom: 20px; }
  #view-jobs .section-head { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 12px; align-items: center; }
  #view-jobs .section-head > div:first-child { width: auto; grid-column: 1; grid-row: 1; }
  #view-jobs .section-head > .professional-context-button { grid-column: 2; grid-row: 1; margin: 0; width: 44px; height: 44px; }
  #view-jobs .section-head > .primary-button { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .tabbar { flex-wrap: nowrap; overflow-x: auto; }
  .tabbar .tab { flex-shrink: 0; white-space: nowrap; font-size: 13px; }
  #jobTabs { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 2px; overflow: visible; }
  #jobTabs .tab { padding-inline: 8px; font-size: 12px; }
  #jobTabs .tab svg { width: 16px; height: 16px; flex-shrink: 0; }
  .ad-card.is-house, #view-jobs .ad-card.is-house { grid-template-columns: 48px minmax(0, 1fr); min-height: 96px; }
  .ad-card.is-house .ad-card-copy, #view-jobs .ad-card.is-house .ad-card-copy { padding: 12px 12px 12px 0; }
  #view-jobs .job-row { padding: 18px 16px; }
  .professional-reader-toc { position: static; max-height: none; }
  .classified-filters { position: static; }
}
@media (max-width: 520px) {
  .portal-primary-nav { gap: 10px; }
  .portal-header-actions > a[href='/messages'], .portal-header .page-topbar-actions > a[href='/messages'] { display: none; }
  .portal-publish span, .portal-header .page-app-button span { display: none; }
  .portal-publish, .portal-header .page-app-button { width: 44px; padding: 10px; }
  .portal-brand > span:last-child { font-size: 23px; }
  .portal-primary-nav a, .portal-header.page-topbar .portal-primary-nav a { font-size: 12px; }
  .home-quick a { align-items: flex-start; }
  .home-quick strong { font-size: 13px; }
  .home-listing-publish strong { font-size: 17px; }
  .home-listing-publish span { display: none; }
  .page-main, .listings-page .page-main { padding-top: 24px; }
}
@media (max-width: 360px) {
  .portal-primary-nav { gap: 4px; }
  .portal-primary-nav a, .portal-header.page-topbar .portal-primary-nav a { font-size: 11px; }
  .portal-brand > span:last-child { font-size: 21px; }
  .workspace-hero .hero-copy { width: 67%; }
  .workspace-hero h1 { font-size: 41px; }
  .home-quick strong { font-size: 12px; }
  .home-heading h2 { font-size: 25px; }
  .home-listing-price { font-size: 17px; }
}
