:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-strong: #183b63;
  --text: #263f5c;
  --muted: #6d7d8d;
  --line: #dfe4ea;
  --blue: #173f78;
  --green: #15805d;
  --gold: #c4932f;
  --steel: #2f6f9f;
  --shadow: 0 24px 60px rgba(23, 33, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(23, 63, 120, 0.08), transparent 20%),
    linear-gradient(270deg, rgba(196, 147, 47, 0.08), transparent 22%),
    #eef2f6;
}

a {
  color: inherit;
  text-decoration: none;
}

main::after {
  display: block;
  height: min(42vh, 360px);
  content: "";
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 -18px;
  padding: 16px 18px;
  border: 1px solid rgba(223, 228, 234, 0.9);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(16, 47, 88, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  width: 174px;
  height: auto;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(223, 228, 234, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav a:hover {
  color: var(--surface-strong);
  background: #edf2f7;
}

.site-search {
  display: flex;
  width: min(260px, 24vw);
  min-width: 180px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: #f8fafc;
}

.site-search span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.site-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.hero {
  display: flex;
  min-height: clamp(500px, 68vh, 680px);
  align-items: center;
  margin: 18px -18px 0;
  border-radius: 8px;
  padding: 56px 18px;
  border: 1px solid rgba(16, 47, 88, 0.12);
  border-left: 6px solid var(--blue);
  background:
    linear-gradient(135deg, rgba(23, 63, 120, 0.06), transparent 36%),
    #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

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

h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-text {
  max-width: 680px;
  color: #526b82;
  font-size: 1.16rem;
  line-height: 1.72;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.button.primary {
  border-color: var(--surface-strong);
  color: #fff;
  background: var(--surface-strong);
}

.button.ghost {
  border-color: rgba(196, 147, 47, 0.44);
  color: #60470f;
  background: rgba(255, 255, 255, 0.74);
}

.section-head,
.courses,
.contact {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 56px 0 24px;
}

.section-head {
  margin: 28px -18px 0;
  border-radius: 8px 8px 0 0;
  padding-right: 18px;
  padding-left: 18px;
  border: 1px solid rgba(16, 47, 88, 0.12);
  border-bottom: 0;
  border-left: 6px solid var(--gold);
  background: #ffffff;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 0 -18px;
  padding: 0 18px 44px;
  margin-bottom: 28px;
  border-right: 1px solid rgba(16, 47, 88, 0.12);
  border-bottom: 1px solid rgba(16, 47, 88, 0.12);
  border-left: 6px solid var(--gold);
  border-radius: 0 0 8px 8px;
  background: #ffffff;
}

.app-card {
  display: flex;
  min-height: 350px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(23, 33, 43, 0.08);
}

.app-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  background: var(--accent, var(--blue));
}

.app-card h3 {
  margin: 0 0 10px;
  font-size: 1.28rem;
}

.app-card p {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 18px;
}

.tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: #526b82;
  font-size: 0.78rem;
  font-weight: 700;
  background: #f8fafc;
}

.card-actions {
  display: grid;
  gap: 8px;
}

.card-actions a {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 800;
}

.open-link {
  color: #fff;
  background: var(--accent, var(--blue));
}

.courses p,
.contact p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.courses,
.contact {
  align-items: center;
  margin: 0 -18px;
  border-radius: 8px;
  border: 1px solid rgba(16, 47, 88, 0.12);
  border-left: 6px solid var(--blue);
  padding-right: 18px;
  padding-left: 18px;
  padding-bottom: 56px;
  background: #ffffff;
}

.courses {
  margin-bottom: 28px;
}

.contact {
  border-left-color: var(--gold);
}

.courses > div:first-child {
  max-width: 640px;
}

.contact > div:first-child {
  max-width: 640px;
}

.course-list,
.contact-list {
  display: grid;
  min-width: 280px;
  gap: 8px;
}

.course-link,
.contact-link {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--surface-strong);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.86);
}

.contact-link {
  display: grid;
  justify-content: stretch;
  gap: 3px;
}

.contact-link span {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.course-link::after {
  color: var(--gold);
  content: ">";
}

code {
  border: 1px solid #d7dee8;
  border-radius: 6px;
  padding: 3px 6px;
  color: #0f5132;
  background: #eef8f2;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.empty {
  grid-column: 1 / -1;
  border: 1px dashed #c7d0db;
  border-radius: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.chat-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  color: #fff;
  background: var(--surface-strong);
  box-shadow: 0 18px 44px rgba(16, 47, 88, 0.24);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.chat-panel {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 20;
  display: grid;
  width: min(380px, calc(100vw - 28px));
  max-height: min(640px, calc(100vh - 116px));
  grid-template-rows: auto minmax(180px, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(16, 47, 88, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 47, 88, 0.22);
}

.chat-panel[hidden] {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  color: #fff;
  background: var(--surface-strong);
}

.chat-header strong,
.chat-header span {
  display: block;
}

.chat-header span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.chat-header button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 1.3rem;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
  background: #f8fafc;
}

.chat-message {
  max-width: 88%;
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.45;
  font-size: 0.92rem;
}

.chat-message.bot {
  justify-self: start;
  border: 1px solid var(--line);
  color: var(--text);
  background: #fff;
}

.chat-message.user {
  justify-self: end;
  color: #fff;
  background: var(--gold);
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
}

.chat-suggestions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--surface-strong);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.chat-form {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.chat-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  font: inherit;
}

.chat-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: var(--surface-strong);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

@media (max-width: 980px) {
  .hero,
  .section-head,
  .courses,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 46px;
  }

  .section-head,
  .courses,
  .contact {
    display: grid;
  }

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

@media (max-width: 680px) {
  .shell {
    width: min(100% - 22px, 1180px);
  }

  .topbar {
    position: static;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .nav {
    display: none;
  }

  .site-search {
    width: 100%;
  }

  .hero {
    gap: 24px;
    padding-bottom: 44px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .hero-text {
    font-size: 1rem;
  }

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

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

  .section-head,
  .courses,
  .contact {
    padding-top: 58px;
  }

  .chat-toggle {
    right: 14px;
    bottom: 14px;
  }

  .chat-panel {
    right: 14px;
    bottom: 78px;
  }
}
