/* ============================================================
   MAGUS SENATE OF DALARAN — SITE STYLESHEET
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cinzel+Decorative:wght@400;700&family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&display=swap');

/* ── RESET & ROOT ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple-darkest: #0d0118;
  --purple-deep:    #1a0330;
  --purple-mid:     #2e0d52;
  --purple-light:   #5b2d8a;
  --purple-faint:   #8b5bbf;
  --gold-bright:    #f0b84b;
  --gold-mid:       #c9901a;
  --gold-dim:       #8a6010;
  --gold-pale:      #f7e0a0;
  --arcane-blue:    #7eb8f7;
  --arcane-teal:    #4dd9c0;
  --text-primary:   #f0e6d3;
  --text-secondary: #c4afd6;
  --text-muted:     #7a6290;
  --border-gold:    rgba(201, 144, 26, 0.35);
  --border-purple:  rgba(91, 45, 138, 0.5);
  --font-display:   'Cinzel Decorative', serif;
  --font-heading:   'Cinzel', serif;
  --font-body:      'EB Garamond', serif;
  --nav-height:     72px;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--purple-darkest);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── ARCANE BACKGROUND TEXTURE ────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(91,45,138,0.4) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(46,13,82,0.5) 0%, transparent 50%),
    radial-gradient(ellipse 30% 30% at 10% 60%, rgba(126,184,247,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--gold-bright);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 600; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 400; }
h4 { font-size: 1rem; font-weight: 600; color: var(--gold-mid); text-transform: uppercase; letter-spacing: 0.12em; }

p { color: var(--text-primary); margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--gold-bright); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-pale); }

em { color: var(--text-secondary); font-style: italic; }
strong { color: var(--gold-bright); font-weight: 500; }

/* ── ORNAMENTAL DIVIDER ───────────────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  color: var(--gold-dim);
  font-size: 1.2rem;
}
.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

/* ── NAVIGATION ───────────────────────────────────────────── */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(13, 1, 24, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
}
.nav-logo-text {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  padding: 0.4rem 0.7rem;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
  text-transform: uppercase;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-bright);
  background: rgba(201,144,26,0.1);
}

.nav-discord {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  border: 1px solid var(--border-gold);
  padding: 0.4rem 1rem;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
  text-transform: uppercase;
}
.nav-discord:hover {
  background: var(--gold-mid);
  color: var(--purple-darkest);
}

/* ── PAGE WRAPPER ─────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── HERO SECTION ─────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
}

.hero-seal {
  width: clamp(160px, 25vw, 260px);
  height: clamp(160px, 25vw, 260px);
  border-radius: 50%;
  margin-bottom: 2.5rem;
  filter: drop-shadow(0 0 40px rgba(201,144,26,0.35)) drop-shadow(0 0 80px rgba(91,45,138,0.4));
  animation: sealFloat 6s ease-in-out infinite;
}

@keyframes sealFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--gold-mid);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 3.5rem);
  color: var(--gold-bright);
  text-shadow: 0 0 60px rgba(240,184,75,0.4);
  margin-bottom: 0.5rem;
  line-height: 1.15;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-motto {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-style: italic;
  color: var(--gold-pale);
  margin-bottom: 3rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.75rem 2rem;
  border-radius: 3px;
  border: 1px solid var(--border-gold);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}
.btn-primary {
  background: var(--gold-mid);
  color: var(--purple-darkest);
  border-color: var(--gold-bright);
}
.btn-primary:hover {
  background: var(--gold-bright);
  color: var(--purple-darkest);
  box-shadow: 0 0 20px rgba(240,184,75,0.4);
}
.btn-secondary {
  background: transparent;
  color: var(--gold-bright);
}
.btn-secondary:hover {
  background: rgba(201,144,26,0.15);
  color: var(--gold-pale);
}

/* ── CONTENT SECTIONS ─────────────────────────────────────── */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.page-header {
  text-align: center;
  padding: 5rem 2rem 3rem;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 0;
}

.page-header .eyebrow {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold-mid);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: rgba(26, 3, 48, 0.7);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 2rem;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(201,144,26,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ── RULES PAGE SPECIFIC ──────────────────────────────────── */
.rule-block {
  border-left: 2px solid var(--gold-mid);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
}

.rule-number {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--gold-mid);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

/* ── ORG STRUCTURE ────────────────────────────────────────── */
.org-page { padding: 0 2rem 5rem; max-width: 1100px; margin: 0 auto; }

.rank-tier-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 2.5rem 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.rank-tier-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-purple);
}

.rank-card {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  background: rgba(26, 3, 48, 0.5);
  border: 1px solid var(--border-purple);
  border-radius: 4px;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}
.rank-card:hover {
  border-color: var(--border-gold);
  background: rgba(46, 13, 82, 0.6);
}
.rank-card.tier-leadership { border-left: 3px solid var(--gold-bright); }
.rank-card.tier-officer    { border-left: 3px solid var(--gold-mid); }
.rank-card.tier-member     { border-left: 3px solid var(--purple-faint); }
.rank-card.tier-initiate   { border-left: 3px solid var(--text-muted); }
.rank-card.tier-associate  { border-left: 3px solid #4a3a5c; }

.rank-badge {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(201,144,26,0.1);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--gold-bright);
  flex-shrink: 0;
}

.rank-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--gold-bright);
  margin-bottom: 0.25rem;
}

.rank-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Divisions */
.divisions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.division-card {
  background: rgba(26, 3, 48, 0.7);
  border: 1px solid var(--border-purple);
  border-radius: 4px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.division-card:hover { border-color: var(--border-gold); }

.division-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.division-sigil {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid;
}

.division-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--gold-bright);
  margin: 0;
}

.division-focus {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
}

.division-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ── DIVISION ORG TREE ────────────────────────────────────── */
.divisions-tree {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Chancellery card — same width as one of the three branches below */
.divisions-tree-top {
  width: calc((100% - 2 * 1.25rem) / 3);
  min-width: 220px;
}

/* Wrapper that holds the connector lines above the three branches */
.divisions-tree-branches-wrap {
  width: 100%;
  position: relative;
  padding-top: 2.5rem;
}

/* Vertical stem down from Chancellery */
.divisions-tree-branches-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 1.25rem;
  background: var(--border-gold);
}

/* Horizontal bar spanning from centre of col 1 to centre of col 3 */
.divisions-tree-branches-wrap::after {
  content: '';
  position: absolute;
  top: 1.25rem;
  left: calc((100% - 2 * 1.25rem) / 6);
  right: calc((100% - 2 * 1.25rem) / 6);
  height: 1px;
  background: var(--border-gold);
}

.divisions-tree-branches {
  display: flex;
  gap: 1.25rem;
}

.tree-branch {
  flex: 1;
  position: relative;
}

/* Vertical stub from horizontal bar down to each card */
.tree-branch::before {
  content: '';
  position: absolute;
  top: -1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 1.25rem;
  background: var(--border-gold);
}

/* Envoy section */
.envoy-block {
  background: rgba(26,3,48,0.6);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 2rem;
  margin-top: 1.5rem;
}

/* ── NEWS / ANNOUNCEMENTS ─────────────────────────────────── */
.news-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-purple);
}
.news-item:last-child { border-bottom: none; }
.news-date {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--gold-mid);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.news-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--gold-bright);
  margin-bottom: 0.5rem;
}

/* ── LORE PAGE ────────────────────────────────────────────── */
.lore-entry {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-purple);
}
.lore-entry:last-child { border-bottom: none; margin-bottom: 0; }

/* ── JOIN PAGE ────────────────────────────────────────────── */
.join-steps {
  counter-reset: steps;
  list-style: none;
}
.join-steps li {
  counter-increment: steps;
  padding: 1.5rem 1.5rem 1.5rem 4.5rem;
  position: relative;
  margin-bottom: 1rem;
  background: rgba(26,3,48,0.5);
  border: 1px solid var(--border-purple);
  border-radius: 4px;
}
.join-steps li::before {
  content: counter(steps);
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--gold-mid);
  width: 2rem;
  text-align: center;
}

/* ── HOME PAGE FEATURE CARDS ──────────────────────────────── */
.home-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  padding: 2rem;
  background: rgba(26,3,48,0.6);
  border: 1px solid var(--border-purple);
  border-radius: 4px;
  text-align: center;
  transition: border-color 0.25s, transform 0.25s;
  cursor: pointer;
}
.feature-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}
.feature-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  margin-bottom: 0.5rem;
}
.feature-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border-gold);
  padding: 3rem 2rem;
  text-align: center;
}
.footer-seal {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  opacity: 0.7;
  border: 1px solid var(--border-gold);
}
.footer-name {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--gold-mid);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── MOBILE NAV STRIP ─────────────────────────────────────── */
.mobile-nav-strip { display: none; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  #site-nav { padding: 0 1rem; gap: 1rem; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: none; }
  .section, .section-wide { padding: 3rem 1.25rem; }
  .page-header { padding: 3rem 1.25rem 2rem; }
  .org-page { padding: 0 1.25rem 3rem; }
  .rank-card { grid-template-columns: 2.5rem 1fr; }
  .divisions-grid { grid-template-columns: 1fr; }
  .divisions-tree-top { width: 100%; min-width: unset; }
  .divisions-tree-branches { flex-direction: column; }
  .divisions-tree-branches-wrap { padding-top: 1rem; }
  .divisions-tree-branches-wrap::before,
  .divisions-tree-branches-wrap::after,
  .tree-branch::before { display: none; }

  .mobile-nav-strip {
    display: flex;
    position: sticky;
    top: var(--nav-height);
    z-index: 98;
    background: rgba(13, 1, 24, 0.96);
    border-bottom: 1px solid var(--border-gold);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 0.25rem;
  }
  .mobile-nav-strip::-webkit-scrollbar { display: none; }
  .mobile-nav-strip a {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 0.65rem 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
  }
  .mobile-nav-strip a:hover,
  .mobile-nav-strip a.active {
    color: var(--gold-bright);
    border-bottom-color: var(--gold-bright);
  }
}

/* Mobile nav toggle (kept for markup compatibility, not shown on mobile) */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  background: none;
  border: none;
}
.nav-mobile-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--gold-bright);
  display: block;
  transition: all 0.3s;
}

/* ── HERO PILLARS ─────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }
.hero-pillar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  display: flex;
  align-items: center;
  opacity: 0.18;
  pointer-events: none;
}
.hero-pillar-left  { left: 0; justify-content: flex-start; }
.hero-pillar-right { right: 0; justify-content: flex-end; transform: scaleX(-1); }
.hero-pillar img   { height: 70%; max-height: 420px; width: auto; object-fit: contain; }

/* ── SCREENSHOT BANNER ────────────────────────────────────── */
.screenshot-banner {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  position: relative;
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
}
.screenshot-banner img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  filter: brightness(0.72) saturate(1.15);
}
.screenshot-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(13,1,24,0.55) 0%,
    transparent 30%,
    transparent 70%,
    rgba(13,1,24,0.8) 100%);
  pointer-events: none;
}
.screenshot-caption {
  position: absolute;
  bottom: 1.25rem;
  right: 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(240,184,75,0.6);
  text-transform: uppercase;
  z-index: 2;
}

/* ── LORE IMAGES ──────────────────────────────────────────── */
.lore-image-block {
  text-align: center;
  margin: 2rem 0;
}
.lore-image {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 4px;
  border: 1px solid var(--border-gold);
  filter: brightness(0.8) saturate(1.1);
}
.lore-image-sm {
  max-height: 220px;
  max-width: 700px;
}
.lore-image-caption {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.6rem;
}

/* ── LEGACY ORG CHART ─────────────────────────────────────── */
.legacy-chart-wrapper {
  border: 1px solid var(--border-purple);
  border-radius: 4px;
  overflow: hidden;
  max-width: 100%;
}
.legacy-chart {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0.85);
}

/* ── RANK CARDS (expandable) ──────────────────────────────── */
.rank-card {
  cursor: pointer;
}
.rank-card .rank-details {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-purple);
  grid-column: 2;
}
.rank-card.expanded .rank-details { display: block; }
.rank-detail-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}
.rank-detail-label {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-mid);
  white-space: nowrap;
  padding-top: 2px;
  min-width: 90px;
}
.rank-detail-value {
  color: var(--text-secondary);
  line-height: 1.5;
}
.rank-expand-hint {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.3rem;
}

/* Tier badge on rank card */
.rank-service-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 0.3rem;
}
.tier-cabinet  .rank-service-tag { background: rgba(240,184,75,0.15); color: var(--gold-bright); border: 1px solid rgba(240,184,75,0.3); }
.tier-sms      .rank-service-tag { background: rgba(167,139,250,0.15); color: #c4b5fd; border: 1px solid rgba(167,139,250,0.3); }
.tier-civil    .rank-service-tag { background: rgba(91,45,138,0.2); color: var(--text-secondary); border: 1px solid var(--border-purple); }
.tier-associate .rank-service-tag { background: rgba(74,58,92,0.2); color: var(--text-muted); border: 1px solid rgba(74,58,92,0.4); }

/* ── POINTS EXPLAINER ─────────────────────────────────────── */
.points-explainer {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(201,144,26,0.06);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.points-explainer strong { color: var(--gold-bright); }

/* ── CHANCELLOR LINEAGE TABLE ─────────────────────────────── */
.chancellor-table {
  width: 100%;
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  overflow: hidden;
}

.chancellor-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 3fr;
  gap: 0;
  border-bottom: 1px solid var(--border-purple);
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  align-items: start;
}
.chancellor-row:last-child { border-bottom: none; }

.chancellor-header {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-mid);
  background: rgba(201,144,26,0.07);
  padding: 0.65rem 1.25rem;
}

.chancellor-row:not(.chancellor-header) > div:first-child {
  color: var(--text-primary);
  font-weight: 500;
}
.chancellor-row:not(.chancellor-header) > div:nth-child(2) {
  color: var(--gold-mid);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding-top: 2px;
}
.chancellor-row:not(.chancellor-header) > div:nth-child(3) {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.chancellor-acting {
  opacity: 0.7;
  font-style: italic;
}
.chancellor-acting > div:first-child { color: var(--text-secondary) !important; }

.chancellor-current {
  background: rgba(201,144,26,0.05);
  border-left: 3px solid var(--gold-bright);
}
.chancellor-current > div:first-child { color: var(--gold-bright) !important; }

.chancellor-num {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--gold-dim);
  min-width: 1.5rem;
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  .chancellor-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .chancellor-header { display: none; }
  .chancellor-row:not(.chancellor-header) > div:nth-child(2)::before {
    content: 'Term: ';
    color: var(--text-muted);
  }
}
