:root {
  --ink: #0f0e17;
  --muted: #5d5b66;
  --line: #e7e7ea;
  --paper: #ffffff;
  --soft: #f7f7f8;
  --brand: #f00069;
  --brand-dark: #0f0e17;
  --accent: #f00069;
  --danger: #b42318;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
}

.site-header {
  min-height: 64px;
  padding: 10px 44px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header-inner {
  width: min(1140px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 34px;
  max-width: 150px;
  object-fit: contain;
  display: block;
}

.nav a,
.link-button {
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hero {
  display: block;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.hero-inner,
.section,
.partners,
.detail,
.admin-shell,
.auth-panel {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-inner {
  padding: 42px 0 58px;
}

.hero-banner {
  width: 100%;
  max-height: 320px;
  margin-bottom: 46px;
  object-fit: contain;
  display: block;
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 1.7rem;
}

.hero-copy {
  max-width: 600px;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--muted);
}

.section,
.partners,
.detail,
.admin-shell,
.auth-panel {
  padding: 56px 0;
}

.section-heading,
.admin-heading,
.detail-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading p,
.muted {
  color: var(--muted);
}

.event-grid,
.partner-grid,
.admin-grid {
  display: grid;
  gap: 18px;
}

.event-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.event-card,
.admin-panel,
.auth-panel,
.empty-state,
.partner-placeholder {
  border: 1px solid var(--line);
  border-radius: 0;
  background: white;
}

.event-card {
  min-height: 260px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.event-meta,
.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.event-meta span,
.detail-facts span {
  padding: 6px 9px;
  border-radius: 0;
  background: var(--soft);
}

.card-actions,
.row-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 0;
  font-weight: 800;
  font-size: 0.88rem;
  background: #edf0ee;
  color: var(--muted);
}

.status.open {
  background: #ffe2ef;
  color: var(--brand);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--brand);
  border-radius: 0;
  background: var(--brand);
  color: white;
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--ink);
}

.button.danger {
  background: white;
  border-color: #e0b8b8;
  color: var(--danger);
}

.button.small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.88rem;
}

.button.disabled {
  border-color: var(--line);
  background: var(--soft);
  color: var(--muted);
  cursor: default;
}

.empty-state,
.partner-placeholder {
  padding: 32px;
}

.partners {
  border-top: 1px solid var(--line);
}

.partner-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.partner-logo {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: white;
}

.partner-logo img {
  max-width: 100%;
  max-height: 74px;
  object-fit: contain;
}

.detail {
  max-width: 880px;
}

.detail h1 {
  color: var(--ink);
  font-size: clamp(2.3rem, 5vw, 4rem);
}

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  text-decoration: none;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.6;
}

.prose {
  margin: 24px 0;
  line-height: 1.7;
}

.auth-panel,
.admin-panel {
  padding: 28px;
}

.auth-panel {
  max-width: 460px;
}

.admin-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  align-items: start;
}

.admin-shell.narrow {
  max-width: 760px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.stack-form.compact {
  margin-bottom: 22px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 11px 12px;
  font: inherit;
  background: white;
}

textarea {
  resize: vertical;
}

.check-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: start;
}

.check-row input {
  width: auto;
}

.table-list {
  display: grid;
  gap: 10px;
}

.table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0;
}

.table-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.question-block {
  padding: 22px;
  border: 1px solid var(--line);
  background: white;
}

.question-help,
.question-help-preview {
  display: block;
  margin: 4px 0 10px;
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-wrap;
}

.question-help-preview {
  margin: 10px 0 0;
}

.required-mark {
  color: var(--brand);
}

.choice-list {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.choice-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  font-weight: 500;
}

.choice-row input {
  width: auto;
}

.question-row-admin {
  align-items: flex-start;
}

.sortable-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.sortable-row.dragging {
  opacity: 0.5;
}

.drag-handle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  cursor: grab;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.sort-status {
  min-height: 22px;
  margin: 12px 0 0;
}

.option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.option-pills span {
  margin: 0;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font-size: 0.84rem;
}

.panel-subtitle {
  margin-top: 34px;
}

.answer-row {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
}

.answer-row p {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.flash-wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 16px auto 0;
}

.flash {
  padding: 12px 14px;
  border-radius: 0;
  background: #e9f5ef;
  color: var(--brand-dark);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.footer-inner {
  width: min(1140px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner a {
  color: var(--ink);
}

.flash.error {
  background: #f8e8e8;
  color: var(--danger);
}

@media (max-width: 760px) {
  .site-header,
  .section-heading,
  .admin-heading,
  .detail-header,
  .table-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    padding: 16px 20px;
  }

  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand img {
    height: 30px;
    max-width: 132px;
  }

  .nav {
    flex-wrap: wrap;
  }

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

  .hero {
    min-height: 0;
  }

  .hero-banner {
    margin-bottom: 30px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}
