:root {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  color: #18263e;
  background: #f4f6fa;
  font-size: 16px;
  line-height: 1.55;
  color-scheme: light;
  --ink: #18263e;
  --muted: #5b6980;
  --navy: #14223b;
  --gold: #cda74e;
  --line: #dce2ec;
  --surface: #fff;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
a {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: #315f96;
  text-underline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1rem;
}
small,
.meta,
.muted {
  color: var(--muted);
  font-size: 0.875rem;
}
.eyebrow {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.stack {
  display: grid;
  gap: 1rem;
}
.stack-sm {
  display: grid;
  gap: 0.55rem;
}
.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.grow {
  flex: 1;
  min-width: 0;
}
.break {
  overflow-wrap: anywhere;
}
.btn {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 650;
  padding: 0.6rem 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn:hover:not(:disabled) {
  background: #edf1f7;
  border-color: #b6c2d2;
}
.btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.btn.primary:hover:not(:disabled) {
  background: #263b5c;
}
.btn.danger {
  color: #9b2837;
  border-color: #d5a9af;
}
.btn.ghost {
  background: transparent;
}
.btn.compact {
  min-height: 36px;
  padding: 0.4rem 0.75rem;
}
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  color: #e9eef7;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  border: 1px solid #d9b75e;
  background: var(--gold);
  color: #17223a;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  font-weight: 850;
  font-size: 1.5rem;
  flex: 0 0 auto;
}
.brand strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}
.brand small {
  display: block;
  color: #b8c4d8;
  font-size: 0.875rem;
}
.sidebar nav {
  display: grid;
  gap: 0.4rem;
}
.nav-button {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 45px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #c4cfe0;
  text-align: left;
  font-weight: 600;
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
}
.nav-button:hover {
  background: #223653;
  color: #fff;
}
.nav-button.active {
  background: #283b58;
  border-color: #3c506d;
  color: #fff;
}
.nav-icon {
  font-size: 1.1rem;
  color: #c4aa6a;
  width: 21px;
  flex: 0 0 auto;
}
.sidebar-footer {
  margin-top: auto;
  color: #aebbd0;
  font-size: 0.875rem;
  padding: 0.7rem;
}
.main-area {
  min-width: 0;
}
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 2rem;
}
.operator {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.operator strong {
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
.operator span {
  font-size: 0.875rem;
  color: var(--muted);
}
.workspace {
  padding: 2rem;
  max-width: 1500px;
  margin: auto;
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-heading p {
  margin-top: 0.6rem;
  max-width: 64ch;
  color: var(--muted);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  min-width: 0;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.panel-header p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.notice {
  border: 1px solid #c8d4e4;
  background: #edf3fb;
  color: #283f61;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
.notice.warning {
  background: #fff8e5;
  border-color: #e5d4a2;
  color: #735b20;
}
.notice.success {
  background: #eaf5ef;
  border-color: #bdd8c8;
  color: #275c40;
}
.notice.error,
.form-error {
  color: #8f2332;
  background: #fff0f2;
  border: 1px solid #e4bcc4;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.form-error:empty {
  display: none;
}
.loading {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}
.empty {
  border: 1px dashed #cbd4e2;
  border-radius: 10px;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stat p {
  font-size: 0.875rem;
  color: var(--muted);
}
.stat strong {
  display: block;
  font-size: 2.1rem;
  letter-spacing: -0.04em;
  margin-top: 0.35rem;
}
.pill {
  font-size: 0.875rem;
  line-height: 1.3;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  border: 1px solid #d7deea;
  background: #edf1f7;
  color: #41536c;
  display: inline-flex;
  align-items: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.pill.good {
  background: #e9f4ee;
  color: #276342;
  border-color: #c7dfd0;
}
.pill.warn {
  background: #fff5db;
  color: #7b611c;
  border-color: #e8d7a4;
}
.pill.bad {
  background: #fcecef;
  color: #913345;
  border-color: #e8c6ce;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.field {
  display: grid;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 0;
}
.field.full {
  grid-column: 1/-1;
}
.field small {
  font-weight: 400;
}
.input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #bdc8d7;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font-size: 1rem;
}
textarea {
  resize: vertical;
  min-height: 88px;
}
input[type='checkbox'] {
  width: 19px;
  height: 19px;
  accent-color: #263c5e;
  flex: 0 0 auto;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.875rem;
  cursor: pointer;
}
.check input {
  margin: 0.17rem 0 0;
}
.source-list {
  display: grid;
  gap: 0.85rem;
}
.source {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}
.source p,
.source a {
  font-size: 0.875rem;
  margin-top: 0.35rem;
}
.source p {
  color: var(--muted);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
legend {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.bot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.bot-form {
  display: grid;
  gap: 1rem;
}
.bot-details {
  display: grid;
  gap: 0.4rem;
  font-size: 0.875rem;
  margin: 1rem 0;
}
.bot-details div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.bot-details dt {
  color: var(--muted);
}
.bot-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 1rem 0;
}
.list {
  display: grid;
  gap: 0.8rem;
}
.list-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 1rem;
  min-width: 0;
}
.list-item p {
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
}
.list-item .meta {
  margin-top: 0.5rem;
}
.search-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: end;
}
.search-form .field {
  flex: 1;
  min-width: 150px;
}
.users-layout {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.user-button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.9rem;
  display: grid;
  gap: 0.25rem;
  min-height: 66px;
}
.user-button:hover,
.user-button.selected {
  background: #edf3fb;
  border-color: #8ca3c2;
}
.user-button strong {
  font-size: 0.95rem;
}
.user-button span {
  font-size: 0.875rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1.1rem;
  margin: 1rem 0;
  font-size: 0.875rem;
}
.detail-grid dt {
  color: var(--muted);
}
.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.note {
  border-left: 3px solid #c6d2e3;
  padding: 0.65rem 1rem;
  background: #f6f8fc;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.note p + p {
  margin-top: 0.5rem;
}
.report-evidence {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}
.report-evidence summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 650;
}
.report-evidence pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.875rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f4f6fa;
  border-radius: 7px;
  padding: 0.9rem;
  margin: 1rem 0;
}
.report-evidence .list-item {
  background: #fafbfd;
}
.audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.audit-row:last-child {
  border: 0;
}
.audit-row p {
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
}
.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.catalog-badge-art {
  display: block;
  object-fit: contain;
}
.badge-editor {
  min-width: 0;
}
.badge-editor > summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.5rem 0;
}
.badge-editor > form {
  margin-top: 0.7rem;
}
.badge-artwork-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
}
.badge-artwork-choice {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 0.875rem;
}
.badge-artwork-choice:has(input:checked) {
  border-color: var(--gold);
  background: #f0f4fa;
}
.badge-artwork-choice input {
  flex: 0 0 auto;
}
.catalog-badge {
  font-size: 1.5rem;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #e8edf6;
  color: #344f79;
}
.catalog-badge[data-badge='admin'] {
  background: #eee7f7;
  color: #67429a;
}
.catalog-badge[data-badge='notable'],
.catalog-badge[data-badge='founder'] {
  background: #fff1ce;
  color: #8a641d;
}
.catalog-badge[data-badge='supporter'] {
  background: #f7e8ed;
  color: #a14f68;
}
.catalog-badge[data-badge='creator'] {
  background: #f0e8f6;
  color: #7c4b9b;
}
.catalog-badge[data-badge='helper'] {
  background: #e2f1e9;
  color: #36775f;
}
.catalog-badge[data-badge='developer'] {
  background: #e4eef6;
  color: #326a93;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: radial-gradient(ellipse at top, #233a60, #101c31 70%);
}
.login-card {
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: 18px;
  width: min(100%, 480px);
  padding: 2.25rem;
  display: grid;
  gap: 1.2rem;
  box-shadow: 0 24px 80px #08101d40;
}
.login-card .brand-mark {
  margin-bottom: 0.4rem;
}
.login-card h1 {
  font-size: 2rem;
}
.login-card > p:not(.eyebrow) {
  color: var(--muted);
}
.login-card .btn {
  margin-top: 0.4rem;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.toolbar select {
  width: auto;
  max-width: 100%;
}
.section-title {
  margin: 1.5rem 0 0.8rem;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.subtle-link {
  font-size: 0.875rem;
}
.preview {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}
.preview .list-item a {
  font-weight: 650;
  overflow-wrap: anywhere;
}
.news-preview {
  min-width: 0;
}
.news-description {
  line-height: 1.6;
  overflow-wrap: anywhere;
  margin: 0.65rem 0 0;
}
.news-picture {
  margin: 0.8rem 0;
}
.news-picture img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 6px;
  background: #f1f4f7;
}
.news-picture figcaption {
  margin-top: 0.3rem;
}
.confirmation {
  border: 1px solid #e4c3c8;
  background: #fff6f7;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}
.confirmation h3 {
  color: #8f2332;
}
.confirmation p {
  font-size: 0.875rem;
  margin: 0.5rem 0 1rem;
}
.wordmark {
  letter-spacing: -0.035em;
}
.environment {
  font-size: 0.875rem;
  font-weight: 600;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .workspace {
    padding: 1.5rem;
  }
  .topbar {
    padding: 1rem 1.5rem;
  }
  .bot-grid {
    grid-template-columns: 1fr;
  }
  .badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .users-layout {
    grid-template-columns: 1fr;
  }
  .users-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    min-height: auto;
    padding: 1rem;
    gap: 1rem;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 0.35rem;
    padding-bottom: 0.15rem;
  }
  .nav-button {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 42px;
    padding: 0.55rem 0.65rem;
  }
  .sidebar-footer {
    display: none;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }
  .brand strong {
    font-size: 1.2rem;
  }
  .topbar {
    padding: 1rem;
    gap: 0.7rem;
  }
  .workspace {
    padding: 1rem;
    gap: 1.2rem;
  }
  .panel {
    padding: 1rem;
  }
  .page-heading {
    gap: 0.8rem;
  }
  .audit-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .audit-row time {
    color: var(--muted);
    font-size: 0.875rem;
  }
}
@media (max-width: 440px) {
  .form-grid,
  .badge-grid,
  .users-list {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 0.7rem;
  }
  .stat {
    padding: 1rem;
  }
  .stat strong {
    font-size: 1.7rem;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .login-card {
    padding: 1.5rem;
  }
  .topbar .row {
    gap: 0.5rem;
  }
  .btn {
    padding: 0.6rem 0.75rem;
  }
  .panel-header h2 {
    overflow-wrap: anywhere;
  }
}
