:root {
  --ink: #1d1b16;
  --muted: #6b6457;
  --accent: #d6473b;
  --paper: #fcfaf4;
  --card: #ffffff;
  --line: #e7e1d3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}

a { color: var(--accent); }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* Header */
.site-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--ink);
}
.logo span { color: var(--accent); }

.search { display: flex; gap: 6px; }
.search input {
  font: inherit;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.search button {
  font: inherit;
  padding: 7px 14px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

/* Hero */
.hero {
  border-bottom: 2px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 8px;
}
.hero h1 { font-size: 2.2rem; margin: 0 0 8px; }
.hero p { color: var(--muted); font-size: 1.1rem; }

h2 { font-size: 1.35rem; margin-top: 2rem; }

.section-note {
  margin: -2px 0 4px;
  color: var(--muted);
  font-style: italic;
  font-size: .95rem;
}

.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 22px 18px;
  margin-top: 32px;
}
.callout p { color: var(--muted); }

/* Funny of the day */
.featured {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 12px;
  padding: 18px 22px;
  margin-top: 22px;
}
.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: bold;
  color: var(--accent);
}
.featured h2 { margin: 4px 0 6px; font-size: 1.6rem; }
.featured h2 a { text-decoration: none; color: var(--ink); }
.featured h2 a:hover { color: var(--accent); }
.featured p { margin: 0 0 10px; color: var(--muted); }
.featured-link { font-weight: bold; text-decoration: none; }

/* Card grid */
.card-grid {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.card a {
  display: block;
  height: 100%;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, transform .15s;
}
.card a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card-phrase {
  display: block;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--accent);
}
.card-meaning {
  display: block;
  font-size: .95rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Phrase page */
.crumb { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.crumb a { text-decoration: none; }

.phrase h1 { font-size: 1.9rem; line-height: 1.3; }
.register {
  display: inline-block;
  font-size: .85rem;
  color: var(--muted);
  font-style: italic;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
}
.example {
  background: var(--card);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  font-style: italic;
}
.related { border-top: 2px solid var(--line); margin-top: 40px; padding-top: 8px; }

/* Review tool */
.picks-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0 24px;
}
.picks-box textarea {
  display: block;
  width: 100%;
  font: inherit;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  resize: vertical;
}
.picks-box button {
  font: inherit;
  margin-top: 8px;
  padding: 7px 14px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
table.review {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
table.review th,
table.review td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.review th {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
table.review th:first-child,
table.review td:first-child {
  text-align: center;
  white-space: nowrap;
}
table.review input[type=checkbox] {
  width: 22px;
  height: 22px;
}
.review-phrase {
  font-weight: bold;
  color: var(--accent);
  cursor: pointer;
}

/* Footer */
.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.site-footer a { color: var(--muted); }
