:root {
  --ink: #1a2421;
  --paper: #f3efe6;
  --paper-deep: #e7e0d2;
  --moss: #1f5c4d;
  --moss-deep: #143d34;
  --amber: #c45c26;
  --line: rgba(26, 36, 33, 0.12);
  --white: #fffdf8;
  --shadow: 0 18px 40px rgba(20, 40, 34, 0.12);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --font-ui: Helvetica, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(31, 92, 77, 0.18), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(196, 92, 38, 0.12), transparent 55%),
    linear-gradient(180deg, #f7f3ea 0%, var(--paper) 40%, #ebe4d6 100%);
  min-height: 100vh;
}

a { color: var(--moss-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--amber); }

.wrap { width: min(1100px, calc(100% - 2rem)); margin-inline: auto; }
.wrap-full { width: calc(100% - 2rem); max-width: none; margin-inline: auto; }

/* Community home: 15% menu · 65% articles · 20% ads */
.body-community-home { min-height: 100vh; }
.site-header-compact .header-inner { gap: 1rem; }
.site-header-compact .brand {
  font-size: clamp(2.25rem, 3.5vw, 2.65rem);
  line-height: 1.05;
}
.header-community-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.15rem;
  margin-left: auto;
}
.header-community {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.15;
}
.header-local-time {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(26, 36, 33, 0.65);
  white-space: nowrap;
}
.home-main-bleed { padding: 0; }
.home-shell {
  display: grid;
  grid-template-columns: 15% 65% 20%;
  gap: 0;
  min-height: calc(100vh - 4rem);
  width: 100%;
  align-items: stretch;
}
.body-community-home:has(.story-view) .home-shell {
  height: calc(100vh - 4.25rem);
  min-height: 0;
  overflow: hidden;
}
.body-community-home:has(.story-view) .home-ads {
  overflow-y: auto;
}
.home-col { min-width: 0; }
.home-menu {
  background: rgba(255, 253, 248, 0.92);
  border-right: 1px solid var(--line);
  padding: 1.25rem 0.85rem 2rem;
  font-family: var(--font-ui);
}
body.has-site-color .home-menu {
  background: color-mix(in srgb, var(--community-site-color) 92%, transparent);
}
.home-menu-inner { position: sticky; top: 4.25rem; }
.home-menu-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  min-width: 0;
}
.home-menu-kicker {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  min-width: 0;
  flex: 1 1 auto;
}
.menu-calendar-link {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  color: var(--moss-deep);
  text-decoration: none;
  border-radius: 7px;
}
.menu-calendar-link:hover,
.menu-calendar-link.is-active {
  color: var(--amber);
  background: rgba(196, 92, 38, 0.12);
}
.menu-calendar-icon {
  display: block;
}
.side-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.side-nav-group {
  margin: 0.35rem 0 0;
  border: 0;
}
.side-nav-group + .side-nav-group {
  margin-top: 0.15rem;
}
.side-nav-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.65rem 0 0.25rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  user-select: none;
}
.side-nav-summary::-webkit-details-marker { display: none; }
.side-nav-summary::after {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  opacity: 0.85;
  flex-shrink: 0;
}
.side-nav-group[open] > .side-nav-summary::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}
.side-nav-summary:hover {
  background: rgba(196, 92, 38, 0.1);
  color: #9a4318;
}
.side-nav-group-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0 0.15rem;
}
.side-nav-label {
  margin: 1rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(26, 36, 33, 0.55);
}
.side-nav-sublabel {
  margin: 0.55rem 0 0.2rem;
  padding-left: 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(26, 36, 33, 0.45);
}
.side-nav-link {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}
.side-nav-link.side-nav-front-page {
  font-size: 1.08rem;
  font-weight: 700;
}
.side-nav-link.side-nav-nested {
  padding-left: 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.side-nav-link:hover,
.side-nav-link.is-active {
  background: rgba(31, 92, 77, 0.12);
  color: var(--moss-deep);
}
.side-nav-logout { margin-top: 1.25rem; }

.story-review-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
}
.story-review-return {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 18rem;
  min-width: 0;
}
.story-review-return input[type="text"] {
  flex: 1 1 12rem;
  min-width: 10rem;
  margin: 0;
}

.home-main {
  padding: 1.5rem 1.5rem 3rem;
  background: transparent;
}
.home-main-header {
  position: sticky;
  top: 3.75rem;
  z-index: 10;
  margin: -0.35rem -0.5rem 1rem;
  padding: 0.35rem 0.5rem 0.85rem;
  background:
    linear-gradient(180deg, rgba(247, 243, 234, 0.97) 0%, rgba(243, 239, 230, 0.94) 70%, rgba(243, 239, 230, 0.88) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.home-main-header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}
.home-main-header-top--filters-only {
  justify-content: flex-end;
}
.home-main-header-top--filters-only .home-main-date-filters {
  margin-top: 0;
}
.home-front-page-welcome {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.home-greeting {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
  margin: 0.25rem 0 0;
}
.home-local-weather {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--moss-deep);
}
.home-weather-now {
  font-weight: 600;
}
.home-weather-range,
.home-weather-sun {
  color: var(--ink-muted, #4a5752);
}
.home-main-header-top h1 {
  flex: 1 1 12rem;
  min-width: 0;
}
.home-main-title-block {
  flex: 1 1 12rem;
  min-width: 0;
}
.home-main-title-block h1 {
  flex: none;
}
.home-section-name {
  margin: 0.15rem 0 0;
  font-family: var(--font-ui);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 700;
  color: var(--moss-deep);
  line-height: 1.25;
}
.section-news-feed {
  background-color: var(--section-feed-color);
  margin: -1.5rem;
  padding: 1.5rem;
  padding-bottom: 3rem;
  min-height: 100%;
}
.section-news-feed .home-main-header {
  background: var(--section-feed-color);
  border-bottom-color: rgba(26, 36, 33, 0.1);
}
.home-main-date-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0.35rem 0 0 auto;
  flex: 0 0 auto;
}
.home-main-date-filters select {
  min-width: 8.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--ink);
}
.home-main-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
  margin: 0.25rem 0 0.5rem;
}
.home-main-header .lede {
  font-size: 1.05rem;
  max-width: none;
  margin: 0 0 0.35rem;
}
.home-main-header .home-intro-html {
  margin-bottom: 0;
}
.home-feed-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 1.25rem 0 0.75rem;
}
.article-card { animation: rise 0.45s ease both; }
.article-card-headline-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 0.35rem;
}
.article-card-headline-row h3 {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.article-card-sections {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 0 1 auto;
  max-width: 45%;
  text-align: right;
}
.article-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 0.5rem;
}
.article-card-meta-left {
  min-width: 0;
}
.article-card-meta-date {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
  flex: 0 0 auto;
}
.article-card-body {
  overflow: auto;
}
.article-card-body::after {
  content: "";
  display: table;
  clear: both;
}
.article-card-photo {
  float: right;
  margin: 0 0 0.5rem 1rem;
}
.article-card-photo .story-photo-thumb {
  width: 7rem;
  height: 5.25rem;
}
.article-card-summary {
  margin: 0;
}

.home-ads {
  background: rgba(255, 248, 241, 0.65);
  border-left: 1px solid var(--line);
  padding: 1.25rem 0.9rem 2rem;
}
.home-ads-title {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  margin: 0 0 0.85rem;
}
.home-ads .ad-slot {
  margin-bottom: 0.85rem;
  border-left: 0;
  border-radius: 10px;
}
.ad-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.promo-slot .promo-banner {
  width: 100%;
  max-width: 200px;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}
.promo-banner-link {
  display: block;
  max-width: 200px;
}
.promo-banner-link:hover .promo-banner {
  opacity: 0.92;
}
.promo-slot .promo-square-link {
  display: block;
  margin-top: 0.55rem;
}
.promo-slot .promo-square {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}
.articles-table.is-promotions .promo-col-start,
.articles-table.is-promotions .promo-col-end {
  width: 7.5rem;
  min-width: 7.5rem;
}
.articles-table.is-promotions .promo-col-verification { width: 14rem; min-width: 10rem; }
.articles-table.is-promotions .promo-col-impressions,
.articles-table.is-promotions .promo-col-clicks {
  width: 5.5rem;
  min-width: 4.5rem;
}
.articles-table.is-promotions .promo-stat-header,
.articles-table.is-promotions .promo-stat-cell {
  text-align: right;
}
.articles-table.is-promotions .articles-col-headline { width: auto; }
.articles-table.is-promotions .articles-headline-cell {
  overflow: hidden;
  max-width: 0;
}
.articles-table.is-promotions .articles-headline-link {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.articles-table.is-promotions .articles-byline {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.articles-table.is-promotions .articles-date-cell,
.articles-table.is-promotions th.articles-date-header {
  white-space: nowrap;
}
.articles-table .promo-verification-cell {
  text-align: left;
  white-space: normal;
}
.promo-form-preview {
  display: block;
  margin: 0.35rem 0 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.promo-form-preview-banner {
  width: 200px;
  height: 100px;
  object-fit: cover;
}
.promo-form-preview-square {
  width: 160px;
  height: 160px;
  object-fit: cover;
}

.home-main-inner .section.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.home-main-inner .layout-split {
  grid-template-columns: 1fr;
}

@media (max-width: 960px) {
  .home-shell {
    grid-template-columns: 1fr;
  }
  .home-menu,
  .home-ads {
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .home-menu-inner { position: static; }
  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .side-nav-label { width: 100%; margin-top: 0.5rem; }
  .side-nav-summary { width: 100%; margin-top: 0.5rem; }
  .article-card-headline-row {
    flex-wrap: wrap;
  }
  .article-card-sections {
    max-width: 100%;
    justify-content: flex-start;
  }
}

.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(243, 239, 230, 0.85);
  border-bottom: 1px solid var(--line);
}
body.has-site-color .site-header {
  background: color-mix(in srgb, var(--community-site-color) 85%, transparent);
}
.public-story-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(243, 239, 230, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(20, 40, 34, 0.06);
}
.public-story-header-inner {
  padding: 0.75rem 0 0.85rem;
}
.public-story-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}
.public-story-brand {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
}
.public-story-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.public-story-promo {
  margin: 0.55rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(26, 36, 33, 0.78);
  max-width: 52rem;
}
.public-story-promo a {
  font-weight: 700;
  text-decoration: none;
  color: var(--moss-deep);
}
.public-story-promo a:hover {
  color: var(--amber);
}
.public-story-main {
  padding-bottom: 0.5rem;
  min-height: 0;
}
.public-story-cta {
  margin: 0.5rem auto 2rem;
}
.public-story-cta-panel {
  background: rgba(255, 253, 248, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}
.public-story-cta-panel h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
}
.public-story-cta-panel p {
  margin: 0 0 1rem;
  max-width: 40rem;
}
.start-site-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 0.75rem;
  max-width: 18ch;
}
.start-site-panel {
  margin-top: 1.15rem;
}
.start-site-list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.55;
}
.start-site-list li {
  margin-bottom: 0.35rem;
}
@media (max-width: 640px) {
  .public-story-header-row {
    align-items: flex-start;
  }
  .public-story-nav {
    width: 100%;
  }
  .public-story-nav .btn {
    flex: 1 1 auto;
    text-align: center;
  }
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem 0;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--moss-deep);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--ink); }
.nav a:hover { color: var(--moss); }

.hero {
  padding: 3.5rem 0 2.5rem;
  animation: rise 0.7s ease both;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
  max-width: 14ch;
}
.hero p.lede {
  font-size: 1.15rem;
  max-width: 40rem;
  margin: 0 0 1.5rem;
  color: rgba(26,36,33,0.8);
}
.hero-panel {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
  background:
    linear-gradient(135deg, rgba(20,61,52,0.72), rgba(196,92,38,0.35)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath fill='%23ffffff22' d='M0 80h160M80 0v160'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #1f5c4d, #2f3e46);
  box-shadow: var(--shadow);
  display: grid;
  place-items: end start;
  padding: 1.5rem;
  color: white;
  animation: fadein 1s ease both 0.15s;
}
.hero-panel strong { font-family: var(--font-display); font-size: 1.4rem; display: block; }

.section { padding: 1.5rem 0 3rem; }
.section h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 1rem;
}
.login-community-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
}
.login-form-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0 1.25rem;
}
.login-form-links a:last-child {
  margin-left: auto;
  text-align: right;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.community-tile {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.6s ease both;
}
.community-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.community-tile h3 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}
.muted { color: rgba(26,36,33,0.65); }
.small { font-size: 0.9rem; }

.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  background: var(--moss);
  color: white;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--moss-deep); color: white; }
.btn-small { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
.btn-secondary { background: transparent; color: var(--moss-deep); border: 1px solid var(--moss); }
.btn-secondary:hover { background: rgba(31,92,77,0.08); color: var(--moss-deep); }
.btn-danger { background: #8b2e2e; }
.btn-amber { background: var(--amber); }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.panel h3 { margin-top: 0; font-family: var(--font-display); }

.form-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid .full { grid-column: 1 / -1; }
.form-grid .half { grid-column: 1 / 2; }
.field-hint {
  display: block;
  margin-top: 0.3rem;
}
.event-short-section-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.9rem 1.25rem;
}
.event-short-name-field {
  flex: 1 1 auto;
  min-width: 14rem;
  width: auto;
  max-width: none;
  margin: 0;
}
.event-short-name-field input {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.event-section-field {
  flex: 0 1 14rem;
  margin: 0 0 0 auto;
  min-width: 10rem;
  text-align: left;
}
.event-section-field select {
  width: 100%;
  min-width: 10rem;
}
.event-datetime-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem 1.25rem;
  align-items: start;
}
.event-datetime-row label {
  margin: 0;
  min-width: 0;
}
.event-datetime-row input {
  width: 100%;
  box-sizing: border-box;
}
.user-form-name-type-row {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(9rem, 11rem);
  align-items: end;
}
.user-form-type {
  justify-self: end;
  text-align: right;
  width: 100%;
  max-width: 11rem;
}
.user-form-type select,
.user-form-type input {
  width: 100%;
  box-sizing: border-box;
}
.user-form-email-phone-row {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr) 11rem;
  align-items: end;
}
.user-form-phone input {
  width: 100%;
  box-sizing: border-box;
}
.user-search-form {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
}
.users-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.users-page-header h2 {
  margin: 0;
}
.users-page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-left: auto;
}
.user-search-form input[type="search"] {
  width: 14rem;
  min-width: 8rem;
  max-width: 20rem;
  flex: 1 1 auto;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}
.user-search-form .btn,
.user-search-form .btn-small {
  flex-shrink: 0;
  white-space: nowrap;
}
.article-summary-price-row {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr) 8.5rem;
  align-items: end;
}
.section-form-fields {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.section-form-title-row {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr) 6.5rem;
  align-items: end;
}
.section-form-sort input {
  width: 100%;
}
.section-form-description {
  display: block;
  width: 100%;
}
.section-form-description input {
  width: 100%;
  box-sizing: border-box;
}
.section-form-active {
  display: block;
  max-width: 8rem;
}
.section-form-active select {
  width: 100%;
}
.section-form-color {
  display: block;
  max-width: 16rem;
}
.color-dropdown {
  position: relative;
}
.color-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.color-dropdown-trigger::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-left: auto;
  border-right: 2px solid rgba(26, 36, 33, 0.55);
  border-bottom: 2px solid rgba(26, 36, 33, 0.55);
  transform: rotate(45deg) translateY(-1px);
}
.color-dropdown-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 36, 33, 0.12);
  max-height: 14rem;
  overflow-y: auto;
}
.color-dropdown-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
}
.color-dropdown-option:hover,
.color-dropdown-option.is-selected {
  background: rgba(26, 36, 33, 0.06);
}
.section-color-swatch {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 36, 33, 0.12);
  flex-shrink: 0;
}
.section-color-swatch-none {
  background:
    linear-gradient(135deg, transparent 46%, rgba(26, 36, 33, 0.28) 48%, rgba(26, 36, 33, 0.28) 52%, transparent 54%),
    #fff;
}
.section-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.section-form-delete {
  margin-left: auto;
}
.article-summary-field,
.article-price-field {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.article-price-field input {
  width: 100%;
}
@media (max-width: 640px) {
  .article-summary-price-row {
    grid-template-columns: 1fr;
  }
}
label { display: grid; gap: 0.35rem; font-family: var(--font-ui); font-weight: 600; font-size: 0.92rem; }
input, select, textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
textarea { min-height: 140px; resize: vertical; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
table th {
  font-family: var(--font-ui);
}
.sections-table {
  table-layout: fixed;
}
.sections-table .sections-col-sort { width: 5%; }
.sections-table .sections-col-color { width: 8%; }
.sections-table .sections-col-name { width: 57%; }
.sections-table .sections-col-articles { width: 5%; }
.sections-table .sections-col-edit { width: 25%; }
.sections-table td:nth-child(1),
.sections-table th:nth-child(1),
.sections-table td:nth-child(4),
.sections-table th:nth-child(4),
.sections-table td:nth-child(5),
.sections-table th:nth-child(5) {
  text-align: right;
}
.sections-table td:nth-child(2),
.sections-table th:nth-child(2) {
  text-align: center;
}
.sections-table td:nth-child(3) {
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem;
  border-radius: 12px;
  background: rgba(26, 36, 33, 0.04);
  border: 1px solid var(--line);
  font-family: var(--font-ui);
}
.desk-type-toggle {
  display: inline-flex;
  margin: 0 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  font-family: var(--font-ui);
}
.desk-type-link {
  padding: 0.45rem 0.95rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: rgba(26, 36, 33, 0.7);
}
.desk-type-link + .desk-type-link {
  border-left: 1px solid var(--line);
}
.desk-type-link:hover {
  background: var(--paper-deep);
  color: var(--moss-deep);
}
.desk-type-link.is-active {
  background: var(--moss);
  color: #fffdf8;
}
.desk-type-link.is-active:hover {
  background: var(--moss-deep);
  color: #fffdf8;
}

.calendar-page {
  padding: 0.25rem 0 1.5rem;
}
.calendar-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}
.calendar-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}
.calendar-month-label {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-height: calc(100vh - 12rem);
}
.calendar-weekday {
  background: rgba(31, 92, 77, 0.1);
  padding: 0.55rem 0.4rem;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(26, 36, 33, 0.7);
}
.calendar-day {
  background: rgba(255, 253, 248, 0.96);
  min-height: 7.5rem;
  padding: 0.4rem 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.calendar-day.is-empty {
  background: rgba(243, 239, 230, 0.55);
}
.calendar-day.is-today {
  box-shadow: inset 0 0 0 2px var(--moss);
}
.calendar-day-number {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  color: rgba(26, 36, 33, 0.75);
}
.calendar-day-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
}
.calendar-event-link {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  color: var(--moss-deep);
  background: rgba(31, 92, 77, 0.1);
  border-radius: 4px;
  padding: 0.18rem 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-event-link:hover {
  background: rgba(31, 92, 77, 0.18);
  color: var(--amber);
}
.calendar-event-time {
  color: rgba(26, 36, 33, 0.55);
  font-weight: 700;
  margin-right: 0.2rem;
}
@media (max-width: 900px) {
  .calendar-grid {
    min-height: 0;
  }
  .calendar-day {
    min-height: 5.5rem;
  }
}

.articles-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
}
.articles-list-toolbar .tabs {
  flex: 1 1 auto;
}
.tab-link {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: rgba(26, 36, 33, 0.72);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab-link:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
}
.tab-link.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(26, 36, 33, 0.08);
}
.articles-date-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.articles-date-filters select {
  min-width: 8.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--ink);
}

.story-photo-thumb-link {
  display: block;
  line-height: 0;
}
.story-photo-thumb {
  display: block;
  width: 4.5rem;
  height: 3.375rem;
  object-fit: cover;
  border-radius: 3px;
  background: rgba(26, 36, 33, 0.06);
}
.articles-table {
  table-layout: fixed;
}
.articles-table .articles-col-headline { width: auto; }
.articles-table.is-events .articles-col-headline { width: 50%; }
.articles-table .articles-col-price { width: 4.5rem; }
.articles-table .articles-col-status { width: 6.5rem; }
.articles-table .articles-col-event-date { width: 11.5rem; }
.articles-table .articles-col-created,
.articles-table .articles-col-published { width: 6.75rem; }
.articles-table.is-letters .articles-col-submitted { width: 11.5rem; }
.articles-table.is-letters .articles-submitted-cell,
.articles-table.is-letters .articles-submitted-header {
  overflow: visible;
  text-overflow: clip;
}
.articles-table .articles-col-opens,
.articles-table .articles-col-paid { width: 3.25rem; }
.articles-table .articles-col-actions { width: 9rem; min-width: 9rem; }
.articles-table .articles-price-cell,
.articles-table .articles-opens-cell,
.articles-table .articles-paid-cell,
.articles-table th.articles-price-header,
.articles-table th.articles-opens-header,
.articles-table th.articles-paid-header {
  text-align: center;
}
.articles-table .articles-actions-cell {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}
.articles-table .articles-actions-cell form {
  display: inline-flex;
  margin: 0;
  flex-shrink: 0;
}
.articles-table .articles-actions-cell .btn-small {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.articles-table .articles-headline-cell {
  overflow: hidden;
  max-width: 0; /* force fixed-layout table to let this column take leftover + ellipsis */
}
.articles-table .articles-headline-link {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.articles-table .articles-byline {
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.articles-excerpt {
  margin-top: 0.35rem;
  overflow: auto;
}
.articles-excerpt::after {
  content: "";
  display: table;
  clear: both;
}
.articles-excerpt-photo {
  float: right;
  margin: 0 0 0.35rem 0.75rem;
}
.articles-excerpt-photo .story-photo-thumb {
  width: 4.5rem;
  height: 3.375rem;
}
.articles-excerpt-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  color: rgba(26, 36, 33, 0.78);
}
.articles-table .articles-date-cell,
.articles-table th.articles-date-header {
  font-size: inherit;
  line-height: 1.3;
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.articles-table .articles-price-cell,
.articles-table .articles-opens-cell,
.articles-table .articles-paid-cell,
.articles-table th.articles-price-header,
.articles-table th.articles-opens-header,
.articles-table th.articles-paid-header {
  text-align: center;
}
.story-photo {
  margin: 0 0 1.25rem;
}
.story-photo img,
.story-photo-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.story-photo-preview {
  margin-top: 0.25rem;
}

th, td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(26,36,33,0.6); }

.letter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.65rem;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: var(--font-ui);
}
.letter-bar-item {
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1;
}
.letter-bar-item:hover {
  background: rgba(31, 92, 77, 0.12);
  color: var(--moss-deep);
}
.letter-bar-item.is-active {
  background: var(--moss);
  color: #fffdf8;
}
.letter-bar-item.is-active:hover {
  background: var(--moss-deep);
  color: #fffdf8;
}
.letter-bar-item.is-disabled {
  color: rgba(26, 36, 33, 0.28);
  cursor: default;
  font-weight: 600;
}

.facebook-share {
  margin-top: 1.25rem;
}
.facebook-share-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.facebook-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.facebook-share-link-field {
  flex: 1 1 220px;
  margin: 0;
  min-width: 0;
}
.facebook-share-input {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.btn-facebook {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}
.btn-facebook:hover {
  background: #0f5ecb;
  border-color: #0f5ecb;
  color: #fff;
}

.flash {
  margin: 1rem auto 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-weight: 600;
}
.flash-bottom {
  position: sticky;
  bottom: 0;
  z-index: 40;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: 0 -4px 18px rgba(26, 36, 33, 0.08);
}
.flash-bottom.wrap,
.flash-bottom.wrap-full {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.flash-success { background: #dff3ea; color: #14553f; }
.flash-error { background: #fde2e0; color: #7a1f1a; }

.layout-split {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 2fr 1fr;
}
.story-body { font-size: 1.08rem; line-height: 1.7; }
.story-body p { margin: 0 0 1rem; }

/* Article view: sticky meta/headline; only body content scrolls */
.story-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
.story-view-header {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 0 0.15rem;
  padding: 0 0 0.75rem;
  background:
    linear-gradient(180deg, rgba(247, 243, 234, 0.98) 0%, rgba(243, 239, 230, 0.96) 75%, rgba(243, 239, 230, 0.9) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.story-view-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 0 1.5rem;
}
.story-view-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.15;
}
.home-main:has(.story-view) {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 4.25rem);
  overflow: hidden;
  padding-bottom: 0.75rem;
}
.home-main:has(.story-view) .home-main-inner {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.home-main:has(.story-view) .story-view-header {
  top: 0;
}
.body-public-story {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
.body-public-story .public-story-header {
  flex: 0 0 auto;
}
.body-public-story .public-story-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.body-public-story .public-story-main .story-view {
  height: 100%;
  max-width: min(1100px, calc(100% - 2rem));
  width: calc(100% - 2rem);
  margin-inline: auto;
  padding-top: 1rem;
}
.body-public-story .story-view-header {
  background:
    linear-gradient(180deg, rgba(247, 243, 234, 0.98) 0%, rgba(243, 239, 230, 0.96) 80%, rgba(243, 239, 230, 0.92) 100%);
}
.body-public-story .public-story-footer {
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.body-public-story .public-story-cta {
  margin: 1.25rem 0 0.5rem;
}
.story-view-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem 1rem;
  margin: 0 0 0.5rem;
  width: 100%;
}
.story-view-meta-left {
  min-width: 0;
}
.story-view-meta .badge,
.story-view-meta .story-front-page-form,
.story-view-meta .story-view-section {
  justify-self: end;
  align-self: start;
  flex-shrink: 0;
}
.story-view-meta .story-front-page-form {
  margin: 0;
}
.story-placement-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  justify-content: flex-end;
  align-items: center;
}
.story-view-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 0.5rem;
}
.story-view-headline h2 {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.story-view-summary {
  margin: 0.35rem 0 0.75rem;
}
.story-view-dates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 0.75rem;
}
.story-view-dates-left {
  min-width: 0;
}
.story-view-reads {
  margin-left: auto;
  flex-shrink: 0;
}
.story-view-headline .story-placement-form {
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
  margin: 0;
  margin-top: 0.15rem;
}
.story-front-page-check {
  margin: 0;
  white-space: nowrap;
}
.tag-sticky {
  background: rgba(31, 92, 77, 0.14);
  color: var(--moss-deep);
  font-weight: 700;
}
.story-sections-select select {
  min-width: 9rem;
  max-width: 14rem;
  padding: 0.35rem 0.65rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.story-sections-select select:disabled {
  opacity: 0.65;
}
.paywall {
  border: 1px dashed var(--amber);
  background: linear-gradient(180deg, #fff7ef, #fff);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.paywall-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
}
.paywall-actions form {
  margin: 0;
}
.article-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.article-status-control select {
  min-width: 9.5rem;
  font-weight: 700;
}
.article-status-badge {
  align-self: flex-start;
  font-size: 0.9rem;
  padding: 0.55rem 0.9rem;
}
.article-editor-stats {
  margin-top: 1.25rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.stat-row {
  display: flex; flex-wrap: wrap; gap: 1rem;
}
.stat {
  flex: 1 1 140px;
  background: var(--paper-deep);
  border-radius: 12px;
  padding: 1rem;
  font-family: var(--font-ui);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.deposit-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}
.deposit-step {
  color: var(--muted);
}
.deposit-step.is-complete {
  color: var(--moss-deep);
  font-weight: 600;
}
.deposit-step.is-complete::before {
  content: "✓ ";
}
.deposit-step.is-current {
  color: var(--ink);
  font-weight: 700;
}
.deposit-summary-amount {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0.25rem 0 0.75rem;
  color: var(--moss-deep);
}
.deposit-help-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.accounting-tabs {
  margin-top: 0.25rem;
}
.login-graph {
  margin-top: 0.75rem;
}
.login-graph-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  min-height: 220px;
  padding: 0.5rem 0 0;
  border-bottom: 1px solid var(--line);
}
.login-graph-day {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.login-graph-stack {
  width: 100%;
  max-width: 42px;
  min-height: 4px;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 6px 6px 2px 2px;
  overflow: hidden;
  background: rgba(26, 36, 33, 0.06);
}
.login-graph-seg {
  width: 100%;
  min-height: 3px;
  flex-grow: 0;
  flex-shrink: 0;
}
.login-graph-seg-single {
  background: var(--moss);
}
.login-graph-single .login-graph-bars {
  max-width: 42rem;
}
.login-graph-empty {
  flex: 1;
  background: transparent;
}
.login-graph-label,
.login-graph-count {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: rgba(26, 36, 33, 0.65);
  text-align: center;
  line-height: 1.1;
}
.login-graph-count {
  font-weight: 700;
  color: var(--ink);
}
.login-graph-legend {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.login-graph-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.login-graph-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
  display: inline-block;
}
.ad-slot {
  border-left: 3px solid var(--amber);
  padding: 0.75rem 0.9rem;
  background: #fff8f1;
  border-radius: 0 10px 10px 0;
  margin-bottom: 0.75rem;
}
.inline { display: inline; }
.linkish {
  background: none; border: 0; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; padding: 0;
}
.linkish:hover { color: var(--moss); }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
table td.actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}
table td.actions form {
  display: inline-flex;
  margin: 0;
  flex-shrink: 0;
}
table td.actions .btn-small {
  flex-shrink: 0;
  white-space: nowrap;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--paper-deep);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
}
.badge-pending { background: #ffe7c2; }
.badge-approved { background: #d7f0e3; }
.badge-rejected { background: #f7d4d1; }
.badge-draft { background: #e6e6e6; }
.badge-creating { background: #e6e6e6; }
.badge-completed { background: #ffe7c2; }
.badge-published { background: #d7f0e3; }

.tag {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  margin: 0.1rem 0.15rem 0.1rem 0;
  border-radius: 6px;
  background: rgba(31, 92, 77, 0.12);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
}
.tag-picker legend { font-family: var(--font-ui); font-weight: 700; }
.tag-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0.35rem 0;
}
.editor-toolbar-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.editor-mode-toggle {
  display: inline-flex;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.editor-mode-toggle button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font: inherit;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(26, 36, 33, 0.7);
}
.editor-mode-toggle button + button {
  border-left: 1px solid var(--line);
}
.editor-mode-toggle button:hover {
  background: var(--paper-deep);
}
.editor-mode-toggle button.is-active {
  background: var(--moss);
  color: #fffdf8;
}
.editor-mode-toggle button.is-active:hover {
  background: var(--moss-deep);
}
.editor-toolbar button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font: inherit;
}
.editor-toolbar button:hover { background: var(--paper-deep); }
.editor-toolbar button:disabled {
  opacity: 0.45;
  cursor: default;
  background: #fff;
}
.editor-toolbar button:disabled:hover {
  background: #fff;
}
.article-editor {
  min-height: 220px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  line-height: 1.6;
}
.article-editor-html {
  display: block;
  width: 100%;
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.45;
  resize: vertical;
  white-space: pre-wrap;
}
.article-editor:focus,
.article-editor-html:focus {
  outline: 2px solid rgba(31, 92, 77, 0.35);
  outline-offset: 1px;
}
.return-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  margin-top: 2rem;
  color: rgba(26,36,33,0.75);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 800px) {
  .form-grid, .layout-split { grid-template-columns: 1fr; }
  .form-grid .half { grid-column: 1 / -1; }
  .event-short-section-row {
    flex-direction: column;
    align-items: stretch;
  }
  .event-short-name-field,
  .event-short-name-field input {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
  }
  .event-datetime-row {
    grid-template-columns: 1fr;
  }
  .event-section-field {
    margin-left: 0;
    width: 100%;
    flex: 1 1 auto;
  }
  .section-form-title-row,
  .user-form-email-phone-row,
  .user-form-name-type-row {
    grid-template-columns: 1fr;
  }
  .user-form-type {
    justify-self: stretch;
    max-width: none;
    text-align: left;
  }
  .users-page-header-actions {
    width: 100%;
    margin-left: 0;
  }
  .user-search-form input[type="search"] {
    max-width: none;
  }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .header-community-block {
    align-self: flex-end;
    width: 100%;
  }
  .hero { padding-top: 2rem; }
}
