/* Prozori theme over Bootstrap 5.3 (SPEC-13): the only hand-written stylesheet of the screens. Colours and fonts of
   prozori.in.ua (landing-redesign.css). Accents are darkened on light pages for WCAG AA text contrast (≥ 4.5:1 on
   white): primary #4F9BED → #3B74B1 (4.9:1), success #5FD39A → #397E5C (4.9:1). Light pages only (no dark mode). */

/* 1. Bootstrap variables */
:root {
  --bs-body-font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-font-monospace: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --bs-body-font-size: .9375rem;
  --bs-primary: #3B74B1; --bs-primary-rgb: 59, 116, 177;
  --bs-primary-text-emphasis: #274D76; --bs-primary-bg-subtle: #E6F0FC; --bs-primary-border-subtle: #A7CBF6;
  --bs-success: #397E5C; --bs-success-rgb: 57, 126, 92;
  --bs-success-text-emphasis: #2F694D; --bs-success-bg-subtle: #E4F7EE; --bs-success-border-subtle: #A9E6C6;
  --bs-link-color: #3B74B1; --bs-link-color-rgb: 59, 116, 177;
  --bs-link-hover-color: #274D76; --bs-link-hover-color-rgb: 39, 77, 118;
  --bs-focus-ring-color: rgba(59, 116, 177, .25);
  --bs-code-color: #33649A;
}
/* Bootstrap writes these colours as literals, not through --bs-primary / --bs-success */
.btn-primary { --bs-btn-bg: #3B74B1; --bs-btn-border-color: #3B74B1; --bs-btn-hover-bg: #33649A;
  --bs-btn-hover-border-color: #33649A; --bs-btn-active-bg: #2F5D8E; --bs-btn-active-border-color: #2F5D8E;
  --bs-btn-disabled-bg: #3B74B1; --bs-btn-disabled-border-color: #3B74B1; --bs-btn-focus-shadow-rgb: 59, 116, 177; }
.btn-outline-primary { --bs-btn-color: #3B74B1; --bs-btn-border-color: #3B74B1; --bs-btn-hover-bg: #3B74B1;
  --bs-btn-hover-border-color: #3B74B1; --bs-btn-active-bg: #33649A; --bs-btn-active-border-color: #33649A; }
.btn-success { --bs-btn-bg: #397E5C; --bs-btn-border-color: #397E5C; --bs-btn-hover-bg: #2F694D;
  --bs-btn-hover-border-color: #2F694D; --bs-btn-active-bg: #2F694D; --bs-btn-active-border-color: #2F694D; }
.pagination { --bs-pagination-active-bg: #3B74B1; --bs-pagination-active-border-color: #3B74B1; }
.dropdown-menu { --bs-dropdown-link-active-bg: #3B74B1; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: #A7CBF6; box-shadow: 0 0 0 .25rem rgba(59, 116, 177, .25); }
.form-check-input:checked { background-color: #3B74B1; border-color: #3B74B1; }
/* numbers line up in columns (Plex Sans has tabular figures) */
.text-end { font-variant-numeric: tabular-nums; }

/* 2. Header: the site's navy, translucent ("frosted glass": the page shows through, blurred, when it scrolls under the
   sticky header); one row on desktop, on a phone the menu wraps onto its own row. Tune --header-alpha (0 … 1). */
.site-header { --header-alpha: .86; background: rgba(28, 44, 71, var(--header-alpha));
  -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(140, 192, 245, .18); z-index: 1030; }
.site-header a { color: #C9D6EA; text-decoration: none; }
.site-header a:hover, .site-header a:focus { color: #FFFFFF; }
.site-header .brand { color: #E6EDF7; font-weight: 600; }
.site-header .presale-id { color: #9FB2CC; }
.site-header .nav-link { padding: .25rem .6rem; border-radius: var(--bs-border-radius); }
.site-header .nav-link.active { color: #FFFFFF; background: rgba(79, 155, 237, .22); box-shadow: inset 0 -2px #4F9BED; }
.site-header .who { color: #9FB2CC; }

/* 3. What Bootstrap has no class for */
/* Bootstrap's headings are sized for landing pages; work screens are dense */
main h1 { font-size: 1.5rem; margin: 1rem 0 .75rem; } main h2 { font-size: 1.2rem; margin-top: 1.5rem; }
main h3 { font-size: 1.05rem; margin-top: 1rem; }
/* the sticky header (desktop) covers anchor targets (#T-0001, ТЗ requirement ids) unless they keep a margin */
[id] { scroll-margin-top: 4.5rem; }
/* a linked anchor (ТЗ requirement, guide row) is highlighted when the URL points at it */
:target { outline: 2px solid #4F9BED; outline-offset: 3px; border-radius: var(--bs-border-radius); }
/* the task panel follows the scroll next to a long table and scrolls on its own (desktop only, .sticky-xl-top) */
@media (min-width: 1200px) { .panel-sticky { top: 4.25rem; max-height: calc(100vh - 5rem); overflow: auto; } }
/* the task code stays visible while the wide tasks table scrolls sideways (cells are opaque in Bootstrap);
   the title column keeps a readable width instead of being squeezed by the Stack columns */
#tasks-body td:nth-child(2), #tasks-body th:nth-child(2) { position: sticky; left: 0; z-index: 1; }
#tasks-body td:nth-child(4) { min-width: 16rem; }
/* ТЗ text: a long requirement scrolls inside its block next to a task; org tables of the ТЗ get cell borders */
.tz-req .tz-text { max-height: 32rem; overflow: auto; padding: 0 .75rem .25rem; }
.tz-text table { border-collapse: collapse; font-size: .875em; margin: .4rem 0; }
.tz-text td { border: 1px solid var(--bs-border-color); padding: .2rem .4rem; vertical-align: top; }
/* agent packets and long pre blocks keep their line breaks but never widen the page */
pre.wrap { white-space: pre-wrap; word-break: break-word; max-height: 28rem; }
/* <summary> styled as a Bootstrap button: hide the disclosure triangle */
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }

/* 4. Moving to the next task on «Валідація» is visible: the card slides (View Transitions API — Datastar patches with
   useViewTransition, the ‹ попередня / наступна › links navigate with a cross-document transition). Off for reduced motion. */
@view-transition { navigation: auto; }
.validate-card { view-transition-name: validate-card; }
::view-transition-old(validate-card) { animation: vt-out .22s ease-in both; }
::view-transition-new(validate-card) { animation: vt-in .28s ease-out both; }
@keyframes vt-out { to { opacity: 0; transform: translateX(-48px); } }
@keyframes vt-in { from { opacity: 0; transform: translateX(48px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-old(validate-card), ::view-transition-new(validate-card) { animation: none; }
}
