:root {
  --bg: #efeae2;
  --card: #fbf8f3;
  --ink: #1b1714;
  --muted: #5e574e;
  --faint: #8a8175;
  --line: #e3dacd;
  --red: #a31d24;
  --amber: #8d5c10;
  --amber-bg: #f8f1e2;
  --green: #1d6b45;
  --track: #e4dcd2;
  --shadow: 0 1px 0 rgba(27, 23, 20, 0.04), 0 16px 40px rgba(27, 23, 20, 0.05);
  --sans: "Public Sans", "Segoe UI", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.6rem 1.1rem 3.5rem;
}

.mark {
  width: 2.4rem;
  height: 0.32rem;
  margin: 0 0 1rem;
  border-radius: 99px;
  background: var(--red);
}

.kicker {
  margin: 0;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, .card h2 {
  font-family: var(--serif);
  font-weight: 650;
  letter-spacing: -0.03em;
}

h1 {
  margin: 0.35rem 0 0.8rem;
  font-size: clamp(2.5rem, 12vw, 4.6rem);
  line-height: 0.92;
}

.lead, .legend p, .contact-lead, footer p {
  margin: 0;
  color: var(--muted);
}

.lead {
  max-width: 40rem;
  font-size: 1.08rem;
}

.footer-links a,
.src a,
.sazky-lead a,
details summary {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.footer-links a {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 500;
}

.footer-links a:hover,
.src a:hover,
details summary:hover {
  color: var(--ink);
}

.legend {
  margin: 0 0 1.15rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.legend summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.8rem 1rem;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.legend summary::after {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  transform: translateY(-0.12rem) rotate(45deg);
}

.legend[open] summary {
  border-bottom: 1px solid var(--line);
}

.legend[open] summary::after {
  transform: translateY(0.12rem) rotate(225deg);
}

.legend ol {
  margin: 0;
  padding: 0.9rem 1rem 0.2rem;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.legend li {
  position: relative;
  padding-left: 2rem;
}

.legend li::before {
  display: grid;
  place-items: center;
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--track);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.legend li:nth-child(1)::before { content: "1"; }
.legend li:nth-child(2)::before { content: "2"; }
.legend li:nth-child(3)::before { content: "3"; }
.legend li:nth-child(4)::before { content: "4"; }
.legend li:nth-child(5)::before { content: "5"; }

.legend p {
  padding: 0 1rem;
  font-size: 0.92rem;
}

.legend p:first-of-type { margin-top: 0.85rem; }

.legend p + p { margin-top: 0.45rem; }

.legend p:last-child { padding-bottom: 0.95rem; }

.score {
  margin: 1.15rem 0 0;
  font-weight: 700;
}

.filters {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 0.45rem;
  margin: 0.7rem 0 1rem;
  padding: 0.65rem 0;
  overflow-x: auto;
  background: rgba(239, 234, 226, 0.94);
  backdrop-filter: blur(12px);
  scrollbar-width: none;
}

.filters::-webkit-scrollbar { display: none; }

.filters button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.filters button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

main { display: block; }

.stack {
  display: grid;
  gap: 0.9rem;
}

.sazky {
  margin-top: 2.6rem;
  padding-top: 1.35rem;
  border-top: 3px solid var(--ink);
}

.sazky h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.05;
}

.sazky-lead {
  max-width: 40rem;
  margin: 0 0 1rem;
  color: var(--muted);
}

.sazky-lead a { font-weight: 500; }

.card {
  position: relative;
  padding: 1.15rem 1.05rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  scroll-margin-top: 4.5rem;
}

.card-illu {
  display: none;
}

.card-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.num {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 1.7rem;
  padding: 0 0.4rem;
  border-radius: 7px;
  background: var(--red);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.card h2 {
  margin: 0 0 0.95rem;
  font-size: clamp(1.55rem, 5vw, 2rem);
  line-height: 1.08;
}

.split {
  display: grid;
  gap: 0.7rem;
}

.block {
  margin: 0;
  padding: 0.85rem 0.9rem 0.95rem;
  border-radius: 14px;
}

.block p { margin: 0; }
.block p + p { margin-top: 0.55rem; }

.block.promise { background: #f3efe8; }
.block.manik { background: var(--amber-bg); }

.block h3 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.context {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.src {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
}

blockquote {
  margin: 0.7rem 0 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.45;
}

blockquote p { margin: 0; }

blockquote p::before { content: "„"; }
blockquote p::after { content: "“"; }

.block.promise h3 { color: var(--ink); }
.block.manik h3 { color: var(--amber); }

.note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.meter { margin-top: 1rem; }

.meter-kicker {
  margin: 0;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meter-now {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.1rem 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.face {
  display: inline-flex;
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
}

.face svg { width: 100%; height: 100%; }

.face .ring,
.face .mouth {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.face .eye { fill: currentColor; }

.meter[data-level="0"] .meter-now { color: var(--faint); font-weight: 500; }
.meter[data-level="4"] .meter-now,
.meter[data-level="5"] .meter-now { color: var(--green); }

.bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  height: 0.62rem;
}

.bar span {
  border-radius: 99px;
  background: var(--track);
}

.meter[data-level="1"] .bar span:nth-child(-n+1),
.meter[data-level="2"] .bar span:nth-child(-n+2),
.meter[data-level="3"] .bar span:nth-child(-n+3) {
  background: var(--ink);
  box-shadow: none;
}

.meter[data-level="4"] .bar span:nth-child(-n+4),
.meter[data-level="5"] .bar span:nth-child(-n+5) {
  background: var(--green);
  box-shadow: none;
}

.meter-scale {
  display: grid;
  gap: 0.28rem;
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}

.meter-scale li {
  position: relative;
  padding-left: 1rem;
  color: var(--faint);
  font-size: 0.86rem;
  line-height: 1.3;
}

.meter-scale li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38rem;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--track);
}

.meter[data-level="1"] .meter-scale li.is-reached,
.meter[data-level="2"] .meter-scale li.is-reached,
.meter[data-level="3"] .meter-scale li.is-reached {
  color: var(--ink);
  font-weight: 700;
}

.meter[data-level="1"] .meter-scale li.is-reached::before,
.meter[data-level="2"] .meter-scale li.is-reached::before,
.meter[data-level="3"] .meter-scale li.is-reached::before {
  background: var(--ink);
  box-shadow: none;
}

.meter[data-level="4"] .meter-scale li.is-reached,
.meter[data-level="5"] .meter-scale li.is-reached {
  color: var(--green);
  font-weight: 700;
}

.meter[data-level="4"] .meter-scale li.is-reached::before,
.meter[data-level="5"] .meter-scale li.is-reached::before {
  background: var(--green);
  box-shadow: none;
}

.contact {
  margin-top: 2.4rem;
  scroll-margin-top: 4.5rem;
}

.promise-body.is-clamped {
  position: relative;
  overflow: hidden;
}

.promise-body.is-clamped::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2.6rem;
  background: linear-gradient(to bottom, rgba(243, 239, 232, 0), #f3efe8);
  pointer-events: none;
}

.more {
  display: block;
  width: max-content;
  margin: 0.35rem 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--faint);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.more:hover { color: var(--muted); }

.contact summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.contact summary::before { content: none; }

.contact-title {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.contact-cue {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  color: var(--red);
  font-size: 0.95rem;
  font-weight: 700;
}

.contact-cue::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
}

.contact[open] .contact-cue::after {
  transform: translateY(0.12rem) rotate(225deg);
}

.contact[open] .when-closed,
.contact:not([open]) .when-open { display: none; }

.contact-body {
  margin-top: 1rem;
  padding: 1.15rem 1.05rem 1.2rem;
  border-radius: 20px;
  background: var(--ink);
  color: #f6f1ea;
}

.contact-lead {
  max-width: 40rem;
  color: #d9d0c4;
}

form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
}

label span { font-size: 0.92rem; }

input, select, textarea {
  width: 100%;
  padding: 0.8rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

textarea { resize: vertical; min-height: 9rem; }

button[type="submit"] {
  min-height: 48px;
  padding: 0.75rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button[type="submit"]:hover { background: #861820; }

button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: wait;
}

.form-status:not(:empty) {
  margin: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: #f8efd8;
  color: #5c3d09;
}

footer {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.4rem;
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

details summary::-webkit-details-marker { display: none; }

details summary::marker { content: ""; }

.noscript {
  max-width: 40rem;
  margin: 1rem auto;
  padding: 0 1.1rem;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

:focus:not(:focus-visible) { outline: none; }

@media (min-width: 800px) {
  .wrap { padding-inline: 1.5rem; }
  .card-head {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    column-gap: 1.25rem;
    margin-bottom: 0.85rem;
  }
  .card-head h2 { margin-bottom: 0; }
  .card-illu {
    display: block;
    width: 100%;
    height: auto;
  }
  .split { grid-template-columns: 1fr 1fr; gap: 0.9rem; align-items: start; }
  .legend ol { grid-template-columns: 1fr 1fr; gap: 0.55rem 1.4rem; }
  button[type="submit"] { width: max-content; min-width: 11rem; }
}

@media (min-width: 960px) {
  .meter-scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .meter-scale li {
    padding: 0;
    text-align: center;
    font-size: 0.78rem;
  }

  .meter-scale li::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
