/* ============================================================ v2 · PLANSA
 *
 * Foaia componentelor. Tokenii stau in `tokens.css` si nu se scrie nicio
 * culoare literala aici -- daca o culoare are nevoie de o valoare care nu e
 * in tokeni, lipseste un token, nu o exceptie.
 *
 * REGULA CARE A COSTAT DE SASE ORI IN v1, si de-aia e prima:
 * cand un container poate sa contina alta componenta, se scrie COPIL DIRECT
 * (`>`), nu descendent. `nav .wrap` a prins si bara, si panoul din ea; apoi
 * `.menu-mobile a` a prins si butoanele; apoi `.menu-panel span` a stins
 * titlurile meniului. Aceeasi greseala, acelasi container care imbraca
 * altceva. Vezi NOTES.md, prima sectiune.
 *
 * A doua regula, ruda ei: o regula de asezare care cere `display` intra in
 * concurs cu regulile de vizibilitate. Daca vrei doar latime, cere latime.
 */

/* ------------------------------------------------------------ LITERA */

@font-face {
  font-family: 'Archivo';
  src: url('/static/v2/fonts/Archivo-var-latin.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  src: url('/static/v2/fonts/Archivo-var-latin-ext.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/static/v2/fonts/SourceSerif4-var-latin.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/static/v2/fonts/SourceSerif4-var-latin-ext.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/v2/fonts/PlexMono-400-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/v2/fonts/PlexMono-400-latin-ext.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/v2/fonts/PlexMono-500-latin.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/v2/fonts/PlexMono-500-latin-ext.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/v2/fonts/PlexMono-600-latin.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/v2/fonts/PlexMono-600-latin-ext.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------ TEMELIE */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--track-tight);
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: var(--text-display); font-weight: 700; letter-spacing: var(--track-display); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-base); }

p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.15em; }
li::marker { color: var(--ink-3); }

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--signal); }

strong, b { font-weight: 600; color: var(--ink); }

img, svg, canvas { max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--signal-wash); color: var(--ink); }

/* ------------------------------------------------------------ UTILITARE */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: var(--measure); }

/* Monospatiat = citat dintr-un registru. Vezi regula din tokens.css. */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'ss01';
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-3);
}

.lede {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink-2);
}

.stack   { display: flex; flex-direction: column; gap: var(--space-sm); }
.stack-2 { display: flex; flex-direction: column; gap: var(--space-md); }
.stack-3 { display: flex; flex-direction: column; gap: var(--space-lg); }
.row     { display: flex; align-items: center; gap: var(--space-2xs); flex-wrap: wrap; }

.hr { height: 1px; background: var(--line-strong); border: 0; }

.scroll-x { overflow-x: auto; overscroll-behavior-x: contain; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ============================================================ CARCASA SITE
 *
 * Bara aliniata la margine: marca hard-stanga, destinatiile langa ea,
 * actiunile hard-dreapta. Fara pastila plutitoare -- pastila adauga o a doua
 * forma peste continut si fura din linistea primului ecran.
 */

.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
/* Firul apare abia cand continutul trece pe sub, ca sa se vada ca e ceva
 * dedesubt. Pana atunci bara e o continuare a hartiei. */
.bar[data-scrolled="1"] {
  border-bottom-color: var(--line);
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}

.bar > .bar-in {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  height: 60px;
}

.bar-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: var(--track-tight);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.bar-mark:hover { color: var(--ink); }
.bar-mark > svg { display: block; color: var(--signal); }

/* Destinatiile. `> a` si `> button`, nu descendent: panoul mare atarna in
 * acelasi container si are propriile legaturi. */
.bar-nav { display: flex; align-items: center; gap: var(--space-xs); }
.bar-nav > a,
.bar-nav > button {
  appearance: none;
  background: none;
  border: 0;
  padding: var(--space-2xs) var(--space-xs);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: -0.006em;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.bar-nav > a:hover,
.bar-nav > button:hover { color: var(--ink); background: var(--paper-sunken); }
.bar-nav > a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); }
.bar-nav > button[aria-expanded="true"] { color: var(--ink); background: var(--paper-sunken); }

.bar-gap { flex: 1; }

.bar-acts { display: flex; align-items: center; gap: var(--space-2xs); }

.bar-mega {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--paper-raised);
  border-block: 1px solid var(--line);
  box-shadow: var(--lift);
}
.bar-mega[hidden] { display: none; }
.bar-mega > .shell {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-lg);
  padding-block: var(--space-lg);
}
.mega-col { display: flex; flex-direction: column; gap: var(--space-2xs); }
.mega-col > .eyebrow { margin-bottom: var(--space-3xs); }
.mega-col > a {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: var(--space-2xs);
  margin-inline: calc(var(--space-2xs) * -1);
  border-radius: var(--radius);
  text-decoration: none;
}
.mega-col > a:hover { background: var(--paper-sunken); }
.mega-col > a > b {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink);
}
.mega-col > a > span {
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--ink-3);
}

.burger {
  display: none;
  appearance: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2xs);
  color: var(--ink);
  cursor: pointer;
}

/* Sertarul. Bara nu incape pe 375px cu patru destinatii si doua actiuni, si
 * nu se comprima -- se muta intr-un panou. */
.drawer {
  position: fixed;
  inset: 60px 0 0;
  z-index: 39;
  background: var(--paper);
  overflow-y: auto;
  padding: var(--space-md) 0 var(--space-2xl);
}
.drawer[hidden] { display: none; }
.drawer > .shell { display: flex; flex-direction: column; gap: var(--space-md); }

.drawer-group { display: flex; flex-direction: column; gap: var(--space-3xs); }
.drawer-group > .eyebrow { padding-bottom: var(--space-2xs); }
.drawer-group > a {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--line-faint);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
/* Actiunile din sertar sunt butoane, nu legaturi de meniu: cer latime, nu
 * `display`. Vezi a doua regula din capul fisierului. */
.drawer-acts { display: flex; flex-direction: column; gap: var(--space-2xs); }
.drawer-acts > .btn { width: 100%; }

body.drawer-open { overflow: hidden; }

@media (max-width: 900px) {
  .bar-nav, .bar-acts { display: none; }
  .burger { display: inline-flex; }
  .bar > .bar-in > .bar-gap { flex: 1; }
}
@media (min-width: 901px) {
  .drawer { display: none; }
}

/* ------------------------------------------------------------ SUBSOLUL
 *
 * Patru coloane si o banda. Regula, si nu se negociaza: subsolul arata numai
 * usile care se DESCHID. O intrare catre o pagina care spune „urmeaza" e mai
 * rea decat absenta ei.
 */

.foot {
  margin-top: var(--space-section);
  background: var(--paper-slab);
  border-top: 1px solid var(--line);
}
.foot > .shell { padding-block: var(--space-xl) var(--space-lg); }

.foot-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--line);
}
.foot-col { display: flex; flex-direction: column; gap: var(--space-2xs); }
.foot-col > .eyebrow { margin-bottom: var(--space-3xs); }
/* Pe slab scriu doar `--ink` si `--ink-2`. Vezi regula 2 din tokens.css. */
.foot-col > a {
  font-size: var(--text-base);
  color: var(--ink-2);
  text-decoration: none;
}
.foot-col > a:hover { color: var(--ink); text-decoration: underline; }

.foot-band {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-md);
  padding-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  line-height: 1.6;
  color: var(--ink-2);
}

/* ============================================================ CARCASA PANOU
 *
 * Alt produs, aceeasi paleta. Bara laterala, fara subsol de marketing,
 * densitate de aplicatie. Omul de aici lucreaza, nu se lasa convins.
 */

.app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
@media (max-width: 900px) { .app { grid-template-columns: 1fr; } }

.app-side {
  background: var(--paper-sunken);
  border-right: 1px solid var(--line);
  padding: var(--space-md) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
@media (max-width: 900px) {
  .app-side { border-right: 0; border-bottom: 1px solid var(--line); }
}

.app-side > .bar-mark { padding-inline: var(--space-2xs); }

.side-group { display: flex; flex-direction: column; gap: 1px; }
.side-group > .eyebrow { padding: 0 var(--space-2xs) var(--space-2xs); }
.side-group > a {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}
.side-group > a:hover { background: var(--paper); color: var(--ink); }
.side-group > a[aria-current="page"] {
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--signal);
}
.side-group > a > .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--ink-3);
}

.app-main { padding: var(--space-md) var(--gutter) var(--space-2xl); min-width: 0; }

.app-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--line-strong);
}

/* ============================================================ BUTOANE */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.55em 1em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 140ms var(--ease), color 140ms var(--ease),
              border-color 140ms var(--ease);
}

/* Unul singur per ecran. Amprenta accentului depinde de disciplina asta. */
.btn-signal { background: var(--signal); color: var(--signal-ink); }
.btn-signal:hover { background: var(--signal-hover); color: var(--signal-ink); }

.btn-solid { background: var(--ink); color: var(--paper-raised); }
.btn-solid:hover { background: var(--blue); color: var(--blue-ink); }

.btn-line { border-color: var(--line-strong); color: var(--ink); background: none; }
.btn-line:hover { border-color: var(--ink); background: var(--paper-sunken); color: var(--ink); }

.btn-quiet { color: var(--ink-2); background: none; }
.btn-quiet:hover { color: var(--ink); background: var(--paper-sunken); }

.btn-sm { padding: 0.4em 0.7em; font-size: var(--text-sm); }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: none;
  color: var(--ink-2);
  cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* ============================================================ STARE
 *
 * Trei stari de proiect, si se citesc de la trei metri: nerevendicat (fir
 * stins), revendicat (albastru de structura), listat (semnal). Bara e forma;
 * chip-ul e cuvantul. Amandoua, niciodata doar culoarea.
 */

.state-bar { height: 3px; background: var(--state-idle); }
.state-bar[data-state="revendicat"] { background: var(--blue); }
.state-bar[data-state="listat"]     { background: var(--signal); }
.state-bar[data-state="cerere"]     { background: var(--blue); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.22em 0.55em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: var(--radius-pill);
  background: currentColor;
}
.chip-plain::before { display: none; }

.chip-live { color: var(--state-live); border-color: var(--state-live); background: var(--live-wash); }
.chip-warn { color: var(--state-warn); border-color: var(--state-warn); background: var(--warn-wash); }
.chip-dead { color: var(--state-dead); border-color: var(--state-dead); background: var(--dead-wash); }
.chip-idle { color: var(--ink-3); border-color: var(--line-strong); }
.chip-blue { color: var(--blue); border-color: var(--blue-line); background: var(--blue-wash); }
.chip-signal { color: var(--signal); border-color: var(--signal-line); background: var(--signal-wash); }

/* ============================================================ CIFRA-EROU
 *
 * O singura data per ecran. Calificativul sta DEDESUBT, nu langa: langa, ochiul
 * il citeste ca parte din numar si cifra isi pierde marimea.
 */

.figure { display: flex; flex-direction: column; gap: var(--space-2xs); }
.figure > .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-figure);
  line-height: 0.92;
  letter-spacing: var(--track-figure);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.figure > .q {
  font-size: var(--text-base);
  color: var(--ink-2);
  max-width: 34ch;
}

/* Banda de patru. Cifre mari, dar nu erou: astea se compara intre ele. */
/* Banda nu se INFASOARA niciodata, si de-aia n-are nevoie de trucuri.
 *
 * Prima varianta era o grila `auto-fit` cu chenar in dreapta pe fiecare
 * celula. Peste 900px incap toate pe un rand si arata bine; sub, grila se
 * rupea in doua coloane, iar cu un numar impar de cifre ultimul rand ramanea
 * cu o celula goala si cu un chenar atarnat langa ea -- o linie catre nimic.
 *
 * Solutia nu e sa desenam despartitorul altfel, ci sa nu lasam infasurarea sa
 * se intample: pe latimi mari e un rand, pe latimi mici e o lista cu fire
 * orizontale. A doua forma e si mai lizibila pe telefon decat doua coloane
 * inghesuite. */
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.figures > .cell {
  padding: var(--space-sm) var(--space-sm) var(--space-sm) 0;
  border-right: 1px solid var(--line-faint);
}
.figures > .cell:last-child { border-right: 0; }

@media (max-width: 900px) {
  .figures { grid-template-columns: 1fr; }
  .figures > .cell {
    border-right: 0;
    border-top: 1px solid var(--line-faint);
    padding: var(--space-xs) 0;
  }
  .figures > .cell:first-child { border-top: 0; }
}
.figures > .cell > .n {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-2xl);
  line-height: 1;
  letter-spacing: var(--track-tight);
  font-variant-numeric: tabular-nums;
}
.figures > .cell > .n > small {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-3);
}
.figures > .cell > .l {
  display: block;
  margin-top: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.4;
}

/* ============================================================ SURSA
 *
 * „De unde stim asta." Se pune sub orice fapt citat dintr-un registru, si e
 * cel mai ieftin lucru care ne desparte de un anunt pe OLX. Albastru de
 * structura, monospatiat, mic.
 */

.src {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  line-height: 1.5;
  color: var(--blue);
}
.src::before {
  content: "";
  align-self: center;
  width: 10px;
  height: 1px;
  background: var(--blue-line);
}
.src > time { color: var(--ink-3); }

/* Banda de prospetime: cate o sursa pe rand, cu data editiei. */
.fresh {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.fresh > .cell {
  box-shadow: inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line);
  padding: var(--space-xs) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fresh > .cell > .who {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
}
.fresh > .cell > .when {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--ink-2);
}

/* ============================================================ CARD DE LISTARE
 *
 * Obiectul cel mai des vazut din tot site-ul. Aceeasi forma pentru un proiect
 * listat si pentru unul din pipeline -- difera doar actiunea. Asta e mecanismul
 * care umple piata, si de-aia e o singura componenta, nu doua.
 */

.deal {
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.deal:hover { border-color: var(--line-strong); box-shadow: var(--lift); }

.deal > .state-bar { border-radius: var(--radius) var(--radius) 0 0; }

.deal-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-xs) var(--space-sm);
}
.deal-top > .row { gap: var(--space-3xs); }

.deal-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--track-tight);
  line-height: 1.2;
}
.deal-title > a { color: var(--ink); text-decoration: none; }
.deal-title > a:hover { color: var(--blue); }

.deal-sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-3);
}

.deal-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-faint);
  border-block: 1px solid var(--line-faint);
}
.deal-specs > .cell { background: var(--paper-raised); padding: var(--space-2xs) var(--space-sm); }
.deal-specs > .cell > .k {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.deal-specs > .cell > .v {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.deal-specs > .cell > .v > small { font-weight: 400; font-size: var(--text-xs); color: var(--ink-3); }

.deal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  margin-top: auto;
}
.deal-price { display: flex; flex-direction: column; gap: 1px; }
.deal-price > .p {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: var(--track-tight);
  font-variant-numeric: tabular-nums;
}
.deal-price > .p[data-ask="1"] { font-weight: 500; font-size: var(--text-base); color: var(--ink-3); }
.deal-price > .pm { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-3); }

.deals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-sm);
}

/* ============================================================ TABEL DENS
 *
 * Treizeci de randuri pe ecran, nu patru. Pe telefon deruleaza pe orizontala
 * in containerul lui -- NU se strange in cartonase: un tabel strans in
 * cartonase nu mai e tabel, si comparatia pe coloana era tot rostul lui.
 */

.tbl-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.tbl { width: 100%; min-width: 720px; border-collapse: collapse; }

.tbl thead th.num { text-align: right; }
.tbl thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper-raised);
  text-align: left;
  padding: var(--space-2xs) var(--space-xs);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.tbl tbody td {
  padding: var(--space-2xs) var(--space-xs);
  border-bottom: 1px solid var(--line-faint);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--ink-2);
  white-space: nowrap;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--paper-sunken); }
.tbl tbody td.name { color: var(--ink); font-weight: 500; }
.tbl tbody td.num { font-variant-numeric: tabular-nums; text-align: right; }
.tbl tbody td.code { font-family: var(--font-mono); font-size: var(--text-xs); }
.tbl tbody td.clip { max-width: 26ch; overflow: hidden; text-overflow: ellipsis; }
.tbl tbody td > a { color: var(--ink); text-decoration: none; }
.tbl tbody td > a:hover { color: var(--blue); text-decoration: underline; }

/* ============================================================ FILTRE
 *
 * Bara persistenta. Fiecare filtru sta in adresa, deci o cautare se poate da
 * mai departe si se poate salva ca alerta cu un buton.
 */

.filters {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter { display: flex; flex-direction: column; gap: var(--space-3xs); }
.filter > label {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.filter > select,
.filter > input {
  padding: 0.45em 0.6em;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--ink);
}
.filter > input::placeholder { color: var(--ink-faint); }

.filter-count {
  padding-top: var(--space-2xs);
  border-top: 1px solid var(--line-faint);
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.filter-count > b { font-variant-numeric: tabular-nums; }

/* ============================================================ STARE GOALA
 *
 * Nu scrie „0 rezultate". Zero rezultate e adevarul si nu e de niciun folos.
 * Propune ce se potriveste din pipeline si da butonul de urmarire -- exact
 * miscarea care transforma o cautare esuata in semnal de cerere.
 */

.empty {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-lg);
  background: var(--paper-sunken);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty > h3 { font-size: var(--text-xl); }
.empty > p { color: var(--ink-2); max-width: 52ch; }

/* ============================================================ INSTRUMENT
 *
 * Panoul intunecat incastrat. Suprafata lui e rescrisa in `tokens.css`; aici
 * ramane doar forma. Rama subtire, ca sa se citeasca drept OBIECT asezat in
 * pagina si nu drept gaura in ea.
 */

.instrument {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.instrument > .instrument-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid var(--line);
}
.instrument > .instrument-body { padding: var(--space-sm); }
.instrument-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink);
}

/* ============================================================ CRONOLOGIE
 *
 * ATR emis -> CR -> PIF, cu expirarile marcate. Firul e albastru de structura,
 * punctul de acum e semnal. O linie verticala, nu o banda orizontala: pe
 * telefon banda orizontala se strange si datele se suprapun.
 */

.timeline { display: flex; flex-direction: column; }
.timeline > .ev {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0 var(--space-xs);
  padding-bottom: var(--space-sm);
}
.timeline > .ev:last-child { padding-bottom: 0; }
.timeline > .ev > .dot {
  position: relative;
  display: flex;
  justify-content: center;
}
.timeline > .ev > .dot::before {
  content: "";
  margin-top: 0.42em;
  width: 7px; height: 7px;
  border-radius: var(--radius-pill);
  background: var(--paper-raised);
  border: 1.5px solid var(--blue-line);
  z-index: 1;
}
.timeline > .ev > .dot::after {
  content: "";
  position: absolute;
  top: 1.1em; bottom: calc(var(--space-sm) * -1);
  width: 1px;
  background: var(--blue-line);
}
.timeline > .ev:last-child > .dot::after { display: none; }
.timeline > .ev[data-now="1"] > .dot::before { background: var(--signal); border-color: var(--signal); }
.timeline > .ev[data-tone="dead"] > .dot::before { border-color: var(--state-dead); }
.timeline > .ev > .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.timeline > .ev > .txt > .what {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
}
.timeline > .ev > .txt > .when {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-3);
}

/* ============================================================ DEZVALUIRE
 *
 * Cele trei trepte, ca tabel. Anonimatul nu e o caseta bifata la listare, e un
 * model care traverseaza tot produsul -- si se arata pe fata, ca sa stie si
 * vanzatorul, si cumparatorul ce se vede si cand.
 */

.tiers td.y { color: var(--state-live); font-family: var(--font-mono); font-size: var(--text-xs); }
.tiers td.h { color: var(--state-warn); font-family: var(--font-mono); font-size: var(--text-xs); }
.tiers td.n { color: var(--ink-3); font-family: var(--font-mono); font-size: var(--text-xs); }
.tiers tbody td { white-space: normal; }

/* ============================================================ CERERE
 *
 * Formularul structurat. Filtrul de seriozitate sta aici: cine sunt, buget,
 * orizont, finantare. Text liber cat mai putin -- text liber inseamna
 * „raspunde-mi si mie" si costa vanzatorului o zi.
 */

.form { display: flex; flex-direction: column; gap: var(--space-sm); }
.field { display: flex; flex-direction: column; gap: var(--space-3xs); }
.field > label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
}
.field > .hint { font-size: var(--text-sm); color: var(--ink-3); }
.field > input,
.field > select,
.field > textarea {
  padding: 0.55em 0.7em;
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--ink);
}
.field > textarea { min-height: 5.5em; resize: vertical; font-family: var(--font-body); }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
@media (max-width: 560px) { .field-2 { grid-template-columns: 1fr; } }

.note {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-xs) var(--space-sm);
  border-left: 3px solid var(--ink-3);
  background: var(--paper-sunken);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--text-base);
  color: var(--ink-2);
}
.note-good { border-left-color: var(--state-live); background: var(--live-wash); }
.note-warn { border-left-color: var(--state-warn); background: var(--warn-wash); }
.note-bad  { border-left-color: var(--state-dead); background: var(--dead-wash); }
.note-key  { border-left-color: var(--signal);     background: var(--signal-wash); }
.note > b { font-family: var(--font-display); }

/* ============================================================ DEALROOM */

.deal-rows { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); }
.deal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--paper-raised);
}
.deal-row > .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.deal-row > .who > .top { display: flex; align-items: center; gap: var(--space-2xs); flex-wrap: wrap; }
.deal-row > .who > .top > b { font-family: var(--font-display); font-size: var(--text-base); font-weight: 600; }
.deal-row > .who > .sub { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-3); }

/* Treptele tranzactiei, ca sir de puncte. Cea atinsa e plina. */
.stages { display: flex; align-items: center; gap: var(--space-3xs); }
.stages > .st {
  width: 22px; height: 3px;
  background: var(--line-strong);
  border-radius: var(--radius-pill);
}
.stages > .st[data-on="1"] { background: var(--blue); }
.stages > .st[data-on="now"] { background: var(--signal); }

/* ============================================================ SECTIUNI */

.section { padding-top: var(--space-section); }
.section-s { padding-top: var(--space-section-s); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding-bottom: var(--space-2xs);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--ink);
}
.section-head > .eyebrow { color: var(--signal); }
.section-head > .gap { flex: 1; }

/* ============================================================ FISA
 *
 * Capul paginii de proiect. Un lucru per ecran, si acel lucru e proiectul --
 * deci titlul are voie sa fie mare, iar tot restul asteapta sub el.
 */

.hero { display: flex; flex-direction: column; gap: var(--space-xs); }
.hero > h1 { font-size: var(--text-3xl); }
.hero > .hero-sub {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-2);
}
/* Proza din capul paginii. Latime de citit, nu de ecran: o propozitie intinsa
 * pe 1.240px se pierde la capat de rand. */
.hero > .hero-lede {
  max-width: var(--measure);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--ink-2);
}
.hero > .hero-acts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin-top: var(--space-2xs);
}

/* ------------------------------------------------------------ FAPTE */

.facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.facts > .fact {
  box-shadow: inset -1px 0 0 var(--line-faint),
              inset 0 -1px 0 var(--line-faint);
  padding: var(--space-xs) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.facts > .fact > dt {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.facts > .fact > dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.facts > .fact > dd > .fact-v { display: block; }
.facts > .fact > dd small { font-weight: 400; font-size: var(--text-xs); color: var(--ink-3); }
.fact-src { font-weight: 400; }

/* ------------------------------------------------------------ BARA IMPARTITA */

.split { display: flex; flex-direction: column; gap: var(--space-2xs); }
.split-bar {
  display: flex;
  height: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--paper-sunken);
}
.split-bar > .seg { display: block; height: 100%; }
/* Treptele merg de la „ocupat" la „doar o intentie". Nu sunt culori de stare
 * -- e aceeasi structura in patru intensitati, ca sa se citeasca drept scara,
 * nu drept bine/rau. */
.seg--1 { background: var(--blue); }
.seg--2 { background: color-mix(in oklab, var(--blue) 72%, var(--paper)); }
.seg--3 { background: color-mix(in oklab, var(--blue) 45%, var(--paper)); }
.seg--4 { background: color-mix(in oklab, var(--blue) 22%, var(--paper)); }
.seg--free { background: var(--state-live); }

.split-keys { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); }
.seg-key {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--ink-2);
}
.seg-key > i {
  width: 9px; height: 9px;
  border-radius: var(--radius-sm);
  flex: none;
}
.seg-key > b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ ASEZAREA FISEI */

.sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-lg);
  align-items: start;
}
@media (max-width: 940px) { .sheet { grid-template-columns: 1fr; } }
.sheet > .rail { display: flex; flex-direction: column; gap: var(--space-md); }
@media (min-width: 941px) { .sheet > .rail { position: sticky; top: 76px; } }
