/* Emoji Translator Challenge
   Scoped to this page. Uses the site obsidian tokens from css/style.css. */

.et-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4.5rem;
  color: var(--text);
}

.et-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.5rem 0 1.25rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.et-crumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.et-crumb a:hover {
  color: var(--primary-soft);
}

.et-hero {
  max-width: 42rem;
  margin-bottom: 1.25rem;
}

.et-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--primary-soft);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.et-hero h1,
.et-prose h2,
.et-faq h2,
.et-related h2,
.et-card-title,
.et-translate h2,
.et-translate h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-brand), Georgia, serif;
  font-weight: 600;
}

.et-hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.et-hero p,
.et-prose p,
.et-faq p,
.et-hint,
.et-lead,
.et-note,
.et-share,
.et-streak-line {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.et-hero p {
  margin: 0 0 0.9rem;
}

.et-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.et-steps li {
  margin: 0;
  padding: 0.75rem 0.8rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.et-steps strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--text);
}

.et-client {
  margin: 1.25rem 0 2rem;
}

.et-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.et-tab {
  min-height: 44px;
  padding: 0.55rem 1rem;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
}

.et-tab[aria-selected='true'] {
  color: var(--primary-ink);
  background: var(--primary);
  border-color: var(--primary);
}

.et-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 1rem;
  margin-bottom: 0.75rem;
}

.et-status p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

#et-progress,
#et-points {
  color: var(--text);
  font-weight: 650;
}

#et-points,
#et-streak {
  text-align: right;
}

.et-meter {
  grid-column: 1 / -1;
  height: 6px;
  margin-top: 0.35rem;
  overflow: hidden;
  background: var(--bg-elevated);
  border-radius: 999px;
}

.et-meter-fill {
  width: 0;
  height: 100%;
  background: var(--primary);
  transition: width 160ms ease;
}

.et-card,
.et-translate {
  min-height: 280px;
  padding: 1.25rem 1.2rem 1.15rem;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(239, 68, 68, 0.16), transparent 42%), var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.et-card.is-fresh {
  animation: et-in 180ms ease;
}

.et-card.is-correct {
  border-color: #86efac;
}

.et-card.is-miss {
  border-color: var(--primary-soft);
}

.et-kicker {
  margin: 0 0 0.4rem;
  color: var(--primary-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.et-card-title {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.15;
}

.et-lead,
.et-note,
.et-share,
.et-streak-line,
.et-hint-text {
  margin: 0.35rem 0 0.85rem;
}

.et-puzzle {
  margin: 0.4rem 0 0.2rem;
  padding: 0.85rem 0.6rem;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.et-emoji {
  margin: 0;
  font-size: clamp(3rem, 11vw, 5.4rem);
  line-height: 1.2;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

.et-hint-text {
  min-height: 1.4em;
  color: var(--text);
  font-weight: 650;
}

.et-form {
  margin: 0;
}

.et-guess-label {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 650;
}

.et-guess,
.et-source {
  width: 100%;
  margin: 0.35rem 0 0.8rem;
  padding: 0.7rem 0.8rem;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
}

.et-guess.is-wrong {
  border-color: var(--primary-soft);
}

.et-source {
  min-height: 7.5rem;
  resize: vertical;
}

.et-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.2rem 0 0.85rem;
}

.et-primary,
.et-secondary,
.et-text-button,
.et-tab {
  min-height: 44px;
}

.et-primary,
.et-secondary,
.et-text-button {
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-weight: 650;
  border-radius: 999px;
  cursor: pointer;
}

.et-secondary,
.et-text-button {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
}

.et-primary {
  color: var(--primary-ink);
  background: var(--primary);
  border: 1px solid var(--primary);
}

.et-primary:hover,
.et-secondary:hover,
.et-text-button:hover,
.et-tab:hover {
  border-color: var(--primary-soft);
}

.et-text-button {
  margin-top: 0.2rem;
  padding-inline: 0.2rem;
  color: var(--text-muted);
  border-color: transparent;
  border-radius: 8px;
}

.et-judgement {
  margin: 0.2rem 0 0.7rem;
  color: var(--text);
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 700;
  line-height: 1.25;
}

.et-score-num {
  margin: 0.2rem 0;
  color: var(--text);
  font-family: var(--font-brand), Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 0.95;
}

.et-rank-name {
  margin: 0 0 0.6rem;
  color: var(--primary-soft);
  font-weight: 700;
}

.et-share {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.et-output {
  min-height: 4.5rem;
  margin: 0.2rem 0 0.9rem;
  padding: 0.9rem 0.8rem;
  color: var(--text);
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
  background: var(--bg-elevated);
  border-radius: 14px;
}

.et-review {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.et-review li {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}

.et-review-title {
  color: var(--text);
  font-weight: 650;
}

.et-review-detail {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.et-tab:focus-visible,
.et-primary:focus-visible,
.et-secondary:focus-visible,
.et-text-button:focus-visible,
.et-guess:focus-visible,
.et-source:focus-visible,
.et-card-title:focus-visible,
.et-judgement:focus-visible {
  outline: 2px solid var(--primary-soft);
  outline-offset: 3px;
}

.et-prose,
.et-faq,
.et-related {
  max-width: 42rem;
  margin: 2rem 0;
}

.et-prose h3 {
  margin: 1.4rem 0 0.4rem;
  font-family: var(--font-brand), Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.et-prose a,
.et-faq a {
  color: var(--primary-soft);
}

.et-faq details {
  border-top: 1px solid var(--border);
}

.et-faq summary {
  padding: 0.85rem 0;
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
}

.et-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.et-related-grid a {
  display: block;
  padding: 0.9rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.et-related-grid a:hover {
  border-color: var(--primary-soft);
}

.et-related-grid strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.et-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes et-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 700px) {
  .et-page {
    padding: 1rem 0.9rem 4rem;
  }

  .et-steps,
  .et-related-grid {
    grid-template-columns: 1fr;
  }

  .et-status {
    grid-template-columns: 1fr;
  }

  #et-points,
  #et-streak {
    text-align: left;
  }

  .et-card,
  .et-translate {
    padding: 1rem 0.9rem;
  }

  .et-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .et-card,
  .et-card.is-fresh,
  .et-meter-fill,
  .et-primary,
  .et-secondary,
  .et-tab {
    animation: none;
    transition: none;
  }
}
