/* Light theme after the original project: grey page, white header bar, white cards. */
:root {
  --page: #e5e7eb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #4b5563;
  --line: rgba(0, 0, 0, 0.125);
  --link: #0d6efd;
  --mark: #fff3a3;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.site-header {
  margin-bottom: 0.75rem;
}

.site-header .container {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

main {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.lede {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #374151;
}

input[type="search"] {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

input[type="search"]:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* The original project's white button. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  margin-top: 1rem;
  padding: calc(0.875rem - 1px) calc(1.5rem - 1px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.25rem;
  background: var(--surface);
  color: rgba(0, 0, 0, 0.85);
  font: inherit;
  font-weight: 600;
  line-height: 1.25;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0;
  cursor: pointer;
  transition: all 250ms;
}

.button:hover,
.button:focus-visible {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
  color: rgba(0, 0, 0, 0.65);
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  background: #f0f0f1;
  transform: translateY(0);
}

.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort label {
  margin: 0;
  font-weight: 600;
}

select {
  min-height: 3rem;
  padding: 0 2.25rem 0 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.25rem;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234b5563' stroke-width='1.6'/%3E%3C/svg%3E")
    no-repeat right 0.85rem center;
  color: var(--text);
  font: inherit;
  appearance: none;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0;
  cursor: pointer;
}

select:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.examples {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.status {
  margin: 1.5rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.status:empty {
  display: none;
}

/* Results as one white card with divided rows, like the original list. */
.results {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
}

.results:empty {
  display: none;
}

.results li {
  padding: 1rem 1.25rem;
}

.results li + li {
  border-top: 1px solid var(--line);
}

.title {
  font-size: 1.08rem;
  font-weight: 600;
}

.meta {
  margin: 0.2rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.snippet {
  margin: 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

mark {
  background: var(--mark);
  color: inherit;
  border-radius: 2px;
}

.more {
  display: flex;
  margin: 1rem auto 0;
}

[hidden] {
  display: none !important;
}

footer {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

footer p {
  margin: 0.2rem 0;
}
