:root {
  --yellow: #f9c61c;
  --yellow-strong: #f2b900;
  --ink: #111111;
  --muted: #67665f;
  --paper: #f7f4ec;
  --card: #ffffff;
  --line: #ddd8cc;
  --soft-yellow: #fff7d6;
  --success: #1f6f43;
  --danger: #a0322f;
  --shadow: 0 16px 42px rgba(17, 17, 17, 0.1);
  --page: 1260px;
  --line-dark: #c5bfb2;
  --radius-sm: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Inter", "Aptos Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.page-width {
  width: min(var(--page), calc(100% - 64px));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  box-shadow: 0 0 0 1px var(--ink);
}

.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 236, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1460px, calc(100% - 48px));
  min-height: 88px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: max-content;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.06em;
  box-shadow: inset 0 -3px 0 rgba(17, 17, 17, 0.08);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -0.045em;
}

.brand-copy small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.main-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 10px;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 15px;
  font-weight: 650;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--yellow);
  transform: scaleX(0);
  transition: transform 160ms ease-out;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.menu-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-close {
  display: inline-flex;
}

.hero {
  padding: 88px 0 34px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.94), rgba(247, 244, 236, 0) 52%),
    var(--paper);
}

.hero-inner {
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: #6f5a00;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 980px;
  margin: 0 auto;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.065em;
  font-weight: 850;
}

.hero-lead {
  max-width: 720px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
}

.search-card {
  position: relative;
  margin-top: 46px;
  padding: 38px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: left;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 305px);
  gap: 22px;
}

.search-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field-wrap > .icon {
  position: absolute;
  left: 26px;
  width: 30px;
  height: 30px;
  pointer-events: none;
}

.search-field-wrap input {
  width: 100%;
  height: 82px;
  padding: 0 100px 0 78px;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid #cfc9bc;
  border-radius: 13px;
  font-size: clamp(23px, 3vw, 34px);
  font-weight: 560;
  outline: none;
  appearance: none;
}

.search-field-wrap input::-webkit-search-cancel-button {
  display: none;
}

.search-field-wrap input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(249, 198, 28, 0.42);
}

.keyboard-hint {
  position: absolute;
  right: 18px;
  padding: 7px 10px;
  color: #8a867d;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  line-height: 1;
}

.primary-button,
.secondary-button,
.text-button,
.load-more {
  min-height: 44px;
  cursor: pointer;
  transition: transform 160ms ease-out, background 160ms ease-out, border-color 160ms ease-out, box-shadow 160ms ease-out;
}

.primary-button {
  height: 82px;
  padding: 0 28px;
  background: var(--yellow);
  border: 1.5px solid var(--yellow-strong);
  border-radius: 13px;
  font-size: 18px;
  font-weight: 800;
  box-shadow: inset 0 -3px 0 rgba(17, 17, 17, 0.08);
}

.primary-button:hover {
  background: #ffd332;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(155, 119, 0, 0.18), inset 0 -3px 0 rgba(17, 17, 17, 0.08);
}

.primary-button:active {
  transform: translateY(0);
}

.form-message {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.form-message.is-error {
  color: var(--danger);
  font-weight: 700;
}

.suggestion-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.suggestion-panel button {
  width: 100%;
  min-height: 46px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 0;
  border-radius: 8px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.suggestion-panel button:hover,
.suggestion-panel button[aria-selected="true"] {
  background: var(--soft-yellow);
}

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

.spotlight-grid a {
  min-height: 72px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 17px;
  font-weight: 650;
  transition: background 160ms ease-out, border-color 160ms ease-out;
}

.spotlight-grid a .icon {
  width: 19px;
  transition: transform 160ms ease-out;
}

.spotlight-grid a:hover {
  background: var(--soft-yellow);
  border-color: #c8ad46;
}

.spotlight-grid a:hover .icon {
  transform: translateX(2px);
}

.privacy-note {
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 15px;
}

.privacy-note .icon {
  width: 19px;
  height: 19px;
}

.quick-strip {
  min-height: 72px;
  margin-top: 32px;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: left;
}

.quick-strip-label {
  padding: 6px 10px;
  background: var(--yellow);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-strip > div {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 0;
}

.quick-strip a {
  min-height: 44px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

.quick-strip a + a::before {
  content: "·";
  margin-right: 28px;
  color: #8b887f;
}

.quick-strip a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.result-section {
  margin-top: 44px;
  margin-bottom: 96px;
  padding: 38px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(17, 17, 17, 0.07);
}

.result-heading,
.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.result-heading h2,
.section-heading-row h2 {
  margin: 0;
  font-size: clamp(33px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.result-heading > div:first-child > p:last-child,
.section-heading-row > p {
  max-width: 480px;
  margin: 10px 0 0;
  color: var(--muted);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.secondary-button {
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
}

.secondary-button .icon {
  width: 18px;
  height: 18px;
}

.secondary-button:hover,
.secondary-button[aria-pressed="true"] {
  background: var(--soft-yellow);
  border-color: #c5aa3d;
}

.secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f5f3ee;
  transform: none;
}

.secondary-button[aria-pressed="true"] .icon {
  fill: var(--yellow);
}

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

.quote-examples {
  margin-top: 30px;
  padding: clamp(18px, 2.2vw, 26px);
  background: #faf8f2;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.quote-examples-heading h2 {
  max-width: 760px;
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.quote-example-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.quote-example-card {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--yellow);
  border-radius: 11px;
  box-shadow: 0 7px 20px rgba(17, 17, 17, 0.045);
  overflow: hidden;
}

.quote-example-card blockquote,
.quote-example-card blockquote p {
  margin: 0;
}

.quote-example-card blockquote p {
  max-width: 760px;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  font-weight: 500;
  line-height: 1.58;
}

.quote-example-card blockquote {
  min-width: 0;
  padding: clamp(22px, 2.5vw, 30px);
  display: flex;
  align-items: center;
}

.quote-example-card blockquote p::before {
  content: "„";
}

.quote-example-card blockquote p::after {
  content: "”";
}

.quote-example-card figcaption {
  min-width: 0;
  margin: 0;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #f2efe7;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.52;
  overflow-wrap: anywhere;
}

.quote-citation p {
  margin: 0;
}

.quote-locator {
  width: fit-content;
  padding: 4px 9px;
  background: var(--yellow);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.quote-reference {
  margin-top: 10px !important;
}

.quote-reference cite {
  color: var(--ink);
  font-style: italic;
}

.quote-citation .quote-matched-form {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.sense-card {
  padding: 24px;
  background: #fdfcf9;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.sense-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sense-card-heading > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--yellow);
  border-radius: 8px;
  font-weight: 850;
}

.sense-card-heading h3 {
  margin: 0 auto 0 0;
  font-size: 18px;
}

.copy-sense {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.copy-sense:hover {
  background: var(--soft-yellow);
}

.synonym-list {
  padding-top: 17px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.synonym-chip {
  min-height: 44px;
  display: inline-flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  transition: background 150ms ease-out, border-color 150ms ease-out, transform 150ms ease-out;
}

.synonym-list > a,
.synonym-chip a {
  min-height: 44px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  font-weight: 650;
}

.synonym-chip button {
  width: 38px;
  min-height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
}

.synonym-chip button .icon {
  width: 16px;
  height: 16px;
}

.synonym-chip:hover,
.synonym-list > a:hover {
  background: var(--yellow);
  border-color: var(--yellow-strong);
  transform: translateY(-1px);
}

.synonym-chip button:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
}

.alternative-card {
  grid-column: 1 / -1;
}

.alternative-list {
  padding-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.alternative-list a {
  min-height: 54px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 680;
}

.alternative-list a:hover {
  background: var(--soft-yellow);
  border-color: #c5aa3d;
}

.alternative-list a .icon {
  width: 18px;
  height: 18px;
}

.result-disclaimer {
  margin-top: 22px;
  padding: 14px 17px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 6px 14px;
  background: var(--soft-yellow);
  border-left: 4px solid var(--yellow-strong);
  border-radius: 6px 10px 10px 6px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.result-disclaimer strong {
  white-space: normal;
}

.result-disclaimer span {
  min-width: 0;
  color: #5f5a45;
  overflow-wrap: anywhere;
}

.browse-section,
.guide-section {
  padding: 88px 0;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.alphabet {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 8px;
}

.alphabet a,
.alphabet span {
  min-height: 46px;
  padding: 8px 4px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 780;
}

.alphabet span.disabled {
  color: #9a9589;
  background: #f4f1e9;
  border-style: dashed;
  cursor: not-allowed;
}

.alphabet a:hover,
.alphabet a.active {
  background: var(--yellow);
  border-color: var(--yellow-strong);
}

.browse-results {
  margin-top: 22px;
  padding: 28px;
  background: var(--paper);
  border-radius: 13px;
}

.browse-result-heading {
  margin: 0 0 18px;
  font-size: 21px;
}

.browse-word-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 22px;
}

.browse-word-grid a {
  min-height: 44px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-weight: 620;
}

.browse-word-grid a:hover {
  text-decoration: underline;
  text-decoration-color: var(--yellow-strong);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.load-more {
  margin: 20px auto 0;
}

.library-section {
  padding-top: 92px;
  padding-bottom: 92px;
}

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

.library-card {
  min-height: 300px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 26px rgba(17, 17, 17, 0.05);
}

.library-card-title {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.library-card-title h3 {
  margin: 0;
  font-size: 22px;
}

.saved-list {
  padding: 13px 0;
  display: grid;
  gap: 4px;
}

.saved-item {
  min-height: 50px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.saved-item a {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 680;
}

.saved-item a:hover {
  text-decoration: underline;
  text-decoration-color: var(--yellow-strong);
  text-underline-offset: 4px;
}

.remove-saved {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
}

.remove-saved:hover {
  background: #f3eee4;
  color: var(--ink);
}

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

.history-controls {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.toggle-row {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 620;
}

.toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--yellow-strong);
}

.text-button {
  padding: 8px 0;
  background: transparent;
  border: 0;
  color: #765c00;
  font-weight: 750;
}

.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.guide-section {
  background: var(--ink);
  color: #fff;
}

.guide-section .section-kicker {
  color: var(--yellow);
}

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

.guide-grid article {
  min-height: 250px;
  padding: 26px;
  background: #1b1b1b;
  border: 1px solid #343434;
  border-radius: 14px;
}

.guide-grid article > span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--yellow);
  border-radius: 9px;
  color: var(--ink);
  font-weight: 850;
}

.guide-grid h3 {
  margin: 28px 0 8px;
  font-size: 23px;
}

.guide-grid p {
  margin: 0;
  color: #c8c8c8;
}

.site-footer {
  padding: 72px 0 26px;
  background: #0a0a0a;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 64px;
}

.brand-inverse .brand-copy small {
  color: #aaa;
}

.footer-brand p {
  max-width: 460px;
  margin: 22px 0 0;
  color: #b9b9b9;
}

.footer-grid h2 {
  margin: 0 0 18px;
  color: var(--yellow);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-grid > div:not(:first-child) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.footer-grid > div:not(:first-child) a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  color: #d8d8d8;
}

.footer-grid a:hover {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-underline-offset: 4px;
}

.footer-bottom {
  margin-top: 54px;
  padding-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  border-top: 1px solid #2d2d2d;
  color: #929292;
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

.toast {
  position: fixed;
  z-index: 300;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100% - 44px));
  padding: 13px 17px;
  background: var(--ink);
  color: #fff;
  border: 1px solid #444;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-weight: 680;
}

.noscript-note {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 400;
  padding: 16px;
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  text-align: center;
  font-weight: 750;
}

@media (max-width: 1080px) {
  .main-nav {
    gap: 0;
  }

  .main-nav a {
    padding-inline: 10px;
    font-size: 14px;
  }

  .main-nav a::after {
    left: 10px;
    right: 10px;
  }

  .search-form {
    grid-template-columns: minmax(0, 1fr) 250px;
  }

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

  .alphabet {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .page-width {
    width: min(100% - 36px, var(--page));
  }

  .header-inner {
    width: min(100% - 28px, 1460px);
    min-height: 74px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    font-size: 21px;
  }

  .brand-copy strong {
    font-size: 22px;
  }

  .brand-copy small {
    font-size: 12px;
  }

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

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 10px 18px 18px;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.1);
  }

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

  .main-nav a {
    min-height: 52px;
    padding: 0 12px;
    border-radius: 8px;
  }

  .main-nav a:hover,
  .main-nav a.active {
    background: var(--soft-yellow);
  }

  .main-nav a::after {
    display: none;
  }

  .hero {
    padding-top: 62px;
  }

  .search-card {
    padding: 24px;
  }

  .search-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .primary-button {
    width: 100%;
    height: 62px;
  }

  .search-field-wrap input {
    height: 68px;
  }

  .quick-strip {
    grid-template-columns: 1fr auto;
  }

  .quick-strip-label {
    justify-self: start;
  }

  .quick-strip > div {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .quick-strip > .icon {
    grid-column: 2;
    grid-row: 1;
  }

  .quick-strip a + a::before {
    margin-right: 14px;
  }

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

  .result-actions {
    justify-content: flex-start;
  }

  .sense-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

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

  .alphabet {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

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

  .guide-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid article {
    min-height: auto;
  }

  .footer-grid {
    gap: 42px;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page-width {
    width: min(100% - 24px, var(--page));
  }

  .header-inner {
    gap: 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .hero h1 {
    font-size: clamp(42px, 13vw, 60px);
  }

  .hero-lead {
    font-size: 16px;
  }

  .search-card,
  .result-section {
    padding: 16px;
    border-radius: 14px;
  }

  .quote-examples {
    padding: 14px;
  }

  .quote-example-card blockquote,
  .quote-example-card figcaption {
    padding: 16px;
  }

  .search-field-wrap > .icon {
    left: 18px;
    width: 25px;
    height: 25px;
  }

  .search-field-wrap input {
    padding: 0 20px 0 56px;
    font-size: 24px;
  }

  .keyboard-hint {
    display: none;
  }

  .spotlight-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .spotlight-grid a {
    min-height: 58px;
  }

  .privacy-note {
    align-items: flex-start;
    text-align: left;
  }

  .quick-strip {
    padding: 13px 14px;
  }

  .quick-strip a {
    padding-inline: 8px;
  }

  .result-section {
    margin-top: 26px;
    margin-bottom: 62px;
  }

  .result-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .result-actions .secondary-button:first-child {
    grid-column: 1 / -1;
  }

  .result-disclaimer {
    flex-direction: column;
  }

  .alternative-list {
    grid-template-columns: 1fr;
  }

  .result-disclaimer strong {
    white-space: normal;
  }

  .browse-section,
  .guide-section,
  .library-section {
    padding-top: 62px;
    padding-bottom: 62px;
  }

  .alphabet {
    display: flex;
    overflow-x: auto;
    gap: 7px;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
  }

  .alphabet a,
  .alphabet span {
    min-width: 48px;
    scroll-snap-align: start;
  }

  .browse-results {
    padding: 18px;
  }

  .browse-word-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 16px;
  }

  .history-controls {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* V2: szerveroldali szócikk- és betűoldalak */
.word-search-band {
  padding: 34px 0 8px;
  background: linear-gradient(180deg, #fff8dc 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}

.search-card-compact {
  max-width: 920px;
  margin-inline: auto;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.word-entry > .result-heading h1,
.browse-page-hero h1,
.not-found-section h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.word-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 18px;
}

.word-facts > div {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.word-facts span,
.short-definition > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.word-facts strong {
  font-size: 0.98rem;
}

.short-definition {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
  padding: 20px 22px;
  background: #fff8dc;
  border-left: 5px solid var(--yellow);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.short-definition p {
  max-width: 920px;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.7;
}

.sense-card-heading > div {
  min-width: 0;
}

.sense-card-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.2;
}

.sense-card-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.usage-label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 2px 0 14px 48px;
}

.usage-label,
.term-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid #be4a36;
  border-radius: 999px;
  color: #8d2e20;
  background: #fff3ef;
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.synonym-chip {
  flex-wrap: wrap;
}

.synonym-chip > .term-label {
  margin-left: -7px;
}

.entry-source-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.compact-browse {
  padding-block: 56px;
}

.browse-page-hero {
  padding: 56px 0 42px;
  background: linear-gradient(145deg, #fff8dc 0%, #ffffff 72%);
  border-bottom: 1px solid var(--line);
}

.browse-page-hero > .page-width > p:not(.eyebrow) {
  margin: 15px 0 25px;
  color: var(--muted);
}

.browse-page {
  padding-top: 38px;
}

.server-word-grid {
  margin-top: 28px;
}

.server-word-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.server-word-grid .icon {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.server-word-grid a:hover .icon {
  transform: translateX(3px);
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.pagination > :last-child {
  justify-self: end;
}

.pagination a {
  display: inline-flex;
  width: fit-content;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.pagination > span {
  color: var(--muted);
  font-size: 0.88rem;
}

.not-found-section {
  min-height: 58vh;
  padding-block: 76px;
}

.not-found-section > p:not(.section-kicker) {
  max-width: 700px;
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.not-found-section .alphabet {
  margin-top: 30px;
}

.search-alternative-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.search-alternative-list .secondary-button {
  text-decoration: none;
}

.inline-button {
  display: inline-flex;
  width: fit-content;
  margin-top: 20px;
  text-decoration: none;
}

@media (max-width: 760px) {
  .word-facts {
    grid-template-columns: 1fr;
  }

  .word-search-band {
    padding-top: 22px;
  }

  .usage-label-row {
    margin-left: 0;
  }

  .quote-examples {
    padding: 20px;
  }

  .quote-example-grid {
    grid-template-columns: 1fr;
  }

  .quote-example-card {
    grid-template-columns: 1fr;
  }

  .quote-example-card figcaption {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .result-disclaimer {
    grid-template-columns: 1fr;
  }

  .result-disclaimer strong {
    white-space: normal;
  }

  .pagination {
    grid-template-columns: 1fr 1fr;
  }

  .pagination > span {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }
}

@media (forced-colors: active) {
  .usage-label,
  .term-label,
  .short-definition,
  .word-facts > div {
    border: 1px solid CanvasText;
  }
}

/* Privát, regisztráció nélküli szócikkszerkesztő */
.editor-body {
  background: #f2f0e9;
}

.editor-body textarea,
.editor-body select {
  font: inherit;
}

.editor-body .primary-button {
  height: 52px;
}

.editor-body .primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.editor-login {
  min-height: 68vh;
  display: grid;
  place-items: center;
  padding-block: 72px;
}

.editor-login-card {
  width: min(520px, 100%);
  padding: clamp(28px, 5vw, 48px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.editor-login-card h1,
.editor-topbar h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.editor-login-card > p:not(.section-kicker) {
  margin: 18px 0 26px;
  color: var(--muted);
}

.editor-login-form {
  display: grid;
  gap: 12px;
}

.editor-login-form label,
.editor-field > span,
.editor-fieldset legend,
.editor-relation-labels > span {
  font-size: 0.82rem;
  font-weight: 800;
}

.editor-login-form input,
.editor-field input[type="text"],
.editor-field textarea,
.editor-field select,
.editor-lookup input,
.editor-relation-labels select {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bdb7aa;
  border-radius: 9px;
}

.editor-login-form input,
.editor-lookup input {
  min-height: 52px;
}

.editor-field textarea {
  resize: vertical;
}

.editor-shell {
  padding-block: 50px 100px;
}

.editor-topbar,
.editor-panel-heading,
.editor-save-bar,
.editor-relation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.editor-topbar {
  margin-bottom: 28px;
}

.editor-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-topbar-actions form {
  margin: 0;
}

.editor-alert {
  margin: 0 0 20px;
  padding: 15px 18px;
  border: 1px solid;
  border-radius: 10px;
}

.editor-alert.is-error {
  color: #7d211d;
  background: #fff2ef;
  border-color: #d9968f;
}

.editor-alert.is-success {
  color: #155633;
  background: #eefaf3;
  border-color: #8dc6a6;
}

.editor-alert ul {
  margin: 8px 0 0;
  padding-left: 22px;
}

.editor-panel {
  margin: 0 0 22px;
  padding: clamp(22px, 4vw, 34px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.05);
}

.editor-panel-heading {
  align-items: flex-start;
  margin-bottom: 22px;
}

.editor-panel-heading h2,
.editor-lookup h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.editor-lookup > form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 22px;
}

.editor-recent {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.editor-recent summary {
  width: fit-content;
  cursor: pointer;
  font-weight: 800;
}

.editor-recent > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.editor-recent a {
  padding: 7px 10px;
  background: var(--soft-yellow);
  border-radius: 999px;
  font-weight: 700;
}

.editor-locked-field {
  margin: -6px 0 24px;
  padding: 12px 14px;
  color: var(--muted);
  background: #f5f3ed;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.editor-fieldset {
  min-width: 0;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.editor-fieldset legend {
  margin-bottom: 10px;
  padding: 0;
}

.editor-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 11px;
  background: #f7f5ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.editor-check:has(input:checked) {
  background: var(--soft-yellow);
  border-color: #bba135;
}

.editor-check input,
.editor-seo-check input,
.editor-relation-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--yellow-strong);
}

.editor-field {
  display: grid;
  gap: 7px;
  margin-bottom: 24px;
}

.editor-field small,
.editor-seo-check small,
.editor-relation-toggle small {
  color: var(--muted);
  font-size: 0.78rem;
}

.editor-two-column,
.editor-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.editor-status-grid .editor-field {
  margin: 0;
}

.editor-seo-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px 16px;
  background: #f7f5ef;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.editor-seo-check > span {
  display: grid;
  gap: 3px;
}

.editor-sense-panel {
  border-top: 5px solid var(--yellow);
}

.editor-sense-panel .text-button {
  padding: 8px 4px;
  background: transparent;
  border: 0;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.editor-relation-heading {
  margin: 28px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.editor-relation-heading h3 {
  margin: 0;
  font-size: 1.15rem;
}

.editor-relation-heading span {
  color: var(--muted);
  font-size: 0.85rem;
}

.editor-relation-list {
  display: grid;
  gap: 9px;
}

.editor-relation-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(230px, 1.4fr);
  align-items: center;
  gap: 18px;
  padding: 12px 14px;
  background: #faf9f5;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.editor-relation-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
}

.editor-relation-toggle > span {
  display: grid;
  line-height: 1.3;
}

.editor-relation-labels {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.editor-relation-labels select {
  min-height: 74px;
  padding: 6px 9px;
}

.editor-save-bar {
  position: sticky;
  z-index: 20;
  bottom: 14px;
  margin-top: 26px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #bcb6aa;
  border-radius: 13px;
  box-shadow: 0 14px 36px rgba(17, 17, 17, 0.16);
  backdrop-filter: blur(12px);
}

.editor-save-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .editor-topbar,
  .editor-panel-heading,
  .editor-save-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .editor-topbar-actions,
  .editor-topbar-actions > *,
  .editor-topbar-actions .secondary-button {
    width: 100%;
  }

  .editor-lookup > form,
  .editor-two-column,
  .editor-status-grid,
  .editor-relation-row {
    grid-template-columns: 1fr;
  }

  .editor-relation-labels {
    grid-template-columns: 1fr;
  }

  .editor-save-bar .primary-button {
    width: 100%;
  }
}
