/* ============ Landing + brama PIN + tryb pomiaru wyjściowego ============ */

.brand {
  text-decoration: none;
  color: inherit;
}

/* ---------- tryb pomiaru wyjściowego ---------- */
body.is-single [data-quality-section],
body.is-single [data-trend-card] {
  display: none;
}
body.is-single [data-charts-grid] {
  grid-template-columns: minmax(0, 1fr);
}
body.is-single [data-charts-grid] .chartbox {
  height: 300px;
}

/* ---------- brama PIN ---------- */
body.is-locked {
  overflow: hidden;
}
body.is-locked > .topbar,
body.is-locked > main,
body.is-locked > .sr-only {
  visibility: hidden;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 50% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
    var(--bg);
}
.gate__card {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.6);
}
.gate__mark {
  width: 34px;
  height: 34px;
  color: var(--primary);
}
.gate__card h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.15;
  margin: 0;
}
.gate__lead {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.gate__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.gate__field span,
.access__form label span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.gate__field input,
.access__form input {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gate__field input {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 1.2rem;
}
.gate__field input:focus,
.access__form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}
.gate__msg,
.access__msg {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.gate__msg.bad,
.access__msg.bad {
  color: var(--fat);
}
.gate__back {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--text-faint);
  text-decoration: none;
}
.gate__back:hover {
  color: var(--text);
}

/* ---------- przyciski ---------- */
.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #06231d;
  font-weight: 600;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius-md);
}
.btn--primary:hover {
  filter: brightness(1.08);
  color: #06231d;
  border-color: var(--primary);
}
.btn--primary:disabled {
  opacity: 0.6;
  cursor: default;
}
.btn--ghost {
  padding: 0.62rem 1.05rem;
  border-radius: var(--radius-md);
}

/* ---------- landing ---------- */
.lhero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}
.lhero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 10px 0 18px;
  text-wrap: balance;
}
.lead {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 26px;
  max-width: 58ch;
}
.lhero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.lhero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 4vw, 40px);
  margin: 38px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}
.lhero__facts li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lhero__facts b {
  font-family: var(--font-display);
  font-size: 1.3rem;
}
.lhero__facts span {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.lhero__panel {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.ticks {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.ticks li {
  position: relative;
  padding-left: 26px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}
.ticks--tight li {
  font-size: 0.88rem;
}
.price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.price span {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 60%;
}
.price b {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--primary);
  white-space: nowrap;
}

.lsection {
  padding: clamp(44px, 7vw, 84px) 0;
  border-top: 1px solid var(--border);
}
.lsection__head {
  max-width: 62ch;
  margin-bottom: clamp(24px, 4vw, 44px);
}
.lsection__head h2,
.lsplit h2,
.access h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 8px 0 12px;
  text-wrap: balance;
}
.lsection__head p,
.lcard__note {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.lgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 16px;
}
.lgrid--2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.lcard {
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.lcard h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 10px;
}
.lcard p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.lcard--plain {
  background: transparent;
}
.lcard__warn {
  margin-top: 14px !important;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--warn) !important;
  font-size: 0.85rem !important;
}

.lsplit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.compare {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.compare__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.compare__label {
  font-weight: 600;
  font-size: 0.95rem;
}
.compare__meta {
  font-size: 0.82rem;
  color: var(--text-faint);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
}
.steps li {
  position: relative;
  padding-top: 18px;
  border-top: 2px solid var(--border);
}
.steps__n {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bg);
  background: var(--primary);
  border-radius: 50%;
}
.steps h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 8px;
}
.steps p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.access {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding: clamp(28px, 5vw, 44px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
}
.access__copy p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}
.access__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.access__form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.goal__note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.foot {
  padding-top: 34px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .lhero {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- pomiar wyjściowy: stopka karty KPI z zakresem referencyjnym ---- */
.kpi__deltas--ref {
  flex-direction: column;
  gap: 5px;
}
.kpi__deltas--ref span {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}
.kpi__deltas--ref em {
  white-space: nowrap;
}
.kpi__deltas--ref b {
  white-space: nowrap;
  text-align: right;
}
.kpi__deltas--ref span:only-child b {
  white-space: normal;
  font-weight: 500;
  color: var(--text-faint);
}
.foot__src {
  border-top: 1px solid var(--divider);
  padding-top: var(--space-4);
  margin-top: var(--space-4);
  max-width: 78ch;
  line-height: 1.6;
}
.foot__src b {
  color: var(--text-muted);
  font-weight: 600;
}

/* ---- pierścień: podpis nie może dotykać krawędzi na wąskich ekranach ---- */
@media (max-width: 560px) {
  .verdict__ring figcaption,
  .verdict__ring small,
  [data-quality] + * {
    font-size: 0.6875rem;
    letter-spacing: 0;
    max-width: 8.5em;
    margin-inline: auto;
    line-height: 1.25;
  }
}
