:root {
  --ink: #1b1a17;
  --muted: #6a6258;
  --bg-1: #f8f1e6;
  --bg-2: #efe0cc;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #fff9f2;
  --accent: #b83324;
  --accent-2: #2f6f65;
  --shadow: 0 18px 40px rgba(27, 26, 23, 0.12);
  --border: 1px solid rgba(27, 26, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, #fff6ea 0%, transparent 55%),
    radial-gradient(circle at 90% 20%, #e7f0ea 0%, transparent 45%),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 60%, #e7d2bb 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 50%;
  background: radial-gradient(circle at 40% 60%, rgba(184, 51, 36, 0.15), transparent 60%),
    radial-gradient(circle at 80% 40%, rgba(47, 111, 101, 0.18), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 2.2rem 6vw 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--panel-strong);
  font-weight: 700;
  letter-spacing: 0.1rem;
  font-family: "Fraunces", "Georgia", serif;
}

.logo-mark--xl {
  width: 90px;
  height: 90px;
  border-radius: 28px;
  font-size: 2rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: "Fraunces", "Georgia", serif;
  text-transform: uppercase;
  letter-spacing: 0.24rem;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
}

.brand-sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  color: var(--muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.nav-actions a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem;
  border-radius: 999px;
  border: var(--border);
  background: rgba(255, 255, 255, 0.7);
}

.tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  transition: background 0.2s ease;
}

.tab.active,
.tab:hover {
  background: var(--panel);
}

.user-pill {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: var(--border);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.6);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: var(--ink);
  color: var(--panel-strong);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button.small {
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(27, 26, 23, 0.18);
}

.button.secondary {
  background: var(--accent-2);
}

.button.accent {
  background: var(--accent);
}

.nav-actions form {
  margin: 0;
}

.site-main {
  flex: 1;
  padding: 1.5rem 6vw 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero {
  text-align: center;
  display: grid;
  gap: 1rem;
  justify-items: center;
  animation: fadeUp 0.6s ease both;
}

.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 28px;
  border: var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.24rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(3rem, 9vw, 6rem);
  letter-spacing: 0.28rem;
  text-transform: uppercase;
}

.hero p {
  max-width: 36rem;
  margin: 0;
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

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

.calendar-layout {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  align-items: start;
}

.calendar-card {
  min-height: 520px;
}

.calendar-side {
  display: grid;
  gap: 1.2rem;
}

.card {
  background: var(--panel);
  border: var(--border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
  animation: fadeUp 0.5s ease both;
}

.card.compact {
  padding: 1.5rem;
}

.card--wide {
  grid-column: 1 / -1;
}

.card h2,
.card h3 {
  margin: 0;
  font-family: "Fraunces", "Georgia", serif;
}

.meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.flash {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  border: var(--border);
}

.flash.info {
  background: #eef2ec;
}

.flash.error {
  background: #f7e1df;
}

.flash.success {
  background: #e3efff;
}

form {
  display: grid;
  gap: 1rem;
}

label {
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: var(--border);
  background: #fff;
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}

.list {
  display: grid;
  gap: 0.75rem;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border-radius: 16px;
  border: var(--border);
}

.list-stack {
  display: grid;
  gap: 0.35rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
}

.pill--active {
  background: #dff1ea;
  color: #1b6a58;
}

.pill--pending {
  background: #fff1d6;
  color: #8a5b10;
}

.pill--disabled {
  background: #f7dfe0;
  color: #8a2b2b;
}

.pill--admin {
  background: #e6e8f7;
  color: #303a7a;
}

.event-date {
  font-weight: 700;
  color: var(--accent);
}

.calendar-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.calendar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.calendar-month {
  margin-top: 1.2rem;
  font-weight: 700;
  text-transform: capitalize;
  font-size: 1.2rem;
}

.calendar-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.6rem;
}

.calendar-cell {
  min-height: 110px;
  padding: 0.6rem;
  border-radius: 16px;
  background: #fff;
  border: var(--border);
  display: grid;
  gap: 0.4rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.calendar-head {
  min-height: auto;
  text-align: center;
  font-weight: 700;
  background: transparent;
  border: none;
}

.calendar-day {
  font-weight: 700;
  font-size: 0.95rem;
}

.calendar-events {
  display: grid;
  gap: 0.3rem;
}

.calendar-event {
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
  background: rgba(184, 51, 36, 0.12);
  color: var(--ink);
}

.calendar-more {
  font-size: 0.7rem;
  color: var(--muted);
}

.calendar-cell.is-today {
  border-color: rgba(27, 26, 23, 0.12);
  background: #fff;
}

.calendar-cell.is-today .calendar-day::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(47, 111, 101, 0.75);
}

.calendar-cell.is-selected {
  border: 2px solid rgba(47, 111, 101, 0.6);
  background: #eef7f4;
}

.calendar-cell.is-empty {
  background: rgba(255, 255, 255, 0.4);
  border-style: dashed;
}

.calendar-cell:not(.calendar-head):not(.is-empty):hover {
  background: #fff1e1;
  border-color: rgba(184, 51, 36, 0.35);
  transform: translateY(-2px);
}

.calendar-cell:not(.calendar-head):not(.is-empty) {
  cursor: pointer;
}

.polls {
  display: grid;
  gap: 1.4rem;
}

.poll {
  border: var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  background: var(--panel);
  display: grid;
  gap: 1rem;
}

.poll-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.poll-options {
  display: grid;
  gap: 0.8rem;
}

.poll-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: var(--border);
  background: #fff;
  overflow: hidden;
}

.poll-option input[type="radio"] {
  width: auto;
}

.poll-count {
  font-weight: 700;
  color: var(--accent);
}

.poll-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--poll-fill, 0%);
  background: rgba(184, 51, 36, 0.12);
  z-index: 0;
}

.poll-option span {
  position: relative;
  z-index: 1;
}

.poll-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.timeline {
  --time-col: 92px;
  display: grid;
  gap: 1rem;
  position: relative;
}

.timeline:empty::before {
  display: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: calc(var(--time-col) - 14px);
  top: 0.3rem;
  bottom: 0.3rem;
  width: 2px;
  border-radius: 999px;
  background: rgba(27, 26, 23, 0.12);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--time-col) 1fr;
  gap: 1rem;
  align-items: start;
}

.timeline-time {
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(var(--time-col) - 18px);
  top: 1.05rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 51, 36, 0.08);
}

.timeline-content {
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: var(--border);
  background: #fff;
  display: grid;
  gap: 0.35rem;
}

.timeline-title {
  font-weight: 700;
}

.timeline-details {
  color: var(--muted);
  font-size: 0.9rem;
}

.side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.inline-details summary {
  list-style: none;
}

.inline-details summary::-webkit-details-marker {
  display: none;
}

.inline-details form {
  margin-top: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  margin-left: 0.4rem;
}

.forum-new {
  margin-top: 0.5rem;
  display: grid;
  gap: 1rem;
}

.forum-new summary {
  list-style: none;
}

.forum-new summary::-webkit-details-marker {
  display: none;
}

.forum-new[open] summary {
  filter: brightness(0.95);
}

.forum-list {
  display: grid;
  gap: 1.2rem;
}

.forum-topic {
  padding: 1.2rem 1.4rem;
  border-radius: 18px;
  border: var(--border);
  background: #fff;
  display: grid;
  gap: 0.6rem;
}

.forum-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.docs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
}

.docs-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: flex-start;
  justify-content: space-between;
}

.docs-choices {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  flex: 1;
}

.choice-card {
  display: grid;
  gap: 0.6rem;
  padding: 1.4rem;
  border-radius: 20px;
  border: var(--border);
  background: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.choice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 51, 36, 0.35);
}

.choice-card.active {
  border-color: rgba(184, 51, 36, 0.5);
  background: #fff4e6;
}

.choice-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.doc-fab {
  position: relative;
}

.doc-fab summary {
  list-style: none;
}

.doc-fab summary::-webkit-details-marker {
  display: none;
}

.fab {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.doc-fab-panel {
  margin-top: 0.8rem;
  padding: 1.4rem;
  border-radius: 20px;
  background: var(--panel);
  border: var(--border);
  box-shadow: var(--shadow);
  min-width: min(360px, 90vw);
}

.docs-list {
  display: grid;
  gap: 1.2rem;
}

.doc-card {
  padding: 1.2rem 1.4rem;
  border-radius: 18px;
  border: var(--border);
  background: #fff;
  display: grid;
  gap: 0.6rem;
}

.doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.doc-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.doc-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.pdf-preview {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.pdf-preview summary {
  cursor: pointer;
  font-weight: 600;
}

.pdf-frame {
  width: 100%;
  height: 420px;
  border-radius: 12px;
  border: var(--border);
  background: #fff;
}

.image-frame {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 12px;
  border: var(--border);
  background: #fff;
}

.site-footer {
  padding: 2rem 6vw 2.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-tabs {
    flex-wrap: wrap;
    border-radius: 16px;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .list-item {
    flex-direction: column;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
