/* Palette: one accent (deep teal) on neutral greens and greys, light and dark via color-scheme. */
:root {
  color-scheme: light dark;
  --bg: #f4f5f2;
  --surface: #ffffff;
  --ink: #1b2421;
  --muted: #4d5a56;
  --line: #d6dcd8;
  --control-border: #6f7d78;
  --accent: #0f6155;
  --accent-soft: #dcebe7;
  --accent-ink: #0b4a40;
  --on-accent: #ffffff;
  --focus: #0f6155;
  --backdrop: rgb(16 24 21 / 0.55);
  --radius: 8px;
  --font: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121816;
    --surface: #1a221f;
    --ink: #e8efeb;
    --muted: #aab6b1;
    --line: #2d3834;
    --control-border: #7f8d87;
    --accent: #6fd1b9;
    --accent-soft: #1f3a34;
    --accent-ink: #9fe6d4;
    --on-accent: #0b1411;
    --focus: #8fe0cc;
    --backdrop: rgb(8 12 11 / 0.6);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.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;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 16px;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.site-header {
  display: grid;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.site-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.weekend {
  font-weight: 600;
  color: var(--accent-ink);
}

.intro {
  max-width: 60ch;
  color: var(--muted);
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14rem auto;
  gap: 12px;
  align-items: end;
  margin: 24px 0 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.field input,
.field select {
  min-height: 44px;
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
}

.btn {
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

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

.btn:active {
  transform: translateY(1px);
}

.btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease;
  }
}

.status {
  margin: 16px 0;
  color: var(--muted);
}

.muted-text {
  color: var(--muted);
  font-size: 0.9375rem;
}

.results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.item h3 {
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 1.5rem;
}

.category {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.badge {
  padding: 2px 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.summary {
  color: var(--muted);
}

.item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}

.price {
  font-weight: 650;
}

.empty {
  display: grid;
  justify-items: start;
  gap: 12px;
  max-width: 48ch;
  padding: 40px 0;
}

.empty h2 {
  font-size: 1.25rem;
  font-weight: 650;
}

.site-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.detail {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail::backdrop {
  background: var(--backdrop);
}

.detail-inner {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.detail-head {
  display: grid;
  gap: 8px;
}

.detail h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 20px;
  margin: 0;
}

.facts dt {
  font-weight: 600;
  color: var(--muted);
}

.facts dd {
  margin: 0;
}

.detail-body {
  display: grid;
  gap: 12px;
  max-width: 65ch;
}

@media (max-width: 1023px) {
  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .page {
    padding: 24px 16px 40px;
  }

  .controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .results {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail {
    width: 100vw;
    max-width: 100vw;
    max-height: none;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .detail-inner {
    padding: 20px 16px 32px;
  }
}
