:root {
  --font-sans: "Univers", "Helvetica Neue", "Avenir Next", "Segoe UI", "YuGothic", Arial, sans-serif;
  --bcgov-blue: #0d0015;
  --bcgov-link: #165e83;
  --bcgov-gold: #fcba19;
  --bcgov-text: #0d0015;
  --bcgov-muted: #5d5563;
  --bcgov-border: #0d0015;
  --bcgov-border-strong: #0d0015;
  --bcgov-bg: #f7f4f8;
  --bcgov-surface: #ffffff;
  --bcgov-white: #ffffff;
  --bcgov-hover: #f0ebf3;
  --bcgov-hover-strong: #0d0015;
  --bcgov-hover-strong-text: #fffafc;
  --bcgov-shadow: none;
  --radius: 0px;
}

.employment-standards-page {
  font-family: var(--font-sans);
  color: var(--bcgov-text);
  position: relative;
}

body.employment-drawer-open {
  overflow: hidden;
}

.employment-standards-page * {
  box-sizing: border-box;
}

.employment-standards-page button,
.employment-standards-page input,
.employment-standards-page select,
.employment-standards-page textarea {
  font: inherit;
}

.employment-standards-page a {
  color: var(--bcgov-link);
}

.employment-standards-page .my-card,
.employment-standards-page .my-card-header {
  border-radius: 0;
}

.employment-hero__lead,
.employment-hero__aside,
.card-shell,
.study-card,
.source-card,
.section-button,
.topic-card,
.detail-block,
.sources-block,
.panel-callout {
  box-shadow: none;
}

.employment-hero__lead {
  display: grid;
  gap: 1rem;
  min-height: 100%;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--bcgov-border);
  background:
    linear-gradient(180deg, rgba(13, 0, 21, 0.04), rgba(13, 0, 21, 0) 28%),
    var(--bcgov-white);
}

.employment-hero__kicker,
.panel-kicker,
.study-label,
.source-kind,
.detail-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bcgov-link);
}

.employment-hero__title {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 0.82;
  letter-spacing: -0.06em;
  text-transform: lowercase;
}

.employment-hero__copy {
  max-width: 58ch;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--bcgov-text);
}

.employment-hero__aside .card-body {
  display: grid;
  gap: 1rem;
}

.employment-route-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.employment-route-badge--guide {
  color: var(--bcgov-white) !important;
}

.employment-route-link {
  display: block;
  padding: 0.9rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.employment-route-link:hover,
.employment-route-link:focus {
  background: var(--bcgov-hover);
  border-color: var(--bcgov-border);
  color: inherit;
}

.employment-route-link:hover strong,
.employment-route-link:focus strong,
.employment-route-link:hover p,
.employment-route-link:focus p {
  color: var(--bcgov-text);
}

.employment-route-row p {
  margin: 0.25rem 0 0;
  line-height: 1.55;
  color: var(--bcgov-muted);
}

.employment-standards-page h1,
.employment-standards-page h2,
.employment-standards-page h3,
.employment-standards-page h4,
.employment-standards-page h5,
.employment-standards-page h6,
.panel-callout h2,
.panel-heading h3,
.reader-section__heading h2,
.study-card h3,
.empty-state h2 {
  margin: 0;
  font-weight: 300;
  line-height: 1.2;
  color: var(--bcgov-text);
}

.feature-tile,
.card-shell,
.study-card,
.source-card,
.section-button {
  background: var(--bcgov-white);
  border: 1px solid var(--bcgov-border);
  border-radius: var(--radius);
}

.feature-tile {
  padding: 20px 20px 18px;
}

.feature-tile__bar,
.panel-callout__bar {
  width: 32px;
  height: 3px;
  background: var(--bcgov-gold);
  margin-bottom: 16px;
}

.feature-tile h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.feature-tile p {
  margin: 0;
  line-height: 1.7;
  color: var(--bcgov-muted);
}

.mode-switch {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.mode-switch__button,
.ghost-button,
.section-chip,
.link-button,
.reader-link {
  border-radius: var(--radius);
}

.mode-switch__button {
  border: 2px solid var(--bcgov-link);
  background: var(--bcgov-white);
  color: var(--bcgov-link);
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}

.mode-switch__button:hover {
  background: #eef6fb;
  color: var(--bcgov-link);
}

.mode-switch__button.is-active {
  background: var(--bcgov-link);
  color: var(--bcgov-white);
}

.mode-switch__button.is-active:hover {
  background: var(--bcgov-hover-strong);
  color: var(--bcgov-hover-strong-text);
  border-color: var(--bcgov-hover-strong);
}

.view-panel {
  display: block;
}

.view-panel--reader {
  width: min(1560px, calc(100vw - 48px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.is-hidden {
  display: none;
}

.panel-callout {
  display: flex;
  gap: 18px;
  padding: 24px;
  margin-bottom: 20px;
  background: #f1f8ff;
  border: 1px solid #cfe0ef;
  border-radius: var(--radius);
}

.panel-callout h2 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.panel-callout p {
  margin: 0;
  line-height: 1.7;
  color: var(--bcgov-muted);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 20px;
}

.reader-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.reader-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(240px, 1fr) minmax(220px, 300px) auto;
  gap: 16px;
  align-items: end;
  padding: 20px;
  margin-bottom: 20px;
}

.guide-sidebar,
.guide-detail,
.reader-sidebar,
.reader-main,
.reader-study,
.reader-toolbar > *,
.detail-grid > *,
.employment-route-row > div,
.panel-heading > *,
.topic-card,
.section-button,
.source-card {
  min-width: 0;
}

.card-shell {
  padding: 20px;
}

.reader-main {
  min-width: 0;
}

.reader-sidebar,
.reader-study {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.reader-study {
  display: flex;
  flex-direction: column;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  align-items: start;
  flex-wrap: wrap;
}

.panel-heading h3 {
  font-size: 1.5rem;
}

.panel-copy {
  margin: 0;
  max-width: 30ch;
  line-height: 1.6;
  color: var(--bcgov-muted);
  font-size: 0.95rem;
}

.mobile-panel-actions,
.panel-close-button,
.mobile-drawer-overlay,
.mobile-drawer-heading {
  display: none;
}

.toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--bcgov-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field input,
.field select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--bcgov-border-strong);
  border-radius: var(--radius);
  background: var(--bcgov-white);
  padding: 10px 12px;
  color: var(--bcgov-text);
}

.field input:focus,
.field select:focus,
.ghost-button:focus,
.mode-switch__button:focus,
.topic-card:focus,
.section-button:focus,
.segmented-switch button:focus,
.link-button:focus {
  outline: 2px solid #2e5dd7;
  outline-offset: 2px;
}

.ghost-button {
  min-height: 44px;
  border: 1px solid var(--bcgov-border-strong);
  background: var(--bcgov-white);
  color: var(--bcgov-link);
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button:hover,
.link-button:hover,
.reader-link:hover {
  background: var(--bcgov-hover-strong);
  color: var(--bcgov-hover-strong-text);
  border-color: var(--bcgov-hover-strong);
}

.ghost-button:hover {
  background: var(--bcgov-hover);
  color: var(--bcgov-text);
  border-color: var(--bcgov-border);
}

.topic-card:hover,
.section-button:hover,
.source-card:hover {
  background: var(--bcgov-hover);
  border-color: var(--bcgov-border);
  color: var(--bcgov-text);
}

.topic-card:hover h4,
.topic-card:hover p,
.section-button:hover .section-button__number,
.section-button:hover .section-button__title,
.source-card:hover h4,
.source-card:hover p,
.source-card:hover .source-kind {
  color: var(--bcgov-text);
}

.results-list,
.reader-toc,
.source-grid,
.study-stack {
  display: grid;
  gap: 12px;
}

.topic-card {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--bcgov-border);
  border-radius: var(--radius);
  background: var(--bcgov-white);
  text-align: left;
  cursor: pointer;
}

.topic-card.is-active,
.section-button.is-active {
  border-color: var(--bcgov-link);
  box-shadow: inset 4px 0 0 var(--bcgov-gold);
  background: #f7fbfe;
}

.topic-card__top,
.source-card__top,
.reader-section__meta,
.detail-chip-row,
.study-chip-row,
.segmented-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-card h4,
.reader-part h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.topic-card p,
.detail-summary,
.detail-block ul,
.source-card p,
.study-card p,
.study-card li,
.reader-section__summary,
.reader-section__body p,
.reader-section__body td,
.reader-section__body th,
.empty-state p,
.reader-section__header p {
  line-height: 1.7;
}

.topic-card p,
.source-card p,
.study-card p,
.empty-state p {
  margin: 0;
  color: var(--bcgov-muted);
}

.section-chip,
.detail-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: #f1f8ff;
  color: var(--bcgov-blue);
  border: 1px solid #cfe0ef;
  font-size: 0.8rem;
  font-weight: 700;
}

.detail-content,
.reader-main > div,
#readerStudyContent {
  min-height: 100%;
}

#readerStudyContent {
  min-height: 0;
  flex: 1 1 auto;
}

.mobile-drawer-heading {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-header,
.reader-section__header {
  margin-bottom: 18px;
}

.detail-header h2 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.2;
}

.detail-summary {
  margin: 0 0 16px;
  color: var(--bcgov-muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.detail-block {
  padding: 18px;
  border: 1px solid var(--bcgov-border);
  border-radius: var(--radius);
  background: var(--bcgov-white);
}

.detail-block h3,
.sources-block h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--bcgov-blue);
}

.detail-block ul,
.study-card ul {
  margin: 0;
  padding-left: 20px;
}

.sources-block {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--bcgov-border);
  border-radius: var(--radius);
  background: var(--bcgov-bg);
}

.source-list {
  display: grid;
  gap: 12px;
}

.source-entry {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bcgov-border);
}

.source-entry:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.segmented-switch {
  gap: 0;
  border: 1px solid var(--bcgov-border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}

.segmented-switch button {
  border: 0;
  background: var(--bcgov-white);
  color: var(--bcgov-link);
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

.segmented-switch button + button {
  border-left: 1px solid var(--bcgov-border-strong);
}

.segmented-switch button.is-active {
  background: var(--bcgov-link);
  color: var(--bcgov-white);
}

.reader-part {
  display: grid;
  gap: 10px;
}

.reader-part__label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bcgov-text);
}

.reader-part__sections {
  display: grid;
  gap: 8px;
}

.section-button {
  width: 100%;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.section-button__number {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bcgov-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-button__title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--bcgov-text);
}

.reader-section__heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 10px;
}

.reader-section__summary {
  margin: 0 0 16px;
  color: var(--bcgov-muted);
}

.reader-meta-pill,
.study-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: var(--bcgov-bg);
  border: 1px solid var(--bcgov-border);
  color: var(--bcgov-text);
  font-size: 0.8rem;
  font-weight: 700;
}

.reader-section__actions {
  margin-top: 16px;
}

.reader-link,
.link-button,
.source-card a,
.source-entry a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--bcgov-link);
  background: var(--bcgov-white);
  color: var(--bcgov-link);
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.source-entry a:hover {
  background: var(--bcgov-hover-strong);
  color: var(--bcgov-hover-strong-text);
  border-color: var(--bcgov-hover-strong);
}

.reader-section__body {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--bcgov-border);
}

.reader-block {
  position: relative;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.reader-block + .reader-block {
  margin-top: 8px;
}

.reader-block:hover {
  background: #f8fbff;
}

.reader-block.is-focused {
  background: #f1f8ff;
  border-color: #cfe0ef;
  box-shadow: inset 4px 0 0 var(--bcgov-gold);
}

.reader-block:focus {
  outline: 2px solid #2e5dd7;
  outline-offset: 2px;
}

.reader-section__body p,
.reader-section__body table {
  margin: 0;
}

.reader-section__body .secnumholder,
.reader-section__body .holder,
.reader-section__body .normal-bold-style,
.reader-section__body b {
  font-weight: 700;
}

.reader-section__body table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bcgov-bg);
}

.reader-section__body td,
.reader-section__body th {
  border: 1px solid var(--bcgov-border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.reader-highlight {
  background: #fff3b3;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.reader-highlight--pulse {
  animation: annotationPulse 1.4s ease;
}

.study-card {
  padding: 16px;
}

.study-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.study-stack {
  align-content: start;
}

.study-card ul {
  display: grid;
  gap: 8px;
}

.study-link-grid {
  display: grid;
  gap: 8px;
}

.study-link-grid .link-button,
.study-link-grid .reader-link {
  justify-content: flex-start;
  text-align: left;
}

.annotation-field textarea {
  width: 100%;
  min-height: 112px;
  border: 1px solid var(--bcgov-border-strong);
  border-radius: var(--radius);
  padding: 12px;
  resize: vertical;
  font: inherit;
  color: var(--bcgov-text);
}

.annotation-field textarea:focus {
  outline: 2px solid #2e5dd7;
  outline-offset: 2px;
}

.annotation-quote {
  margin: 0;
  padding: 12px;
  border-left: 4px solid var(--bcgov-gold);
  background: #fffaf0;
  color: var(--bcgov-text);
  font-size: 0.95rem;
}

.annotation-list {
  display: grid;
  gap: 12px;
}

.annotation-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--bcgov-border);
  border-radius: var(--radius);
  background: var(--bcgov-bg);
}

.annotation-comment {
  margin: 0;
  color: var(--bcgov-text);
}

.annotation-comment--muted {
  color: var(--bcgov-muted);
}

.annotation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  min-height: 320px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 8px;
}

.empty-state h2 {
  font-size: 1.8rem;
}

.source-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.sources-section {
  margin-top: 24px;
}

.source-card {
  padding: 16px;
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.source-card h4 {
  margin: 0;
  color: var(--bcgov-link);
  font-size: 1.05rem;
  line-height: 1.5;
}

.source-card p {
  font-size: 0.95rem;
}

.no-results {
  padding: 20px;
  border: 1px dashed var(--bcgov-border-strong);
  border-radius: var(--radius);
  background: var(--bcgov-bg);
}

.no-results p {
  margin: 8px 0 0;
  color: var(--bcgov-muted);
}

@keyframes annotationPulse {
  0% {
    background: #fcba19;
  }

  100% {
    background: #fff3b3;
  }
}

@media (max-width: 1199px) {
  .view-panel--reader {
    width: auto;
    position: static;
    left: auto;
    transform: none;
  }

  .reader-layout {
    grid-template-columns: 1fr;
  }

  .reader-study-toggle {
    display: none;
  }

  .reader-sidebar,
  .reader-study {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1040;
    width: min(360px, calc(100vw - 24px));
    max-width: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: none;
    background: var(--bcgov-white);
    box-shadow: 0 18px 40px rgba(13, 0, 21, 0.22);
    transition: transform 180ms ease;
  }

  .reader-sidebar {
    left: 0;
    transform: translateX(-102%);
  }

  .reader-study {
    left: auto;
    right: 0;
    transform: translateX(102%);
  }

  .reader-sidebar.is-open,
  .reader-study.is-open {
    transform: translateX(0);
  }

  .mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1035;
    background: rgba(13, 0, 21, 0.35);
  }

  .mobile-drawer-overlay.is-active {
    display: block;
  }

  .mobile-drawer-heading {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1;
    padding-bottom: 12px;
    background: var(--bcgov-white);
  }

  .mobile-panel-actions--reader {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 1025;
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 8px;
  }

  .mobile-panel-button,
  .panel-close-button {
    border: 1px solid var(--bcgov-border-strong);
    background: var(--bcgov-white);
    color: var(--bcgov-text);
    padding: 10px 14px;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
  }

  .mobile-panel-button {
    box-shadow: 0 10px 24px rgba(13, 0, 21, 0.18);
  }

  .panel-heading--drawer .panel-close-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .reader-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reader-sidebar {
    order: 2;
  }

  .reader-main {
    order: 1;
  }

  .reader-study {
    order: 3;
  }

  #readerView {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 991px) {
  .feature-grid,
  .guide-layout,
  .reader-layout,
  .detail-grid,
  .reader-toolbar {
    grid-template-columns: 1fr;
  }

  .guide-detail {
    order: 1;
  }

  .guide-sidebar {
    order: 2;
  }

  .panel-heading {
    display: grid;
  }

  .panel-copy {
    max-width: none;
  }

  .mobile-panel-actions {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 1025;
    display: grid;
    gap: 8px;
  }

  .mobile-panel-actions--reader {
    grid-template-columns: repeat(2, auto);
  }

  .employment-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1040;
    width: min(360px, calc(100vw - 24px));
    max-width: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: none;
    background: var(--bcgov-white);
    box-shadow: 0 18px 40px rgba(13, 0, 21, 0.22);
    transition: transform 180ms ease;
  }

  .employment-drawer--left {
    left: 0;
    transform: translateX(-102%);
  }

  .employment-drawer--right {
    right: 0;
    transform: translateX(102%);
  }

  .employment-drawer.is-open {
    transform: translateX(0);
  }

  .reader-study-toggle {
    display: none;
  }

  #guideView {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 767px) {
  .gov-section {
    padding: 24px 16px 40px;
  }

  .panel-callout {
    padding: 18px;
  }

  .card-shell,
  .feature-tile {
    padding: 16px;
  }

  .mode-switch {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mode-switch__button,
  .ghost-button,
  .reader-link,
  .link-button,
  .mobile-panel-button,
  .panel-close-button {
    width: 100%;
  }

  .annotation-actions {
    display: grid;
  }

  .mobile-panel-actions,
  .mobile-panel-actions--reader {
    left: 16px;
    right: 16px;
    grid-template-columns: 1fr;
  }

  .employment-drawer {
    width: calc(100vw - 18px);
  }
}
