:root {
  color-scheme: light;
  --ink: #1c1917;
  --muted: #57534e;
  --paper: #faf7f2;
  --rule: #e7e0d6;
  --accent: #9a3412;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 1.05rem/1.5 "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  color: var(--ink);
  background: var(--paper);
}

main {
  max-width: 36rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

h1 { font-size: 1.75rem; margin: 0 0 0.35rem; }
.lede, .note, .label, label { color: var(--muted); }

form { display: grid; gap: 0.5rem; margin: 1.25rem 0; }

.examples, .recents { margin: 0 0 1.25rem; }
.recents:empty { margin: 0; }
.examples ul, .recents ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
}
.examples a, .recents a { color: var(--accent); }
textarea, button { font: inherit; }

textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
}

button {
  width: max-content;
  padding: 0.4rem 0.9rem;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
}

.notice, .result {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.phrases { display: grid; }
.phrase {
  display: grid;
  grid-template-columns: 7rem 1fr;
  column-gap: 1rem;
  align-items: baseline;
}
.idiomatic, .literal { font-size: 1.2rem; margin: 0; }
.note { margin: 0.9rem 0 0; }

.tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.85rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.tokens summary {
  cursor: pointer;
  font-size: 1.15rem;
}
.tokens details p { margin: 0.35rem 0 0; color: var(--muted); }
