/* Shared presentation rules for the portal, account pages, wiki, and staff tools. */
:root {
  color-scheme: dark;
  --sf-surface: rgba(8, 16, 29, .92);
  --sf-edge: rgba(121, 157, 255, .28);
  --sf-focus: #8bd9ff;
}

html { scroll-behavior: smooth; }
body { line-height: 1.55; overflow-wrap: break-word; }
img, svg, video { max-width: 100%; height: auto; }
main, section, article, aside, form, .sf-nav-group { min-width: 0; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--sf-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(7, 17, 29, .92);
}

:where(button, input, select, textarea) { font: inherit; }
:where(button, input[type="submit"], input[type="button"]) { cursor: pointer; }
:where(button, input):disabled { opacity: .55; cursor: not-allowed; transform: none; }
:where(input, select, textarea) { max-width: 100%; }
:where(table) { max-width: 100%; }
:where(th, td) { overflow-wrap: anywhere; }

.sf-btn {
  gap: .45rem;
  border: 1px solid transparent;
  text-align: center;
  text-decoration: none;
  line-height: 1.2;
}
.sf-btn--primary { border-color: rgba(173, 227, 255, .54); }
.sf-btn--secondary { border-color: var(--sf-edge); }
.sf-btn:hover, .sf-btn:focus-visible { filter: brightness(1.09); }
.sf-btn--danger, .danger, .mail-btn--danger {
  border-color: rgba(255, 120, 145, .45) !important;
  background: rgba(130, 31, 53, .7) !important;
  color: #fff1f4 !important;
}

/* Portal navigation */
.sf-shell { width: min(1460px, 100%); padding: 16px clamp(10px, 2vw, 26px) 36px; }
.sf-header { border-radius: 20px; }
.sf-banner { min-height: 0; background-position: center 45%; }
.sf-banner::after { opacity: .38; }
.sf-banner-overlay { min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); align-items: center; gap: clamp(26px, 4vw, 64px); padding: clamp(24px, 3vw, 42px); }
.sf-brand-mark { align-self: center; }
.sf-brand-copy h1 { font-size: clamp(42px, 4.8vw, 66px); letter-spacing: .035em; white-space: nowrap; }
.sf-brand-copy p { max-width: 52ch; }
.sf-command-panel { position: relative; padding: 18px; border: 1px solid rgba(121, 157, 255, .3); border-radius: 18px; background: linear-gradient(150deg, rgba(12, 26, 46, .94), rgba(4, 10, 20, .95)); box-shadow: 0 18px 35px rgba(0, 0, 0, .3); }
.sf-command-panel::before { content: ''; position: absolute; top: 18px; bottom: 18px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(#f0cd82, #62b2ff); }
.sf-command-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 7px; }
.sf-command-heading .sf-badge { margin: 0; }
.sf-command-signal { width: 9px; height: 9px; border-radius: 50%; background: #62dcb1; box-shadow: 0 0 0 5px rgba(98, 220, 177, .1), 0 0 15px rgba(98, 220, 177, .45); }
.sf-command-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.sf-command-stat { min-width: 0; padding: 10px 12px; border: 1px solid rgba(121, 157, 255, .15); border-radius: 10px; background: rgba(2, 7, 14, .5); }
.sf-command-stat span, .sf-command-stat strong { display: block; }
.sf-command-stat span { color: #a9bbd9; font: 700 11px/1.2 'Rajdhani', sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.sf-command-stat strong { margin-top: 4px; color: #f2f7ff; font: 700 18px/1.2 'Rajdhani', sans-serif; overflow-wrap: anywhere; }
.sf-nav { justify-content: flex-start; flex-wrap: wrap; gap: 8px 22px; padding: 12px clamp(16px, 2vw, 30px); }
.sf-nav-group { align-items: center; }
.sf-nav-account { margin-left: auto; }
.sf-nav a { display: inline-flex; align-items: center; min-height: 42px; border: 1px solid transparent; }
.sf-nav a[aria-current="page"] { color: #fff; border-color: rgba(116, 193, 255, .35); background: rgba(98, 178, 255, .17); }
.sf-nav a[aria-disabled="true"] { cursor: default; pointer-events: none; }
.sf-external-mark { font-size: .9em; opacity: .8; }
.sf-menu-toggle { display: none; }
.sf-frame-wrap { margin-top: 18px; }
.sf-frame-head { padding: 18px clamp(18px, 2vw, 30px); border-left: 3px solid var(--gold, #d8a85f); }
.sf-frame { min-height: 620px; height: min(1100px, 78vh); }
.sf-status-inline { gap: 10px 18px; }
.sf-status-inline span { white-space: nowrap; }

/* Shared account and staff layout */
.sf-auth-shell { padding: clamp(12px, 2.5vw, 36px); }
.sf-auth-shell--full { padding: clamp(8px, 1.5vw, 22px); }
.sf-auth-wrap { width: min(1260px, 100%); gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sf-auth-wrap--full { width: min(1460px, 100%); margin: 0 auto; }
.sf-auth-aside, .sf-auth-form { padding: clamp(20px, 2.5vw, 34px); }
.sf-auth-form--full { padding: clamp(18px, 2.5vw, 32px); }
.sf-auth-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.sf-auth-head h1 { margin: 8px 0; font-family: 'Orbitron', sans-serif; font-size: clamp(26px, 3vw, 40px); line-height: 1.15; }
.sf-auth-head > a { flex: 0 0 auto; }
.sf-input, .wiki-field, .wiki-select { min-height: 46px; }
.sf-field > .sf-inline-note { margin: 0; padding: 0; border: 0; background: none; color: #acbedb; font-size: 13px; line-height: 1.4; }
.sf-card, .wiki-card, .wiki-panel, .patch-card { min-width: 0; }
.sf-alert--error { background: rgba(255, 102, 125, .12); border-color: rgba(255, 102, 125, .24); color: #ffe5ea; }
.sf-log-view { max-height: 68vh; margin: 0; padding: 18px; overflow: auto; border: 1px solid var(--sf-edge); border-radius: 14px; background: rgba(2, 7, 15, .9); color: #dceaff; font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.sf-return-link { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 16px; padding: 6px 12px; border: 1px solid var(--sf-edge); border-radius: 10px; color: #dceaff; background: rgba(13, 24, 42, .72); font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.sf-return-link:hover { color: #fff; background: rgba(98, 178, 255, .16); }
.sf-embedded .sf-portal-return { display: none !important; }
.wiki-category-pill[aria-current="page"] { border-color: rgba(116, 193, 255, .42); background: rgba(98, 178, 255, .2); color: #fff; cursor: default; }
.mail-tab[aria-current="page"], .mail-nav a[aria-current="page"] { cursor: default; }

/* Standalone content pages share the same reading width and rhythm. */
.patch-shell, .wiki-shell { width: min(1220px, 100%); padding: clamp(14px, 2vw, 28px); }
.patch-header, .wiki-panel { padding: clamp(20px, 2.5vw, 32px); }
.patch-list, .wiki-grid { gap: clamp(14px, 2vw, 24px); }
.patch-copy { max-width: 86ch; }
.patch-item { align-items: start; }
.patch-title { line-height: 1.25; }
.patch-archive { margin-top: 18px; }
.patch-archive > summary { min-height: 52px; padding: 13px 18px; border: 1px solid var(--sf-edge); border-radius: 14px; color: #eaf4ff; background: var(--sf-surface); font-family: 'Rajdhani', sans-serif; font-size: 17px; font-weight: 700; cursor: pointer; }
.patch-archive[open] > summary { margin-bottom: 18px; }

@media (max-width: 980px) {
  .sf-banner-overlay { grid-template-columns: 1fr; }
  .sf-command-panel { max-width: none; }
  .sf-nav-account { margin-left: 0; }
  .sf-auth-wrap { grid-template-columns: 1fr; }
  .sf-auth-aside { order: 2; }
}

@media (max-width: 700px) {
  .sf-shell { padding: 8px 8px 24px; }
  .sf-header, .sf-frame-wrap { border-radius: 16px; }
  .sf-banner-overlay { padding: 20px 16px; }
  .sf-brand-copy h1 { font-size: clamp(30px, 9vw, 48px); letter-spacing: .025em; }
  .sf-brand-copy p { font-size: 15px; }
  .sf-command-panel { padding: 16px; }
  .sf-command-stat { padding: 9px 10px; }
  .sf-command-stat strong { font-size: 16px; }
  .sf-menu-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: calc(100% - 28px); min-height: 46px; margin: 12px 14px;
    padding: 0 16px; border: 1px solid var(--sf-edge); border-radius: 12px;
    color: #edf4ff; background: rgba(255,255,255,.06);
    font-family: 'Rajdhani', sans-serif; font-size: 17px; font-weight: 700;
  }
  .sf-nav { display: none; flex-direction: column; align-items: stretch; gap: 12px; padding: 0 14px 14px; }
  .sf-nav.sf-nav--open { display: flex; }
  .sf-nav-group { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .sf-nav a { padding: 10px 12px; }
  .sf-nav-welcome { grid-column: 1 / -1; }
  .sf-frame-head { align-items: flex-start; padding: 16px; }
  .sf-status-inline { display: grid; grid-template-columns: 1fr 1fr; width: 100%; font-size: 12px; }
  .sf-frame { min-height: 560px; height: 75vh; }
  .sf-auth-shell, .sf-auth-shell--full { padding: 8px; }
  .sf-auth-aside, .sf-auth-form, .sf-auth-form--full { padding: 20px 16px; border-radius: 16px; }
  .sf-auth-head > a { width: 100%; }
  .sf-form-actions > .sf-btn { flex: 1 1 170px; }
  .patch-shell, .wiki-shell { padding: 12px; }
  .patch-header, .wiki-panel { padding: 20px 16px; }
  .patch-card-head, .patch-items { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ===== Professional cleanup: flatter hierarchy and denser workflows ===== */
:root {
  --sf-canvas: #050a12;
  --sf-surface: #0a111e;
  --sf-surface-raised: #0d1625;
  --sf-edge: rgba(137, 168, 218, .2);
  --sf-edge-strong: rgba(137, 180, 236, .32);
  --sf-muted: #9eafc9;
  --sf-radius: 12px;
  --sf-radius-small: 8px;
}

body {
  background-color: var(--sf-canvas);
  background-blend-mode: multiply;
  font-size: 15px;
}

/* Portal shell: one masthead and one content surface. */
.sf-shell { width: min(1420px, 100%); padding: 12px clamp(10px, 1.6vw, 22px) 24px; }
.sf-header { border-radius: var(--sf-radius); box-shadow: 0 10px 28px rgba(0, 0, 0, .28); }
.sf-banner-overlay { padding: clamp(20px, 2.3vw, 32px); }
.sf-brand-chip, .sf-badge, .patch-kicker { padding: 5px 9px; border-radius: 6px; }
.sf-brand-copy h1 { margin-bottom: 8px; font-size: clamp(38px, 4.3vw, 60px); }
.sf-brand-copy p { font-size: 15px; line-height: 1.5; }
.sf-command-panel { padding: 14px; border-radius: 10px; box-shadow: none; }
.sf-command-panel::before { top: 14px; bottom: 14px; width: 2px; }
.sf-command-grid { gap: 6px; margin-top: 10px; }
.sf-command-stat { padding: 8px 10px; border-radius: 6px; }
.sf-command-stat strong { font-size: 16px; }
.sf-nav { gap: 3px 12px; padding: 8px clamp(12px, 1.6vw, 22px); }
.sf-nav-group { gap: 3px; }
.sf-nav a, .sf-nav-welcome { min-height: 36px; padding: 6px 10px; border-radius: 6px; }
.sf-nav a[aria-current="page"] { border-color: transparent; border-bottom-color: #78bfff; background: rgba(98, 178, 255, .09); }
.sf-frame-wrap { margin-top: 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.sf-frame-head { display: none; }
.sf-frame { height: min(1120px, calc(100vh - 120px)); min-height: 680px; border: 1px solid rgba(137, 168, 218, .13); border-radius: var(--sf-radius); background: var(--sf-canvas); }

/* Embedded pages use the portal as their surrounding chrome. */
.sf-embedded body { background: var(--sf-canvas) !important; }
.sf-embedded .patch-shell,
.sf-embedded .wiki-shell { width: min(1240px, 100%); padding: clamp(18px, 2vw, 28px); }

/* Patch notes: editorial list instead of stacked cards inside cards. */
.patch-shell { width: min(1120px, 100%); }
.patch-header {
  margin: 0 0 6px;
  padding: 8px 2px 22px;
  border: 0;
  border-bottom: 1px solid var(--sf-edge);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.patch-header h1 { margin: 8px 0 6px; font-size: clamp(30px, 3.4vw, 44px); }
.patch-header p { line-height: 1.5; }
.patch-kicker { margin-bottom: 2px; border: 0; border-left: 2px solid #6dbbff; background: transparent; }
.patch-list { gap: 0; }
.patch-card {
  border: 0;
  border-bottom: 1px solid var(--sf-edge);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.patch-card-head { padding: 18px 2px 10px; border: 0; background: transparent; }
.patch-title { font-size: 20px; }
.patch-date { font-size: 13px; }
.patch-items { gap: 2px; padding: 0 0 15px; }
.patch-item {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.patch-tag { min-width: 0; min-height: 24px; padding: 2px 8px; border-radius: 5px; font-size: 10px; }
.patch-copy { padding-top: 1px; line-height: 1.5; }
.patch-archive { margin-top: 14px; }
.patch-archive > summary { min-height: 44px; padding: 10px 13px; border-radius: 7px; background: rgba(13, 22, 37, .72); font-size: 15px; }

/* Wiki: lighter header, compact filters, and article rows. */
.wiki-shell { width: min(1180px, 100%); }
.wiki-panel,
.wiki-card,
.wiki-filter-card { box-shadow: none !important; }
.wiki-panel {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 26px;
  padding: 8px 2px 24px;
  border: 0;
  border-bottom: 1px solid var(--sf-edge);
  border-radius: 0;
  background: transparent;
}
.wiki-title { margin: 7px 0 6px; font-size: clamp(30px, 3.2vw, 42px); }
.wiki-sub { max-width: 66ch; line-height: 1.55; }
.wiki-quick { gap: 6px; margin-top: 13px; }
.wiki-quick-pill, .wiki-category-pill { padding: 5px 8px; border-radius: 5px; font-size: 10px; }
.wiki-search.wiki-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  align-self: start;
  padding: 14px;
  border: 1px solid var(--sf-edge);
  border-radius: 9px;
  background: rgba(9, 17, 29, .72);
}
.wiki-search .sf-badge { margin-bottom: 5px; border: 0; background: transparent; }
.wiki-field, .wiki-select { min-height: 40px; border-radius: 6px; }
.wiki-grid { grid-template-columns: 190px minmax(0, 1fr); gap: 24px; margin-top: 18px; }
.wiki-filter-card { padding: 0 18px 0 0; border: 0; border-right: 1px solid var(--sf-edge); border-radius: 0; background: transparent; }
.wiki-filter-card h2, .wiki-results-head h2 { margin-bottom: 8px; font-size: 18px; }
.wiki-category-list { gap: 5px; }
.wiki-results { gap: 0; }
.wiki-results-head { padding: 0 0 12px; border-bottom: 1px solid var(--sf-edge); }
.wiki-card { padding: 17px 2px; border: 0; border-bottom: 1px solid var(--sf-edge); border-radius: 0; background: transparent; }
.wiki-card h3 { margin-bottom: 5px; font-size: 20px; }
.wiki-card p { margin-bottom: 10px; line-height: 1.5; }
.wiki-meta { gap: 5px 10px; margin-bottom: 8px; font-size: 11px; }

/* Wiki articles: keep the reading surface open and quiet. */
.wiki-page-card {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.wiki-page-head {
  padding: 8px 2px 22px !important;
  border-bottom: 1px solid var(--sf-edge) !important;
}
.wiki-page-title { margin: 8px 0 7px !important; font-size: clamp(30px, 3.3vw, 42px) !important; }
.wiki-page-summary { max-width: 76ch; line-height: 1.55 !important; }
.wiki-page-head .wiki-meta,
.wiki-page-head .wiki-category-list { gap: 6px 9px; margin-top: 13px !important; }
.wiki-pill { padding: 5px 8px !important; border-radius: 5px !important; font-size: 10px !important; }
.wiki-page-actions { gap: 8px !important; margin-top: 14px !important; }
.wiki-page-body {
  max-width: 82ch;
  padding: 24px 2px !important;
  line-height: 1.65 !important;
}
.wiki-page-body h1,
.wiki-page-body h2,
.wiki-page-body h3,
.wiki-page-body h4,
.wiki-page-body h5,
.wiki-page-body h6 { margin: 1.35em 0 .45em !important; }
.wiki-page-body pre { padding: 13px !important; border-radius: 7px !important; }
.wiki-page-body code { border-radius: 4px !important; }

/* Shared account and admin pages: compact rail plus flat content. */
.sf-auth-shell { padding: 14px; }
.sf-auth-wrap { width: min(1240px, 100%); grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 0; }
.sf-auth-aside,
.sf-auth-form {
  padding: clamp(18px, 2vw, 26px);
  border-radius: 0;
  box-shadow: none;
}
.sf-auth-aside { border: 1px solid var(--sf-edge); border-right: 0; border-radius: var(--sf-radius) 0 0 var(--sf-radius); background: rgba(6, 13, 23, .86); }
.sf-auth-form { border: 1px solid var(--sf-edge); border-radius: 0 var(--sf-radius) var(--sf-radius) 0; background: rgba(7, 13, 23, .94); }
.sf-auth-brand { margin-bottom: 18px; }
.sf-auth-brand-name { font-size: clamp(28px, 3vw, 40px); }
.sf-auth-copy h2 { margin: 12px 0 7px; font-size: clamp(23px, 2.4vw, 32px); }
.sf-auth-copy p { line-height: 1.5; }
.sf-auth-head { gap: 12px; margin-bottom: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--sf-edge); }
.sf-auth-head h1 { margin: 5px 0 5px; font-size: clamp(24px, 2.4vw, 34px); }
.sf-auth-head p { line-height: 1.45; }
.sf-aside-action-list { gap: 0 !important; margin-top: 16px !important; border-top: 1px solid var(--sf-edge); }
.sf-aside-action-tile {
  gap: 10px !important;
  padding: 11px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--sf-edge) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.sf-aside-action-tile:hover { transform: none !important; background: rgba(102, 172, 255, .07) !important; }
.sf-aside-action-tile strong { margin-bottom: 3px !important; font-size: 14px !important; }
.sf-aside-action-tile span { font-size: 12px !important; line-height: 1.35 !important; }
.sf-aside-mini-label { padding: 3px 6px !important; border-radius: 4px !important; font-size: 9px !important; }
.sf-auth-points { gap: 0; margin-top: 16px; border-top: 1px solid var(--sf-edge); }
.sf-auth-point { padding: 11px 2px; border: 0; border-bottom: 1px solid var(--sf-edge); border-radius: 0; background: transparent; }
.sf-auth-grid { gap: 13px; }
.sf-input { min-height: 44px; border-radius: 7px; }
.sf-form-actions { gap: 8px; }
.sf-btn { min-height: 38px; padding: 0 13px; border-radius: 6px; font-size: 13px; }
.sf-card {
  padding: 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--sf-edge) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.sf-member-stack { gap: 0 !important; }
.sf-member-grid { gap: 0 !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.sf-member-grid > .sf-card + .sf-card { border-left: 1px solid var(--sf-edge) !important; }
.sf-card-title { margin-top: 3px !important; font-size: 20px; }
.sf-card-sub { line-height: 1.5; }
.sf-status-row { gap: 6px !important; margin: 10px 0 12px !important; }
.sf-status-pill { padding: 5px 8px !important; border-radius: 5px !important; font-size: 10px !important; }
.sf-detail-list { gap: 0 !important; margin-top: 10px !important; border-top: 1px solid var(--sf-edge); border-left: 1px solid var(--sf-edge); }
.sf-detail-item { padding: 10px 12px !important; border: 0 !important; border-right: 1px solid var(--sf-edge) !important; border-bottom: 1px solid var(--sf-edge) !important; border-radius: 0 !important; background: transparent !important; }
.sf-detail-item strong { margin-bottom: 3px !important; font-size: 10px !important; }
.sf-inline-note { margin-top: 12px !important; padding: 11px 13px !important; border-radius: 7px !important; }
.sf-kicker { margin-bottom: 7px !important; padding: 3px 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: #7fbfff !important; }
.sf-plain-list { line-height: 1.45; }
.sf-plain-list li + li { margin-top: 5px !important; }

/* Full-width editors, mail, and operational pages. */
.sf-auth-shell--full { padding: 10px; }
.sf-auth-form--full { padding: 18px !important; border: 1px solid var(--sf-edge); border-radius: var(--sf-radius); }
.wrap, .mail-shell, .mail-app { width: min(1260px, 100%) !important; padding: 16px !important; }
.hero, .mail-header, .mail-panel, .mail-column, .mail-meta-card, .mail-card, .info-box, .history-box, .card,
.wiki-edit-card, .wiki-admin-table-card, .wiki-category-card, .wiki-category-table-card, .wiki-delete-card {
  border-radius: var(--sf-radius-small) !important;
  box-shadow: none !important;
}
.wiki-edit-layout { gap: 10px !important; }
.wiki-edit-card { padding: 17px !important; background: rgba(8, 15, 27, .82) !important; }
.wiki-form-grid { gap: 10px !important; }
.wiki-field-wrap { gap: 6px !important; margin-bottom: 11px !important; }
.wiki-input, .wiki-textarea, .wiki-select { padding: 10px 11px !important; border-radius: 6px !important; }
.wiki-note { margin-bottom: 12px !important; padding: 11px 12px !important; border-radius: 6px !important; }
.wiki-revision-list { gap: 0 !important; }
.wiki-revision-item { padding: 11px 2px !important; border: 0 !important; border-bottom: 1px solid var(--sf-edge) !important; border-radius: 0 !important; background: transparent !important; }
.wiki-submit-row { gap: 8px !important; }
.mail-frame { gap: 0 !important; grid-template-columns: 250px minmax(0, 1fr) !important; }
.mail-sidebar { border-radius: var(--sf-radius) 0 0 var(--sf-radius) !important; }
.mail-main { border-radius: 0 var(--sf-radius) var(--sf-radius) 0 !important; }
.mail-nav { gap: 0 !important; }
.mail-nav > a { padding: 11px 2px !important; border: 0 !important; border-bottom: 1px solid var(--sf-edge) !important; border-radius: 0 !important; background: transparent !important; }
.mail-toolbar, .mail-header { padding: 16px 18px !important; }
.mail-tabs { gap: 2px !important; }
.mail-tab { padding: 8px 10px !important; border-radius: 5px !important; }
.mail-surface, .mail-layout, .mail-browser { gap: 10px !important; }
.mail-row, .mail-message-row { border-radius: 5px !important; }

@media (max-width: 980px) {
  .sf-auth-wrap { grid-template-columns: 1fr; gap: 10px; }
  .sf-auth-aside, .sf-auth-form { border: 1px solid var(--sf-edge); border-radius: var(--sf-radius); }
  .sf-auth-aside { order: 0; }
  .sf-aside-action-list { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px !important; }
  .wiki-grid { grid-template-columns: 1fr; }
  .wiki-filter-card { padding: 0 0 14px; border-right: 0; border-bottom: 1px solid var(--sf-edge); }
  .mail-frame { grid-template-columns: 1fr !important; gap: 10px !important; }
  .mail-sidebar, .mail-main { border-radius: var(--sf-radius) !important; }
}

@media (max-width: 700px) {
  .sf-shell { padding: 6px; }
  .sf-banner-overlay { padding: 17px 14px; }
  .sf-brand-copy h1 { font-size: clamp(30px, 10vw, 44px); }
  .sf-frame { height: 78vh; min-height: 560px; border-radius: 8px; }
  .sf-auth-shell, .sf-auth-shell--full { padding: 6px; }
  .sf-auth-aside, .sf-auth-form, .sf-auth-form--full { padding: 16px 14px !important; }
  .sf-aside-action-list { grid-template-columns: 1fr; }
  .sf-member-grid { grid-template-columns: 1fr !important; }
  .sf-member-grid > .sf-card + .sf-card { border-left: 0 !important; }
  .sf-detail-list { grid-template-columns: 1fr !important; }
  .patch-shell, .wiki-shell { padding: 15px 13px; }
  .patch-item { grid-template-columns: 1fr; gap: 5px; padding: 8px 0; }
  .wiki-panel { grid-template-columns: 1fr; gap: 16px; }
  .wiki-search.wiki-panel { padding: 12px; }
  .mail-shell, .mail-app, .wrap { padding: 6px !important; }
}

/* ===== Wiki documentation system ===== */
.wiki-shell {
  width: min(1220px, 100%);
  padding: clamp(18px, 2.4vw, 32px);
  color: #e8eef8;
  font-family: Inter, "Segoe UI", sans-serif;
}
.wiki-masthead {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px) !important;
  align-items: center;
  gap: clamp(32px, 5vw, 70px) !important;
  padding: 8px 0 28px !important;
}
.wiki-eyebrow,
.wiki-sidebar-label,
.wiki-toc-label {
  color: #77bfff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.wiki-title {
  margin: 9px 0 8px !important;
  font-family: Inter, "Segoe UI", sans-serif !important;
  font-size: clamp(32px, 4vw, 48px) !important;
  font-weight: 750;
  letter-spacing: -.035em;
}
.wiki-sub { max-width: 62ch !important; color: #b9c6da !important; font-size: 16px; }
.wiki-quick { margin-top: 17px !important; }
.wiki-quick-pill {
  padding: 4px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #96a8c2 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.wiki-quick-pill + .wiki-quick-pill::before { content: "·"; margin-right: 8px; color: #52647e; }
.wiki-quick-pill strong { color: #e8eef8; }
.wiki-search.wiki-panel {
  gap: 12px !important;
  padding: 17px !important;
  border: 1px solid rgba(137, 168, 218, .2) !important;
  border-radius: 10px !important;
  background: #09111e !important;
}
.wiki-search label {
  display: block;
  margin-bottom: 6px;
  color: #aab8cc;
  font-size: 12px;
  font-weight: 700;
}
.wiki-search .wiki-field,
.wiki-search .wiki-select { min-height: 42px; border-color: rgba(150, 177, 220, .24); background: #050b14; }
.wiki-search .sf-btn { min-height: 42px; }
.wiki-grid { grid-template-columns: 210px minmax(0, 1fr) !important; gap: 34px !important; margin-top: 26px !important; }
.wiki-filter-card {
  position: sticky;
  top: 20px;
  padding: 4px 22px 12px 0 !important;
  border-right-color: rgba(137, 168, 218, .15) !important;
}
.wiki-filter-card h2,
.wiki-results-head h2 {
  margin: 5px 0 13px !important;
  font-family: Inter, "Segoe UI", sans-serif !important;
  font-size: 19px !important;
  font-weight: 700;
  letter-spacing: -.015em;
}
.wiki-filter-card .wiki-category-list { display: flex; flex-direction: column; gap: 3px; }
.wiki-filter-card .wiki-category-pill {
  justify-content: space-between;
  width: 100%;
  padding: 8px 9px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #aebcd0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.wiki-filter-card a.wiki-category-pill:hover { color: #fff !important; background: rgba(117, 180, 255, .08) !important; }
.wiki-filter-card .wiki-category-pill[aria-current="page"] { color: #eaf4ff !important; background: rgba(102, 178, 255, .13) !important; }
.wiki-category-count { color: #71839e; font-size: 11px; font-variant-numeric: tabular-nums; }
.wiki-results-head { align-items: center !important; padding: 0 0 15px !important; }
.wiki-results-head .sf-frame-sub { color: #8fa1ba; font-size: 13px; }
.wiki-results { gap: 0 !important; }
.wiki-card {
  position: relative;
  padding: 20px 4px 20px 0 !important;
  transition: background-color .16s ease, padding .16s ease;
}
.wiki-card:hover { padding-left: 10px !important; background: linear-gradient(90deg, rgba(92, 164, 255, .06), transparent 72%) !important; }
.wiki-card-title {
  margin: 0 0 7px !important;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 20px !important;
  font-weight: 700;
  letter-spacing: -.015em;
}
.wiki-card-title a { color: #edf4ff; text-decoration: none; }
.wiki-card-title a:hover { color: #82c6ff; }
.wiki-card-meta { margin: 0 0 10px !important; color: #788aa4 !important; font-size: 11px !important; }
.wiki-card p { max-width: 78ch; margin: 0 0 11px !important; color: #b4c2d6 !important; font-size: 14px; line-height: 1.55 !important; }
.wiki-card > .wiki-category-list { gap: 5px !important; }
.wiki-card > .wiki-category-list .wiki-category-pill,
.wiki-page-head .wiki-pill {
  padding: 3px 7px !important;
  border-color: rgba(137, 168, 218, .17) !important;
  border-radius: 4px !important;
  background: rgba(122, 157, 210, .05) !important;
  color: #9cadc5 !important;
  font-size: 10px !important;
  letter-spacing: .035em !important;
}

/* Article pages use a documentation reading column with generated contents. */
.wiki-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #7f91aa;
  font-size: 12px;
}
.wiki-breadcrumb a { color: #8fcaff; text-decoration: none; }
.wiki-breadcrumb a:hover { text-decoration: underline; }
.wiki-page-title {
  margin: 13px 0 8px !important;
  font-family: Inter, "Segoe UI", sans-serif !important;
  font-size: clamp(32px, 4vw, 46px) !important;
  font-weight: 750;
  letter-spacing: -.035em;
}
.wiki-page-summary { color: #b7c4d7 !important; font-size: 16px; }
.wiki-article-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 38px; padding-top: 26px; }
.wiki-toc { position: sticky; top: 20px; align-self: start; padding-right: 18px; border-right: 1px solid var(--sf-edge); }
.wiki-toc nav { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.wiki-toc a { padding: 6px 8px; border-radius: 5px; color: #97a8c0; font-size: 12px; line-height: 1.35; text-decoration: none; }
.wiki-toc a:hover { color: #eef6ff; background: rgba(102, 178, 255, .09); }
.wiki-toc a.wiki-toc-sub { padding-left: 18px; color: #788aa4; }
.wiki-page-body { max-width: 76ch; padding: 0 2px 40px !important; color: #dbe4f1 !important; font-size: 15px; line-height: 1.72 !important; }
.wiki-page-body h1,
.wiki-page-body h2,
.wiki-page-body h3,
.wiki-page-body h4,
.wiki-page-body h5,
.wiki-page-body h6 {
  scroll-margin-top: 24px;
  font-family: Inter, "Segoe UI", sans-serif !important;
  font-weight: 720;
  letter-spacing: -.02em;
}
.wiki-page-body h1 { font-size: 28px; }
.wiki-page-body h2 { margin-top: 1.7em !important; padding-top: .35em; font-size: 23px; }
.wiki-page-body h3 { font-size: 18px; }
.wiki-page-body a { color: #7fc4ff; text-underline-offset: 3px; }
.wiki-page-body blockquote { margin: 18px 0; padding: 3px 0 3px 16px; border-left: 3px solid #568fca; color: #aebdd1; }
.wiki-page-body table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.wiki-page-body th, .wiki-page-body td { padding: 10px 12px; border-bottom: 1px solid var(--sf-edge); text-align: left; }
.wiki-page-body th { color: #f0f5fc; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }

@media (max-width: 850px) {
  .wiki-masthead { grid-template-columns: 1fr !important; gap: 22px !important; }
  .wiki-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
  .wiki-filter-card { position: static; padding: 0 0 17px !important; border-right: 0 !important; border-bottom: 1px solid var(--sf-edge); }
  .wiki-filter-card .wiki-category-list { flex-direction: row; }
  .wiki-filter-card .wiki-category-pill { width: auto; }
  .wiki-article-layout { grid-template-columns: 1fr; gap: 20px; }
  .wiki-toc { position: static; padding: 0 0 15px; border-right: 0; border-bottom: 1px solid var(--sf-edge); }
  .wiki-toc nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .wiki-shell { padding: 14px 12px; }
  .wiki-title { font-size: 34px !important; }
  .wiki-search.wiki-panel { padding: 13px !important; }
  .wiki-filter-card .wiki-category-list { flex-direction: column; }
  .wiki-filter-card .wiki-category-pill { width: 100%; }
  .wiki-results-head { align-items: flex-start !important; }
  .wiki-results-head .sf-btn { width: 100%; }
  .wiki-card:hover { padding-left: 4px !important; }
  .wiki-article-layout { padding-top: 20px; }
  .wiki-toc nav { grid-template-columns: 1fr; }
}

/* ========================================================================== 
   STARFORGE FORGE-CONSOLE VISUAL SYSTEM
   Original vector assets: forge-crest.svg, orbital-forge.svg, circuit-lattice.svg
   ========================================================================== */

:root {
  --forge-void: #030710;
  --forge-ink: #07101d;
  --forge-panel: rgba(8, 18, 32, .92);
  --forge-panel-raised: rgba(12, 25, 43, .94);
  --forge-blue: #70d7ff;
  --forge-blue-deep: #557de8;
  --forge-gold: #e0b764;
  --forge-green: #5cf0bd;
  --forge-red: #ff6e7c;
  --forge-edge: rgba(120, 192, 255, .28);
  --forge-edge-hot: rgba(139, 225, 255, .58);
  --forge-cut: 13px;
  --forge-glow: 0 0 0 1px rgba(116, 207, 255, .08), 0 22px 70px rgba(0, 0, 0, .46);
}

body {
  background-color: var(--forge-void);
  background-image:
    radial-gradient(circle at 76% -10%, rgba(50, 121, 202, .22), transparent 34rem),
    radial-gradient(circle at 8% 32%, rgba(211, 157, 62, .09), transparent 28rem),
    linear-gradient(rgba(4, 9, 17, .91), rgba(4, 9, 17, .97)),
    url('/assets/graphics/circuit-lattice.svg'),
    url('/assets/img/pexels-benjaminfarren-background2.jpg');
  background-size: auto, auto, auto, 640px 320px, cover;
  background-attachment: fixed;
}

::selection { color: #04101a; background: #9ce9ff; }

/* Hero: the crest and orbital schematic form one branded instrument panel. */
.sf-header {
  position: relative;
  border: 1px solid rgba(121, 200, 255, .34);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
  box-shadow: var(--forge-glow);
}

.sf-header::before,
.sf-header::after {
  content: '';
  position: absolute;
  z-index: 8;
  pointer-events: none;
}

.sf-header::before {
  top: 0;
  right: 26px;
  width: 92px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--forge-gold));
  box-shadow: 0 0 14px rgba(224, 183, 100, .7);
}

.sf-header::after {
  inset: 7px;
  border: 1px solid rgba(144, 213, 255, .09);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

.sf-banner {
  isolation: isolate;
  background:
    linear-gradient(102deg, rgba(2, 7, 14, .98) 0%, rgba(4, 12, 24, .87) 53%, rgba(3, 8, 18, .72) 100%),
    url('/assets/graphics/circuit-lattice.svg') center/640px 320px,
    url('/assets/img/pexels-benjaminfarren-background2.jpg') center 43%/cover;
}

.sf-banner::before {
  background:
    linear-gradient(90deg, rgba(112, 215, 255, .5), transparent 10%) top left/45% 1px no-repeat,
    linear-gradient(270deg, rgba(224, 183, 100, .5), transparent 10%) bottom right/40% 1px no-repeat,
    radial-gradient(circle at 72% 42%, rgba(68, 147, 255, .22), transparent 31%);
}

.sf-banner::after { display: none; }
.sf-brand-mark { position: relative; z-index: 3; }
.sf-brand-lockup { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: clamp(15px, 2vw, 26px); }
.sf-brand-crest { width: clamp(78px, 8vw, 104px); height: auto; filter: drop-shadow(0 0 22px rgba(94, 198, 255, .26)); }

.sf-brand-chip,
.sf-badge,
.patch-kicker,
.wiki-eyebrow,
.sf-kicker {
  position: relative;
  padding-left: 22px !important;
  border: 0 !important;
  background: transparent !important;
  color: #91dfff !important;
  letter-spacing: .18em !important;
}

.sf-brand-chip::before,
.sf-badge::before,
.patch-kicker::before,
.wiki-eyebrow::before,
.sf-kicker::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 1px solid var(--forge-gold);
  transform: translateY(-50%) rotate(45deg);
  box-shadow: inset 0 0 0 3px rgba(224, 183, 100, .12), 0 0 9px rgba(224, 183, 100, .24);
}

.sf-brand-copy h1 {
  position: relative;
  width: max-content;
  max-width: 100%;
  color: #f4f8ff;
  letter-spacing: .13em;
  text-shadow: 0 0 22px rgba(113, 220, 255, .22), 0 3px 0 rgba(44, 84, 132, .5);
}

.sf-brand-copy h1::after {
  content: '';
  display: block;
  width: 72%;
  height: 4px;
  margin-top: 11px;
  background: linear-gradient(90deg, var(--forge-gold), var(--forge-blue) 42%, transparent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  box-shadow: 0 0 14px rgba(109, 213, 255, .3);
}

.sf-command-panel {
  min-height: 218px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--forge-edge-hot);
  border-radius: 0;
  clip-path: polygon(0 16px, 16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
  background: linear-gradient(145deg, rgba(9, 23, 42, .92), rgba(3, 10, 20, .96));
  box-shadow: inset 0 0 35px rgba(49, 139, 218, .08), 0 18px 55px rgba(0, 0, 0, .42);
}

.sf-command-panel::before {
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-left: 3px solid var(--forge-gold);
  border-top: 3px solid transparent;
  background: none;
}

.sf-command-orbit {
  position: absolute;
  z-index: -1;
  top: -32%;
  right: -18%;
  width: 118%;
  height: auto;
  opacity: .28;
  pointer-events: none;
  filter: saturate(1.15);
}

.sf-command-heading,
.sf-command-grid { position: relative; z-index: 2; }
.sf-command-heading { padding-bottom: 10px; border-bottom: 1px solid rgba(127, 205, 255, .18); }
.sf-command-signal { animation: forge-pulse 2.4s ease-out infinite; }
.sf-command-stat {
  position: relative;
  border: 1px solid rgba(126, 199, 255, .22);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  background: linear-gradient(135deg, rgba(3, 11, 23, .86), rgba(14, 34, 57, .64));
}
.sf-command-stat::after { content: ''; position: absolute; right: 0; top: 0; width: 18px; height: 1px; background: var(--forge-gold); }

@keyframes forge-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(92, 240, 189, .08), 0 0 12px rgba(92, 240, 189, .4); }
  50% { box-shadow: 0 0 0 9px rgba(92, 240, 189, 0), 0 0 22px rgba(92, 240, 189, .75); }
}

/* Navigation glyphs are CSS-drawn instrumentation, not font icons. */
.sf-nav-wrap { position: relative; border-top-color: rgba(122, 199, 255, .2); background: rgba(3, 9, 18, .96); }
.sf-nav-wrap::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .24; background: url('/assets/graphics/circuit-lattice.svg') center 35%/640px 320px; }
.sf-nav { position: relative; z-index: 1; }
.sf-nav a {
  position: relative;
  gap: 9px;
  border-radius: 0;
  color: #cad8eb;
  letter-spacing: .07em;
  transition: color .18s ease, background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.sf-nav a[data-sf-icon]::before {
  content: '';
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  border: 1px solid #79cfff;
  transform: rotate(45deg) scale(.72);
  box-shadow: inset 0 0 0 3px rgba(121, 207, 255, .08);
}
.sf-nav a[data-sf-icon="archive"]::before { border-radius: 50%; border-style: double; border-width: 3px; }
.sf-nav a[data-sf-icon="radar"]::before { border-radius: 50% 0 50% 50%; }
.sf-nav a[data-sf-icon="download"]::before { border-width: 0 2px 2px 0; }
.sf-nav a[data-sf-icon="signal"]::before { border-radius: 50%; border-left-color: transparent; border-bottom-color: transparent; }
.sf-nav a[data-sf-icon="spark"]::before { border-color: var(--forge-gold); background: rgba(224, 183, 100, .15); }
.sf-nav a[data-sf-icon="user"]::before { border-radius: 50% 50% 35% 35%; }
.sf-nav a[data-sf-icon="exit"]::before { border-left-color: transparent; }
.sf-nav a:hover,
.sf-nav a:focus-visible { color: #fff; background: linear-gradient(90deg, rgba(92, 188, 255, .14), transparent); transform: translateY(-1px); }
.sf-nav a[aria-current="page"] { color: #fff; border-bottom: 1px solid var(--forge-gold); background: linear-gradient(90deg, rgba(83, 173, 255, .18), rgba(83, 173, 255, .03)); box-shadow: inset 0 -8px 18px rgba(80, 171, 255, .06); }

/* A reusable graphical heading rail keeps text semantic and selectable. */
.patch-header,
.wiki-masthead,
.wiki-page-head,
.sf-auth-head,
.mail-header,
.hero {
  position: relative;
  isolation: isolate;
}

.patch-header::before,
.wiki-masthead::before,
.wiki-page-head::before,
.sf-auth-head::before,
.mail-header::before,
.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(91, 179, 255, .15), transparent 54%),
    url('/assets/graphics/circuit-lattice.svg') right center/520px auto no-repeat;
  opacity: .72;
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 0 100%);
}

.patch-header,
.wiki-masthead,
.wiki-page-head,
.sf-auth-head {
  padding-left: clamp(18px, 2vw, 28px) !important;
  border-left: 3px solid var(--forge-gold) !important;
  border-bottom-color: rgba(118, 195, 255, .28) !important;
}

.patch-header h1,
.wiki-title,
.wiki-page-title,
.sf-auth-head h1,
.mail-header h1,
.hero h1,
.sf-sync-page-title {
  color: #f1f7ff !important;
  font-family: 'Orbitron', 'Rajdhani', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: .025em !important;
  text-shadow: 0 0 20px rgba(105, 209, 255, .14);
}

.wiki-filter-card h2,
.wiki-results-head h2,
.section-title,
.sf-card-title,
.mail-panel h2,
.wiki-page-body h2 {
  position: relative;
  padding-left: 18px;
}

.wiki-filter-card h2::before,
.wiki-results-head h2::before,
.section-title::before,
.sf-card-title::before,
.mail-panel h2::before,
.wiki-page-body h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: .28em;
  width: 8px;
  height: .82em;
  background: linear-gradient(var(--forge-blue), var(--forge-blue-deep));
  clip-path: polygon(0 0, 100% 22%, 100% 78%, 0 100%);
  box-shadow: 0 0 9px rgba(112, 215, 255, .35);
}

/* Custom control chassis with distinct primary, secondary, and destructive states. */
.sf-btn,
.mail-btn,
button:not(.sf-menu-toggle),
input[type="submit"] {
  --control-a: rgba(18, 39, 66, .96);
  --control-b: rgba(7, 17, 31, .98);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid rgba(118, 194, 255, .32);
  border-radius: 0 !important;
  clip-path: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  background: linear-gradient(145deg, var(--control-a), var(--control-b)) !important;
  color: #eaf5ff !important;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  box-shadow: inset 0 0 18px rgba(82, 167, 245, .05), 0 7px 18px rgba(0, 0, 0, .18);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, filter .16s ease;
}

.sf-btn::before,
.mail-btn::before,
button:not(.sf-menu-toggle)::before,
input[type="submit"]::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: .7;
}

.sf-btn--primary,
.mail-btn--primary,
button[type="submit"]:not(.secondary):not(.danger),
input[type="submit"] {
  --control-a: #74dfff;
  --control-b: #517ce3;
  border-color: #a7eaff;
  color: #03101d !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .42), 0 8px 26px rgba(65, 143, 239, .26);
}

.sf-btn--secondary,
.mail-btn--secondary,
button.secondary { --control-a: rgba(19, 41, 68, .98); --control-b: rgba(7, 17, 31, .98); }

.sf-btn--danger,
.mail-btn--danger,
button.danger {
  --control-a: rgba(119, 31, 48, .96);
  --control-b: rgba(48, 12, 24, .98);
  border-color: rgba(255, 110, 124, .65);
  color: #ffe8ec !important;
}

.sf-btn--danger::before,
.mail-btn--danger::before,
button.danger::before { transform: rotate(45deg); background: currentColor; box-shadow: 0 0 7px rgba(255, 110, 124, .6); }

.sf-btn:hover,
.mail-btn:hover,
button:not(.sf-menu-toggle):hover,
input[type="submit"]:hover { transform: translateY(-2px); border-color: var(--forge-edge-hot); filter: brightness(1.08); box-shadow: 0 10px 26px rgba(0, 0, 0, .28), 0 0 18px rgba(94, 199, 255, .1); }

.sf-btn:active,
.mail-btn:active,
button:not(.sf-menu-toggle):active,
input[type="submit"]:active { transform: translateY(0); }

.sf-btn:focus-visible,
.mail-btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible { outline: 2px solid #fff3b8; outline-offset: 3px; }

button:disabled,
.mail-btn:disabled { filter: grayscale(.55); opacity: .58; transform: none !important; }

/* Panels, cards, metadata, and statuses share the same forged frame geometry. */
.wiki-search.wiki-panel,
.wiki-edit-card,
.wiki-admin-table-card,
.wiki-category-card,
.wiki-category-table-card,
.wiki-delete-card,
.sf-card,
.mail-panel,
.mail-column,
.mail-meta-card,
.mail-card,
.info-box,
.history-box,
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--forge-edge) !important;
  border-radius: 0 !important;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%) !important;
  background-color: var(--forge-panel) !important;
  background-image: linear-gradient(135deg, rgba(70, 157, 232, .08), transparent 48%), url('/assets/graphics/circuit-lattice.svg') !important;
  background-position: 0 0, right top !important;
  background-size: auto, 480px auto !important;
  background-repeat: no-repeat !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 14px 35px rgba(0, 0, 0, .2) !important;
}

.wiki-card {
  border-left: 2px solid transparent !important;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease !important;
}
.wiki-card:hover { border-left-color: var(--forge-gold) !important; transform: translateX(3px); }
.patch-card { position: relative; border-bottom-color: rgba(119, 190, 244, .19); }
.patch-card::before { content: ''; position: absolute; left: 0; top: 20px; width: 6px; height: 6px; border: 1px solid var(--forge-gold); transform: rotate(45deg); }
.patch-card-head, .patch-items { padding-left: 20px; }
.patch-title { font-family: 'Rajdhani', sans-serif; font-size: 22px; letter-spacing: .03em; }
.patch-date { color: #8ea9c8; font-family: 'Rajdhani', sans-serif; letter-spacing: .09em; text-transform: uppercase; }
.patch-tag { border-radius: 0 !important; clip-path: polygon(0 5px, 5px 0, 100% 0, 100% 100%, 0 100%); }

.sf-status-pill,
.wiki-pill,
.wiki-category-pill,
.patch-tag {
  border: 1px solid rgba(123, 197, 255, .24) !important;
  background: linear-gradient(135deg, rgba(19, 48, 78, .82), rgba(7, 19, 35, .88)) !important;
  box-shadow: inset 0 0 10px rgba(86, 180, 255, .06);
}

.sf-input,
.wiki-field,
.wiki-input,
.wiki-select,
.wiki-textarea,
.mail-input,
.mail-textarea,
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea {
  border-radius: 0 !important;
  border-color: rgba(122, 195, 255, .26) !important;
  background-color: rgba(2, 9, 18, .94) !important;
  background-image: linear-gradient(90deg, rgba(81, 167, 238, .06), transparent 36%) !important;
}

.sf-input:focus,
.wiki-field:focus,
.wiki-input:focus,
.wiki-select:focus,
.wiki-textarea:focus,
input:focus,
select:focus,
textarea:focus { border-color: #74d9ff !important; box-shadow: 0 0 0 3px rgba(92, 193, 255, .11), inset 3px 0 var(--forge-gold) !important; }

.sf-auth-wrap { filter: drop-shadow(0 28px 52px rgba(0, 0, 0, .34)); }
.sf-auth-aside {
  position: relative;
  overflow: hidden;
  border-radius: 0 !important;
  background:
    linear-gradient(160deg, rgba(7, 18, 34, .92), rgba(3, 9, 18, .96)),
    url('/assets/graphics/orbital-forge.svg') 58% 92%/125% auto no-repeat,
    url('/assets/img/pexels-benjaminfarren-background2.jpg') center/cover !important;
}
.sf-auth-aside::after { content: ''; position: absolute; right: -80px; bottom: -60px; width: 360px; height: 200px; background: url('/assets/graphics/orbital-forge.svg') center/contain no-repeat; opacity: .2; pointer-events: none; }
.sf-auth-brand { display: flex; align-items: center; gap: 12px; }
.sf-auth-crest { width: 58px; height: 58px; filter: drop-shadow(0 0 15px rgba(93, 203, 255, .22)); }
.sf-auth-form { position: relative; border-radius: 0 !important; background: linear-gradient(145deg, rgba(8, 18, 33, .98), rgba(4, 10, 20, .98)) !important; }
.sf-auth-form::after { content: ''; position: absolute; top: 0; right: 0; width: 70px; height: 3px; background: linear-gradient(90deg, transparent, var(--forge-gold)); }

.sf-return-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(119, 194, 255, .22);
  background: rgba(7, 19, 34, .7);
  clip-path: polygon(0 7px, 7px 0, 100% 0, 100% 100%, 0 100%);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sf-return-link:hover { border-color: var(--forge-edge-hot); background: rgba(13, 37, 61, .84); }
.patch-archive > summary { border-radius: 0; clip-path: polygon(0 8px, 8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); background: linear-gradient(90deg, rgba(17, 39, 64, .9), rgba(6, 16, 29, .92)); }
.patch-archive > summary::marker { color: var(--forge-gold); }

@media (max-width: 980px) {
  .sf-brand-lockup { grid-template-columns: 82px minmax(0, 1fr); }
  .sf-command-panel { min-height: 190px; }
}

@media (max-width: 700px) {
  .sf-header { clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
  .sf-brand-lockup { grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 10px; }
  .sf-brand-crest { width: 48px; }
  .sf-brand-chip { font-size: 10px; }
  .sf-brand-copy h1 { font-size: clamp(26px, 8.5vw, 36px); letter-spacing: .055em; }
  .sf-brand-copy p { font-size: 14px; }
  .sf-command-panel { min-height: 0; }
  .sf-command-orbit { top: -4%; right: -35%; width: 140%; }
  .sf-nav a { width: 100%; }
  .patch-header, .wiki-masthead, .wiki-page-head, .sf-auth-head { padding-left: 15px !important; }
  .sf-btn, .mail-btn, button:not(.sf-menu-toggle), input[type="submit"] { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .sf-command-signal { animation: none; }
  .sf-btn, .mail-btn, button, .sf-nav a, .wiki-card { transition: none !important; }
}

/* ========================================================================== 
   OUTER-RIM TERMINAL PASS
   An original, lived-in space-opera treatment: industrial panels, warm signal
   lighting, cinematic frontier art, and restrained holographic instrumentation.
   ========================================================================== */

:root {
  --forge-void: #050708;
  --forge-ink: #0b0e10;
  --forge-panel: rgba(14, 18, 20, .96);
  --forge-panel-raised: rgba(21, 26, 28, .96);
  --forge-blue: #86d8e4;
  --forge-blue-deep: #28798b;
  --forge-gold: #e2a63b;
  --forge-ivory: #eee7d4;
  --forge-green: #74d69b;
  --forge-red: #e66d5f;
  --forge-edge: rgba(180, 191, 187, .23);
  --forge-edge-hot: rgba(226, 166, 59, .62);
  --sf-focus: #f2c66d;
}

body {
  color: #e5e3dc;
  background-color: #030405;
  background-image:
    radial-gradient(circle at 82% 2%, rgba(44, 100, 112, .17), transparent 31rem),
    radial-gradient(circle at 11% 48%, rgba(190, 124, 37, .07), transparent 28rem),
    linear-gradient(rgba(3, 5, 6, .93), rgba(3, 5, 6, .97)),
    url('/assets/img/pexels-benjaminfarren-background2.jpg');
  background-size: auto, auto, auto, cover;
}

.sf-shell { width: min(1540px, 100%); }

.sf-header {
  border-color: rgba(174, 188, 185, .31);
  background: #090d0f;
  box-shadow: 0 25px 80px rgba(0, 0, 0, .5), inset 0 0 0 5px rgba(255, 255, 255, .015);
}

.sf-header::before {
  right: 32px;
  width: 190px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #e2a63b 55%, #f1d28f);
}

.sf-header::after { border-color: rgba(224, 231, 223, .055); }

.sf-banner {
  min-height: 300px;
  background:
    linear-gradient(90deg, #070b0d 0%, rgba(7, 11, 13, .96) 44%, rgba(7, 11, 13, .67) 68%, rgba(7, 11, 13, .9) 100%),
    radial-gradient(circle at 76% 37%, rgba(104, 198, 211, .14), transparent 23rem),
    url('/assets/img/pexels-benjaminfarren-background2.jpg') center 39%/cover;
}

.sf-banner::before {
  background:
    linear-gradient(90deg, #e2a63b, transparent 32%) left bottom/64% 1px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 88px, rgba(226, 166, 59, .13) 89px 90px) left bottom/72% 8px no-repeat,
    linear-gradient(110deg, transparent 0 62%, rgba(5, 8, 9, .1) 62% 100%);
}

.sf-banner::after {
  display: block;
  top: auto;
  right: 0;
  bottom: 0;
  width: 64%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  background: url('/assets/graphics/outer-rim-horizon.svg') right bottom/cover no-repeat;
  opacity: .62;
  filter: none;
  z-index: 0;
}

.sf-banner-overlay {
  position: relative;
  min-height: 300px;
  grid-template-columns: minmax(0, 1.16fr) minmax(350px, .84fr);
  padding: clamp(30px, 3.6vw, 54px) clamp(24px, 4vw, 62px);
}

.sf-banner-overlay::after {
  content: 'SF–07  /  FRONTIER RELAY  /  ORBITAL UPLINK';
  position: absolute;
  left: clamp(24px, 4vw, 62px);
  bottom: 13px;
  color: rgba(206, 215, 207, .37);
  font: 700 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .22em;
  pointer-events: none;
}

.sf-brand-lockup { grid-template-columns: 94px minmax(0, 1fr); }
.sf-brand-crest,
.sf-auth-crest { filter: drop-shadow(0 0 14px rgba(226, 166, 59, .16)); }

.sf-brand-chip,
.sf-badge,
.patch-kicker,
.wiki-eyebrow,
.sf-kicker {
  color: #d9b569 !important;
  font-family: 'Rajdhani', sans-serif !important;
  font-weight: 700 !important;
}

.sf-brand-chip::before,
.sf-badge::before,
.patch-kicker::before,
.wiki-eyebrow::before,
.sf-kicker::before {
  width: 9px;
  height: 9px;
  border-color: #dda039;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #dda039;
  box-shadow: 0 0 0 3px rgba(221, 160, 57, .12), 0 0 12px rgba(221, 160, 57, .42);
}

.sf-brand-copy h1 {
  color: var(--forge-ivory);
  font-family: 'Orbitron', sans-serif;
  letter-spacing: .075em;
  text-shadow: 0 3px 0 #252b2d, 0 8px 24px rgba(0, 0, 0, .48);
}

.sf-brand-copy h1::before {
  content: '';
  position: absolute;
  left: -.22em;
  top: .08em;
  bottom: .12em;
  width: 3px;
  background: #e2a63b;
  box-shadow: 8px 0 0 rgba(226, 166, 59, .2);
}

.sf-brand-copy h1::after {
  height: 3px;
  background: linear-gradient(90deg, #e2a63b 0 46%, #86d8e4 46% 63%, transparent 63%);
  box-shadow: none;
}

.sf-brand-copy p { color: #d0d2ce; }

.sf-command-panel {
  min-height: 212px;
  padding: 20px 20px 18px 25px;
  border-color: rgba(185, 197, 191, .34);
  clip-path: polygon(0 18px, 18px 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
  background:
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(255, 255, 255, .018) 48px),
    linear-gradient(150deg, rgba(25, 31, 32, .96), rgba(8, 12, 14, .98));
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .018), 0 18px 50px rgba(0, 0, 0, .46);
}

.sf-command-panel::before { border-left-color: #e2a63b; }
.sf-command-orbit { right: -22%; top: -39%; opacity: .16; filter: grayscale(.3) sepia(.18); }
.sf-command-heading { border-bottom-color: rgba(226, 166, 59, .27); }
.sf-command-heading::after {
  content: 'UPLINK 03';
  margin-left: auto;
  color: rgba(229, 231, 220, .38);
  font: 700 8px/1 ui-monospace, monospace;
  letter-spacing: .16em;
}
.sf-command-signal { margin-left: 8px; background: #74d69b; }
.sf-command-stat {
  border-color: rgba(181, 194, 190, .24);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
  background: linear-gradient(145deg, rgba(4, 8, 10, .9), rgba(25, 31, 31, .76));
}
.sf-command-stat::after { background: #e2a63b; }
.sf-command-stat span { color: #9ca9a7; }
.sf-command-stat strong { color: #eee8d8; }

.sf-nav-wrap {
  border-top-color: rgba(226, 166, 59, .34);
  background: linear-gradient(#101517, #080b0d);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .018);
}
.sf-nav-wrap::before {
  opacity: .2;
  background: repeating-linear-gradient(90deg, transparent 0 76px, rgba(220, 228, 221, .1) 77px, transparent 78px);
}
.sf-nav { gap: 4px 16px; }
.sf-nav-group { gap: 2px; }
.sf-nav a { color: #c9cbc5; }
.sf-nav a[data-sf-icon]::before { border-color: #70c4cf; border-radius: 0; box-shadow: none; }
.sf-nav a[data-sf-icon="spark"]::before { border-color: #e2a63b; background: rgba(226, 166, 59, .18); }
.sf-nav a:hover,
.sf-nav a:focus-visible { background: linear-gradient(90deg, rgba(226, 166, 59, .11), transparent); }
.sf-nav a[aria-current="page"] { border-bottom-color: #e2a63b; background: linear-gradient(90deg, rgba(226, 166, 59, .16), rgba(226, 166, 59, .02)); }
.sf-nav-welcome { border: 1px solid rgba(190, 201, 195, .16); background: rgba(255, 255, 255, .025); color: #b6bcb8; }

/* Graphic title plates resemble labeled bulkhead panels rather than web cards. */
.patch-header::before,
.wiki-masthead::before,
.wiki-page-head::before,
.sf-auth-head::before,
.mail-header::before,
.hero::before {
  background:
    linear-gradient(90deg, rgba(226, 166, 59, .1), transparent 43%),
    repeating-linear-gradient(90deg, transparent 0 68px, rgba(215, 224, 215, .045) 69px, transparent 70px);
  opacity: 1;
}

.patch-header,
.wiki-masthead,
.wiki-page-head,
.sf-auth-head {
  border-left-color: #e2a63b !important;
  border-bottom-color: rgba(190, 202, 196, .22) !important;
}

.patch-header h1,
.wiki-title,
.wiki-page-title,
.sf-auth-head h1,
.mail-header h1,
.hero h1,
.sf-sync-page-title { color: #ece7da !important; text-shadow: 0 3px 0 #252a2a; }

.wiki-filter-card h2::before,
.wiki-results-head h2::before,
.section-title::before,
.sf-card-title::before,
.mail-panel h2::before,
.wiki-page-body h2::before { background: #d99c35; box-shadow: none; }

/* Controls now read as physical console switches with warm action lighting. */
.sf-btn,
.mail-btn,
button:not(.sf-menu-toggle),
input[type="submit"] {
  --control-a: #252b2c;
  --control-b: #111516;
  border-color: rgba(196, 204, 198, .3);
  color: #e9e5d9 !important;
  clip-path: polygon(0 7px, 7px 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), inset 4px 0 rgba(111, 196, 207, .42), 0 7px 16px rgba(0, 0, 0, .24);
}
.sf-btn::before,
.mail-btn::before,
button:not(.sf-menu-toggle)::before,
input[type="submit"]::before { border-color: #72c9d4; border-radius: 50%; transform: none; }
.sf-btn--primary,
.mail-btn--primary,
button[type="submit"]:not(.secondary):not(.danger),
input[type="submit"] {
  --control-a: #e0ae51;
  --control-b: #a9671d;
  border-color: #f1cf86;
  color: #17120a !important;
  box-shadow: inset 0 1px rgba(255, 250, 224, .5), inset 4px 0 rgba(255, 245, 210, .34), 0 8px 22px rgba(169, 103, 29, .25);
}
.sf-btn--primary::before,
.mail-btn--primary::before,
button[type="submit"]:not(.secondary):not(.danger)::before { border-color: #21170a; background: rgba(255, 244, 205, .42); }
.sf-btn--danger,
.mail-btn--danger,
button.danger { --control-a: #873e37; --control-b: #401b1a; border-color: rgba(234, 120, 104, .66); }

/* Remove the blue circuit wallpaper from working surfaces; use clean ship panels. */
.wiki-search.wiki-panel,
.wiki-edit-card,
.wiki-admin-table-card,
.wiki-category-card,
.wiki-category-table-card,
.wiki-delete-card,
.sf-card,
.mail-panel,
.mail-column,
.mail-meta-card,
.mail-card,
.info-box,
.history-box,
.card {
  border-color: rgba(183, 194, 188, .22) !important;
  background-color: rgba(14, 18, 20, .96) !important;
  background-image:
    linear-gradient(145deg, rgba(226, 166, 59, .035), transparent 38%),
    repeating-linear-gradient(90deg, transparent 0 94px, rgba(218, 224, 216, .022) 95px, transparent 96px) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 14px 34px rgba(0, 0, 0, .22) !important;
}

.sf-auth-aside {
  background:
    linear-gradient(170deg, rgba(10, 14, 16, .84), rgba(6, 8, 9, .96)),
    url('/assets/graphics/outer-rim-horizon.svg') 58% 100%/auto 64% no-repeat,
    url('/assets/img/pexels-benjaminfarren-background2.jpg') center/cover !important;
}
.sf-auth-aside::after { background: none; }
.sf-auth-form { background: linear-gradient(145deg, rgba(19, 24, 25, .98), rgba(8, 11, 12, .99)) !important; }
.sf-auth-form::after { background: linear-gradient(90deg, transparent, #e2a63b); }
.sf-auth-brand-name { color: #eee7d4; text-shadow: 0 2px #292d2d; }

.sf-input,
.wiki-field,
.wiki-input,
.wiki-select,
.wiki-textarea,
.mail-input,
.mail-textarea,
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea {
  border-color: rgba(180, 193, 186, .25) !important;
  background-color: rgba(4, 7, 8, .94) !important;
  background-image: linear-gradient(90deg, rgba(113, 200, 211, .045), transparent 36%) !important;
  color: #e8e5dc;
}
.sf-input:focus,
.wiki-field:focus,
.wiki-input:focus,
.wiki-select:focus,
.wiki-textarea:focus,
input:focus,
select:focus,
textarea:focus { border-color: #dba13e !important; box-shadow: 0 0 0 3px rgba(226, 166, 59, .1), inset 3px 0 #77c9d3 !important; }

.sf-status-pill,
.wiki-pill,
.wiki-category-pill,
.patch-tag {
  border-color: rgba(177, 190, 183, .25) !important;
  background: linear-gradient(145deg, rgba(30, 37, 37, .92), rgba(11, 15, 16, .94)) !important;
  box-shadow: inset 3px 0 rgba(113, 200, 211, .34);
}
.sf-status-pill--ok { color: #a8e7bd !important; box-shadow: inset 3px 0 rgba(116, 214, 155, .65); }
.sf-status-pill--warn { color: #f1c36c !important; box-shadow: inset 3px 0 rgba(226, 166, 59, .72); }

/* Member/admin dashboards: one status readout, less repetition, clearer tools. */
.sf-member-stack { gap: 14px !important; }
.sf-member-stack > .sf-member-card:first-child {
  padding: clamp(20px, 2.2vw, 30px) !important;
  border-top: 2px solid rgba(226, 166, 59, .68) !important;
  background:
    linear-gradient(110deg, rgba(226, 166, 59, .055), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 108px, rgba(220, 227, 219, .022) 109px, transparent 110px) !important;
}
.sf-member-stack .sf-card-title { color: #eee9dc; }
.sf-member-stack .sf-card-sub { max-width: 70ch; color: #aeb7b3; }
.sf-member-stack .sf-status-row { margin: 14px 0 16px !important; }
.sf-member-stack .sf-detail-list { border-color: rgba(183, 195, 188, .16); }
.sf-member-stack .sf-detail-item { border-color: rgba(183, 195, 188, .16) !important; }
.sf-member-stack .sf-detail-item strong { color: #999f9b; letter-spacing: .11em; }
.sf-member-stack .sf-inline-note { border-radius: 0 !important; border-left: 3px solid currentColor !important; background: rgba(255, 255, 255, .025) !important; }
.sf-member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sf-member-grid .sf-card { padding: clamp(19px, 2vw, 27px) !important; }
.sf-plain-list { color: #cbd0cc; }
.sf-plain-list li::marker { color: #dba13d; }

.sf-aside-action-tile { position: relative; }
.sf-aside-action-tile::before { content: ''; width: 6px; height: 6px; border: 1px solid #70c5cf; transform: rotate(45deg); }
.sf-aside-mini-label { color: #d8b46b !important; border-color: rgba(226, 166, 59, .24) !important; background: rgba(226, 166, 59, .06) !important; }

@media (max-width: 980px) {
  .sf-banner-overlay { grid-template-columns: 1fr; }
  .sf-banner::after { width: 100%; opacity: .3; }
  .sf-command-panel { max-width: 100%; }
}

@media (max-width: 700px) {
  .sf-banner { min-height: 0; }
  .sf-banner-overlay { min-height: 0; padding-bottom: 34px; }
  .sf-banner-overlay::after { bottom: 10px; font-size: 7px; letter-spacing: .12em; }
  .sf-brand-lockup { grid-template-columns: 46px minmax(0, 1fr); }
  .sf-brand-crest { width: 46px; }
  .sf-brand-copy h1 { font-size: clamp(25px, 8.2vw, 35px); }
  .sf-command-heading::after { display: none; }
  .sf-member-grid { grid-template-columns: 1fr; }
}

/* Account workspace spacing: give the brand lockup and main console room. */
@media (min-width: 981px) {
  .sf-auth-wrap:not(.sf-auth-wrap--full) {
    grid-template-columns: minmax(330px, 350px) minmax(0, 1fr);
    gap: 22px;
  }

  .sf-auth-wrap:not(.sf-auth-wrap--full) .sf-auth-aside,
  .sf-auth-wrap:not(.sf-auth-wrap--full) .sf-auth-form {
    border: 1px solid var(--forge-edge);
    border-radius: 0;
  }

  .sf-auth-wrap:not(.sf-auth-wrap--full) .sf-auth-aside {
    padding-right: clamp(24px, 2vw, 32px);
  }
}

@media (max-width: 980px) {
  .sf-auth-wrap:not(.sf-auth-wrap--full) { gap: 12px; }
}

/* ========================================================================== 
   PATCH NOTES — EDITORIAL RELEASE LEDGER
   ========================================================================== */

.patch-shell {
  width: min(1120px, 100%);
  padding: clamp(20px, 3vw, 38px) clamp(16px, 3vw, 34px) 56px;
}

.patch-shell > .sf-return-link { margin-bottom: 18px; }

.patch-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  align-items: end;
  gap: clamp(32px, 6vw, 84px);
  margin: 0;
  padding: 28px 0 30px 24px !important;
  border-top: 1px solid rgba(226, 166, 59, .55) !important;
  border-right: 0 !important;
  border-bottom: 1px solid rgba(190, 202, 196, .2) !important;
  border-left: 3px solid #e2a63b !important;
  background: transparent !important;
  box-shadow: none !important;
}

.patch-header::before {
  background:
    linear-gradient(90deg, rgba(226, 166, 59, .07), transparent 48%),
    repeating-linear-gradient(90deg, transparent 0 76px, rgba(214, 221, 214, .028) 77px, transparent 78px);
}

.patch-header-copy { min-width: 0; }
.patch-header .patch-kicker { margin: 0 0 12px; }
.patch-header h1 {
  margin: 0 0 9px;
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: .98;
}
.patch-header p { max-width: 58ch; color: #aeb7b5; font-size: 15px; line-height: 1.55; }

.patch-header-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid rgba(184, 195, 189, .2);
  border-left: 1px solid rgba(184, 195, 189, .2);
}
.patch-header-meta > div {
  min-width: 0;
  padding: 12px 14px 13px;
  border-right: 1px solid rgba(184, 195, 189, .2);
  border-bottom: 1px solid rgba(184, 195, 189, .2);
  background: rgba(255, 255, 255, .018);
}
.patch-header-meta > div:last-child { grid-column: 1 / -1; }
.patch-header-meta dt {
  margin: 0 0 4px;
  color: #818d8b;
  font: 700 9px/1.2 'Rajdhani', sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.patch-header-meta dd {
  margin: 0;
  color: #eee8d9;
  font: 700 15px/1.2 'Rajdhani', sans-serif;
  letter-spacing: .025em;
}

.patch-list {
  display: block;
  position: relative;
}

.patch-card {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 0;
  position: relative;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(177, 190, 183, .17);
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}

.patch-card::before { display: none; }

.patch-card-head {
  display: block;
  position: relative;
  padding: 27px 24px 27px 2px;
  border: 0;
  border-right: 1px solid rgba(177, 190, 183, .17);
  background: transparent;
}
.patch-card-head::after {
  content: '';
  position: absolute;
  top: 32px;
  right: -4px;
  width: 7px;
  height: 7px;
  border: 1px solid #dca13c;
  background: #070a0b;
  transform: rotate(45deg);
}
.patch-version-label {
  margin-bottom: 5px;
  color: #7d8987;
  font: 700 9px/1 'Rajdhani', sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.patch-title {
  margin: 0 0 12px;
  color: #eee9dc;
  font: 700 clamp(25px, 2.5vw, 32px)/1 'Rajdhani', sans-serif;
  letter-spacing: -.015em;
}
.patch-date {
  color: #8d9a98;
  font: 600 11px/1.3 'Rajdhani', sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.patch-items {
  display: grid;
  gap: 0;
  align-content: start;
  padding: 23px 0 21px 30px;
}
.patch-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 15px;
  align-items: baseline;
  padding: 6px 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.patch-tag {
  justify-self: start;
  min-width: 0;
  width: auto;
  min-height: 20px;
  padding: 2px 7px 2px 9px !important;
  border: 0 !important;
  border-left: 2px solid currentColor !important;
  border-radius: 0 !important;
  clip-path: none;
  background: transparent !important;
  box-shadow: none;
  color: #9ba6a3;
  font: 700 9px/1.35 'Rajdhani', sans-serif;
  letter-spacing: .13em;
  text-align: left;
}
.patch-tag--added { color: #7fd6a0 !important; }
.patch-tag--updated,
.patch-tag--update,
.patch-tag--launcher-update { color: #78cbd6 !important; }
.patch-tag--fixed { color: #e0ad52 !important; }
.patch-tag--removed,
.patch-tag--changed { color: #df8175 !important; }
.patch-tag--for-testing,
.patch-tag--TEST { color: #b39ad8 !important; }
.patch-tag--note { color: #9ba6a3 !important; }
.patch-copy {
  max-width: 78ch;
  padding: 0;
  color: #d7dbd5;
  font-size: 14px;
  line-height: 1.55;
}
.patch-copy a { color: #83cdd7; text-underline-offset: 3px; }

.patch-card:first-child .patch-title { color: #f0bd61; }
.patch-card:first-child .patch-card-head::after { background: #dca13c; box-shadow: 0 0 0 4px rgba(220, 161, 60, .08); }

.patch-archive { margin-top: 20px; }
.patch-archive > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid rgba(181, 193, 187, .22);
  border-left: 3px solid #dca13c;
  border-radius: 0;
  clip-path: none;
  background: rgba(255, 255, 255, .018);
  color: #e4dfd3;
  font: 700 14px/1.2 'Rajdhani', sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.patch-archive > summary span {
  color: #7f8a88;
  font-size: 11px;
  letter-spacing: .09em;
}
.patch-archive[open] > summary { margin-bottom: 0; border-bottom-color: #dca13c; }
.patch-list--older { border-top: 0; }

@media (max-width: 760px) {
  .patch-header { grid-template-columns: 1fr; align-items: start; gap: 22px; padding: 23px 0 24px 18px !important; }
  .patch-header-meta { width: 100%; }
  .patch-card { grid-template-columns: 1fr; }
  .patch-card-head { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 3px 12px; padding: 22px 0 13px; border-right: 0; }
  .patch-card-head::after { top: auto; right: auto; bottom: -4px; left: 0; }
  .patch-version-label { grid-column: 1 / -1; }
  .patch-title { margin: 0; }
  .patch-date { justify-self: end; padding-bottom: 2px; }
  .patch-items { padding: 15px 0 18px; }
  .patch-item { grid-template-columns: 86px minmax(0, 1fr); gap: 10px; }
}

@media (max-width: 480px) {
  .patch-header-meta { grid-template-columns: 1fr; }
  .patch-header-meta > div:last-child { grid-column: auto; }
  .patch-item { grid-template-columns: 1fr; gap: 3px; padding: 8px 0; }
  .patch-archive > summary { align-items: flex-start; flex-direction: column; gap: 4px; }
}

/* ========================================================================== 
   DONATIONS — MONTHLY OPERATIONS METER
   ========================================================================== */
.donation-shell { width: min(1120px, 100%); margin: 0 auto; padding: clamp(20px, 3vw, 38px) clamp(16px, 3vw, 34px) 56px; color: #e4e2da; font-family: Inter, 'Segoe UI', sans-serif; }
.donation-shell > .sf-return-link { margin-bottom: 18px; }
.donation-header { display: grid; grid-template-columns: minmax(0, 1fr) 116px; align-items: center; gap: 36px; padding: 28px 30px; border-top: 1px solid rgba(226, 166, 59, .62); border-bottom: 1px solid rgba(182, 194, 188, .2); border-left: 3px solid #e2a63b; background: linear-gradient(90deg, rgba(226, 166, 59, .07), transparent 50%), repeating-linear-gradient(90deg, transparent 0 82px, rgba(218, 224, 216, .026) 83px, transparent 84px); }
.donation-header h1 { margin: 8px 0 10px; color: #eee8d9; font: 700 clamp(34px, 4.4vw, 56px)/1 'Orbitron', sans-serif; letter-spacing: -.02em; text-shadow: 0 3px #242929; }
.donation-header p { max-width: 66ch; margin: 0; color: #aeb7b4; line-height: 1.6; }
.donation-header img { filter: drop-shadow(0 0 18px rgba(226, 166, 59, .14)); }
.donation-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 22px; margin-top: 22px; }
.donation-meter-panel, .donation-cost-panel { min-width: 0; padding: clamp(22px, 3vw, 34px); border: 1px solid rgba(182, 194, 188, .22); background: linear-gradient(145deg, rgba(21, 26, 27, .96), rgba(8, 11, 12, .98)); clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
.donation-meter-panel { border-top: 2px solid rgba(226, 166, 59, .72); }
.donation-period { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(182, 194, 188, .17); }
.donation-period span, .donation-readout-label { color: #7f8b88; font: 700 10px/1.2 'Rajdhani', sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.donation-period strong { color: #d5d2c9; font: 700 15px/1.2 'Rajdhani', sans-serif; }
.donation-percent-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 28px 0 18px; }
.donation-readout-label { display: block; margin-bottom: 4px; }
.donation-percent { display: block; color: #eee7d7; font: 700 clamp(52px, 8vw, 82px)/.92 'Rajdhani', sans-serif; letter-spacing: -.04em; }
.donation-state { padding: 6px 9px; border: 1px solid rgba(226, 166, 59, .35); color: #e6bb67; font: 700 10px/1 'Rajdhani', sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.donation-state--funded { border-color: rgba(116, 214, 155, .46); color: #9ce6b7; }
.donation-meter { position: relative; height: 18px; overflow: hidden; border: 1px solid rgba(182, 194, 188, .28); background: #050708; box-shadow: inset 0 3px 8px rgba(0, 0, 0, .5); }
.donation-meter::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(4, 7, 8, .72) calc(10% - 1px) 10%); pointer-events: none; }
.donation-meter span { display: block; height: 100%; background: linear-gradient(90deg, #a7651e, #e2a63b 65%, #f1d18a); box-shadow: 0 0 18px rgba(226, 166, 59, .34); }
.donation-status-copy { margin: 13px 0 0; color: #aeb7b4; font-size: 13px; }
.donation-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 25px 0 0; border-top: 1px solid rgba(182, 194, 188, .17); border-left: 1px solid rgba(182, 194, 188, .17); }
.donation-amounts > div { padding: 12px; border-right: 1px solid rgba(182, 194, 188, .17); border-bottom: 1px solid rgba(182, 194, 188, .17); }
.donation-amounts dt { color: #7f8b88; font: 700 9px/1.2 'Rajdhani', sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.donation-amounts dd { margin: 5px 0 0; color: #eee7d7; font: 700 17px/1.2 'Rajdhani', sans-serif; }
.donation-cta { margin-top: 26px; }
.donation-cost-panel h2 { margin: 8px 0 20px; color: #ece7db; font: 700 27px/1.1 'Rajdhani', sans-serif; }
.donation-cost-list { margin: 0; border-top: 1px solid rgba(182, 194, 188, .17); }
.donation-cost-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid rgba(182, 194, 188, .17); }
.donation-cost-list dt { color: #cbd0cb; }
.donation-cost-list dd { margin: 0; color: #e2b35e; font-weight: 700; }
.donation-cost-placeholder { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(182, 194, 188, .17); }
.donation-cost-placeholder li { position: relative; padding: 12px 0 12px 18px; border-bottom: 1px solid rgba(182, 194, 188, .17); color: #c3c9c4; }
.donation-cost-placeholder li::before { content: ''; position: absolute; top: 18px; left: 2px; width: 6px; height: 6px; border: 1px solid #dca13c; transform: rotate(45deg); }
.donation-transparency { margin-top: 24px; padding: 15px 17px; border-left: 2px solid #72c8d3; background: rgba(111, 199, 211, .045); }
.donation-transparency strong { color: #e4e2da; font: 700 13px/1.2 'Rajdhani', sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.donation-transparency p { margin: 7px 0 0; color: #9da8a5; font-size: 12px; line-height: 1.55; }
.donation-transparency span { display: block; margin-top: 10px; color: #737f7c; font: 600 10px/1.4 'Rajdhani', sans-serif; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 820px) { .donation-header { grid-template-columns: 1fr 78px; padding: 24px 20px; } .donation-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .donation-header { grid-template-columns: 1fr; } .donation-header img { display: none; } .donation-percent-row { align-items: flex-start; flex-direction: column; } .donation-amounts { grid-template-columns: 1fr; } }

/* ========================================================================== 
   FULL-WIDTH WORKSPACES — match the contribution editor's page footprint
   ========================================================================== */
.patch-shell,
.wiki-shell,
.donation-shell,
.sf-embedded .patch-shell,
.sf-embedded .wiki-shell,
.sf-embedded .donation-shell {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  padding-right: 10px !important;
  padding-left: 10px !important;
}

.sf-page--members .sf-auth-shell {
  width: 100%;
  justify-content: stretch;
  padding-right: 10px;
  padding-left: 10px;
}

.sf-page--members .sf-auth-wrap {
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

/* Keep the patch masthead full-width while returning the release ledger to
   its original centered reading measure. */
.patch-shell > .patch-list,
.patch-shell > .patch-archive {
  width: min(1120px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.patch-shell > .patch-archive .patch-list--older {
  width: 100%;
  margin-right: 0;
  margin-left: 0;
}
