:root {
  color-scheme: light;
  --ink: #172225;
  --muted: #667579;
  --line: #d9e2df;
  --panel: #ffffff;
  --wash: #f4f7f3;
  --deep: #0f3d3e;
  --deep-2: #174f50;
  --gold: #c89b3c;
  --aqua: #d9f1e8;
  --rose: #f3ddd7;
  --shadow: 0 18px 50px rgba(24, 48, 43, 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: linear-gradient(180deg, #eef5f1 0%, #f7f8f4 46%, #ffffff 100%);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(23, 34, 37, 0.12);
  background: rgba(244, 247, 243, 0.9);
  backdrop-filter: blur(16px);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.15;
  letter-spacing: 0;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

nav a,
.filter,
button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

nav a:hover,
.filter:hover,
button:hover {
  border-color: var(--deep);
}

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

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.intro,
.quick-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.intro {
  padding: clamp(22px, 4vw, 42px);
  display: grid;
  gap: 14px;
}

.intro h2 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  max-width: 900px;
}

.intro p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.quick-panel article {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  background: var(--wash);
}

.metric {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--deep);
  color: white;
  font-size: 1.45rem;
  font-weight: 900;
}

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 18px;
}

.filter {
  white-space: nowrap;
}

.filter.is-active {
  background: var(--deep);
  color: white;
  border-color: var(--deep);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 18px;
  align-items: start;
}

.grid.secondary {
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

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

.event-list,
.need-list,
.ride-list {
  display: grid;
  gap: 10px;
}

.event-card,
.need-card,
.ride-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.event-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.datebox {
  border-radius: 8px;
  background: var(--aqua);
  padding: 10px;
  text-align: center;
  font-weight: 900;
}

.datebox span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.event-card h3,
.need-card h3 {
  margin: 0 0 5px;
  font-size: 1rem;
  letter-spacing: 0;
}

.event-meta,
.need-meta {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--wash);
  color: var(--deep);
  font-size: 0.78rem;
  font-weight: 800;
}

.need-card {
  display: grid;
  gap: 10px;
}

.need-card button,
.event-card button,
form button {
  background: var(--deep);
  border-color: var(--deep);
  color: white;
}

.need-card.urgent {
  border-color: #d9a441;
  background: #fffaf0;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.ride-list {
  margin-top: 14px;
}

.ride-card {
  background: var(--wash);
}

dialog {
  border: 0;
  border-radius: 10px;
  padding: 0;
  width: min(460px, calc(100% - 24px));
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.24);
}

dialog::backdrop {
  background: rgba(15, 61, 62, 0.45);
}

.dialog-card {
  padding: 22px;
}

.close {
  float: right;
  width: 40px;
  min-height: 40px;
  padding: 0;
  background: var(--wash);
  color: var(--ink);
}

@media (max-width: 880px) {
  .topbar,
  .workspace,
  .grid,
  .grid.secondary {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  nav {
    justify-content: start;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .event-card button {
    width: 100%;
  }
}
