/* Edge Lab — shared styling for the public system-test deliverables */
:root {
  --fg: #1f2937;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --amber: #d97706;
  --green: #059669;
  --red: #dc2626;
  --maxw: 980px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
header.site {
  background: linear-gradient(120deg, #0f172a, #1e3a8a);
  color: #fff;
  padding: 38px 0 30px;
}
header.site .wrap { color: #fff; }
header.site h1 { margin: 0 0 6px; font-size: 1.9rem; letter-spacing: -0.02em; }
header.site .sub { color: #cbd5e1; font-size: 1.02rem; }
header.site a { color: #bfdbfe; }
.crumbs { font-size: 0.85rem; color: #94a3b8; margin-bottom: 14px; }
.crumbs a { color: #cbd5e1; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

main { padding: 30px 0 60px; }
h2 { font-size: 1.45rem; margin: 2.2em 0 0.6em; padding-bottom: 0.25em; border-bottom: 2px solid var(--border); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 0.5em; }
p { margin: 0.7em 0; }
a { color: var(--accent); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--bg-soft); padding: 0.1em 0.35em; border-radius: 4px; border: 1px solid var(--border); }
pre { background: #0f172a; color: #e2e8f0; padding: 16px 18px; border-radius: 10px; overflow-x: auto; font-family: var(--mono); font-size: 0.85rem; line-height: 1.55; }
pre code { background: none; border: none; color: inherit; padding: 0; }

.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; vertical-align: middle; }
.badge.eval { background: #fef3c7; color: #92400e; }
.badge.long { background: #dcfce7; color: #166534; }
.badge.nopromo { background: #fee2e2; color: #991b1b; }

.tldr { background: var(--accent-soft); border: 1px solid #bfdbfe; border-left: 4px solid var(--accent); border-radius: 8px; padding: 16px 20px; margin: 22px 0; }
.tldr h3 { margin-top: 0; color: #1e40af; }
.tldr ul { margin: 0.4em 0; padding-left: 1.2em; }

.note { background: var(--bg-soft); border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: 8px; padding: 12px 18px; margin: 18px 0; font-size: 0.95rem; }
.note.warn { border-left-color: var(--amber); background: #fffbeb; }

table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 0.92rem; }
th, td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--border); }
th:first-child, td:first-child { text-align: left; }
thead th { background: var(--bg-soft); border-bottom: 2px solid var(--border); font-weight: 600; }
tbody tr:hover { background: var(--bg-soft); }
td.pos { color: var(--green); font-weight: 600; }
td.neg { color: var(--red); font-weight: 600; }
td.dd { color: var(--muted); font-size: 0.85em; }
td.hi { font-weight: 700; }
.tbl-scroll { overflow-x: auto; }
table.compact th, table.compact td { padding: 6px 9px; font-size: 0.85rem; }
table tr.tot td { border-top: 2px solid #9ca3af; background: var(--bg-soft); }

/* ── Portfolio Manager-briefing edition components ── */
.editions { font-size: 0.85rem; margin: 14px 0 0; }
.editions a, .editions span { display: inline-block; padding: 4px 11px; border-radius: 999px; text-decoration: none; border: 1px solid var(--border); margin-right: 6px; }
.editions .here { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.editions a { color: var(--fg); }
.editions a:hover { background: var(--accent-soft); }
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 14px 20px; margin: 20px 0; font-size: 1.02rem; }
.callout strong { color: #1e40af; }
.lead { font-size: 1.12rem; line-height: 1.7; }
.cta { border: 1px solid #bfdbfe; background: linear-gradient(120deg, #f8fafc, #eff6ff); border-radius: 14px; padding: 26px 28px; margin: 34px 0 10px; }
.cta h2 { border: none; margin-top: 0; }
.cta h3 { margin: 18px 0 6px; }
.btn { display: inline-block; background: var(--accent); color: #fff !important; text-decoration: none; font-weight: 600; padding: 12px 22px; border-radius: 9px; margin: 10px 0 4px; }
.btn:hover { background: #1e40af; }
.cta .fine { color: var(--muted); font-size: 0.85rem; }
details.acc { border: 1px solid var(--border); border-radius: 10px; padding: 0 16px; margin: 18px 0; background: var(--bg-soft); }
details.acc[open] { padding-bottom: 12px; }
details.acc > summary { cursor: pointer; padding: 13px 0; font-weight: 600; list-style: none; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::before { content: "▸ "; color: var(--muted); }
details.acc[open] > summary::before { content: "▾ "; }
/* Monthly-returns heatmap grid */
table.monthly { font-size: 0.78rem; border-collapse: collapse; }
table.monthly th, table.monthly td { padding: 4px 7px; text-align: center; border: 1px solid #fff; white-space: nowrap; }
table.monthly thead th { background: var(--bg-soft); border-bottom: 2px solid var(--border); font-weight: 600; }
table.monthly tbody tr:hover { background: none; }
table.monthly td.yhdr { text-align: left; font-weight: 600; background: var(--bg-soft); }
table.monthly td.yr { border-left: 2px solid #9ca3af; }
table.monthly td.spy { color: var(--muted); border-left: 1px solid var(--border); }
table.monthly tfoot td { background: var(--bg-soft); font-size: 0.82rem; color: var(--fg); text-align: left; padding: 8px 10px; }

figure { margin: 22px 0; }
figure img { width: 100%; border: 1px solid var(--border); border-radius: 10px; }
figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 8px; text-align: center; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 22px 0; }
.card { border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; background: var(--bg); transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 6px 20px rgba(15,23,42,.08); transform: translateY(-2px); }
.card h3 { margin-top: 0; }
.card a { text-decoration: none; }
.card .meta { color: var(--muted); font-size: 0.85rem; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 20px 0; }
.metric { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--bg-soft); }
.metric .k { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.metric .v { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 3px; }

.filelist { list-style: none; padding: 0; }
.filelist li { border: 1px solid var(--border); border-radius: 8px; margin: 8px 0; }
.filelist a { display: flex; justify-content: space-between; padding: 11px 16px; text-decoration: none; color: var(--fg); }
.filelist a:hover { background: var(--accent-soft); }
.filelist .desc { color: var(--muted); font-size: 0.85rem; font-weight: 400; }

footer.site { border-top: 1px solid var(--border); padding: 26px 0; color: var(--muted); font-size: 0.85rem; }
.toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 14px 20px; margin: 20px 0; }
.toc ol { margin: 0.3em 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
