/* English for Noar shared visual language — Band II accent: teal / mint. */
:root {
  --efn-night: #0d1730;
  --efn-night-2: #111f42;
  --efn-night-3: #142d4c;
  --efn-paper: #f5f7fb;
  --efn-surface: #ffffff;
  --efn-ink: #18223a;
  --efn-muted: #64708a;
  --efn-line: #dce4ec;
  --efn-accent: #62d9cf;
  --efn-accent-strong: #168c83;
  --efn-accent-soft: #ddf8f4;
  --efn-focus: #f6c85f;
  --efn-radius: 20px;
  --efn-shadow: 0 18px 48px rgba(4, 12, 32, .18);
}

body {
  color: var(--efn-ink);
  background:
    radial-gradient(circle at 84% 6%, rgba(98, 217, 207, .18), transparent 28%),
    radial-gradient(circle at 8% 32%, rgba(79, 114, 255, .13), transparent 30%),
    linear-gradient(145deg, var(--efn-night), var(--efn-night-2) 58%, var(--efn-night-3));
}

button,
a {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
.core-tab:focus-visible {
  outline: 3px solid var(--efn-focus);
  outline-offset: 3px;
}

.wrap {
  max-width: 1180px;
  padding-top: 22px;
}

.hero {
  overflow: hidden;
  padding: 24px 28px 30px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 10%, rgba(98, 217, 207, .18), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
  box-shadow: 0 28px 70px rgba(4, 9, 28, .42);
  transform: none;
  backdrop-filter: blur(16px);
}

.efn-brandbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -2px 0 34px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.efn-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.efn-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 13px;
  color: var(--efn-night);
  background: linear-gradient(145deg, #8ef0e7, var(--efn-accent));
  box-shadow: 0 8px 22px rgba(3, 9, 28, .45);
  font-size: .82rem;
  letter-spacing: -.035em;
}

.efn-wordmark-copy {
  display: grid;
  gap: 2px;
}

.efn-wordmark-copy strong {
  font-size: 1.02rem;
  line-height: 1.1;
}

.efn-wordmark-copy small {
  color: #b8c8e6;
  font-size: .72rem;
  font-weight: 700;
}

.efn-product {
  padding: 7px 11px;
  border: 1px solid rgba(98, 217, 207, .34);
  border-radius: 999px;
  color: #b8fff8;
  background: rgba(98, 217, 207, .09);
  font-size: .78rem;
  font-weight: 900;
}

.brand {
  margin-bottom: 13px;
}

.mark,
.badge {
  color: var(--efn-night);
  background: linear-gradient(145deg, #8ef0e7, var(--efn-accent));
  box-shadow: none;
}

.mark {
  border-radius: 13px;
  font-size: .96rem;
}

.eyebrow {
  color: #a9eae5;
  letter-spacing: .11em;
}

h1,
.activity-title {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -.03em;
  text-shadow: none;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(2.7rem, 6.5vw, 5.2rem);
  line-height: .98;
}

.tagline {
  color: #d7e2f7;
  font-size: clamp(1.06rem, 2vw, 1.32rem);
}

.intro,
.meta {
  color: #b9c7e1;
}

.meta {
  border-top-color: rgba(255, 255, 255, .14);
}

.btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #08222f;
  background: var(--efn-accent);
  box-shadow: 0 8px 20px rgba(4, 15, 35, .24);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.btn:hover {
  background: #83e8df;
  box-shadow: 0 11px 24px rgba(4, 15, 35, .3);
}

.btn.secondary {
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
  background: rgba(255, 255, 255, .1);
  box-shadow: none;
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, .17);
}

.lang-ar,
.lang-he {
  top: 98px;
}

.guide {
  margin: 18px 0;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--efn-radius);
  color: #fff;
  background: rgba(255, 255, 255, .075);
  box-shadow: 0 18px 44px rgba(3, 10, 29, .25);
  backdrop-filter: blur(12px);
}

.guide small {
  color: #b8c7e1;
}

.core-tabs {
  margin-top: 25px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 16px;
  background: rgba(255, 255, 255, .075);
  box-shadow: none;
}

.core-tab {
  border: 0;
  border-radius: 11px;
  color: #c7d4eb;
  background: transparent;
  box-shadow: none;
}

.core-tab[aria-selected="true"] {
  border: 0;
  color: #07242c;
  background: var(--efn-accent);
  box-shadow: 0 8px 22px rgba(3, 12, 30, .3);
}

.core {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--efn-shadow);
}

.core h2 {
  color: var(--efn-ink);
}

.core p {
  color: var(--efn-muted);
}

.group {
  border: 1px solid var(--efn-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(17, 31, 66, .075);
}

.group a {
  color: #126b67;
}

.copy {
  border-left-color: var(--efn-line);
  color: #126b67;
  background: var(--efn-accent-soft);
}

footer {
  color: #aebedb;
}

footer a {
  color: #d8fff9;
}

/* Activity shell */
.activity-shell {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 26px;
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 28px 70px rgba(3, 9, 28, .34);
  backdrop-filter: blur(14px);
}

.topbar {
  margin-bottom: 21px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.activity-head {
  gap: 16px;
}

.activity-title {
  font-size: clamp(1.4rem, 4vw, 1.95rem);
}

.counter {
  border: 1px solid rgba(98, 217, 207, .3);
  color: #c8fff9;
  background: rgba(98, 217, 207, .1);
}

.face {
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  background: linear-gradient(150deg, #fff, #f0fbfa);
  box-shadow: 0 22px 54px rgba(3, 11, 30, .3);
}

.pos {
  color: #08232b;
  background: var(--efn-accent);
}

.speak,
.example-audio {
  border-color: #a5ddd8;
  color: #126b67;
  background: var(--efn-accent-soft);
}

.word {
  max-width: 100%;
  color: var(--efn-ink);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.translation {
  min-width: 0;
  max-width: 100%;
  color: #126b67;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.word-wrap,
.translation-row,
.details-grid,
.example-box,
.family-box {
  min-width: 0;
  max-width: 100%;
}

.word-wrap {
  width: 100%;
}

.example-en,
.example-he,
.family-word,
.synonyms {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.controls .btn {
  box-shadow: 0 6px 18px rgba(3, 10, 29, .2);
}

.controls .btn.secondary {
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

@media (max-width: 560px) {
  .wrap {
    padding: 12px 12px 34px;
  }

  .hero {
    padding: 18px 18px 24px;
  }

  .efn-brandbar {
    align-items: flex-start;
    margin-bottom: 26px;
  }

  .efn-product {
    max-width: 145px;
    text-align: center;
  }

  .lang-ar,
  .lang-he {
    top: 92px;
    right: 18px;
  }

  .brand {
    padding-right: 72px;
  }

  .core,
  .activity-shell {
    padding: 15px;
  }

  .face {
    padding: 22px;
    border-radius: 20px;
  }

  .word {
    font-size: clamp(1.7rem, 9.5vw, 3.2rem);
    line-height: 1.16;
  }

  .translation {
    font-size: clamp(1.5rem, 8vw, 2.7rem);
    line-height: 1.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .hero,
  .guide,
  .core,
  .group,
  .activity-shell,
  .face,
  .btn {
    border: 1px solid ButtonText;
  }
}
