@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --paper: #f1f5f9;
  --paper-soft: #ffffff;
  --paper-deep: #dbe4ee;
  --ink: #1f2320;
  --muted: #626457;
  --line: rgba(31, 35, 32, 0.12);
  --line-strong: rgba(31, 35, 32, 0.22);
  --accent: #556271;
  --card: rgba(255, 255, 255, 0.82);
  --shadow: 0 6px 18px rgba(50, 43, 30, 0.04);
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --shell: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-ready .main-flow > * {
  animation: rise-in 680ms ease both;
}

body.is-ready .main-flow > *:nth-child(2) {
  animation-delay: 90ms;
}

body.is-ready .main-flow > *:nth-child(3) {
  animation-delay: 160ms;
}

body.is-ready .main-flow > *:nth-child(4) {
  animation-delay: 230ms;
}

body.is-ready .main-flow > *:nth-child(5),
body.is-ready .main-flow > *:nth-child(n + 6) {
  animation-delay: 300ms;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.55), transparent 30%),
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.35), transparent 20%);
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}

body > * {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  display: block;
}

code {
  padding: 0.1rem 0.38rem;
  border-radius: 999px;
  background: rgba(31, 35, 32, 0.06);
  font-size: 0.95em;
}

.shell {
  width: min(calc(100% - 2.2rem), var(--shell));
  margin: 0 auto;
}

.site-header {
  background: transparent;
  border-bottom: 1px solid rgba(31, 35, 32, 0.08);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand,
.top-nav a,
.site-footer a {
  text-decoration: none;
  color: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  font-family: "Fraunces", serif;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform 180ms ease;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  transform-origin: center;
  transition: transform 220ms ease;
}

.top-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.top-nav a {
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.97rem;
  font-weight: 500;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.top-nav a.is-active,
.top-nav a:hover,
.top-nav a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
  background: rgba(31, 35, 32, 0.05);
  outline: none;
}

.brand:hover,
.brand:focus-visible {
  transform: translateY(-1px);
}

.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  transform: rotate(-8deg) scale(1.04);
}

.top-nav a:hover,
.top-nav a:focus-visible {
  transform: translateY(-1px);
}

.main-flow {
  padding: 2.4rem 0 4.5rem;
  display: grid;
  gap: 3.2rem;
}

.hero-card,
.filter-panel,
.results-meta,
.cta-panel,
.detail-panel,
.feature-panel,
.category-card,
.word-card,
.note-card {
  box-shadow: none;
}

.hero-card,
.filter-panel,
.results-meta,
.cta-panel {
  background: transparent;
  border: none;
  border-radius: 0;
}

.hero-card {
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.8fr);
  gap: 2.6rem;
  align-items: start;
}

.hero-card-compact {
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.75fr);
}

.hero-card.hero-card-single,
.hero-card-compact.hero-card-single {
  grid-template-columns: minmax(0, 1fr);
}

body.is-word-entry .main-flow {
  gap: 1.6rem;
}

body.is-word-entry .hero-card.hero-card-single {
  margin-bottom: 0.45rem;
}

body.is-word-entry .hero-card-single .hero-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(1.8rem, 4vw, 3rem);
  border: 1px solid color-mix(in srgb, var(--page-accent, #ffd166) 34%, rgba(31, 35, 32, 0.12));
  border-radius: calc(var(--radius-xl) + 4px);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--page-accent, #ffd166) 28%, white 72%), transparent 28%),
    linear-gradient(150deg, color-mix(in srgb, var(--page-accent, #ffd166) 20%, white 80%), rgba(255, 255, 255, 0.96) 48%, color-mix(in srgb, var(--page-accent, #ffd166) 8%, white 92%));
  box-shadow:
    0 18px 50px rgba(31, 35, 32, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.is-word-entry .hero-card-single .hero-copy::before,
body.is-word-entry .hero-card-single .hero-copy::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

body.is-word-entry .hero-card-single .hero-copy::before {
  right: -4.5rem;
  top: -4rem;
  width: 13rem;
  height: 13rem;
  background: color-mix(in srgb, var(--page-accent, #ffd166) 30%, white 70%);
  opacity: 0.5;
}

body.is-word-entry .hero-card-single .hero-copy::after {
  left: -2rem;
  bottom: -2.5rem;
  width: 9rem;
  height: 9rem;
  background: color-mix(in srgb, var(--page-accent, #ffd166) 16%, white 84%);
  opacity: 0.7;
}

.home-hero {
  align-items: end;
}

.home-hero .hero-notes {
  justify-self: end;
  width: min(100%, 360px);
}

.hero-copy,
.hero-card .hero-copy {
  padding: 0;
}

.hero-copy h1,
.split-section h2,
.section-heading h2,
.feature-panel h3,
.category-card h3,
.word-card h3,
.cta-panel h2,
.detail-panel h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(3.2rem, 6vw, 6.2rem);
  line-height: 0.92;
}

.wide-copy h1 {
  max-width: 13ch;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
}

.eyebrow,
.section-label,
.note-label {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.intro,
.section-text p,
.feature-panel p,
.category-card p,
.word-card p,
.note-card p,
.results-meta p,
.cta-panel p,
.detail-panel p,
.link-list {
  color: var(--muted);
  line-height: 1.78;
}

.hero-copy .intro {
  max-width: 60ch;
  margin-top: 1.2rem;
  font-size: 1.05rem;
}

body.is-word-entry .hero-copy .intro {
  position: relative;
  z-index: 1;
  max-width: 58ch;
  margin-top: 1.4rem;
  font-size: 1.16rem;
  line-height: 1.9;
  color: color-mix(in srgb, var(--ink) 78%, var(--page-accent, #ffd166) 22%);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.74rem 1.05rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button-primary {
  color: var(--paper-soft);
  background: #252a27;
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(31, 35, 32, 0.08);
  outline: none;
}

.hero-notes,
.feature-grid,
.category-grid,
.word-preview-grid,
.word-grid,
.detail-grid,
.related-grid {
  display: grid;
  gap: 1rem;
}

.hero-notes,
.hero-notes-compact {
  gap: 0.9rem;
}

.note-card,
.feature-panel,
.category-card,
.word-card,
.detail-panel {
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.68);
}

.note-card {
  background: rgba(255, 255, 255, 0.82);
}

.note-card-accent {
  background: rgba(255, 255, 255, 0.94);
}

.random-word-card {
  min-height: 500px;
  padding: 1.6rem;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--card-accent, #ffd166) 86%, white 14%), color-mix(in srgb, var(--card-accent, #ffd166) 58%, white 42%));
  border-color: rgba(31, 35, 32, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.random-word-card strong {
  margin-top: 0.25rem;
  font-size: clamp(2.5rem, 4.2vw, 3.95rem) !important;
  line-height: 0.82;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.random-word-card strong .card-link {
  font-size: inherit;
  line-height: inherit;
}

.random-word-card p {
  margin: 0.85rem 0 0;
  color: rgba(31, 35, 32, 0.82);
}

.random-word-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.random-word-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.note-card-tilt {
  transform: rotate(-0.8deg);
}

.note-card strong {
  display: block;
  margin-bottom: 0.28rem;
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--ink);
}

.split-section,
.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.2rem 2rem;
  align-items: start;
  padding-top: 2rem;
  border-top: 1px solid rgba(31, 35, 32, 0.1);
}

.section-heading {
  max-width: 54rem;
}

.feature-grid,
.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.resource-card {
  display: grid;
  gap: 1rem;
  min-height: 220px;
  padding: 1.45rem 1.35rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.resource-card:hover,
.resource-card:focus-within {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.resource-card h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.resource-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.section-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.jump-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.jump-chip:hover,
.jump-chip:focus-visible {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  transform: translateY(-1px);
  outline: none;
}

.share-fallback {
  display: inline-grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  justify-items: start;
  width: fit-content;
  max-width: 100%;
}

.share-fallback[hidden] {
  display: none;
}

.share-fallback-title {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.share-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.share-fallback-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.share-fallback-button:hover,
.share-fallback-button:focus-visible {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  outline: none;
}

.resources-page .section-heading {
  margin-bottom: 1.75rem;
}

.resources-page .split-section {
  margin-bottom: 0.8rem;
}

.resources-page .resource-grid {
  margin-top: 0.4rem;
}

.resources-page .resource-card:nth-child(6n + 1) {
  background: linear-gradient(180deg, rgba(255, 216, 228, 0.92), rgba(255, 255, 255, 0.9));
}

.resources-page .resource-card:nth-child(6n + 2) {
  background: linear-gradient(180deg, rgba(255, 238, 188, 0.92), rgba(255, 255, 255, 0.9));
}

.resources-page .resource-card:nth-child(6n + 3) {
  background: linear-gradient(180deg, rgba(203, 244, 239, 0.92), rgba(255, 255, 255, 0.9));
}

.resources-page .resource-card:nth-child(6n + 4) {
  background: linear-gradient(180deg, rgba(221, 231, 255, 0.92), rgba(255, 255, 255, 0.9));
}

.resources-page .resource-card:nth-child(6n + 5) {
  background: linear-gradient(180deg, rgba(239, 220, 250, 0.92), rgba(255, 255, 255, 0.9));
}

.resources-page .resource-card:nth-child(6n + 6) {
  background: linear-gradient(180deg, rgba(221, 243, 198, 0.92), rgba(255, 255, 255, 0.9));
}

.resources-page .resource-card:hover,
.resources-page .resource-card:focus-within {
  background: rgba(255, 255, 255, 0.97);
}

.resources-page .section-jump-nav {
  margin-bottom: 1.2rem;
}

.feature-panel,
.category-card,
.word-card,
.detail-panel {
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

body.is-word-entry .detail-grid,
body.is-word-entry .word-content-grid,
body.is-word-entry .related-grid {
  gap: 1.35rem;
}

body.is-word-entry .detail-panel {
  padding: 1.45rem 1.45rem 1.35rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86));
  box-shadow:
    0 10px 28px rgba(31, 35, 32, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.feature-panel:hover,
.category-card:hover,
.word-card:hover,
.detail-panel:hover {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.category-card h3,
.word-card h3,
.feature-panel h3 {
  font-size: 1.22rem;
}

.category-card p {
  margin: 0.68rem 0 0;
  font-weight: 500;
}

.categories-section .category-card {
  min-height: 188px;
  padding: 0;
  display: flex;
}

.category-accent-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card-accent, #ffd166) 34%, white 66%), color-mix(in srgb, var(--card-accent, #ffd166) 16%, white 84%));
  border-color: color-mix(in srgb, var(--card-accent, #ffd166) 38%, rgba(31, 35, 32, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.categories-section .category-card h3 {
  margin: 0;
  width: 100%;
  display: flex;
}

.categories-section .category-card .card-link {
  width: 100%;
  min-height: 188px;
  padding: 1.5rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.has-page-accent .eyebrow,
body.has-page-accent .section-label,
body.has-page-accent .note-label,
body.has-page-accent .category-word-grid .word-category,
body.has-page-accent .category-word-grid .word-meta strong,
body.has-page-accent .meta-list dt {
  color: color-mix(in srgb, var(--page-accent, #ffd166) 45%, #39414d 55%);
}

body.has-page-accent .detail-panel,
body.has-page-accent .feature-panel,
body.has-page-accent .note-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--page-accent, #ffd166) 10%, white 90%), rgba(255, 255, 255, 0.82));
  border-color: color-mix(in srgb, var(--page-accent, #ffd166) 32%, rgba(31, 35, 32, 0.12));
}

body.has-page-accent.is-word-entry .hero-card-single .hero-copy {
  border-color: color-mix(in srgb, var(--page-accent, #ffd166) 40%, rgba(31, 35, 32, 0.12));
}

body.has-page-accent.is-word-entry .detail-panel {
  border-color: color-mix(in srgb, var(--page-accent, #ffd166) 34%, rgba(31, 35, 32, 0.12));
}

body.has-page-accent.is-word-entry .detail-grid .detail-panel:nth-child(1),
body.has-page-accent.is-word-entry .word-content-grid .detail-panel:nth-child(1) {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--page-accent, #ffd166) 15%, white 85%), rgba(255, 255, 255, 0.9));
}

body.has-page-accent.is-word-entry .detail-grid .detail-panel:nth-child(2),
body.has-page-accent.is-word-entry .word-content-grid .detail-panel:nth-child(2) {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--page-accent, #ffd166) 7%, white 93%), rgba(255, 255, 255, 0.96));
}

body.has-page-accent .category-word-grid .word-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--page-accent, #ffd166) 16%, white 84%), color-mix(in srgb, var(--page-accent, #ffd166) 6%, white 94%));
  border-color: color-mix(in srgb, var(--page-accent, #ffd166) 32%, rgba(31, 35, 32, 0.12));
}

body.has-page-accent .badge-letter,
body.has-page-accent .category-word-grid .tag-chip {
  background: color-mix(in srgb, var(--page-accent, #ffd166) 24%, white 76%);
  color: #39414d;
}

.filter-panel {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0.78rem 0.92rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
}

.results-meta {
  padding: 0.1rem 0 0;
}

.results-meta p {
  margin: 0;
  font-weight: 600;
}

.word-grid,
.word-preview-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.home-random-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.word-browser {
  display: grid;
  gap: 2rem;
}

.word-letter-group {
  display: grid;
  gap: 1rem;
  animation: rise-in 420ms ease both;
}

.word-letter-heading {
  margin: 0;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
  font-family: "Fraunces", serif;
  font-size: clamp(1.7rem, 2vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.word-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem 1.25rem;
}

.word-link {
  color: var(--muted);
  text-decoration: none;
  line-height: 1.7;
  transition: color 180ms ease, transform 180ms ease;
}

.word-link:hover,
.word-link:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  outline: none;
  transform: translateX(4px);
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.word-card:nth-child(3n) {
  transform: rotate(-0.2deg);
}

.word-card:nth-child(4n) {
  transform: rotate(0.24deg);
}

.word-card:nth-child(3n):hover,
.word-card:nth-child(4n):hover {
  transform: translateY(-1px) rotate(0deg);
}

.category-word-grid .word-card {
  min-height: 250px;
  padding: 1.2rem 1.2rem 1.1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.8));
}

.home-random-grid .word-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card-accent, #ffd166) 24%, white 76%), color-mix(in srgb, var(--card-accent, #ffd166) 10%, white 90%));
  border-color: color-mix(in srgb, var(--card-accent, #ffd166) 38%, rgba(31, 35, 32, 0.12));
}

.category-word-grid .word-top {
  margin-bottom: 0.55rem;
  justify-content: flex-end;
}

.category-word-grid .badge-rank {
  display: none;
}

.category-word-grid .word-card h3 {
  margin-top: 0.3rem;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.category-word-grid .word-card .card-link {
  text-decoration: none;
}

.category-word-grid .word-category {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}

.category-word-grid .word-category .inline-link {
  text-decoration: none;
}

.category-word-grid .word-meta {
  margin-top: 0.55rem;
  font-size: 0.94rem;
  color: var(--muted);
}

.category-word-grid .word-meta strong {
  display: inline-block;
  min-width: 4.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.category-word-grid .tag-row {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(31, 35, 32, 0.08);
}

.category-word-grid .tag-chip {
  min-height: 26px;
  padding: 0.24rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(85, 98, 113, 0.08);
  color: #556271;
}

.word-top,
.tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.word-top {
  margin-bottom: 0.75rem;
}

.badge,
.tag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.32rem 0.68rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-rank,
.badge-letter,
.tag-chip {
  background: rgba(31, 35, 32, 0.05);
  color: #4c4f44;
}

.badge-rank {
  display: none;
}

.word-category {
  margin: 0.52rem 0 0;
  color: #4f544a;
  font-weight: 700;
}

.word-meta {
  margin: 0.36rem 0 0;
}

.tag-row {
  margin-top: 0.85rem;
  justify-content: flex-start;
}

.card-link,
.inline-link {
  color: inherit;
  text-decoration: none;
}

.card-link:hover,
.card-link:focus-visible,
.inline-link:hover,
.inline-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.alpha-card {
  text-align: center;
}

.alpha-card h3 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.alpha-card .card-link {
  display: inline-block;
  line-height: 1;
}

.meta-list {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.meta-list div {
  display: grid;
  gap: 0.18rem;
}

.meta-list dt {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
}

.meta-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

body.is-word-entry .meta-list {
  gap: 1rem;
}

body.is-word-entry .meta-list div {
  gap: 0.28rem;
}

body.is-word-entry .meta-list dd {
  font-size: 1.02rem;
  line-height: 1.55;
}

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

.word-detail-stack {
  display: grid;
  gap: 0.9rem;
}

.word-subheading {
  margin: 0 0 0.75rem;
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
}

body.is-word-entry .word-subheading {
  margin-bottom: 1rem;
  font-size: clamp(1.85rem, 2.8vw, 2.5rem);
  line-height: 1.02;
}

.word-richtext p {
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

body.is-word-entry .word-richtext p {
  font-size: 1.03rem;
  line-height: 1.95;
}

.word-list,
.faq-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.word-list li,
.faq-list li {
  margin: 0.45rem 0 0;
  line-height: 1.72;
}

body.is-word-entry .word-list li,
body.is-word-entry .faq-list li {
  margin-top: 0.72rem;
  padding-left: 0.15rem;
  font-size: 1.01rem;
  line-height: 1.9;
}

.faq-list strong {
  color: var(--ink);
}

body.is-word-entry .faq-list strong {
  display: block;
  margin-bottom: 0.28rem;
  font-family: "Fraunces", serif;
  font-size: 1.12rem;
  font-weight: 500;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

body.is-word-entry .chip-grid {
  gap: 0.75rem;
}

.related-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

body.is-word-entry .related-chip {
  min-height: 42px;
  padding: 0.58rem 0.95rem;
  background: color-mix(in srgb, var(--page-accent, #ffd166) 15%, white 85%);
  border-color: color-mix(in srgb, var(--page-accent, #ffd166) 36%, rgba(31, 35, 32, 0.12));
  font-size: 0.96rem;
}

.related-chip:hover,
.related-chip:focus-visible {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line-strong);
  outline: none;
}

.related-chip.is-static {
  color: var(--muted);
}

.bottom-nav-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.bottom-nav-card {
  display: grid;
  gap: 0.45rem;
}

body.is-word-entry .bottom-nav-card {
  min-height: 138px;
  padding: 1rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--page-accent, #ffd166) 32%, rgba(31, 35, 32, 0.12));
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--page-accent, #ffd166) 12%, white 88%), rgba(255, 255, 255, 0.96));
  align-content: start;
}

.bottom-nav-card span {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bottom-nav-card a {
  color: var(--ink);
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  line-height: 1.05;
  text-decoration: none;
}

body.is-word-entry .bottom-nav-card a {
  font-size: clamp(1.3rem, 2vw, 1.55rem);
}

.bottom-nav-card a:hover,
.bottom-nav-card a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  outline: none;
}

.link-list {
  margin: 0;
  padding-left: 1.1rem;
}

.site-footer {
  border-top: 1px solid rgba(31, 35, 32, 0.08);
  background: transparent;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.footer-inner {
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.footer-links a {
  color: var(--muted);
}

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

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(0, -12px, 0) scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 860px) {
  .hero-card,
  .hero-card-compact,
  .split-section,
  .cta-panel,
  .filter-panel,
  .detail-grid,
  .related-grid,
  .word-content-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-flow {
    padding-top: 1.2rem;
    gap: 2.4rem;
  }

  .hero-copy h1,
  .wide-copy h1 {
    max-width: none;
    font-size: clamp(2.5rem, 11vw, 4.4rem);
  }

  .word-link-grid,
  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .word-link-grid {
    grid-template-columns: 1fr;
  }
}
