:root {
  --md-sys-color-primary: #88d7b7;
  --md-sys-color-on-primary: #00382a;
  --md-sys-color-primary-container: #00513d;
  --md-sys-color-on-primary-container: #a4f3d2;
  --md-sys-color-secondary: #b2cdbe;
  --md-sys-color-on-secondary: #1e352b;
  --md-sys-color-secondary-container: #354b41;
  --md-sys-color-on-secondary-container: #cee9da;
  --md-sys-color-surface: #0f1512;
  --md-sys-color-on-surface: #dee4e0;
  --md-sys-color-on-surface-variant: #bfc9c2;
  --md-sys-color-surface-variant: #3f4944;
  --md-sys-color-surface-container-lowest: #0a0f0d;
  --md-sys-color-surface-container-low: #171d1a;
  --md-sys-color-surface-container: #1b211e;
  --md-sys-color-surface-container-high: #262b28;
  --md-sys-color-surface-container-highest: #303633;
  --md-sys-color-outline: #8a938d;
  --md-sys-color-outline-variant: #3f4944;
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-on-error: #690005;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-on-error-container: #ffdad6;
  --warning-surface: #2b1a19;
  --warning-outline: #6f4743;

  --md-sys-shape-extra-small: 4px;
  --md-sys-shape-small: 8px;
  --md-sys-shape-medium: 12px;
  --md-sys-shape-large: 16px;
  --md-sys-shape-extra-large: 28px;
  --md-sys-shape-full: 9999px;

  --md-sys-elevation-1: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px 1px rgba(0, 0, 0, .15);
  --md-sys-elevation-2: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 6px 2px rgba(0, 0, 0, .15);

  --md-sys-motion-duration-short3: 150ms;
  --md-sys-motion-duration-short4: 200ms;
  --md-sys-motion-easing-standard: cubic-bezier(.2, 0, 0, 1);
}

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

html {
  min-height: 100%;
  background: var(--md-sys-color-surface);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

::selection {
  color: var(--md-sys-color-on-primary-container);
  background: var(--md-sys-color-primary-container);
}

.page-shell {
  width: min(100% - 48px, 1040px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 40px;
}

.ambient,
.hero-mark,
.eyebrow,
.count-pill,
.tag {
  display: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 8px;
  border: 0;
  background: transparent;
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--md-sys-color-on-surface);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--md-sys-shape-full);
  object-fit: cover;
  background: var(--md-sys-color-primary-container);
}

.language-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 40px;
  padding: 10px 20px;
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-full);
  color: var(--md-sys-color-primary);
  background: transparent;
  font: 500 14px/20px "Inter", sans-serif;
  cursor: pointer;
  transition: background-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
}

.language-button:hover {
  background: rgba(136, 215, 183, .08);
}

.language-button:active {
  background: rgba(136, 215, 183, .12);
}

.hero {
  display: block;
  padding: 64px 8px 40px;
}

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

h1 {
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.025em;
}

h1 .accent {
  color: var(--md-sys-color-primary);
}

.intro {
  max-width: 660px;
  margin-top: 20px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

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

.links-section + .links-section {
  margin-top: 40px;
}

.section-title {
  margin: 0 0 16px 8px;
  color: var(--md-sys-color-on-surface);
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
}

.bot-card {
  display: flex;
  min-height: 286px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-medium);
  background: var(--md-sys-color-surface-container-low);
  transition:
    background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
    border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
    box-shadow var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.bot-card:hover {
  background: var(--md-sys-color-surface-container);
  box-shadow: var(--md-sys-elevation-1);
}

.bot-card.is-warning {
  border-color: var(--warning-outline);
  background: var(--warning-surface);
}

.bot-card.is-warning:hover {
  background: var(--warning-surface);
}

.bot-card.is-warning .service-badge {
  color: var(--md-sys-color-error);
  background: transparent;
}

.bot-card.is-warning .service-badge img {
  display: none;
}

.bot-card.is-warning .service-badge::before {
  content: "\26A0\FE0E";
  font-family: "Inter", sans-serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.bot-card.is-warning .card-copy h2,
.bot-card.is-warning .card-copy p {
  color: var(--md-sys-color-on-error-container);
}

.bot-card.is-warning .open-button {
  color: var(--md-sys-color-on-error);
  background: var(--md-sys-color-error);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.telegram-badge {
  display: flex;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--md-sys-shape-large);
  overflow: hidden;
  background: var(--md-sys-color-primary-container);
}

.telegram-badge img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.service-badge {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: var(--md-sys-shape-large);
  overflow: hidden;
  background: var(--md-sys-color-primary-container);
  transition:
    color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
    background-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
}

.service-badge img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.card-copy {
  margin: 24px 0;
}

.card-copy h2 {
  margin-bottom: 8px;
  color: var(--md-sys-color-on-surface);
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: 0;
  transition: color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
}

.card-copy p {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  transition: color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
}

.card-copy p[aria-live="polite"] {
  opacity: 1;
  transition: opacity 100ms var(--md-sys-motion-easing-standard);
}

.card-copy p.is-changing {
  opacity: 0;
}

.open-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 40px;
  margin-top: auto;
  padding: 10px 24px;
  overflow: hidden;
  border: 0;
  border-radius: var(--md-sys-shape-full);
  color: var(--md-sys-color-on-primary);
  background: var(--md-sys-color-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  transition:
    color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
    background-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
    box-shadow var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.open-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--md-sys-color-on-primary);
  opacity: 0;
  transition: opacity var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
}

.open-button:hover {
  box-shadow: var(--md-sys-elevation-1);
  text-decoration: none;
}

.open-button:hover::before { opacity: .08; }
.open-button:active::before { opacity: .12; }
.open-button > span { position: relative; z-index: 1; }
.arrow { display: none; }

footer {
  display: flex;
  align-items: center;
  margin-top: 48px;
  padding: 24px 8px 0;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface-variant);
}

footer p {
  font-size: 12px;
  line-height: 16px;
}

:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
  border-radius: var(--md-sys-shape-extra-small);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  border-radius: var(--md-sys-shape-full);
  background: var(--md-sys-color-outline-variant);
}
::-webkit-scrollbar-thumb:hover { background: var(--md-sys-color-outline); }

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 1040px);
    padding-top: 12px;
  }

  .topbar {
    min-height: 64px;
    padding: 6px 4px;
  }

  .avatar { width: 40px; height: 40px; }
  .hero { padding: 48px 4px 32px; }
  h1 { font-size: clamp(32px, 10vw, 42px); }
  .bot-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .bot-card {
    min-height: 0;
    padding: 18px;
  }
  .telegram-badge {
    width: 48px;
    height: 48px;
    border-radius: var(--md-sys-shape-medium);
  }
  .service-badge {
    width: 48px;
    height: 48px;
    border-radius: var(--md-sys-shape-medium);
    font-size: 20px;
  }
  .card-copy { margin: 18px 0; }
  .card-copy h2 {
    margin-bottom: 6px;
    font-size: 19px;
    line-height: 24px;
  }
  .card-copy p {
    font-size: 13px;
    line-height: 19px;
  }
  .open-button {
    min-height: 38px;
    padding: 9px 20px;
  }
  footer { margin-top: 32px; padding-inline: 4px; }
}

@media (max-width: 390px) {
  .page-shell { width: calc(100% - 20px); }
  .identity { gap: 10px; font-size: 15px; }
  .language-button { min-width: 56px; padding-inline: 16px; }
  .hero { padding: 40px 2px 28px; }
  h1 { font-size: 32px; }
  .bot-card { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
