:root {
  color-scheme: light;
  --bg: #f6f9ff;
  --ink: #17243a;
  --muted: #60708a;
  --panel: #ffffff;
  --line: #d7e2f3;
  --accent: #2563eb;
  --accent-dark: #1746a2;
  --navy: #0d2341;
  --warm: #f5b84b;
  --soft: #edf4ff;
  --shadow: 0 18px 45px rgba(26, 54, 93, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

/*
 * The UA stylesheet's `[hidden] { display: none }` is beaten by any author-origin
 * display rule, so `.options { display: grid }` kept the panel visible no matter
 * what the toggle set. Make the attribute authoritative.
 */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 52px);
  background: rgba(246, 249, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 6px;
  border-radius: 10px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.78), rgba(125, 132, 139, 0.22)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 1px, rgba(40, 46, 51, 0.04) 1px 3px),
    #d9d7cf;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.86),
    inset 0 -1px 2px rgba(40, 45, 49, 0.16),
    0 5px 14px rgba(26, 54, 93, 0.16);
  color: #232a2e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 0.84;
}

.brand-mark::before {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  border: 2px solid currentColor;
  content: "";
}

.brand-mark span {
  grid-area: 1 / 1;
  z-index: 1;
}

.brand-mark span:first-child {
  align-self: center;
  margin-bottom: 0.86em;
}

.brand-mark span:last-child {
  align-self: center;
  margin-top: 0.86em;
}

.hero-title-lockup {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  margin-bottom: 18px;
}

.hero-title-lockup h1 {
  margin-bottom: 0;
}

.hero-mark {
  flex: 0 0 auto;
  width: clamp(86px, 12vw, 118px);
  height: clamp(86px, 12vw, 118px);
  padding: clamp(15px, 1.9vw, 20px);
  border-radius: clamp(18px, 2.4vw, 24px);
  font-size: clamp(1.6rem, 3.4vw, 2.45rem);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.9),
    inset 0 -2px 5px rgba(40, 45, 49, 0.2),
    0 22px 48px rgba(1, 12, 27, 0.36);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 8px 10px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent-dark);
}

.menu-button {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  content: "";
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: -5px;
}

.menu-icon::after {
  top: 5px;
}

.hero {
  padding: clamp(34px, 6vw, 68px) clamp(16px, 4vw, 52px) clamp(34px, 5vw, 58px);
  background:
    radial-gradient(circle at 18% 10%, rgba(111, 163, 255, 0.26), transparent 34%),
    linear-gradient(135deg, #0d2341 0%, #153c73 54%, #1f5ed7 100%);
  color: #f8fbff;
}

.hero-inner,
.section-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(340px, 0.85fr);
  align-items: center;
  gap: clamp(24px, 6vw, 74px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 5.4vw, 4.85rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
}

h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.intro {
  max-width: 54ch;
  color: #40506b;
  font-size: 1.1rem;
}

.hero .eyebrow {
  color: #b7d3ff;
}

.hero .intro {
  max-width: 46ch;
  color: #dce9ff;
}

.solver-panel {
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid rgba(215, 226, 243, 0.9);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 58px rgba(1, 12, 27, 0.28);
}

.field-label,
.option-field label {
  display: grid;
  gap: 7px;
  color: #263a5e;
  font-size: 0.92rem;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c7d6ec;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.field-help {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.primary-button,
.options-toggle {
  min-height: 46px;
  border: 0;
  border-radius: 7px;
  font-weight: 800;
}

.primary-button {
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.options-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.option-field {
  display: grid;
  gap: 7px;
}

.results-section,
.content-band,
.uses-section,
.examples-section {
  padding: clamp(32px, 5vw, 58px) clamp(16px, 4vw, 52px);
}

.faq-section {
  padding: clamp(32px, 5vw, 58px) clamp(16px, 4vw, 52px);
  background: #fff;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading p {
  max-width: 52ch;
  margin-bottom: 0;
  color: var(--muted);
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: underline;
}

.results {
  display: grid;
  gap: 14px;
}

.results.empty {
  padding: 22px;
  border: 1px dashed #b7c7df;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.word-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.word-list button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #c9d7eb;
  border-radius: 7px;
  background: #f8fbff;
  color: var(--ink);
  font-weight: 750;
}

.word-list button:hover {
  border-color: var(--accent);
  background: var(--soft);
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 6vw, 80px);
}

.content-band {
  background: #10284a;
  color: #f8fbff;
}

.content-band p {
  color: #d8e7ff;
}

.uses-section {
  background: #fff;
}

.uses-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.uses-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.uses-grid p {
  color: var(--muted);
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.faq-grid article {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.faq-grid p {
  color: var(--muted);
}

.example-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.example-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 25px rgba(26, 54, 93, 0.12);
}

.example-card span {
  font-size: 1.45rem;
  font-weight: 850;
}

.example-card small {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  padding: 24px clamp(16px, 4vw, 52px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent-dark);
  font-weight: 800;
}

.privacy-page {
  padding: clamp(42px, 7vw, 82px) clamp(16px, 4vw, 52px);
}

.prose {
  max-width: 760px;
}

.prose h1 {
  margin-bottom: 20px;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
}

.prose h2 {
  margin-top: 34px;
}

.prose p {
  color: #40506b;
  font-size: 1.03rem;
}

@media (max-width: 1040px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .solver-panel {
    width: min(680px, 100%);
  }

  .examples-grid,
  .uses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .menu-button {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.always-visible {
    display: flex;
    flex-basis: auto;
    align-items: flex-end;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 10px 0;
  }

  .hero-inner,
  .two-column,
  .examples-grid,
  .faq-grid,
  .uses-grid,
  .options {
    grid-template-columns: 1fr;
  }

  .hero-title-lockup {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-row {
    grid-template-columns: 1fr;
  }
}

/* Generated word-list pages */

.word-page-hero {
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 52px);
  background:
    radial-gradient(circle at 18% 10%, rgba(111, 163, 255, 0.26), transparent 34%),
    linear-gradient(135deg, #0d2341 0%, #153c73 54%, #1f5ed7 100%);
  color: #f8fbff;
}

.word-page-hero h1 {
  margin: 12px 0 14px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.word-page-hero .intro {
  max-width: 70ch;
  color: #dce9ff;
}

.word-page-hero .primary-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.breadcrumb {
  color: #c2d8ff;
  font-size: 0.85rem;
}

.breadcrumb a {
  color: inherit;
}

.breadcrumb span {
  margin: 0 4px;
}

.related-grid {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 8px 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  list-style: none;
}

.related-grid li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(35, 42, 46, 0.12);
}

.related-grid a {
  color: var(--accent-dark);
}

.related-grid.counted span {
  flex: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

/* These lists sit inside the dark content band, so they invert. */
.content-band .related-grid li {
  border-bottom-color: rgba(216, 231, 255, 0.22);
}

.content-band .related-grid a {
  color: #cfe1ff;
}

.content-band .related-grid a:hover {
  color: #fff;
}

.content-band .related-grid.counted span {
  color: #9fb8dd;
}

@media (max-width: 720px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}
