:root {
  color-scheme: light;
  --bg: #fff6fa;
  --panel: #ffffff;
  --ink: #2c1722;
  --muted: #7b6470;
  --line: #f0d7e3;
  --teal: #e94f93;
  --teal-soft: #ffe3f0;
  --coral: #d84171;
  --gold: #c4872f;
  --pink: #f36ca6;
  --pink-deep: #7d2449;
  --shadow: 0 16px 40px rgba(125, 36, 73, 0.1);
  --shadow-hover: 0 18px 44px rgba(125, 36, 73, 0.15);
  --focus-ring: #9f1f58;
  --focus-shadow: 0 0 0 3px rgba(159, 31, 88, 0.2);
  --control-height: 42px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.5;
}

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

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

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

:where(a, button, input, select):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #7d2449;
  color: #fff7fb;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f36ca6;
  color: #ffffff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #ffd8e9;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-list a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #ffe4f0;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.workspace {
  width: min(1240px, 100%);
  padding: 32px;
}

.homepage-hero {
  padding: 8px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.hero-copy {
  max-width: 780px;
}

.hero-subtitle {
  margin: 14px 0 6px;
  color: var(--pink-deep);
  font-size: 21px;
  font-weight: 800;
}

.hero-supporting {
  max-width: 680px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 15px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 900px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-stat {
  min-width: 0;
  padding: 14px 18px;
}

.hero-stat + .hero-stat {
  border-left: 1px solid var(--line);
}

.hero-stat span,
.hero-stat strong {
  display: block;
}

.hero-stat span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.hero-stat strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}

#lastUpdated {
  font-size: 18px;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--pink-deep);
  border-radius: 8px;
  font-weight: 800;
}

.hero-cta.primary {
  background: var(--pink-deep);
  color: #ffffff;
}

.hero-cta.secondary {
  background: transparent;
  color: var(--pink-deep);
}

.hero-cta:hover {
  border-color: var(--pink);
}

.hero-cta.primary:hover {
  background: #9b315e;
}

.hero-cta.secondary:hover {
  background: #fff0f7;
}

.explore-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.explore-link {
  position: relative;
  min-width: 0;
  min-height: 112px;
  padding: 16px 48px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.explore-link:hover {
  border-color: var(--pink);
  background: #ffffff;
}

.explore-kicker,
.explore-link strong,
.explore-link small {
  display: block;
}

.explore-kicker {
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.explore-link strong {
  margin-bottom: 4px;
  font-size: 17px;
}

.explore-link small {
  color: var(--muted);
  font-size: 13px;
}

.explore-arrow {
  position: absolute;
  top: 50%;
  right: 18px;
  color: var(--pink-deep);
  font-size: 22px;
  transform: translateY(-50%);
}

.content-area,
#content,
#members,
#timeline {
  scroll-margin-top: 18px;
}

.latest-showcase {
  min-height: 260px;
  padding: 28px 0 24px;
}

.latest-heading {
  align-items: center;
}

.latest-more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--pink-deep);
  font-size: 13px;
  font-weight: 800;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.latest-more-link:hover,
.latest-more-link:focus-visible {
  border-color: var(--pink);
  background: #fff0f7;
}

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

.latest-card,
.latest-skeleton {
  min-width: 0;
  min-height: 196px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.latest-skeleton {
  background: linear-gradient(90deg, #fff0f7 25%, #fff8fb 50%, #fff0f7 75%);
  background-size: 200% 100%;
}

.latest-card {
  display: flex;
  flex-direction: column;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.latest-card:hover,
.latest-card:focus-within {
  border-color: #e9b8ce;
  box-shadow: var(--shadow-hover);
}

.latest-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.latest-card h3 {
  display: -webkit-box;
  min-height: 46px;
  margin-bottom: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.latest-card .source-link {
  margin-top: auto;
}

.latest-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #fff0f7;
}

.content-feed-section {
  padding-top: 28px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0;
}

.status-pill,
.count-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  min-height: 108px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
  line-height: 1;
}

.metric.accent {
  border-color: #f6bfd6;
  background: #fff0f7;
}

.control-strip {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 12px;
}

.public-control-strip {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 10px 16px;
}

.search-primary-row {
  min-width: 0;
}

.search-primary-row .search-box {
  min-width: 0;
}

.advanced-filters {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.filter-toggle-button {
  display: none;
  min-height: var(--control-height);
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.filter-toggle-button span {
  display: inline-flex;
  min-width: 22px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f1edf0;
  color: var(--muted);
  font-size: 12px;
}

.filter-toggle-button.has-filters span {
  background: #eadde3;
  color: var(--pink-deep);
}

.active-filters {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  display: inline-flex;
  min-height: 32px;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid #d8ccd2;
  border-radius: 999px;
  background: #f6f3f5;
  color: #5f555a;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.filter-chip span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip:hover,
.filter-chip:focus-visible {
  border-color: #bdaab3;
  background: #eee8eb;
}

.search-status {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.search-status:empty {
  display: none;
}

.content-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 420px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.content-tabs button {
  min-height: var(--control-height);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.content-tabs button.is-active {
  background: var(--pink-deep);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(125, 36, 73, 0.16);
}

.nav-list a.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.public-control-strip .select-box { width: 150px; }

.clear-filters-button {
  min-height: var(--control-height);
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--pink-deep);
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.clear-filters-button:hover:not(:disabled),
.clear-filters-button:focus-visible:not(:disabled) {
  border-color: var(--pink);
  background: #fff0f7;
}

.clear-filters-button:disabled {
  color: #a49ba0;
  cursor: default;
  background: #f7f5f6;
}

.filter-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.search-box {
  display: grid;
  gap: 6px;
  min-width: min(360px, 100%);
  color: var(--muted);
  font-size: 13px;
}

.search-box input,
.select-box select {
  width: 100%;
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.select-box {
  display: grid;
  gap: 6px;
  min-width: 150px;
  color: var(--muted);
  font-size: 13px;
}

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

.search-box input:focus-visible,
.select-box select:focus-visible {
  border-color: var(--focus-ring);
  box-shadow: var(--focus-shadow);
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(68px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.status-filter {
  grid-template-columns: repeat(4, minmax(78px, 1fr));
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segmented button.is-active {
  background: var(--teal);
  color: #ffffff;
}

.section-block {
  padding-top: 34px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.content-area .section-heading {
  margin-bottom: 16px;
}

.content-area .section-heading h2 {
  font-size: 25px;
  line-height: 1.2;
}

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

.content-card,
.member-card,
.timeline-item,
.video-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.content-card {
  min-height: 266px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.content-card:hover,
.content-card:focus-within {
  border-color: #e9b8ce;
  box-shadow: var(--shadow-hover);
}

.news-card h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-card .summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.card-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.type-badge,
.member-number,
.importance,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.type-badge {
  background: var(--teal-soft);
  color: #07544e;
}

.type-badge.video {
  background: #ffe7ef;
  color: #a51f59;
}

.importance {
  background: #fff1d8;
  color: #7c551b;
}

.status-badge.ready {
  border-color: #c9e7d8;
  background: #e7f6ee;
  color: #1b6b3e;
}

.status-badge.pending {
  border-color: #f6bfd6;
  background: #fff0f7;
  color: #a51f59;
}

.status-badge.rejected {
  background: #f1edf0;
  color: #66505b;
}

.meta-line,
.member-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.summary {
  color: #405049;
  font-size: 14px;
}

.content-area .summary {
  color: #5f4b55;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag-row span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.source-link,
.ig-link,
.member-filter-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.source-link:hover,
.ig-link:hover,
.member-filter-button:hover {
  background: var(--ink);
  color: #ffffff;
}

.content-area .source-link {
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.content-area .source-link:focus-visible {
  background: var(--ink);
  color: #ffffff;
}

.source-link.compact {
  margin-top: auto;
  width: 100%;
}

.member-filter-button {
  background: #ffffff;
}

.video-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
}

.video-card {
  overflow: hidden;
  min-height: 342px;
  display: flex;
  flex-direction: column;
}

.video-content-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feed-video-card {
  min-height: 430px;
}

.feed-video-card .video-body {
  min-height: 240px;
}

.feed-video-card .video-body h3 {
  min-height: 46px;
}

.feed-video-card .summary {
  display: -webkit-box;
  margin-bottom: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.video-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.video-members {
  margin: 0;
  color: var(--pink-deep);
  font-size: 13px;
  font-weight: 800;
}

.load-more-row {
  display: flex;
  justify-content: center;
  padding-top: 18px;
}

.load-more-button {
  min-width: 220px;
  min-height: var(--control-height);
  padding: 8px 16px;
  border: 1px solid var(--pink-deep);
  border-radius: 8px;
  background: #ffffff;
  color: var(--pink-deep);
  font-weight: 800;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.load-more-button:hover,
.load-more-button:focus-visible {
  background: var(--pink-deep);
  color: #ffffff;
}

.video-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #d9e3de;
}

.video-body {
  padding: 12px;
  min-height: 130px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.video-body h3 {
  display: -webkit-box;
  min-height: 50px;
  margin-bottom: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-date {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.quality-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 14px;
}

.quality-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.quality-panel h3 {
  margin-bottom: 12px;
}

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

.quality-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.quality-item h4 {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.4;
}

.quality-item p {
  margin-bottom: 0;
  color: var(--coral);
  font-size: 13px;
  font-weight: 700;
}

.quality-notes {
  margin: 0;
  padding-left: 18px;
  color: #405049;
}

.quality-notes li + li {
  margin-top: 8px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-item,
.youtube-review-item,
.incremental-review-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-item-main,
.youtube-review-main {
  min-width: 0;
}

.admin-item-side {
  display: grid;
  align-content: start;
  gap: 10px;
  color: var(--coral);
  font-size: 14px;
}

.youtube-review-list {
  display: grid;
  gap: 12px;
}

.news-enrichment-list {
  display: grid;
  gap: 12px;
}

.news-enrichment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.news-enrichment-heading {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: end;
}

.news-enrichment-heading h3 {
  margin: 8px 0 5px;
}

.news-input-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.news-input-field input,
.news-input-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.news-input-field input {
  min-height: 42px;
}

.news-input-field textarea {
  resize: vertical;
}

.news-input-field input:focus,
.news-input-field textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.review-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 8px;
}

.review-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff0f7;
  color: var(--pink-deep);
  font-size: 12px;
  font-weight: 800;
}

.admin-control-strip {
  top: 0;
}

.admin-savebar {
  position: sticky;
  top: 78px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #efb7cf;
  border-radius: 8px;
  background: #fffafd;
  box-shadow: 0 10px 30px rgba(125, 36, 73, 0.12);
}

.admin-savebar strong,
.admin-savebar span {
  display: block;
}

.admin-savebar strong {
  font-size: 14px;
}

.admin-savebar strong.is-dirty {
  color: var(--coral);
}

.admin-savebar span {
  color: var(--muted);
  font-size: 12px;
}

.admin-save-actions,
.decision-buttons {
  display: flex;
  gap: 8px;
}

.primary-command,
.secondary-command,
.edit-review-button,
.decision-buttons button,
.dialog-close {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--pink-deep);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.primary-command {
  background: var(--pink-deep);
  color: #ffffff;
}

.secondary-command,
.edit-review-button,
.decision-buttons button,
.dialog-close {
  background: #ffffff;
  color: var(--pink-deep);
}

.primary-command:disabled,
.secondary-command:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.edit-review-button {
  width: 100%;
}

.decision-buttons button {
  flex: 1;
}

.review-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffafd;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(74, 24, 47, 0.28);
}

.review-dialog::backdrop {
  background: rgba(65, 31, 47, 0.52);
}

.review-dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 34px);
}

.review-dialog-header,
.review-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: #ffffff;
}

.review-dialog-header {
  border-bottom: 1px solid var(--line);
}

.review-dialog-header h2 {
  max-width: 760px;
  font-size: 19px;
  line-height: 1.35;
}

.dialog-close {
  width: 38px;
  padding: 0;
  font-size: 24px;
}

.review-dialog-body {
  display: grid;
  gap: 16px;
  padding: 18px;
  overflow-y: auto;
}

.review-dialog-body > .source-link {
  width: fit-content;
}

.review-fieldset {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.review-fieldset legend {
  padding: 0 6px;
  color: var(--pink-deep);
  font-size: 13px;
  font-weight: 800;
}

.editor-status-controls {
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  width: 100%;
}

.editor-status-controls label {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
}

.editor-status-controls label:has(input:checked) {
  background: var(--pink-deep);
  color: #ffffff;
}

.editor-status-controls input {
  accent-color: var(--pink-deep);
}

.editor-suggestion {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-left: 4px solid var(--pink);
  background: #fff0f7;
  font-size: 13px;
}

.member-option-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.member-option {
  position: relative;
  display: flex;
  min-width: 0;
  cursor: pointer;
}

.member-option input {
  position: absolute;
  opacity: 0;
}

.member-option span {
  width: 100%;
  min-height: 36px;
  padding: 7px 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-option input:checked + span {
  border-color: var(--pink);
  background: #ffe3f0;
  color: var(--pink-deep);
  font-weight: 800;
}

.note-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.note-field textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: var(--ink);
}

.review-dialog-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.review-dialog-footer #useSuggestionButton {
  margin-right: auto;
}

.admin-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 16px;
  transform: translateY(20px);
  border-radius: 8px;
  background: var(--pink-deep);
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: 160ms ease;
}

.admin-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.admin-toast.error {
  background: #8f2e42;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.member-overview-intro {
  max-width: 720px;
  margin: -6px 0 18px;
  color: var(--muted);
}

.member-card {
  min-height: 360px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.member-card.is-selected {
  border-color: var(--pink);
  box-shadow: 0 18px 44px rgba(233, 79, 147, 0.18);
}

.member-card h3 {
  margin-bottom: 4px;
}

.member-photo-wrap {
  position: relative;
  background: #fff0f7;
}

.member-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.member-body {
  padding: 14px 14px 10px;
}

.member-recent-update {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.member-number {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--pink-deep);
  backdrop-filter: blur(10px);
}

.member-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: auto;
  padding: 0 14px 14px;
}

.member-actions .ig-link,
.member-actions .member-filter-button {
  width: 100%;
  margin-top: 0;
}

.member-actions.single-action {
  grid-template-columns: 1fr;
}

.member-detail {
  margin-top: 18px;
}

.member-detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.member-detail-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  background: #fff0f7;
}

.member-detail-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #ffffff;
}

.member-detail-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.member-detail-copy h2 {
  font-size: 30px;
}

.member-detail-copy p {
  margin-bottom: 0;
  color: var(--muted);
}

.profile-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.profile-facts span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.member-detail-kicker {
  color: var(--pink-deep);
  font-size: 13px;
  font-weight: 800;
}

.member-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.member-stat-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--pink-deep);
  font-size: 13px;
  font-weight: 800;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.detail-actions .member-filter-button,
.detail-actions .ig-link {
  min-width: 132px;
  background: #ffffff;
}

.member-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.member-nav-pager {
  display: flex;
  gap: 8px;
}

.member-nav-button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.member-nav-button:hover:not(:disabled) {
  border-color: var(--pink);
  color: var(--pink-deep);
}

.member-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.member-recent-activity {
  padding: 18px 18px 0;
}

.recent-activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.recent-activity-card {
  display: flex;
  min-width: 0;
  min-height: 210px;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--pink);
  border-radius: 8px;
  background: #fffafd;
}

.recent-activity-card h4 {
  display: -webkit-box;
  margin-bottom: 8px;
  overflow: hidden;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.recent-activity-source {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.recent-activity-card .source-link {
  width: 100%;
  margin-top: auto;
}

.member-history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  padding: 18px;
}

.mini-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.mini-heading h3 {
  margin-bottom: 0;
}

.mini-heading .eyebrow {
  width: 100%;
}

.calibration-label,
.history-note {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid #f6bfd6;
  border-radius: 999px;
  background: #fff0f7;
  color: #a51f59;
  font-size: 12px;
  font-weight: 800;
}

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

.member-empty-state {
  min-height: 120px;
  align-content: center;
}

.member-empty-state h4 {
  margin-bottom: 6px;
}

.member-empty-state p {
  margin-bottom: 0;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffafd;
}

.history-item-main {
  min-width: 0;
}

.history-item h3 {
  display: -webkit-box;
  margin-bottom: 6px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.shared-line {
  margin-bottom: 6px;
  color: var(--pink-deep);
  font-size: 13px;
  font-weight: 800;
}

.history-item .summary {
  display: -webkit-box;
  margin-bottom: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-actions {
  display: grid;
  gap: 8px;
  align-content: end;
}

.compact-list .history-item {
  grid-template-columns: 1fr;
}

.timeline-section {
  padding-bottom: 24px;
}

.timeline-heading {
  margin-bottom: 8px;
}

.timeline-intro {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.timeline-milestones {
  margin-bottom: 34px;
}

.timeline-subheading,
.timeline-year-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.timeline-subheading {
  margin-bottom: 14px;
}

.timeline-subheading h3,
.timeline-year-heading h3 {
  margin: 0;
}

.timeline-subheading > p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.timeline-milestone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.timeline-milestone-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 190px;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--timeline-accent, var(--pink));
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.timeline-milestone-card:hover,
.timeline-milestone-card:focus-visible {
  border-color: #e4b0c7;
  border-top-color: var(--timeline-accent, var(--pink));
  box-shadow: var(--shadow-hover);
}

.timeline-milestone-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-milestone-card h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

.timeline-why {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.timeline-why span {
  display: block;
  margin-bottom: 3px;
  color: var(--pink-deep);
  font-size: 11px;
  font-weight: 800;
}

.timeline-why p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.timeline-chapters {
  display: grid;
  gap: 34px;
}

.timeline-year-heading {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.timeline-year-heading h3 {
  color: var(--pink-deep);
  font-size: 28px;
  line-height: 1;
}

.timeline-year-heading span {
  color: var(--muted);
  font-size: 13px;
}

.timeline-events {
  position: relative;
  display: grid;
  gap: 10px;
  padding-left: 24px;
}

.timeline-events::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 6px;
  width: 2px;
  background: var(--line);
  content: "";
}

.timeline-event {
  --timeline-accent: #b47291;
  position: relative;
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) minmax(120px, 170px);
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--timeline-accent);
  border-radius: 8px;
  background: var(--panel);
  scroll-margin-top: 20px;
}

.timeline-event::before {
  position: absolute;
  top: 22px;
  left: -27px;
  width: 10px;
  height: 10px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--timeline-accent);
  content: "";
}

.timeline-event.importance-5 {
  background: #fffafd;
  box-shadow: 0 10px 28px rgba(125, 36, 73, 0.08);
}

.timeline-event.importance-4 {
  border-left-width: 3px;
}

.timeline-event-date {
  color: var(--pink-deep);
  font-size: 13px;
  font-weight: 800;
}

.timeline-event-copy {
  min-width: 0;
}

.timeline-event-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.timeline-category,
.timeline-importance,
.timeline-original-type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.timeline-category {
  background: #f7edf2;
  color: #4d3440;
}

.timeline-importance {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.timeline-event-copy h4 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.45;
}

.timeline-event-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.timeline-original-type {
  justify-self: end;
  text-align: right;
  background: #f8f3f6;
  color: var(--muted);
}

.category-founding { --timeline-accent: #d84171; }
.category-training { --timeline-accent: #b17a28; }
.category-people { --timeline-accent: #6678a5; }
.category-activity { --timeline-accent: #43836f; }

.category-training .timeline-category { background: #fbf2df; }
.category-people .timeline-category { background: #edf0f8; }
.category-activity .timeline-category { background: #e8f3ef; }

.empty-state {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.no-result-state {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.empty-state-cta {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--pink-deep);
  border-radius: 8px;
  background: #ffffff;
  color: var(--pink-deep);
  font-weight: 800;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.empty-state-cta:hover,
.empty-state-cta:focus-visible {
  background: var(--pink-deep);
  color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .nav-list {
    display: flex;
    flex-wrap: wrap;
  }

  .overview-grid,
  .content-grid,
  .member-grid,
  .quality-layout,
  .member-history-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .public-control-strip { grid-template-columns: 1fr; }

  .search-primary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
  }

  .filter-toggle-button { display: inline-flex; align-items: center; gap: 7px; }

  .advanced-filters {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .advanced-filters.is-expanded { display: grid; }

  .public-control-strip .select-box { width: 100%; min-width: 0; }

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

  .hero-stat:nth-child(3) {
    border-left: 0;
  }

  .hero-stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .latest-showcase {
    min-height: 476px;
  }

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

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

  .timeline-event {
    grid-template-columns: 120px minmax(0, 1fr);
  }

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

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

  .timeline-original-type {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 18px;
  }

  .control-strip,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .overview-grid,
  .content-grid,
  .member-grid,
  .video-rail,
  .quality-layout,
  .member-history-layout,
  .member-detail-hero {
    grid-template-columns: 1fr;
  }

  .content-tabs {
    max-width: none;
  }

  .content-tabs button,
  .filter-toggle-button,
  .clear-filters-button,
  .filter-chip,
  .latest-more-link,
  .content-area .source-link,
  .load-more-button,
  .empty-state-cta {
    min-height: 44px;
  }

  .member-navigation {
    align-items: stretch;
    flex-direction: column;
  }

  .member-nav-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-nav-button {
    min-height: 44px;
  }

  .recent-activity-grid {
    grid-template-columns: 1fr;
  }

  .recent-activity-card {
    min-height: 0;
  }

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

  .public-control-strip .select-box,
  .public-control-strip .search-box { width: 100%; }

  .advanced-filters.is-expanded { grid-template-columns: 1fr; }

  .clear-filters-button {
    width: 100%;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

  .admin-item,
  .youtube-review-item,
  .incremental-review-item,
  .news-enrichment-item,
  .news-enrichment-heading {
    grid-template-columns: 1fr;
  }

  .admin-savebar,
  .admin-save-actions,
  .review-dialog-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-savebar {
    top: 0;
  }

  .review-dialog-footer #useSuggestionButton {
    margin-right: 0;
  }

  .member-option-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-stack,
  .segmented,
  .status-filter {
    width: 100%;
  }

  .sidebar {
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .homepage-hero {
    padding-top: 2px;
    padding-bottom: 22px;
  }

  .hero-subtitle {
    margin-top: 10px;
    font-size: 18px;
  }

  .hero-supporting {
    margin-bottom: 16px;
    font-size: 14px;
  }

  .hero-stat {
    padding: 12px;
  }

  .hero-stat strong {
    font-size: 21px;
  }

  #lastUpdated {
    font-size: 15px;
  }

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

  .hero-cta {
    width: 100%;
    padding: 0 12px;
  }

  .explore-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .explore-link {
    min-height: 86px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .content-area,
  #content,
  #members,
  #timeline {
    scroll-margin-top: 12px;
  }

  .timeline-subheading,
  .timeline-year-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .timeline-milestone-grid {
    grid-template-columns: 1fr;
  }

  .timeline-milestone-card {
    min-height: 0;
  }

  .timeline-chapters {
    gap: 28px;
  }

  .timeline-events {
    padding-left: 18px;
  }

  .timeline-events::before {
    left: 4px;
  }

  .timeline-event {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 14px;
  }

  .timeline-event::before {
    left: -22px;
  }

  .timeline-original-type {
    grid-column: auto;
    justify-self: start;
    text-align: left;
  }

  .latest-showcase {
    min-height: 650px;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .latest-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .latest-card,
  .latest-skeleton {
    min-height: 176px;
  }

  .latest-heading {
    align-items: flex-start;
  }

  .latest-more-link {
    width: 100%;
  }

  .content-feed-section {
    padding-top: 24px;
  }

  .content-card {
    padding: 16px;
  }

  .content-area .section-heading {
    margin-bottom: 12px;
  }
}
