:root {
  color-scheme: light;
  --bg: #f6f3ef;
  --card: #ffffff;
  --line: #e6ddd4;
  --text: #1c1612;
  --muted: #6d645c;
  --orange: #c7000b;
  --orange-2: #e31c23;
  --ok: #1a7a42;
  --bad: #c4472d;
  --warn: #a86f0d;
  --unknown: #8a8178;
  --input: #ffffff;
  --banner-bg: #fde8ea;
  --banner-text: #8a1a20;
  --error: #b42318;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(199, 0, 11, 0.14), transparent 60%),
    var(--bg);
  color: var(--text);
}

.shell, .wrap, .page {
  width: min(100% - 2rem, 1120px);
  margin: 0 auto;
}

.shell { padding-bottom: 3rem; }

.page { padding: 48px 0 64px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(246, 243, 239, 0.88);
  border-bottom: 1px solid var(--line);
}

.site-header--shell,
body.home .site-header {
  position: static;
  backdrop-filter: none;
  background: transparent;
  border-bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
  min-height: auto;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.site-header--shell .nav-cta,
body.home .nav-cta {
  background: transparent;
  color: var(--orange) !important;
  border: 1.5px solid rgba(199, 0, 11, 0.45);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.hero {
  background: linear-gradient(145deg, #1c120c, #c7000b);
  color: #fff;
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  margin-bottom: 2rem;
}

.hero-brand {
  opacity: 0.8;
  font-weight: 800;
  font-size: 2rem;
  margin: 0;
  line-height: 1.1;
}

.hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0.4rem 0 0.8rem;
  line-height: 1.15;
}

.hero > p {
  opacity: 0.88;
  max-width: 36rem;
  margin: 0 0 1.2rem;
  color: #fff;
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: #e31c23;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

body.home .section {
  padding: 1.5rem 0 2rem;
}

body.home .section-alt {
  border-radius: 0;
  padding: 1.75rem 0;
  margin: 0;
  border-left: 0;
  border-right: 0;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand span { color: var(--orange); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: flex-end;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.nav a:hover { color: var(--text); }

.nav-cta {
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color: #1a0d04 !important;
  padding: 8px 12px;
  border-radius: 999px;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-2);
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
}

.lead, .hint, legend, .section-p {
  color: var(--muted);
}

.lead { max-width: 72ch; font-size: 17px; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.hero-badges span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.card, .report, .summary article, .why-card, .feature, .tariff-card, .faq-item, .step, .admin-meta, .table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(28, 22, 18, 0.04);
}

.form-card { padding: 22px; margin-top: 28px; }

label { display: block; font-weight: 650; margin-bottom: 8px; }

.row { display: flex; gap: 10px; }

input[type="text"], input:not([type="checkbox"]) {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 18px;
  letter-spacing: 0.04em;
}

button, .btn-small {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color: #1a0d04;
  font-weight: 750;
  padding: 0 22px;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: progress; }

.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  text-decoration: none;
}

.btn-small--danger {
  background: #fff;
  color: var(--bad);
  border: 1px solid #efc4bb;
}

fieldset {
  margin: 16px 0 0;
  border: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

legend { width: 100%; margin-bottom: 6px; }

.check { font-weight: 500; color: var(--text); display: flex; gap: 8px; align-items: center; width: 100%; }

.hint, .offer { margin: 8px 0 0; font-size: 14px; }

.field { margin-top: 16px; }

#email { width: 100%; letter-spacing: 0; font-size: 16px; }

input::placeholder { color: #a39890; }

input[type="checkbox"] { accent-color: var(--orange); }

.banner {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--banner-bg);
  color: var(--banner-text);
}

.banner-error {
  background: #fdecea;
  color: var(--error);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.summary article { padding: 16px; }

.summary h2 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }

.summary p { margin: 0; font-size: 18px; font-weight: 700; }

.state-active, .state-unprotected, .state-activated, .state-delivered { box-shadow: inset 3px 0 0 var(--ok); }
.state-expired, .state-protected, .state-not_activated { box-shadow: inset 3px 0 0 var(--bad); }
.state-unknown { box-shadow: inset 3px 0 0 var(--unknown); }

.reports { display: grid; gap: 12px; margin-top: 12px; }

.report { padding: 18px 18px 8px; }

.report header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }

.report h3 { margin: 0; }

.meta { color: var(--muted); font-size: 13px; }

.error { color: var(--error); }

table { width: 100%; border-collapse: collapse; margin-top: 8px; }

th, td { text-align: left; padding: 10px 0; border-top: 1px solid var(--line); vertical-align: top; }

th { color: var(--muted); font-weight: 550; width: 46%; }

.section { padding: 28px 0; }

.section-alt {
  background: rgba(255, 255, 255, 0.45);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section .page { padding: 36px 0; }

.section-h {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
}

.section-p { margin: 0 0 18px; max-width: 78ch; }

.why-grid, .feature-grid, .tariff-grid, .steps, .faq-list {
  display: grid;
  gap: 12px;
}

.why-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }

.tariff-grid, .steps { grid-template-columns: repeat(3, 1fr); }

.why-card, .feature, .tariff-card, .faq-item, .step { padding: 18px; }

.why-card h3, .feature h3, .faq-item h3, .step h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.why-card p, .feature p, .faq-item p, .step p, .tariff-lead {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.model-groups {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.model-groups p {
  margin: 0;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.tariff-kind {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tariff-card .price {
  margin: 8px 0 10px;
  font-size: 34px;
  font-weight: 800;
}

.tariff-card--paid {
  border-color: #f3c19f;
  box-shadow: 0 0 0 1px rgba(199, 0, 11, 0.12);
}

.tariff-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.step span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fde8ea;
  color: var(--orange);
  font-weight: 800;
  margin-bottom: 10px;
}

.text-cta {
  color: var(--orange);
  font-weight: 700;
  text-decoration: none;
}

.text-cta:hover { text-decoration: underline; }

.sample-head h2 { margin-bottom: 6px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 36px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover { color: var(--text); }

.admin-page h1 { margin-bottom: 12px; }

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-meta { padding: 14px 16px; margin: 14px 0; }

.admin-meta p { margin: 0; color: var(--muted); }

.admin-login { max-width: 520px; }

.table-wrap { overflow-x: auto; padding: 8px 16px 16px; }

.admin-table th, .admin-table td {
  font-size: 14px;
  padding: 12px 10px;
  border-top: 1px solid var(--line);
  width: auto;
}

.admin-table thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #f3eee8;
}

.status--done { background: #e6f6ec; color: var(--ok); }
.status--pending, .status--checking { background: #fde8ea; color: var(--banner-text); }
.status--failed, .status--canceled { background: #fdecea; color: var(--error); }

code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.example-card {
  display: block;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(28, 22, 18, 0.04);
}

.example-card:hover { border-color: #f3c19f; }

.example-card .brand-tag {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fde8ea;
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
}

.example-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.example-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.legal-page .page { padding-top: 36px; }
.legal-page .prose { max-width: 72ch; color: var(--muted); line-height: 1.55; }
.legal-page .prose h2 { color: var(--text); margin-top: 28px; }

.check-title {
  margin: 28px 0 6px;
  font-size: clamp(22px, 3vw, 28px);
}

.check-lead {
  margin: 0 0 16px;
  color: var(--muted);
}

.check-panel {
  display: grid;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(28, 22, 18, 0.04);
}

@media (min-width: 900px) {
  .check-panel {
    grid-template-columns: 1.25fr 0.85fr;
    align-items: start;
  }
}

.check-main .field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.check-main .field-label,
.field-label {
  display: block;
  font-weight: 700;
  margin: 0 0 8px;
}

.check-main input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  background: var(--input);
}

.service-list {
  display: grid;
  gap: 10px;
}

.service-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fffaf6;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  height: auto;
}

.service-option[data-active="true"] {
  border-color: var(--orange);
  background: #fde8ea;
}

.service-option .price {
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
}

.service-option strong {
  display: inline;
  font-size: 15px;
}

.service-option .hint {
  display: inline-block;
  margin-top: 4px;
}

.service-option--off {
  opacity: 0.65;
  cursor: not-allowed;
}

.badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #fde8ea;
  color: var(--banner-text);
  vertical-align: middle;
}

.badge-ok {
  background: #e6f6ec;
  color: var(--ok);
}

.badge-warn {
  background: #fdecea;
  color: var(--error);
}

.summary-box {
  background: #1c1612;
  color: #f6f3ef;
  border-radius: 18px;
  padding: 18px;
}

.summary-box h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 20px;
}

.summary-lead {
  margin: 0 0 14px;
  color: rgba(246, 243, 239, 0.72);
  font-size: 14px;
}

.summary-preview-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(246, 243, 239, 0.5);
}

.summary-preview-list {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.summary-preview-row {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.summary-preview-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.summary-preview-row dt {
  margin: 0;
  color: rgba(246, 243, 239, 0.62);
}

.summary-preview-row dd {
  margin: 0;
  color: #fff;
  font-weight: 650;
  word-break: break-word;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.btn-pay {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color: #1a0d04;
  font-weight: 800;
  cursor: pointer;
}

.btn-pay:disabled {
  opacity: 0.6;
  cursor: progress;
}

.summary-hint {
  margin: 10px 0 0;
  color: rgba(246, 243, 239, 0.55);
  font-size: 13px;
}

.error-text {
  margin: 12px 0 0;
  color: var(--error);
  font-weight: 600;
}

.tariff-card .text-cta {
  display: inline-block;
  margin-top: 12px;
}

.result-export {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.result-export[hidden] {
  display: none !important;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color: #1a0d04;
  font-weight: 750;
  font: inherit;
  cursor: pointer;
  height: auto;
}

.share-hint {
  margin: 0;
  color: var(--ok);
  font-weight: 600;
  font-size: 14px;
}

@media (max-width: 899px) {
  .summary-preview-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 820px) {
  .examples-grid { grid-template-columns: 1fr; }
  .nav a:not(.nav-cta) { display: none; }
  .why-grid, .feature-grid, .tariff-grid, .steps { grid-template-columns: 1fr; }
  .row, .summary, .report header, .admin-top { display: grid; }
  button { height: 48px; }
  .service-option, .btn-pay { height: auto; }
  .summary { grid-template-columns: 1fr; }
}
