:root {
  --bg0: #061b34;
  --bg1: #0a2d52;
  --bg2: #0f4174;
  --panel: #f7fbff;
  --panel2: #eef6ff;
  --ink: #10243e;
  --muted: #5e728a;
  --line: #c9def4;
  --blue: #2d70d6;
  --blue2: #67a7ff;
  --blue3: #d8ebff;
  --deep: #092746;
  --ok: #157347;
  --warn: #a76500;
  --danger: #a02b36;
  --shadow: 0 22px 70px rgba(0, 25, 70, .26);
  --soft-shadow: 0 10px 28px rgba(3, 47, 93, .12);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(88, 169, 255, .24), transparent 34rem),
    radial-gradient(circle at 90% 2%, rgba(54, 121, 227, .25), transparent 32rem),
    linear-gradient(150deg, var(--bg0), var(--bg1) 46%, var(--bg2));
  min-height: 100vh;
}
a { color: var(--blue); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(12, 73, 133, .08);
  border: 1px solid rgba(12, 73, 133, .14);
  padding: .08rem .32rem;
  border-radius: 8px;
}
.topbar {
  width: min(100% - 2rem, 1440px);
  margin: 1rem auto 0;
  padding: 1rem;
  border: 1px solid rgba(196, 225, 255, .22);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(4, 29, 58, .64);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
}
.site-hero { position: sticky; top: .75rem; z-index: 20; }
.brand-block { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.sn-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  text-decoration: none;
  color: #eaf6ff;
  font-weight: 950;
  letter-spacing: -.06em;
  border: 1px solid rgba(202, 228, 255, .42);
  background: linear-gradient(135deg, #0e3c6d, #2d70d6 58%, #6fb6ff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 14px 36px rgba(0,0,0,.18);
}
.eyebrow {
  color: #9fd0ff;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .76rem;
  font-weight: 800;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.08; }
h1 {
  margin-top: .2rem;
  color: #fff;
  font-size: clamp(2rem, 4vw, 4.3rem);
  letter-spacing: -.055em;
}
.subtitle {
  max-width: 860px;
  margin: .65rem 0 0;
  color: #d7eaff;
  font-size: 1.03rem;
  line-height: 1.55;
}
.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
}
.topnav a {
  color: #e7f4ff;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid rgba(202, 228, 255, .24);
  border-radius: 999px;
  padding: .58rem .82rem;
  background: rgba(13, 64, 116, .44);
}
.topnav a:hover { background: rgba(45, 112, 214, .55); border-color: rgba(220, 238, 255, .55); }
.version-card {
  color: #fff;
  border: 1px solid rgba(199, 229, 255, .28);
  background: rgba(255,255,255,.08);
  border-radius: 20px;
  padding: .78rem 1rem;
  text-align: right;
  min-width: 178px;
}
.version-card strong { display: block; font-size: 1.02rem; }
.version-card span { color: #bfddff; font-size: .84rem; }
.shell { width: min(100% - 2rem, 1440px); margin: 1.25rem auto 0; padding-bottom: 2.5rem; }
.grid { display: grid; gap: 1rem; }
.two-col { grid-template-columns: minmax(0, 1fr) minmax(360px, .76fr); }
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(238, 247, 255, .96));
  border: 1px solid rgba(212, 231, 250, .92);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--soft-shadow);
  margin-bottom: 1rem;
}
.panel h2 { font-size: clamp(1.45rem, 2.2vw, 2rem); color: var(--deep); margin-bottom: .6rem; }
.panel h3 { font-size: 1.34rem; color: var(--deep); margin-bottom: .85rem; }
.panel h4 { color: #173d68; margin-bottom: .45rem; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.upload-panel { position: relative; overflow: hidden; }
.upload-panel::before, .science-panel::before, .method-panel::before {
  content: "";
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #0e5caa, #65a9ff, #b7dcff);
  border-radius: 999px;
  margin-bottom: 1rem;
}
.stacked-form { display: grid; gap: .88rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; }
label { display: grid; gap: .35rem; font-weight: 800; color: #15375d; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: .78rem .88rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(7, 49, 91, .04);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(45,112,214,.15); }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b55a0, #2d70d6);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  padding: .82rem 1.18rem;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(45,112,214,.25);
}
button:hover, .button:hover { transform: translateY(-1px); }
.button.secondary { background: #e8f4ff; color: #0d4b86; border: 1px solid #b9dcff; box-shadow: none; }
details {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: .8rem .9rem;
  background: rgba(255,255,255,.66);
}
details + details { margin-top: .7rem; }
summary { cursor: pointer; font-weight: 900; color: #0d4b86; }
.form-details label { margin-top: .82rem; }
.mini-list { display: flex; flex-wrap: wrap; gap: .48rem; margin: .85rem 0 1rem; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .34rem .58rem;
  font-size: .78rem;
  font-weight: 900;
  color: #0e3a66;
  background: var(--blue3);
  border: 1px solid #aed3fb;
}
.badge.required, .badge.caution, .badge.warn, .badge.gap, .badge.low_depth { color: #5d3a00; background: #fff2c9; border-color: #f1ca70; }
.badge.error, .badge.danger { color: #7a1620; background: #ffe3e7; border-color: #f3aeb8; }
.badge.ok, .badge.available, .badge.provided, .badge.observed, .badge.review_notes_present { color: #0b4d2e; background: #dcf8ea; border-color: #9ee2bc; }
.badge.review, .badge.context, .badge.scope, .badge.exploratory, .badge.provided_or_relevant { color: #0b4a82; background: #e2f1ff; border-color: #9ed0ff; }
.alert, .warning-box, .callout {
  border-radius: 18px;
  padding: .92rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #b7dbff;
  background: #e7f4ff;
  color: #123c66;
}
.alert.error { border-color: #f2a9b1; background: #ffe7ea; color: #821b27; }
.warning-box { border-color: #9ecaff; background: linear-gradient(180deg, #e9f5ff, #f8fcff); }
.callout { font-weight: 900; text-transform: capitalize; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.report-head h2 { color: var(--deep); margin: .18rem 0 .2rem; }
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 1rem 0;
  padding: .45rem;
  border-radius: 18px;
  background: #dceeff;
  border: 1px solid #b9d9f7;
}
.tab {
  box-shadow: none;
  background: transparent;
  color: #15446f;
  border: 1px solid transparent;
  padding: .62rem .82rem;
}
.tab.active { background: #0d4f91; color: #fff; border-color: #0d4f91; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.cards, .tool-grid, .recent-list { display: grid; gap: .85rem; }
.cards { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.tool-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.metric-card, .tool-card, .message-card, .comment-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  padding: 1rem;
}
.metric-card.accent-card { background: linear-gradient(180deg, #f8fcff, #eaf5ff); border-color: #a8d2ff; }
.metrics { display: grid; grid-template-columns: minmax(110px, .9fr) 1.1fr; gap: .4rem .75rem; margin: .4rem 0 0; }
.metrics dt { color: var(--muted); font-weight: 800; }
.metrics dd { margin: 0; font-weight: 900; color: #15375d; word-break: break-word; }
.message-list { display: grid; gap: .7rem; margin: .9rem 0; }
.message-card p { margin: .55rem 0 0; line-height: 1.5; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: #fff; margin: .85rem 0 1rem; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: .78rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid #e1eefc; }
th { background: #eaf5ff; color: #0d3e70; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
.score-pill {
  display: inline-flex;
  min-width: 3.1rem;
  justify-content: center;
  border-radius: 999px;
  padding: .42rem .62rem;
  font-weight: 950;
  color: #0f2b4f;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}
.priority-summary-cards { margin: 0 0 1rem; }
.compact-list { margin: .35rem 0 .35rem 1.1rem; padding: 0; }
.compact-list li { margin: .25rem 0; }
.evidence-list { font-size: .82rem; }
.tool-card.available { border-color: #9ee2bc; }
.tool-card.missing { border-color: #f1ca70; }
.recent-list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.recent-item {
  display: grid;
  gap: .22rem;
  padding: .9rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  background: #f8fbff;
}
.recent-item:hover, .recent-item.active { border-color: var(--blue); box-shadow: 0 7px 20px rgba(45,112,214,.15); }
.comment-card { margin-bottom: .75rem; }
.comment-card span { color: var(--muted); margin-left: .5rem; font-size: .85rem; }
.footer { color: #dcecff; text-align: center; padding: 2rem 1rem 3rem; }
@media (max-width: 1100px) {
  .topbar { grid-template-columns: 1fr; }
  .version-card { text-align: left; width: fit-content; }
  .site-hero { position: static; }
}
@media (max-width: 880px) {
  .two-col, .form-grid { grid-template-columns: 1fr; }
  .shell, .topbar { width: min(100% - 1rem, 1440px); }
  .report-head { flex-direction: column; }
  h1 { font-size: 2.15rem; }
  .metrics { grid-template-columns: 1fr; }
}
.badge.supporting, .badge.parsed, .badge.structured_authentication_evidence_imported { color: #0b4d2e; background: #dcf8ea; border-color: #9ee2bc; }
.badge.warning, .badge.high_contamination_estimate, .badge.partial_authentication_evidence_imported { color: #7a1620; background: #ffe3e7; border-color: #f3aeb8; }
.report-actions, .table-actions, .table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  justify-content: flex-end;
}
.report-actions { max-width: 620px; }
.small-button { padding: .55rem .78rem; font-size: .86rem; box-shadow: none; }
.table-controls { justify-content: space-between; margin: .8rem 0 .35rem; }
.table-search-label { display: flex; align-items: center; gap: .5rem; min-width: min(100%, 420px); }
.table-search-label input { padding: .52rem .7rem; border-radius: 999px; }
.interactive-table th { cursor: pointer; user-select: none; }
.interactive-table th:hover { background: #d7ecff; }
.chart-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  padding: .9rem;
  margin: 1rem 0;
}
.chart-title { font-weight: 900; color: #123c66; margin-bottom: .4rem; }
.chart-card canvas { width: 100%; height: auto; display: block; }
@media (max-width: 880px) {
  .report-actions, .table-actions, .table-controls { justify-content: flex-start; }
  .table-search-label { flex-direction: column; align-items: flex-start; }
}
