:root {
  color-scheme: light;
  --ink: #1c1c2e;
  --muted: #64648a;
  --line: #dde0ec;
  --panel: #f7f8fc;
  --brand: #16213e;
  --brand-2: #c84b11;
  --brand-3: #e07b50;
  --deep: #0d0d1a;
  --blue-2: #1c2d5e;
  --link: #c84b11;
  --soft: #ecedfa;
  --ok: #2e7d32;
  --fail: #a12323;
  --warn: #9a6a00;
  --park: #596579;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--panel);
}

.admin-topbar {
  align-items: center;
  background: #070914;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .78);
  display: flex;
  font-size: .78rem;
  gap: 12px;
  min-height: 28px;
  padding: 4px 18px;
  position: sticky;
  top: 0;
  z-index: 80;
}

.admin-topbar a {
  color: #fff;
}

.admin-topbar span {
  color: var(--brand-3);
  font-weight: 700;
}

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

a:hover {
  color: var(--brand-3);
  text-decoration: underline;
}

.site-header {
  background: var(--brand);
  border-bottom: 3px solid var(--brand-2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
  position: sticky;
  top: 0;
  z-index: 10;
}

.has-admin-bar .site-header {
  top: 28px;
}

.bar,
.wrap {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
}

.brand {
  border-right: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0;
  margin-right: 10px;
  padding: 13px 18px 13px 0;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: #fff;
  text-decoration: none;
}

.brand em {
  color: var(--brand-3);
  font-style: normal;
}

.brand small {
  color: rgba(255, 255, 255, .58);
  font-size: .74rem;
  font-weight: 600;
  margin-left: 2px;
}

.main-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: center;
  overflow: visible;
}

.main-nav a,
.nav-drop-trigger {
  border-bottom: 3px solid transparent;
  color: rgba(255, 255, 255, .68);
  display: block;
  font-size: .86rem;
  margin-bottom: -3px;
  text-decoration: none;
  padding: 14px 10px;
  white-space: nowrap;
}

.main-nav a:hover,
.nav-drop-trigger:hover {
  color: #fff;
  text-decoration: none;
}

.main-nav a.active,
.nav-drop-trigger.active {
  background: transparent;
  border-bottom-color: var(--brand-3);
  color: var(--brand-3);
}

.nav-dropdown {
  position: relative;
}

.nav-drop-trigger::after {
  content: " v";
  font-size: .75rem;
}

.nav-drop-menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgb(23 32 42 / 14%);
  display: none;
  left: 0;
  min-width: 260px;
  max-height: 68vh;
  overflow: auto;
  padding: 8px;
  position: absolute;
  top: 100%;
  z-index: 30;
}

.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown:focus-within .nav-drop-menu {
  display: block;
}

.nav-drop-menu a {
  border-bottom: 0;
  color: var(--ink);
  display: block;
  margin-bottom: 0;
  padding: 7px 8px;
  white-space: nowrap;
}

.nav-drop-menu a:hover {
  background: var(--soft);
  color: var(--brand-2);
}

.search-box {
  margin-left: auto;
  display: flex;
  gap: 6px;
  padding-left: 12px;
}

.search-box input {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
  min-width: 0;
  width: 190px;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, .58);
}

input,
button,
select {
  font: inherit;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
}

button,
.button {
  border: 1px solid var(--brand-2);
  background: var(--brand-2);
  color: #fff;
  border-radius: 6px;
  padding: 7px 10px;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--brand-3);
  border-color: var(--brand-3);
  color: #fff;
  text-decoration: none;
}

.button.secondary {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.wrap {
  padding: 28px 0 48px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 28px;
}

.subnav {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  position: sticky;
  top: 76px;
  align-self: start;
}

.subnav h2 {
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.subnav a {
  display: block;
  padding: 5px 0;
}

.subnav a.active {
  color: var(--brand);
  font-weight: 700;
}

.manual-status-strip {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-2);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 9px 12px;
}

.manual-status-strip strong {
  color: var(--brand);
}

.maintenance-login {
  background: #f2f4f8;
}

.login-shell {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.login-box {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 50px rgba(22, 33, 62, .12);
  display: grid;
  gap: 12px;
  max-width: 360px;
  padding: 24px;
  width: 100%;
}

.login-box h1 {
  margin: 0;
}

.login-box p {
  color: var(--muted);
  margin: -6px 0 4px;
}

.login-box label {
  color: var(--muted);
  display: grid;
  font-size: .84rem;
  gap: 4px;
}

.login-box input {
  width: 100%;
}

.login-error {
  background: #fff0f0;
  border: 1px solid #f3c1c1;
  color: var(--fail);
  padding: 8px 10px;
}

.subnav-scroll {
  padding-right: 4px;
}

.nav-count {
  color: var(--muted);
  font-size: .8rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: .9rem;
  margin: 0 0 10px;
}

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

.crumb-menu {
  position: relative;
  display: inline-block;
}

.crumb-menu summary {
  cursor: pointer;
  list-style: none;
  color: var(--brand);
}

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

.crumb-menu summary::after {
  content: " v";
  color: var(--muted);
  font-size: .75rem;
}

.crumb-menu-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(16, 24, 40, .13);
}

.crumb-menu-list a {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
}

.crumb-menu-list a.active {
  background: var(--soft);
  font-weight: 700;
}

.hero {
  background: linear-gradient(135deg, var(--deep) 0%, var(--brand) 56%, var(--blue-2) 100%);
  border-bottom: 3px solid var(--brand-2);
  color: #fff;
  padding: 72px 0 58px;
}

.home-hero .bar {
  justify-content: center;
}

.home-hero-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.lairu-logo {
  display: inline-grid;
  gap: 4px;
  margin: 0 auto 22px;
}

.lairu-logo span {
  color: #fff;
  font-size: clamp(3.8rem, 11vw, 8rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: .86;
  text-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

.lairu-logo em {
  color: var(--brand-3);
  font-style: normal;
}

.lairu-logo small {
  color: rgba(255, 255, 255, .76);
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, .74);
  font-size: 1.1rem;
}

.hero blockquote {
  color: #fff;
  margin: 28px auto 0;
  max-width: 760px;
  padding: 0;
  font-size: 1.1rem;
}

.hero cite {
  color: rgba(255, 255, 255, .55);
  display: block;
  font-size: .85rem;
  font-style: normal;
  margin-top: 6px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 4px;
}

.big-pill {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: 1.05rem;
  font-weight: 800;
  min-height: 48px;
  padding: 0 26px;
  text-decoration: none;
  transition: opacity .15s, transform .15s, border-color .15s;
}

.big-pill:hover {
  opacity: .9;
  text-decoration: none;
  transform: translateY(-1px);
}

.version-pill {
  background: var(--brand-2);
  color: #fff;
}

.download-pill {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, .36);
  color: #fff;
}

.download-pill:hover {
  border-color: rgba(255, 255, 255, .8);
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin: 10px 0 24px;
}

.compact-link {
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  text-decoration: none;
}

.card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: #fff;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.meta {
  color: var(--muted);
  font-size: .9rem;
}

.page-title {
  margin-top: 0;
  font-size: 2.2rem;
}

.summary {
  color: var(--muted);
  font-size: 1.05rem;
}

.body-html p {
  margin: 0 0 1em;
}

.body-html code,
.summary code,
.note code,
.warning code,
.parameter-list code,
.inline-code {
  background: #eef5fa;
  border: 1px solid #cbdbe7;
  border-radius: 4px;
  color: #0f3d5f;
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  font-weight: 700;
  line-height: 1.35;
  padding: 1px 6px;
  vertical-align: baseline;
}

.parameter-list {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 12px 0 18px;
  overflow: hidden;
}

.parameter-list dt,
.parameter-list dd {
  margin: 0;
  padding: 9px 12px;
}

.parameter-list dt {
  background: #f5f8fb;
  border-top: 1px solid var(--line);
  font-weight: 800;
}

.parameter-list dt:first-child {
  border-top: 0;
}

.parameter-list dd {
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.example,
.answer {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 18px 0;
  background: #fff;
}

.example h3,
.answer h3 {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}

.code-block {
  border-radius: 6px;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.code-toolbar {
  align-items: center;
  background: #0c151c;
  border-bottom: 1px solid #253746;
  display: flex;
  justify-content: flex-end;
  padding: 6px 8px;
}

.copy-code-button {
  background: transparent;
  border: 1px solid #3f596c;
  border-radius: 5px;
  color: #d9e7f1;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
}

.copy-code-button:hover {
  background: #162838;
  border-color: #6f8ca3;
  color: #fff;
}

.copy-pop {
  background: var(--brand-2);
  border-radius: 5px;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  opacity: 0;
  padding: 6px 9px;
  pointer-events: none;
  position: absolute;
  right: 10px;
  top: 42px;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 2;
}

.copy-pop.show {
  opacity: 1;
  transform: translateY(0);
}

pre {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  background: #101820;
  color: #f7fbff;
  border-radius: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92rem;
}

.note {
  color: var(--muted);
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.run-panel {
  align-items: start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px 12px;
}

.run-output {
  border-radius: 4px;
  min-height: 42px;
  white-space: pre-wrap;
}

.comments-section {
  margin: 26px 0 18px;
}

.comments-bar {
  background: var(--brand);
  border-bottom: 3px solid var(--brand-2);
  border-radius: 6px 6px 0 0;
  color: #fff;
  font-weight: 800;
  padding: 9px 12px;
}

.manual-comment {
  border-left: 4px solid var(--brand);
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.manual-comment + .manual-comment {
  border-top: 1px solid var(--line);
}

.manual-comment:last-child {
  border-radius: 0 0 6px 6px;
}

.manual-comment strong {
  color: var(--brand-2);
  display: block;
  font-size: .9rem;
  margin-bottom: 5px;
}

.qa-shell .site-header {
  border-bottom-color: var(--brand-2);
}

.question-list .card {
  border-left: 4px solid var(--brand-2);
}

.warning {
  border-left: 4px solid var(--warn);
  background: #fff8e1;
  padding: 10px 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  min-height: 24px;
  line-height: 1;
  padding: 3px 9px;
  font-size: .8rem;
  white-space: nowrap;
}

.implemented { background: var(--ok); }
.failing { background: var(--fail); }
.incomplete { background: var(--warn); }
.not-started { background: #687585; }
.parked { background: var(--park); }
.target { background: var(--link); }

.progress-row {
  display: grid;
  grid-template-columns: 150px 1fr 120px;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.progress-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 14px 0 28px;
}

.progress-chip {
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: 2px;
  min-height: 88px;
  padding: 8px;
  position: relative;
}

.progress-chip strong {
  font-size: .9rem;
  line-height: 1.25;
}

.progress-chip small,
.progress-chip em {
  color: var(--muted);
  font-size: .78rem;
  font-style: normal;
}

.status-dot {
  border-radius: 999px;
  display: block;
  height: 8px;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 8px;
}

.passing { background: var(--ok); }
.not-run { background: #687585; }
.stub { background: #755a15; }
.untested { background: #687585; }

.progress-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.status-dashboard {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 18px;
  grid-template-columns: 160px minmax(0, 1fr);
  margin: 18px 0 20px;
  padding: 14px;
}

.status-ring-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.status-ring {
  --pct: 0;
  align-items: center;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at center, #fff 0 56%, transparent 57%),
    conic-gradient(var(--ok) calc(var(--pct) * 1%), #e4e9ee 0);
  border-radius: 50%;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  text-align: center;
  text-decoration: none;
}

.status-ring-large {
  width: 150px;
}

.status-ring-small {
  width: 92px;
}

.ring-value {
  font-weight: 800;
  line-height: 1;
}

.ring-label {
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.1;
  max-width: 76px;
}

.progress-category {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  display: block;
  min-height: 120px;
  padding: 12px;
  position: relative;
  text-decoration: none;
}

.progress-category h2 {
  font-size: 1rem;
  margin: 0 0 8px;
}

.progress-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.progress-counts span,
.feature-test {
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: .76rem;
  padding: 2px 7px;
}

.progress-counts .count-total {
  background: #e8edf1;
  color: var(--ink);
}

.progress-counts .count-passing {
  background: #e8f4ea;
  color: var(--ok);
}

.progress-counts .count-failing {
  background: #fae9e9;
  color: var(--fail);
}

.progress-counts .count-stub {
  background: #f6eedc;
  color: #755a15;
}

.progress-counts .count-not-run {
  background: #edf0f3;
  color: #4f5965;
}

.progress-popup {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 34px rgb(23 32 42 / 16%);
  display: none;
  left: 12px;
  max-height: 360px;
  overflow: auto;
  padding: 8px;
  position: absolute;
  right: 12px;
  top: calc(100% - 8px);
  z-index: 20;
}

.progress-category:hover .progress-popup,
.progress-category:focus .progress-popup {
  display: block;
}

.feature-list {
  display: grid;
  gap: 6px;
}

.feature-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  border-left: 4px solid transparent;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, .8fr);
  padding: 6px 0 6px 8px;
}

.feature-row.state-passing { border-left-color: var(--ok); }
.feature-row.state-failing { border-left-color: var(--fail); }
.feature-row.state-stub { border-left-color: #755a15; }
.feature-row.state-not-run { border-left-color: #687585; }

.feature-row:last-child {
  border-bottom: 0;
}

.feature-row small {
  color: var(--muted);
}

.feature-row .status-pill {
  justify-self: start;
}

.feature-tests {
  color: var(--muted);
  font-size: .8rem;
  justify-self: end;
}

.compat-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.compat-row {
  border: 1px solid var(--line);
  border-left: 5px solid var(--warn);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.compat-row .compat-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.compat-row h3 {
  margin: 0;
  font-size: 1.05rem;
}

.compat-row p {
  margin: 4px 0;
}

.compat-detail {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.compat-detail div {
  background: var(--panel);
  border-radius: 4px;
  padding: 8px;
}

.source-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  margin: 0;
  min-height: calc(100vh - 80px);
  width: 100%;
}

.admin-main {
  min-width: 0;
  padding: 12px 16px 28px;
}

.admin-main .page-title {
  font-size: 1.45rem;
  line-height: 1.15;
  margin: 0 0 10px;
}

.admin-nav {
  align-self: start;
  background: #10172a;
  border-right: 1px solid rgba(255, 255, 255, .1);
  display: grid;
  gap: 2px;
  min-height: calc(100vh - 80px);
  padding: 8px;
  position: sticky;
  top: 80px;
}

.admin-nav a {
  color: rgba(255, 255, 255, .78);
  padding: 7px 8px;
  text-decoration: none;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  text-decoration: none;
}

.admin-form button,
.admin-inline-form button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
}

.admin-form {
  display: grid;
  gap: 8px;
  margin: 14px 0 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.admin-form textarea {
  min-height: 96px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-section-head,
.project-head,
.project-meta-row,
.project-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-section-head,
.project-head {
  justify-content: space-between;
  margin-bottom: 8px;
}

.project-actions a,
.project-actions code,
.project-meta-row span {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
  padding: 4px 7px;
}

.project-list.compact {
  display: grid;
  gap: 6px;
}

.project-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 1.2fr) minmax(90px, .5fr) minmax(110px, .7fr) 82px 70px 124px;
  padding: 7px 9px;
}

.project-name {
  font-weight: 800;
}

.mini-bars {
  background: #d7dbe8;
  border: 1px solid var(--line);
  display: flex;
  height: 9px;
  overflow: hidden;
}

.mini-bars i,
.mini-bars b {
  display: block;
  height: 100%;
}

.mini-bars i {
  background: var(--ok);
}

.mini-bars b {
  background: var(--fail);
}

.project-workbench {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 10px;
  position: relative;
}

.mapping-canvas {
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: 0;
}

.mapping-canvas line {
  opacity: .78;
  stroke: var(--brand-2);
  stroke-linecap: round;
  stroke-width: 2;
}

.tree-panel {
  background: #fff;
  border: 1px solid var(--line);
  min-width: 0;
  position: relative;
  z-index: 1;
}

.tree-panel-head {
  align-items: center;
  background: #f7f8fc;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 36px;
  padding: 6px 8px;
}

.tree-panel-head h2 {
  font-size: .96rem;
  margin: 0;
}

.tree-tools {
  align-items: center;
  display: flex;
  gap: 4px;
}

.tree-list {
  display: grid;
  gap: 4px;
  padding: 6px;
}

.tree-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 32px;
  padding: 5px 6px;
}

.tree-row > span {
  display: grid;
  min-width: 0;
}

.tree-row b,
.tree-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-row b {
  font-size: .86rem;
}

.tree-row small {
  color: var(--muted);
  font-size: .72rem;
}

.tree-category {
  background: #edf1fa;
  border-color: #cfd8ec;
}

.tree-indent {
  margin-left: 14px;
}

.tree-indent-deep {
  margin-left: 28px;
}

.map-row {
  cursor: crosshair;
  transition: box-shadow .16s ease, transform .16s ease, background-color .16s ease;
}

.map-row:hover,
.map-row.is-selected {
  background: #fff8f4;
  box-shadow: inset 0 0 0 2px var(--brand-3);
}

.map-row.is-linked small::after {
  color: var(--brand-2);
  content: " mapped";
  font-weight: 700;
}

.map-row.is-linked-hover {
  animation: admin-map-pulse .9s ease-in-out infinite alternate;
  background: #fff1eb;
}

@keyframes admin-map-pulse {
  from { box-shadow: inset 0 0 0 1px var(--brand-3), 0 0 0 rgba(200, 75, 17, 0); }
  to { box-shadow: inset 0 0 0 2px var(--brand-2), 0 0 18px rgba(200, 75, 17, .28); }
}

.row-actions {
  margin: 0;
}

.icon-action,
.tree-add summary {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  line-height: 1;
  list-style: none;
  padding: 0;
  width: 24px;
}

.icon-action.danger {
  color: var(--fail);
}

.tree-add {
  position: relative;
}

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

.admin-inline-form {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(12, 18, 36, .18);
  display: grid;
  gap: 6px;
  min-width: 300px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: 30px;
  z-index: 40;
}

.admin-inline-form input,
.admin-inline-form textarea,
.admin-inline-form select {
  border: 1px solid var(--line);
  font: inherit;
  padding: 6px 7px;
  width: 100%;
}

.admin-inline-form textarea {
  min-height: 70px;
}

.admin-cockpit {
  background: radial-gradient(circle at 24% 18%, rgba(58, 134, 255, .24), transparent 34%), #080b16;
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  margin: 0 0 12px;
  min-height: 180px;
  overflow: hidden;
}

.admin-cockpit canvas {
  display: block;
  height: 180px;
  width: 100%;
}

.admin-cockpit-copy {
  align-self: center;
  padding: 18px;
}

.admin-cockpit h1 {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  line-height: 1;
  margin: 0 0 8px;
}

.admin-cockpit p {
  color: rgba(255, 255, 255, .76);
  font-size: 1.05rem;
}

.admin-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-metrics span {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  padding: 8px 10px;
}

.admin-map-grid,
.admin-forms-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 22px 0;
}

.admin-map-grid > section,
.admin-forms-grid > form {
  background: #fff;
  border: 1px solid var(--line);
  padding: 16px;
}

.mapping-list {
  display: grid;
  gap: 8px;
}

.mapping-link {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr);
}

.mapping-link b {
  background: linear-gradient(90deg, var(--blue-2), var(--brand-2));
  display: block;
  height: 2px;
}

.mapping-link span {
  background: var(--soft);
  padding: 7px 9px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  vertical-align: top;
}

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

.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 7px 0;
}

.source-browser {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.source-pane {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.source-pane h2,
.source-pane h3 {
  margin: 0 0 8px;
  font-size: .95rem;
}

.source-pane h3 {
  margin-top: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .78rem;
}

.source-pane a {
  display: block;
  padding: 5px 6px;
  border-radius: 5px;
  text-decoration: none;
}

.source-pane a.active {
  background: #fff;
  color: var(--brand);
  font-weight: 700;
}

.source-main {
  min-width: 0;
}

.numbered-code {
  padding: 0 0 20px;
}

.numbered-code code {
  display: table;
  min-width: 100%;
}

.code-line {
  display: table-row;
}

.line-no,
.line-code {
  display: table-cell;
  padding: 0 12px;
}

.line-no {
  user-select: none;
  min-width: 4.5rem;
  text-align: right;
  color: #8ba3b4;
  background: #0c151c;
  border-right: 1px solid #253746;
}

.line-code {
  white-space: pre;
}

.release-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
  background: #fff;
}

.footer {
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 16px 0 24px;
}

.footer .bar {
  justify-content: center;
  padding: 0;
  text-align: center;
}

@media (max-width: 760px) {
  .bar {
    align-items: flex-start;
    flex-direction: column;
  }
  .search-box {
    margin-left: 0;
    width: 100%;
  }
  .search-box input {
    flex: 1 1 auto;
    width: auto;
  }
  .search-box button {
    flex: 0 0 auto;
  }
  .layout,
  .source-browser,
  .progress-row,
  .status-dashboard,
  .run-panel,
  .feature-row,
  .admin-cockpit,
  .admin-map-grid,
  .admin-forms-grid,
  .admin-shell,
  .project-workbench,
  .project-row {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    min-height: 0;
    position: static;
  }
  .admin-inline-form {
    left: 0;
    min-width: min(300px, calc(100vw - 48px));
    right: auto;
  }
  .subnav {
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding-left: 0;
    padding-bottom: 12px;
    position: static;
    max-height: none;
  }
}
