:root {
  color-scheme: light;

  --paper: #fbfaf7;
  --paper-elevated: #fff;
  --ink: #211e19;
  --ink-muted: #4d4a44;
  --ink-faint: #857e72;
  --rule: #dfd9cc;
  --rule-strong: #a8a093;
  --link: #1a0dab;
  --link-visited: #5a2d82;
  --url: #17663e;

  --serif: Georgia, "Times New Roman", "Palatino Linotype", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--serif);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

/* On the quiet homepage, center everything with a little lift so the
   search box sits a touch above true center. */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 24px 10vh;
}

/* Once searching, relax back into a top-to-bottom document layout. */
body.is-searching .page {
  justify-content: flex-start;
  padding-bottom: 0;
}

.search-block,
.results,
.status {
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.search-block {
  text-align: center;
}

body.is-searching .search-block {
  text-align: left;
  padding: 40px 0 18px;
  border-bottom: 1px solid var(--rule);
}

.masthead {
  margin: 0 0 30px;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

body.is-searching .masthead {
  margin-bottom: 16px;
}

.search-form {
  display: flex;
  justify-content: center;
}

body.is-searching .search-form {
  justify-content: flex-start;
}

.search-input {
  width: 100%;
  max-width: 520px;
  font-family: inherit;
  font-size: 18px;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  background: var(--paper-elevated);
  color: var(--ink);
}

.search-input::placeholder {
  color: var(--ink-faint);
}

.search-input:hover {
  border-color: #7d746a;
}

.search-input:focus {
  outline: none;
  border-color: var(--ink);
}

body.is-searching .search-input {
  max-width: 420px;
  font-size: 16px;
  padding: 8px 10px;
}

.stats-line {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-faint);
}

body.is-searching .stats-line {
  display: none;
}

.results {
  margin-top: 6px;
  padding: 0 0 40px;
  counter-reset: result;
}

.result {
  counter-increment: result;
  padding: 16px 0 15px;
  border-bottom: 1px solid var(--rule);
}

.result:first-of-type {
  padding-top: 18px;
}

.result:last-of-type {
  border-bottom: none;
}

.result-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
}

.result-title::before {
  content: counter(result) ".";
  margin-right: 0.6em;
  font-weight: 400;
  color: var(--ink-faint);
}

.result-title a {
  color: var(--link);
  text-decoration: none;
}

.result-title a:visited {
  color: var(--link-visited);
}

.result-title a:hover,
.result-title a:focus-visible {
  text-decoration: underline;
}

.result-url {
  margin: 4px 0 5px;
  font-size: 12px;
  color: var(--url);
  overflow-wrap: anywhere;
}

.result-snippet {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 66ch;
}

.result-snippet mark {
  background: transparent;
  color: inherit;
  font-weight: 700;
}

.status {
  margin-top: 20px;
  margin-bottom: 48px;
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
}

body.is-searching .status {
  text-align: left;
}

.status:empty {
  display: none;
}

.status.error {
  color: #8a1f11;
}

.evaluation {
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding: 24px 0 40px;
}

.evaluation button {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  background: var(--paper-elevated);
  color: var(--ink);
  cursor: pointer;
}

.evaluation button:hover {
  border-color: var(--ink);
}

.evaluation button:disabled {
  opacity: 0.6;
  cursor: default;
}

.export-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink-faint);
}

.export-note.error {
  color: #8a1f11;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .page {
    padding: 0 16px 4vh;
  }

  body.is-searching .page {
    padding-bottom: 0;
  }

  .search-block,
  .results,
  .status {
    padding-left: 0;
    padding-right: 0;
  }
}