:root {
  color: #1d211e;
  background: #edf7df;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 72% 12%, rgba(255, 205, 125, 0.44), transparent 0 22%, transparent 38%),
    radial-gradient(circle at 18% 24%, rgba(244, 184, 216, 0.35), transparent 0 18%, transparent 34%),
    radial-gradient(circle, rgba(73, 113, 80, 0.16) 0 3px, transparent 3px) 0 0 / 18px 18px,
    linear-gradient(135deg, #e7f6d8 0%, #f5f0d8 54%, #e5f3cf 100%);
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

.page {
  margin: 0 auto;
  max-width: 1160px;
  padding: 56px 24px 80px 220px;
}

.topbar {
  align-items: flex-start;
  display: grid;
  gap: 36px;
  left: 28px;
  pointer-events: none;
  position: fixed;
  top: 28px;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  pointer-events: auto;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: #31b45c;
  border: 3px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(47, 88, 56, 0.18);
  color: #fffaf1;
  display: inline-flex;
  font-size: 14px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.topbar nav {
  background: rgba(248, 235, 255, 0.86);
  border: 1px solid rgba(126, 96, 148, 0.18);
  border-radius: 34px;
  box-shadow: 0 24px 54px rgba(66, 74, 50, 0.14);
  display: grid;
  gap: 10px;
  padding: 12px;
  pointer-events: auto;
}

.nav-pill {
  align-items: center;
  border-radius: 999px;
  display: grid;
  gap: 12px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 52px;
  min-width: 152px;
  padding: 9px 16px 9px 10px;
  text-decoration: none;
}

.nav-pill:hover,
.nav-pill:focus-visible {
  background: rgba(218, 235, 224, 0.9);
  outline: 2px solid rgba(47, 139, 89, 0.18);
}

.nav-pill span:first-child {
  align-items: center;
  color: #1c9a52;
  display: inline-flex;
  font-size: 22px;
  font-weight: 900;
  justify-content: center;
}

.nav-pill span:last-child {
  white-space: nowrap;
}

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

.home-hero {
  align-items: center;
  display: grid;
  gap: 28px 36px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  min-height: 590px;
  padding: 46px 0 30px;
  position: relative;
}

.hero-title {
  color: #1b1d1d;
  font-size: 76px;
  font-weight: 950;
  line-height: 1.12;
  margin: 12px 0 0;
  max-width: 640px;
  text-shadow: 0 8px 0 rgba(105, 147, 86, 0.1);
}

.home-lede {
  color: #35413a;
  font-size: 22px;
  line-height: 1.65;
  margin: 24px 0 0;
  max-width: 760px;
}

.agent-card {
  background: rgba(255, 242, 255, 0.88);
  border: 1px solid rgba(165, 127, 183, 0.18);
  border-radius: 34px;
  box-shadow: 0 28px 70px rgba(75, 84, 60, 0.16);
  color: #2d2630;
  display: grid;
  gap: 18px;
  padding: 26px;
}

.agent-card-title,
.profile-command-card {
  align-items: center;
  display: flex;
  gap: 14px;
}

.agent-card h2 {
  font-size: 24px;
  margin: 3px 0 0;
}

.agent-card p {
  line-height: 1.6;
  margin: 0;
}

.agent-badge {
  align-items: center;
  background: #ff7a45;
  border-radius: 999px;
  box-shadow: 0 12px 22px rgba(255, 122, 69, 0.22);
  color: #fff7ed;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  height: 54px;
  justify-content: center;
  width: 54px;
}

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

.agent-icons span {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(95, 78, 104, 0.12);
  border-radius: 999px;
  color: #514355;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 11px;
}

.hero-orbit {
  bottom: 40px;
  height: 250px;
  pointer-events: none;
  position: absolute;
  right: 10px;
  width: 340px;
}

.orbit-card {
  align-items: center;
  background: #fffdf5;
  border: 2px solid rgba(45, 80, 54, 0.16);
  border-radius: 28px;
  box-shadow: 0 22px 54px rgba(66, 74, 50, 0.14);
  display: flex;
  font-weight: 950;
  justify-content: center;
  position: absolute;
}

.orbit-card-main {
  color: #265947;
  font-size: 30px;
  height: 112px;
  right: 68px;
  top: 48px;
  transform: rotate(-7deg);
  width: 144px;
}

.orbit-card-small {
  background: #fff1c2;
  color: #5f4a15;
  font-size: 24px;
  height: 86px;
  right: 188px;
  top: 126px;
  transform: rotate(8deg);
  width: 104px;
}

.paper-plane {
  color: #2cab61;
  font-size: 64px;
  position: absolute;
  right: 24px;
  top: 118px;
  transform: rotate(16deg);
}

.feature-row {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: -48px;
  position: relative;
  z-index: 1;
}

.feature-card {
  background: rgba(255, 248, 255, 0.88);
  border: 1px solid rgba(139, 111, 151, 0.14);
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(66, 74, 50, 0.12);
  min-height: 156px;
  padding: 22px;
}

.feature-card:nth-child(2) {
  background: rgba(255, 246, 204, 0.9);
}

.feature-card:nth-child(3) {
  background: rgba(235, 251, 238, 0.92);
}

.feature-icon {
  align-items: center;
  color: #239758;
  display: inline-flex;
  font-size: 26px;
  font-weight: 950;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.feature-card h2 {
  font-size: 24px;
  margin: 12px 0 8px;
}

.feature-card p {
  color: #4d5148;
  line-height: 1.55;
  margin: 0;
}

.feature-card h3 {
  font-size: 24px;
  margin: 12px 0 8px;
}

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

.card {
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid rgba(91, 112, 81, 0.16);
  border-radius: 24px;
  box-shadow: 0 16px 38px rgba(66, 74, 50, 0.1);
  padding: 20px;
}

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

.profile-card {
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(91, 112, 81, 0.16);
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(66, 74, 50, 0.12);
  display: grid;
  gap: 16px;
  min-height: 260px;
  padding: 22px;
}

.profile-card-mark,
.profile-avatar {
  align-items: center;
  background: #273f35;
  color: #fffdf8;
  display: flex;
  font-weight: 800;
  justify-content: center;
}

.profile-card-mark {
  border-radius: 18px;
  font-size: 32px;
  height: 74px;
  width: 74px;
}

.profile-card h3 {
  font-size: 30px;
  line-height: 1.1;
  margin: 6px 0 0;
}

.profile-card-body {
  display: grid;
  gap: 0;
}

.muted {
  color: #68635b;
}

.profile-header {
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid rgba(91, 112, 81, 0.16);
  border-radius: 34px;
  box-shadow: 0 24px 60px rgba(66, 74, 50, 0.13);
  display: grid;
  gap: 18px;
  margin-bottom: 30px;
  padding: 28px;
}

.profile-identity {
  align-items: center;
  display: flex;
  gap: 20px;
}

.profile-avatar {
  background: #31a25c;
  border: 4px solid #fffaf1;
  border-radius: 28px;
  flex: 0 0 auto;
  font-size: 46px;
  height: 104px;
  width: 104px;
}

.profile-title {
  font-size: 62px;
  font-weight: 950;
  line-height: 1;
  margin: 0;
}

.romanized-name {
  color: #42525a;
  font-size: 18px;
  margin: 8px 0 0;
}

.profile-summary {
  font-size: 18px;
  line-height: 1.65;
  margin: 0;
  max-width: 840px;
}

.profile-command-card {
  background: rgba(255, 242, 255, 0.78);
  border: 1px solid rgba(165, 127, 183, 0.16);
  border-radius: 24px;
  padding: 16px;
}

.profile-command-card p {
  line-height: 1.55;
  margin: 0;
}

.profile-meta-row {
  align-items: flex-end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.updated-stamp {
  margin: 0;
  white-space: nowrap;
}

.eyebrow {
  color: #2b7650;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.section {
  margin-top: 30px;
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.split-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
}

.split-heading .muted {
  max-width: 430px;
}

.section-heading h2 {
  font-size: 26px;
  margin: 0;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.tag {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(69, 104, 77, 0.18);
  border-radius: 999px;
  color: #34322f;
  padding: 4px 9px;
}

.action-chip {
  background: #273f35;
  border-radius: 999px;
  color: #fffdf8;
  padding: 8px 12px;
}

.profile-auth-panel {
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid rgba(91, 112, 81, 0.16);
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(66, 74, 50, 0.1);
  display: grid;
  gap: 16px;
  padding: 20px;
}

.profile-auth-form {
  display: grid;
  gap: 8px;
  max-width: 420px;
}

.profile-auth-session {
  align-items: center;
  background: rgba(238, 248, 222, 0.72);
  border: 1px solid rgba(69, 104, 77, 0.12);
  border-radius: 18px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
}

.profile-auth-pill {
  background: rgba(39, 63, 53, 0.9);
  border-radius: 999px;
  color: #fffdf8;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 8px;
  padding: 6px 10px;
  text-transform: uppercase;
}

.profile-auth-identity {
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 4px;
}

.fan-action-panel {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(69, 104, 77, 0.16);
  border-radius: 18px;
  display: grid;
  gap: 18px;
  padding: 20px;
}

.fan-action-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.fan-action-stats div {
  background: rgba(238, 248, 222, 0.72);
  border: 1px solid rgba(69, 104, 77, 0.12);
  border-radius: 14px;
  padding: 14px;
}

.fan-action-stats dt {
  color: #4c635d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.fan-action-stats dd {
  font-size: 28px;
  font-weight: 800;
  margin: 4px 0 0;
}

.fan-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-button {
  background: #273f35;
  border: 1px solid #273f35;
  border-radius: 999px;
  color: #fffdf8;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 44px;
  padding: 10px 15px;
}

.action-button:disabled {
  cursor: default;
  opacity: 0.68;
}

.secondary-action {
  background: #fffdf8;
  color: #273f35;
}

.fan-action-message {
  color: #7a3f2e;
  font-weight: 700;
  margin: 0;
}

.discussion-panel {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(69, 104, 77, 0.16);
  border-radius: 18px;
  display: grid;
  gap: 14px;
  padding: 20px;
}

.discussion-label {
  color: #4c635d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.discussion-input {
  background: #fffdf8;
  border: 1px solid rgba(69, 104, 77, 0.18);
  border-radius: 14px;
  color: inherit;
  font: inherit;
  line-height: 1.5;
  padding: 12px 14px;
  resize: vertical;
}

.discussion-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.discussion-post {
  background: rgba(238, 248, 222, 0.72);
  border: 1px solid rgba(69, 104, 77, 0.12);
  border-radius: 14px;
  padding: 14px;
}

.discussion-post p {
  margin: 0;
}

.discussion-post p + p {
  margin-top: 8px;
}

.contribution-panel {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(69, 104, 77, 0.16);
  border-radius: 18px;
  display: grid;
  gap: 14px;
  padding: 20px;
}

.contribution-count {
  background: rgba(238, 248, 222, 0.72);
  border: 1px solid rgba(69, 104, 77, 0.12);
  border-radius: 999px;
  display: inline-flex;
  font-weight: 800;
  margin: 0;
  padding: 8px 12px;
  width: fit-content;
}

.contribution-grid {
  display: grid;
  gap: 8px;
}

.text-input {
  background: #fffdf8;
  border: 1px solid rgba(69, 104, 77, 0.18);
  border-radius: 999px;
  color: inherit;
  font: inherit;
  min-height: 44px;
  padding: 10px 14px;
}

.admin-page {
  min-height: 100vh;
}

.admin-gate,
.admin-hero {
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid rgba(91, 112, 81, 0.16);
  border-radius: 34px;
  box-shadow: 0 24px 60px rgba(66, 74, 50, 0.13);
  display: grid;
  gap: 20px;
  padding: 28px;
}

.admin-gate h1,
.admin-hero h1 {
  font-size: 56px;
  line-height: 1;
  margin: 6px 0 0;
}

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

.admin-totals div,
.admin-queue-item {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(69, 104, 77, 0.16);
  border-radius: 18px;
  padding: 18px;
}

.admin-totals dt {
  color: #4c635d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-totals dd {
  font-size: 34px;
  font-weight: 900;
  margin: 4px 0 0;
}

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

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

.admin-queue-item h3 {
  font-size: 22px;
  margin: 4px 0 0;
}

.admin-action-panel {
  border-top: 1px solid rgba(69, 104, 77, 0.14);
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.admin-select {
  background: #fffdf8;
  border: 1px solid rgba(69, 104, 77, 0.18);
  border-radius: 999px;
  color: inherit;
  font: inherit;
  min-height: 42px;
  padding: 9px 14px;
}

.admin-note-input {
  min-height: 74px;
}

.admin-action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-action-message {
  color: #7a3f2e;
  font-weight: 800;
  margin: 0;
}

.source-list,
.link-list {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.source-list {
  font-size: 14px;
}

.link-list li {
  align-items: center;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(69, 104, 77, 0.13);
  border-radius: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
}

.pill {
  background: #dfece7;
  border-radius: 999px;
  color: #1f4d43;
  font-size: 12px;
  padding: 3px 8px;
}

.fact-state {
  color: #7a3f2e;
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.text-link {
  color: #1c6d49;
  font-weight: 700;
}

.home-ranking-preview {
  margin-top: 38px;
}

.ranking-preview-card {
  max-width: 540px;
}

.rankings-page {
  display: grid;
  gap: 28px;
}

.ranking-hero {
  align-items: flex-start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 360px);
  padding-top: 10px;
}

.rankings-page h1 {
  font-size: 54px;
  line-height: 1;
  margin: 0;
}

.ranking-lede {
  font-size: 19px;
  line-height: 1.65;
  margin: 0;
  max-width: 760px;
}

.ranking-note {
  background: rgba(255, 246, 204, 0.86);
  border: 1px solid rgba(145, 119, 40, 0.14);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(66, 74, 50, 0.1);
  padding: 22px;
}

.ranking-note p:last-child {
  line-height: 1.6;
  margin: 10px 0 0;
}

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

.ranking-card {
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(91, 112, 81, 0.16);
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(66, 74, 50, 0.12);
  padding: 24px;
}

.ranking-list {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.ranking-item {
  background: rgba(237, 247, 223, 0.74);
  border: 1px solid rgba(69, 104, 77, 0.12);
  border-radius: 20px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.ranking-position {
  align-items: flex-start;
  display: flex;
  gap: 14px;
}

.ranking-position h3 {
  font-size: 22px;
  margin: 0;
}

.ranking-position p {
  line-height: 1.5;
  margin: 8px 0 0;
}

.ranking-rank {
  align-items: center;
  background: #273f35;
  border-radius: 999px;
  color: #fffdf8;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  min-width: 42px;
  padding: 0 10px;
}

.ranking-score {
  align-items: baseline;
  color: #2d6846;
  display: flex;
  gap: 8px;
}

.ranking-score strong {
  font-size: 30px;
}

.ranking-score span {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.card-kicker {
  color: #3d5c44;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin: 12px 0 0;
}

.home-discovery-links {
  margin-top: 18px;
}

.library-signal-row {
  margin-top: 18px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.compact-pill {
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(91, 112, 81, 0.16);
  box-shadow: none;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  min-width: 0;
  padding: 10px 16px;
}

.active-pill {
  background: rgba(218, 235, 224, 0.96);
}

.timeline-list {
  display: grid;
  gap: 18px;
}

.timeline-card {
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(91, 112, 81, 0.16);
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(66, 74, 50, 0.12);
  padding: 22px;
}

.timeline-card h3 {
  font-size: 24px;
  margin: 12px 0 10px;
}

.timeline-card p {
  line-height: 1.6;
  margin: 0;
}

.timeline-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.affinity-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  max-width: 560px;
}

.affinity-card ul {
  margin: 14px 0 0;
}

@media (max-width: 1120px) {
  .page {
    padding-left: 190px;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: center;
    background: rgba(238, 248, 222, 0.9);
    border-bottom: 1px solid rgba(69, 104, 77, 0.14);
    display: flex;
    justify-content: space-between;
    left: 0;
    padding: 12px 14px;
    position: sticky;
    top: 0;
  }

  .topbar nav {
    border-radius: 999px;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding: 6px;
  }

  .nav-pill {
    grid-template-columns: 22px minmax(0, auto);
    min-height: 38px;
    min-width: 0;
    padding: 6px 10px;
  }

  .nav-pill span:first-child {
    font-size: 16px;
  }

  .brand span:last-child {
    display: none;
  }

  .page {
    padding: 22px 16px 56px;
  }

  .home-hero,
  .feature-row,
  .profile-grid,
  .ranking-hero,
  .ranking-grid,
  .filter-pills {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: 0;
    padding-top: 28px;
  }

  .hero-title {
    font-size: 48px;
  }

  .home-lede {
    font-size: 18px;
  }

  .agent-card {
    border-radius: 26px;
    padding: 20px;
  }

  .hero-orbit {
    display: none;
  }

  .feature-row {
    margin-top: 0;
  }

  .card-actions,
  .timeline-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-identity,
  .profile-meta-row,
  .split-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .rankings-page h1 {
    font-size: 42px;
  }

  .profile-avatar {
    height: 84px;
    width: 84px;
  }

  .profile-title {
    font-size: 42px;
  }

  .profile-command-card {
    align-items: flex-start;
  }

  .updated-stamp {
    white-space: normal;
  }

  .fan-action-stats {
    grid-template-columns: 1fr;
  }

  .admin-totals {
    grid-template-columns: 1fr;
  }

  .admin-gate h1,
  .admin-hero h1 {
    font-size: 42px;
  }
}
