:root {
  --bg: #f3ece0;
  --surface: #fffaf4;
  --ink: #211d17;
  --muted: #63584b;
  --line: rgba(46, 38, 29, 0.12);
  --olive: #78825d;
  --olive-dark: #5d6745;
  --gold: #c99c39;
  --gold-dark: #a97d1a;
  --dark: #342c22;
  --shadow: 0 20px 45px rgba(38, 29, 20, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Barlow", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201, 156, 57, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(120, 130, 93, 0.12), transparent 22%),
    linear-gradient(180deg, #f9f3e8, #f3ece0);
}

.page-shell {
  width: min(1300px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 50px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.76rem;
  color: #7a6f61;
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.3rem);
}

h3 {
  margin-bottom: 0;
  font-size: 1.5rem;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.top-intro,
.component-shell,
.result-card,
.location-panel {
  border: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.92);
  box-shadow: var(--shadow);
}

.top-intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  border-radius: 28px;
  padding: 24px;
}

.location-panel {
  border-radius: 22px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

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

.field span {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}

.primary-button,
.result-cta,
.body-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.primary-button {
  padding: 13px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  color: #fff9ef;
}

.component-shell {
  margin-top: 18px;
  border-radius: 30px;
  padding: 22px;
}

.tab-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.tab-button {
  white-space: nowrap;
  padding: 12px 16px;
  border-radius: 999px;
  border: 0;
  background: rgba(52, 44, 34, 0.1);
  color: var(--dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.tab-button.active {
  background: var(--dark);
  color: #fff8ec;
}

.feed-summary {
  align-items: center;
  margin: 18px 0 14px;
}

.feed-subtitle {
  margin-top: 6px;
}

.loading-state {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

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

.result-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.result-card:hover,
.result-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(38, 29, 20, 0.14);
  outline: none;
}

.result-summary {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 16px;
  padding: 14px;
  align-items: center;
}

.result-image-wrap {
  position: relative;
  height: 130px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #7c8f77, #b7cbb4);
}

.result-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.result-main {
  min-width: 0;
}

.result-topline,
.meta-row,
.body-tags,
.body-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.source-badge,
.open-badge,
.meta-chip,
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
}

.source-badge {
  background: rgba(201, 156, 57, 0.14);
}

.open-badge {
  background: rgba(120, 130, 93, 0.14);
}

.result-title {
  margin: 8px 0 4px;
  font-size: 1.28rem;
}

.result-subtitle {
  margin-bottom: 10px;
}

.result-cta-wrap {
  display: flex;
  align-items: center;
}

.result-cta,
.body-link {
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--olive), var(--olive-dark));
  color: #fff9ef;
}

.result-body {
  padding: 0 14px 16px;
}

.result-description {
  margin-bottom: 12px;
}

.body-link.alt {
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
}

@media (max-width: 1080px) {
  .top-intro {
    grid-template-columns: 1fr;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 16px, 100%);
    padding-top: 16px;
  }

  .top-intro,
  .component-shell {
    padding: 16px;
    border-radius: 22px;
  }

  .location-panel,
  .result-summary {
    grid-template-columns: 1fr;
  }

  .result-image-wrap {
    height: 190px;
  }
}
