@font-face {
  font-family: Dictionary;
  src: url('/fonts/dictionary-roman.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Dictionary;
  src: url('/fonts/dictionary-italic.woff') format('woff');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --olive: #41472e;
  --ink: #eee3b9;
  --quiet: #c7c5a6;
  --accent: #d4cc9a;
  --rule: rgba(238, 227, 185, 0.25);
  --serif: Dictionary, 'Times New Roman', Georgia, serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-family: var(--sans);
  background: var(--olive);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
::selection { background: var(--ink); color: var(--olive); }
p, h1, h2 { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }

.sheet {
  width: min(100% - 8rem, 65rem);
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.identity { display: flex; gap: 1.1rem; align-items: center; }
.monogram { font: italic 2.6rem/1 var(--serif); }
.eyebrow { font-size: .75rem; font-weight: 400; letter-spacing: .15em; line-height: 1.5; text-transform: uppercase; }
.identity .eyebrow { color: var(--quiet); }
.languages { display: flex; gap: .2rem; align-items: center; }
.languages button {
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--quiet);
  background: transparent;
  padding: .7rem .9rem;
  min-height: 44px;
  cursor: pointer;
  font-size: .875rem;
  transition: color 150ms, background 150ms, border-color 150ms;
}
.languages button[aria-pressed='true'] { color: var(--ink); border-color: var(--rule); background: rgba(238, 227, 185, .045); }
.languages button:hover { color: var(--ink); background: rgba(238, 227, 185, .09); }

main { flex: 1; padding: 3.7rem 0 3.2rem; }
.headword-block { padding-bottom: 2.55rem; }
h1 {
  font-family: var(--serif);
  font-size: clamp(4rem, 15.25vw, 10.6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.045em;
  white-space: nowrap;
  margin-left: -.035em;
}
h1 em { font-weight: 400; color: var(--accent); }
.headword-period { color: var(--accent); }
.word-meta { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; color: var(--quiet); font-size: .875rem; line-height: 1.6; margin-top: .85rem; }
.word-class { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--ink); }
.meta-divider { display: block; height: 14px; border-left: 1px solid var(--rule); }

.senses { border-top: 1px solid var(--rule); padding: 2rem 0 2.7rem; }
.sense { display: grid; grid-template-columns: 3.8rem 1fr; gap: 0; }
.sense-number { font-size: .75rem; line-height: 2; font-variant-numeric: tabular-nums; letter-spacing: .05em; color: var(--quiet); padding-top: .25rem; }
.sense-literal { margin-bottom: 1.35rem; }
.sense-literal p { font-family: var(--serif); font-size: 1.65rem; line-height: 1.3; }
.definition { max-width: 53rem; font-family: var(--serif); font-size: clamp(1.75rem, 2.55vw, 2.2rem); line-height: 1.32; text-wrap: pretty; }
.example { margin-top: 1.6rem; padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.example .eyebrow { color: var(--quiet); font-size: .75rem; letter-spacing: .13em; }
.example p { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--quiet); line-height: 1.45; max-width: 46rem; margin-top: .45rem; }

.notes { border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr 1.23fr; gap: 4.5rem; padding-top: 1.75rem; }
.notes h2 { margin-bottom: .85rem; color: var(--quiet); }
.word-equation { display: flex; align-items: baseline; gap: .65rem; font-family: var(--serif); font-size: 1.6rem; line-height: 1.3; margin: -.15rem 0 .45rem; }
.word-equation em { color: var(--accent); }
.plus { font-family: var(--sans); font-size: 1rem; color: var(--quiet); }
.note-copy { font-size: 1rem; line-height: 1.65; color: var(--quiet); text-wrap: pretty; }
.book-reference { display: inline-block; font-size: .8125rem; line-height: 1.7; margin-top: .75rem; text-decoration-color: var(--rule); }
.book-reference:hover { text-decoration-color: var(--ink); }

.colophon { border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 1.25rem; padding: 1.2rem 0 1.6rem; color: var(--quiet); font-size: .75rem; line-height: 1.6; }
.language-pair { font-family: var(--serif); font-style: italic; font-size: .9375rem; }
.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; }

@media (min-width: 1600px) {
  .sheet { max-width: 70rem; }
  main { padding-top: 4.7rem; }
}

@media (max-width: 800px) {
  .sheet { width: calc(100% - 4rem); }
  main { padding-top: 3rem; }
  h1 { font-size: 16vw; }
  .notes { gap: 2.5rem; }
  .sense { grid-template-columns: 3rem 1fr; }
}

@media (max-width: 560px) {
  .sheet { width: calc(100% - 2.5rem); }
  .masthead { flex-wrap: wrap; gap: .65rem; padding: 1rem 0; }
  .identity { gap: .6rem; }
  .identity .eyebrow { max-width: 5.3rem; font-size: .75rem; letter-spacing: .1em; line-height: 1.5; }
  .monogram { font-size: 2.2rem; }
  .languages { gap: 0; margin-left: auto; }
  .languages button { padding: .6rem .6rem; font-size: .875rem; }
  main { padding: 2.5rem 0 2.5rem; }
  h1 { font-size: 17vw; letter-spacing: -.05em; }
  .headword-block { padding-bottom: 1.7rem; }
  .word-meta { column-gap: .75rem; row-gap: .3rem; margin-top: .9rem; font-size: .875rem; }
  .senses { padding: 1.55rem 0 2rem; }
  .sense { grid-template-columns: 2rem 1fr; }
  .sense-literal { margin-bottom: 1.2rem; }
  .sense-literal p { font-size: 1.5rem; }
  .definition { font-size: 1.65rem; line-height: 1.35; }
  .example { padding-left: .85rem; margin-top: 1.4rem; }
  .example p { font-size: 1.18rem; }
  .notes { grid-template-columns: 1fr; gap: 1.7rem; padding-top: 1.6rem; }
  .notes h2 { margin-bottom: .7rem; }
  .note-copy { font-size: 1rem; line-height: 1.65; }
  .colophon { flex-direction: column; gap: .35rem; padding-bottom: 1.5rem; }
}

@media (max-width: 370px) {
  .masthead { flex-wrap: wrap; }
  .identity .eyebrow { max-width: none; }
  .languages { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
