:root {
  color-scheme: light;
  --bg: #f7f2e8;
  --paper: #fffaf0;
  --paper-strong: #fff3dc;
  --ink: #241b14;
  --muted: #6f6258;
  --line: rgba(36, 27, 20, 0.14);
  --primary: #2f7d52;
  --primary-dark: #215b3c;
  --accent: #e69b35;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(53, 38, 18, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(230, 155, 53, 0.18), transparent 38rem),
    linear-gradient(180deg, var(--bg), #f4efe4 45%, #eee8dc);
  color: var(--ink);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(36, 27, 20, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(36, 27, 20, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.wrap { width: min(1100px, calc(100% - 28px)); margin-inline: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 242, 232, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-grid {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--primary);
  box-shadow: var(--shadow);
}
.brand strong { display: block; font-size: 1.05rem; }
.brand small { display: block; color: var(--muted); margin-top: 1px; }
.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.top-nav a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
}
.top-nav a:hover { background: rgba(47, 125, 82, 0.09); color: var(--ink); }
.top-nav .donate-link { color: var(--primary-dark); font-weight: 800; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 22px;
  padding: 44px 0 26px;
  align-items: stretch;
}
.hero-copy, .hero-card, .panel, .donation, .notice {
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.88);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.hero-copy { padding: clamp(24px, 5vw, 44px); }
.eyebrow {
  margin: 0 0 10px;
  color: var(--primary-dark);
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: .75rem;
}
h1, h2, h3 { line-height: 1.04; margin: 0; }
h1 { font-size: clamp(2.2rem, 7vw, 4.8rem); letter-spacing: -0.06em; max-width: 780px; }
h2 { font-size: clamp(1.65rem, 4vw, 2.6rem); letter-spacing: -0.04em; }
h3 { font-size: 1.25rem; }
.hero-text { color: var(--muted); font-size: 1.08rem; line-height: 1.65; max-width: 680px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-card { padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.hero-card strong { font-size: 1.2rem; }
.hero-card ol { padding-left: 1.25rem; line-height: 1.75; color: var(--muted); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; margin-bottom: 22px; }
.notice p { margin: 0; color: var(--muted); line-height: 1.55; }
.panel { padding: clamp(18px, 4vw, 28px); margin: 22px auto; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}
.muted { color: var(--muted); line-height: 1.5; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(53, 38, 18, .10); }
.btn.primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.small { min-height: 38px; padding: 8px 14px; }
.trip-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field { display: grid; gap: 7px; }
.field label { font-weight: 800; }
.field small { color: var(--muted); }
.span-2 { grid-column: span 2; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffdf7;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: rgba(47, 125, 82, 0.65); box-shadow: 0 0 0 4px rgba(47, 125, 82, 0.12); }
textarea { resize: vertical; }
.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.segmented label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffdf7;
}
.form-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.status { margin: 0; color: var(--muted); font-weight: 700; }
.status.ok { color: var(--primary-dark); }
.status.error { color: var(--danger); }
.hp { display: none !important; }
.feed-section { padding: 26px 0; }
.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  margin-bottom: 14px;
}
.feed-status { color: var(--muted); margin: 10px 0; }
.trip-list {
  display: grid;
  gap: 13px;
}
.trip-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 12px 30px rgba(53, 38, 18, .08);
  padding: 18px;
}
.trip-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  background: var(--primary);
}
.trip-card.busco::before { background: var(--accent); }
.trip-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}
.trip-route {
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 0 8px 0;
}
.trip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .56);
  border-radius: 999px;
  padding: 7px 9px;
  font-size: .92rem;
}
.trip-comment {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.trip-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 170px;
}
.phone { font-weight: 900; text-align: center; color: var(--primary-dark); }
.report-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  padding: 8px;
}
.empty-state {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 250, 240, .62);
}
.donation {
  margin: 22px auto 34px;
  padding: clamp(18px, 4vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.donation p { color: var(--muted); line-height: 1.6; max-width: 720px; }
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); }
.footer-grid { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-grid p { margin: 0; }
.report-dialog {
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
  background: var(--paper);
  color: var(--ink);
  width: min(460px, calc(100% - 28px));
}
.report-dialog::backdrop { background: rgba(36, 27, 20, 0.44); backdrop-filter: blur(3px); }
.report-dialog form { padding: 22px; display: grid; gap: 12px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.setup-warning {
  border: 1px solid rgba(180, 35, 24, .35);
  background: rgba(180, 35, 24, .08);
  color: var(--danger);
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-weight: 800;
}
@media (max-width: 780px) {
  .header-grid { align-items: flex-start; padding: 10px 0; flex-direction: column; }
  .top-nav { width: 100%; justify-content: space-between; }
  .top-nav a { padding: 8px 7px; font-size: .92rem; }
  .hero { grid-template-columns: 1fr; padding-top: 20px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .trip-form { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .segmented { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .trip-main { grid-template-columns: 1fr; }
  .trip-actions { min-width: 0; }
  .phone { text-align: left; }
  .donation { flex-direction: column; align-items: flex-start; }
  .donation .btn { width: 100%; }
}
