@layer reset, base, layout, components, responsive, a11y;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
  body { min-height: 100vh; font-family: 'Inter', system-ui, sans-serif; }
  img, svg { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
  input { font: inherit; color: inherit; background: none; border: 0; outline: none; width: 100%; }
  ul, ol, dl { list-style: none; }
  ::selection { background: var(--primary); color: #fff; }
}

@layer base {
  :root {
    --bg: #ffffff;
    --bg-alt: #f4f6f9;
    --bg-panel: #ffffff;
    --bg-strip: #eef1f5;
    --border: #dfe3e9;
    --border-strong: #c3ccd6;
    --text: #1a2433;
    --text-dim: #52606e;
    --text-mute: #8894a3;
    --primary: #0b3d91;
    --primary-dark: #072a66;
    --primary-light: #e8eef8;
    --accent: #c8102e;
    --serif: 'PT Serif', Georgia, serif;
  }

  body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  h1, h2, h3, h4 {
    font-family: var(--serif);
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.005em;
    line-height: 1.2;
  }

  .container {
    width: 100%;
    max-width: 1240px;
    margin-inline: auto;
    padding-inline: clamp(16px, 3vw, 32px);
  }
}

@layer layout {
  main { position: relative; }

  .section {
    padding: clamp(56px, 8vw, 96px) 0;
    background: var(--bg);
  }
  .section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .section-head {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--primary);
  }
  .section-num {
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
  }
  .section-title {
    font-size: clamp(24px, 3vw, 32px);
    margin-bottom: 10px;
  }
  .section-desc {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.7;
    max-width: 720px;
  }
}

@layer components {

  .utility-bar {
    background: var(--primary-dark);
    color: #c9d4ea;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .utility-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 34px;
    gap: 20px;
  }
  .utility-left, .utility-right { display: flex; align-items: center; gap: 14px; }
  .utility-bar .divider { opacity: 0.4; }
  .utility-bar a,
  .utility-bar button {
    color: #c9d4ea;
    transition: color .15s;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
  }
  .utility-bar a:hover,
  .utility-bar button:hover { color: #fff; }
  .a11y-toggle {
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.3);
    text-underline-offset: 3px;
  }
  .a11y-toggle:hover { text-decoration-color: #fff; }
  .lang {
    padding: 4px 8px;
    font-weight: 500;
  }
  .lang.active { color: #fff; border-bottom: 1px solid #fff; }

  .site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 0;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--primary);
  }
  .emblem {
    width: 58px;
    height: 64px;
    color: var(--primary);
    flex-shrink: 0;
  }
  .emblem svg { width: 100%; height: 100%; }
  .brand-text { display: flex; flex-direction: column; }
  .brand-title {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.25;
  }
  .brand-sub {
    font-size: 12px;
    color: var(--text-mute);
    margin-top: 4px;
    letter-spacing: 0.01em;
  }

  .header-actions { display: flex; align-items: center; gap: 10px; }
  .search-toggle {
    width: 42px; height: 42px;
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    color: var(--text-dim);
    transition: all .15s;
  }
  .search-toggle:hover { border-color: var(--primary); color: var(--primary); }

  .burger { display: none; width: 42px; height: 42px; flex-direction: column; gap: 5px; justify-content: center; align-items: center; border: 1px solid var(--border); }
  .burger span { width: 18px; height: 1.5px; background: var(--text); }

  .main-nav {
    background: var(--primary);
    border-bottom: 3px solid var(--accent);
  }
  .main-nav ul {
    display: flex;
    align-items: stretch;
  }
  .main-nav a {
    display: flex;
    align-items: center;
    padding: 16px 22px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: background .15s, color .15s;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  .main-nav li:first-child a { border-left: 1px solid rgba(255, 255, 255, 0.1); }
  .main-nav a:hover { background: var(--primary-dark); color: #fff; }

  .hero {
    padding: clamp(48px, 6vw, 80px) 0 clamp(40px, 5vw, 64px);
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
  }
  .breadcrumbs {
    font-size: 13px;
    color: var(--text-mute);
    margin-bottom: 20px;
  }
  .breadcrumbs a { color: var(--primary); }
  .breadcrumbs a:hover { text-decoration: underline; }
  .breadcrumbs .sep { margin: 0 8px; color: var(--text-mute); }
  .hero-title {
    font-family: var(--serif);
    font-size: clamp(30px, 4.5vw, 46px);
    font-weight: 700;
    color: var(--text);
    line-height: 1.15;
    max-width: 860px;
    letter-spacing: -0.015em;
  }
  .hero-rule {
    width: 72px;
    height: 3px;
    background: var(--accent);
    margin: 24px 0;
  }
  .hero-lead {
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1.7;
    max-width: 760px;
  }

  .wanted-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
  }
  .wanted-count {
    font-size: 13px;
    color: var(--text-dim);
  }
  .wanted-count b {
    color: var(--primary);
    margin-left: 6px;
    font-weight: 700;
  }

  .search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: #fff;
    border: 1px solid var(--border-strong);
    transition: border-color .15s;
    min-width: 280px;
    flex: 1;
    max-width: 420px;
  }
  .search-box:focus-within { border-color: var(--primary); }
  .search-box svg { color: var(--text-mute); flex-shrink: 0; }
  .search-box input {
    font-size: 13px;
    color: var(--text);
  }
  .search-box input::placeholder { color: var(--text-mute); }

  .wanted-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }
  .wanted-card {
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: border-color .15s, transform .15s;
  }
  .wanted-card:hover {
    border-color: var(--primary);
  }
  .wanted-photo {
    aspect-ratio: 1/1.15;
    background: var(--bg-alt);
    position: relative;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
  }
  .wanted-photo svg,
  .wanted-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
  }
  .wanted-badge {
    position: absolute;
    top: 0; left: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--accent);
    padding: 5px 10px;
    text-transform: uppercase;
  }
  .wanted-id {
    position: absolute;
    bottom: 10px; left: 10px;
    font-size: 11px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.95);
    padding: 3px 8px;
    border: 1px solid var(--border);
    font-weight: 500;
    letter-spacing: 0.04em;
  }
  .wanted-body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .wanted-article {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .wanted-fullname {
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
  }
  .wanted-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    line-height: 1.45;
  }
  .wanted-meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-mute);
  }

  .report-table {
    background: #fff;
    border: 1px solid var(--border);
  }
  .report-head {
    display: grid;
    grid-template-columns: 180px 1fr 140px 160px;
    gap: 20px;
    padding: 14px 24px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  .report-body > li {
    display: grid;
    grid-template-columns: 180px 1fr 140px 160px;
    gap: 20px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background .12s;
  }
  .report-body > li:last-child { border-bottom: 0; }
  .report-body > li:nth-child(even) { background: var(--bg-alt); }
  .report-body > li:hover { background: var(--primary-light); }
  .report-code {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.02em;
  }
  .report-type {
    font-size: 14px;
    color: var(--text);
  }
  .report-sector {
    font-size: 13px;
    color: var(--text-dim);
  }
  .report-status {
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .report-status::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
  }
  .status-done { color: #2c7a4f; }
  .status-active { color: var(--primary); }
  .status-review { color: #a36a12; }

  .db-controls {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    align-items: center;
  }
  .db-filters { display: flex; gap: 6px; flex-wrap: wrap; }
  .chip {
    padding: 10px 16px;
    font-size: 12px;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--text-dim);
    transition: all .12s;
    font-weight: 500;
  }
  .chip:hover { color: var(--primary); border-color: var(--primary); }
  .chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  .db-groups { display: flex; flex-direction: column; gap: 56px; }
  .db-group.hidden { display: none; }
  .db-group-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  .db-group-head h3 {
    font-family: var(--serif);
    font-size: 20px;
    color: var(--text);
  }
  .count {
    font-size: 12px;
    color: var(--text-mute);
    margin-left: auto;
    font-weight: 500;
  }

  .charter-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 10px;
  }
  .charter-item {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    padding: 16px 20px;
    transition: background .12s;
  }
  .charter-item:hover { background: var(--primary-light); }
  .charter-num {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
  }
  .charter-text {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
  }

  .docs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 8px;
  }
  .doc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--border);
    transition: all .12s;
  }
  .doc-item:hover { border-color: var(--primary); background: var(--primary-light); }
  .doc-icon {
    width: 36px; height: 36px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: var(--primary-light);
    border: 1px solid var(--border);
    color: var(--primary);
  }
  .doc-icon svg { width: 18px; height: 18px; }
  .doc-name {
    font-size: 13px;
    color: var(--text);
    flex: 1;
    line-height: 1.45;
    font-weight: 500;
  }
  .doc-meta {
    font-size: 11px;
    color: var(--text-mute);
    font-weight: 500;
    white-space: nowrap;
  }

  .personnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
  }
  .agent-card {
    background: #fff;
    border: 1px solid var(--border);
    border-left-width: 4px;
    padding: 20px 22px;
    transition: border-color .12s, transform .12s;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    position: relative;
  }
  .agent-card:hover {
    border-color: var(--primary);
    border-left-color: var(--rank-color, var(--primary));
    transform: translateY(-1px);
  }
  .agent-card.rank-red { border-left-color: #c8102e; --rank-color: #c8102e; }
  .agent-card.rank-blue { border-left-color: #1e52c9; --rank-color: #1e52c9; }
  .agent-card.rank-yellow { border-left-color: #d4a017; --rank-color: #d4a017; }
  .agent-card.rank-green { border-left-color: #2c7a4f; --rank-color: #2c7a4f; }

  .agent-avatar {
    width: 48px; height: 48px;
    background: var(--primary-light);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
    font-family: var(--serif);
  }
  .agent-info { flex: 1; min-width: 0; }
  .agent-name {
    font-family: var(--serif);
    font-size: 15px;
    color: var(--text);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
  }
  .agent-rank-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }
  .rank-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--rank-color, var(--primary));
    padding: 4px 10px;
    white-space: nowrap;
  }
  .agent-dept {
    font-size: 12px;
    color: var(--text-dim);
  }
  .agent-id {
    font-size: 11px;
    color: var(--text-mute);
    letter-spacing: 0.02em;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  .about-body {
    max-width: 820px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-dim);
  }
  .about-body p { margin-bottom: 16px; }
  .about-body p:last-child { margin-bottom: 0; }

  .site-footer {
    background: var(--primary-dark);
    color: #c9d4ea;
    padding: 56px 0 28px;
    margin-top: 0;
    border-top: 3px solid var(--accent);
  }
  .footer-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
  }
  .footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #fff;
  }
  .emblem-light {
    width: 48px;
    height: 54px;
    color: #fff;
  }
  .footer-title {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
  }
  .footer-sub {
    font-size: 12px;
    color: #8f9fbd;
    margin-top: 4px;
  }
  .footer-cols {
    display: flex;
    gap: 56px;
  }
  .footer-cols h4 {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8f9fbd;
    margin-bottom: 12px;
    font-weight: 600;
  }
  .footer-cols a {
    display: block;
    font-size: 13px;
    color: #c9d4ea;
    padding: 4px 0;
    transition: color .12s;
  }
  .footer-cols a:hover { color: #fff; }

  .disclaimer {
    font-size: 12px;
    line-height: 1.7;
    color: #8f9fbd;
    padding: 14px 18px;
    border-left: 3px solid var(--accent);
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 24px;
  }

  .footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #8f9fbd;
    flex-wrap: wrap;
  }

  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: none;
  }

  .clickable { cursor: pointer; }
  .wanted-card, .charter-item, .doc-item, .agent-card, .report-body > li {
    cursor: pointer;
  }

  .modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(20px, 5vh, 60px) 20px;
    overflow-y: auto;
  }
  .modal.open {
    display: flex;
  }
  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 32, 0.68);
    backdrop-filter: blur(3px);
    animation: fadeIn .2s ease;
  }
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
  }
  .modal-dialog {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    max-width: 760px;
    width: 100%;
    margin: auto 0;
    animation: slideUp .28s ease;
    box-shadow: 0 20px 60px rgba(7, 42, 102, 0.25);
  }
  .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
  }
  .modal-meta { flex: 1; min-width: 0; }
  .modal-eyebrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
  }
  .modal-title {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
  }
  .modal-close {
    width: 36px; height: 36px;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--text-dim);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: all .15s;
  }
  .modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
  .modal-body {
    padding: 28px 32px 32px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-dim);
  }
  .modal-body p { margin-bottom: 14px; }
  .modal-body p:last-child { margin-bottom: 0; }

  .doc-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px 24px;
    padding: 16px 0 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    font-size: 13px;
  }
  .doc-grid dt {
    color: var(--text-mute);
    font-weight: 500;
  }
  .doc-grid dd {
    color: var(--text);
    font-weight: 500;
  }

  .modal-section {
    margin-bottom: 24px;
  }
  .modal-section:last-child { margin-bottom: 0; }
  .modal-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }
  .modal-section p { color: var(--text-dim); font-size: 14px; }
  .modal-section ol, .modal-section ul {
    padding-left: 0;
    list-style: none;
  }
  .modal-section ol li, .modal-section ul li {
    padding: 6px 0 6px 22px;
    position: relative;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.7;
  }
  .modal-section ol li::before {
    content: counter(item) ".";
    counter-increment: item;
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
  }
  .modal-section ol { counter-reset: item; }
  .modal-section ul li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--primary);
  }
  .modal-body ol, .modal-body ul {
    padding-left: 0;
    list-style: none;
    counter-reset: item;
  }
  .modal-photo {
    width: 180px;
    aspect-ratio: 1/1.2;
    float: right;
    margin: 0 0 20px 24px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    overflow: hidden;
  }
  .modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
  }
  @media (max-width: 640px) {
    .modal-photo {
      float: none;
      margin: 0 auto 20px;
      width: 160px;
    }
  }

  .modal-section.immunity {
    background: #fff5f3;
    border: 1px solid #f0c4bd;
    border-left: 3px solid var(--accent);
    padding: 16px 20px;
    margin-top: 8px;
  }
  .modal-section.immunity .modal-section-title {
    color: var(--accent);
    border-bottom-color: #f0c4bd;
  }
  .modal-section.immunity p {
    color: #6e2a23;
    font-weight: 500;
  }

  body.modal-open { overflow: hidden; }

  .lang-notice {
    font-size: 12px;
    color: var(--text-mute);
    padding: 10px 14px;
    background: var(--bg-alt);
    border-left: 3px solid var(--primary);
    margin-bottom: 20px;
  }

  .emergency-banner {
    background: var(--accent);
    color: #fff;
    border-bottom: 2px solid #8b0c21;
    position: relative;
    overflow: hidden;
  }
  .emergency-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    min-height: 44px;
  }
  .emergency-stripe {
    width: 60px;
    height: 20px;
    background: repeating-linear-gradient(-45deg, #fff 0 6px, var(--accent) 6px 12px);
    flex-shrink: 0;
  }
  .emergency-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 4px 10px;
    border: 1.5px solid #fff;
    white-space: nowrap;
  }
  .emergency-text {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
  }
  .emergency-link {
    font-size: 12px;
    font-weight: 600;
    color: #fff !important;
    border-bottom: 1px solid rgba(255,255,255,0.6);
    padding-bottom: 2px;
    white-space: nowrap;
  }
  .emergency-link:hover { border-bottom-color: #fff; }

  .map-wrap {
    background: #fff;
    border: 1px solid var(--border);
  }
  .map-meta {
    display: flex;
    gap: 40px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
    flex-wrap: wrap;
  }
  .map-meta-item { display: flex; flex-direction: column; gap: 8px; }
  .map-meta-label {
    font-size: 11px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
  }
  .map-meta-value {
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
  }
  .map-legend {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-dim);
  }
  .map-legend > span {
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .legend-dot {
    width: 12px; height: 12px;
    display: inline-block;
    border: 1px solid #1a2433;
  }
  .legend-dot.sector-a { background: rgba(200, 16, 46, 0.18); }
  .legend-dot.sector-b { background: rgba(30, 82, 201, 0.18); }
  .legend-dot.sector-v { background: rgba(212, 160, 23, 0.18); }
  .legend-dot.sector-g { background: rgba(44, 122, 79, 0.18); }
  .legend-patrol {
    width: 12px; height: 12px;
    background: var(--primary);
    border-radius: 50%;
    display: inline-block;
    position: relative;
  }
  .legend-patrol::after {
    content: "";
    position: absolute;
    inset: -3px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    opacity: 0.4;
  }
  .map-svg-wrap {
    padding: 16px;
    background: #fff;
  }
  .map-svg {
    width: 100%;
    height: auto;
    display: block;
  }
  .map-svg .sector-a-fill { fill: rgba(200, 16, 46, 0.1); }
  .map-svg .sector-b-fill { fill: rgba(30, 82, 201, 0.1); }
  .map-svg .sector-v-fill { fill: rgba(212, 160, 23, 0.12); }
  .map-svg .sector-g-fill { fill: rgba(44, 122, 79, 0.1); }
  .map-svg .room { transition: fill .15s; cursor: pointer; }
  .map-svg .room:hover { fill-opacity: 0.5; }
  .map-svg .patrol-pulse {
    transform-origin: center;
    animation: patrolPulse 2.2s ease-out infinite;
  }
  @keyframes patrolPulse {
    0% { r: 8; opacity: 0.6; }
    100% { r: 22; opacity: 0; }
  }
  .map-svg .patrol { animation: patrolFloat 4s ease-in-out infinite; }
  .map-svg .patrol:nth-child(even) { animation-delay: -1.5s; }
  @keyframes patrolFloat {
    0%, 100% { transform: translate(var(--tx, 0px), var(--ty, 0px)); }
  }

  .news-list {
    display: grid;
    gap: 4px;
    background: var(--border);
    border: 1px solid var(--border);
  }
  .news-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
    padding: 24px 28px;
    background: #fff;
    cursor: pointer;
    transition: background .15s;
  }
  .news-item:hover { background: var(--primary-light); }
  .news-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-right: 1px solid var(--border);
    padding-right: 20px;
  }
  .news-day {
    font-family: var(--serif);
    font-size: 38px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
  }
  .news-month {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 0.04em;
  }
  .news-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
  }
  .news-title {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 10px;
  }
  .news-summary {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 12px;
  }
  .news-more {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
  }

  .hotline-wrap {
    background: #fff;
    border: 1px solid var(--border);
    padding: 36px 40px;
    max-width: 820px;
  }
  .hotline-title {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--primary);
  }
  .hotline-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
  }
  .hotline-form label > span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.02em;
  }
  .hotline-form input,
  .hotline-form select,
  .hotline-form textarea {
    border: 1px solid var(--border-strong);
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    transition: border-color .15s;
    font-family: inherit;
    resize: vertical;
  }
  .hotline-form input:focus,
  .hotline-form select:focus,
  .hotline-form textarea:focus {
    outline: none;
    border-color: var(--primary);
  }
  .hotline-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .hotline-full { grid-column: 1 / -1; }
  .hotline-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
  }
  .hotline-note {
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-mute);
    padding: 12px 16px;
    background: var(--bg-alt);
    border-left: 3px solid var(--border-strong);
    line-height: 1.6;
  }
  .hotline-success {
    margin-top: 16px;
    padding: 14px 18px;
    background: #e8f5ed;
    border: 1px solid #2c7a4f;
    border-left: 3px solid #2c7a4f;
    color: #1a4d32;
    font-size: 13px;
    font-weight: 500;
  }

  .timeline {
    counter-reset: tl;
    position: relative;
    padding-left: 0;
    list-style: none;
  }
  .timeline li {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
  }
  .timeline li::before {
    content: none !important;
  }
  .timeline li:last-child { border-bottom: 0; }
  .timeline-time {
    display: flex;
    flex-direction: column;
    border-right: 2px solid var(--primary);
    padding-right: 16px;
  }
  .timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
  }
  .timeline-hour {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
  }
  .timeline-content {}
  .timeline-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 6px;
  }
  .timeline-officer {
    font-size: 11px;
    color: var(--text-mute);
    font-style: italic;
  }

  .modal-actions {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
  }

  .qr-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
  }
  .qr-svg {
    width: 128px;
    height: 128px;
    flex-shrink: 0;
    background: #fff;
    padding: 6px;
    border: 1px solid var(--border);
  }
  .qr-svg svg { width: 100%; height: 100%; display: block; }
  .qr-meta { flex: 1; min-width: 0; }
  .qr-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    word-break: break-all;
    margin-bottom: 6px;
  }
  .qr-note {
    font-size: 13px;
    color: var(--text-dim);
  }

  @media (max-width: 980px) {
    .news-item { grid-template-columns: 1fr; gap: 12px; }
    .news-date {
      flex-direction: row;
      align-items: baseline;
      gap: 12px;
      border-right: 0;
      border-bottom: 1px solid var(--border);
      padding: 0 0 12px 0;
    }
    .hotline-row { grid-template-columns: 1fr; }
    .hotline-wrap { padding: 24px; }
    .emergency-inner { flex-wrap: wrap; padding: 12px 0; }
    .emergency-text { font-size: 12px; width: 100%; }
    .emergency-stripe { display: none; }
    .map-meta { flex-direction: column; gap: 20px; }
    .qr-wrap { flex-direction: column; text-align: center; }
    .timeline li { grid-template-columns: 1fr; gap: 8px; }
    .timeline-time { border-right: 0; border-left: 2px solid var(--primary); padding-left: 12px; padding-right: 0; }
  }
}

@layer a11y {
  body.a11y {
    font-size: 18px;
    background: #ffffff !important;
    color: #000000 !important;
  }
  body.a11y,
  body.a11y * {
    font-family: 'Inter', Arial, sans-serif !important;
  }
  body.a11y h1, body.a11y h2, body.a11y h3, body.a11y h4,
  body.a11y .hero-title, body.a11y .section-title,
  body.a11y .brand-title, body.a11y .modal-title,
  body.a11y .footer-title, body.a11y .agent-name,
  body.a11y .wanted-fullname {
    color: #000000 !important;
    font-family: 'Inter', Arial, sans-serif !important;
    font-weight: 700 !important;
  }
  body.a11y p, body.a11y span, body.a11y div, body.a11y li,
  body.a11y dt, body.a11y dd, body.a11y label, body.a11y input,
  body.a11y .section-desc, body.a11y .hero-lead, body.a11y .about-body,
  body.a11y .wanted-title, body.a11y .wanted-article, body.a11y .wanted-meta,
  body.a11y .wanted-id, body.a11y .charter-num, body.a11y .charter-text,
  body.a11y .doc-name, body.a11y .doc-meta, body.a11y .agent-dept,
  body.a11y .agent-id, body.a11y .brand-sub, body.a11y .modal-eyebrow,
  body.a11y .modal-body, body.a11y .section-num, body.a11y .count,
  body.a11y .footer-sub, body.a11y .footer-bottom,
  body.a11y .wanted-count, body.a11y .breadcrumbs, body.a11y .disclaimer {
    color: #000000 !important;
  }
  body.a11y a {
    color: #000000 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
  }
  body.a11y .hero,
  body.a11y .section,
  body.a11y .section-alt,
  body.a11y .site-header,
  body.a11y main,
  body.a11y .db-group-head,
  body.a11y .hero-panel {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
  }
  body.a11y .utility-bar {
    background: #000000 !important;
    color: #ffffff !important;
    border-bottom: 2px solid #000000 !important;
  }
  body.a11y .utility-bar *,
  body.a11y .utility-bar a,
  body.a11y .utility-bar button,
  body.a11y .utility-bar span {
    color: #ffffff !important;
  }
  body.a11y .lang.active {
    background: #ffffff !important;
    color: #000000 !important;
    border: 0 !important;
  }
  body.a11y .main-nav {
    background: #ffffff !important;
    border-top: 2px solid #000000 !important;
    border-bottom: 4px solid #000000 !important;
  }
  body.a11y .main-nav a {
    color: #000000 !important;
    border-right: 2px solid #000000 !important;
    text-decoration: none !important;
    font-weight: 700 !important;
  }
  body.a11y .main-nav li:first-child a {
    border-left: 2px solid #000000 !important;
  }
  body.a11y .main-nav a:hover {
    background: #000000 !important;
    color: #ffffff !important;
  }
  body.a11y .hero-rule {
    background: #000000 !important;
    height: 4px !important;
  }
  body.a11y .section-head {
    border-bottom: 3px solid #000000 !important;
  }
  body.a11y .wanted-card,
  body.a11y .charter-item,
  body.a11y .doc-item,
  body.a11y .agent-card,
  body.a11y .search-box,
  body.a11y .hero-panel,
  body.a11y .modal-dialog {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    box-shadow: none !important;
  }
  body.a11y .agent-card {
    border-left-width: 6px !important;
    border-left-color: #000000 !important;
  }
  body.a11y .charter-item {
    border-left-width: 6px !important;
    border-left-color: #000000 !important;
  }
  body.a11y .wanted-badge,
  body.a11y .rank-badge {
    background: #000000 !important;
    color: #ffffff !important;
    border: 0 !important;
  }
  body.a11y .wanted-id {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
  body.a11y .chip,
  body.a11y .btn,
  body.a11y .search-toggle,
  body.a11y .burger {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    font-weight: 700 !important;
  }
  body.a11y .chip.active,
  body.a11y .btn-primary {
    background: #000000 !important;
    color: #ffffff !important;
  }
  body.a11y .modal-header {
    background: #ffffff !important;
    border-bottom: 2px solid #000000 !important;
  }
  body.a11y .modal-section-title {
    color: #000000 !important;
    border-bottom: 2px solid #000000 !important;
    font-weight: 700 !important;
  }
  body.a11y .modal-section.immunity {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    border-left: 6px solid #000000 !important;
  }
  body.a11y .modal-section.immunity p { color: #000000 !important; }
  body.a11y .modal-section ol li::before,
  body.a11y .modal-section ul li::before {
    color: #000000 !important;
    font-weight: 700 !important;
  }
  body.a11y .modal-backdrop {
    background: rgba(0, 0, 0, 0.85) !important;
  }
  body.a11y .doc-grid {
    border-bottom: 2px solid #000000 !important;
  }
  body.a11y .doc-icon {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    color: #000000 !important;
  }
  body.a11y .agent-avatar {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    color: #000000 !important;
  }
  body.a11y .agent-card.rank-red,
  body.a11y .agent-card.rank-blue,
  body.a11y .agent-card.rank-yellow,
  body.a11y .agent-card.rank-green {
    border-left-color: #000000 !important;
  }
  body.a11y .site-footer {
    background: #ffffff !important;
    color: #000000 !important;
    border-top: 4px solid #000000 !important;
  }
  body.a11y .footer-cols h4 {
    color: #000000 !important;
    font-weight: 700 !important;
  }
  body.a11y .footer-cols a {
    color: #000000 !important;
    text-decoration: underline !important;
  }
  body.a11y .footer-main {
    border-bottom: 2px solid #000000 !important;
  }
  body.a11y .footer-bottom {
    border-top: 2px solid #000000 !important;
  }
  body.a11y .disclaimer {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    border-left: 6px solid #000000 !important;
    color: #000000 !important;
    font-weight: 500 !important;
  }
  body.a11y .lang-notice {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    border-left: 6px solid #000000 !important;
    color: #000000 !important;
  }
  body.a11y img,
  body.a11y .wanted-photo img,
  body.a11y .modal-photo img {
    filter: grayscale(1) contrast(1.4) !important;
  }
  body.a11y .brand,
  body.a11y .emblem,
  body.a11y .emblem-light,
  body.a11y .footer-brand { color: #000000 !important; }
  body.a11y .report-status::before,
  body.a11y .wanted-card:hover {
    border-color: #000000 !important;
  }
  body.a11y .emergency-banner {
    background: #000000 !important;
    border-bottom: 3px solid #000000 !important;
  }
  body.a11y .emergency-banner * { color: #ffffff !important; }
  body.a11y .emergency-stripe {
    background: repeating-linear-gradient(-45deg, #ffffff 0 6px, #000000 6px 12px) !important;
  }
  body.a11y .news-item,
  body.a11y .news-list,
  body.a11y .map-wrap,
  body.a11y .hotline-wrap,
  body.a11y .qr-wrap {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
  }
  body.a11y .news-day,
  body.a11y .news-category,
  body.a11y .news-more,
  body.a11y .hotline-title {
    color: #000000 !important;
  }
  body.a11y .map-meta {
    background: #ffffff !important;
    border-bottom: 2px solid #000000 !important;
  }
  body.a11y .hotline-form input,
  body.a11y .hotline-form select,
  body.a11y .hotline-form textarea {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    color: #000000 !important;
  }
  body.a11y .hotline-note {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    border-left: 6px solid #000000 !important;
    color: #000000 !important;
  }
  body.a11y .hotline-success {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    color: #000000 !important;
  }
  body.a11y .timeline-time {
    border-right-color: #000000 !important;
  }
  body.a11y .qr-id { color: #000000 !important; }
  body.a11y .qr-svg { border: 2px solid #000000 !important; }
  body.a11y .qr-svg svg * { fill: #000000 !important; }
}

@layer responsive {
  @media (max-width: 980px) {
    .section-head { grid-template-columns: 48px 1fr; gap: 16px; }
    .section-num { font-size: 28px; }
    .footer-main { grid-template-columns: 1fr; }
    .report-head, .report-body > li { grid-template-columns: 140px 1fr 140px; }
    .report-head > div:nth-child(4), .report-body > li > :nth-child(4) { display: none; }
    .main-nav { display: none; }
    .main-nav.open { display: block; }
    .burger { display: flex; }
  }
  @media (max-width: 640px) {
    .utility-left > span:first-child, .utility-bar .divider { display: none; }
    .brand-sub { display: none; }
    .brand-title { font-size: 16px; }
    .emblem { width: 46px; height: 52px; }
    .report-head, .report-body > li { grid-template-columns: 1fr; gap: 8px; padding: 16px 18px; }
    .report-head { display: none; }
    .footer-bottom { flex-direction: column; text-align: left; }
    .footer-cols { flex-direction: column; gap: 24px; }
    .wanted-toolbar { flex-direction: column; align-items: stretch; }
    .search-box { max-width: none; }
    .hero-title { font-size: 26px; }
  }
}
