:root {
  --table-tools-pine: #103f2f;
  --table-tools-green: #15936a;
  --table-tools-lime: #c9ff66;
  --table-tools-cream: #f7f4ea;
  --table-tools-line: #cbd5d0;
  --table-tools-muted: #64736c;
}

body { overflow-x: clip; }

.table-tools__toolbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 8px 8px 8px 17px;
  border: 1px solid var(--table-tools-line);
  border-bottom: 0;
  color: var(--table-tools-muted);
  background: rgba(255, 255, 255, .78);
}

.table-tools__toolbar > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .055em;
  line-height: 1.2;
  text-transform: uppercase;
}

.table-tools__toolbar > span > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--table-tools-green);
  box-shadow: 0 0 0 5px rgba(21, 147, 106, .1);
}

.table-tools__toolbar button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 13px;
  border: 1px solid var(--table-tools-pine);
  color: #fff;
  background: var(--table-tools-pine);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.table-tools__toolbar button:hover {
  color: var(--table-tools-pine);
  background: var(--table-tools-lime);
  transform: translateY(-1px);
}

.table-tools__toolbar button:focus-visible,
.table-fullscreen button:focus-visible {
  outline: 3px solid var(--table-tools-lime);
  outline-offset: 2px;
}

.table-tools__expand-icon {
  position: relative;
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
}

.table-tools__expand-icon::before,
.table-tools__expand-icon::after {
  position: absolute;
  width: 5px;
  height: 5px;
  content: "";
}

.table-tools__expand-icon::before {
  top: 2px;
  right: 2px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.table-tools__expand-icon::after {
  bottom: 2px;
  left: 2px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
}

.table-tools__viewport {
  --table-tools-header-bg: #f2f4ef;
  position: relative;
  max-width: 100%;
  max-height: min(76vh, 780px);
  overflow: auto !important;
  overscroll-behavior: contain;
  scrollbar-color: var(--table-tools-green) rgba(16, 63, 47, .1);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.table-tools__viewport table thead tr > * {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--table-tools-header-bg) !important;
  box-shadow: inset 0 -1px 0 rgba(16, 63, 47, .28), 0 7px 13px rgba(16, 63, 47, .08);
}

.table-tools__viewport table thead tr > :first-child { z-index: 24; }
.education-table.table-tools__viewport { --table-tools-header-bg: #103f2f; }
.legal-table-wrap.table-tools__viewport { --table-tools-header-bg: #15936a; }
.price-table-scroll.table-tools__viewport { --table-tools-header-bg: #f7f9f5; }
.official-vacancy-table.table-tools__viewport { --table-tools-header-bg: #eef2ec; }

@media (min-width: 901px) {
  .education-table-shell > .education-table-controls {
    position: sticky;
    top: 88px;
    z-index: 60;
    margin-bottom: 8px;
    background: rgba(247, 244, 234, .96);
    box-shadow: 0 12px 26px rgba(7, 47, 35, .12);
    backdrop-filter: blur(14px);
  }

  .education-registry-section.is-featured .education-table-shell > .education-table-controls {
    background: rgba(16, 63, 47, .96);
  }

  .education-registry-section.is-featured { overflow: clip; }
}

.table-tools__floating-header {
  position: fixed;
  z-index: 59;
  overflow: hidden;
  border: 1px solid var(--pine-950, #103f2f);
  border-top: 0;
  pointer-events: none;
  box-shadow: 0 12px 24px rgba(7, 47, 35, .14);
}

.table-tools__floating-header[hidden] { display: none; }

.table-tools__floating-header-scroll {
  width: 100%;
  overflow: hidden;
}

.table-tools__floating-header-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.table-tools__floating-header-table th,
.table-tools__floating-header-table td {
  box-sizing: border-box;
  padding: 17px 18px;
  border-right: 1px solid rgba(255, 255, 255, .18);
  border-bottom: 1px solid rgba(255, 255, 255, .22);
  color: rgba(255, 255, 255, .78);
  background: var(--table-tools-pine);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .075em;
  line-height: 1.4;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
}

.table-tools__floating-header-table th:first-child,
.table-tools__floating-header-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
}

.table-tools__floating-header-table tr > :last-child { border-right: 0; }

.table-fullscreen {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--table-tools-pine);
  background: var(--table-tools-cream);
}

.table-fullscreen[open] { display: block; }
.table-fullscreen::backdrop { background: rgba(2, 28, 20, .82); backdrop-filter: blur(7px); }
.table-fullscreen-open { overflow: hidden; }

.table-fullscreen__panel {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
}

.table-fullscreen__header {
  position: relative;
  z-index: 40;
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 17px clamp(18px, 3vw, 46px);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  background: var(--table-tools-pine);
  box-shadow: 0 12px 34px rgba(2, 28, 20, .2);
}

.table-fullscreen__header > div { min-width: 0; }

.table-fullscreen__header span:first-child {
  display: block;
  color: var(--table-tools-lime);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.table-fullscreen__header h2 {
  max-width: min(1050px, 72vw);
  overflow: hidden;
  margin: 5px 0 0;
  font-family: Unbounded, Arial, sans-serif;
  font-size: clamp(18px, 2vw, 29px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-fullscreen__header small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, .64);
  font-size: 11px;
  font-weight: 700;
}

.table-fullscreen__header button {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 15px;
  border: 1px solid rgba(255, 255, 255, .32);
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.table-fullscreen__header button:hover { color: var(--table-tools-pine); background: var(--table-tools-lime); }

.table-fullscreen__header button > i {
  position: relative;
  width: 15px;
  height: 15px;
}

.table-fullscreen__header button > i::before,
.table-fullscreen__header button > i::after {
  position: absolute;
  top: 7px;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

.table-fullscreen__header button > i::after { transform: rotate(-45deg); }

.table-fullscreen__body {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(10px, 1.5vw, 24px);
  scrollbar-color: var(--table-tools-green) rgba(16, 63, 47, .1);
  scrollbar-width: thin;
}

.table-tools__dialog-table {
  --table-tools-fit-font: clamp(10px, .78vw, 14px);
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
  color: var(--table-tools-pine);
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 20px 70px rgba(7, 47, 35, .1);
}

.table-tools__dialog-table--wide { --table-tools-fit-font: clamp(8px, .65vw, 12px); }
.table-tools__dialog-table--dense { --table-tools-fit-font: clamp(7px, .55vw, 10px); }

.table-tools__dialog-table caption {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

.table-tools__dialog-table th,
.table-tools__dialog-table td {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: clamp(7px, .75vw, 14px) !important;
  border-right: 1px solid var(--table-tools-line) !important;
  border-bottom: 1px solid var(--table-tools-line) !important;
  font-size: var(--table-tools-fit-font) !important;
  line-height: 1.35 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.table-tools__dialog-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  color: #fff !important;
  background: var(--table-tools-pine) !important;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .22), 0 8px 18px rgba(7, 47, 35, .14) !important;
  font-weight: 850 !important;
  letter-spacing: .035em !important;
  text-transform: uppercase !important;
  vertical-align: bottom !important;
}

.table-tools__dialog-table tbody th,
.table-tools__dialog-table tbody td { position: static !important; background-color: rgba(255, 255, 255, .9) !important; }
.table-tools__dialog-table tbody tr:nth-child(even) > * { background-color: #eef3e9 !important; }
.table-tools__dialog-table tr > :last-child { border-right: 0 !important; }
.table-tools__dialog-table tbody tr:last-child > * { border-bottom: 0 !important; }

.table-tools__dialog-table th > *,
.table-tools__dialog-table td > * {
  min-width: 0 !important;
  max-width: 100% !important;
}

.table-tools__dialog-table .education-registry-cell__value,
.table-tools__dialog-table .education-registry-links {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.table-tools__dialog-table .education-registry-links {
  gap: clamp(4px, .4vw, 7px) !important;
}

.table-tools__dialog-table .education-registry-links a {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-template-columns: minmax(0, 1fr) clamp(15px, 1.25vw, 20px) !important;
  gap: clamp(4px, .55vw, 8px) !important;
  padding: clamp(5px, .55vw, 9px) !important;
  overflow: hidden;
  font-size: inherit !important;
  line-height: 1.3 !important;
}

.table-tools__dialog-table .education-registry-links a span {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}

.table-tools__dialog-table .education-registry-links a b {
  width: clamp(15px, 1.25vw, 20px) !important;
  min-width: 0 !important;
  height: clamp(15px, 1.25vw, 20px) !important;
  font-size: clamp(7px, .55vw, 9px) !important;
}

.table-tools__dialog-table .education-details-trigger {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  gap: clamp(4px, .5vw, 8px) !important;
  padding: clamp(5px, .55vw, 8px) !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
}

.table-tools__dialog-table .education-details-trigger b {
  flex: 0 0 auto;
  min-width: clamp(16px, 1.3vw, 21px) !important;
  height: clamp(16px, 1.3vw, 21px) !important;
  padding-inline: 3px !important;
}

.control-shell .table-tools__toolbar {
  min-height: 48px;
  margin-top: 8px;
  border-color: #d2dad6;
  border-radius: 12px 12px 0 0;
  background: #f8f9f5;
}

.control-shell .table-tools__toolbar button { border-radius: 8px; }
.control-shell .table-tools__viewport { --table-tools-header-bg: #f2f3ee; }
.control-shell .analytics-table-wrap.table-tools__viewport { --table-tools-header-bg: #fff; }

@media (max-width: 760px) {
  .table-tools__toolbar { min-height: 46px; padding-left: 12px; }
  .table-tools__toolbar > span { font-size: 9px; }
  .table-tools__toolbar button { min-height: 34px; padding: 7px 10px; font-size: 11px; }
  .table-tools__viewport { max-height: min(72vh, 620px); }
  .table-fullscreen__header { min-height: 82px; gap: 12px; padding: 13px 14px; }
  .table-fullscreen__header h2 { max-width: calc(100vw - 112px); font-size: 16px; }
  .table-fullscreen__header button { width: 42px; min-height: 42px; padding: 0; }
  .table-fullscreen__header button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-fullscreen__body { padding: 10px; }

  .table-tools__dialog-table,
  .table-tools__dialog-table tbody,
  .table-tools__dialog-table tr,
  .table-tools__dialog-table tbody th,
  .table-tools__dialog-table tbody td { display: block !important; width: 100% !important; }

  .table-tools__dialog-table { background: transparent; box-shadow: none; }
  .table-tools__dialog-table thead { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; }
  .table-tools__dialog-table tbody { display: grid !important; gap: 12px; }
  .table-tools__dialog-table tbody tr { overflow: hidden; border: 1px solid var(--table-tools-line); background: #fff; box-shadow: 0 8px 24px rgba(7, 47, 35, .07); }

  .table-tools__dialog-table tbody th,
  .table-tools__dialog-table tbody td {
    display: grid !important;
    grid-template-columns: minmax(92px, .42fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--table-tools-line) !important;
    background: #fff !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
  }

  .table-tools__dialog-table tbody tr:nth-child(even) > * { background: #fff !important; }
  .table-tools__dialog-table tbody tr > :last-child { border-bottom: 0 !important; }

  .table-tools__dialog-table tbody th::before,
  .table-tools__dialog-table tbody td::before {
    color: var(--table-tools-muted);
    content: attr(data-table-label);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .055em;
    line-height: 1.4;
    text-transform: uppercase;
  }
}

@media (max-width: 420px) {
  .table-tools__toolbar > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-tools__toolbar { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .table-tools__toolbar button { transition: none; }
}
