:root {
  --page: #f7f9f8;
  --surface: #ffffff;
  --surface-soft: #eef5f1;
  --text: #16211f;
  --muted: #5f6f6a;
  --border: #dce7e2;
  --green: #0f7b67;
  --green-dark: #0f4c45;
  --coral: #e95f48;
  --yellow: #f5c84c;
  --shadow: 0 14px 40px rgba(18, 45, 39, .10);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}
a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  background: rgba(247, 249, 248, .92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.site-header,
.hero-section,
.intro-band,
.section,
.final-cta,
.dashboard,
.chat-page,
.narrow-page {
  width: 100%;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  max-width: 420px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: white;
  background: var(--green-dark);
  border-radius: 8px;
  font-size: 13px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 15px;
}

.site-nav a:hover { color: var(--green-dark); }

.nav-cta {
  padding: 9px 14px;
  color: white !important;
  background: var(--green);
  border-radius: 8px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 560px);
  gap: 44px;
  align-items: center;
  max-width: 1180px;
  min-height: calc(100vh - 84px);
  margin: 0 auto;
  padding: 64px 32px;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: 60px;
  line-height: 1.02;
}

.hero-lead {
  max-width: 660px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 21px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions,
.form-actions,
.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.button.primary {
  color: white;
  background: var(--green);
}

.button.secondary {
  color: var(--green-dark);
  background: var(--surface-soft);
  border-color: var(--border);
}

.button.ghost {
  color: var(--green-dark);
  background: transparent;
  border-color: var(--border);
}

.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.trust-line span,
.topic-grid span {
  display: inline-flex;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-band,
.section,
.final-cta,
.dashboard,
.chat-page,
.narrow-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 32px;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 430px) 1fr;
  gap: 36px;
  background: var(--green-dark);
  color: white;
  border-radius: 8px;
}

.intro-band p:last-child {
  color: rgba(255, 255, 255, .82);
  font-size: 19px;
}

.intro-band .eyebrow { color: var(--coral); }

.section-heading {
  max-width: 680px;
  margin-bottom: 28px;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
  hyphens: auto;
}

h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.12;
}

h3 { margin: 0 0 8px; }

.steps-grid,
.doctor-grid,
.documents-grid,
.pricing-grid,
.status-grid,
.pet-grid,
.plan-grid {
  display: grid;
  gap: 18px;
}

.hero-copy,
.hero-visual,
.intro-band > *,
.split-section > *,
.help-section > *,
.community-section > *,
.steps-grid > *,
.doctor-grid > *,
.documents-grid > *,
.pricing-grid > *,
.status-grid > *,
.pet-grid > *,
.plan-grid > * {
  min-width: 0;
}

.steps-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.steps-grid article,
.doctor-card,
.document-card,
.pricing-grid article,
.status-card,
.pet-card,
.panel,
.plan-card,
.empty-state,
.paywall-panel,
.urgent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.steps-grid article {
  padding: 22px;
}

.steps-grid span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  color: white;
  background: var(--green);
  border-radius: 8px;
  font-weight: 800;
}

.steps-grid p,
.doctor-card p,
.pricing-grid p,
.status-card span,
.pet-card p,
.empty-state p,
.plan-card p,
.chat-side span,
.meta-list span {
  color: var(--muted);
}

.split-section,
.help-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 30px;
  align-items: start;
}

.feature-list {
  display: grid;
  gap: 10px;
}

.feature-list div {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.community-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 30px;
  align-items: stretch;
  background: #fef8ed;
  border: 1px solid rgba(245, 200, 76, .36);
  border-radius: 8px;
}

.community-section p {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.community-perks {
  display: grid;
  gap: 10px;
}

.community-perks div {
  display: grid;
  gap: 4px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid rgba(15, 123, 103, .18);
  border-radius: 8px;
}

.community-perks strong {
  color: var(--green-dark);
}

.community-perks span {
  color: var(--muted);
}

.doctor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doctor-card {
  overflow: hidden;
}

.doctor-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.doctor-card h3,
.doctor-card p,
.doctor-card span {
  display: block;
  margin-left: 18px;
  margin-right: 18px;
}

.doctor-card h3 { margin-top: 18px; }
.doctor-card span { margin-bottom: 18px; color: var(--green); font-weight: 750; }

.landing-charity {
  max-width: 720px;
  margin-top: 16px;
}

.documents-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.document-card {
  min-height: 160px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(15, 123, 103, .06), rgba(255, 255, 255, .96)),
    var(--surface);
  font-weight: 760;
}

.topic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.urgent-card {
  padding: 22px;
  border-color: rgba(233, 95, 72, .28);
  background: #fff4f1;
}

.urgent-card.compact {
  margin: 20px 0;
  font-size: 14px;
}

.pricing-grid,
.status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-grid article,
.status-card,
.plan-card,
.panel,
.empty-state,
.paywall-panel {
  padding: 22px;
}

.pricing-grid strong,
.plan-card strong {
  display: block;
  margin: 10px 0;
  color: var(--green-dark);
  font-size: 28px;
}

.faq-section details {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.faq-section summary {
  cursor: pointer;
  font-weight: 760;
}

.final-cta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.setup-note {
  max-width: 420px;
  padding: 14px 16px;
  color: var(--green-dark);
  background: var(--surface-soft);
  border-radius: 8px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.footer-note {
  max-width: 560px;
  margin-top: 10px;
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.legal-page {
  display: grid;
  gap: 16px;
}

.legal-page h1 {
  margin: 0;
}

.legal-meta {
  margin: 0;
  color: var(--muted);
}

.legal-card {
  display: grid;
  gap: 10px;
}

.legal-card h2,
.legal-warning h2 {
  font-size: 24px;
}

.legal-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.legal-consent {
  align-items: flex-start;
  color: var(--muted);
  font-weight: 560;
}

.legal-consent input {
  margin-top: 5px;
}

.legal-requisites {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0;
}

.legal-requisites dt {
  color: var(--muted);
}

.legal-requisites dd {
  margin: 0;
  font-weight: 650;
}

.legal-warning {
  padding: 22px;
  color: #684a10;
  background: #fff6dc;
  border: 1px solid rgba(245, 200, 76, .5);
  border-radius: 8px;
}

.legal-mini-note {
  margin: 0;
  padding: 12px;
  color: #684a10;
  background: #fff6dc;
  border: 1px solid rgba(245, 200, 76, .5);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
}

.dashboard-head,
.section-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.dashboard h1,
.narrow-page h1,
.chat-side h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.1;
}

.status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 34px;
}

.status-card {
  display: grid;
  gap: 10px;
}

.status-card strong {
  font-size: 20px;
}

.status-action,
.pet-action {
  justify-self: start;
  margin-top: 6px;
}

.cabinet-section {
  margin-top: 34px;
}

.text-link {
  color: var(--green);
  font-weight: 760;
}

.pet-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pet-card {
  padding: 18px;
}

.pet-card h3,
.pet-card p {
  margin-top: 0;
}

.ticket-list {
  display: grid;
  gap: 10px;
}

.ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.ticket-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.ticket-row b {
  color: var(--coral);
}

.narrow-page {
  max-width: 780px;
}

.auth-page {
  min-height: calc(100vh - 240px);
}

.auth-lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
}

.stack-form,
.consult-form,
.reply-form {
  display: grid;
  gap: 16px;
}

.form-error {
  margin: 0;
  padding: 12px 14px;
  color: #8c2f20;
  background: #fff4f1;
  border: 1px solid rgba(233, 95, 72, .32);
  border-radius: 8px;
  font-weight: 680;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 680;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
}

.auth-alt {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  color: var(--text);
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-weight: 460;
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.urgent-note,
.closed-note {
  padding: 14px;
  color: #8c2f20;
  background: #fff4f1;
  border: 1px solid rgba(233, 95, 72, .28);
  border-radius: 8px;
}

.paywall-panel {
  margin-bottom: 24px;
  border-color: rgba(15, 123, 103, .24);
  background: #edf8f3;
}

.plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-card {
  display: grid;
  gap: 12px;
}

.plan-card ul {
  padding-left: 18px;
  color: var(--muted);
}

.forum-links {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(15, 123, 103, .2);
  border-radius: 8px;
  background: #edf8f3;
}

.charity-note {
  padding: 12px;
  color: #684a10;
  background: #fff6dc;
  border: 1px solid rgba(245, 200, 76, .5);
  border-radius: 8px;
  font-weight: 650;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 500;
}

.checkbox-line input {
  width: auto;
}

.checkbox-line.legal-consent,
.check-row.legal-consent {
  align-items: flex-start;
}

.chat-page {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.chat-side,
.chat-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
}

.chat-side {
  position: sticky;
  top: 88px;
}

.chat-side h2 {
  margin-top: 8px;
  font-size: 24px;
}

.meta-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.messages {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.chat-message {
  max-width: 78%;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.chat-message.client {
  justify-self: end;
  background: #eaf7f2;
}

.chat-message.staff {
  justify-self: start;
  background: #fff8dd;
}

.chat-message.system {
  justify-self: center;
  background: var(--surface-soft);
}

.message-meta {
  color: var(--muted);
  font-size: 13px;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.attachment-list a {
  padding: 6px 8px;
  color: var(--green-dark);
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}

@media (max-width: 920px) {
  .site-header {
    position: static;
    align-items: flex-start;
    padding: 16px;
  }

  .site-nav {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
  }

  .hero-section,
  .intro-band,
  .split-section,
  .help-section,
  .community-section,
  .chat-page {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding: 40px 16px;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .intro-band,
  .community-section,
  .section,
  .final-cta,
  .dashboard,
  .chat-page,
  .narrow-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .steps-grid,
  .doctor-grid,
  .documents-grid,
  .pricing-grid,
  .status-grid,
  .pet-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .final-cta,
  .dashboard-head,
  .section-row,
  .site-footer {
    flex-direction: column;
  }

  .chat-side {
    position: static;
  }
}

@media (max-width: 560px) {
  .site-header {
    display: block;
  }

  .site-nav {
    margin-top: 14px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .brand {
    max-width: 100%;
  }

  .brand span:last-child {
    min-width: 0;
  }

  .site-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .hero-copy h1,
  .dashboard h1,
  .narrow-page h1,
  .chat-side h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 28px;
  }

  .eyebrow {
    font-size: 13px;
    line-height: 1.3;
  }

  .hero-lead,
  .community-section p,
  .intro-band p:last-child {
    font-size: 17px;
  }

  .trust-line,
  .topic-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .trust-line span,
  .topic-grid span {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .form-grid,
  .ticket-row,
  .legal-requisites {
    grid-template-columns: 1fr;
  }

  .chat-message {
    max-width: 100%;
  }
}
