:root {
  --purple-950: #1c1130;
  --purple-900: #281a45;
  --purple-800: #38255e;
  --purple-700: #4a2f78;
  --gold-600: #a9821f;
  --gold-500: #c9a227;
  --gold-400: #d9b94a;
  --parchment: #f6f2e8;
  --paper: #fffdf8;
  --ink: #241a35;
  --ink-dim: #5a5066;
  --rule: #d8cba0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2 {
  font-family: 'Playfair Display', serif;
  margin: 0;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold-500);
  color: var(--purple-950);
  padding: 0.6rem 1rem;
  z-index: 100;
  font-weight: 600;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Utility bar */

.utility-bar {
  background: var(--purple-950);
  color: #cfc6df;
  font-size: 0.72rem;
}

.utility-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.utility-left {
  letter-spacing: 0.02em;
}

.utility-right a {
  color: #e7dfef;
  text-decoration: none;
  margin-left: 1.1rem;
}

.utility-right a:hover {
  color: var(--gold-400);
  text-decoration: underline;
}

/* Masthead */

.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.masthead-inner {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 1.75rem 1.5rem;
}

.masthead-emblem {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
}

.masthead-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.masthead-titles {
  flex: 1;
  text-align: center;
}

.masthead-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.masthead-name {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  color: var(--purple-900);
  letter-spacing: 0.04em;
}

.masthead-official {
  margin: 0.2rem 0 0;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-dim);
}

.masthead-motto {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.masthead-flag {
  flex: 0 0 auto;
  width: 96px;
  height: 58px;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.masthead-flag img,
.masthead-flag .flag-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flag-placeholder {
  background: repeating-linear-gradient(
    180deg,
    var(--purple-800) 0 33%,
    var(--gold-500) 33% 66%,
    var(--purple-800) 66% 100%
  );
}

/* Rule band */

.rule-band {
  height: 6px;
  background: linear-gradient(90deg, var(--purple-800) 0 33%, var(--gold-500) 33% 66%, var(--purple-800) 66% 100%);
}

/* Primary nav */

.primary-nav {
  background: var(--purple-900);
  border-bottom: 3px solid var(--gold-500);
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.primary-nav a {
  display: block;
  padding: 0.85rem 1.1rem;
  color: #efe9f7;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.primary-nav a:hover {
  background: var(--purple-700);
  color: var(--gold-400);
}

.primary-nav a.discord-link {
  color: var(--gold-400);
  font-weight: 600;
}

/* Main content */

main {
  padding: 2.5rem 1.5rem 3rem;
}

.notice-panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--purple-800);
  outline-offset: -5px;
  padding: 2rem 2rem 1.75rem;
}

.notice-label {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
  font-weight: 700;
}

.notice-text {
  margin: 0 0 1.75rem;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink);
  max-width: 68ch;
}

.notice-text a {
  color: var(--purple-700);
  text-decoration: underline;
  font-weight: 600;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.fact dt {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.3rem;
}

.fact dd {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--purple-900);
}

/* Government sections (about page, institution homepages) */

.gov-section {
  margin-top: 3rem;
}

.role-lead {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.subsection-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--purple-900);
  margin: 1.5rem 0 0.75rem;
}

.role-list {
  margin: 0;
  padding-left: 1.2rem;
}

.role-list li {
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

.composition-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.composition-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.seat-badge {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-900);
  color: var(--gold-400);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.sub-list {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

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

.link-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1.6rem;
  background: var(--purple-900);
  color: var(--gold-400);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid var(--gold-500);
}

.link-button:hover {
  background: var(--purple-700);
}

.button-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.back-link {
  margin-top: 2.5rem;
  font-size: 0.85rem;
}

.back-link a {
  text-decoration: none;
  color: var(--purple-700);
  font-weight: 600;
}

.back-link a:hover {
  text-decoration: underline;
}

/* Quick links */

.quick-links {
  margin-top: 3rem;
}

.section-heading {
  font-size: 1.4rem;
  color: var(--purple-900);
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--gold-500);
}

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

.gov-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--purple-700);
  padding: 1.5rem 1.4rem;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.gov-card:hover {
  border-top-color: var(--gold-500);
  box-shadow: 0 6px 18px rgba(28, 17, 48, 0.1);
}

.card-icon {
  font-size: 1.5rem;
  color: var(--gold-600);
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--purple-900);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--ink-dim);
  line-height: 1.55;
}

/* Footer */

.site-footer {
  background: var(--purple-950);
  color: #cfc6df;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2.5rem 1.5rem 2rem;
}

.footer-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--gold-400);
  margin: 0 0 0.4rem;
}

.footer-heading {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin: 0 0 0.7rem;
}

.footer-text {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: #d9d2e6;
}

.footer-motto {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a898c2;
}

.footer-col a {
  color: var(--gold-400);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.1rem 1.5rem 1.5rem;
  font-size: 0.75rem;
  color: #a898c2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
}

.footer-bottom p {
  margin: 0;
}

/* Responsive */

@media (max-width: 720px) {
  .masthead-inner {
    flex-direction: column;
    text-align: center;
  }

  .primary-nav a {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

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

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