/* Pagini publice statice (/calculator-homa-ir, /analize-ficat): stilurile comune.
   Extrase din calculator-homa-ir/homa.css (TSK-166), fără schimbări de aspect.
   Fiecare pagină încarcă întâi acest fișier, apoi CSS-ul ei.
   Fără stiluri inline: CSP-ul de producție nu are 'unsafe-inline'. */

/* Tokeni: COPIE din frontend/src/styles/tokens.css (doar cei folosiți aici).
   Paginile nu trec prin bundle-ul Vite, deci nu pot importa fișierul.
   Se sincronizează manual când se schimbă tokens.css. */
:root {
  --bg-2: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --border: #e3e6eb;
  --border-strong: #80868f;
  --text: #111318;
  --text-2: #50565f;
  --text-3: #697080;
  --on-text: #ffffff;
  --accent: #0b57d0;
  --accent-wash: #eaf1fd;
  --optim: #1b7a47;
  --optim-wash: #e6f4ec;
  --alerta: #c0271d;
  --alerta-wash: #fce9e7;
  --focus-ring: var(--accent);
  --font-sans: "Geist", "Segoe UI", system-ui, sans-serif;
  --gm-radius-md: 12px;
  --gm-radius-lg: 16px;
  --gm-radius-xl: 20px;
  --gm-radius-pill: 999px;
  --shadow-float: 0 1px 2px rgba(17, 19, 24, 0.06), 0 12px 32px -14px rgba(17, 19, 24, 0.28);

  /* Doar pe paginile publice: textul secundar pe banda neagră (valoarea din mock-up). */
  --on-text-2: #c9cdd4;
}

/* ── Bază ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.pp-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pp-mob { display: none; }

.pp-icon {
  width: 16px; height: 16px; display: block; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.pp-icon--sm { width: 14px; height: 14px; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ── Pagina ── */
.pp-page {
  min-height: 100vh;
  padding: 20px 24px 48px;
  display: flex; flex-direction: column; align-items: center; gap: 48px;
}

/* ── Navbar ── */
.pp-navwrap { width: 100%; max-width: 1392px; }
.pp-nav {
  display: flex; align-items: center; gap: 24px;
  height: 60px; padding: 0 10px 0 20px;
  border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-float);
}
.pp-logo {
  display: flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--text); text-decoration: none;
  font-size: 16px; line-height: 20px; font-weight: 600; letter-spacing: -0.01em;
  border-radius: 6px;
}
.pp-logo svg { width: 20px; height: 20px; display: block; }
.pp-nav__end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pp-nav__login, .pp-nav__signup {
  position: relative;
  display: inline-flex; align-items: center; height: 40px;
  font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
/* Ținta de 44px fără să schimbe înălțimea vizuală de 40px din mock-up. */
.pp-nav__login::after, .pp-nav__signup::after { content: ""; position: absolute; inset: -2px 0; }
.pp-nav__login { padding: 0 14px; color: var(--text-2); border-radius: 10px; }
.pp-nav__login:hover { color: var(--text); }
.pp-nav__signup {
  padding: 0 16px; border-radius: 10px;
  background: var(--text); color: var(--on-text);
  transition: opacity 150ms ease-out;
}
.pp-nav__signup:hover { opacity: .86; }

/* ── Conținut ── */
.pp-main { width: 100%; max-width: 1040px; display: flex; flex-direction: column; gap: 20px; }

.pp-head { display: flex; flex-direction: column; gap: 10px; padding: 0 8px; }
.pp-head h1 { font-size: 44px; line-height: 48px; font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
.pp-head p { font-size: 17px; line-height: 26px; color: var(--text-2); max-width: 680px; }

.pp-sheet {
  background: var(--surface);
  border-radius: var(--gm-radius-xl);
  box-shadow: var(--shadow-float);
}
.pp-sheet h2 { font-size: 20px; line-height: 26px; font-weight: 500; letter-spacing: -0.02em; }
.pp-intro { display: flex; flex-direction: column; gap: 4px; }
.pp-intro p { font-size: 14px; line-height: 20px; color: var(--text-2); }

/* Control segmentat (unitate, sex) */
.pp-seg { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-2); flex-shrink: 0; }
.pp-seg button {
  position: relative;
  height: 38px; padding: 0 14px; border: 0; border-radius: 8px;
  font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; cursor: pointer;
  background: transparent; color: var(--text-2); box-shadow: none;
}
/* Ținta de 44px: butonul vizual are 38px, zona de apăsare acoperă și marginea grupului. */
.pp-seg button::after { content: ""; position: absolute; inset: -3px 0; }
.pp-seg button:hover { color: var(--text); }
.pp-seg button[aria-pressed="true"] {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 2px rgba(17, 19, 24, 0.12);
  cursor: default;
}

.pp-private { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; color: var(--text-2); }

/* Lanțul din graf */
.pp-chain { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pp-chain__node {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--gm-radius-pill); background: var(--surface-2); color: var(--text);
  font-size: 14px; line-height: 20px; font-weight: 500;
}
.pp-chain__dot { width: 6px; height: 6px; border-radius: var(--gm-radius-pill); background: var(--text-3); }
.pp-chain__node--path { background: var(--accent-wash); }
.pp-chain__node--path .pp-chain__dot { width: 8px; height: 8px; background: var(--accent); }
.pp-chain__arrow { color: var(--text-3); }

.pp-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--accent); text-decoration: none;
  border-radius: 4px;
}
.pp-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.pp-more {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 0 12px; border-top: 1px solid var(--border);
}
.pp-more p { flex-grow: 1; font-size: 14px; line-height: 21px; color: var(--text-2); }

/* ── Banda neagră ── */
.pp-band {
  border-radius: var(--gm-radius-xl); background: var(--text); color: var(--on-text);
  padding: 40px 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.pp-band__copy { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.pp-band h2 { font-size: 32px; line-height: 38px; font-weight: 500; letter-spacing: -0.03em; text-wrap: balance; }
.pp-band p { font-size: 15px; line-height: 23px; color: var(--on-text-2); }
.pp-band__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: var(--gm-radius-md);
  background: var(--surface); color: var(--text);
  font-size: 15px; line-height: 20px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: opacity 150ms ease-out;
}
.pp-band__cta:hover { opacity: .9; }
.pp-band__cta:focus-visible { outline-color: var(--on-text); }

/* ── Subsol ── */
.pp-footer { display: flex; flex-direction: column; gap: 12px; padding: 8px 8px 0; }
.pp-footer p { font-size: 13px; line-height: 19px; color: var(--text-2); max-width: 720px; }
.pp-footer__links { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.pp-footer__links a, .pp-footer__copy { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; line-height: 18px; }
.pp-footer__links a { color: var(--text-2); text-decoration: none; border-radius: 4px; }
.pp-footer__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pp-footer__copy { color: var(--text-3); }

/* ── Mobil (mock-up-urile la 390px) ── */
@media (max-width: 720px) {
  .pp-desk { display: none; }
  .pp-mob { display: inline; }

  .pp-page { padding: 12px 12px 40px; align-items: stretch; gap: 24px; }
  .pp-nav { height: 56px; gap: 8px; padding: 0 6px 0 14px; }
  .pp-nav__signup { display: none; }
  .pp-nav__login { height: 44px; padding: 0 12px; color: var(--text); }
  .pp-nav__login::after { content: none; }

  .pp-main { gap: 14px; }
  .pp-head { gap: 8px; }
  .pp-head h1 { font-size: 28px; line-height: 32px; letter-spacing: -0.03em; }
  .pp-head p { font-size: 15px; line-height: 22px; }

  .pp-seg button { padding: 0 10px; }

  .pp-band { padding: 28px 22px; }
  .pp-band h2 { font-size: 26px; line-height: 32px; }
  .pp-band__cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pp-nav__signup, .pp-band__cta { transition: none; }
}
