:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #162033;
  --muted: #667085;
  --line: #d9e1ec;
  --accent: #155eef;
  --accent-strong: #0b4dcc;
  --navy: #1e3a8a;
  --header: #1e3a8a;
  --ok: #067647;
  --shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  overflow-y: scroll;
}

body.smart-page {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

/* Спільна шапка повторює початковий стиль сторінки perelik.html. */
.smart-site-header {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--header);
  color: #fff;
  text-align: center;
}

.smart-header-inner {
  width: 100%;
  margin: 0 auto;
}

.smart-brand {
  width: 100%;
  display: block;
  padding: 30px 20px;
  color: inherit;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.smart-brand:hover,
.smart-brand:focus-visible {
  background: var(--header);
  color: #fff;
}

.smart-brand:focus-visible {
  outline: 3px solid #bfdbfe;
  outline-offset: -4px;
}

.smart-brand-copy {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.smart-brand-title {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 2em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.smart-brand-slogan {
  display: block;
  margin-top: 10px;
  color: #dbeafe;
  font-size: 1.1em;
  font-weight: 400;
  line-height: 1.35;
}

body.smart-page > .container {
  width: calc(100% - 36px);
  margin-left: auto;
  margin-right: auto;
}

body.smart-page > .container {
  margin-top: 32px;
  margin-bottom: 32px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

body.smart-page .card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

body.smart-page h1,
body.smart-page h2,
body.smart-page h3 {
  color: var(--text);
  line-height: 1.25;
}

body.smart-page label,
body.smart-page legend {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

body.smart-page input:not([type="radio"]):not([type="checkbox"]),
body.smart-page textarea {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #b8c3d3;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  box-shadow: none;
  transition: border-color 160ms ease, outline-color 160ms ease;
}

body.smart-page select {
  min-height: 44px;
  padding: 0 38px 0 12px;
  border: 1px solid #b8c3d3;
  border-radius: 10px;
  background-color: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  box-shadow: none;
  transition: border-color 160ms ease, outline-color 160ms ease;
}

body.smart-page input:not([type="radio"]):not([type="checkbox"]):focus,
body.smart-page select:focus,
body.smart-page textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(21, 94, 239, 0.16);
  box-shadow: none;
}

body.smart-page input:disabled,
body.smart-page select:disabled,
body.smart-page textarea:disabled {
  cursor: not-allowed;
  background: #eef2f7;
  color: #98a2b3;
  opacity: 1;
}

body.smart-page button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  box-shadow: none;
  transition: background-color 160ms ease;
}

body.smart-page button:hover {
  background: var(--accent-strong);
  box-shadow: none;
  transform: none;
}

body.smart-page button:focus-visible {
  outline: 3px solid rgba(21, 94, 239, 0.2);
  outline-offset: 3px;
}

body.smart-page button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

body.smart-page #reset {
  background: #e8eef8;
  color: #253550;
}

body.smart-page #reset:hover {
  background: #dbe5f3;
}

body.smart-page .result,
body.smart-page .results,
body.smart-page .result-box,
body.smart-page .instructions,
body.smart-page .info-block,
body.smart-page .note,
body.smart-page .tariff-note {
  border-color: var(--line);
  border-radius: 12px;
}

body.smart-page .result-box {
  background-color: #f7f9fc;
}

body.smart-page table {
  width: 100%;
  border-collapse: collapse;
}

body.smart-page th {
  background: #f7f9fc;
  color: #475467;
}

body.smart-page th,
body.smart-page td {
  border-color: var(--line);
}

body.smart-page a {
  color: var(--navy);
  text-underline-offset: 3px;
}

body.smart-page footer,
body.smart-page .footer,
body.smart-page .developer,
body.smart-page .developer-footer {
  color: #6b7280;
}

body.smart-page footer a,
body.smart-page .footer a,
body.smart-page .developer a,
body.smart-page .developer-footer a {
  color: var(--navy);
}

body.smart-page .smart-site-footer {
  width: 100%;
  margin: auto 0 0;
  padding: 14px 18px;
  display: flex;
  background: #24272b;
  color: #b9c0ca;
  font-size: 13px;
  line-height: 1.4;
}

body.smart-page .smart-footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}

body.smart-page .smart-footer-contact,
body.smart-page .smart-footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
}

body.smart-page .smart-footer-contact {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

body.smart-page .smart-footer-meta {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

body.smart-page .smart-footer-contact strong {
  color: #fff;
  font-weight: 650;
}

body.smart-page .smart-site-footer a {
  color: #dbeafe;
  font-weight: 600;
  text-decoration: none;
}

body.smart-page .smart-site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

body.smart-page > .terms-container {
  width: min(760px, calc(100% - 36px));
  margin: 32px auto;
}

.terms-card {
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.terms-card h1 {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
}

.terms-updated,
.terms-lead {
  color: var(--muted);
}

.terms-updated {
  margin: 0 0 22px;
  font-size: 14px;
}

.terms-lead {
  margin: 0;
  font-size: 16px;
}

.terms-card section {
  padding-top: 22px;
}

.terms-card section + section {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.terms-card h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.terms-card p,
.terms-card ul {
  margin-top: 0;
  margin-bottom: 0;
}

.terms-card li + li {
  margin-top: 8px;
}

.terms-notice {
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
}

body.smart-home-page main {
  margin-top: 40px;
  margin-bottom: 40px;
}

body.smart-home-page ul.services li {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

@media (max-width: 700px) {
  .smart-brand {
    padding: 25px 20px 23px;
  }

  .smart-brand-title {
    font-size: 1.65em;
  }

  .smart-brand-slogan {
    margin-top: 8px;
    font-size: 0.94em;
  }

  body.smart-page > .container {
    width: calc(100% - 24px);
  }

  body.smart-page > .container {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 15px;
  }

  body.smart-page > .terms-container {
    width: calc(100% - 24px);
  }

  body.smart-page .smart-site-footer {
    padding: 13px 12px;
  }

  body.smart-page .smart-footer-inner,
  body.smart-page .smart-footer-contact,
  body.smart-page .smart-footer-meta {
    justify-content: center;
    text-align: center;
  }

  body.smart-page .smart-footer-inner {
    flex-direction: column;
    gap: 7px;
  }

  body.smart-page .smart-footer-contact,
  body.smart-page .smart-footer-meta {
    align-items: center;
  }
}

@media print {
  .smart-site-header {
    display: none;
  }

  body.smart-page {
    background: #fff;
  }

  body.smart-page > .container,
  body.smart-page .card {
    border: 0;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
