/* Validation package styles - layered on top of flux.css light theme */

body {
  font-family: var(--ff-sans);
  background: var(--surface-0);
  color: var(--text-primary);
  line-height: 1.65;
  padding: 0;
}

.page {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 32px 64px;
}

header.report-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 32px;
}
header.report-header h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
header.report-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

nav.section-nav {
  display: flex;
  gap: 6px;
  margin: 24px 0 32px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}
nav.section-nav a {
  padding: 6px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  background: var(--surface-1);
  transition: all 120ms;
}
nav.section-nav a:hover,
nav.section-nav a.current {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-0);
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 36px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}
h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--text-primary);
}
h4 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

p {
  margin-bottom: 14px;
}

table.report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 24px;
  font-size: 0.9rem;
}
table.report-table th,
table.report-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}
table.report-table th {
  font-weight: 600;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}
table.report-table td.num {
  font-family: var(--ff-mono);
  font-size: 0.86rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 18px 0 28px;
}
.metric {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.metric .metric-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.metric .metric-value {
  font-family: var(--ff-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.metric .metric-context {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.json-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 4px 4px 0;
  transition: all 120ms;
}
.json-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.json-link::before {
  content: "{ }";
  font-weight: 600;
  color: var(--accent);
}

.json-viewer {
  margin: 8px 0 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--surface-1);
}
.json-viewer summary {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  user-select: none;
}
.json-viewer summary:hover {
  color: var(--accent);
}
.json-viewer pre {
  padding: 12px 16px;
  margin: 0;
  max-height: 360px;
  overflow: auto;
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  background: var(--surface-0);
  border-top: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--r-md) var(--r-md);
  white-space: pre;
}

code, .mono { font-family: var(--ff-mono); font-size: 0.88em; }
code {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.84em;
}

.refs {
  margin: 32px 0;
  padding: 18px 22px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  font-size: 0.88rem;
}
.refs h4 { margin-top: 0; }
.refs ol { padding-left: 22px; }
.refs li { margin-bottom: 6px; list-style: decimal; }

footer.report-footer {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Soft auth gate */
#gate {
  position: fixed; inset: 0;
  background: var(--surface-0);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
#gate .gate-card {
  max-width: 400px; width: 90%;
  padding: 28px 32px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
#gate h2 { margin: 0 0 12px; font-size: 1.1rem; border: 0; padding: 0; }
#gate p { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 14px; }
#gate input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-0);
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 10px;
}
#gate input:focus { outline: none; border-color: var(--accent); }
#gate button {
  padding: 9px 18px;
  background: var(--accent);
  color: var(--accent-text);
  border: 0; border-radius: var(--r-md);
  font-weight: 500;
  cursor: pointer;
}
#gate button:hover { background: var(--accent-hover); }
#gate .gate-error { color: #b91c1c; font-size: 0.82rem; margin-top: 8px; min-height: 1em; }

/* Verdict tags */
.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tag.pass { background: #dcfce7; color: #166534; }
.tag.precise { background: #dbeafe; color: #1e40af; }
.tag.measured { background: #f1f5f9; color: #475569; }
.tag.scope { background: #fef3c7; color: #92400e; }
