body.wikit-page { background: var(--paper); }
body.wikit-page .system-container {
  min-height: 100vh;
  background: var(--paper);
  padding: 0;
  align-items: stretch;
  display: block;
}
body.wikit-page .system-container .back-link { display: none; }
body.wikit-page .system-content {
  border: none;
  box-shadow: none;
  background: var(--paper);
}
body.wikit-page .system-content > .heading { display: none; }
body.wikit-page .system-content > .content { padding: 0; }

body.wikit-page .system-content .content input[type=text],
body.wikit-page .system-content .content input[type=password],
body.wikit-page .system-content .content input[type=email],
body.wikit-page .system-content .content textarea {
  border: none;
  padding: 0;
  font-size: 15px;
  width: 100%;
  background: transparent;
}
body.wikit-page .system-content .content button,
body.wikit-page .system-content .content input[type=submit] {
  margin: 0;
  background: transparent;
  border: initial;
  padding: initial;
  display: initial;
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
  cursor: initial;
  border-radius: initial;
}
body.wikit-page .system-content .content .btn-primary {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--rad);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: center;
}
body.wikit-page .system-content .content .btn-primary:hover { background: #000; color: var(--paper); }
body.wikit-page .system-content .content .btn-ghost {
  margin: 0;
  padding: 8px 12px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--rad);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 500;
  display: inline-block;
}
body.wikit-page .system-content .content .btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.wikit-scope .h1 {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
.wikit-scope .h2 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}
.wikit-scope .kicker-crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.wikit-scope .kicker-crumb b { color: var(--ink); font-weight: 500; }
.wikit-scope .kicker-crumb .sep { color: var(--rule); margin: 0 6px; }

.wikit-scope .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.wikit-scope .label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.wikit-scope .link-muted {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.wikit-scope .link-muted:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wikit-scope .auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 88px 24px 40px;
}
.wikit-scope .auth-column {
  width: 100%;
  max-width: var(--w-form);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.wikit-scope .auth-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.wikit-scope .auth-mark img { width: 56px; height: 56px; }
.wikit-scope .auth-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}
.wikit-scope .auth-heading .h1 { line-height: 1; }
.wikit-scope .auth-heading .sub { color: var(--muted); font-size: 14px; }

.wikit-scope .form-block {
  border: 1px solid var(--rule);
  border-radius: var(--rad);
  background: var(--paper);
  overflow: hidden;
}
.wikit-scope .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  transition: background 100ms ease;
}
.wikit-scope .form-row + .form-row { border-top: 1px solid var(--rule); }
.wikit-scope .form-row .label { line-height: 1; }
.wikit-scope .form-row input,
.wikit-scope .form-row textarea {
  border: none;
  outline: none;
  padding: 0;
  background: transparent;
  width: 100%;
  color: var(--ink);
  font-size: 15px;
}
.wikit-scope .form-row input::placeholder,
.wikit-scope .form-row textarea::placeholder { color: var(--muted); opacity: 0.55; }
.wikit-scope .form-row:focus-within { background: var(--well); }
.wikit-scope .form-row.disabled { background: var(--well); }
.wikit-scope .form-row.disabled input { color: var(--muted); }

.wikit-scope .btn-primary {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--rad);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 60ms ease;
}
.wikit-scope .btn-primary:hover { background: #000; color: var(--paper); }
.wikit-scope .btn-primary:active { transform: translateY(1px); }
.wikit-scope .btn-primary:disabled {
  background: var(--muted);
  border-color: var(--muted);
  cursor: not-allowed;
}
.wikit-scope .btn-ghost {
  display: inline-block;
  padding: 8px 14px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--rad);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.wikit-scope .btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.wikit-scope .btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 13px;
}

.wikit-scope .action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.wikit-scope .action-inline { display: flex; gap: 10px; align-items: center; }
.wikit-scope .action-inline .dot {
  width: 3px; height: 3px;
  background: var(--rule);
  border-radius: 50%;
}
.wikit-scope .error-inline {
  padding: 10px 14px;
  border: 1px solid var(--danger);
  border-radius: var(--rad);
  color: var(--danger);
  background: transparent;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.wikit-scope .error-inline .marker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wikit-scope.app-shell,
.wikit-scope .app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wikit-scope .app-header {
  border-bottom: 1px solid var(--rule);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
}
.wikit-scope .app-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.wikit-scope .app-header .brand img { width: 22px; height: 22px; }
.wikit-scope .app-header .brand .wordmark {
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.wikit-scope .app-header .divider {
  width: 1px; height: 18px;
  background: var(--rule);
}
.wikit-scope .app-header .path {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.wikit-scope .app-header .path b { color: var(--ink); font-weight: 500; }
.wikit-scope .app-header .path .sep { color: var(--rule); margin: 0 6px; }
.wikit-scope .app-header .spacer { flex: 1; }

.wikit-scope .app-nav {
  border-bottom: 1px solid var(--rule);
  padding: 0 24px;
  display: flex;
  gap: 4px;
  align-items: flex-end;
  min-height: 44px;
  background: var(--paper);
}
.wikit-scope .app-nav a {
  padding: 12px 14px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wikit-scope .app-nav a:hover { color: var(--ink); }
.wikit-scope .app-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 500;
}
.wikit-scope .app-nav a .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  padding: 1px 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.wikit-scope .app-nav a.active .count { color: var(--ink); border-color: var(--ink); }

.wikit-scope .app-main {
  flex: 1;
  width: 100%;
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 32px 24px 96px;
}
.wikit-scope .section-head { margin-bottom: 28px; display: flex; flex-direction: column; gap: 6px; }
.wikit-scope .section-head .h1 { line-height: 1.1; }

.wikit-scope .dl { display: grid; grid-template-columns: 140px 1fr; gap: 0; }
.wikit-scope .dl dt,
.wikit-scope .dl dd {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.wikit-scope .dl dt {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.wikit-scope .dl dd { color: var(--ink); }
.wikit-scope .dl dd .meta { display: block; margin-top: 2px; }
.wikit-scope .dl > *:last-child { border-bottom: 1px solid var(--rule); }
.wikit-scope .dl > *:nth-last-child(2) { border-bottom: 1px solid var(--rule); }

.wikit-scope .profile-head {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 20px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
}
.wikit-scope .profile-head .avatar-big {
  width: 88px; height: 88px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--well);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 28px;
  color: var(--muted);
  overflow: hidden;
}
.wikit-scope .profile-head .avatar-big img {
  width: 100%; height: 100%; object-fit: cover;
}
.wikit-scope .profile-head .id { display: flex; flex-direction: column; gap: 6px; }
.wikit-scope .profile-head .id .name {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.wikit-scope .profile-head .actions { display: flex; gap: 8px; }

@media (max-width: 720px) {
  .wikit-scope .profile-head {
    grid-template-columns: 60px 1fr;
    grid-template-areas: "avatar id" "actions actions";
    text-align: left;
    gap: 12px 14px;
  }
  .wikit-scope .profile-head .avatar-big {
    grid-area: avatar;
    width: 60px;
    height: 60px;
    font-size: 22px;
  }
  .wikit-scope .profile-head .id {
    grid-area: id;
    align-self: center;
  }
  .wikit-scope .profile-head .id .name { font-size: 22px; }
  .wikit-scope .profile-head .actions {
    grid-area: actions;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .wikit-scope .dl { grid-template-columns: 1fr; gap: 0; }
  .wikit-scope .dl dt { padding-bottom: 2px; border-top: 1px solid var(--rule); }
  .wikit-scope .dl dd { padding-top: 2px; padding-bottom: 14px; border-top: none; }
  .wikit-scope .app-header .path { display: none; }
}

