:root {
  color-scheme: light;
  --ink: #1f2a24;
  --muted: #607068;
  --line: #d8e0db;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --accent: #0f6b5f;
  --accent-2: #8a4f22;
  --soft: #eef5f0;
  --shadow: 0 18px 44px rgba(31, 42, 36, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: end;
  padding: 28px clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, #f5faf6 0%, #fbfcfa 100%);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.subhead {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.route-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.button.secondary {
  background: #fff;
  color: var(--accent);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.route {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.05fr);
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.route h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.route p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.route ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.route li {
  padding-left: 6px;
  line-height: 1.35;
}

.route .time {
  display: block;
  color: var(--accent-2);
  font-weight: 800;
}

.route-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  margin-top: 24px;
  padding: 18px 0 2px;
}

.controls h2,
.skipped h2 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.controls p,
.skipped p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.segment {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.segment.is-active {
  background: var(--accent);
  color: #fff;
}

.reset-button {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(31, 42, 36, 0.08);
}

.card.is-loved {
  border-color: #c87b1d;
  box-shadow: 0 14px 34px rgba(138, 79, 34, 0.18);
}

.card.is-skipped {
  opacity: 0.78;
}

.photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--soft);
}

.card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.rank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-toggles {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.include-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 850;
}

.include-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.love-button {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.love-button.is-loved {
  border-color: #c87b1d;
  background: #fff7e8;
  color: #7a420e;
}

.open {
  padding: 6px 9px;
  border-radius: 8px;
  background: #fff4e8;
  color: #6f3b10;
}

h3 {
  margin-bottom: 4px;
  font-size: 1.25rem;
  line-height: 1.12;
}

.price {
  margin: 0;
  color: var(--accent);
  font-weight: 900;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fact {
  min-height: 52px;
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
}

.label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.value {
  font-weight: 850;
}

.reason {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.skipped {
  margin-top: 34px;
}

.skipped-header {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.skipped.is-empty {
  display: none;
}

footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .topbar,
  .route,
  .controls,
  .cards {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding-top: 22px;
  }

  .route-link {
    width: 100%;
  }

  .cards {
    gap: 16px;
  }

  .facts,
  .actions,
  .card-toggles {
    grid-template-columns: 1fr;
  }

  .segmented {
    width: 100%;
  }

  .reset-button {
    width: 100%;
  }
}
