:root {
  color-scheme: dark;
  --bg: #050606;
  --panel: #101211;
  --panel-2: #171a18;
  --text: #f4f7f5;
  --muted: #8d9991;
  --line: #252a27;
  --accent: #33e580;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 70% 0%, rgba(51, 229, 128, 0.13), transparent 30%), var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button, input, textarea { font: inherit; }
a { color: var(--accent); }

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

.topbar, .section-title, .user-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h1, h2, p { margin: 0; }
h1 { font-size: 42px; letter-spacing: 0; line-height: 1; display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
h2 { font-size: 22px; letter-spacing: 0; }

.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.home-link:hover {
  text-decoration: underline;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)), var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.24);
}

.compact { padding: 18px 20px; }

.hero-panel {
  display: grid;
  min-height: 340px;
  align-items: end;
  margin-top: 28px;
  padding: 34px;
  border: 1px solid rgba(51, 229, 128, 0.18);
  border-radius: 10px;
  background:
    radial-gradient(circle at 80% 0%, rgba(51, 229, 128, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01)),
    var(--panel);
  box-shadow: 0 22px 60px rgba(0,0,0,0.28);
}

.hero-copy {
  max-width: 760px;
}

.hero-copy h2 {
  margin-top: 8px;
  font-size: clamp(30px, 6vw, 62px);
  line-height: 1.04;
  max-width: 860px;
}

.hero-text {
  max-width: 680px;
  margin-top: 16px;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.55;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 10px;
  margin-top: 24px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  text-decoration: none;
  white-space: nowrap;
}

.secondary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-weight: 800;
}

.secondary:hover {
  border-color: rgba(51, 229, 128, 0.5);
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.landing-card {
  min-height: 260px;
}

.clean-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 22px;
  color: var(--text);
  line-height: 1.45;
}

.compact-list {
  margin-top: 0;
}

.price-panel,
.warning-panel,
.faq-panel {
  margin-top: 18px;
}

.price-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
  margin-top: 10px;
}

.price-value {
  font-size: clamp(42px, 8vw, 72px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--text);
}

.warning-panel {
  border-color: rgba(230, 195, 92, 0.28);
}

.faq-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0d0c;
  padding: 13px 14px;
}

summary {
  cursor: pointer;
  font-weight: 800;
  line-height: 1.35;
}

details p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-top: 20px;
}

.main-column, .side-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.about {
  width: min(720px, 100%);
  margin: 32px auto 0;
}

.about h2 {
  margin-top: 6px;
}

.about > .muted {
  margin-top: 10px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.about-grid a {
  color: var(--accent);
  text-decoration: none;
}

.about-grid a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; }
}

#authView {
  width: min(430px, 100%);
  margin: 44px auto 0;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 12px;
}

.oauth-divider::before,
.oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.oauth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.oauth-yandex {
  background: #ffcc00;
  color: #1a1a1a;
}

.oauth-yandex:hover {
  background: #ffdb4d;
}

.oauth-note {
  margin-top: 12px;
  font-size: 12px;
}

.tab, .icon-button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  min-height: 42px;
  border-radius: 8px;
  cursor: pointer;
}

.tab.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.stack, .checkin-form {
  display: grid;
  gap: 14px;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 6px;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--accent);
}

.two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.two input {
  min-width: 0;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090b0a;
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(51, 229, 128, 0.12);
}

.time-select {
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-select select {
  width: auto;
  flex: 1;
}

.primary {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #031007;
  font-weight: 800;
  min-height: 46px;
  padding: 0 16px;
  cursor: pointer;
}

.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.inline-button {
  margin-top: 14px;
}

.terms-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terms-row {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.terms-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

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

.toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0d0c;
  padding: 10px 12px;
  color: var(--text);
}

.toggle input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #2a302c;
  padding: 3px;
  flex: 0 0 auto;
}

.switch::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #a8b1ab;
  transition: transform 0.16s ease, background 0.16s ease;
}

.toggle:has(input:checked) {
  border-color: rgba(51, 229, 128, 0.55);
  background: rgba(51, 229, 128, 0.08);
}

.toggle:has(input:checked) .switch::before {
  transform: translateX(18px);
  background: var(--accent);
}

.ring {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--score) * 1%), #242925 0);
  position: relative;
  flex: 0 0 auto;
}

.ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--panel);
}

.ring span {
  position: relative;
  z-index: 1;
  font-size: 30px;
  font-weight: 900;
}

.badge {
  border: 1px solid rgba(51, 229, 128, 0.45);
  color: var(--accent);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.muted, .message {
  color: var(--muted);
  line-height: 1.45;
}

.message.error { color: var(--danger); }

.history {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0d0c;
}

.history-score {
  color: var(--accent);
  font-size: 24px;
  font-weight: 900;
}

.slim { align-items: end; }
.hidden { display: none !important; }

.document {
  width: min(840px, 100%);
  margin: 36px auto 0;
}

.document-date {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}

.document section {
  display: grid;
  gap: 10px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.document section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.document h2 {
  font-size: 20px;
}

.document p,
.document li {
  color: var(--text);
  line-height: 1.65;
}

.document ul,
.document ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  margin-top: 36px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.site-footer a,
.site-footer a:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
  border-color: rgba(51, 229, 128, 0.45);
}

@media (max-width: 860px) {
  .app-grid { grid-template-columns: 1fr; }
  .toggle-grid, .two { grid-template-columns: 1fr; }
  h1 { font-size: 34px; }
  .section-title { align-items: flex-start; }
  .landing-grid,
  .price-row {
    grid-template-columns: 1fr;
  }
  .hero-panel {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .hero-copy h2 {
    font-size: 30px;
    line-height: 1.08;
  }
  .hero-text {
    font-size: 16px;
  }
  .hero-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero-actions .link-button {
    width: 100%;
  }
  .landing-grid {
    gap: 14px;
    margin-top: 28px;
  }
  .panel {
    padding: 24px 30px;
  }
  .landing-card {
    min-height: auto;
  }
  .clean-list {
    font-size: 16px;
    gap: 7px;
  }
  .price-panel,
  .warning-panel,
  .faq-panel {
    margin-top: 14px;
  }
  .price-value {
    font-size: 46px;
  }
  #authView {
    margin-top: 42px;
  }
  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 26px;
  }
}

@media (max-width: 420px) {
  .shell {
    width: min(100% - 28px, 1180px);
    padding-top: 22px;
  }
  .topbar {
    align-items: flex-start;
  }
  h1 {
    font-size: 38px;
  }
  .hero-copy h2 {
    font-size: 28px;
  }
  .panel {
    padding: 22px 24px;
  }
  .clean-list {
    padding-left: 20px;
  }
  .password-toggle {
    font-size: 14px;
  }
  .site-footer {
    gap: 8px;
  }
}
