/*
 * Defectologiya Pro /about — visual enhancement only (v2)
 * All selectors are marked by about-refresh.js; unrelated pages / UI stay intact.
 * No content is hidden or reordered. Original tabs keep their JS behavior.
 */

.dp-about-scope {
  --dp-ink: #1e293b;
  --dp-muted: #475569;
  --dp-blue: #2563eb;
  --dp-blue-hover: #1d4ed8;
  --dp-blue-wash: #eff6ff;
  --dp-line: #e2e8f0;
  --dp-light: #f8fafc;
  --dp-paper: #ffffff;
}

/* Title and hierarchy */
.dp-about-scope .dp-about-title {
  color: var(--dp-ink);
  font-size: clamp(28px, 3vw, 39px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 28px 0 26px;
  padding: 0 0 18px;
  max-width: 1100px;
  border-bottom: 1px solid var(--dp-line);
}

.dp-about-scope .dp-about-section-heading {
  color: var(--dp-ink);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 720;
  line-height: 1.35;
  letter-spacing: -0.012em;
  margin: 42px 0 20px;
  padding: 15px 18px;
  background: linear-gradient(90deg, var(--dp-blue-wash), #ffffff);
  border-left: 4px solid var(--dp-blue);
  border-radius: 0 12px 12px 0;
  scroll-margin-top: 90px;
}

.dp-about-scope .dp-about-subheading {
  color: #334155;
  font-size: clamp(16px, 1.55vw, 19px);
  font-weight: 680;
  line-height: 1.45;
  margin: 25px 0 12px;
  scroll-margin-top: 90px;
}

.dp-about-scope .dp-about-prose {
  color: var(--dp-muted);
  line-height: 1.72;
  overflow-wrap: break-word;
}

.dp-about-scope p.dp-about-prose { margin-bottom: 12px; }
.dp-about-scope :is(ul, ol).dp-about-prose { margin-bottom: 15px; }
.dp-about-scope .dp-about-rule {
  height: 1px;
  border: 0;
  background: var(--dp-line);
  margin: 26px 0;
}
.dp-about-scope .dp-about-image {
  max-width: 100%;
  height: auto;
}

/* Existing disclosure navigation: same links, order and click behavior.
 * The helper marks their common container, but never moves or replaces them. */
.dp-about-scope .dp-about-tab-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px 12px;
  margin: 16px 0 36px;
  padding: 0;
}
.dp-about-scope .dp-about-tab-list > * {
  margin: 0;
}
.dp-about-scope .dp-about-tab-list > li {
  list-style: none;
  padding: 0;
}

/* Neutrals are intentionally stronger than the original blue navigation CSS.
 * Avoid broad selectors such as an .active ancestor or aria-expanded=true:
 * those can make every item appear selected. */
.dp-about-scope .dp-about-existing-tab {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  width: auto;
  min-height: 40px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  padding: 10px 14px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.dp-about-scope .dp-about-tab-list .dp-about-existing-tab {
  /* Prevent local .nav/.tab CSS from painting all section links blue. */
  display: inline-flex !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  color: #334155 !important;
  text-decoration: none !important;
}
.dp-about-scope .dp-about-existing-tab:hover,
.dp-about-scope .dp-about-tab-list .dp-about-existing-tab:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #1d4ed8 !important;
}
.dp-about-scope .dp-about-existing-tab.active,
.dp-about-scope .dp-about-existing-tab[aria-selected="true"] {
  background: var(--dp-blue-wash);
  border-color: #93b4ff;
  color: #1d4ed8;
}
.dp-about-scope .dp-about-tab-list .dp-about-existing-tab.dp-about-tab--active,
.dp-about-scope .dp-about-tab-list .dp-about-existing-tab.dp-about-tab--active:hover {
  background: #dbeafe !important;
  border-color: #93b4ff !important;
  box-shadow: inset 0 0 0 1px #bfdbfe !important;
  color: #1d4ed8 !important;
}

/* Responsive, readable tables — including the original 11/12-column matrices. */
.dp-about-scope .dp-about-table-scroll {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  margin: 15px 0 26px;
  background: var(--dp-paper);
  border: 1px solid var(--dp-line);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .035);
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: #b5c7e0 #edf2f8;
  scrollbar-width: thin;
}

.dp-about-scope .dp-about-table {
  width: 100%;
  min-width: 100%;
  max-width: none;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  background: #fff;
  color: var(--dp-ink);
  font-size: 14px;
  line-height: 1.55;
  table-layout: auto;
}

.dp-about-scope .dp-about-table--wide {
  min-width: 1650px;
  font-size: 13px;
}

.dp-about-scope .dp-about-table :is(th, td) {
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
  border: 0;
  border-right: 1px solid #e8edf5;
  border-bottom: 1px solid #e8edf5;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: normal;
}
.dp-about-scope .dp-about-table tr > :last-child { border-right: 0; }
.dp-about-scope .dp-about-table tr:last-child > * { border-bottom: 0; }

.dp-about-scope .dp-about-table th {
  background: #eaf1fb;
  color: #243c5b;
  font-size: 12px;
  font-weight: 730;
  line-height: 1.4;
}
.dp-about-scope .dp-about-table tbody tr:nth-child(even) > td { background: #f8fafc; }
.dp-about-scope .dp-about-table tbody tr:hover > td { background: #f0f6ff; }
.dp-about-scope .dp-about-table .dp-about-table-header-row > td {
  background: #eaf1fb;
  color: #243c5b;
  font-size: 12px;
  font-weight: 730;
}
.dp-about-scope .dp-about-table .dp-about-table-group-row > td {
  background: #e9f1ff;
  color: #244a84;
  font-weight: 720;
  font-size: 14px;
}

.dp-about-scope .dp-about-table :is(td, th) a {
  color: #1d4ed8;
  font-weight: 550;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.dp-about-scope .dp-about-table :is(td, th) a:hover { color: #1e40af; }

.dp-about-scope .dp-about-table--wide :is(td, th) { min-width: 90px; }
.dp-about-scope .dp-about-table--wide tr > :first-child {
  width: 48px;
  min-width: 48px;
  max-width: 70px;
}
.dp-about-scope .dp-about-table--wide tr > :nth-child(2) { min-width: 250px; }
.dp-about-scope .dp-about-table--keyvalue tr > :first-child {
  width: 30%;
  min-width: 190px;
  background: #f4f7fc;
  color: #334155;
  font-weight: 650;
}

/* Document links outside tables: show single-link blocks as document rows. */
.dp-about-scope .dp-about-document-link {
  color: var(--dp-blue-hover);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.dp-about-scope .dp-about-document-link--card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  max-width: 100%;
  padding: 11px 14px;
  margin: 4px 0;
  border: 1px solid var(--dp-line);
  border-radius: 10px;
  background: #fff;
  color: #254c89;
  text-decoration: none;
  font-weight: 550;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
  transition: border-color .15s ease, background-color .15s ease;
}
.dp-about-scope .dp-about-document-link--card::before {
  content: '';
  display: block;
  width: 19px;
  height: 25px;
  flex: none;
  border: 1.6px solid #6489c9;
  border-radius: 3px;
  background: linear-gradient(#9db8e2, #9db8e2) 5px 9px / 9px 2px no-repeat,
              linear-gradient(#9db8e2, #9db8e2) 5px 14px / 9px 2px no-repeat,
              #edf4ff;
}
.dp-about-scope .dp-about-document-link--card:hover {
  background: var(--dp-blue-wash);
  border-color: #bfdbfe;
  color: var(--dp-blue-hover);
}

/* Keyboard navigation and mobile/print behavior */
.dp-about-scope :is(.dp-about-existing-tab, .dp-about-document-link, .dp-about-table-scroll):focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .dp-about-scope .dp-about-title {
    font-size: 27px;
    margin: 19px 0 20px;
  }
  .dp-about-scope .dp-about-section-heading {
    font-size: 19px;
    margin: 28px 0 14px;
    padding: 13px 12px;
  }
  .dp-about-scope .dp-about-table { font-size: 13px; }
  .dp-about-scope .dp-about-table :is(th, td) { padding: 9px 10px; }
  .dp-about-scope .dp-about-table-scroll { border-radius: 8px; }
  .dp-about-scope .dp-about-tab-list { gap: 8px; margin-bottom: 26px; }
  .dp-about-scope .dp-about-existing-tab { padding: 9px 11px; }
  .dp-about-scope .dp-about-tab-list .dp-about-existing-tab { padding: 9px 11px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .dp-about-scope :is(.dp-about-document-link--card, .dp-about-existing-tab) {
    transition: none;
  }
}

@media print {
  .dp-about-scope .dp-about-table-scroll {
    overflow: visible !important;
    box-shadow: none;
    break-inside: auto;
  }
  .dp-about-scope .dp-about-table--wide { min-width: 0; font-size: 8px; }
  .dp-about-scope .dp-about-table :is(td, th) {
    padding: 4px;
    min-width: 0 !important;
    overflow-wrap: anywhere;
  }
  .dp-about-scope .dp-about-section-heading {
    background: none;
    break-after: avoid;
  }
  .dp-about-scope .dp-about-document-link--card { box-shadow: none; }
}
