:root {
  color-scheme: only light;
  --bg: #eff5f4;
  --ink: #102136;
  --muted: #41566f;
  --panel: rgba(255, 255, 255, 0.93);
  --line: rgba(16, 33, 54, 0.15);
  --primary: #007c73;
  --primary-strong: #04524d;
  --focus: #03b8aa;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 12%, rgba(0, 124, 115, 0.23), transparent 27%),
    radial-gradient(circle at 6% 95%, rgba(4, 82, 77, 0.2), transparent 28%),
    linear-gradient(170deg, #f7fdfb 0%, var(--bg) 52%, #dce8e7 100%);
}

.scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black 33%, transparent 85%);
  z-index: -1;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.top-panel {
  width: 100%;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(16, 33, 54, 0.08);
}

.top-row {
  width: min(1240px, 96vw);
  margin: 0 auto;
  padding: 0.85rem 0.5rem 0.35rem;
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr auto;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: min(230px, 42vw);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-text {
  margin: 0;
  text-align: center;
  font-family: "Outfit", "IBM Plex Sans", sans-serif;
  font-size: clamp(0.96rem, 1.6vw, 1.18rem);
  font-weight: 600;
  color: var(--primary-strong);
}

.language-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  justify-self: end;
  align-self: start;
}

.lang-btn {
  border: 0;
  min-width: 46px;
  min-height: 36px;
  background: transparent;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}

.lang-btn.is-active {
  background: var(--primary);
  color: #fff;
}

.main-nav {
  width: min(1240px, 96vw);
  margin: 0 auto;
  padding: 0.2rem 0.5rem 0.75rem;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.menu-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 38px;
  padding: 0.38rem 0.95rem;
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease;
}

.menu-btn:hover {
  transform: translateY(-1px);
}

.menu-btn.is-active {
  background: var(--primary-strong);
  color: #fff;
  border-color: transparent;
}

.main-panel {
  width: 100%;
  padding: clamp(0.8rem, 2vw, 1.5rem);
}

.content-card {
  width: min(1240px, 96vw);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 48px rgba(16, 33, 54, 0.12);
  padding: clamp(1rem, 2.3vw, 1.6rem);
  backdrop-filter: blur(6px);
}

#content-title {
  margin: 0;
  font-family: "Outfit", "IBM Plex Sans", sans-serif;
  font-size: clamp(1.25rem, 2.9vw, 1.85rem);
}

.content-body {
  margin-top: 0.9rem;
  color: var(--ink);
}

.content-body p {
  margin: 0 0 0.75rem;
  line-height: 1.56;
}

.content-body .section-subtitle {
  margin-top: 1rem;
  color: var(--primary-strong);
  font-weight: 700;
}

.content-body ul,
.content-body ol {
  margin: 0.45rem 0 0.9rem 1.2rem;
  padding: 0;
}

.content-body li {
  margin: 0.38rem 0;
  line-height: 1.52;
}

.profession-label {
  display: block;
  margin-top: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--primary-strong);
}

.profession-select {
  width: min(760px, 100%);
  min-height: 42px;
  padding: 0.45rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
}

.profession-content {
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.profession-content h3 {
  margin: 0 0 0.55rem;
  font-family: "Outfit", "IBM Plex Sans", sans-serif;
  color: var(--primary-strong);
}

.lexicon-pre {
  margin: 1rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
}

.lexicon-list {
  margin-top: 1rem;
}

.lexicon-letter {
  margin: 1.1rem 0 0.45rem;
  font-family: "Outfit", "IBM Plex Sans", sans-serif;
  font-size: 1.05rem;
  color: var(--primary-strong);
}

.lexicon-entry {
  margin: 0 0 0.95rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.lexicon-term {
  margin: 0 0 0.3rem;
}

.lexicon-definition {
  margin: 0;
  line-height: 1.58;
}

.bottom-panel {
  width: 100%;
  padding: 0.9rem 1rem 1rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.bottom-panel p {
  margin: 0.1rem 0;
}

.cookie-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(560px, calc(100vw - 2rem));
  z-index: 60;
}

.cookie-banner[hidden],
.cookie-modal[hidden] {
  display: none !important;
}

.cookie-banner-content {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(16, 33, 54, 0.2);
  padding: 1rem;
}

.cookie-title {
  margin: 0;
  font-family: "Outfit", "IBM Plex Sans", sans-serif;
  font-size: 1.05rem;
}

.cookie-text,
.cookie-legal,
.cookie-option-text {
  margin: 0.42rem 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.91rem;
}

.cookie-legal {
  font-size: 0.84rem;
}

.cookie-actions {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.cookie-btn {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.34rem 0.86rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.cookie-btn-primary {
  background: var(--primary-strong);
  color: #fff;
}

.cookie-btn-outline {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.cookie-btn-ghost {
  background: #edf6f4;
  color: var(--primary-strong);
  border-color: rgba(4, 82, 77, 0.18);
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 33, 54, 0.42);
}

.cookie-modal-card {
  position: relative;
  z-index: 1;
  width: min(680px, 96vw);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 42px rgba(16, 33, 54, 0.24);
  padding: 1rem;
}

.cookie-option-row {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(16, 33, 54, 0.11);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.cookie-option-title {
  margin: 0;
  font-weight: 700;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  width: 50px;
  height: 28px;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-switch span {
  position: absolute;
  inset: 0;
  background: #cdd8df;
  border-radius: 999px;
  transition: background-color 120ms ease;
}

.cookie-switch span::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 120ms ease;
}

.cookie-switch input:checked + span {
  background: var(--primary);
}

.cookie-switch input:checked + span::before {
  transform: translateX(22px);
}

button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .top-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo lang"
      "hero hero";
    row-gap: 0.5rem;
  }

  .brand-logo {
    grid-area: logo;
    width: min(220px, 58vw);
  }

  .language-switch {
    grid-area: lang;
  }

  .hero-text {
    grid-area: hero;
    text-align: left;
    font-size: clamp(0.94rem, 3vw, 1.08rem);
  }
}

@media (max-width: 640px) {
  .top-row {
    width: 95vw;
    padding-top: 0.7rem;
  }

  .main-nav {
    width: 95vw;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.6rem;
  }

  .main-nav::-webkit-scrollbar {
    height: 8px;
  }

  .main-nav::-webkit-scrollbar-thumb {
    background: rgba(4, 82, 77, 0.35);
    border-radius: 999px;
  }

  .content-card {
    width: 95vw;
    border-radius: 14px;
  }

  .bottom-panel {
    font-size: 0.8rem;
  }

  .cookie-banner {
    right: 0.5rem;
    bottom: 0.5rem;
    width: calc(100vw - 1rem);
  }
}
