:root {
  color-scheme: light;
  --bg: #f7f8f3;
  --surface: #ffffff;
  --surface-soft: #eef3ea;
  --text: #17201c;
  --muted: #5f6c64;
  --line: rgba(23, 32, 28, 0.12);
  --accent: #1e7f5c;
  --accent-strong: #155c44;
  --accent-soft: #d8eee4;
  --shadow: 0 24px 70px rgba(28, 45, 36, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(216, 238, 228, 0.9), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body.dark {
  color-scheme: dark;
  --bg: #121916;
  --surface: #1b2621;
  --surface-soft: #24352e;
  --text: #edf5ef;
  --muted: #b8c8bf;
  --line: rgba(237, 245, 239, 0.14);
  --accent: #70d8aa;
  --accent-strong: #a5f0cf;
  --accent-soft: rgba(112, 216, 170, 0.14);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 28px;
  align-items: stretch;
  min-height: min(720px, calc(100vh - 64px));
}

.hero-copy,
.hero-media,
.panel {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 6vw, 72px);
  border-radius: 8px;
}

.section-label {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.45rem, 8vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.75;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button,
.icon-button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--accent);
  color: #ffffff;
}

.ghost,
.secondary,
.icon-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.secondary {
  width: 100%;
}

.hero-media {
  min-height: 420px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel {
  margin-top: 28px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 8px;
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.08;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.test-card {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface-soft);
}

.test-card h3 {
  margin: 0 0 18px;
  font-size: 1.05rem;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

input {
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

input:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent);
  outline-offset: 3px;
}

.result {
  margin: 18px 0 0;
  color: var(--accent-strong);
  font-weight: 800;
}

.counter {
  margin: 8px 0 28px;
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1;
}

.status-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.status-card li {
  position: relative;
  padding-left: 26px;
}

.status-card li::before {
  position: absolute;
  left: 0;
  color: var(--accent-strong);
  content: "✓";
  font-weight: 900;
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 24px, 640px);
    padding-top: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    min-height: 520px;
  }

  .hero-media {
    min-height: 260px;
  }

  .panel-heading {
    display: block;
  }

  .test-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-copy,
  .panel,
  .test-card {
    padding: 22px;
  }

  .actions,
  .button {
    width: 100%;
  }

  .input-row {
    grid-template-columns: 1fr;
  }
}
