:root {
  --paper: #F7F5EF;
  --ink: #1A1A1A;
  --ink-soft: #4a4843;
  --ink-faint: #9b978d;
  --rule: #d8d4c8;
  --serif: "Cardo", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--paper);
  /* subtle paper texture — faint fibrous grain, never busy */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
}

.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 6vw, 3rem);
}

/* ---------- masthead ---------- */
.masthead { padding-top: 0.25rem; }

.masthead__title {
  font-weight: 400;
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  letter-spacing: 0.01em;
  color: var(--ink);
}

.masthead__rule {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--ink);
  margin-top: 1.1rem;
  opacity: 0.85;
}

/* ---------- entry ---------- */
.entry {
  align-self: center;
  max-width: 30em;
  margin: clamp(2.5rem, 7vw, 4rem) 0;
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.entry.is-swapping { animation: none; opacity: 0; transform: translateY(8px); }

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

.entry__word {
  font-weight: 400;
  font-size: clamp(3rem, 12vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.entry__meta {
  margin-top: 1.1rem;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex-wrap: wrap;
}

.entry__part { font-style: italic; }
.entry__bar { color: var(--ink-faint); font-style: normal; }
.entry__pron { font-style: normal; letter-spacing: 0.01em; }

.entry__divider {
  display: block;
  width: 64px;
  height: 1px;
  background: var(--ink);
  opacity: 0.55;
  margin: 1.9rem 0;
}

.entry__def {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 24em;
}

.entry__example {
  margin-top: 1.6rem;
  font-size: clamp(1.1rem, 2.7vw, 1.35rem);
  line-height: 1.45;
  color: var(--ink-soft);
}
.entry__example em { font-style: italic; }
.entry__example em::before { content: "\201C"; }
.entry__example em::after { content: "\201D"; }

/* ---------- footer ---------- */
.foot {
  display: flex;
  justify-content: flex-start;
}

.another {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  color: var(--ink-soft);
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 0 0 0.2rem;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.another:hover,
.another:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .entry { animation: none; opacity: 1; transform: none; }
  .entry.is-swapping { opacity: 1; transform: none; }
}
