:root {
  --bg: #f7f7f2;
  --text: #242424;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --accent: #242424;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1rem, calc((100vw - 920px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgb(247 247 242 / 94%);
  backdrop-filter: blur(8px);
}

.brand {
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

.tabs {
  display: flex;
  gap: 1.25rem;
}

.tab {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.tab:hover,
.tab.is-active {
  color: var(--text);
}

.page {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0;
}

.section-head h2 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head h2 {
  font-size: 2.3rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.panel {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
}

.hidden {
  display: none;
}

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 760px;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.autocomplete {
  position: relative;
}

.full,
.button,
.result {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0.8rem 2.5rem 0.8rem 0.95rem;
  border: 1px solid #deded3;
  border-bottom-color: #cfcfc5;
  border-radius: 0.85rem 0.85rem 0 0;
  outline: 0;
  background: #f5f5ee;
  color: var(--text);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1.1rem) 50%,
    calc(100% - 0.8rem) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 45%);
}

input:hover,
select:hover {
  border-bottom-color: #bcbcbc;
  background-color: #f8f8f3;
}

input:focus,
select:focus {
  border-color: #d2d2c6;
  border-bottom-color: var(--accent);
  background-color: #f7f7f2;
  box-shadow: 0 0 0 4px rgb(36 36 36 / 6%);
}

select option {
  color: var(--text);
  background: #f5f5ee;
}

select:disabled {
  color: #9a9a9a;
  background-color: #efefe8;
  cursor: not-allowed;
  box-shadow: none;
}

.suggestions {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fcfcf7;
  box-shadow: 0 12px 24px rgb(36 36 36 / 8%);
  list-style: none;
  max-height: 14rem;
  overflow: auto;
}

.suggestions.hidden {
  display: none;
}

.suggestion-item {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 0;
  border-radius: 0.65rem;
  color: var(--text);
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.suggestion-item:hover,
.suggestion-item:focus-visible {
  background: #efefe7;
  outline: none;
}

.button {
  justify-self: start;
  min-height: 42px;
  margin-top: 0.4rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  background: #000000;
}

.result {
  max-width: 760px;
  margin-top: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.result.is-empty {
  color: var(--muted);
}

.result h3 {
  margin: 0 0 1rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 500;
}

.result-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.result-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.result-row dt {
  color: var(--muted);
  font-weight: 700;
}

.result-row dd {
  margin: 0;
}

.site-footer {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .suggestions {
    max-height: 11rem;
  }

  .page {
    padding-top: 2rem;
  }

  .section-head h2 {
    font-size: 1.8rem;
  }

  .form,
  .result-row {
    grid-template-columns: 1fr;
  }

  .result-row {
    gap: 0.2rem;
  }
}
