@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700;8..60,900&display=swap');

    [hidden] {
      display: none !important;
    }

    :root {
      --bg-primary: #0a1322;
      --bg-secondary: #0e1a2f;
      --bg-tertiary: #12203a;
      --bg-elevated: #16263f;

      --text-primary: #eef3fb;
      --text-secondary: #a4b5cf;
      --text-muted: #6d7f9c;

      --accent-primary: #8aa7cc;
      --accent-secondary: #5f7ba6;
      --accent-success: #6fae86;
      --accent-warning: #c9a24b;
      --accent-danger: #c06a71;

      --navy: #0a1322;
      --steel: #a8b9d4;
      --brass: #c1a45c;
      --brass-deep: #8f7437;
      --silver: #cbd6e6;
      --paper: #f3f5f8;

      --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

      --border-subtle: rgba(160, 180, 210, 0.14);
      --border-medium: rgba(160, 180, 210, 0.26);

      --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
      --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.45);
      --shadow-lg: 0 10px 34px rgba(0, 0, 0, 0.55);
      --shadow-glow: 0 0 0 1px rgba(193, 164, 92, 0.18), 0 2px 14px rgba(0, 0, 0, 0.45);

      --radius-sm: 6px;
      --radius-md: 9px;
      --radius-lg: 12px;
      --radius-xl: 16px;

      --transition-fast: 140ms ease;
      --transition-base: 220ms ease;
      --transition-slow: 320ms ease;
    }

    body[data-agency="doj"] {
      --agency-accent: #a05246;
      --agency-accent-soft: rgba(160, 82, 70, 0.14);
      --agency-brush: #b8894f;
    }

    body[data-agency="bcso"] {
      --agency-accent: #8f9c6f;
      --agency-accent-soft: rgba(143, 156, 111, 0.14);
      --agency-brush: #c9a45c;
    }

    body:not([data-agency]) {
      --agency-accent: var(--brass);
      --agency-accent-soft: rgba(193, 164, 92, 0.12);
      --agency-brush: var(--brass);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    html {
      color-scheme: dark;
    }

    body {
      display: flex;
      flex-direction: column;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      background:
        radial-gradient(ellipse 90% 55% at 50% -12%, rgba(46, 66, 99, 0.35), transparent 60%),
        linear-gradient(180deg, #0c1626, var(--bg-primary) 34%, #0a1524);
      background-color: var(--bg-primary);
      color: var(--text-primary);
      line-height: 1.6;
      min-height: 100vh;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 0;
      background-image: radial-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
      background-size: 3px 3px;
      opacity: 0.55;
    }

    .app {
      flex: 1 0 auto;
      position: relative;
      z-index: 1;
    }

    /* ---------- Utility bar ---------- */
    .utility-bar {
      background: #070d18;
      border-bottom: 1px solid #1a2b46;
    }

    .utility-inner {
      max-width: 1600px;
      margin: 0 auto;
      padding: 0.32rem 1.5rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1.5rem;
      font-size: 0.6875rem;
      font-weight: 600;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--text-muted);
    }

    .utility-office {
      display: inline-flex;
      align-items: center;
      gap: 0.55rem;
    }

    .utility-office::before {
      content: '';
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--agency-brush, var(--brass));
      box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.4);
    }

    .utility-right {
      display: inline-flex;
      gap: 1.1rem;
    }

    .utility-right a {
      color: var(--text-muted);
      text-decoration: none;
      transition: color var(--transition-fast);
    }

    .utility-right a:hover,
    .utility-right a:focus-visible {
      color: var(--silver);
    }

    /* Official notice strip */
    .notice-bar {
      max-width: 1600px;
      margin: 1.25rem auto 0;
      padding: 0 1.5rem;
    }

    .notice-inner {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      font-size: 0.75rem;
      color: var(--text-secondary);
      border: 1px solid var(--border-subtle);
      border-left: 3px solid var(--agency-brush, var(--brass));
      background: var(--bg-tertiary);
      padding: 0.55rem 0.9rem;
      border-radius: var(--radius-sm);
    }

    /* ---------- Topbar ---------- */
    .topbar {
      position: sticky;
      top: 0;
      z-index: 1000;
      background: rgba(10, 18, 33, 0.92);
      backdrop-filter: blur(14px) saturate(140%);
      border-bottom: 1px solid var(--border-subtle);
      box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
    }

    .topbar::after {
      content: '';
      display: block;
      height: 2px;
      background: linear-gradient(90deg, var(--agency-brush, var(--brass)), rgba(193, 164, 92, 0.12) 38%, transparent 70%);
    }

    .topbar-inner {
      max-width: 1600px;
      margin: 0 auto;
      padding: 0.65rem 1.5rem;
      display: flex;
      align-items: center;
      gap: 2rem;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 0.8rem;
      color: var(--text-primary);
      text-decoration: none;
      transition: opacity var(--transition-fast);
    }

    .brand:hover {
      opacity: 0.92;
    }

    .brand-logo {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: radial-gradient(circle at 32% 28%, #22334f, #0d1626 72%);
      border: 1px solid rgba(193, 164, 92, 0.34);
      box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08), 0 0 0 4px rgba(4, 9, 18, 0.55), 0 2px 8px rgba(0, 0, 0, 0.5);
      display: grid;
      place-items: center;
      overflow: hidden;
      flex: 0 0 auto;
    }

    .brand-logo img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      position: relative;
      z-index: 1;
    }

    .brand-text h1 {
      font-size: 1.05rem;
      font-weight: 700;
      letter-spacing: 0.01em;
      color: var(--text-primary);
    }

    .brand-text p {
      font-size: 0.72rem;
      color: var(--text-muted);
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .nav-tabs {
      display: flex;
      gap: 0.4rem;
      margin-left: auto;
      flex-wrap: wrap;
    }

    .nav-tab {
      padding: 0.5rem 1rem;
      border-radius: var(--radius-sm);
      text-decoration: none;
      white-space: nowrap;
      border: 1px solid transparent;
      background: transparent;
      color: var(--text-secondary);
      font-size: 0.8125rem;
      font-weight: 600;
      cursor: pointer;
      transition: all var(--transition-fast);
      user-select: none;
      position: relative;
    }

    .topbar-auth {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      margin-left: auto;
    }

    .topbar-login {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.45rem;
      white-space: nowrap;
      text-decoration: none;
      color: #0b1626;
      background: linear-gradient(180deg, #d8bd7c, var(--brass));
      border: 1px solid #e2cd96;
      border-radius: var(--radius-sm);
      padding: 0.5rem 0.95rem;
      font-size: 0.8125rem;
      font-weight: 750;
      letter-spacing: 0.02em;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
      transition: all var(--transition-fast);
    }

    .topbar-login:hover,
    .topbar-login:focus-visible {
      background: linear-gradient(180deg, #e6cd92, #c9a75c);
      transform: translateY(-1px);
    }

    .nav-tab::after {
      content: '';
      position: absolute;
      left: 50%;
      bottom: -1px;
      height: 2px;
      width: 0;
      background: var(--agency-brush, var(--brass));
      transition: width var(--transition-base), left var(--transition-base);
    }

    .nav-tab:hover {
      color: var(--text-primary);
      background: rgba(255, 255, 255, 0.04);
    }

    .nav-tab:hover::after,
    .nav-tab.active::after {
      width: 62%;
      left: 19%;
    }

    .nav-tab.active {
      color: #fff;
      font-weight: 650;
    }

    .nav-tab:active,
    .mobile-menu-btn:active,
    .menu-item:active {
      transform: scale(0.97);
    }

    .nav-tab:focus-visible,
    .mobile-menu-btn:focus-visible,
    .menu-group-header:focus-visible,
    .menu-item:focus-visible,
    .brand:focus-visible,
    .search-input:focus-visible {
      outline: 2px solid var(--accent-primary);
      outline-offset: 3px;
    }

    .mobile-menu-btn {
      display: none;
      padding: 0.5rem 0.9rem;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-subtle);
      background: rgba(255, 255, 255, 0.02);
      color: var(--text-primary);
      font-size: 0.875rem;
      cursor: pointer;
      transition: all var(--transition-fast);
    }

    .mobile-menu-btn:hover {
      border-color: var(--border-medium);
      background: rgba(255, 255, 255, 0.05);
    }

    /* ---------- Shared buttons ---------- */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      text-decoration: none;
      border: 1px solid var(--border-medium);
      background: var(--bg-elevated);
      color: var(--text-primary);
      border-radius: var(--radius-sm);
      padding: 0.62rem 1.05rem;
      font-size: 0.875rem;
      font-weight: 650;
      cursor: pointer;
      transition: all var(--transition-fast);
    }

    .btn:hover {
      border-color: var(--brass);
      transform: translateY(-1px);
      box-shadow: var(--shadow-sm);
    }

    .btn.inset {
      background: #14233c;
      border-color: #2c4268;
    }

    .btn.subtle {
      background: transparent;
    }

    .btn.ghost {
      background: transparent;
      border-color: transparent;
    }

    .btn-rule {
      background: #16263f;
      border-bottom: 2px solid var(--agency-brush, var(--brass));
    }

    /* ---------- Container / layout ---------- */
    .container {
      max-width: 1600px;
      margin: 0 auto;
      padding: 1.75rem 1.5rem;
    }

    .view {
      display: none;
      animation: fadeIn var(--transition-base);
    }

    .view.active {
      display: block;
    }

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

    /* ---------- Hero (legacy) ---------- */
    .hero {
      background: linear-gradient(180deg, var(--bg-tertiary), var(--bg-secondary));
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-lg);
      padding: 2rem;
      box-shadow: var(--shadow-lg);
      position: relative;
      overflow: hidden;
    }

    .hero::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 300px;
      height: 300px;
      background: radial-gradient(circle, var(--agency-accent-soft), transparent 70%);
      border-radius: 50%;
      pointer-events: none;
    }

    .hero-content {
      position: relative;
      z-index: 1;
    }

    .hero h2 {
      font-family: var(--serif);
      font-size: 2rem;
      font-weight: 700;
      margin-bottom: 0.9rem;
      color: var(--text-primary);
    }

    .hero p {
      font-size: 1.0625rem;
      color: var(--text-secondary);
      margin-bottom: 1.5rem;
      max-width: 780px;
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 1.1rem;
      margin-top: 1.5rem;
    }

    .stat-card {
      background: rgba(255, 255, 255, 0.025);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 1.3rem;
      transition: all var(--transition-base);
      position: relative;
      overflow: hidden;
    }

    .stat-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: var(--agency-brush, var(--brass));
      transform: scaleX(0);
      transition: transform var(--transition-base);
    }

    .stat-card:hover {
      transform: translateY(-2px);
      border-color: var(--border-medium);
      box-shadow: var(--shadow-md);
    }

    .stat-card:hover::before {
      transform: scaleX(1);
    }

    .stat-card h3 {
      font-size: 0.75rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 0.55rem;
      font-weight: 700;
    }

    .stat-card .value {
      font-size: 1.9rem;
      font-weight: 700;
      font-family: var(--serif);
      margin-bottom: 0.4rem;
      color: var(--silver);
    }

    .stat-card p {
      font-size: 0.875rem;
      color: var(--text-secondary);
      margin: 0;
    }

    /* ---------- Wiki layout ---------- */
    .wiki-layout {
      display: grid;
      grid-template-columns: 320px 1fr;
      gap: 1.5rem;
      align-items: start;
    }

    .sidebar {
      position: sticky;
      top: 6rem;
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      overflow: hidden;
      box-shadow: var(--shadow-md);
      max-height: calc(100vh - 8rem);
      display: flex;
      flex-direction: column;
    }

    .sidebar-header {
      padding: 1.1rem 1.3rem 0.9rem;
      border-bottom: 1px solid var(--border-subtle);
      background: rgba(255, 255, 255, 0.02);
    }

    .sidebar-header h3 {
      font-size: 0.92rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 0.6rem;
      letter-spacing: 0.02em;
    }

    .sidebar-header h3::before {
      content: '';
      width: 3px;
      height: 1.1em;
      background: var(--agency-brush, var(--brass));
      border-radius: 1px;
    }

    .search-box {
      padding: 0.9rem 1.3rem;
      border-bottom: 1px solid var(--border-subtle);
    }

    .search-input {
      width: 100%;
      padding: 0.6rem 0.8rem;
      background: rgba(6, 12, 24, 0.5);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-sm);
      color: var(--text-primary);
      font-size: 0.875rem;
      transition: all var(--transition-fast);
      outline: none;
    }

    .search-input:focus {
      border-color: var(--agency-accent, var(--accent-primary));
      box-shadow: 0 0 0 3px var(--agency-accent-soft);
    }

    .search-input::placeholder {
      color: var(--text-muted);
    }

    .sidebar-menu {
      overflow-y: auto;
      padding: 0.8rem;
      flex: 1;
    }

    .sidebar-menu::-webkit-scrollbar {
      width: 8px;
    }

    .sidebar-menu::-webkit-scrollbar-track {
      background: transparent;
    }

    .sidebar-menu::-webkit-scrollbar-thumb {
      background: var(--border-medium);
      border-radius: 4px;
    }

    .menu-group {
      margin-bottom: 0.6rem;
    }

    .menu-group-header {
      padding: 0.6rem 0.8rem;
      background: rgba(255, 255, 255, 0.015);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-sm);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-weight: 600;
      font-size: 0.8125rem;
      transition: all var(--transition-fast);
      user-select: none;
    }

    .menu-group-header:hover {
      background: rgba(255, 255, 255, 0.05);
      border-color: var(--border-medium);
    }

    .menu-group-label {
      display: inline-flex;
      align-items: center;
      gap: 0.6rem;
      min-width: 0;
    }

    .menu-group-label > span:last-child {
      overflow-wrap: anywhere;
    }

    .menu-group-mark {
      display: inline-grid;
      place-items: center;
      min-width: 1.9rem;
      height: 1.35rem;
      padding: 0 0.3rem;
      border: 1px solid rgba(193, 164, 92, 0.3);
      border-radius: 4px;
      color: var(--brass);
      font-size: 0.6875rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      font-variant-numeric: tabular-nums;
      background: rgba(193, 164, 92, 0.06);
    }

    .menu-group-icon {
      transition: transform var(--transition-fast);
      color: var(--text-muted);
      font-size: 1.25rem;
      line-height: 1;
    }

    .menu-group.open .menu-group-icon {
      transform: rotate(90deg);
    }

    .menu-items {
      max-height: 0;
      overflow: hidden;
      transition: max-height var(--transition-base);
      padding: 0 0.45rem;
    }

    .menu-group.open .menu-items {
      max-height: 1200px;
      padding: 0.45rem 0.45rem 0;
    }

    .menu-item {
      padding: 0.55rem 0.75rem;
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-size: 0.8125rem;
      color: var(--text-secondary);
      transition: all var(--transition-fast);
      border: 1px solid transparent;
      display: block;
      text-decoration: none;
    }

    .menu-item:hover {
      background: rgba(255, 255, 255, 0.04);
      color: var(--text-primary);
      border-color: var(--border-subtle);
    }

    .menu-item.active {
      background: var(--agency-accent-soft);
      border-color: rgba(193, 164, 92, 0.3);
      color: var(--text-primary);
      font-weight: 600;
    }

    /* ---------- Content area ---------- */
    .content-area {
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 2rem;
      box-shadow: var(--shadow-md);
      min-height: 600px;
    }

    .breadcrumb {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.8125rem;
      color: var(--text-muted);
      margin-bottom: 1.2rem;
      flex-wrap: wrap;
    }

    .breadcrumb a {
      color: var(--text-muted);
      text-decoration: none;
      transition: color var(--transition-fast);
    }

    .breadcrumb a:hover {
      color: var(--silver);
    }

    .content-header {
      margin-bottom: 1.5rem;
      border-bottom: 1px solid var(--border-subtle);
      padding-bottom: 1.1rem;
    }

    .content-title {
      font-family: var(--serif);
      font-size: 2.1rem;
      font-weight: 700;
      margin-bottom: 0.8rem;
      line-height: 1.15;
      color: var(--text-primary);
    }

    .content-lead {
      font-size: 0.95rem;
      color: var(--text-secondary);
      margin-bottom: 1.1rem;
      max-width: 760px;
    }

    .badges {
      display: flex;
      gap: 0.45rem;
      flex-wrap: wrap;
      margin-bottom: 0.8rem;
    }

    .badge {
      padding: 0.24rem 0.7rem;
      border-radius: 99px;
      font-size: 0.6875rem;
      font-weight: 650;
      border: 1px solid;
      display: inline-flex;
      align-items: center;
      gap: 0.375rem;
      letter-spacing: 0.04em;
    }

    .badge-success {
      background: rgba(111, 174, 134, 0.1);
      border-color: rgba(111, 174, 134, 0.34);
      color: var(--accent-success);
    }

    .badge-warning {
      background: rgba(201, 162, 75, 0.1);
      border-color: rgba(201, 162, 75, 0.34);
      color: var(--accent-warning);
    }

    .badge-danger {
      background: rgba(192, 106, 113, 0.1);
      border-color: rgba(192, 106, 113, 0.34);
      color: var(--accent-danger);
    }

    .badge-info {
      background: rgba(138, 167, 204, 0.1);
      border-color: rgba(138, 167, 204, 0.34);
      color: var(--accent-primary);
    }

    .content-meta {
      font-size: 0.8125rem;
      color: var(--text-muted);
      padding: 0;
      border-bottom: none;
      margin-bottom: 0;
    }

    .content-body {
      padding-top: 1rem;
    }

    .content-body h3 {
      font-family: var(--serif);
      font-size: 1.45rem;
      font-weight: 700;
      margin: 1.8rem 0 0.8rem;
      color: var(--text-primary);
      overflow-wrap: anywhere;
      border-bottom: 1px solid var(--border-subtle);
      padding-bottom: 0.45rem;
    }

    .content-body h4 {
      font-family: var(--serif);
      font-size: 1.1rem;
      font-weight: 700;
      color: var(--silver);
      margin: 1.3rem 0 0.6rem;
      overflow-wrap: anywhere;
    }

    .content-body p {
      color: var(--text-secondary);
      margin-bottom: 0.9rem;
      line-height: 1.75;
      overflow-wrap: anywhere;
    }

    .content-body li {
      overflow-wrap: anywhere;
    }

    .content-body ul {
      color: var(--text-secondary);
      margin: 0.8rem 0 0.8rem 1.4rem;
      line-height: 1.75;
    }

    .content-body ul li {
      margin-bottom: 0.4rem;
    }

    .content-figure {
      margin: 1.5rem 0;
      padding: 0.55rem;
      background: rgba(6, 12, 24, 0.4);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-sm);
    }

    .content-figure-featured {
      margin: 0.6rem 0 1rem;
      padding: 0.3rem;
    }

    .content-figure img {
      display: block;
      width: 100%;
      max-height: 520px;
      object-fit: contain;
      background: transparent;
      border-radius: calc(var(--radius-md) - 4px);
      cursor: zoom-in;
    }

    .content-figure-featured img {
      max-height: 760px;
    }

    .zoomable-image:focus-visible {
      outline: 2px solid var(--accent-primary);
      outline-offset: 4px;
    }

    .content-figure figcaption {
      padding: 0.6rem 0.2rem 0.1rem;
      color: var(--text-muted);
      font-size: 0.75rem;
      font-weight: 650;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      text-align: center;
    }

    .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;
    }

    /* ---------- Callouts ---------- */
    .callout {
      padding: 1rem 1.3rem;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-subtle);
      border-left: 3px solid;
      margin: 1.25rem 0;
      background: rgba(6, 12, 24, 0.35);
    }

    .callout-title {
      font-weight: 700;
      margin-bottom: 0.5rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      color: var(--text-primary);
    }

    .callout-info {
      border-left-color: var(--accent-primary);
      background: rgba(92, 118, 160, 0.08);
    }

    .callout-success {
      border-left-color: var(--accent-success);
      background: rgba(111, 174, 134, 0.07);
    }

    .callout-warning {
      border-left-color: var(--accent-warning);
      background: rgba(201, 162, 75, 0.07);
    }

    .callout-danger {
      border-left-color: var(--accent-danger);
      background: rgba(192, 106, 113, 0.07);
    }

    /* ---------- Tables ---------- */
    .table-wrapper {
      overflow-x: auto;
      margin: 1.2rem 0;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-subtle);
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.875rem;
    }

    thead {
      background: rgba(6, 12, 24, 0.45);
      border-bottom: 1px solid rgba(193, 164, 92, 0.35);
    }

    th {
      padding: 0.8rem 1rem;
      text-align: left;
      font-weight: 650;
      color: var(--text-muted);
      text-transform: uppercase;
      font-size: 0.6875rem;
      letter-spacing: 0.09em;
    }

    td {
      padding: 0.8rem 1rem;
      border-bottom: 1px solid var(--border-subtle);
      color: var(--text-secondary);
    }

    tbody tr {
      transition: background var(--transition-fast);
    }

    tbody tr:hover {
      background: rgba(255, 255, 255, 0.02);
    }

    tbody tr:last-child td {
      border-bottom: none;
    }

    /* ---------- Cards grid ---------- */
    .cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1.1rem;
      margin: 1.25rem 0;
    }

    .card {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 1.3rem;
      transition: all var(--transition-base);
    }

    .card:hover {
      transform: translateY(-2px);
      border-color: rgba(193, 164, 92, 0.32);
      box-shadow: var(--shadow-md);
    }

    .card h4 {
      font-family: var(--serif);
      font-size: 1.1rem;
      font-weight: 700;
      margin-bottom: 0.6rem;
    }

    .card p {
      color: var(--text-secondary);
      font-size: 0.875rem;
      margin: 0;
    }

    /* ---------- Empty state ---------- */
    .empty-state {
      text-align: center;
      padding: 4rem 2rem;
      color: var(--text-muted);
    }

    .empty-state-icon {
      font-size: 3.6rem;
      margin-bottom: 0.8rem;
      opacity: 0.35;
      font-family: var(--serif);
    }

    .empty-state h3 {
      font-family: var(--serif);
      font-size: 1.2rem;
      margin-bottom: 0.4rem;
      color: var(--text-secondary);
    }

    /* ---------- Footer ---------- */
    .site-footer {
      max-width: 1600px;
      width: 100%;
      margin: auto auto 0;
      padding: 0.6rem 1.5rem 1.5rem;
      color: var(--text-muted);
      font-size: 0.75rem;
      text-align: center;
      position: relative;
    }

    .site-footer::before {
      content: '';
      display: block;
      max-width: 720px;
      margin: 0 auto 1rem;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
    }

    .footer-lockup {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 0.45rem;
    }

    .footer-office {
      color: var(--text-secondary);
      font-weight: 650;
      letter-spacing: 0.04em;
    }

    .site-footer a {
      color: var(--text-secondary);
      font-weight: 600;
      text-decoration: none;
      transition: color var(--transition-fast);
    }

    .site-footer a:hover,
    .site-footer a:focus-visible {
      color: var(--brass);
    }

    .footer-credit-separator {
      display: inline-block;
      color: var(--text-muted);
    }

    .footer-made {
      margin-top: 0.35rem;
      color: var(--text-muted);
      font-size: 0.8rem;
      letter-spacing: 0.02em;
    }

    .footer-made a {
      text-decoration: none;
      font-weight: 700;
    }

    body.lightbox-open {
      overflow: hidden;
    }

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

    .image-lightbox {
      position: fixed;
      inset: 0;
      z-index: 2000;
      display: grid;
      place-items: center;
      padding: 2.5rem;
      background: rgba(3, 7, 14, 0.94);
      backdrop-filter: blur(10px);
    }

    .lightbox-figure {
      max-width: min(96vw, 1400px);
      max-height: 92vh;
      margin: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.75rem;
    }

    .lightbox-figure img {
      display: block;
      max-width: 92vw;
      max-height: 82vh;
      width: auto;
      height: auto;
      object-fit: contain;
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-lg);
      background: transparent;
    }

    .lightbox-figure figcaption {
      color: var(--text-secondary);
      font-size: 0.875rem;
      text-align: center;
    }

    .lightbox-close {
      position: fixed;
      top: 1.25rem;
      right: 1.25rem;
      z-index: 1;
      padding: 0.55rem 0.9rem;
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-sm);
      background: rgba(14, 26, 47, 0.94);
      color: var(--text-primary);
      font-size: 0.8125rem;
      cursor: pointer;
    }

    .lightbox-close:hover {
      border-color: var(--brass);
      background: var(--bg-elevated);
    }

    .lightbox-close:focus-visible {
      outline: 2px solid var(--accent-primary);
      outline-offset: 3px;
    }

    /* ---------- Portal page (institutional) ---------- */
    .portal-page {
      max-width: 1240px;
      margin: 0 auto;
      padding: 2.4rem 1.25rem 3.5rem;
    }

    .portal-kicker {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.16em;
      font-size: 0.7rem;
      font-weight: 700;
    }

    .portal-kicker::before {
      content: '';
      display: block;
      width: 26px;
      height: 1px;
      background: var(--agency-brush, var(--brass));
    }

    .portal-hero {
      display: grid;
      grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
      gap: 2.4rem;
      align-items: end;
      margin: 1.6rem 0 2.6rem;
      padding-bottom: 1.9rem;
      border-bottom: 1px solid var(--border-subtle);
    }

    .portal-hero h2 {
      font-family: var(--serif);
      max-width: 720px;
      font-size: clamp(2.1rem, 5.6vw, 4.3rem);
      line-height: 1.04;
      letter-spacing: -0.02em;
      margin: 0.6rem 0 1.1rem;
      color: var(--text-primary);
      font-weight: 700;
    }

    .portal-hero h2 span {
      color: var(--brass);
    }

    .portal-lead {
      max-width: 640px;
      color: var(--text-secondary);
      font-size: 1.02rem;
      line-height: 1.8;
    }

    .portal-seal {
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      background: linear-gradient(180deg, #12203a, #0c1526);
      padding: 1.15rem;
      position: relative;
      overflow: hidden;
    }

    .portal-seal::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--brass), transparent);
    }

    .portal-seal strong {
      display: block;
      color: var(--text-primary);
      font-size: 1.02rem;
      letter-spacing: 0.05em;
      font-family: var(--serif);
    }

    .portal-seal p {
      color: var(--text-secondary);
      font-size: 0.79rem;
      line-height: 1.6;
      margin: 0.55rem 0 0;
    }

    .portal-status {
      border-top: 1px solid var(--border-subtle);
      margin-top: 0.75rem;
      padding-top: 0.6rem;
      color: var(--text-muted);
      font-size: 0.78rem;
    }

    .portal-actions {
      display: flex;
      gap: 0.55rem;
      flex-wrap: wrap;
      margin-top: 1.4rem;
    }

    .portal-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      border: 1px solid var(--border-medium);
      background: #16263f;
      color: var(--text-primary);
      border-radius: var(--radius-sm);
      padding: 0.62rem 1.05rem;
      font-size: 0.875rem;
      font-weight: 650;
      transition: all var(--transition-fast);
      cursor: pointer;
    }

    .portal-button:hover {
      border-color: var(--brass);
      transform: translateY(-1px);
      box-shadow: var(--shadow-sm);
    }

    .portal-button.primary {
      background: #1c2f4e;
      border-color: #33517d;
    }

    .portal-button.primary:hover {
      border-color: var(--brass);
      background: #213659;
    }

    .portal-button.subtle {
      background: transparent;
    }

    .portal-section-title {
      display: flex;
      justify-content: space-between;
      gap: 1rem;
      align-items: end;
      border-bottom: 1px solid var(--border-subtle);
      padding-bottom: 0.6rem;
      margin-bottom: 0.9rem;
    }

    .portal-section-title h3 {
      margin: 0;
      font-size: 1.05rem;
      font-family: var(--serif);
      font-weight: 700;
    }

    .portal-section-title p {
      margin: 0;
      color: var(--text-muted);
      font-size: 0.72rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .portal-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.9rem;
    }

    .portal-card {
      display: flex;
      flex-direction: column;
      min-height: 196px;
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      background: rgba(255, 255, 255, 0.015);
      padding: 1.05rem 1.15rem;
      transition: all var(--transition-base);
      position: relative;
    }

    .portal-card::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      height: 2px;
      width: 0;
      background: var(--agency-brush, var(--brass));
      transition: width var(--transition-base);
    }

    .portal-card:hover {
      transform: translateY(-2px);
      border-color: var(--border-medium);
      box-shadow: var(--shadow-md);
    }

    .portal-card:hover::after {
      width: 100%;
    }

    .portal-card .label {
      color: var(--text-muted);
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      margin-bottom: 0.6rem;
    }

    .portal-card h4 {
      font-family: var(--serif);
      font-size: 1.08rem;
      margin: 0 0 0.5rem;
      font-weight: 700;
      color: var(--text-primary);
    }

    .portal-card p {
      color: var(--text-secondary);
      font-size: 0.84rem;
      line-height: 1.55;
      flex: 1;
    }

    .portal-card a {
      margin-top: 0.8rem;
      color: var(--brass);
      font-weight: 650;
      font-size: 0.84rem;
      text-decoration: none;
    }

    .portal-card a:hover {
      color: var(--silver);
    }

    /* Sealed panel headings */
    .seal-heading {
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    .seal-heading .seal-ring {
      width: 54px;
      height: 54px;
      flex: 0 0 auto;
      border-radius: 50%;
      border: 1px solid rgba(193, 164, 92, 0.35);
      padding: 3px;
      background: radial-gradient(circle at 30% 26%, #243a5c, #0d1626 74%);
    }

    .seal-heading .seal-ring img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
    }

    /* ---------- Agency zone ---------- */
    .agency-page {
      max-width: 1080px;
      margin: 0 auto;
      padding: 2.4rem 1.25rem 3.5rem;
    }

    .agency-hero {
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      background: linear-gradient(180deg, var(--bg-tertiary), var(--bg-secondary));
      padding: 1.7rem 2rem;
      position: relative;
      overflow: hidden;
    }

    .agency-hero::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--agency-brush, var(--brass)), transparent 55%);
    }

    .agency-kicker {
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.14em;
      font-size: 0.7rem;
      font-weight: 750;
    }

    .agency-hero h2 {
      font-family: var(--serif);
      margin: 0.55rem 0 0.8rem;
      color: var(--text-primary);
      font-size: clamp(1.8rem, 4.5vw, 3rem);
      font-weight: 700;
    }

    .agency-hero p {
      max-width: 720px;
      color: var(--text-secondary);
      line-height: 1.72;
    }

    .agency-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.9rem;
      margin-top: 0.9rem;
    }

    .agency-card {
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      background: rgba(255, 255, 255, 0.015);
      padding: 1.05rem 1.15rem;
    }

    .agency-card h3 {
      font-family: var(--serif);
      color: var(--text-primary);
      margin: 0.2rem 0 0.45rem;
      font-weight: 700;
    }

    .agency-card p {
      color: var(--text-secondary);
      line-height: 1.6;
      font-size: 0.88rem;
    }

    .agency-back {
      display: inline-block;
      margin-top: 1.4rem;
      color: var(--brass);
      text-decoration: none;
      font-weight: 650;
      font-size: 0.86rem;
    }

    .agency-back:hover {
      color: var(--silver);
    }

    /* ---------- Intro page ---------- */
    .intro-page {
      max-width: 1180px;
      margin: 0 auto;
      padding: 2.4rem 1.25rem 3.5rem;
    }

    .intro-hero {
      display: grid;
      grid-template-columns: 1.1fr 0.9fr;
      gap: 2rem;
      align-items: center;
      margin-bottom: 1.8rem;
    }

    .intro-kicker {
      color: var(--brass);
      text-transform: uppercase;
      letter-spacing: 0.16em;
      font-size: 0.72rem;
      font-weight: 750;
    }

    .intro-page h2 {
      font-family: var(--serif);
      font-size: clamp(1.9rem, 4.6vw, 3.4rem);
      margin: 0.5rem 0 1rem;
      font-weight: 700;
      color: var(--text-primary);
    }

    .intro-page h3 {
      font-family: var(--serif);
      margin-top: 0;
      font-weight: 700;
    }

    .intro-page p,
    .intro-page li {
      color: var(--text-secondary);
      line-height: 1.75;
    }

    .intro-video {
      aspect-ratio: 16 / 9;
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      background: linear-gradient(180deg, #13213a, #0a1220);
      display: grid;
      place-items: center;
      box-shadow: var(--shadow-lg);
      overflow: hidden;
    }

    .intro-video a {
      color: var(--silver);
      text-decoration: none;
      border: 1px solid var(--border-medium);
      border-radius: 99px;
      padding: 0.7rem 1rem;
      font-size: 0.86rem;
      font-weight: 650;
    }

    .intro-video a:hover {
      border-color: var(--brass);
      color: var(--text-primary);
    }

    .intro-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.9rem;
    }

    .intro-card {
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 1.1rem 1.2rem;
    }

    .intro-card .step {
      color: var(--brass);
      font-size: 0.72rem;
      font-weight: 750;
      letter-spacing: 0.12em;
    }

    .admin-link {
      display: inline-block;
      margin-top: 1rem;
      color: var(--accent-primary);
    }

    .admin-link:hover {
      color: var(--brass);
    }

    .topbar-link {
      color: inherit;
    }

    /* ---------- Obywatel: door ---------- */
    .door-page {
      min-height: calc(100vh - 140px);
      display: grid;
      place-items: center;
      padding: 2.5rem 1.25rem 3.5rem;
    }

    .door {
      max-width: 560px;
      width: 100%;
      text-align: center;
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      background: linear-gradient(180deg, var(--bg-tertiary), var(--bg-secondary));
      padding: 2.6rem 2.4rem 2.2rem;
      position: relative;
      box-shadow: var(--shadow-lg);
      overflow: hidden;
    }

    .door::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--agency-brush, var(--brass)), rgba(193, 164, 92, 0.1) 60%, transparent);
    }

    .door-emblem {
      width: 86px;
      height: 86px;
      margin: 0 auto 1.1rem;
      border-radius: 50%;
      border: 2px solid rgba(193, 164, 92, 0.4);
      background: radial-gradient(circle at 32% 26%, #26395c, #0c1424 76%);
      display: grid;
      place-items: center;
      overflow: hidden;
      box-shadow: 0 0 0 6px rgba(4, 9, 18, 0.7), 0 4px 18px rgba(0, 0, 0, 0.5);
    }

    .door-emblem img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .door-kicker {
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.18em;
      font-size: 0.68rem;
      font-weight: 750;
    }

    .door h2 {
      font-family: var(--serif);
      font-size: 2rem;
      font-weight: 700;
      margin: 0.5rem 0 0.6rem;
      color: var(--text-primary);
    }

    .door-authorize {
      color: var(--text-secondary);
      font-size: 0.92rem;
      margin: 0 auto 1.5rem;
      max-width: 360px;
      line-height: 1.7;
    }

    .door-actions {
      display: grid;
      gap: 0.7rem;
      max-width: 340px;
      margin: 0 auto 1.4rem;
    }

    .door-actions .btn {
      width: 100%;
    }

    .door-actions .btn.discord {
      background: #232348;
      border-color: #3b3b74;
      font-weight: 700;
    }

    .door-actions .btn.discord:hover {
      border-color: #7b7bd0;
    }

    .door-actions .btn.guest {
      color: var(--text-secondary);
      border-color: var(--border-subtle);
      background: rgba(255, 255, 255, 0.02);
    }

    .door-note {
      color: var(--text-muted);
      font-size: 0.72rem;
      line-height: 1.6;
      max-width: 380px;
      margin: 0 auto;
    }

    .door-note a {
      color: var(--text-secondary);
    }

    .door-note a:hover {
      color: var(--brass);
    }

    /* ---------- Obywatel: dashboard ---------- */
    .dash-page {
      max-width: 1080px;
      margin: 0 auto;
      padding: 2.2rem 1.25rem 3.5rem;
    }

    .dash-head {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
      border-bottom: 1px solid var(--border-subtle);
      padding-bottom: 1.1rem;
      margin-bottom: 1.4rem;
    }

    .dash-head h2 {
      font-family: var(--serif);
      font-size: 1.9rem;
      font-weight: 700;
      margin: 0.4rem 0 0.2rem;
    }

    .dash-identity {
      color: var(--text-muted);
      font-size: 0.85rem;
    }

    .dash-identity strong {
      color: var(--text-primary);
    }

    .dash-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 320px;
      gap: 1.1rem;
      align-items: start;
    }

    .dash-panel {
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 1.2rem 1.3rem;
    }

    .dash-panel h3 {
      font-family: var(--serif);
      font-weight: 700;
      font-size: 1.1rem;
      margin: 0 0 0.15rem;
    }

    .dash-panel .panel-note {
      color: var(--text-muted);
      font-size: 0.78rem;
      margin-bottom: 1rem;
    }

    .mine-list {
      display: grid;
      gap: 0.65rem;
    }

    .mine-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.9rem;
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-sm);
      padding: 0.75rem 0.9rem;
      background: rgba(255, 255, 255, 0.015);
    }

    .mine-row-main {
      min-width: 0;
    }

    .mine-row-name {
      color: var(--text-primary);
      font-weight: 650;
      font-size: 0.9rem;
      overflow-wrap: anywhere;
    }

    .mine-row-meta {
      color: var(--text-muted);
      font-size: 0.75rem;
    }

    .status-pill {
      flex-shrink: 0;
      border-radius: 99px;
      padding: 0.22rem 0.6rem;
      font-size: 0.7rem;
      font-weight: 750;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .status-pill.pending {
      background: rgba(201, 162, 75, 0.12);
      color: #d9b85e;
      border: 1px solid rgba(201, 162, 75, 0.38);
    }

    .status-pill.in_review {
      background: rgba(138, 167, 204, 0.12);
      color: var(--accent-primary);
      border: 1px solid rgba(138, 167, 204, 0.38);
    }

    .status-pill.accepted {
      background: rgba(111, 174, 134, 0.12);
      color: var(--accent-success);
      border: 1px solid rgba(111, 174, 134, 0.38);
    }

    .status-pill.rejected {
      background: rgba(192, 106, 113, 0.12);
      color: var(--accent-danger);
      border: 1px solid rgba(192, 106, 113, 0.38);
    }

    .empty-mining {
      color: var(--text-muted);
      font-size: 0.85rem;
      padding: 0.6rem 0.2rem;
    }

    .faq {
      display: grid;
      gap: 0.6rem;
      margin-top: 0.9rem;
    }

    .faq-item {
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-sm);
      background: rgba(255, 255, 255, 0.015);
    }

    .faq-q {
      width: 100%;
      text-align: left;
      background: transparent;
      border: 0;
      color: var(--text-primary);
      font: inherit;
      font-weight: 650;
      font-size: 0.9rem;
      padding: 0.8rem 0.95rem;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      gap: 0.8rem;
      align-items: center;
    }

    .faq-q::after {
      content: '+';
      color: var(--brass);
      font-size: 1.1rem;
      transition: transform var(--transition-fast);
    }

    .faq-item.open .faq-q::after {
      transform: rotate(45deg);
    }

    .faq-a {
      display: none;
      padding: 0 0.95rem 0.8rem;
      color: var(--text-secondary);
      font-size: 0.86rem;
      line-height: 1.7;
      border-top: 1px solid var(--border-subtle);
      margin-top: 0.1rem;
      padding-top: 0.7rem;
    }

    .faq-item.open .faq-a {
      display: block;
    }

    .contact-line {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      padding: 0.5rem 0;
      border-bottom: 1px dashed var(--border-subtle);
      color: var(--text-secondary);
      font-size: 0.86rem;
    }

    .contact-line:last-child {
      border-bottom: 0;
    }

    .contact-line .k {
      color: var(--text-muted);
      text-transform: uppercase;
      font-size: 0.68rem;
      font-weight: 750;
      letter-spacing: 0.1em;
      min-width: 3.4rem;
    }

    /* ---------- Responsive ---------- */
    @media (max-width: 1024px) {
      .wiki-layout {
        grid-template-columns: 1fr;
      }

      .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        max-height: 100vh;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
      }

      .sidebar.open {
        transform: translateX(0);
      }

      .mobile-menu-btn {
        display: block;
      }

      .sidebar-close {
        display: block !important;
      }

      .portal-grid,
      .agency-grid,
      .intro-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .dash-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 768px) {
      .brand-logo {
        width: 38px;
        height: 38px;
      }

      .brand-text h1 {
        font-size: 0.92rem;
      }

      .brand-text p {
        font-size: 0.65rem;
      }

      .topbar-inner {
        padding: 0.55rem 1rem;
        gap: 1rem;
      }

      .utility-inner {
        padding: 0.3rem 1rem;
        font-size: 0.6rem;
      }

      .utility-right {
        display: none;
      }

      .nav-tabs {
        display: flex;
        order: 3;
        flex-basis: 100%;
        width: 100%;
        margin-left: 0;
        overflow-x: auto;
        padding-bottom: 0.125rem;
      }

      .nav-tab {
        flex: 1 0 auto;
        text-align: center;
      }

      #mobileMenuBtn {
        order: 2;
        margin-left: auto;
      }

      .hero {
        padding: 1.3rem;
      }

      .hero h2 {
        font-size: 1.5rem;
      }

      .hero p {
        font-size: 1rem;
      }

      .stats-grid,
      .portal-grid,
      .agency-grid,
      .intro-grid {
        grid-template-columns: 1fr;
      }

      .portal-hero,
      .intro-hero {
        grid-template-columns: 1fr;
      }

      .container {
        padding: 0.9rem;
      }

      .content-area {
        padding: 1.4rem;
      }

      .content-title {
        font-size: 1.55rem;
      }

      .content-figure-featured {
        margin: 0.5rem 0 1rem;
      }

      .site-footer {
        padding: 0.6rem 1rem 1.25rem;
      }

      .image-lightbox {
        padding: 1rem;
      }

      .lightbox-close {
        top: 0.75rem;
        right: 0.75rem;
      }

      .door {
        padding: 2rem 1.4rem 1.8rem;
      }
    }

    /* ---------- Utilities ---------- */
    .sidebar-close {
      display: none;
      margin-left: auto;
    }

    .text-gradient {
      background: linear-gradient(120deg, var(--silver), var(--brass));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    @keyframes pulse {
      0%, 100% {
        opacity: 1;
      }
      50% {
        opacity: 0.5;
      }
    }

    .loading {
      animation: pulse 2s ease-in-out infinite;
    }

    .center {
      text-align: center;
    }

    .green {
      color: #25f52c !important;
    }

    .yellow {
      color: #ffff19 !important;
    }

    .orange {
      color: #f78316 !important;
    }

    .red {
      color: #d10f0f !important;
    }

    .black {
      color: var(--text-primary) !important;
      text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
    }