* { box-sizing: border-box; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  max-width: 44rem;
  color: #1a1a1a;
  background: #fdfcf8;
}

a { text-decoration: none; }

header h1 {
  font-family: system-ui, sans-serif;
  font-size: 1.6rem;
  margin: 0 0 .2rem;
}
.tagline {
  font-family: system-ui, sans-serif;
  color: #666;
  font-size: .95rem;
  margin: 0 0 1.6rem;
}

/* ---------------------------------------------------------------- search */

#search { display: flex; gap: .6rem; }
#q {
  flex: 1;
  font-family: system-ui, sans-serif;
  font-size: 1.05rem;
  padding: .55rem .8rem;
  border: 1px solid #d8d2c0;
  border-radius: 8px;
  background: #fffef9;
}
#q:focus { outline: 2px solid #c9beA0; outline-offset: 1px; }

button {
  font-family: system-ui, sans-serif;
  font-size: .95rem;
  padding: .55rem .9rem;
  border: 1px solid #d8d2c0;
  border-radius: 8px;
  background: #f2efe6;
  color: #1a1a1a;
  cursor: pointer;
}
button:hover { background: #eae6d8; }

.examples {
  font-family: system-ui, sans-serif;
  font-size: .88rem;
  color: #888;
  margin: .8rem 0 1.4rem;
}
.chip {
  font-size: .88rem;
  padding: .18rem .6rem;
  border-radius: 999px;
  margin: 0 .15rem;
  background: #f7f4ea;
}

/* --------------------------------------------------------------- letters */

/* CVD marking deferred 2026-07-12: colour only for now; a dotted
   underline behind a colourblind toggle is the planned re-entry path. */
.changed { color: #c0392b; }
.loan { color: #1a5fa8; }
.weak { color: #9a9a9a; }
.weak .changed { color: #cf9d94; }
.weak .loan { color: #9ab4cf; }
.weak .paren { opacity: .55; }

/* ------------------------------------------------------------------ card */

.card {
  background: #fffef9;
  border: 1px solid #e5e0d0;
  border-radius: 12px;
  padding: 1.2rem 1.4rem 1.4rem;
}

.headword {
  font-family: system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}
.actions {
  display: flex;
  gap: .45rem;
  margin-top: .9rem;
}
.actions button { font-size: .84rem; padding: .3rem .7rem; }
.actions button[aria-pressed="true"] { background: #e3dec9; }

.trans-label {
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  letter-spacing: .04em;
  color: #a09a85;
  margin-top: 1.2rem;
  cursor: default;
}
.trans {
  font-size: 2.1rem;
  margin: .35rem 0 .4rem;
  line-height: 1.35;
}

/* Glossed homograph: stacked equal answers, gloss in muted system-ui */
.trans.answer { margin: .55rem 0 0; }
.trans.answer + .trans.answer { margin-top: .1rem; }
.gloss {
  font-family: system-ui, sans-serif;
  font-size: .95rem;
  color: #888;
  margin-left: .8rem;
  display: inline-block;
}

.hint, .weakform, .alts {
  font-family: system-ui, sans-serif;
  font-size: .9rem;
  color: #666;
  margin: .35rem 0;
}
.weakform .inline-trans, .alts .inline-trans {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  color: #1a1a1a;
}

.letters {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: .9rem 0 0;
  border-top: 1px solid #efeadb;
}
.letters li {
  display: flex;
  gap: .8rem;
  align-items: baseline;
  margin: .45rem 0;
}
.letters .glyph {
  font-size: 1.35rem;
  min-width: 2.2rem;
  text-align: center;
  flex-shrink: 0;
}
.letters .expl {
  font-family: system-ui, sans-serif;
  font-size: .9rem;
  color: #444;
}
.letters li.loanrow .expl { color: #888; }

/* ------------------------------------------------------------ varmistus */

.verify {
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid #efeadb;
}
.verify-label {
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  letter-spacing: .04em;
  color: #a09a85;
  margin-bottom: .5rem;
}
.yg {
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: .95rem;
  color: #1a1a1a;
  border: 1px solid #d8d2c0;
  border-radius: 8px;
  background: #f7f4ea;
  padding: .55rem .95rem;
}
.yg:hover { background: #eae6d8; }
.yg .inline-trans {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
}
.yg .lbl-short { display: none; }
.yg-caption {
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  color: #999;
  margin: .4rem 0 0;
}

@media (max-width: 520px) {
  .yg .lbl-long { display: none; }
  .yg .lbl-short { display: inline; }
  #search { flex-direction: column; gap: .5rem; }
}

/* ------------------------------------------------------------ empty state */

.empty {
  font-family: system-ui, sans-serif;
  color: #666;
  background: #fffef9;
  border: 1px solid #e5e0d0;
  border-radius: 12px;
  padding: 1rem 1.4rem;
}
.empty p { margin: .3rem 0; }
.empty .sub { font-size: .85rem; color: #999; }

footer {
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  color: #a8a390;
  margin-top: 2.5rem;
}
