:root {
  --ink: #122033;
  --muted: #5c6b7e;
  --line: #d8e0ea;
  --line-strong: #c5d0dc;
  --canvas: #eef2f6;
  --surface: #ffffff;
  --header: #0e1726;
  --header-line: #24344a;
  --accent: #1d4ed8;
  --accent-soft: #e8efff;
  --ok: #0d6b45;
  --ok-bg: #e5f6ee;
  --ok-line: #b7e4cc;
  --warn: #92400e;
  --warn-bg: #fef3e2;
  --warn-line: #f3d7a6;
  --gap: #9f2430;
  --gap-bg: #fdecee;
  --gap-line: #f4c4c9;
  --info: #1e40af;
  --info-bg: #e7efff;
  --info-line: #c5d6fb;
  --neutral: #3e4c5f;
  --neutral-bg: #eef2f6;
  --neutral-line: #d5dee8;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  --radius: 12px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 20;
  padding: 8px 12px;
  background: #fff;
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

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

.site-header {
  background: var(--header);
  color: #e8eef7;
  border-bottom: 1px solid var(--header-line);
}

.bar,
.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-product {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-org {
  margin-top: 3px;
  color: #9aadc4;
  font-size: 12px;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #31445f;
  border-radius: 999px;
  color: #d5e2f2;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3dd68c;
  box-shadow: 0 0 0 3px rgba(61, 214, 140, 0.16);
}

.hero {
  padding: 36px 0 8px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lede {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metrics div {
  padding: 16px 18px 14px;
}

.metrics div + div {
  border-left: 1px solid var(--line);
}

.metrics dd {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.metrics dt {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
}

.metrics p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.workspace {
  padding: 28px 0 64px;
}

.tablist {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line-strong);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
}

.tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.tab:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.card-link:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tab-count {
  min-width: 1.4em;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e4ebf3;
  color: var(--neutral);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.tab[aria-selected="true"] .tab-count {
  background: var(--accent-soft);
  color: var(--accent);
}

.banner {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--info-line);
  border-radius: 10px;
  background: var(--info-bg);
  color: #1e3a8a;
}

.banner.error {
  border-color: var(--gap-line);
  background: var(--gap-bg);
  color: var(--gap);
}

.panel {
  padding-top: 16px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 260px;
}

.field-narrow {
  flex-basis: 180px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.toolbar-note {
  margin: 0 0 8px auto;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

td:nth-child(n + 2),
th:nth-child(n + 2) {
  white-space: nowrap;
}

th {
  background: #f7f9fb;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

tbody tr:hover td {
  background: #f8fbfe;
}

.placeholder-row td,
.empty-cell {
  color: var(--muted);
  background: var(--surface);
}

.control-ref {
  display: inline-block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: #1e3a5f;
}

.control-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.control-desc {
  margin: 4px 0 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--neutral-line);
  border-radius: 999px;
  background: var(--neutral-bg);
  color: var(--neutral);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.badge-ok {
  background: var(--ok-bg);
  border-color: var(--ok-line);
  color: var(--ok);
}

.badge-warn {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--warn);
}

.badge-gap {
  background: var(--gap-bg);
  border-color: var(--gap-line);
  color: var(--gap);
}

.badge-info {
  background: var(--info-bg);
  border-color: var(--info-line);
  color: var(--info);
}

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

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: #b7c6d8;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-type {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card h2,
.card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card-meta {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--neutral);
  font-size: 13px;
}

.card-meta span {
  color: var(--muted);
}

.card-link {
  align-self: flex-start;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

.card-empty {
  min-height: 0;
  grid-column: 1 / -1;
  box-shadow: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #e7edf3;
  color: var(--muted);
  font-size: 13px;
}

.footer-bar {
  min-height: 64px;
  align-items: center;
}

.footer-bar p {
  margin: 0;
}

@media (max-width: 860px) {
  .hero-layout,
  .metrics {
    grid-template-columns: 1fr;
  }

  .metrics div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .bar,
  .footer-bar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .toolbar-note {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
