:root {
  color-scheme: light;
  --ink: #16233a;
  --ink-soft: #4a5670;
  --paper: #e7eaee;
  --card: #ffffff;
  --seal: #a32b2b;
  --rule: #c7ccd5;
  --info: #27567f;
  --focus: #0b63ce;
  --shadow: 0 1px 0 rgba(22, 35, 58, 0.06), 0 2px 10px rgba(22, 35, 58, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

.site-header {
  padding: 32px 0 26px;
  color: #fff;
  background: var(--ink);
  border-bottom: 4px solid var(--seal);
}

.environment-label {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 9px;
  color: #fff;
  background: var(--seal);
  border-radius: 3px;
  font: 700 0.75rem/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.05em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.15;
}

.lede {
  max-width: 760px;
  margin: 12px 0 0;
  color: #dfe5ee;
}

main {
  min-height: 56vh;
  padding-block: 30px 48px;
}

.category + .category {
  margin-top: 34px;
}

.category-title {
  margin: 0 0 14px;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.record-card {
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.record-type,
.record-risk {
  padding: 4px 7px;
  border-radius: 3px;
  background: #eef2f7;
  color: var(--ink-soft);
  font: 700 0.7rem/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.record-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.record-description,
.record-owner,
.record-warning {
  margin: 10px 0 0;
}

.record-owner {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.record-warning {
  padding: 10px 12px;
  background: #fff7e7;
  border-left: 3px solid #8f5d0c;
}

.eligibility {
  margin: 12px 0 0;
  padding-left: 20px;
}

.resource-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  color: #fff;
  background: var(--info);
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
}

.resource-link:hover {
  background: #1d4568;
}

a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.state {
  margin: 0;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--rule);
}

.state-error {
  color: #7d1919;
  border-color: #c77d7d;
}

.site-footer {
  padding: 18px 0;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 420px) {
  .shell {
    width: min(100% - 20px, 1080px);
  }

  .site-header {
    padding-top: 22px;
  }

  .record-card {
    padding: 16px;
  }

  .resource-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
