:root {
  --bg: #f1f7ff;
  --card: #ffffff;
  --text: #102a43;
  --muted: #52667a;
  --accent: #2d7dd2;
  --accent-soft: rgba(45, 125, 210, 0.12);
  --shadow: rgba(16, 42, 67, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: radial-gradient(circle at top, #dfefff 0%, #f8fbff 45%, #f1f7ff 100%);
  color: var(--text);
}

.page-shell {
  max-width: 1040px;
  margin: 32px auto;
  background: var(--card);
  border-radius: 28px;
  box-shadow: 0 22px 60px var(--shadow);
  overflow: hidden;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 28px;
  background: linear-gradient(135deg, #eef7ff, #f6faff);
  border-bottom: 1px solid rgba(16, 42, 67, 0.08);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-label {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.brand-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  flex-wrap: wrap;
}

.dropdown-group {
  position: relative;
}

.menu-item {
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.menu-item:hover,
.menu-item.active {
  background: rgba(45, 125, 210, 0.12);
  color: var(--accent);
}

.menu-dropdown-toggle {
  display: inline-flex;
  align-items: center;
}

.profile-dropdown,
.article-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: none;
  background: #fff;
  border: 1px solid rgba(45, 125, 210, 0.14);
  box-shadow: 0 18px 40px rgba(16, 42, 67, 0.12);
  border-radius: 18px;
  padding: 12px 0;
  min-width: 200px;
  z-index: 10;
}

.profile-dropdown.open,
.article-dropdown.open {
  display: block;
}

.submenu-item {
  display: block;
  width: 100%;
  padding: 12px 20px;
  color: var(--text);
  text-decoration: none;
}

.submenu-item:hover {
  background: rgba(45, 125, 210, 0.08);
  color: var(--accent);
}

.page-section {
  display: none;
  padding: 32px 36px 40px;
}

.page-section.active {
  display: block;
}

.section-card,
.article-panel,
.profile-panel {
  background: #f7fbff;
  border-radius: 24px;
  padding: 32px;
  border: 1px solid rgba(45, 125, 210, 0.16);
}

.section-home .section-card {
  max-width: 860px;
  margin: 0 auto;
}

.section-home h1,
.section-profile h1,
.article-card h2,
.section-faq h2 {
  margin-top: 0;
  font-size: clamp(2rem, 2.6vw, 3rem);
}

.welcome-text {
  margin: 18px 0;
  color: var(--muted);
  line-height: 1.8;
}

.welcome-sign {
  margin-top: 24px;
  font-weight: 600;
  color: var(--text);
}

.article-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.selector-item {
  border: 1px solid rgba(45, 125, 210, 0.22);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.selector-item.active,
.selector-item:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.article-card {
  display: none;
}

.article-card.active {
  display: block;
}

.article-card h2 {
  color: var(--text);
}

.article-card p,
.section-faq p,
.info-group li {
  color: var(--muted);
  line-height: 1.75;
}

.article-section {
  display: grid;
  gap: 20px;
  margin: 26px 0 24px;
}

.article-number {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.article-text h3 {
  margin: 0 0 12px;
  color: var(--accent);
}

.article-image {
  margin: 20px 0 0;
}

.article-image img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(16, 42, 67, 0.08);
}

.article-image figcaption {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.article-list {
  display: grid;
  gap: 14px;
}

.article-list-item {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(45, 125, 210, 0.08);
  color: var(--text);
}

.article-summary {
  margin-top: 26px;
  font-weight: 600;
}

.video-wrapper {
  margin-top: 26px;
}

.video-wrapper h3 {
  margin-bottom: 16px;
  color: var(--accent);
}

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(16, 42, 67, 0.08);
  background: #000;
}

.video-container iframe,
.video-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.section-faq .faq-form {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.section-faq input {
  flex: 1;
  min-width: 240px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(45, 125, 210, 0.18);
  background: #fff;
  color: var(--text);
}

.faq-list {
  margin-top: 20px;
  display: grid;
  gap: 16px;
  max-height: 360px;
  overflow-y: auto;
  padding: 16px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(45, 125, 210, 0.12);
}

.faq-empty {
  color: var(--muted);
}

.faq-item {
  padding: 16px 18px;
  border-radius: 18px;
  max-width: 84%;
  line-height: 1.75;
}

.faq-item-user {
  margin-left: auto;
  background: rgba(45, 125, 210, 0.12);
  color: var(--text);
}

.faq-item-answer {
  margin-right: auto;
  background: rgba(45, 125, 210, 0.18);
  color: var(--text);
}

.profile-panel {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

.profile-panel .photo-box {
  height: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 18px;
  display: grid;
  place-items: center;
}

.profile-panel .photo-box img {
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(45, 125, 210, 0.12);
}

.profile-content {
  padding: 0;
}

.profile-content h1 {
  margin-bottom: 10px;
}

.info-group {
  margin-bottom: 24px;
}

.info-group ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.profile-content li {
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .profile-panel {
    grid-template-columns: 1fr;
  }

  .site-menu {
    justify-content: center;
  }

  .profile-dropdown {
    right: 50%;
    transform: translateX(50%) translateY(-10px);
  }
}

@media (max-width: 768px) {
  .top-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .article-panel,
  .section-profile,
  .section-faq,
  .section-home {
    padding: 24px 20px 28px;
  }

  .section-card,
  .article-panel,
  .profile-panel {
    padding: 24px;
  }

  .selector-item,
  .menu-item {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .page-shell {
    margin: 16px;
  }

  .top-bar {
    padding: 18px 18px;
  }

  .section-card,
  .article-panel,
  .profile-panel {
    border-radius: 20px;
  }

  .photo-box {
    height: 260px;
  }
}
