/* Forever NA — brand stylesheet
   Colours from the approved mockup; see CONTRACT.md "Brand". */

:root {
  --navy: #0b1a28;
  --page: #0e1519;
  --card: #17232c;
  --border: #223340;
  --parchment: #4a3a27;
  --parchment-card: #3b2d1d;
  --parchment-border: #6a5539;
  --parchment-muted: #d9c9a8;
  --gold: #e6b95a;
  --ice: #7fd0f0;
  --link: #a8e2f8;
  --teal: #157f92;
  --teal-hover: #1a95ab;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --text: #efe6d2;
  --muted: #9fb3c4;
  --alliance-bg: #1c3f6e;
  --alliance-fg: #a9cdff;
  --horde-bg: #5a1c1c;
  --horde-fg: #ffa3a3;
  --tank-bg: #2b3b5c;
  --tank-fg: #a9c4f5;
  --healer-bg: #1f4d2e;
  --healer-fg: #9fe3b0;
  --dps-bg: #5a2323;
  --dps-fg: #f5a3a3;
  --goldtag-bg: #5a4520;
  --goldtag-fg: #f0cf7a;
  --input-bg: #17232c;
  --input-border: #2e4a60;
  --danger: #c0392b;
  --danger-hover: #d64535;
  --ok: #2e8b57;
  --warn: #b7791f;
  --radius: 4px;
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --wrap: 1440px;
  --gutter: 56px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
}

@media (max-width: 767px) {
  :root {
    --gutter: 16px;
  }
}

/* ---------- Reset / base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: inline-block;
  vertical-align: middle;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: #fff;
}

h1,
h2,
h3,
h4 {
  font-weight: 300;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--text);
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.2rem;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin: 0 0 12px;
}

small,
.small {
  font-size: 0.875rem;
}

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

.gold {
  color: var(--gold);
}

.ice {
  color: var(--ice);
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
}

code,
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1px 6px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--gold);
  color: var(--navy);
  padding: 8px 12px;
  border-radius: var(--radius);
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.wrap-narrow {
  max-width: 880px;
}

.site-main {
  flex: 1 0 auto;
  padding-top: 32px;
  padding-bottom: 56px;
}

.site-main > .banner {
  margin-bottom: 20px;
}

.stack > * + * {
  margin-top: 16px;
}

.stack-lg > * + * {
  margin-top: 32px;
}

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

.cluster-between {
  justify-content: space-between;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

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

.grid-cards {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.grid-sidebar {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
}

@media (max-width: 1023px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 767px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-sidebar,
  .grid-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .site-main {
    padding-top: 20px;
    padding-bottom: 40px;
  }
}

.section {
  padding: 40px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.section-head h1,
.section-head h2 {
  margin-bottom: 0;
}

.section-title {
  font-weight: 300;
}

.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}

.lead {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 68ch;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--navy);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  min-height: 76px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.brand:hover {
  color: inherit;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.wordmark-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.wordmark-kicker {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-variant-caps: all-small-caps;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.wordmark-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  white-space: nowrap;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.site-nav a.is-active {
  color: var(--gold);
  box-shadow: inset 0 -2px 0 var(--gold);
  border-radius: 0;
}

.header-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}

.user-chip:hover {
  border-color: var(--input-border);
  color: var(--text);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  flex: none;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inline-form {
  display: inline-block;
  margin: 0;
}

@media (max-width: 767px) {
  .site-nav {
    order: 3;
    width: calc(100% + var(--gutter) * 2);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
  }

  .header-auth {
    gap: 8px;
  }

  .user-meta {
    display: none;
  }

  .user-chip {
    padding-right: 4px;
  }

  .wordmark-kicker {
    font-size: 0.55rem;
  }

  .wordmark-name {
    font-size: 1.15rem;
  }

  .btn-discord .icon + span {
    display: none;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-inner {
  padding-top: 24px;
  padding-bottom: 24px;
  text-align: center;
}

.footer-inner p {
  margin: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.875rem;
}

.btn-lg {
  min-height: 52px;
  padding: 0 26px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

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

.btn-primary:hover {
  background: var(--teal-hover);
  border-color: var(--teal-hover);
  color: #fff;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--input-border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--ice);
  color: #fff;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.btn-gold:hover {
  background: #f0c96e;
  border-color: #f0c96e;
  color: var(--navy);
}

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

.btn-danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--link);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn .icon {
  flex: none;
}

/* ---------- Tags ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.4;
  background: var(--border);
  color: var(--text);
  white-space: nowrap;
}

.tag-alliance {
  background: var(--alliance-bg);
  color: var(--alliance-fg);
}

.tag-horde {
  background: var(--horde-bg);
  color: var(--horde-fg);
}

.tag-tank {
  background: var(--tank-bg);
  color: var(--tank-fg);
}

.tag-healer {
  background: var(--healer-bg);
  color: var(--healer-fg);
}

.tag-dps,
.tag-melee,
.tag-ranged {
  background: var(--dps-bg);
  color: var(--dps-fg);
}

.tag-gold {
  background: var(--goldtag-bg);
  color: var(--goldtag-fg);
}

.tag-focus {
  background: #1d2f3b;
  color: var(--ice);
}

.tag-status {
  text-transform: none;
  letter-spacing: 0;
}

.tag-status-approved {
  background: var(--healer-bg);
  color: var(--healer-fg);
}

.tag-status-pending,
.tag-status-draft {
  background: var(--goldtag-bg);
  color: var(--goldtag-fg);
}

.tag-status-changes_requested {
  background: #4a3410;
  color: #f7d58a;
}

.tag-status-rejected,
.tag-status-closed,
.tag-status-expired {
  background: #2a3138;
  color: #c4ccd4;
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
}

.card + .card {
  margin-top: 16px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 10px 0 4px;
}

.card-title a {
  color: var(--text);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--ice);
}

.card-sub {
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.card-desc {
  color: var(--muted);
  margin-bottom: 12px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-meta {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.meta-label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-right: 6px;
}

.card-needs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: auto;
}

.card-expiry {
  color: var(--muted);
  font-size: 0.8rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.listing-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.listing-card.is-featured {
  border-color: var(--gold);
  box-shadow: inset 3px 0 0 var(--gold);
}

.grid-cards .card + .card {
  margin-top: 0;
}

/* ---------- Bands ---------- */

.band {
  padding: 48px 0;
}

.band-parchment {
  background: var(--parchment);
  color: var(--text);
  border-top: 1px solid var(--parchment-border);
  border-bottom: 1px solid var(--parchment-border);
}

.band-parchment .muted,
.band-parchment .card-desc,
.band-parchment .lead {
  color: var(--parchment-muted);
}

.band-parchment .card {
  background: var(--parchment-card);
  border-color: var(--parchment-border);
}

.band-parchment .card-footer {
  border-top-color: var(--parchment-border);
}

.band-parchment a {
  color: #ffe7b0;
}

.band-parchment .btn-outline {
  color: var(--text);
  border-color: var(--parchment-border);
}

.band-dark {
  background: var(--navy);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.band-full {
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Hero ---------- */

.hero {
  padding: 24px 0 8px;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 300;
  margin-bottom: 8px;
}

.hero .display {
  font-size: 3rem;
  color: var(--gold);
}

@media (max-width: 767px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .display {
    font-size: 2.1rem;
  }
}

/* ---------- Stat tiles ---------- */

.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  color: var(--text);
  text-decoration: none;
  min-height: 96px;
}

a.stat-tile:hover {
  border-color: var(--ice);
  color: var(--text);
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: var(--gold);
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin-top: 6px;
}

.stat-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.stat-gold {
  border-color: var(--gold);
}

.stat-warn .stat-value {
  color: #f5a3a3;
}

/* ---------- Forms ---------- */

.form {
  max-width: 760px;
}

.field {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.field-label .req {
  color: var(--gold);
}

.field-hint {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 6px 0 0;
}

.field-error {
  color: #f5a3a3;
  font-size: 0.85rem;
  margin: 6px 0 0;
}

.has-error .input {
  border-color: var(--danger);
}

.input,
input[type='text'],
input[type='search'],
input[type='url'],
input[type='number'],
input[type='password'],
input[type='email'],
select,
textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
  color: #6f8496;
}

.input:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--ice);
  outline-offset: 0;
  border-color: var(--ice);
}

.input:read-only,
input:read-only {
  color: var(--muted);
}

textarea,
.textarea {
  min-height: 140px;
  resize: vertical;
}

select,
.select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239fb3c4' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

select option {
  background: var(--input-bg);
  color: var(--text);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px 0 0;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--teal);
  flex: none;
}

.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

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

@media (max-width: 767px) {
  .role-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

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

@media (max-width: 767px) {
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 20px 4px;
  margin: 0 0 20px;
  min-width: 0;
}

legend {
  padding: 0 8px;
  font-weight: 600;
  color: var(--gold);
}

/* ---------- Filters / tabs ---------- */

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 24px;
}

.filters .field {
  margin-bottom: 0;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs a:hover {
  color: var(--text);
}

.tabs a.is-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---------- Tables ---------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
}

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

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

th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  background: var(--navy);
  white-space: nowrap;
}

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

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

td.actions {
  white-space: nowrap;
}

td .btn + .btn,
td .inline-form + .inline-form,
td .btn + .inline-form,
td .inline-form + .btn {
  margin-left: 6px;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  margin-right: 6px;
  vertical-align: middle;
}

.status-dot.is-ok {
  background: #3fbf7f;
}

.status-dot.is-bad {
  background: #f06060;
}

.status-dot.is-off {
  background: #5b6b78;
}

/* ---------- Banners ---------- */

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.95rem;
  transition: opacity 0.4s ease;
}

.banner.is-hiding {
  opacity: 0;
}

.banner-ok {
  background: #14372a;
  border-color: #2e8b57;
  color: #b8f0cf;
}

.banner-error {
  background: #3d1717;
  border-color: #c0392b;
  color: #ffc4c4;
}

.banner-warn {
  background: #3f2e0f;
  border-color: #b7791f;
  color: #f7d58a;
}

.banner-danger {
  background: #7a1f1f;
  border-color: #c0392b;
  color: #fff;
}

.banner-info {
  background: #14283a;
  border-color: #2e4a60;
  color: var(--link);
}

.banner-full {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.banner-full .wrap {
  display: block;
}

.banner-close {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius);
  flex: none;
}

.banner-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ---------- Notes / callouts ---------- */

.note {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--muted);
  font-size: 0.925rem;
}

.note-danger {
  border-left-color: var(--danger);
}

.note-ok {
  border-left-color: var(--ok);
}

/* ---------- Listing detail ---------- */

.detail-head {
  margin-bottom: 20px;
}

.detail-head h1 {
  margin: 10px 0 6px;
  font-size: 2rem;
}

.detail-body {
  white-space: pre-line;
  font-size: 1.05rem;
  line-height: 1.65;
}

.kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
}

.kv dt {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding-top: 3px;
}

.kv dd {
  margin: 0;
}

.contact-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.contact-handle {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  color: var(--ice);
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ---------- Pagination ---------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 8px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.page-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.page-link.is-current {
  background: var(--teal);
  color: #fff;
}

.page-gap {
  color: var(--muted);
  padding: 0 4px;
}

/* ---------- Empty / error ---------- */

.empty-state {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--muted);
}

.empty-title {
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 300;
  margin-bottom: 6px;
}

.empty-hint {
  margin-bottom: 16px;
}

.error-page {
  text-align: center;
  padding: 48px 0;
  max-width: 560px;
  margin: 0 auto;
}

.error-code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 5rem;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 8px;
}

.error-title {
  font-weight: 300;
  margin-bottom: 8px;
}

.error-message {
  color: var(--muted);
  margin-bottom: 24px;
}

.error-page .cluster {
  justify-content: center;
}

/* ---------- Misc helpers ---------- */

.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mt-4 {
  margin-top: 32px;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.w-100 {
  width: 100%;
}

.nowrap {
  white-space: nowrap;
}

.break {
  overflow-wrap: anywhere;
}

.copy-btn.is-copied {
  border-color: #3fbf7f;
  color: #b8f0cf;
}

.key-reveal {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--navy);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-wrap: anywhere;
  color: var(--gold);
}

@media print {
  .site-header,
  .site-footer,
  .banner,
  .btn {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
