:root {
  color-scheme: dark;
  --bg: #070b12;
  --ink: #e8edf2;
  --muted: #a5b2c0;
  --dim: #728193;
  --panel: #101824;
  --panel-2: #141f2f;
  --line: #2a394c;
  --line-soft: #1c2a3d;
  --blue: #6f92aa;
  --cyan: #70b8c8;
  --gold: #c7aa68;
  --sand: #e0cf91;
  --green: #73b58f;
  --yellow: #d5b66b;
  --red: #cb7770;
  --radius: 8px;
  --container: min(1320px, calc(100vw - 48px));
  --recruitment-left-image: url("../img/Trenches.jpg");
  --recruitment-right-image: url("../img/Kreissteine.jpg");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(12, 18, 28, 0.92), rgba(7, 11, 18, 0.98) 340px),
    repeating-linear-gradient(90deg, rgba(111, 146, 170, 0.04) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(111, 146, 170, 0.025) 0 1px, transparent 1px 72px),
    var(--bg);
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  line-height: 1.56;
}

body.has-modal,
body.has-image-lightbox {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 11, 18, 0.76);
  color: var(--ink);
  padding: 10px 11px;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--dim);
}

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

::selection {
  background: rgba(112, 184, 200, 0.32);
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 9px 12px;
  border-radius: var(--radius);
  background: var(--sand);
  color: #0b1018;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

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

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(160, 184, 198, 0.16);
  background: rgba(7, 11, 18, 0.94);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: var(--container);
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 44px;
  height: 44px;
}

.brand strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.1;
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  position: relative;
  z-index: 2;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--muted);
  font-size: 0.93rem;
  transition: color 160ms ease, text-shadow 160ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
}

.nav-links a[aria-current="page"] {
  text-shadow: 0 0 14px rgba(224, 207, 145, 0.22);
}

.nav-active-glow {
  position: absolute;
  z-index: 1;
  left: 0;
  bottom: 0;
  width: var(--nav-glow-width, 0);
  height: 38px;
  pointer-events: none;
  transform: translateX(var(--nav-glow-x, 0));
  transition: transform 220ms ease, width 220ms ease, opacity 180ms ease;
  opacity: 1;
}

.nav-active-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 1px solid rgba(224, 207, 145, 0.86);
  background:
    radial-gradient(ellipse at 50% 100%, rgba(224, 207, 145, 0.34), rgba(112, 184, 200, 0.12) 36%, transparent 72%),
    linear-gradient(0deg, rgba(224, 207, 145, 0.12), transparent 72%);
  filter: drop-shadow(0 0 12px rgba(224, 207, 145, 0.24));
}

.nav-active-glow.is-instant {
  transition: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 19px;
  height: 2px;
  background: currentColor;
}

/* Hero centered */
.hero-centered {
  padding: 58px 0 36px;
}

.hero-center {
  max-width: 880px;
  text-align: center;
}

.hero-home h1 {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(2.35rem, 4.2vw, 3.65rem);
  line-height: 1.12;
}

.hero-home .lead {
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: normal;
}

h1 {
  font-size: clamp(2.45rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.08rem;
}

.lead {
  margin: 20px auto 0;
  max-width: 740px;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.2rem);
}

.narrow {
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

body:not([data-page="index"]):not([data-page="admin"]) .page-hero .eyebrow,
body:not([data-page="index"]):not([data-page="admin"]) .page-hero h1,
body:not([data-page="index"]):not([data-page="admin"]) .page-hero .lead,
body:not([data-page="index"]):not([data-page="admin"]) .page-hero .notice,
body:not([data-page="admin"]) main > .section {
  animation: greywatchBriefIn 560ms ease both;
}

body:not([data-page="index"]):not([data-page="admin"]) .page-hero h1 {
  animation-delay: 70ms;
}

body:not([data-page="index"]):not([data-page="admin"]) .page-hero .lead,
body:not([data-page="index"]):not([data-page="admin"]) .page-hero .notice {
  animation-delay: 130ms;
}

body:not([data-page="admin"]) main > .section:nth-of-type(2) {
  animation-delay: 90ms;
}

body:not([data-page="admin"]) main > .section:nth-of-type(3) {
  animation-delay: 150ms;
}

body[data-page="index"] .hero-home .eyebrow,
body[data-page="index"] .hero-home h1,
body[data-page="index"] .hero-home .lead,
body[data-page="index"] .hero-actions {
  animation: greywatchBriefIn 520ms ease both;
}

body[data-page="index"] .hero-home h1 {
  animation-delay: 70ms;
}

body[data-page="index"] .hero-home .lead {
  animation-delay: 140ms;
}

body[data-page="index"] .hero-actions {
  animation-delay: 210ms;
}

body[data-page="index"] .doctrine-flow li,
body[data-page="index"] .journal-entry {
  animation: greywatchLineIn 520ms ease both;
}

body[data-page="index"] .doctrine-flow li:nth-child(2),
body[data-page="index"] .journal-entry:nth-child(2) {
  animation-delay: 70ms;
}

body[data-page="index"] .doctrine-flow li:nth-child(3),
body[data-page="index"] .journal-entry:nth-child(3) {
  animation-delay: 120ms;
}

body[data-page="index"] .doctrine-flow li:nth-child(4),
body[data-page="index"] .journal-entry:nth-child(4) {
  animation-delay: 170ms;
}

body[data-page="index"] .doctrine-flow li:nth-child(5) {
  animation-delay: 220ms;
}

@keyframes greywatchBriefIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes greywatchLineIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.2;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--sand);
  color: #10151e;
}

.button.is-disabled,
.button[aria-disabled="true"] {
  opacity: 0.48;
  pointer-events: none;
}

.button-secondary {
  border-color: rgba(112, 184, 200, 0.34);
  background: rgba(112, 184, 200, 0.08);
  color: var(--ink);
}

.button-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.button-danger {
  border-color: rgba(203, 119, 112, 0.42);
  background: rgba(203, 119, 112, 0.08);
  color: #f1c6c2;
}

.full-width {
  width: 100%;
}

.page-hero {
  padding: 56px 0 34px;
  border-bottom: 1px solid rgba(160, 184, 198, 0.14);
  background: rgba(13, 20, 31, 0.48);
}

.page-hero .eyebrow,
.page-hero .lead {
  display: none;
}

body[data-page="zeus"] .page-hero {
  padding: 42px 0 26px;
}

.section {
  padding: 56px 0;
}

.section-heading,
.board-title {
  margin-bottom: 20px;
}

.compact-heading {
  max-width: 760px;
}

.board-title span,
.inline-title span,
.strip-label,
.detail-kicker,
.panel-code {
  color: var(--dim);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.inline-title,
.ledger-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.text-link {
  color: var(--sand);
  font-weight: 800;
  border-bottom: 1px solid rgba(199, 170, 104, 0.45);
}

/* Operational Strip */
.operational-strip {
  padding: 0 0 42px;
}

.strip-ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 14, 22, 0.64);
}

.strip-ledger div {
  min-height: 76px;
  padding: 15px 17px;
  border-right: 1px solid var(--line-soft);
}

.strip-ledger div:last-child {
  border-right: 0;
}

.strip-ledger strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
}

.status-light {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(115, 181, 143, 0.12);
}

/* Doctrine Flow */
.doctrine-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.doctrine-flow li {
  position: relative;
  min-height: 190px;
  padding: 20px 16px 18px;
  border-right: 1px solid var(--line-soft);
}

.doctrine-flow li:last-child {
  border-right: 0;
}

.doctrine-flow li::after {
  content: "";
  position: absolute;
  top: 34px;
  right: -7px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
  transform: rotate(45deg);
  background: var(--bg);
}

.doctrine-flow li:last-child::after {
  display: none;
}

.flow-index {
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.doctrine-flow strong {
  display: block;
  color: var(--ink);
}

.doctrine-flow p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.restricted-addendum {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 18px;
  min-height: 118px;
  padding: 18px 20px 18px;
  border-top: 1px solid rgba(213, 182, 107, 0.24);
  border-bottom: 1px solid rgba(160, 184, 198, 0.12);
  outline: 0;
  background:
    radial-gradient(circle at 12% 40%, rgba(117, 31, 34, 0.26), transparent 32%),
    linear-gradient(90deg, rgba(213, 182, 107, 0.055), transparent 56%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 52px);
  cursor: pointer;
}

.restricted-addendum > * {
  position: relative;
  z-index: 1;
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
}

.restricted-addendum::before,
.restricted-addendum::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transition: transform 320ms ease, opacity 220ms ease, filter 220ms ease;
}

.restricted-addendum::before {
  background:
    linear-gradient(90deg, rgba(5, 8, 13, 0.98), rgba(9, 13, 20, 0.96) 58%, rgba(18, 8, 10, 0.94)),
    repeating-linear-gradient(0deg, rgba(160, 184, 198, 0.08) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(213, 182, 107, 0.08) 0 1px, transparent 1px 74px);
  border-left: 3px solid rgba(137, 49, 49, 0.86);
  box-shadow: inset 0 0 0 1px rgba(213, 182, 107, 0.14);
}

.restricted-addendum::after {
  content: attr(data-seal);
  display: grid;
  place-content: center;
  padding: 18px;
  color: rgba(233, 222, 185, 0.92);
  font-size: clamp(1.4rem, 4vw, 3.2rem);
  font-weight: 1000;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
}

.restricted-addendum::first-line {
  color: rgba(238, 210, 132, 0.95);
}

.restricted-addendum:not(.is-expanded):not(:hover):not(:focus):not(:focus-within) > * {
  opacity: 0.24;
  filter: blur(2px);
  transform: translateY(2px);
}

.restricted-addendum.is-expanded::before,
.restricted-addendum:hover::before,
.restricted-addendum:focus::before,
.restricted-addendum:focus-within::before {
  opacity: 0.18;
  transform: translateX(104%);
}

.restricted-addendum.is-expanded::after,
.restricted-addendum:hover::after,
.restricted-addendum:focus::after,
.restricted-addendum:focus-within::after {
  opacity: 0;
  transform: translateX(26px);
}

.restricted-addendum.is-expanded > *,
.restricted-addendum:hover > *,
.restricted-addendum:focus > *,
.restricted-addendum:focus-within > * {
  opacity: 1;
  filter: none;
  transform: none;
}

.restricted-addendum:focus-visible {
  box-shadow: 0 0 0 3px rgba(112, 184, 200, 0.24);
}

.restricted-code {
  color: rgba(224, 207, 145, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.restricted-addendum strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
}

.restricted-addendum p {
  max-width: 900px;
  margin: 6px 0 0;
  color: rgba(165, 178, 192, 0.86);
  font-size: 0.92rem;
  line-height: 1.65;
}

.restricted-dossier[hidden] {
  display: none;
}

.restricted-dossier {
  display: grid;
  gap: 18px;
  margin-top: 0;
  padding: 20px 20px 22px;
  border-bottom: 1px solid rgba(213, 182, 107, 0.2);
  border-left: 1px solid rgba(137, 49, 49, 0.32);
  border-right: 1px solid rgba(137, 49, 49, 0.18);
  background:
    linear-gradient(180deg, rgba(7, 11, 18, 0.92), rgba(10, 15, 23, 0.78)),
    repeating-linear-gradient(0deg, rgba(160, 184, 198, 0.04) 0 1px, transparent 1px 34px);
  box-shadow: inset 0 1px 0 rgba(213, 182, 107, 0.1);
  animation: restrictedDossierOpen 180ms ease both;
}

.restricted-dossier-header {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px 24px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(160, 184, 198, 0.16);
}

.restricted-dossier-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.restricted-dossier-header p {
  grid-column: 2;
  max-width: 840px;
  margin: -6px 0 0;
  color: rgba(190, 198, 207, 0.78);
  font-size: 0.94rem;
}

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

.interrogation-file {
  position: relative;
  min-height: 190px;
  padding: 18px;
  border: 1px solid rgba(160, 184, 198, 0.16);
  background:
    linear-gradient(135deg, rgba(18, 28, 41, 0.72), rgba(8, 12, 18, 0.9)),
    repeating-linear-gradient(90deg, rgba(213, 182, 107, 0.035) 0 1px, transparent 1px 64px);
}

.interrogation-file::after {
  content: "DECLASSIFIED EXCERPT";
  position: absolute;
  right: 16px;
  bottom: 12px;
  color: rgba(213, 182, 107, 0.08);
  font-size: 1.15rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
}

.interrogation-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.interrogation-file h4 {
  margin: 24px 0 14px;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.32;
}

.interrogation-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 18px;
  border-top: 1px solid rgba(160, 184, 198, 0.16);
  border-bottom: 1px solid rgba(160, 184, 198, 0.16);
}

.interrogation-facts div {
  min-height: 76px;
  padding: 12px 14px;
  border-right: 1px solid rgba(160, 184, 198, 0.12);
}

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

.interrogation-facts dt {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.interrogation-facts dd {
  margin: 0;
  color: rgba(232, 237, 242, 0.92);
  font-size: 0.88rem;
  line-height: 1.42;
}

.interrogation-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.interrogation-file p {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  color: rgba(194, 205, 216, 0.84);
  font-size: 0.93rem;
}

.transcript-quote {
  position: relative;
  z-index: 1;
  margin: 4px 0;
  padding: 14px 16px 14px 20px;
  border-left: 3px solid rgba(213, 182, 107, 0.72);
  background: rgba(213, 182, 107, 0.055);
  color: rgba(248, 239, 212, 0.95);
  font-weight: 800;
  line-height: 1.65;
}

.transcript-2-quotes {
  display: grid;
  gap: 4px;
}

@keyframes restrictedDossierOpen {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .restricted-dossier-header,
  .interrogation-grid,
  .interrogation-facts {
    grid-template-columns: 1fr;
  }

  .restricted-dossier-header p {
    grid-column: auto;
    margin-top: 0;
  }

  .interrogation-facts div {
    border-right: 0;
    border-bottom: 1px solid rgba(160, 184, 198, 0.12);
  }

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

  .interrogation-file::after {
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .restricted-addendum::before,
  .restricted-addendum::after,
  .restricted-addendum > *,
  .restricted-dossier {
    transition: none;
    animation: none;
  }
}

/* Case Ledger */
.section-ledger {
  border-top: 1px solid rgba(160, 184, 198, 0.12);
  border-bottom: 1px solid rgba(160, 184, 198, 0.12);
  background: rgba(12, 18, 28, 0.5);
}

.home-journal {
  border-top: 1px solid var(--line);
}

.journal-entry {
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--line-soft);
}

.journal-topline,
.journal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.journal-entry h3 {
  margin-top: 10px;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.journal-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.journal-meta span + span::before {
  content: "/";
  margin-right: 12px;
  color: var(--line);
}

.journal-entry p {
  max-width: 850px;
  margin: 12px 0 0;
  color: var(--muted);
}

.case-board {
  border-top: 1px solid var(--line);
}

.case-file {
  padding-inline: clamp(16px, 2vw, 28px);
  border-bottom: 1px solid var(--line-soft);
}

.case-file[open] {
  background:
    linear-gradient(90deg, rgba(199, 170, 104, 0.045), transparent 34%),
    linear-gradient(180deg, rgba(111, 146, 170, 0.025), transparent 42%);
}

.case-file summary {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) minmax(180px, auto);
  gap: 22px;
  align-items: center;
  padding: 18px 0;
  list-style: none;
  cursor: pointer;
}

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

.case-title strong,
.case-title small {
  display: block;
}

.case-title small {
  margin-top: 5px;
  color: var(--muted);
}

.case-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.case-file-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.58fr);
  gap: 34px;
  margin-left: 154px;
  margin-right: 0;
  padding: 4px 0 28px;
  border-top: 1px solid rgba(42, 57, 76, 0.62);
}

.case-file-body p {
  margin: 0;
  color: var(--muted);
}

.case-brief {
  padding-top: 18px;
}

.case-brief .ledger-label {
  display: block;
  margin-bottom: 8px;
}

.case-brief p {
  max-width: 78ch;
  color: var(--ink);
  line-height: 1.72;
}

.case-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  padding-top: 8px;
}

.case-meta-grid div {
  padding: 12px 0;
  border-bottom: 1px solid rgba(42, 57, 76, 0.52);
}

.case-meta-grid dt {
  color: var(--dim);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.case-meta-grid dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.case-ledger,
.inventory-ledger,
.personnel-board {
  border-top: 1px solid var(--line);
}

.ledger-row {
  display: grid;
  grid-template-columns: 130px 1.2fr 120px 150px 120px 120px;
  gap: 14px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}

.case-ledger.compact .ledger-row {
  grid-template-columns: 126px 1.2fr 120px 145px 120px;
}

.case-ledger.compact .ledger-row:nth-child(n + 4) {
  display: none;
}

.ledger-main strong,
.inventory-main strong,
.person-main strong {
  display: block;
  color: var(--ink);
}

.ledger-main small,
.inventory-main small,
.person-main small,
.ledger-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.ledger-label {
  display: none;
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.case-id {
  color: var(--sand);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.priority {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.priority::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
}

.priority-hoch::before {
  background: var(--red);
}

.priority-kritisch::before {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(203, 119, 112, 0.12);
}

.priority-mittel::before {
  background: var(--yellow);
}

.priority-niedrig::before {
  background: var(--green);
}

.status-badge,
.tag,
.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(7, 11, 18, 0.34);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.status-aktiv,
.status-operational,
.status-abgeschlossen,
.status-verfuegbar {
  color: var(--green);
}

.status-ausbildung,
.status-training-cycle,
.status-ausgewertet,
.status-wird-bestellt,
.status-geplant {
  color: var(--yellow);
}

.status-reserve,
.status-archiviert,
.status-nicht-verfuegbar,
.status-inaktiv {
  color: var(--muted);
}

.status-leitung,
.status-offen,
.status-begrenzt,
.status-laufend,
.status-nur-nach-freigabe {
  color: var(--cyan);
}

.status-frei {
  color: #d68a3a;
}

/* Next Steps */
.next-step-section {
  padding-top: 42px;
}

.next-steps {
  display: grid;
  grid-template-columns: 150px repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.next-label,
.next-steps a {
  padding: 16px 14px;
  border-right: 1px solid var(--line-soft);
}

.next-steps a:last-child {
  border-right: 0;
}

.next-label {
  color: var(--sand);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.next-steps strong,
.next-steps span {
  display: block;
}

.next-steps span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.next-steps a:hover {
  background: rgba(112, 184, 200, 0.06);
}

/* Org Chart / Mindmap */
.org-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

.org-chart {
  position: relative;
  min-height: 0;
  padding: 0 0 8px;
  overflow-x: auto;
  scrollbar-color: var(--line) transparent;
}

.structure-canvas {
  position: relative;
  width: min(1480px, 100%);
  min-width: 0;
  margin: 0;
  min-height: clamp(560px, 43vw, 680px);
  aspect-ratio: 16 / 7.05;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(7, 11, 18, 0.42) 0 6%, transparent 6% 94%, rgba(7, 11, 18, 0.42) 94% 100%),
    radial-gradient(circle at 50% 18%, rgba(112, 184, 200, 0.075), transparent 28%),
    linear-gradient(90deg, rgba(199, 170, 104, 0.035), transparent 18%, transparent 82%, rgba(112, 184, 200, 0.035)),
    repeating-linear-gradient(90deg, rgba(111, 146, 170, 0.045) 0 1px, transparent 1px 1.25%),
    repeating-linear-gradient(0deg, rgba(111, 146, 170, 0.032) 0 1px, transparent 1px 8.33%),
    rgba(7, 11, 18, 0.36);
}

.structure-canvas svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.structure-canvas line,
.structure-canvas path {
  fill: none;
  stroke: rgba(126, 155, 177, 0.46);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.structure-canvas path.is-crosslink {
  stroke: rgba(111, 146, 170, 0.26);
  stroke-dasharray: 3 5;
}

.structure-canvas-notice {
  display: none;
  border-top: 1px solid rgba(199, 170, 104, 0.36);
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
  color: var(--muted);
  max-width: 720px;
}

.structure-canvas-notice span {
  display: block;
  color: var(--sand);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.structure-canvas-notice strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.65rem, 5vw, 2.45rem);
  line-height: 1.02;
}

.structure-canvas-notice p {
  max-width: 58ch;
  margin-top: 14px;
  color: var(--muted);
}

.structure-canvas .org-node {
  position: absolute;
  width: 166px;
  transform: translate(-50%, -50%);
  z-index: 2;
  min-height: 102px;
  padding: 9px 10px 8px;
  background:
    linear-gradient(135deg, rgba(17, 27, 40, 0.98), rgba(8, 13, 20, 0.98)),
    #101824;
}

.structure-canvas .org-node.level-2 {
  width: 154px;
  min-height: 94px;
  background:
    linear-gradient(135deg, rgba(14, 22, 34, 0.98), rgba(7, 12, 19, 0.98)),
    #0d141f;
}

.org-root-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 124px;
}

.org-root-wrap::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 54px;
  background: var(--line);
}

.org-children {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding-top: 42px;
}

.org-children::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--line);
}

.org-node {
  position: relative;
  width: 100%;
  min-height: 96px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(17, 27, 40, 0.98), rgba(8, 13, 20, 0.98)),
    #101824;
  color: var(--ink);
  text-align: left;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  box-shadow: inset 3px 0 0 rgba(199, 170, 104, 0.28);
}

.org-node::before {
  content: "";
  position: absolute;
  top: -43px;
  left: 50%;
  width: 1px;
  height: 43px;
  background: var(--line);
}

.org-root .org-node::before,
.org-root-wrap .org-node::before {
  display: none;
}

.org-node:hover,
.org-node.is-selected {
  border-color: rgba(199, 170, 104, 0.58);
  background:
    linear-gradient(135deg, rgba(24, 36, 52, 0.98), rgba(10, 16, 24, 0.98)),
    #162030;
  box-shadow:
    inset 3px 0 0 rgba(224, 207, 145, 0.78),
    0 0 0 1px rgba(224, 207, 145, 0.1);
}

.org-node .node-short {
  display: inline-flex;
  width: fit-content;
  min-width: 40px;
  justify-content: center;
  padding: 2px 6px;
  border: 1px solid rgba(213, 182, 107, 0.42);
  background: rgba(213, 182, 107, 0.08);
  color: var(--sand);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.org-node strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.16;
}

.node-german {
  display: block;
  margin-top: 4px;
  color: rgba(169, 190, 207, 0.84);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.28;
}

.org-node small {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-account {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: auto;
  min-width: 0;
}

.nav-account-login,
.nav-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.15;
  transition: color 160ms ease, opacity 160ms ease;
}

.nav-account-login:hover,
.nav-account-trigger:hover,
.nav-account.is-open .nav-account-trigger {
  color: var(--ink);
}

.nav-account-name,
.nav-account-login span:not(.nav-avatar):not(.nav-avatar-fallback) {
  display: block;
  min-width: 0;
}

.nav-account-name strong,
.nav-account-login span:not(.nav-avatar):not(.nav-avatar-fallback) {
  display: block;
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-account-name strong {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.nav-avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(112, 184, 200, 0.42);
  border-radius: 50%;
  background: rgba(7, 11, 18, 0.95);
  object-fit: cover;
}

.nav-avatar-fallback {
  display: inline-grid;
  place-items: center;
  color: var(--cyan);
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.nav-account-trigger i {
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--dim);
  border-bottom: 1px solid var(--dim);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.nav-account.is-open .nav-account-trigger i {
  transform: rotate(225deg) translateY(-1px);
}

.nav-account-menu {
  position: absolute;
  top: calc(100% + 13px);
  left: 0;
  z-index: 70;
  min-width: 190px;
  padding: 8px;
  border-top: 1px solid rgba(224, 207, 145, 0.58);
  border-bottom: 1px solid rgba(42, 57, 76, 0.92);
  background:
    linear-gradient(180deg, rgba(16, 25, 38, 0.98), rgba(7, 11, 18, 0.98)),
    var(--bg);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
}

.nav-account-menu::before {
  content: "";
  position: absolute;
  left: 14px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-top: 1px solid rgba(224, 207, 145, 0.58);
  border-left: 1px solid rgba(224, 207, 145, 0.58);
  background: rgba(16, 25, 38, 0.98);
  transform: rotate(45deg);
}

.nav-account-menu a,
.nav-account-menu .nav-account-disabled,
.nav-account-menu button {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-bottom: 1px solid rgba(42, 57, 76, 0.45);
  background: transparent;
  color: var(--dim);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: left;
}

.nav-account-menu .nav-account-disabled {
  color: rgba(114, 129, 147, 0.58);
  cursor: not-allowed;
}

.nav-account-menu a:hover,
.nav-account-menu button:hover {
  color: var(--ink);
  background: rgba(112, 184, 200, 0.08);
}

.nav-account-menu button:hover {
  color: #e6aaa4;
}

.org-node small span {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(112, 184, 200, 0.08);
}

.structure-canvas .org-node {
  position: absolute;
  width: 166px;
  min-height: 102px;
  transform: translate(-50%, -50%);
  z-index: 2;
  padding: 9px 10px 8px;
}

.structure-canvas .org-node::before {
  display: none;
}

.structure-canvas .org-node.level-2 {
  width: 154px;
  min-height: 94px;
}

.org-detail,
.draft-panel,
.admin-panel {
  border-left: 1px solid var(--line);
  padding-left: 22px;
}

.org-detail {
  position: static;
  top: auto;
  max-width: 960px;
  border-left: 0;
  border-top: 1px solid var(--line);
  padding-left: 0;
  padding-top: 0;
}

.org-detail-file {
  padding: 28px 30px 12px;
  background:
    linear-gradient(90deg, rgba(199, 170, 104, 0.04), transparent 36%),
    repeating-linear-gradient(90deg, rgba(111, 146, 170, 0.02) 0 1px, transparent 1px 48px);
}

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

.detail-subtitle {
  display: block;
  margin: 2px 0 0;
  color: rgba(224, 207, 145, 0.82);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.org-detail-copy {
  max-width: 94ch;
  margin: 22px 0 0;
  color: var(--ink);
  line-height: 1.72;
}

.org-detail-ledger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 42px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(42, 57, 76, 0.54);
}

.org-detail-ledger section > span {
  display: block;
  color: var(--dim);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-line-list {
  display: grid;
  gap: 0;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: detail-line;
}

.detail-line-list li {
  counter-increment: detail-line;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(42, 57, 76, 0.48);
  color: var(--muted);
}

.detail-line-list li::before {
  content: counter(detail-line, decimal-leading-zero);
  color: var(--sand);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.detail-block {
  margin-top: 18px;
}

.detail-block h3 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  padding: 6px 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--muted);
}

/* Personnel Board */
.personnel-console {
  border-top: 1px solid var(--line);
}

.personnel-filter-bar {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) minmax(160px, 0.45fr) minmax(160px, 0.45fr);
  gap: 22px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(199, 170, 104, 0.28);
  border-bottom: 1px solid var(--line-soft);
  background:
    repeating-linear-gradient(90deg, rgba(111, 146, 170, 0.025) 0 1px, transparent 1px 42px),
    linear-gradient(90deg, rgba(199, 170, 104, 0.035), transparent 28%);
}

.personnel-filter-kicker {
  padding-right: 22px;
  border-right: 1px solid rgba(111, 146, 170, 0.28);
  color: var(--sand);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.personnel-filter-bar .field-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 0;
}

.personnel-filter-bar .field-control span {
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.personnel-filter-bar input,
.personnel-filter-bar select {
  min-height: 36px;
  padding: 0 4px 6px;
  border: 0;
  border-bottom: 1px solid rgba(111, 146, 170, 0.44);
  border-radius: 0;
  background: transparent;
}

.personnel-filter-bar input:focus,
.personnel-filter-bar select:focus {
  border-bottom-color: var(--cyan);
  box-shadow: none;
}

.custom-select {
  position: relative;
  min-width: 0;
}

.custom-select .select-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.custom-select-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid rgba(111, 146, 170, 0.44);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.custom-select-trigger span {
  overflow: hidden;
  color: var(--ink) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis;
  text-transform: none !important;
  white-space: nowrap;
}

.custom-select-trigger i {
  width: 8px;
  height: 8px;
  justify-self: end;
  border-right: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
  transform: rotate(45deg) translateY(-2px);
}

.custom-select.is-open .custom-select-trigger {
  border-bottom-color: var(--sand);
}

.custom-select.is-open .custom-select-trigger i {
  transform: rotate(225deg) translateY(-1px);
}

.custom-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 220px;
  padding: 7px;
  border-top: 1px solid rgba(199, 170, 104, 0.58);
  border-bottom: 1px solid rgba(111, 146, 170, 0.4);
  background:
    linear-gradient(180deg, rgba(17, 27, 40, 0.98), rgba(7, 11, 18, 0.98)),
    #0b111b;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.custom-select-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.custom-select-menu button:hover,
.custom-select-menu button:focus-visible {
  border-left-color: var(--cyan);
  background: rgba(112, 184, 200, 0.08);
  color: var(--ink);
  outline: 0;
}

.custom-select-menu button.is-active {
  border-left-color: var(--sand);
  background: rgba(199, 170, 104, 0.1);
  color: var(--sand);
}

.personnel-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
  gap: 48px;
  align-items: start;
  padding-top: 28px;
}

.personnel-group header span {
  color: var(--dim);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.personnel-board {
  border-top: 0;
}

.personnel-group {
  margin-bottom: 34px;
}

.personnel-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid rgba(42, 57, 76, 0.48);
}

.personnel-group header strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0;
}

.personnel-register {
  display: grid;
  gap: 0;
}

.personnel-entry {
  display: grid;
  grid-template-columns: 88px minmax(180px, 1fr) minmax(210px, 0.9fr) minmax(104px, auto) 64px;
  gap: 20px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 15px 0 15px 18px;
  border: 0;
  border-bottom: 1px solid rgba(42, 57, 76, 0.56);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.personnel-entry:hover,
.personnel-entry:focus-visible,
.personnel-entry.is-selected {
  background:
    linear-gradient(90deg, rgba(199, 170, 104, 0.08), rgba(112, 184, 200, 0.045) 32%, transparent 76%);
  outline: 0;
}

.personnel-entry.is-open-slot {
  background:
    linear-gradient(90deg, rgba(128, 70, 24, 0.2), rgba(7, 11, 18, 0.16) 42%, transparent 78%);
}

.personnel-entry.is-open-slot:hover,
.personnel-entry.is-open-slot:focus-visible,
.personnel-entry.is-open-slot.is-selected {
  background:
    linear-gradient(90deg, rgba(154, 83, 28, 0.28), rgba(213, 135, 64, 0.08) 34%, transparent 78%);
}

.personnel-entry.is-selected {
  box-shadow: inset 3px 0 0 rgba(224, 207, 145, 0.74);
}

.personnel-entry.is-open-slot.is-selected {
  box-shadow: inset 3px 0 0 rgba(214, 138, 58, 0.82);
}

.person-function {
  color: var(--muted);
  line-height: 1.45;
}

.person-main small {
  color: var(--muted);
}

.personnel-open-file {
  justify-self: end;
  color: var(--dim);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.personnel-file {
  position: sticky;
  top: 96px;
  min-height: 420px;
  border-top: 1px solid rgba(199, 170, 104, 0.42);
  border-bottom: 1px solid var(--line);
  padding: 24px 28px 28px;
  background:
    linear-gradient(180deg, rgba(17, 27, 40, 0.38), rgba(7, 11, 18, 0.16)),
    rgba(7, 11, 18, 0.22);
}

.personnel-file::before {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  margin-bottom: 18px;
  background: rgba(224, 207, 145, 0.78);
}

.personnel-file-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.personnel-file h2 {
  margin-top: 12px;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
}

.personnel-file-rank {
  margin: 8px 0 0;
  color: var(--muted);
}

.personnel-file-status {
  margin-top: 16px;
}

.personnel-file-grid {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.personnel-file-grid div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
}

.personnel-file-grid dt {
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.personnel-file-grid dd {
  margin: 0;
  color: var(--ink);
}

.personnel-file-section {
  margin-top: 20px;
}

.internal-file-access {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.internal-file-link {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(199, 170, 104, 0.44);
  background:
    linear-gradient(90deg, rgba(199, 170, 104, 0.13), transparent 72%),
    rgba(10, 16, 24, 0.64);
}

.internal-file-link span {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.internal-file-link strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.internal-file-link:hover {
  border-color: rgba(224, 207, 145, 0.72);
  background:
    linear-gradient(90deg, rgba(199, 170, 104, 0.2), transparent 72%),
    rgba(13, 22, 33, 0.86);
}

.internal-file-link.is-disabled {
  opacity: 0.56;
  filter: saturate(0.62);
}

.file-entry-state {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid currentColor;
  background: rgba(7, 11, 18, 0.72);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.file-entry-state.is-present {
  color: #78d99b;
  box-shadow: 0 0 18px rgba(115, 181, 143, 0.12);
}

.file-entry-state.is-missing {
  color: #e38d84;
  box-shadow: 0 0 18px rgba(203, 119, 112, 0.12);
}

.personnel-slot-note {
  margin-top: 24px;
  padding: 18px 0;
  border-top: 1px solid rgba(214, 138, 58, 0.34);
  border-bottom: 1px solid rgba(214, 138, 58, 0.18);
  color: rgba(231, 194, 149, 0.9);
  line-height: 1.65;
}

.board-filters,
.inventory-sidebar {
  position: sticky;
  top: 96px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.field-control,
.stacked-form label,
.output-block {
  display: grid;
  gap: 7px;
}

.field-control {
  margin-top: 14px;
}

.view-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.view-switch legend {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.view-switch button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 11, 18, 0.45);
  color: var(--muted);
  padding: 9px 10px;
  font-weight: 800;
}

.view-switch button.is-active {
  border-color: rgba(199, 170, 104, 0.52);
  color: var(--ink);
  background: rgba(199, 170, 104, 0.08);
}

.field-control span,
.stacked-form label span,
.output-block span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.division-roster {
  margin-bottom: 32px;
}

.division-board-section {
  position: relative;
  margin: 0 0 52px;
  padding-left: 26px;
}

.division-board-section::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 8px;
  left: 7px;
  width: 1px;
  background: var(--line);
}

.division-board-section header {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.division-line {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--sand);
  box-shadow: 0 0 0 6px rgba(199, 170, 104, 0.1);
}

.division-board-section header span:not(.division-line) {
  display: block;
  margin-top: 5px;
  color: var(--dim);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.person-dossier {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(16, 24, 36, 0.34);
}

.person-dossier summary {
  display: grid;
  gap: 7px;
  padding: 16px 0;
  list-style: none;
  cursor: pointer;
}

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

.person-dossier summary > span:not(.callsign):not(.status-badge) {
  color: var(--muted);
}

.person-detail-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 4px 0 18px;
}

.division-roster header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.division-roster header span {
  color: var(--dim);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.person-row {
  border-bottom: 1px solid var(--line-soft);
}

.person-row summary {
  display: grid;
  grid-template-columns: 86px 1.1fr 1fr 120px;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  list-style: none;
  cursor: pointer;
}

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

.callsign {
  color: var(--sand);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.person-row-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 0 0 16px 86px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.empty-state,
.loading-line,
.data-error {
  padding: 14px 0;
  color: var(--muted);
}

.data-error {
  border-top: 1px solid rgba(213, 182, 107, 0.4);
  border-bottom: 1px solid rgba(213, 182, 107, 0.24);
  color: var(--sand);
}

/* Quartermaster Shop */
.shop-workbench {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.shop-main {
  min-width: 0;
  display: grid;
  gap: 34px;
}

.inventory-area {
  min-width: 0;
}

.cart-fab {
  position: fixed;
  top: 50%;
  right: 0;
  bottom: auto;
  z-index: 76;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  align-items: center;
  width: min(218px, calc(100vw - 32px));
  min-height: 104px;
  padding: 16px 14px 16px 18px;
  border: 1px solid rgba(213, 182, 107, 0.42);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background:
    linear-gradient(135deg, rgba(16, 24, 36, 0.98), rgba(7, 11, 18, 0.96)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 34px);
  color: var(--ink);
  text-align: left;
  box-shadow: -16px 18px 44px rgba(0, 0, 0, 0.38);
  transform: translateY(-50%);
}

.cart-fab:hover,
.cart-fab:focus-visible,
body.has-cart-drawer .cart-fab {
  border-color: rgba(231, 211, 142, 0.72);
  background:
    linear-gradient(135deg, rgba(25, 33, 47, 0.98), rgba(8, 13, 21, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 34px);
}

.cart-fab-code {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.cart-fab strong {
  font-size: 1.05rem;
  letter-spacing: 0;
}

.cart-fab-meta {
  display: grid;
  justify-items: start;
  gap: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cart-fab-meta span:last-child {
  color: var(--sand);
}

.inventory-sidebar {
  position: sticky;
  top: 96px;
}

.inventory-nav {
  display: grid;
  gap: 7px;
}

.inventory-nav button {
  width: 100%;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 10px 10px;
  text-align: left;
}

.inventory-nav button:hover,
.inventory-nav button.is-active {
  border-left-color: var(--gold);
  background: rgba(199, 170, 104, 0.07);
  color: var(--ink);
}

.inventory-row {
  display: grid;
  grid-template-columns: minmax(360px, 1.4fr) minmax(180px, 0.5fr) minmax(220px, 0.55fr);
  gap: 34px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
}

.inventory-meta {
  display: grid;
  gap: 14px;
}

.inventory-meta > div {
  min-width: 0;
}

.inventory-actions {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.inventory-main strong,
.board-title h2,
.inventory-area h2 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

.inventory-main small {
  max-width: 58ch;
  display: block;
  margin-top: 8px;
  color: rgba(205, 222, 237, 0.78);
  line-height: 1.65;
}

.inventory-main.has-media {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.inventory-media {
  width: 96px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #0d141f;
  overflow: hidden;
  position: relative;
  display: block;
  padding: 0;
  color: var(--ink);
  cursor: zoom-in;
  transition: border-color 160ms ease, transform 160ms ease, filter 160ms ease;
}

.inventory-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-media span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 6px;
  border: 1px solid rgba(224, 207, 145, 0.38);
  background: rgba(5, 9, 15, 0.74);
  color: var(--sand);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.inventory-media:hover,
.inventory-media:focus-visible {
  border-color: rgba(224, 207, 145, 0.72);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.inventory-media:hover span,
.inventory-media:focus-visible span {
  opacity: 1;
  transform: translateY(0);
}

.product-image-preview-modal[hidden] {
  display: none;
}

.product-image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 54px);
}

.product-image-preview-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 34%, rgba(112, 184, 200, 0.13), transparent 32%),
    rgba(4, 7, 12, 0.84);
  backdrop-filter: blur(8px);
}

.product-image-preview-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(980px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  margin: 0;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid rgba(224, 207, 145, 0.45);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(14, 22, 33, 0.98), rgba(5, 9, 15, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 38px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.58);
}

.product-image-preview-dialog img {
  width: 100%;
  max-height: min(650px, calc(100vh - 190px));
  object-fit: contain;
  border-radius: 8px;
  background: rgba(5, 9, 15, 0.72);
}

.product-image-preview-dialog figcaption {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.product-image-preview-dialog figcaption strong {
  color: var(--ink);
  text-align: right;
}

.product-image-preview-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(224, 207, 145, 0.48);
  border-radius: var(--radius);
  background: rgba(5, 9, 15, 0.8);
  color: var(--ink);
  font-weight: 850;
}

.product-image-preview-close:hover,
.product-image-preview-close:focus-visible {
  border-color: rgba(224, 207, 145, 0.82);
  background: rgba(20, 31, 47, 0.95);
}

.price {
  color: var(--sand);
  font-weight: 900;
}

.cart-backdrop[hidden] {
  display: none;
}

.cart-backdrop {
  display: none;
}

.cart-panel {
  position: fixed;
  top: clamp(78px, 10vh, 112px);
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(18px, 3vh, 34px);
  z-index: 78;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  width: min(430px, calc(100vw - 28px));
  max-height: none;
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(213, 182, 107, 0.38);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(14, 22, 33, 0.99), rgba(5, 9, 15, 0.99)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 34px);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  transform: translateX(calc(100% + 48px));
  transition: transform 180ms ease, opacity 180ms ease;
  opacity: 0;
}

body.has-cart-drawer .cart-panel {
  transform: translateX(0);
  opacity: 1;
}

.cart-panel h2 {
  font-size: clamp(1.55rem, 4vw, 2.4rem);
  line-height: 1;
}

.drawer-heading-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.drawer-heading-actions .button {
  width: auto;
}

.cart-close {
  min-height: 34px;
  padding: 7px 10px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(112, 184, 200, 0.12);
}

.cart-items {
  display: grid;
  gap: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: thin;
  scrollbar-color: rgba(231, 211, 142, 0.52) rgba(12, 18, 27, 0.42);
}

.cart-items::-webkit-scrollbar {
  width: 8px;
}

.cart-items::-webkit-scrollbar-track {
  background: rgba(12, 18, 27, 0.46);
  border-radius: 999px;
}

.cart-items::-webkit-scrollbar-thumb {
  border: 2px solid rgba(12, 18, 27, 0.9);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(231, 211, 142, 0.82), rgba(112, 184, 200, 0.46));
}

.cart-items::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(244, 223, 151, 0.96), rgba(119, 201, 219, 0.7));
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.cart-row-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  color: var(--ink);
  font-weight: 800;
}

.cart-row-title span:first-child {
  min-width: 0;
  line-height: 1.35;
}

.cart-row-title span:last-child {
  color: var(--sand);
  white-space: nowrap;
}

.cart-row-controls {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 0;
}

.cart-row input {
  min-height: 38px;
  padding: 8px 10px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 16px 0 8px;
  border: 0;
}

.cart-checkout-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  margin-top: 14px;
}

.cart-checkout-row .button {
  width: 100%;
}

.cart-panel .button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.checkout-overlay[hidden] {
  display: none;
}

.checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 6, 10, 0.78);
  backdrop-filter: blur(10px);
}

.checkout-dialog {
  width: min(820px, 100%);
  max-height: min(92vh, 880px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(213, 182, 107, 0.34);
  background:
    linear-gradient(135deg, rgba(13, 20, 31, 0.98), rgba(7, 11, 18, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 36px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.checkout-dialog textarea {
  min-height: 112px;
}

.checkout-dialog #order-output {
  min-height: 190px;
}

.output-block + .button {
  margin-top: 10px;
}

.cart-total span {
  color: var(--muted);
}

.cart-total strong {
  color: var(--sand);
}

.order-history-panel {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.order-history-list {
  border-top: 1px solid var(--line-soft);
}

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

.history-row strong {
  display: block;
  color: var(--ink);
}

.history-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.history-note {
  margin: 8px 0 0 !important;
  color: rgba(232, 217, 180, 0.86) !important;
}

.notice {
  display: inline-flex;
  margin: 20px 0 0;
  padding: 8px 11px;
  border: 1px solid rgba(199, 170, 104, 0.34);
  border-radius: var(--radius);
  color: var(--sand);
  font-weight: 800;
}

.access-panel {
  max-width: 720px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  padding: 26px 0;
}

.access-panel p {
  color: var(--muted);
  margin: 12px 0 18px;
}

.shop-workbench > .access-denied-panel {
  grid-column: 1 / -1;
}

.access-denied-panel {
  position: relative;
  max-width: none;
  min-height: clamp(500px, 48vw, 650px);
  display: grid;
  align-content: start;
  gap: 14px;
  contain: layout paint;
  overflow: hidden;
  padding: clamp(30px, 5vw, 56px) clamp(34px, 6vw, 68px) clamp(92px, 8vw, 124px);
  border: 1px solid rgba(182, 51, 48, 0.45);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(67, 11, 16, 0.92), rgba(7, 10, 15, 0.95) 46%, rgba(9, 12, 18, 0.98)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 9px);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.08);
}

.access-denied-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(227, 55, 51, 0.22), transparent 34%, transparent 66%, rgba(227, 55, 51, 0.12)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 54px);
  mix-blend-mode: screen;
  opacity: 0.75;
}

.access-denied-panel::after {
  content: "ZUGRIFFSKONTROLLE";
  position: absolute;
  right: clamp(20px, 4vw, 58px);
  bottom: clamp(48px, 4.8vw, 74px);
  color: rgba(255, 219, 146, 0.16);
  font-size: clamp(1.25rem, 3.45vw, 4.05rem);
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.access-watermark {
  position: absolute;
  right: clamp(10px, 8vw, 120px);
  top: 50%;
  width: min(38vw, 420px);
  transform: translateY(-50%) rotate(-8deg);
  opacity: 0.055;
  filter: grayscale(1) contrast(1.3);
  pointer-events: none;
}

.access-denied-header {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.access-denied-title-row {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 30px);
}

.access-denied-header h1,
.access-denied-header h2 {
  margin: 0;
  color: #fff3ef;
  font-size: clamp(2.4rem, 7vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(225, 49, 45, 0.24);
}

.access-denied-icon {
  position: relative;
  width: clamp(72px, 9vw, 118px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 219, 146, 0.72);
  border-radius: 50%;
  background: rgba(9, 12, 18, 0.62);
}

.access-denied-icon::before,
.access-denied-icon::after,
.access-denied-icon span {
  content: "";
  display: block;
  position: absolute;
  background: #ffdb92;
}

.access-denied-icon::before {
  width: clamp(42px, 5vw, 68px);
  height: 10px;
  transform: rotate(45deg);
}

.access-denied-icon::after {
  width: clamp(42px, 5vw, 68px);
  height: 10px;
  transform: rotate(-45deg);
}

.access-denied-icon span {
  width: 72%;
  height: 72%;
  border: 2px solid rgba(227, 55, 51, 0.7);
  border-radius: 50%;
  background: transparent;
}

.access-denied-copy,
.access-denied-note,
.access-clearance-grid,
.access-unlock-button {
  position: relative;
  z-index: 1;
}

.access-denied-copy {
  max-width: 64ch;
  margin: 10px 0 12px !important;
  color: #f4c6c0 !important;
  font-size: 1.08rem;
}

.access-denied-note {
  max-width: 70ch;
  margin: 10px 0 0 !important;
  color: rgba(225, 235, 244, 0.72) !important;
}

.access-unlock-row {
  position: absolute;
  z-index: 2;
  left: clamp(34px, 6vw, 68px);
  right: clamp(34px, 6vw, 68px);
  bottom: clamp(18px, 2.4vw, 34px);
  display: flex;
  justify-content: center;
  margin-top: 0;
}

.access-clearance-grid {
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 219, 146, 0.28);
  border-bottom: 1px solid rgba(255, 219, 146, 0.18);
}

.access-clearance-grid div {
  padding: 14px 18px;
  border-right: 1px solid rgba(255, 219, 146, 0.16);
}

.access-clearance-grid div:last-child {
  border-right: 0;
}

.access-clearance-grid span,
.discord-account-card .ledger-label {
  display: block;
  color: rgba(255, 219, 146, 0.74);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.access-clearance-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.access-unlock-button {
  justify-self: center;
  position: relative;
  min-height: 58px;
  padding: 10px 28px 10px 62px;
  border: 1px solid rgba(255, 219, 146, 0.66);
  border-left: 4px solid rgba(255, 219, 146, 0.86);
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(255, 219, 146, 0.12), rgba(112, 184, 200, 0.06) 46%, rgba(10, 14, 20, 0.9)),
    rgba(8, 12, 18, 0.92);
  color: #ffe6a8;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 0 1px rgba(255, 219, 146, 0.08),
    0 0 0 1px rgba(255, 219, 146, 0.04);
}

.access-unlock-button::before {
  content: "DC";
  position: absolute;
  left: 18px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 219, 146, 0.54);
  color: var(--sand);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  transform: translateY(-50%);
}

.access-unlock-button:hover,
.access-unlock-button:focus-visible {
  border-color: rgba(112, 184, 200, 0.82);
  border-left-color: rgba(112, 184, 200, 0.9);
  background:
    linear-gradient(90deg, rgba(112, 184, 200, 0.18), rgba(10, 14, 20, 0.9)),
    rgba(8, 12, 18, 0.94);
  color: var(--ink);
}

.discord-account-card {
  display: grid;
  gap: 3px;
  margin: 0 0 16px;
  padding: 13px 0 15px;
  border-top: 1px solid rgba(255, 219, 146, 0.3);
  border-bottom: 1px solid rgba(255, 219, 146, 0.16);
}

.discord-account-card strong {
  color: var(--ink);
  font-size: 1rem;
}

.discord-account-card a {
  color: var(--cyan);
  font-size: 0.86rem;
  text-decoration: none;
}

.discord-account-card a:hover,
.discord-account-card a:focus-visible {
  color: var(--sand);
}

.discord-account-card small {
  color: var(--muted);
}

.discord-account-card .discord-logout {
  width: fit-content;
  min-height: 34px;
  margin-top: 8px;
  padding: 7px 10px;
  color: rgba(234, 199, 104, 0.86);
}

/* Zeus Desk */
.zeus-desk {
  display: grid;
  gap: 22px;
  align-items: start;
}

.zeus-access-gate[hidden],
.zeus-workspace[hidden],
.zeus-toolbar[hidden] {
  display: none !important;
}

.zeus-access-gate {
  max-width: 760px;
}

.zeus-workspace {
  display: grid;
  gap: 14px;
}

.zeus-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(340px, 1fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
}

.zeus-toolbar .field-control {
  margin: 0;
}

.zeus-toolbar .button {
  width: auto;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.zeus-toolbar .form-hint {
  align-self: center;
  margin: 0;
  color: var(--muted);
  text-align: left;
}

.zeus-live-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.zeus-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(120, 151, 174, 0.28);
  background: rgba(7, 11, 18, 0.38);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.zeus-switch input {
  width: 15px;
  height: 15px;
  accent-color: var(--cyan);
}

.zeus-silent-reply {
  width: fit-content;
  border-color: rgba(214, 138, 58, 0.42);
  color: rgba(231, 194, 149, 0.9);
  background: rgba(128, 70, 24, 0.12);
}

.zeus-count-pill {
  align-self: center;
  justify-self: end;
  color: var(--sand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.zeus-list {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.zeus-request {
  border: 1px solid rgba(120, 151, 174, 0.2);
  border-left: 4px solid rgba(120, 151, 174, 0.3);
  background: rgba(7, 11, 18, 0.34);
  transition: border-color 160ms ease, background 160ms ease;
}

.zeus-request.status-new {
  border-left-color: rgba(224, 71, 64, 0.9);
  background: linear-gradient(90deg, rgba(132, 22, 27, 0.2), rgba(7, 11, 18, 0.38) 42%);
}

.zeus-request.status-progress {
  border-left-color: rgba(224, 177, 88, 0.86);
  background: linear-gradient(90deg, rgba(145, 92, 26, 0.17), rgba(7, 11, 18, 0.38) 42%);
}

.zeus-request.status-done {
  border-left-color: rgba(87, 184, 129, 0.82);
  background: linear-gradient(90deg, rgba(30, 101, 67, 0.16), rgba(7, 11, 18, 0.38) 42%);
}

.zeus-request.status-blocked {
  border-left-color: rgba(75, 87, 98, 0.9);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.38), rgba(7, 11, 18, 0.42) 46%);
}

.zeus-request summary {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(150px, auto);
  gap: 24px;
  align-items: start;
  padding: 20px 22px;
  list-style: none;
  cursor: pointer;
}

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

.zeus-request-body {
  display: grid;
  gap: 18px;
  padding: 0 22px 24px 134px;
}

.zeus-player-message {
  max-width: 820px;
  padding: 16px 18px;
  border-top: 1px solid rgba(213, 182, 107, 0.34);
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(90deg, rgba(213, 182, 107, 0.08), rgba(112, 184, 200, 0.025)),
    rgba(7, 11, 18, 0.24);
}

.zeus-player-message span {
  display: block;
  margin-bottom: 8px;
  color: var(--sand);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.zeus-player-message p {
  max-width: 760px;
  margin: 0;
  color: rgba(214, 230, 241, 0.88);
  font-size: 1rem;
  line-height: 1.68;
}

.zeus-request-body .form-row {
  grid-template-columns: minmax(220px, 320px) minmax(280px, 1fr);
}

.zeus-summary-text {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.zeus-summary-text strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.zeus-summary-text small,
.zeus-summary-text .zeus-preview {
  color: var(--muted);
}

.zeus-summary-text .zeus-preview {
  max-width: 760px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zeus-state-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.zeus-state-stack .status-badge,
.zeus-state-stack .priority {
  min-height: 22px;
  padding: 2px 8px;
  font-size: 0.72rem;
}

/* Admin Prototype */
.admin-warning {
  border-top: 1px solid rgba(213, 182, 107, 0.42);
  border-bottom: 1px solid rgba(213, 182, 107, 0.28);
  padding: 14px 0;
  color: var(--sand);
}

.admin-login,
.admin-shell {
  margin-top: 24px;
}

.admin-login {
  max-width: 430px;
}

.admin-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 0;
  margin-bottom: 18px;
}

.admin-topline p {
  margin: 0;
  color: var(--muted);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.admin-tabs button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 24, 36, 0.68);
  color: var(--muted);
  padding: 9px 12px;
  font-weight: 800;
}

.admin-tabs button.is-active {
  border-color: rgba(199, 170, 104, 0.48);
  color: var(--ink);
}

.admin-section {
  display: none;
}

.admin-section.is-active {
  display: block;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.admin-list {
  border-top: 1px solid var(--line);
}

.admin-list button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--muted);
  padding: 11px 0;
  text-align: left;
}

.admin-list.is-sortable button {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
}

.admin-list.is-sortable button small {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-list.is-sortable button.is-open-slot {
  background: linear-gradient(90deg, rgba(128, 70, 24, 0.22), transparent 78%);
}

.admin-list.is-sortable button.is-dragging {
  opacity: 0.54;
}

.admin-list.is-sortable button.is-drop-target {
  box-shadow: inset 0 2px 0 rgba(224, 207, 145, 0.82);
  background: rgba(224, 207, 145, 0.08);
}

.admin-drag-handle {
  width: 12px;
  height: 24px;
  border-left: 2px solid rgba(143, 169, 196, 0.46);
  border-right: 2px solid rgba(143, 169, 196, 0.28);
  opacity: 0.76;
  cursor: grab;
}

.admin-list button.is-active,
.admin-list button:hover {
  color: var(--ink);
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  border-top: 0;
}

.admin-summary-row {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 0;
}

.admin-summary-row span,
.admin-detail dt {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-summary-row strong {
  display: block;
  margin-top: 8px;
  color: var(--sand);
  font-size: 1.8rem;
}

.admin-detail {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.admin-detail dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.admin-detail dd {
  margin: 4px 0 0;
  color: var(--ink);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.admin-check-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 9px 11px;
  border: 1px solid rgba(120, 151, 174, 0.28);
  background: rgba(7, 11, 18, 0.38);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-check-row input {
  width: 16px;
  height: 16px;
  accent-color: #d68a3a;
}

.admin-form.is-open-slot {
  border-top: 1px solid rgba(214, 138, 58, 0.34);
  padding-top: 12px;
}

.admin-form.is-open-slot .member-slot-control {
  border-color: rgba(214, 138, 58, 0.56);
  color: #e5b174;
  background: rgba(128, 70, 24, 0.14);
}

.admin-form.is-open-slot input:disabled,
.admin-form.is-open-slot textarea:disabled {
  color: rgba(231, 194, 149, 0.58);
  border-color: rgba(214, 138, 58, 0.2);
  background: rgba(128, 70, 24, 0.08);
  cursor: not-allowed;
}

.profile-editor-shell {
  display: grid;
  gap: 22px;
}

.profile-editor-status {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 0;
  color: var(--muted);
  font-weight: 800;
}

.profile-editor-status.is-error {
  color: #e38d84;
}

.profile-draft-notice {
  margin-top: 20px;
  padding: 16px 0;
  border-top: 1px solid rgba(199, 170, 104, 0.34);
  border-bottom: 1px solid rgba(42, 57, 76, 0.7);
}

.profile-draft-notice span {
  display: block;
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-draft-notice strong {
  display: block;
  margin-top: 6px;
  color: var(--sand);
}

.profile-draft-notice p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.profile-editor-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 32px;
}

.profile-editor-side {
  border-top: 1px solid rgba(224, 207, 145, 0.42);
  padding-top: 18px;
}

.profile-editor-panel {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  row-gap: 0;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 5px;
  border: 1px solid rgba(42, 57, 76, 0.9);
  background:
    linear-gradient(180deg, rgba(18, 27, 40, 0.98), rgba(8, 13, 20, 0.98)),
    rgba(8, 13, 20, 0.9);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.editor-toolbar button,
.editor-toolbar select,
.editor-file-button {
  min-height: 34px;
  width: auto;
  margin: 0;
  padding: 6px 9px;
  border: 0;
  border-right: 1px solid rgba(42, 57, 76, 0.58);
  background: rgba(7, 11, 18, 0.12);
  color: var(--ink);
  border-radius: 0;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: none;
}

.editor-toolbar button,
.editor-file-button {
  cursor: pointer;
}

.editor-toolbar button:hover,
.editor-toolbar select:hover,
.editor-file-button:hover {
  background: rgba(112, 184, 200, 0.13);
  color: #f4f7fa;
}

.editor-toolbar select {
  min-width: 124px;
  max-width: 178px;
  padding-right: 25px;
  color: var(--muted);
}

.editor-divider {
  align-self: stretch;
  width: 1px;
  min-height: 34px;
  margin: 0 5px;
  background: rgba(199, 170, 104, 0.26);
}

.editor-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.editor-file-button input {
  display: none;
}

.editor-image-menu {
  position: fixed;
  z-index: 120;
  display: block;
  min-width: 190px;
  padding: 4px;
  border: 1px solid rgba(42, 57, 76, 0.92);
  background:
    linear-gradient(180deg, rgba(13, 22, 33, 0.98), rgba(7, 11, 18, 0.99)),
    var(--bg);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.44);
}

.editor-image-menu[hidden] {
  display: none;
}

.editor-image-menu button {
  display: block;
  width: 100%;
  min-height: 30px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid rgba(42, 57, 76, 0.46);
  background: transparent;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 850;
  text-align: left;
}

.editor-image-menu button:hover {
  background: rgba(112, 184, 200, 0.12);
}

.profile-editor,
.profile-editor-preview,
.profile-preview-document,
.profile-reader-document {
  min-height: 360px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(5, 9, 15, 0.72);
  color: var(--ink);
  line-height: 1.75;
}

.profile-editor {
  outline: 0;
}

.profile-editor:focus {
  border-color: rgba(112, 184, 200, 0.72);
  box-shadow: inset 0 0 0 1px rgba(112, 184, 200, 0.14);
}

.profile-editor.is-previewing {
  min-height: 200px;
}

.profile-editor blockquote,
.profile-editor-preview blockquote,
.profile-reader-document blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid rgba(199, 170, 104, 0.75);
  background: rgba(199, 170, 104, 0.08);
  color: rgba(232, 237, 242, 0.92);
}

.profile-editor img,
.profile-editor-preview img,
.profile-preview-document img,
.profile-reader-document img {
  max-width: 100%;
  height: auto;
}

.editor-image-frame,
.profile-reader-document .editor-image-frame,
.profile-preview-document .editor-image-frame {
  display: block;
  margin: 20px 0;
  padding: 0;
}

.editor-image-frame img {
  display: block;
  width: 100%;
  border: 0;
  background: rgba(5, 9, 15, 0.72);
}

.editor-image-frame.image-left {
  margin-left: 0;
  margin-right: auto;
}

.editor-image-frame.image-center {
  margin-left: auto;
  margin-right: auto;
}

.editor-image-frame.image-right {
  margin-left: auto;
  margin-right: 0;
}

.editor-image-frame.image-small {
  max-width: min(320px, 42%);
}

.editor-image-frame.image-medium {
  max-width: min(560px, 68%);
}

.editor-image-frame.image-full {
  max-width: 100%;
}

.editor-image-frame.image-front {
  position: relative;
  z-index: 2;
}

.editor-image-frame.image-behind {
  position: relative;
  z-index: 0;
  opacity: 0.52;
  filter: saturate(0.74);
}

.profile-editor .editor-image-frame.image-free {
  position: relative;
  z-index: 4;
  cursor: move;
  transform: translate(var(--image-x, 0), var(--image-y, 0));
}

.profile-editor .editor-image-frame.image-locked {
  cursor: default;
}

.profile-editor .editor-image-frame.is-selected-image {
  outline: 0;
  filter: brightness(1.08);
}

.profile-editor-preview {
  margin-top: 14px;
  border-color: rgba(199, 170, 104, 0.42);
  background:
    linear-gradient(180deg, rgba(199, 170, 104, 0.05), transparent 160px),
    rgba(5, 9, 15, 0.72);
}

.profile-reader-shell {
  display: grid;
  gap: 20px;
  max-width: 1180px;
}

.profile-reader-document {
  min-height: 420px;
  padding: 0;
  border: 0;
  background: transparent;
}

.personal-profile-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(199, 170, 104, 0.36);
  background:
    radial-gradient(circle at 70% 18%, rgba(112, 184, 200, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(199, 170, 104, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(13, 22, 33, 0.92), rgba(5, 9, 15, 0.96)),
    repeating-linear-gradient(90deg, rgba(111, 146, 170, 0.052) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(111, 146, 170, 0.035) 0 1px, transparent 1px 58px),
    rgba(5, 9, 15, 0.92);
}

.personal-profile-frame::after {
  content: "PERSONNEL FILE";
  position: absolute;
  right: clamp(18px, 6vw, 88px);
  top: clamp(34px, 8vw, 92px);
  color: rgba(112, 184, 200, 0.052);
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 950;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.profile-reader-cover {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: clamp(22px, 4vw, 52px);
  padding: clamp(26px, 5vw, 64px);
  border-bottom: 1px solid rgba(199, 170, 104, 0.28);
}

.dossier-classification {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--sand);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-reader-cover h2 {
  margin: 8px 0 6px;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 0.96;
}

.profile-reader-cover p {
  margin: 0;
  color: var(--muted);
}

.profile-reader-cover dl {
  display: grid;
  align-self: end;
  margin: 0;
  border-top: 1px solid rgba(199, 170, 104, 0.32);
  border-bottom: 1px solid rgba(42, 57, 76, 0.82);
}

.profile-reader-cover dl div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(42, 57, 76, 0.54);
}

.profile-reader-cover dt {
  color: var(--dim);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-reader-cover dd {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
}

.profile-reader-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 52px);
  padding: clamp(24px, 5vw, 60px);
}

.profile-reader-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(224, 207, 145, 0.45);
}

.profile-reader-toc span {
  color: var(--sand);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-reader-toc p,
.profile-reader-toc a {
  color: var(--muted);
  font-size: 0.84rem;
}

.profile-reader-toc ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
}

.profile-reader-toc a:hover {
  color: var(--ink);
}

.profile-reader-content {
  min-height: 520px;
  padding-bottom: 40px;
}

.profile-reader-content h2,
.profile-reader-content h3,
.profile-editor h2,
.profile-editor h3,
.profile-editor-preview h2,
.profile-editor-preview h3 {
  scroll-margin-top: 96px;
}

.profile-banner {
  margin: 0 0 28px;
  padding: clamp(24px, 5vw, 54px);
  border-left: 4px solid rgba(199, 170, 104, 0.72);
  background:
    linear-gradient(90deg, rgba(199, 170, 104, 0.16), transparent 72%),
    rgba(8, 13, 20, 0.78);
}

.profile-banner h2 {
  margin: 0 0 10px;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
}

.profile-banner p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.profile-section {
  margin: 28px 0;
  padding: 22px 0;
  border-top: 1px solid rgba(42, 57, 76, 0.76);
  border-bottom: 1px solid rgba(42, 57, 76, 0.42);
}

.profile-divider {
  height: 1px;
  margin: 34px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(199, 170, 104, 0.76), transparent);
}

.admin-form {
  display: grid;
  gap: 12px;
}

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

.form-row label {
  display: grid;
  gap: 7px;
}

.form-row label span,
.admin-panel h3 {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-export {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.admin-board {
  position: relative;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(90deg, rgba(111, 146, 170, 0.05) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(0deg, rgba(111, 146, 170, 0.04) 0 1px, transparent 1px 48px),
    rgba(7, 11, 18, 0.34);
  overflow: hidden;
}

.admin-board svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.admin-node {
  position: absolute;
  width: 170px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 24, 36, 0.95);
  color: var(--ink);
  padding: 10px;
  text-align: left;
  user-select: none;
  cursor: grab;
}

.admin-node.is-active {
  border-color: rgba(199, 170, 104, 0.6);
}

.admin-node:active {
  cursor: grabbing;
}

.connection-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.admin-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(111, 146, 170, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(111, 146, 170, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 64px 64px;
}

.admin-login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px var(--page-pad);
}

.admin-login-card {
  width: min(100%, 520px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  padding: 34px 0;
}

.admin-login-brand {
  margin-bottom: 30px;
}

.admin-status-message {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  margin: 24px 0;
  padding: 12px 0;
}

.admin-status-message.is-ok {
  color: var(--cyan);
}

.admin-status-message.is-error,
.admin-feedback.is-error {
  color: var(--danger);
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  margin-top: 0;
}

.admin-shell[hidden],
.admin-login-screen[hidden] {
  display: none !important;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--line);
  background: rgba(7, 11, 18, 0.92);
  padding: 24px;
}

.admin-sidebar-brand {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.admin-user-block {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 18px;
}

.admin-user-block strong,
.admin-user-block small {
  display: block;
}

.admin-user-block small {
  color: var(--sand);
  margin-top: 8px;
}

.admin-sidebar .admin-tabs {
  display: grid;
  gap: 6px;
  margin: 0;
  border: 0;
  padding: 0;
}

.admin-sidebar .admin-tabs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 10px 0 10px 12px;
  text-align: left;
}

.admin-sidebar .admin-tabs button.is-active {
  border-color: var(--sand);
  background: rgba(199, 170, 104, 0.07);
}

.admin-tab-count {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(198, 91, 82, 0.62);
  border-radius: 999px;
  background: rgba(198, 91, 82, 0.18);
  color: #f0bbb5;
  font-size: 0.72rem;
  font-weight: 950;
}

.admin-main {
  min-width: 0;
  padding: 34px clamp(24px, 4vw, 54px) 56px;
}

.admin-main-topline {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
  padding-bottom: 22px;
}

.admin-main-topline h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin: 0;
}

.admin-feedback {
  min-height: 24px;
  color: var(--cyan);
  margin: 0;
  text-align: right;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 18px;
}

.admin-metric {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  padding: 18px 0;
}

.admin-metric span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-metric strong {
  display: block;
  margin-top: 12px;
  color: var(--sand);
  font-size: 2rem;
}

.admin-metric small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.admin-structure-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: start;
}

.admin-structure-layout > div:first-child {
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-color: var(--line) transparent;
}

.admin-structure-layout .admin-panel {
  border-left: 0;
  border-top: 1px solid var(--line);
  padding-left: 0;
  padding-top: 22px;
}

.admin-structure-canvas {
  position: relative;
  width: min(1480px, 100%);
  min-width: 0;
  margin: 0 auto;
  min-height: clamp(560px, 43vw, 680px);
  aspect-ratio: 16 / 7.05;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(90deg, rgba(7, 11, 18, 0.44) 0 6%, transparent 6% 94%, rgba(7, 11, 18, 0.44) 94% 100%),
    radial-gradient(circle at 50% 18%, rgba(112, 184, 200, 0.085), transparent 28%),
    linear-gradient(90deg, rgba(199, 170, 104, 0.04), transparent 18%, transparent 82%, rgba(112, 184, 200, 0.04)),
    repeating-linear-gradient(90deg, rgba(111, 146, 170, 0.06) 0 1px, transparent 1px 1.25%),
    repeating-linear-gradient(0deg, rgba(111, 146, 170, 0.045) 0 1px, transparent 1px 8.33%),
    rgba(8, 13, 22, 0.56);
  overflow: visible;
}

.admin-structure-canvas svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.admin-structure-canvas line,
.admin-structure-canvas path {
  fill: none;
  stroke: rgba(126, 155, 177, 0.44);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-structure-canvas path.is-crosslink {
  stroke: rgba(111, 146, 170, 0.25);
  stroke-dasharray: 3 5;
}

.admin-file-drop {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px dashed rgba(160, 184, 198, 0.34);
  background: rgba(7, 11, 18, 0.5);
}

.admin-file-drop span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-file-drop input {
  padding: 8px;
  border-color: rgba(160, 184, 198, 0.22);
}

.admin-map-node {
  position: absolute;
  width: 166px;
  min-height: 102px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(17, 27, 40, 0.98), rgba(8, 13, 20, 0.98)),
    #0f1824;
  color: var(--ink);
  padding: 9px 10px 8px;
  text-align: left;
  cursor: grab;
  user-select: none;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  box-shadow: inset 3px 0 0 rgba(199, 170, 104, 0.26);
}

.admin-map-node.level-2 {
  width: 154px;
  min-height: 94px;
}

.admin-map-node .node-short {
  display: inline-flex;
  width: fit-content;
  min-width: 40px;
  justify-content: center;
  padding: 2px 6px;
  border: 1px solid rgba(213, 182, 107, 0.42);
  background: rgba(213, 182, 107, 0.08);
  color: var(--sand);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-map-node strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.16;
}

.admin-map-node .node-german {
  display: block;
  margin-top: 4px;
  color: rgba(169, 190, 207, 0.84);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.28;
}

.admin-map-node small {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.24;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-map-node small span {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(112, 184, 200, 0.08);
}

.admin-map-node.is-active {
  border-color: rgba(199, 170, 104, 0.7);
  box-shadow:
    inset 3px 0 0 rgba(224, 207, 145, 0.78),
    0 0 0 1px rgba(224, 207, 145, 0.1);
}

.admin-map-node:active {
  cursor: grabbing;
}

.admin-list.compact {
  margin-bottom: 14px;
}

.admin-list.compact button {
  padding: 8px 0;
}

.admin-image-preview {
  min-height: 74px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 0;
}

.admin-image-preview span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-image-preview img {
  width: 100%;
  max-height: 190px;
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: #0d141f;
}

/* Forms / Recruitment */
.application-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 44px;
  align-items: start;
}

.application-notice {
  margin-top: 18px;
}

.application-draft {
  padding-left: 28px;
}

.application-draft .stacked-form {
  gap: 16px;
}

.application-draft .output-block {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.recruitment-section {
  padding-top: 18px;
}

.recruitment-framed-board {
  display: grid;
  grid-template-columns: minmax(86px, 150px) minmax(0, 1fr) minmax(86px, 150px);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
}

.recruitment-side-image {
  min-height: 620px;
  border: 1px solid rgba(120, 151, 174, 0.34);
  background:
    linear-gradient(180deg, rgba(16, 24, 36, 0.38), rgba(5, 9, 15, 0.62)),
    var(--recruitment-column-image);
  background-color: #0b111a;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.recruitment-side-left {
  --recruitment-column-image: var(--recruitment-left-image);
}

.recruitment-side-right {
  --recruitment-column-image: var(--recruitment-right-image);
}

.recruitment-board {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(500px, 1.08fr);
  gap: clamp(34px, 5vw, 64px);
  margin-top: 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 28px;
}

.recruitment-brief {
  max-width: 780px;
}

.recruitment-brief p:not(.eyebrow) {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.78;
}

.recruitment-brief h2,
.discord-apply-panel h2 {
  margin-bottom: 18px;
}

.discord-apply-panel {
  min-width: 0;
}

.ticket-flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  padding: 6px 0 6px 28px;
  list-style: none;
  counter-reset: ticket;
  border-top: 1px solid rgba(213, 182, 107, 0.36);
  border-bottom: 1px solid var(--line-soft);
}

.ticket-flow li {
  counter-increment: ticket;
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  padding: 18px 0 20px;
  border-right: 0;
  border-bottom: 1px solid var(--line-soft);
}

.ticket-flow li:last-child {
  border-bottom: 0;
}

.ticket-flow li::before {
  content: counter(ticket, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(213, 182, 107, 0.48);
  border-radius: 50%;
  background: rgba(213, 182, 107, 0.07);
  color: var(--sand);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ticket-flow li::after {
  content: "";
  position: absolute;
  top: 52px;
  bottom: -2px;
  left: 17px;
  width: 1px;
  background: linear-gradient(180deg, rgba(231, 211, 142, 0.38), transparent);
}

.ticket-flow li:last-child::after {
  display: none;
}

.ticket-flow strong {
  grid-column: 2;
  display: block;
  padding-top: 2px;
  color: var(--ink);
}

.ticket-flow span {
  grid-column: 2;
  display: block;
  margin-top: -12px;
  color: var(--muted);
  line-height: 1.58;
}

.ticket-discord-link {
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 2px;
  padding: 7px 13px 7px 38px;
  border: 1px solid rgba(213, 182, 107, 0.54);
  border-left: 3px solid rgba(213, 182, 107, 0.82);
  background:
    linear-gradient(90deg, rgba(213, 182, 107, 0.13), rgba(13, 20, 30, 0.76)),
    rgba(9, 14, 22, 0.78);
  color: var(--sand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  position: relative;
}

.ticket-discord-link::before {
  content: "DC";
  position: absolute;
  left: 10px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(213, 182, 107, 0.48);
  color: rgba(232, 217, 180, 0.92);
  font-size: 0.56rem;
  transform: translateY(-50%);
}

.ticket-discord-link:hover,
.ticket-discord-link:focus-visible {
  border-color: rgba(112, 184, 200, 0.76);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(112, 184, 200, 0.14), rgba(13, 20, 30, 0.78)),
    rgba(9, 14, 22, 0.82);
}

.application-note-block {
  margin-top: 24px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(213, 182, 107, 0.36);
}

.application-note-block strong {
  color: var(--sand);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.application-note-block p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.procedure-line {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 0 0 28px;
  list-style: none;
}

.procedure-line::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 8px;
  width: 1px;
  background: var(--line);
}

.procedure-line li {
  position: relative;
  padding: 0 0 22px;
}

.procedure-line li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: -24px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sand);
  box-shadow: 0 0 0 5px rgba(199, 170, 104, 0.11);
}

.procedure-line strong,
.procedure-line span {
  display: block;
}

.procedure-line span {
  margin-top: 4px;
  color: var(--muted);
}

.requirements-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.requirements-line span {
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 4px;
}

.draft-panel {
  min-width: 0;
}

.stacked-form {
  display: grid;
  gap: 13px;
}

.output-block {
  margin-top: 16px;
}

.form-hint {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid rgba(160, 184, 198, 0.14);
  background: #070b12;
}

.footer-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--dim);
  font-size: 0.92rem;
}

.footer-inner span:first-child {
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  white-space: nowrap;
}

.footer-admin-link {
  color: rgba(170, 188, 199, 0.48);
  font-size: 0.82rem;
  text-decoration: none;
}

.footer-admin-link:hover,
.footer-admin-link:focus-visible {
  color: var(--sand);
}

@media (max-width: 1200px) {
  .admin-dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-structure-layout {
    grid-template-columns: 1fr;
  }

  .admin-structure-canvas {
    min-height: 620px;
  }

  .shop-workbench {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .recruitment-framed-board {
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    gap: 18px;
  }

  .recruitment-side-image {
    min-height: 560px;
  }

  .inventory-sidebar {
    position: static;
  }

  .inventory-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .inventory-nav button {
    width: auto;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .inventory-row {
    grid-template-columns: minmax(280px, 1fr) minmax(180px, 0.5fr);
    gap: 20px 28px;
  }

  .inventory-actions {
    justify-items: start;
    grid-column: 1 / -1;
    grid-template-columns: minmax(170px, auto) minmax(170px, auto) auto;
    align-items: end;
  }

  .cart-checkout-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1040px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

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

  .admin-main {
    padding: 28px var(--page-pad) 46px;
  }

  .doctrine-flow,
  .strip-ledger,
  .next-steps {
    grid-template-columns: 1fr 1fr;
  }

  .doctrine-flow li:nth-child(2n),
  .strip-ledger div:nth-child(2n),
  .next-steps a:nth-child(2n) {
    border-right: 0;
  }

  .doctrine-flow li::after {
    display: none;
  }

  .org-layout,
  .personnel-layout,
  .personnel-shell,
  .zeus-desk,
  .shop-workbench,
  .application-layout,
  .recruitment-board,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .profile-editor-grid {
    grid-template-columns: 1fr;
  }

  .profile-reader-cover,
  .profile-reader-layout {
    grid-template-columns: 1fr;
  }

  .profile-reader-toc {
    position: static;
  }

  .nav-account {
    margin-right: 0;
  }

  .nav-account-name,
  .nav-account-login span:not(.nav-avatar):not(.nav-avatar-fallback),
  .nav-account-trigger i {
    display: none;
  }

  .zeus-toolbar {
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr);
  }

  .zeus-toolbar .form-hint {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
  }

  .zeus-count-pill {
    justify-self: start;
  }

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

  .ticket-flow li:nth-child(2n) {
    border-right: 0;
  }

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

  .org-detail,
  .draft-panel,
  .admin-panel {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 20px;
  }

  .board-filters,
  .inventory-sidebar,
  .personnel-file {
    position: static;
  }

  .personnel-filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .personnel-filter-kicker,
  .personnel-filter-bar .field-control:first-of-type {
    grid-column: 1 / -1;
  }

  .personnel-filter-kicker {
    padding-right: 0;
    padding-bottom: 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(111, 146, 170, 0.24);
  }
}

@media (max-width: 820px) {
  .admin-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-main-topline {
    flex-direction: column;
  }

  .admin-feedback {
    text-align: left;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 74px;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(7, 11, 18, 0.98);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
  }

  .nav-active-glow {
    display: none;
  }

  .org-chart {
    min-height: auto;
  }

  .structure-canvas {
    display: grid;
    gap: 12px;
    min-width: 0;
    min-height: auto;
    aspect-ratio: auto;
    padding: 10px 0 10px 24px;
    border-top: 1px solid var(--line);
  }

  .structure-canvas svg {
    display: none;
  }

  .structure-canvas .org-node,
  .structure-canvas .org-node.level-2 {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100%;
    min-height: 0;
    transform: none;
    margin-left: calc(var(--node-level) * 18px);
  }

  .structure-canvas .org-node::before {
    display: block;
    top: 50%;
    left: -24px;
    width: 18px;
    height: 1px;
  }

  .org-root-wrap {
    justify-content: flex-start;
    min-height: 116px;
    padding-left: 22px;
  }

  .org-root-wrap::after {
    left: 22px;
    bottom: -34px;
    height: 64px;
  }

  .org-children {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 24px;
    padding-left: 42px;
  }

  .org-children::before {
    top: 0;
    left: 22px;
    right: auto;
    width: 1px;
    height: 100%;
  }

  .org-node::before {
    top: 50%;
    left: -20px;
    width: 20px;
    height: 1px;
  }

  .ledger-row,
  .case-ledger.compact .ledger-row,
  .inventory-row,
  .cart-row,
  .history-row,
  .restricted-addendum,
  .case-file summary,
  .person-row summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .inventory-actions,
  .inventory-meta,
  .inventory-main.has-media,
  .personnel-filter-bar,
  .personnel-entry,
  .personnel-summary,
  .person-extra {
    grid-template-columns: 1fr;
  }

  .personnel-entry {
    gap: 8px;
    min-height: 0;
    padding: 17px 0 17px 14px;
  }

  .personnel-open-file {
    justify-self: start;
  }

  .personnel-file-grid div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .inventory-media {
    width: min(180px, 100%);
  }

  .person-extra {
    padding-left: 0;
  }

  .case-badges {
    justify-content: flex-start;
  }

  .case-file-body {
    grid-template-columns: 1fr;
    margin-left: 0;
    padding-left: 0;
  }

  .org-detail-head,
  .org-detail-ledger {
    grid-template-columns: 1fr;
  }

  .zeus-request summary,
  .zeus-request-body {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .zeus-request-body {
    padding: 0 16px 22px;
  }

  .access-clearance-grid {
    grid-template-columns: 1fr;
  }

  .recruitment-board {
    gap: 30px;
  }

  .recruitment-framed-board {
    grid-template-columns: 1fr;
  }

  .recruitment-side-image {
    display: none;
  }

  .access-clearance-grid div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 219, 146, 0.14);
  }

  .access-denied-header {
    align-items: flex-start;
  }

  .access-denied-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .ledger-label {
    display: block;
  }

  .person-row-details {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .inline-title,
  .ledger-heading,
  .admin-topline,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .cart-panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 112px;
    width: auto;
    max-height: calc(100vh - 138px);
    transform: translateY(calc(100% + 44px));
  }

  body.has-cart-drawer .cart-panel {
    transform: translateY(0);
  }

  .cart-fab {
    top: auto;
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    min-height: 72px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 14px;
    border-right: 1px solid rgba(213, 182, 107, 0.42);
    border-radius: 12px;
    transform: none;
  }

  .cart-fab-meta {
    justify-items: end;
  }

  .drawer-heading-actions .button {
    width: auto;
  }
}

@media (max-width: 620px) {
  :root {
    --container: min(100vw - 28px, 1140px);
  }

  .hero-centered,
  .page-hero,
  .section {
    padding: 38px 0;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.15rem);
  }

  .hero-home h1 {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .hero-actions,
  .form-row,
  .admin-form .form-row,
  .cart-row-controls {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .doctrine-flow,
  .strip-ledger,
  .admin-dashboard-grid,
  .admin-summary,
  .next-steps,
  .ticket-flow,
  .zeus-toolbar,
  .zeus-request-body .form-row {
    grid-template-columns: 1fr;
  }

  .zeus-toolbar .button {
    width: 100%;
  }

  .ticket-flow li {
    border-right: 0;
  }

  .ticket-flow li::after {
    display: none;
  }

  .access-denied-panel {
    min-height: auto;
    padding-bottom: 32px;
  }

  .access-unlock-row {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 28px;
  }

  .drawer-heading-actions .button {
    width: auto;
  }

  .admin-sidebar .admin-tabs {
    grid-template-columns: 1fr;
  }

  .admin-map-node {
    width: 150px;
    font-size: 0.8rem;
  }

  .footer-admin-link {
    margin-left: 0;
  }

  .footer-links {
    margin-left: 0;
    justify-content: center;
  }

  .doctrine-flow li,
  .strip-ledger div,
  .next-label,
  .next-steps a {
    border-right: 0;
  }
}

@media (max-width: 1280px) {
  body[data-page="struktur"] .org-chart {
    overflow-x: visible;
  }

  body[data-page="struktur"] .structure-canvas {
    display: none;
  }

  body[data-page="struktur"] .structure-canvas-notice {
    display: block;
  }

  body[data-page="struktur"] .org-detail {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
