:root {
  --bg: #fbf9f4;
  --ink: #1d1b16;
  --muted: #6b6659;
  --rule: #e3ddd0;
  --accent: #b4451f;
  --card: #fffdf8;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16150f;
    --ink: #ece7d9;
    --muted: #98917f;
    --rule: #302d24;
    --accent: #f08a5d;
    --card: #1e1c15;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 4rem 1.25rem 3rem;
  max-width: 42rem;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-serif, Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

/* Once Zach has answered, stop hogging the top of the screen. */
body.answered { padding-top: 2rem; }

header { text-align: center; margin-bottom: 2rem; }
body.answered header { margin-bottom: 1.25rem; }

.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.bang { color: var(--accent); }

.portrait {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.18);
}

/* Once he's answered, Zach steps aside and lets the results have the page. */
body.answered .wordmark {
  flex-direction: row;
  gap: 0.7rem;
  font-size: 1.9rem;
}
body.answered .portrait {
  width: 46px;
  height: 46px;
  border-width: 2px;
  box-shadow: none;
}

.tagline {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-style: italic;
}
body.answered .tagline { display: none; }

form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
}
input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  padding: 0.75rem 1.4rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
button:hover { filter: brightness(1.08); }

.quip {
  margin: 0 0 2rem;
  padding: 1.1rem 1.3rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}
.quip p { margin: 0.2rem 0 0; font-size: 1.15rem; }

.zach {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h2 {
  font-size: 0.75rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.results {
  list-style: none;
  margin: 0;
  padding: 0;
}
.results li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}

.title {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.title:hover { text-decoration: underline; }

.host {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
}

.snippet { margin: 0.35rem 0 0; }
.snippet strong { font-weight: 700; }

.note,
.error {
  margin-top: 1.5rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

.examples {
  color: var(--muted);
  font-size: 0.95rem;
}
.examples p { margin-bottom: 0.5rem; }
.examples ul { margin: 0; padding-left: 1.1rem; }
.examples li { margin-bottom: 0.3rem; }
.examples a { color: var(--muted); }

footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}
footer a { color: var(--muted); }
