:root {
  --paper: #f5f4ee;
  --surface: #fcfbf7;
  --surface-strong: #ffffff;
  --ink: #17221d;
  --muted: #66716b;
  --line: #dcded6;
  --green: #245c46;
  --green-dark: #173e30;
  --green-soft: #dce9df;
  --lime: #d8edaa;
  --coral: #e6785c;
  --danger: #a43c35;
  --shadow: 0 20px 60px rgba(23, 34, 29, 0.08);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 30px;
  --shell: min(1180px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image: radial-gradient(rgba(36, 92, 70, 0.08) 0.7px, transparent 0.7px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 42%);
}

img,
video {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  color: var(--green-dark);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(230, 120, 92, 0.36);
  outline-offset: 3px;
}

.site-shell,
.container {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(220, 222, 214, 0.82);
  background: rgba(245, 244, 238, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50% 50% 50% 14%;
  background: var(--green);
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  transform: rotate(-4deg);
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 7px;
}

.site-nav > a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.site-nav > a:hover,
.site-nav > a[aria-current="page"] {
  background: rgba(36, 92, 70, 0.08);
  color: var(--green-dark);
}

.nav-actions,
.buttons {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  display: block;
  width: 17px;
  height: 1.5px;
  margin: 4px auto;
  background: currentColor;
  content: "";
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle.is-active span {
  opacity: 0;
}

.nav-toggle.is-active::before {
  transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle.is-active::after {
  transform: translateY(-5.5px) rotate(-45deg);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(23, 34, 29, 0.1);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.button.primary,
.button.is-primary,
.button.is-link,
.button.is-success {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.button.primary:hover,
.button.is-primary:hover,
.button.is-link:hover,
.button.is-success:hover {
  background: var(--green-dark);
  color: white;
}

.button.secondary,
.button.is-light {
  background: transparent;
}

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

.button.danger:hover {
  background: #7e2e29;
  color: white;
}

.button.small {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
}

.text-link::after {
  content: "→";
  transition: transform 160ms ease;
}

.text-link:hover::after {
  transform: translateX(4px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 1px;
  background: currentColor;
  content: "";
}

.display-title,
.title,
h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.display-title {
  max-width: 770px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 7vw, 6.3rem);
}

.title,
h1 {
  font-size: clamp(2.2rem, 5vw, 4.25rem);
}

h2,
.title.is-4,
.subtitle {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

h3 {
  font-size: 1.35rem;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.muted {
  color: var(--muted);
}

.danger-text {
  color: var(--danger);
}

.hero {
  padding: clamp(72px, 10vw, 132px) 0 74px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: center;
  gap: clamp(44px, 8vw, 110px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 34px;
}

.discovery-card {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--green-dark);
  color: white;
  box-shadow: var(--shadow);
}

.discovery-card::before,
.discovery-card::after {
  position: absolute;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(216, 237, 170, 0.28);
  border-radius: 50%;
  content: "";
}

.discovery-card::before {
  top: -104px;
  right: -115px;
}

.discovery-card::after {
  top: -32px;
  right: -185px;
}

.card-kicker {
  position: relative;
  z-index: 1;
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.discovery-quote {
  position: relative;
  z-index: 1;
  max-width: 310px;
  margin: 110px 0 38px;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 4vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.discovery-meta {
  position: absolute;
  right: 34px;
  bottom: 32px;
  left: 34px;
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.section {
  padding: 70px 0;
}

.section.compact {
  padding: 44px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.section-head h2,
.section-head p {
  margin-bottom: 0;
}

.section-head p {
  max-width: 480px;
  color: var(--muted);
}

.search-panel,
.box,
.card,
.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(252, 251, 247, 0.9);
  box-shadow: 0 10px 30px rgba(23, 34, 29, 0.035);
}

.search-panel {
  padding: clamp(20px, 4vw, 34px);
}

.search-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 11px;
  margin-bottom: 22px;
}

.search-tools.single {
  grid-template-columns: 1fr;
}

.unstyled-form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.field,
.control {
  min-width: 0;
}

.field + .field {
  margin-top: 20px;
}

.label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.help {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.input,
.textarea,
.select select {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--surface-strong);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input:focus,
.textarea:focus,
.select select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(36, 92, 70, 0.1);
}

.input:disabled,
.select select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.textarea {
  min-height: 150px;
  resize: vertical;
}

.compact-textarea {
  min-height: 116px;
}

.select {
  display: block;
}

.select select {
  min-width: 138px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.directory-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 12px;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background 150ms ease;
}

.table tbody tr:hover {
  background: #f4f7f2;
}

.table td:first-child a {
  color: var(--ink);
  font-weight: 780;
}

.table td:last-child a,
.table td:last-child {
  color: var(--muted);
}

.ownership-card h2 {
  font-size: 1.65rem;
  margin-bottom: 12px;
}

.ownership-credit {
  font-size: 13px;
  color: var(--muted);
}

.claim-form, .claim-status {
  margin-top: 18px;
}

.claim-status {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
}

.claim-confirmation {
  display: flex;
  align-items: start;
  gap: 10px;
  margin: 18px 0;
  font-size: 14px;
}

.claim-confirmation input {
  margin-top: 5px;
}

.claim-review-list {
  display: grid;
  gap: 20px;
}

.claim-review-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface-strong);
}

.claim-review-card p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.claim-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.admin-panel + .admin-panel {
  margin-top: 30px;
}

.pagination,
.pagination-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pagination {
  flex-wrap: wrap;
  margin-top: 22px;
}

.pagination-pages {
  flex-wrap: wrap;
}

.pagination-page {
  min-width: 38px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.pagination-page:hover {
  border-color: var(--green);
  color: var(--green);
}

.pagination-page[aria-current="page"] {
  border-color: var(--green);
  background: var(--green);
  color: white;
  cursor: default;
  opacity: 1;
}

.pagination-ellipsis {
  min-width: 22px;
  color: var(--muted);
  text-align: center;
}

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

.content-column,
.column {
  min-width: 0;
}

.content-card,
.box,
.card {
  padding: 26px;
}

.content-card h2,
.content-card .subtitle {
  margin-bottom: 22px;
}

.event {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.event:first-child {
  padding-top: 0;
}

.event:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.event a {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.event p,
#events p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.event hr,
#events hr,
.faded-line {
  display: none;
}

.audio-container,
.video-container,
.document-container {
  display: grid;
  gap: 12px;
}

.audio-container .card {
  padding: 18px;
}

audio {
  width: 100%;
  margin-top: 12px;
}

.video-container video {
  width: 100%;
  margin-bottom: 14px;
  border-radius: 14px;
}

.image-container {
  margin-top: 22px;
}

.photo-gallery,
.home-image-grid,
.home-video-gallery,
#gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.photo-gallery img,
#gallery img {
  width: 100%;
  min-height: 230px;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  object-fit: cover;
}

.media-item {
  min-width: 0;
  align-self: start;
}

.media-preview { min-width: 0; }
.media-preview audio { display: block; margin-top: 0; }
.media-preview video { display: block; margin-bottom: 0; }

.media-filename,
.media-delete-status,
.media-feedback {
  margin: 12px 0;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.media-filename { color: var(--muted); }
.media-feedback:empty { display: none; }
.media-delete-status[role="alert"] { color: var(--danger); }
.media-delete-button { color: var(--danger); }

.media-delete-confirmation {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #e5b9b5;
  border-radius: 14px;
  background: #fff6f4;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.media-delete-confirmation p { margin: 0 0 12px; }
.media-delete-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.media-delete-actions .button { white-space: normal; text-align: center; }
.media-delete-button[hidden], .media-delete-confirmation[hidden], .media-delete-status[hidden] { display: none; }

.home-media-card { min-width: 0; }
.home-media-title { display: block; margin-top: 12px; font-weight: 700; overflow-wrap: anywhere; }
.home-media-community { margin: 5px 0 12px; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.home-image-group { grid-column: 1 / -1; min-width: 0; }
.home-image-group + .home-image-group { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 24px; }
.home-image-group h3 { margin: 0; font-size: 1.25rem; }
.home-image-group .home-media-title { margin-top: 0; }
.home-image-group .home-media-community { margin-bottom: 16px; }
.home-image-grid > .home-media-card > a { display: block; border-radius: 16px; }
.home-media-audio + .home-media-audio { border-top: 1px solid var(--line); padding-top: 16px; }
.home-media-audio audio { display: block; margin-top: 0; }
.home-feed, .audio-container { scroll-margin-top: 110px; }
.home-feed-pagination, .recording-pagination { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.home-feed-page, .recording-page-number { color: var(--muted); font-size: 0.85rem; }
.home-feed-error, .recording-page-error { grid-column: 1 / -1; margin-top: 16px; color: var(--danger); font-size: 0.85rem; }
.home-media-video video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #183d30; }
.home-media-unavailable { color: var(--muted); font-size: 0.85rem; }
.home-media-state p { margin: 0; }
.home-media-state { gap: 12px; }

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 30px;
  border: 1px dashed #bfc9c1;
  border-radius: var(--radius);
  background: rgba(220, 233, 223, 0.34);
  color: var(--muted);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.detail-hero {
  padding: 78px 0 38px;
}

.detail-hero .title {
  max-width: 800px;
  margin-bottom: 18px;
}

.detail-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.breadcrumb::before {
  content: "←";
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 22px;
  align-items: start;
}

.detail-main,
.detail-aside {
  display: grid;
  gap: 22px;
}

.content {
  color: #3f4c45;
}

.content > :first-child {
  margin-top: 0;
}

.content > :last-child {
  margin-bottom: 0;
}

.detail-row {
  display: grid;
  gap: 3px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-row span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.contact-value {
  overflow-wrap: anywhere;
}

.contact-value.multiline {
  white-space: pre-line;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #c9dacd;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.map-image {
  width: 100%;
  border-radius: 14px;
}

.event-location {
  padding-bottom: 0;
}

.event-location > strong {
  overflow-wrap: anywhere;
}

.event-directions {
  justify-self: start;
  max-width: 100%;
  margin-top: 12px;
  line-height: 1.35;
  text-align: center;
}

.form-page,
.auth-page {
  padding: clamp(46px, 8vw, 96px) 0;
}

.form-shell {
  max-width: 760px;
  margin-inline: auto;
}

.form-card {
  padding: clamp(26px, 5vw, 52px);
}

.form-card .title {
  margin-bottom: 12px;
  font-size: clamp(2.25rem, 5vw, 3.6rem);
}

.form-intro {
  margin: 0 0 34px;
  color: var(--muted);
}

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

.field.full {
  grid-column: 1 / -1;
}

.field + .field.form-grid-field {
  margin-top: 0;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 650;
}

.auth-layout {
  display: grid;
  max-width: 980px;
  margin-inline: auto;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.auth-story {
  position: relative;
  display: flex;
  min-height: 570px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 44px;
  background: var(--green-dark);
  color: white;
}

.auth-story::after {
  position: absolute;
  right: -130px;
  bottom: -150px;
  width: 390px;
  height: 390px;
  border: 70px solid rgba(216, 237, 170, 0.12);
  border-radius: 50%;
  content: "";
}

.auth-story h1 {
  position: relative;
  z-index: 1;
  color: white;
  font-size: clamp(2.3rem, 4.5vw, 4rem);
}

.auth-story p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.7);
}

.auth-form {
  align-self: center;
  padding: clamp(34px, 7vw, 70px);
}

.auth-form h2 {
  margin-bottom: 10px;
}

.auth-form > p {
  margin-bottom: 30px;
  color: var(--muted);
}

.auth-form .button {
  width: 100%;
  margin-top: 10px;
}

.auth-switch {
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.notification {
  position: relative;
  margin-bottom: 18px;
  padding: 14px 44px 14px 16px;
  border: 1px solid #c9d9cf;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.notification.is-danger {
  border-color: #e2b7b2;
  background: #f8e3df;
  color: var(--danger);
}

.notification.is-success {
  background: #e1efe4;
}

.notification .delete {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.notification .delete::before,
.notification .delete::after {
  position: absolute;
  top: 10px;
  left: 4px;
  width: 14px;
  height: 1px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

.notification .delete::after {
  transform: rotate(-45deg);
}

.settings-page {
  padding: clamp(54px, 8vw, 96px) 0;
}

.settings-hero,
.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: end;
  gap: 50px;
  margin-bottom: 34px;
}

.settings-hero h1,
.admin-hero h1 {
  margin-bottom: 18px;
}

.identity-card {
  margin: 0;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--green-dark);
  color: white;
  box-shadow: var(--shadow);
}

.identity-card div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.identity-card div:last-child {
  border-bottom: 0;
}

.identity-card dt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.identity-card dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.account-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 18px 22px;
  border: 1px solid #bed0c1;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.account-notice[hidden] {
  display: none;
}

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

.settings-card,
.danger-zone,
.admin-panel {
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(23, 34, 29, 0.045);
}

.settings-card h2,
.danger-zone h2 {
  margin: 10px 0;
}

.settings-card form {
  margin-top: 24px;
}

.settings-card form > .button {
  margin-top: 22px;
}

.account-communities,
#ownershipRequests {
  margin-bottom: 22px;
}

.managed-communities-heading,
.managed-community-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.managed-community-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.managed-community-row {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.managed-community-row > div:first-child {
  flex: 1 1 250px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.managed-community-row h3 {
  margin: 0 0 8px;
  font-family: inherit;
  font-size: 18px;
}

.managed-community-row p {
  margin: 0;
}

.managed-community-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-kicker.dark {
  color: var(--green);
}

.compact-fields {
  gap: 12px;
}

.compact-fields .field + .field {
  margin-top: 0;
}

.danger-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 54px;
  margin-top: 22px;
  border-color: #d9b8b4;
}

.danger-zone[hidden] {
  display: none;
}

.danger-zone p {
  color: var(--muted);
}

.danger-form .button {
  width: 100%;
  margin-top: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric-grid article {
  display: grid;
  gap: 3px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-grid strong {
  color: var(--green-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
  font-weight: 500;
}

.metric-grid span {
  color: var(--muted);
  font-size: 13px;
}

.admin-table td:first-child strong,
.admin-table td:first-child small {
  display: block;
}

.admin-table td:first-child small {
  margin-top: 3px;
  color: var(--muted);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.status-dot.verified {
  background: var(--green);
}

.compact-select {
  min-height: 38px;
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 205px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 20px;
}

.modal.is-active {
  display: grid;
}

.modal-background {
  position: absolute;
  inset: 0;
  background: rgba(12, 21, 17, 0.65);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.modal-card-head,
.modal-card-body,
.modal-card-foot {
  padding: 22px 24px;
}

.modal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.modal-card-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.modal-card-foot {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.close-modal {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}

.file-label {
  display: grid;
  gap: 10px;
}

.file-input {
  width: 100%;
}

.file-name {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

#uploadModal .modal-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 40px);
  overflow: hidden;
}

#uploadModal .modal-card-body {
  min-height: 0;
  overflow-y: auto;
}

#uploadModal .modal-card-head,
#uploadModal .modal-card-foot { flex-shrink: 0; }
#uploadModal .modal-card-foot { flex-wrap: wrap; }

.close-modal:disabled {
  opacity: 0.5;
  cursor: wait;
}

#uploadProgress {
  width: 100%;
  height: 12px;
  margin-top: 16px;
  accent-color: var(--green);
}

.upload-status {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--green-soft);
  overflow-wrap: anywhere;
}

.upload-status.error {
  background: #fae6e3;
  color: var(--danger);
}

.upload-status.success {
  color: var(--green-dark);
}

.upload-queue { list-style: none; margin: 18px 0 0; padding: 0; }
.upload-queue li { padding: 14px 0; border-top: 1px solid var(--line); }
.upload-file-name { display: block; font-size: 0.9rem; overflow-wrap: anywhere; }
.upload-file-size { color: var(--muted); font-size: 0.8rem; }
.upload-file-status { margin: 5px 0; font-size: 0.85rem; overflow-wrap: anywhere; }
.upload-file-progress { display: block; width: 100%; height: 8px; margin-top: 8px; accent-color: var(--green); }
.upload-queue [data-state="uploaded"] .upload-file-status { color: var(--green); }
.upload-queue [data-state="failed"] .upload-file-status,
.upload-queue [data-state="invalid"] .upload-file-status { color: var(--danger); }

.site-footer {
  margin-top: 70px;
  padding: 44px 0;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
}

.footer-copy {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  font-weight: 700;
}

.footer-note {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 20px;
    left: 20px;
    display: none;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
  }

  .site-nav.is-active {
    display: grid;
  }

  .site-nav > a {
    padding: 12px 14px;
  }

  .nav-actions {
    margin: 6px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .nav-actions .button {
    flex: 1;
  }

  .hero-grid,
  .detail-layout,
  .auth-layout,
  .settings-hero,
  .admin-hero,
  .danger-zone {
    grid-template-columns: 1fr;
  }

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

  .discovery-card {
    min-height: 360px;
  }

  .auth-story {
    min-height: 360px;
  }
}

@media (max-width: 680px) {
  :root {
    --shell: min(100% - 28px, 1180px);
  }

  .hero {
    padding-top: 58px;
  }

  .display-title {
    font-size: clamp(2.85rem, 14vw, 4.35rem);
  }

  .section {
    padding: 50px 0;
  }

  .section-head,
  .footer-grid {
    align-items: start;
    flex-direction: column;
    display: flex;
  }

  .detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-tools,
  .content-grid,
  .columns,
  .form-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .account-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-tools .button,
  .search-tools .select select {
    width: 100%;
  }

  .table th,
  .table td {
    padding: 14px;
  }

  .table th:last-child,
  .table td:last-child {
    min-width: 210px;
  }

  .pagination {
    gap: 10px 6px;
  }

  .pagination-pages {
    order: 3;
    width: 100%;
  }

  .photo-gallery,
  .home-image-grid,
  .home-video-gallery,
  #gallery {
    grid-template-columns: 1fr;
  }

  .photo-gallery img,
  #gallery img {
    min-height: 220px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .form-actions .button {
    width: 100%;
  }

  .auth-story,
  .auth-form {
    padding: 30px;
  }

  .auth-story {
    min-height: 310px;
  }
}

.subscription-privacy {
  font-size: .8rem;
  line-height: 1.5;
  margin-top: 16px;
}

.publisher-tools .view-subscribers {
  margin-top: 12px;
}

.event-subscribers {
  scroll-margin-top: 120px;
}

.subscriber-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.subscriber-heading h2 {
  margin: 0;
}

.subscriber-names {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 0 24px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.subscriber-names li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
