/* Headword — headwordapp.com
   Paper and ink, a serif for the entry, the system sans for everything around it.
   Nothing here loads from a third party: no fonts, no scripts, no analytics. */

:root {
  color-scheme: light dark;
  --paper: #faf8f4;
  --ink: #1e1b19;
  --ink-2: #59544f;
  --rule: rgba(30, 27, 25, 0.18);
  --accent: #8c2619;
  --serif: "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16130f;
    --ink: #f0ece6;
    --ink-2: #c7c2be;
    --rule: rgba(240, 236, 230, 0.2);
    --accent: #d97359;
  }
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

nav.top {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--ink-2);
  margin-bottom: 3rem;
}
nav.top a { color: inherit; text-decoration: none; }
nav.top a:hover { color: var(--accent); }
nav.top .home { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); font-family: var(--serif); font-size: 1.1rem; }
nav.top img { width: 28px; height: 28px; border-radius: 7px; }
nav.top .spacer { flex: 1; }

/* The entry: headword, respelling, part of speech, sense — typeset as a dictionary sets them. */
.entry { margin: 0 0 2.5rem; }
.entry h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
  text-wrap: balance;
}
.entry .apparatus {
  font-family: var(--serif);
  color: var(--ink-2);
  font-size: 1.05rem;
  margin: 0 0 1.25rem;
}
.entry .apparatus .pos { font-style: italic; }
.entry .sense {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.4;
  margin: 0;
  max-width: 32rem;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 0 0 0.35rem;
  text-wrap: balance;
}
.dateline { color: var(--ink-2); font-size: 0.95rem; margin: 0 0 2.25rem; }

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  margin: 2.25rem 0 0.6rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.5rem; }

p, li { max-width: 36rem; }
p { margin: 0 0 1rem; }
ul { padding-left: 1.2rem; margin: 0 0 1rem; }
li { margin: 0 0 0.4rem; }
strong { font-weight: 600; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }

.lead { font-size: 1.1rem; max-width: 34rem; }
.quiet { color: var(--ink-2); }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
footer a { color: inherit; }

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 120ms ease; }
}
