:root {
  --bg: #f2f4f1;
  --surface: #ffffff;
  --surface-alt: #f7f8f5;
  --ink: #17211f;
  --muted: #576663;
  --line: #d9e0dc;
  --accent: #7a1f31;
  --accent-soft: #f3e4e8;
  --brand-burgundy: #7a1f31;
  --alert: #be3a34;
  --shadow: 0 12px 28px rgba(16, 29, 24, 0.08);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --transition: 220ms ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Barlow", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% -20%, #f5e6ea 8%, #f7f4f5 45%, #f1edef 100%);
}

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

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

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

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: relative;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(12, 32, 26, 0.08);
  overflow: visible;
}

.header-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, #f2e4e8 0%, #f8f4f6 45%, #ece2e6 100%);
  z-index: -1;
}

.top-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.top-ribbon-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  position: relative;
  z-index: 60;
}

.top-ribbon-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
}

.top-ribbon-meta p {
  margin: 0;
}

.header-brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
}

.header-brand-text {
  font-weight: 700;
  color: #23332f;
  letter-spacing: 0.01em;
}

.dashboard-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  background: var(--surface);
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.dashboard-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(122, 31, 49, 0.32);
}

.brand-tag {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.74rem;
  color: var(--muted);
  margin: 0 0 0.45rem;
}

.brand-row h1,
.dashboard-head-row h1 {
  font-family: "Playfair Display", serif;
  margin: 0;
  font-size: clamp(2.1rem, 4.3vw, 3.3rem);
  line-height: 1.05;
}

.brand-home-link {
  color: inherit;
}

.brand-home-link:hover {
  color: inherit;
}

.brand-copy {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  justify-items: center;
}

.brand-sub {
  margin: 0.7rem 0 0;
  color: #465753;
  max-width: 660px;
  font-size: 1.02rem;
}

.brand-logo-wrap {
  margin-bottom: 0.72rem;
}

.ha-logo {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: linear-gradient(165deg, #8c2a3f 0%, var(--brand-burgundy) 100%);
  box-shadow: 0 16px 28px rgba(122, 31, 49, 0.35);
}

.ha-logo-top {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 0.96rem;
  box-shadow: 0 10px 16px rgba(122, 31, 49, 0.28);
}

.leaderboard-wrap {
  display: grid;
  justify-content: center;
  padding-bottom: 1rem;
  position: relative;
  z-index: 10;
}

.primary-nav {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(21, 48, 39, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.primary-nav-inline {
  justify-content: center;
  padding: 0.52rem 0.75rem;
}

.primary-nav-inline > a,
.primary-nav-inline > details > summary {
  font-size: 0.84rem;
}

.primary-nav > a,
.primary-nav .more-trigger {
  font-size: 0.97rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  color: #253633;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  background: transparent;
  border-top: 0;
  border-left: 0;
  border-right: 0;
}

.primary-nav > a:hover,
.primary-nav > a.is-active,
.primary-nav .more-trigger:hover,
.primary-nav .more-trigger.is-active,
.primary-nav .more-menu.has-active .more-trigger {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.more-menu {
  position: relative;
}

.more-menu summary {
  list-style: none;
}

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

.more-menu .more-trigger::after {
  content: "▾";
  margin-left: 0.3rem;
  font-size: 0.66rem;
  vertical-align: middle;
}

.more-menu[open] .more-trigger::after {
  content: "▴";
}

.more-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 210px;
  display: grid;
  gap: 0.2rem;
  padding: 0.42rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 24px rgba(16, 29, 24, 0.16);
  z-index: 120;
}

.more-dropdown > a {
  border-radius: 8px;
  padding: 0.44rem 0.56rem;
  font-size: 0.86rem;
  color: #243632;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
}

.more-dropdown > a:hover,
.more-dropdown > a.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.section-note {
  color: var(--muted);
  margin: 0;
}

main {
  padding: 1.35rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2.45fr 1fr;
  gap: 1rem;
  margin-bottom: 1.7rem;
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 420px;
  animation: fadeRise 550ms ease both;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.hero-content {
  padding: 1.2rem 1.2rem 1rem;
  display: grid;
  align-content: start;
  gap: 0.65rem;
}

.hero-content h2,
.section-title-row h2,
.magazine-rail h2,
.panel h2 {
  font-family: "Playfair Display", serif;
}

.hero-content h2 {
  margin: 0;
  line-height: 1.14;
  font-size: clamp(1.34rem, 2vw, 1.85rem);
}

.hero-content p {
  margin: 0;
  color: var(--muted);
}

.hero-card.is-leadership-focus {
  border-color: rgba(122, 31, 49, 0.28);
  box-shadow: 0 20px 38px rgba(10, 36, 29, 0.18);
}

.hero-card.is-leadership-focus .hero-content {
  padding: 1.35rem 1.35rem 1.15rem;
  gap: 0.78rem;
}

.hero-card.is-leadership-focus .hero-content h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.45rem);
  line-height: 1.1;
}

.hero-card.is-leadership-focus .hero-content p {
  font-size: 1.05rem;
}

.hero-side-stack {
  display: grid;
  gap: 1rem;
}

.mini-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow);
  min-height: 120px;
  animation: fadeRise 600ms ease both;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.mini-card h3 {
  margin: 0.4rem 0 0;
  font-size: 1.1rem;
  line-height: 1.22;
}

.mini-card:hover {
  transform: translateY(-4px);
  border-color: rgba(122, 31, 49, 0.24);
  box-shadow: 0 16px 30px rgba(16, 29, 24, 0.12);
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.27rem 0.62rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

.section-title-row h2,
.magazine-rail h2 {
  margin: 0;
  font-size: 1.6rem;
}

#activeFilterLabel {
  color: var(--muted);
  margin: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 3fr 1.2fr;
  gap: 1rem;
}

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

.article-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  min-height: 336px;
  grid-template-rows: 180px auto;
  animation: fadeRise 650ms ease both;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.article-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card > div {
  padding: 0.88rem 0.95rem 1rem;
}

.article-card h3 {
  margin: 0.45rem 0;
  font-size: 1.18rem;
  line-height: 1.2;
}

.article-card p {
  margin: 0;
  color: var(--muted);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(122, 31, 49, 0.24);
  box-shadow: 0 16px 30px rgba(16, 29, 24, 0.12);
}

.story-card {
  cursor: pointer;
}

.story-card > *:not(.story-overlay) {
  position: relative;
  z-index: 1;
}

.story-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}

.story-overlay:focus-visible {
  outline: 3px solid rgba(122, 31, 49, 0.45);
  outline-offset: 2px;
}

.meta {
  margin-top: 0.68rem;
  font-size: 0.86rem;
  color: #6f7c79;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter-card {
  background: linear-gradient(155deg, #fdfefe 0%, #f8eef1 100%);
  border-radius: var(--radius-md);
  border: 1px solid #e6d2d8;
  padding: 1rem;
}

.newsletter-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.newsletter-card p {
  color: var(--muted);
  margin: 0.65rem 0 0.95rem;
}

.newsletter-card button,
.primary-btn {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  padding: 0.62rem 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.newsletter-card button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(122, 31, 49, 0.26);
  background: #651a2a;
}

.inline-ad-wrapper {
  margin-top: 1.2rem;
}

.magazine-rail {
  margin-top: 1.5rem;
}

.magazine-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.category-lead {
  margin-bottom: 1rem;
}

#upcomingEventsSection[hidden] {
  display: none;
}

.section-title-tight {
  margin-bottom: 0.55rem;
}

.upcoming-events-section {
  margin-bottom: 1rem;
}

.upcoming-events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.upcoming-event-card {
  border: 1px solid #d4dfda;
  border-radius: var(--radius-md);
  background: linear-gradient(165deg, #ffffff 0%, #f6eef1 100%);
  box-shadow: var(--shadow);
  padding: 0.9rem;
  display: grid;
  gap: 0.5rem;
}

.upcoming-event-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.upcoming-event-date {
  margin: 0;
  font-size: 0.86rem;
  color: #48605a;
  font-weight: 600;
}

.upcoming-event-card h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.24;
}

.upcoming-event-location {
  margin: 0;
  color: #2f403c;
  font-weight: 600;
}

.upcoming-event-summary {
  margin: 0;
  color: #4a5955;
  line-height: 1.45;
}

.event-cta {
  justify-self: start;
  margin-top: 0.2rem;
  border: 1px solid rgba(122, 31, 49, 0.26);
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
}

.event-cta:hover {
  color: #651a2a;
  border-color: rgba(122, 31, 49, 0.4);
}

#categoryCount {
  margin: 0;
}

.article-layout {
  display: grid;
  grid-template-columns: 2.15fr 1fr;
  gap: 1rem;
  align-items: start;
}

.article-view-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.05rem 1.1rem 1.2rem;
}

.article-view-card h2 {
  margin: 0.55rem 0 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  line-height: 1.15;
}

.article-main-image {
  width: 100%;
  border-radius: var(--radius-md);
  margin-top: 0.9rem;
  height: clamp(260px, 38vw, 480px);
  object-fit: cover;
}

.article-content {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.82rem;
}

.article-content p {
  margin: 0;
  color: #30403d;
  font-size: 1.02rem;
  line-height: 1.74;
}

.article-related-title {
  margin-top: 1.45rem;
}

.contact-page-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1rem;
  align-items: stretch;
}

.contact-card,
.map-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.contact-card h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.45rem;
}

.contact-card p {
  margin: 0.62rem 0 0;
  color: #3f4f4c;
  line-height: 1.5;
}

.contact-card a {
  color: var(--accent);
  font-weight: 700;
}

.map-frame {
  width: 100%;
  min-height: 360px;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

.mag-gate-wrap {
  margin-bottom: 1.15rem;
}

.mag-title-wrap {
  display: grid;
  gap: 0.2rem;
}

.health-indicator {
  align-self: center;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  border: 1px solid #d9dfdc;
  border-radius: 999px;
  padding: 0.28rem 0.52rem 0.28rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #fdfdfd;
  color: #455553;
}

.health-refresh-btn {
  width: 18px;
  height: 18px;
  border: 1px solid #cfd8d4;
  border-radius: 50%;
  background: #ffffff;
  color: inherit;
  font-size: 0.72rem;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), color var(--transition);
}

.health-refresh-btn:hover {
  transform: rotate(-16deg);
  border-color: rgba(122, 31, 49, 0.45);
  color: var(--brand-burgundy);
}

.health-refresh-btn:focus-visible {
  outline: 2px solid rgba(122, 31, 49, 0.36);
  outline-offset: 1px;
}

.health-refresh-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.health-refresh-btn.is-spinning {
  animation: healthSpin 0.9s linear infinite;
}

.health-indicator.is-checking {
  border-color: #d9dfdc;
  color: #4b5d5a;
  background: #fbfcfb;
}

.health-indicator.is-online {
  border-color: rgba(122, 31, 49, 0.35);
  color: #7a1f31;
  background: #f7ecef;
}

.health-indicator.is-offline {
  border-color: rgba(160, 33, 56, 0.35);
  color: #a02138;
  background: #fbf0f3;
}

@keyframes healthSpin {
  to {
    transform: rotate(360deg);
  }
}

.mag-gate-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.05rem;
}

.mag-gate-intro h3 {
  margin: 0.5rem 0 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.mag-gate-intro p {
  margin: 0.5rem 0 0;
  color: #40524f;
}

.mag-access-selected {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 0.85rem;
  margin-bottom: 0.95rem;
}

.mag-selected-cover {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d6dfdb;
  min-height: 170px;
  object-fit: cover;
}

.mag-gate-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.mag-gate-grid h4 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.mag-access-message {
  margin: 0.75rem 0 0;
  min-height: 1.2rem;
  color: #2d4942;
  font-size: 0.92rem;
}

.mag-purchase-box {
  margin-top: 0.9rem;
  border: 1px solid #d6dfdb;
  border-radius: 12px;
  background: #f8fbf9;
  padding: 0.8rem;
}

.mag-purchase-box h4 {
  margin: 0;
}

.mag-price-line {
  margin: 0.55rem 0;
}

.mag-shelf {
  display: grid;
  gap: 0.9rem;
}

.mag-shelf[hidden] {
  display: none !important;
}

.mag-shelf-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: end;
}

.mag-shelf-head h2 {
  margin: 0;
}

.mag-years {
  display: grid;
  gap: 0.9rem;
}

.mag-year-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 0.85rem;
}

.mag-year-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.mag-year-head h3 {
  margin: 0;
  font-size: 1.5rem;
  font-family: "Playfair Display", serif;
}

.mag-year-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.mag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.mag-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 0.75rem;
  border: 1px solid #d7dfdb;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.58rem;
}

.mag-cover {
  border-radius: 10px;
  overflow: hidden;
  min-height: 158px;
  background: linear-gradient(165deg, #f2e6ea 0%, #ebd9de 100%);
  display: grid;
  place-items: center;
}

.mag-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mag-cover span {
  color: #1f3430;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.mag-body {
  display: grid;
  gap: 0.35rem;
}

.mag-body h3 {
  margin: 0;
  font-size: 1.08rem;
}

.mag-body p {
  margin: 0;
  color: #40524f;
  font-size: 0.9rem;
}

.mag-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.mag-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  border: 1px solid rgba(122, 31, 49, 0.36);
  color: #0f6c52;
  font-weight: 700;
  font-size: 0.82rem;
}

.mag-link.ghost {
  color: #2f3f3c;
  border-color: #c5d1cd;
}

.panel-stack-top {
  margin-top: 0.8rem;
}

.mag-reader-wrap {
  margin-top: 0.3rem;
}

.reader-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.mag-reader-frame-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  min-height: 78vh;
}

.mag-reader-frame {
  width: 100%;
  min-height: 78vh;
  border: 0;
}

.site-footer {
  border-top: 1px solid rgba(8, 30, 23, 0.1);
  margin-top: 2rem;
  background: linear-gradient(155deg, #ecf0eb 0%, #f7f8f5 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
  padding: 1.45rem 0;
}

.footer-grid h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ha-logo-small {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1rem;
}

.footer-social {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0.5rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #cfd8d4;
  background: #ffffff;
  color: #1f2e2b;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.social-icon:hover {
  transform: translateY(-2px);
  border-color: rgba(122, 31, 49, 0.45);
  color: var(--brand-burgundy);
  box-shadow: 0 10px 18px rgba(16, 29, 24, 0.14);
}

.footer-grid p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  max-width: 560px;
}

.ad-slot {
  position: relative;
  border: 1px solid #cfd8d4;
  border-radius: var(--radius-sm);
  min-height: 92px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(243, 248, 244, 0.86));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ad-slot.empty::before {
  content: "Advert Space";
  color: #7a8683;
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ad-slot.empty {
  border-style: dashed;
}

.ad-hero {
  min-height: 110px;
}

.ad-leaderboard {
  width: 800px;
  max-width: 100%;
  height: 110px;
  min-height: 110px;
}

.ad-leaderboard .ad-caption {
  padding: 0.38rem 0.56rem;
  font-size: 0.77rem;
}

.ad-sidebar {
  min-height: 286px;
}

.ad-sidebar-bottom {
  flex: 1;
  min-height: 260px;
}

.ad-inline {
  min-height: 152px;
}

.ad-link {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.ad-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.55rem 0.72rem;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(10, 18, 16, 0.82));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.86rem;
}

.ad-caption strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-caption span {
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 0.14rem 0.48rem;
  font-size: 0.74rem;
}

.empty-message {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1rem;
  color: var(--muted);
}

.dashboard-body {
  background: radial-gradient(circle at 90% -20%, #f3e7eb 10%, #f2f4f1 45%, #f0ebee 100%);
}

.login-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.login-gate[hidden],
#dashboardApp[hidden] {
  display: none !important;
}

.login-card {
  width: min(440px, 94vw);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, #ffffff 0%, #f3f8f5 100%);
  box-shadow: var(--shadow);
  padding: 1.3rem;
}

.login-card h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.login-subtext {
  margin: 0.7rem 0 1rem;
  color: var(--muted);
}

.login-error {
  min-height: 1.25rem;
  margin: 0;
  color: var(--alert);
  font-size: 0.9rem;
}

.dashboard-actions {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
}

.dashboard-header {
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid rgba(15, 37, 30, 0.11);
}

.dashboard-head-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.dashboard-main {
  padding: 1.25rem 0 2rem;
  display: grid;
  gap: 1rem;
}

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

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  box-shadow: var(--shadow);
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-card h3 {
  margin: 0.45rem 0 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.panel h2 {
  margin: 0;
  font-size: 1.35rem;
}

.ghost-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: #263431;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.ghost-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(122, 31, 49, 0.28);
  box-shadow: 0 8px 18px rgba(16, 29, 24, 0.1);
}

.dashboard-form {
  display: grid;
  gap: 0.7rem;
}

label {
  display: grid;
  gap: 0.32rem;
  color: #2a3a37;
  font-size: 0.92rem;
  font-weight: 600;
}

input,
textarea,
select {
  border: 1px solid #cfd8d4;
  border-radius: 10px;
  background: #fff;
  padding: 0.57rem 0.64rem;
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(122, 31, 49, 0.26);
  border-color: rgba(122, 31, 49, 0.36);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.68rem;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.check-label input {
  width: 18px;
  height: 18px;
}

.item-list {
  display: grid;
  gap: 0.6rem;
}

.dash-item {
  border: 1px solid #d7ded9;
  border-radius: 11px;
  padding: 0.7rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.dash-item:hover {
  border-color: rgba(122, 31, 49, 0.24);
  box-shadow: 0 10px 24px rgba(16, 29, 24, 0.1);
}

.dash-item h3 {
  margin: 0.42rem 0;
  font-size: 1.02rem;
}

.dash-item .summary,
.dash-item .meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dash-item .meta {
  margin-top: 0.4rem;
  font-size: 0.82rem;
}

.dash-actions {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.dash-actions button {
  border: 1px solid #cdd8d3;
  border-radius: 8px;
  background: #fff;
  font-size: 0.84rem;
  padding: 0.28rem 0.56rem;
  cursor: pointer;
}

.dash-actions button.danger {
  color: var(--alert);
  border-color: rgba(190, 58, 52, 0.3);
}

.lists-panel .panel:first-child,
.lists-panel .panel:last-child {
  min-height: 360px;
}

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

@media (max-width: 1024px) {
  .top-ribbon-main {
    grid-template-columns: 1fr;
  }

  .primary-nav-inline {
    justify-content: flex-start;
  }

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

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

  .ad-leaderboard {
    width: min(800px, 92vw);
  }

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

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

  .content-grid,
  .article-layout,
  .contact-page-grid,
  .dashboard-panels,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .footer-social {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .top-ribbon,
  .dashboard-head-row {
    align-items: start;
    flex-direction: column;
  }

  .top-ribbon-meta {
    width: 100%;
    justify-content: space-between;
  }

  .primary-nav {
    border-radius: 16px;
  }

  .ad-leaderboard {
    width: 100%;
    height: 110px;
    min-height: 110px;
  }

  .primary-nav {
    gap: 0.8rem;
  }

  .more-dropdown {
    position: static;
    min-width: 100%;
    margin-top: 0.35rem;
    box-shadow: none;
  }

  .upcoming-events-grid {
    grid-template-columns: 1fr;
  }

  .mag-gate-grid,
  .mag-grid,
  .mag-card {
    grid-template-columns: 1fr;
  }

  .health-indicator {
    justify-self: start;
  }

  .mag-access-selected {
    grid-template-columns: 1fr;
  }

  .mag-shelf-head {
    align-items: start;
    flex-direction: column;
  }

  .hero-content {
    padding: 1rem;
  }

  .section-title-row {
    flex-direction: column;
    align-items: start;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .magazine-cards {
    grid-template-columns: 1fr;
  }
}
