/* pensie.bgn.ro — Edge-33 (bej + pink, Inter + Fraunces, dot-grid) */

:root {
  --c-pink: #EE4379;
  --c-pink-deep: #C9255B;
  --c-pink-tint: #FDE7F0;
  --c-white: #FFFFFF;
  --c-bej-0: #FBFAF7;
  --c-bej-1: #EFEBE4;
  --c-dark: #110D10;
  --c-ink: #110D10;
  --c-fog: #7A7570;
  --c-mist: #ABA59E;
  --c-rule-card: rgba(17, 13, 16, 0.12);
  --c-rule-soft: rgba(17, 13, 16, 0.06);
  --c-success: #1F7A4D;
  --c-success-bg: #ECF7F1;
  --c-error: #B91C1C;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 9999px;
  --sh-sm: 0 1px 3px rgba(17,13,16,0.06), 0 1px 2px rgba(17,13,16,0.04);
  --sh-pink: 0 6px 16px rgba(238,67,121,0.30);
  --grid-color: rgba(17, 13, 16, 0.15);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--c-bej-0);
  color: var(--c-ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, var(--grid-color) 1px, transparent 1.5px);
  background-size: 32px 32px;
}
body > * { position: relative; z-index: 1; }
em { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 500; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; font-size: inherit; }
.mono { font-family: 'DM Mono', ui-monospace, monospace; }

/* ─── Header ─── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--c-bej-0);
  border-bottom: 1px solid var(--c-rule-soft);
  padding: 12px clamp(16px, 5vw, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 13px; letter-spacing: 0.08em; text-decoration: none;
  white-space: nowrap;
}
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-pink); flex: none; }
.site-nav { display: flex; gap: 8px; }
.site-nav a {
  text-decoration: none;
  font-size: 14px; font-weight: 600;
  padding: 8px 16px; border-radius: var(--r-pill);
  border: 1px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover { border-color: var(--c-rule-card); }
.site-nav a.on { background: var(--c-dark); color: #fff; }

/* ─── Layout ─── */
.page {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(32px, 6vh, 64px) clamp(16px, 5vw, 40px) 40px;
  display: flex; flex-direction: column; gap: 28px;
  flex: 1;
}
.page.wide { max-width: 1020px; }

.t-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--c-fog);
}
.t-eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--c-pink); flex: none; }
.t-display {
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.03em;
  text-wrap: balance;
}
.t-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800; line-height: 1.12; letter-spacing: -0.025em;
  text-wrap: balance;
}
.t-lead { font-size: clamp(16px, 1.6vw, 20px); max-width: 58ch; text-wrap: pretty; }
.t-meta { font-size: 14px; color: var(--c-fog); }
.t-hint { font-size: 13px; color: var(--c-mist); }
.muted { color: var(--c-fog); }
.strike { text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: var(--c-pink); }

.punch {
  font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 500;
  font-size: clamp(22px, 2.8vw, 34px); line-height: 1.25;
  max-width: 34ch; text-wrap: balance;
}

.lesson {
  background: var(--c-bej-1);
  border-radius: var(--r-md);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.lesson .label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--c-fog);
}
.lesson p { font-size: 16px; font-weight: 500; text-wrap: pretty; }

/* ─── Butoane ─── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--c-pink); color: #fff;
  border: none; border-radius: var(--r-pill);
  font-size: 16px; font-weight: 600;
  padding: 14px 28px;
  box-shadow: var(--sh-pink);
  text-decoration: none;
  width: fit-content;
  transition: background .15s ease;
}
.btn-primary:hover { background: var(--c-pink-deep); }
.btn-primary svg { width: 18px; height: 18px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--c-rule-card); border-radius: var(--r-pill);
  color: var(--c-ink); font-size: 15px; font-weight: 600;
  padding: 12px 24px; text-decoration: none; width: fit-content;
}
.btn-ghost:hover { border-color: var(--c-ink); }
.btn-ghost svg { width: 16px; height: 16px; }

/* ─── Cards & KPI ─── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.card {
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.card.tonal { background: var(--c-bej-1); border: none; box-shadow: none; }
.card.span { grid-column: 1 / -1; }
.card .label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--c-fog);
}
.card .num {
  font-size: clamp(24px, 3vw, 38px); font-weight: 800;
  letter-spacing: -0.025em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.card .sub { font-size: 14px; color: var(--c-fog); text-wrap: pretty; }
.card .sub strong { color: var(--c-ink); }

/* ─── Tabele ─── */
.tbl-wrap {
  border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--c-rule-card); box-shadow: var(--sh-sm);
  overflow-x: auto; background: var(--c-white);
}
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 12px 16px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th {
  background: var(--c-bej-1);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--c-fog);
}
tbody tr + tr td { border-top: 1px solid var(--c-rule-soft); }
tr.hl td { background: var(--c-pink-tint); font-weight: 700; }
td.pos { color: var(--c-success); font-weight: 600; }
td.neg { color: var(--c-error); font-weight: 600; }

/* ─── Bars ─── */
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 9em) 1fr; gap: 12px; align-items: center; }
.bar-name { font-size: 15px; font-weight: 600; text-align: right; line-height: 1.3; }
.bar-name .who { display: block; font-size: 12px; font-weight: 500; color: var(--c-fog); }
.bar-track { position: relative; height: 36px; }
.bar-fill {
  position: absolute; inset: 0 auto 0 0;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 10px;
  color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px;
  min-width: 3.4em;
}
.bar-fill.ink { background: var(--c-dark); }
.bar-fill.fog { background: var(--c-fog); }

/* ─── Chestionar vertical ─── */
.q-block {
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  scroll-margin-top: 90px;
}
.q-block.missing { border-color: var(--c-error); }
.q-block .q-no {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-fog);
}
.q-block h3 { font-size: 17px; font-weight: 700; line-height: 1.35; }
.q-block .hint { font-size: 13px; color: var(--c-fog); margin-top: -8px; }
.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left;
  background: var(--c-bej-0);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 15px; font-weight: 500; color: var(--c-ink);
  transition: border-color .12s ease, background .12s ease;
}
.opt:hover { border-color: var(--c-ink); }
.opt.selected { border-color: var(--c-pink); background: var(--c-pink-tint); }
.opt .tick { width: 18px; height: 18px; flex: none; color: var(--c-pink); opacity: 0; }
.opt.selected .tick { opacity: 1; }
.field-row { display: flex; gap: 10px; }
.field { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-fog);
}
.field select {
  appearance: none; -webkit-appearance: none;
  width: 100%;
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-sm);
  padding: 11px 12px;
  font-family: inherit; font-size: 16px; color: var(--c-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A7570' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.field select:focus, input[type="range"]:focus-visible { outline: 2px solid var(--c-pink); outline-offset: 1px; }

/* ─── Rezultat / dark card ─── */
.card-dark {
  background: var(--c-dark); color: #fff;
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
  display: flex; flex-direction: column; gap: 8px;
  scroll-margin-top: 90px;
}
.card-dark .t-eyebrow { color: rgba(255,255,255,0.55); }
.res-age { font-size: clamp(56px, 9vw, 92px); font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin-top: 8px; }
.res-age .suffix { font-size: 0.3em; font-weight: 500; letter-spacing: 0; color: rgba(255,255,255,0.6); margin-left: 8px; }
.res-centenar { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: clamp(26px, 4vw, 36px); line-height: 1.2; margin-top: 8px; }
.res-date { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: clamp(20px, 3vw, 27px); line-height: 1.3; margin-top: 8px; }
.res-countdown { font-size: 15px; color: rgba(255,255,255,0.7); font-variant-numeric: tabular-nums; }
.res-divider { border: none; border-top: 1px solid rgba(255,255,255,0.14); margin: 18px 0 12px; }
.alt-label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.alt-change { font-size: 15px; color: rgba(255,255,255,0.85); margin-top: 6px; text-wrap: pretty; }
.alt-date { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 20px; margin-top: 6px; }
.alt-gain {
  display: inline-flex; align-items: center;
  margin-top: 10px; padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--c-success-bg); color: var(--c-success);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.pen-num { font-size: clamp(40px, 7vw, 60px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 10px; }
.pen-num .suffix { font-size: 0.32em; font-weight: 500; color: rgba(255,255,255,0.6); }
.pen-row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.85); }
.pen-row:first-of-type { border-top: none; }
.pen-row .v { font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ─── Controale calculator ─── */
.panel { background: var(--c-bej-1); border-radius: var(--r-md); padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.ctl-group { display: flex; flex-direction: column; gap: 8px; }
.ctl-label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-fog);
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.ctl-value { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 700; color: var(--c-ink); letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; text-align: right; }
input[type="range"] { width: 100%; accent-color: var(--c-pink); height: 28px; }
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-opt {
  border: 1px solid var(--c-rule-card); background: var(--c-white);
  border-radius: var(--r-pill); padding: 8px 16px;
  font-size: 14px; font-weight: 600; color: var(--c-ink);
  font-variant-numeric: tabular-nums;
}
.pill-opt:hover { border-color: var(--c-ink); }
.pill-opt.on { background: var(--c-dark); color: #fff; border-color: var(--c-dark); }

/* ─── Liste ─── */
.honest { display: flex; flex-direction: column; gap: 14px; font-size: 16px; }
.honest li { list-style: none; padding-left: 24px; position: relative; text-wrap: pretty; }
.honest li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; border-radius: 50%; background: var(--c-pink); }
.qa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.qa-grid .q { font-weight: 700; font-size: 15px; }
.qa-grid .a { font-size: 14px; color: var(--c-fog); text-wrap: pretty; }

/* ─── Traseu (index) ─── */
.steps-list { display: flex; flex-direction: column; gap: 8px; }
.steps-list a {
  display: flex; align-items: center; gap: 14px;
  background: var(--c-white);
  border: 1px solid var(--c-rule-card);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  padding: 14px 18px;
  text-decoration: none; font-weight: 600; font-size: 15px;
  transition: border-color .12s ease;
}
.steps-list a:hover { border-color: var(--c-ink); }
.steps-list .no {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px; color: var(--c-fog);
  width: 3.4em; flex: none; white-space: nowrap;
}
.steps-list .what { font-size: 13px; font-weight: 400; color: var(--c-fog); margin-left: auto; text-align: right; }

/* ─── Chart ─── */
.chart-wrap { position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-tip {
  position: absolute; pointer-events: none; display: none;
  background: var(--c-dark); color: #fff;
  border-radius: var(--r-sm);
  padding: 8px 12px; font-size: 13px; line-height: 1.5;
  white-space: nowrap; z-index: 5;
  font-variant-numeric: tabular-nums;
  transform: translate(-50%, calc(-100% - 14px));
}
.chart-tip .r { display: flex; justify-content: space-between; gap: 16px; }
.chart-tip .r .k { color: rgba(255,255,255,0.65); }

/* ─── Stepper ─── */
.stepper {
  border-top: 1px solid var(--c-rule-soft);
  margin-top: auto;
  padding: 20px clamp(16px, 5vw, 40px) 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1020px; width: 100%; margin-left: auto; margin-right: auto;
}
.stepper .mid { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.stepper .mid .txt { font-family: 'DM Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-mist); }
.stepper .track { width: min(220px, 40vw); height: 4px; border-radius: var(--r-pill); background: var(--c-bej-1); overflow: hidden; }
.stepper .fill { height: 100%; background: var(--c-pink); border-radius: var(--r-pill); }
.stepper a { text-decoration: none; }

.site-foot {
  padding: 16px clamp(16px, 5vw, 40px) 32px;
  font-size: 12px; color: var(--c-mist); text-align: center; text-wrap: pretty;
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .site-header { padding: 10px 14px; }
  .brand { font-size: 12px; letter-spacing: 0.04em; }
  .site-nav { gap: 4px; }
  .site-nav a { padding: 7px 11px; font-size: 13px; }
  .site-nav a.home { display: none; }

  .page { gap: 22px; padding-top: 28px; }
  .steps-list .what { display: none; }
  .steps-list a { padding: 12px 14px; }
  .steps-list .no { width: 2.9em; }

  th, td { padding: 10px 12px; font-size: 13px; }

  .bar-row { grid-template-columns: 1fr; gap: 4px; }
  .bar-name { text-align: left; }
  .bar-name .who { display: inline; margin-left: 6px; }
  .bar-track { height: 32px; }

  .stepper { flex-wrap: wrap; gap: 10px; padding-bottom: 20px; }
  .stepper .mid { order: -1; width: 100%; }
  .stepper .track { width: 100%; }
  .stepper > a { flex: 1; justify-content: center; padding: 12px 14px; font-size: 14px; }

  .pen-row { flex-wrap: wrap; row-gap: 2px; }
  .pen-row .v { white-space: normal; text-align: right; margin-left: auto; }

  .panel { padding: 16px; }
  .card { padding: 16px; }
  .card-dark { padding: 22px 18px; }
  .qa-grid { grid-template-columns: 1fr; }
  .q-block { padding: 16px; }
  .field-row { flex-wrap: wrap; }
  .field { min-width: 90px; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  .lesson { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
