@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/public-sans.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/public-sans-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --page: #f3f4f1;
  --paper: #ffffff;
  --ink: #17221c;
  --muted: #56625b;
  --line: #d6dbd4;
  --line-soft: #e6e9e4;
  --green: #1d4a37;
  --green-deep: #143527;
  --green-soft: #e3ece6;
  --gold: #c9a640;
  --gold-ink: #7a6216;
  --discord: #4f5bd5;
  --ok: #24643f;
  --ok-bg: #e4f1e8;
  --warn-bg: #fbf3dc;
  --font: 'Public Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --wrap: 1140px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font);
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green-deep);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
}

code {
  font: 0.9em/1.4 ui-monospace, 'Cascadia Mono', Consolas, monospace;
  background: var(--green-soft);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

.narrow {
  max-width: 760px;
  padding-top: 32px;
  padding-bottom: 72px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 50;
  background: var(--paper);
  padding: 8px 12px;
}

.strip {
  background: var(--green-deep);
  color: #cfdcd4;
  font-size: 0.82rem;
}

.strip-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.strip a {
  color: #fff;
}

.announce {
  background: var(--warn-bg);
  border-bottom: 1px solid #ecdcae;
  padding: 10px 0;
  font-weight: 600;
}

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

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.9rem;
}

.brand-small {
  gap: 10px;
  color: #fff;
}

.brand-small:hover {
  color: #fff;
}

.account-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.avatar-large {
  width: 72px;
  height: 72px;
  font-size: 1.6rem;
  border: 3px solid var(--gold);
}

.inline-form {
  margin: 0;
}

.text-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.navbar {
  background: var(--green);
}

.navbar-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

.nav-links {
  display: flex;
}

.nav-links a,
.staff-link {
  color: #e7efe9;
  text-decoration: none;
  padding: 13px 16px;
  font-weight: 600;
  font-size: 0.96rem;
}

.nav-links a:first-child {
  padding-left: 0;
}

.nav-links a:hover,
.staff-link:hover {
  color: #fff;
  text-decoration: underline;
}

.nav-links a[aria-current='page'] {
  color: #fff;
  box-shadow: inset 0 -4px 0 var(--gold);
}

.staff-link {
  color: #b9cdbf;
  font-weight: 500;
  padding-right: 0;
}

.menu {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 4px;
  border: 2px solid transparent;
  font: 700 0.98rem/1.1 var(--font);
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-deep);
  color: #fff;
  text-decoration: none;
}

.btn-quiet {
  background: transparent;
  border-color: var(--green);
  color: var(--green);
}

.btn-quiet:hover {
  background: var(--green-soft);
  text-decoration: none;
}

.btn-discord {
  background: var(--discord);
  color: #fff;
}

.btn-discord:hover {
  background: #3f49b8;
  color: #fff;
  text-decoration: none;
}

.btn-large {
  padding: 15px 26px;
  font-size: 1.05rem;
  margin-top: 24px;
}

.btn-block {
  width: 100%;
}

.kicker {
  margin: 0 0 12px;
  color: var(--gold-ink);
  font-weight: 700;
  font-size: 0.95rem;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: #2f3b34;
  max-width: 60ch;
  margin: 16px 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.actions form {
  margin: 0;
}

.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 64px;
  align-items: start;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.status-panel {
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  border-radius: 4px;
  padding: 20px 22px 22px;
  background: var(--page);
}

.status-panel h2 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.status-panel dl {
  margin: 0 0 18px;
}

.status-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.97rem;
}

.status-panel dt {
  color: var(--muted);
}

.status-panel dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.band {
  padding: 48px 0 8px;
}

.band-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.band-head h2 {
  font-size: 1.6rem;
  font-weight: 800;
}

.agencies {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.agency {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.agency:last-child {
  border-bottom: 0;
}

.agency-code {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  height: 40px;
  padding: 0 8px;
  border-radius: 3px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.agency h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.agency-focus {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 0.98rem;
}

.agency-body p:not(.agency-focus) {
  margin: 10px 0 0;
}

.agency-status {
  font-size: 0.86rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
  background: var(--ok-bg);
  color: var(--ok);
}

.status-soon {
  background: var(--warn-bg);
  color: var(--gold-ink);
}

.status-closed {
  background: var(--line-soft);
  color: var(--muted);
}

.agencies-compact .agency {
  padding: 16px 20px;
  align-items: center;
}

.prose .agencies {
  margin-bottom: 32px;
}

.page-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 36px 0 40px;
}

.page-head h1 {
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.page-head-tight {
  padding: 32px 0;
}

.crumbs {
  display: flex;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 12px 0 0;
}

.doc {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 56px;
  padding-top: 44px;
  padding-bottom: 80px;
}

.toc {
  position: sticky;
  top: 24px;
  align-self: start;
  font-size: 0.95rem;
}

.toc h2 {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 3px solid var(--line);
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 5px 0 5px 14px;
  color: var(--ink);
  text-decoration: none;
}

.toc a:hover {
  color: var(--green);
  text-decoration: underline;
}

.doc > .prose:only-child {
  grid-column: 1 / -1;
}

.prose {
  max-width: 72ch;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 44px 0 12px;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 30px 0 10px;
}

.prose h4 {
  font-size: 1.05rem;
  margin: 24px 0 8px;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 6px;
}

.prose li::marker {
  color: var(--green);
  font-weight: 700;
}

.prose blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  background: var(--warn-bg);
  border-left: 5px solid var(--gold);
}

.prose blockquote p {
  margin: 0;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}

.prose img {
  border-radius: 4px;
  border: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.98rem;
}

th,
td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

th {
  background: var(--green-soft);
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: 0;
}

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

.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 32px 0 12px;
}

.section-title:first-of-type {
  margin-top: 8px;
}

.assignments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.assignments li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 4px;
}

.assignments li div {
  display: flex;
  flex-direction: column;
}

.assignments li span:not(.agency-code) {
  color: var(--muted);
}

.empty {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 16px;
  margin: 0;
}

.facts {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.facts div:last-child {
  border-bottom: 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-weight: 600;
}

.notice-ok {
  background: var(--ok-bg);
  color: var(--ok);
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: 600;
  margin: 0 0 16px;
}

.fine-print {
  margin: 28px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 0.95rem;
}

.fine-print li {
  margin-bottom: 6px;
}

.fine-print-line {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 20px;
}

.footer {
  background: var(--green-deep);
  color: #c6d4cb;
  padding: 44px 0 22px;
  font-size: 0.96rem;
}

.footer a {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-about p {
  margin: 14px 0 0;
  max-width: 40ch;
}

.footer h2 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 12px;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer li {
  margin-bottom: 8px;
}

.footer-base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.88rem;
}

.admin-dialog {
  width: min(1240px, calc(100vw - 48px));
  height: min(860px, calc(100vh - 48px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

.admin-dialog[open] {
  display: flex;
  flex-direction: column;
}

.admin-dialog::backdrop {
  background: rgba(20, 30, 25, 0.6);
}

.admin-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 18px;
  background: var(--green);
  color: #fff;
}

.admin-dialog-bar .btn {
  padding: 7px 14px;
  border-color: #fff;
  color: #fff;
}

.admin-dialog-bar .btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.admin-dialog iframe {
  flex: 1;
  width: 100%;
  border: 0;
}

.admin-open body {
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .doc {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
  }

  .toc {
    position: static;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }

  .strip-row span {
    font-size: 0.78rem;
  }

  .masthead-row {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .brand-text strong {
    font-size: 1.08rem;
  }

  .account .account-name,
  .account span:last-child {
    display: none;
  }

  .btn-discord {
    padding: 9px 12px;
    font-size: 0.88rem;
  }

  .nav-links {
    display: none;
  }

  .menu {
    display: block;
  }

  .menu summary {
    list-style: none;
    color: #fff;
    font-weight: 700;
    padding: 12px 0;
    cursor: pointer;
  }

  .menu summary::-webkit-details-marker {
    display: none;
  }

  .menu summary::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
  }

  .menu[open] summary::after {
    transform: translateY(1px) rotate(-135deg);
  }

  .menu-links {
    display: flex;
    flex-direction: column;
    padding-bottom: 8px;
  }

  .menu-links a {
    color: #fff;
    text-decoration: none;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .menu-links a[aria-current='page'] {
    color: var(--gold);
  }

  .navbar-row {
    align-items: flex-start;
  }

  .staff-link {
    padding: 12px 0;
  }

  .hero {
    padding: 36px 0 40px;
  }

  .band {
    padding-bottom: 20px;
  }

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

  .agency-code {
    justify-self: start;
  }

  .agency-status {
    justify-self: start;
  }

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

  .footer-about {
    grid-column: 1 / -1;
  }

  .admin-dialog {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
}

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