:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --bg-accent-a: rgba(22, 116, 92, 0.13);
  --bg-accent-b: rgba(247, 172, 77, 0.18);
  --surface: #ffffff;
  --surface-panel: rgba(255, 255, 255, 0.82);
  --surface-muted: #eef4f1;
  --text: #151821;
  --muted: #606878;
  --line: #dfe4ec;
  --line-strong: rgba(223, 228, 236, 0.85);
  --accent: #16745c;
  --accent-contrast: #ffffff;
  --accent-dark: #0e5f4a;
  --accent-soft: #e3f4ef;
  --shadow: 0 22px 70px rgba(24, 31, 44, 0.1);
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #11151c;
    --bg-accent-a: rgba(48, 178, 143, 0.16);
    --bg-accent-b: rgba(247, 172, 77, 0.1);
    --surface: #181e27;
    --surface-panel: rgba(24, 30, 39, 0.84);
    --surface-muted: #202a32;
    --text: #f1f5f8;
    --muted: #a9b3c1;
    --line: #2b3542;
    --line-strong: rgba(69, 82, 98, 0.72);
    --accent: #46c09b;
    --accent-contrast: #071712;
    --accent-dark: #78d9bd;
    --accent-soft: #18382f;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11151c;
  --bg-accent-a: rgba(48, 178, 143, 0.16);
  --bg-accent-b: rgba(247, 172, 77, 0.1);
  --surface: #181e27;
  --surface-panel: rgba(24, 30, 39, 0.84);
  --surface-muted: #202a32;
  --text: #f1f5f8;
  --muted: #a9b3c1;
  --line: #2b3542;
  --line-strong: rgba(69, 82, 98, 0.72);
  --accent: #46c09b;
  --accent-contrast: #071712;
  --accent-dark: #78d9bd;
  --accent-soft: #18382f;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fb;
  --bg-accent-a: rgba(22, 116, 92, 0.13);
  --bg-accent-b: rgba(247, 172, 77, 0.18);
  --surface: #ffffff;
  --surface-panel: rgba(255, 255, 255, 0.82);
  --surface-muted: #eef4f1;
  --text: #151821;
  --muted: #606878;
  --line: #dfe4ec;
  --line-strong: rgba(223, 228, 236, 0.85);
  --accent: #16745c;
  --accent-contrast: #ffffff;
  --accent-dark: #0e5f4a;
  --accent-soft: #e3f4ef;
  --shadow: 0 22px 70px rgba(24, 31, 44, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.5;
  background:
    linear-gradient(135deg, var(--bg-accent-a), rgba(255, 255, 255, 0) 36%),
    radial-gradient(circle at 88% 8%, var(--bg-accent-b), transparent 28%),
    var(--bg);
}

button,
a {
  font: inherit;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

html[data-theme="light"] .brand,
:root:not([data-theme="dark"]) .brand {
  padding: 8px 10px;
  background: #151821;
  border: 1px solid rgba(21, 24, 33, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(21, 24, 33, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand {
    padding: 0;
    background: transparent;
    border: 0;
  }
}

.brand__logo {
  display: block;
  width: auto;
  max-width: min(220px, 62vw);
}

.brand__logo.is-hidden {
  display: none;
}

.brand__fallback {
  display: none;
  font-size: 1.25rem;
  font-weight: 700;
}

.brand__fallback.is-visible {
  display: inline-block;
}

.theme-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(24, 31, 44, 0.06);
}

.theme-switcher__button {
  min-height: 34px;
  padding: 7px 11px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.theme-switcher__button:hover,
.theme-switcher__button:focus-visible {
  color: var(--text);
  background: var(--surface-muted);
}

.theme-switcher__button:focus-visible {
  outline: 3px solid rgba(22, 116, 92, 0.28);
  outline-offset: 1px;
}

.theme-switcher__button.is-active {
  color: var(--accent-contrast);
  background: var(--accent);
}

.hero {
  padding: 72px 0 42px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(1.9rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero__text {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.17rem);
}

.webinars {
  padding: clamp(18px, 4vw, 32px);
  background: var(--surface-panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.webinars__topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.webinars h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  line-height: 1.2;
}

.webinars__count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.95rem;
}

.accordion {
  display: grid;
  gap: 12px;
}

.webinar {
  overflow: clip;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.webinar__button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 78px;
  padding: 18px 20px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.webinar__button:hover,
.webinar__button:focus-visible {
  background: var(--surface-muted);
}

.webinar__button:focus-visible {
  outline: 3px solid rgba(22, 116, 92, 0.3);
  outline-offset: -3px;
}

.webinar__title {
  min-width: 0;
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.webinar__meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.webinar__icon {
  position: relative;
  width: 22px;
  height: 22px;
  margin-left: 16px;
}

.webinar__icon::before,
.webinar__icon::after {
  position: absolute;
  top: 10px;
  left: 3px;
  width: 16px;
  height: 2px;
  background: var(--accent);
  border-radius: 99px;
  content: "";
}

.webinar__icon::after {
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}

.webinar.is-open .webinar__icon::after {
  transform: rotate(0deg);
}

.webinar__panel {
  display: none;
  padding: 0 20px 22px;
}

.webinar.is-open .webinar__panel {
  display: block;
}

.webinar__description {
  max-width: 760px;
  margin: 0 0 16px;
  color: var(--muted);
}

.webinar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  color: var(--accent-contrast);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--accent);
  border-radius: 6px;
}

.button-link:hover,
.button-link:focus-visible {
  background: var(--accent-dark);
}

.frame-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 240px;
  background: #10141d;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.frame-wrap--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
  background: var(--surface-muted);
}

.empty-state {
  margin: 0;
  padding: 22px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

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

  .hero {
    padding: 48px 0 30px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .theme-switcher__button {
    padding-inline: 8px;
  }

  .webinars {
    padding: 14px;
  }

  .webinars__topline {
    display: block;
  }

  .webinars__count {
    display: block;
    margin-top: 4px;
  }

  .webinar__button {
    min-height: 70px;
    padding: 16px;
  }

  .webinar__panel {
    padding: 0 16px 18px;
  }

  .frame-wrap {
    aspect-ratio: 4 / 3;
    min-height: 220px;
  }
}
