:root {
  /* Color Two (id: color-two) Cool Light Fog trial — see src/styles/palettes/color-two.css
     Color One preserved in color-one.css / color-one.json */
  --mist-0: #eef1f4;
  --mist-1: #e8ebef;
  --mist-2: #e2e7ed;
  --mist-gradient: linear-gradient(165deg, var(--mist-0) 0%, var(--mist-1) 45%, var(--mist-2) 100%);
  --bg: var(--mist-0);
  --pan-dark: #2a2e33;
  --ink: var(--pan-dark);
  --muted: #6a737c;
  --card: #ffffff;
  --accent: #b85a3a;
  --accent-hover: #943f28;
  --line: #d5dde8;
  /* Radii: panel 12 · control 10 · pill 999 (CTAs / answer chips only) */
  --radius-panel: 12px;
  --radius-control: 10px;
  --radius-pill: 999px;
  --radius: var(--radius-panel);
  font-family: "Open Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  /* Cool light fog — Color Two trial (site-wide) */
  background: var(--mist-gradient);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }

.site-header {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.65rem 0.35rem 0.55rem;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg, rgba(255, 255, 255, 0.88));
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 1rem;
  color: var(--pan-dark, #2a2e33);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand__logo {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.brand__name {
  /* Logo carries brand on phones — avoid “Wordscape…” collision with nav */
  display: none;
  line-height: 1.15;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.site-header nav::-webkit-scrollbar {
  display: none;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 2.75rem; /* ≥44px tap target */
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-control);
  white-space: nowrap;
}

.site-header__home {
  justify-content: center;
  padding-inline: 0.55rem;
}

.site-header__home svg {
  display: block;
}

@media (min-width: 640px) {
  .site-header {
    gap: 1rem;
    padding: 0.65rem 1.1rem;
  }

  .brand {
    gap: 0.5rem;
    font-size: 1.2rem;
  }

  .brand__logo {
    width: 64px;
    height: 64px;
  }

  .brand__name {
    display: inline;
  }

  .site-header nav {
    flex: 0 1 auto;
    gap: 0.2rem;
    overflow-x: visible;
  }

  .site-header nav a {
    padding: 0.45rem 0.55rem;
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .site-header {
    padding: 1rem 1.25rem;
  }

  .brand {
    font-size: 1.35rem;
  }

  .brand__logo {
    width: 80px;
    height: 80px;
  }
}

.site-main {
  width: min(960px, 100% - 2rem);
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  padding: 1.35rem 1.25rem 1.75rem;
  margin-top: auto;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.site-footer__nav a {
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.site-footer__nav a:hover {
  text-decoration: underline;
}

.site-footer__note {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  max-width: 36rem;
  margin-inline: auto;
}

.site-footer__note a {
  color: var(--accent, #b85a3a);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__note a:hover {
  color: var(--accent-hover, #943f28);
}

h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  color: var(--pan-dark, #2a2e33);
}

.lede { color: var(--muted); margin: 0 0 1.5rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel, 12px);
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent, #b85a3a) 40%, var(--line, #d5dde8));
  transform: translateY(-1px);
}

.card strong { display: block; margin-bottom: 0.2rem; }
.card span { color: var(--muted); font-size: 0.9rem; }

.letters {
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 1.15rem;
  margin: 0.75rem 0 1.25rem;
  color: var(--muted, #6a737c);
}

.word-block { margin-bottom: 1.25rem; }
.word-block h2,
.answers-heading,
.crossword-heading {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.55rem;
  color: var(--ink, #2a2e33);
}
.crossword-heading {
  margin-top: 0.35rem;
}
.answer-length-group {
  margin-top: 0.85rem;
}
.answer-length-group:first-of-type {
  margin-top: 0.35rem;
}
.answer-length-label {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--muted, #6a737c);
}
.word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.word-list li {
  background: var(--pack-panel-soft, #f2f4f7);
  border: 1px solid var(--line, #d5dde8);
  border-radius: var(--radius-pill, 999px);
  padding: 0.2rem 0.7rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink, #2a2e33);
}

@media (max-width: 640px) {
  .word-list {
    gap: 0.45rem;
  }
  .word-list li {
    padding: 0.28rem 0.8rem;
    font-size: 1.15rem;
  }
}

.pager {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Soft-rect Fog pagers (level / pack / crossword / daily) — flat, readable on mist */
.level-nav__btn,
.pack-nav__btn,
.xw-pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  min-height: 2.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-control, 10px);
  border: 1.5px solid color-mix(in srgb, var(--pan-dark, #2a2e33) 28%, #c5ccd4);
  background: #ffffff;
  color: var(--pan-dark, #2a2e33);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: none;
  box-sizing: border-box;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

a.level-nav__btn:hover,
a.pack-nav__btn:hover,
a.xw-pager__btn:hover {
  background: var(--pack-panel-soft, #f2f4f7);
  border-color: color-mix(in srgb, var(--accent, #b85a3a) 55%, #c5ccd4);
  color: var(--accent, #b85a3a);
}

.level-nav__btn--disabled,
.pack-nav__btn--disabled {
  opacity: 0.42;
  cursor: default;
}

.level-nav__btn--spacer,
.xw-pager__btn--spacer {
  visibility: hidden;
  pointer-events: none;
}

.note {
  background: color-mix(in srgb, var(--accent, #b85a3a) 8%, #f2f4f7);
  border: 1px solid color-mix(in srgb, var(--accent, #b85a3a) 28%, #d5dde8);
  border-radius: var(--radius-panel, 12px);
  padding: 0.75rem 1rem;
  color: var(--pan-dark, #2a2e33);
  margin-bottom: 1.25rem;
}
