:root {
  color-scheme:light;
  --page:var(--alpha-page); --card:var(--alpha-surface); --line:var(--alpha-line);
  --ink:var(--alpha-ink); --sub:var(--alpha-muted); --green:var(--alpha-green);
  font:15px/1.5 var(--alpha-body);
}
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--alpha-background); }
a { color:inherit; text-decoration:none; }
button,input,select { font:inherit; color:inherit; }
button { cursor:pointer; }
h1,h2,h3,p { margin:0; }
h2 { font-size:1.1rem; letter-spacing:-.035em; }
.paused { display:inline-flex; color:#69481f; background:#f1e8d3; padding:.22rem .48rem; font-size:.75rem; font-weight:650; border-radius:6px; white-space:nowrap; }
main { width:min(1040px,calc(100% - 2.5rem)); margin:0 auto 3.8rem; display:grid; grid-template-columns:minmax(0,1.18fr) minmax(0,1fr); gap:1rem; align-items:start; }
main section { min-width:0; border:1px solid var(--line); border-radius:18px; background:var(--card); padding:1.15rem; }
.composer { grid-column:1/-1; border:0; background:transparent; text-align:center; }
.composer { padding:clamp(3.2rem,11vh,6.65rem) 0 2.6rem; }
.composer h1 { max-width:26ch; margin:0 auto; font-size:clamp(2.25rem,5.2vw,3.85rem); line-height:1.04; font-weight:680; letter-spacing:-.077em; }
.thesis { display:flex; align-items:center; justify-content:space-between; text-align:left; gap:.55rem; width:min(630px,100%); margin:2rem auto .95rem; padding:.36rem; border:1px solid #d0d7ce; border-radius:16px; background:#fff; box-shadow:0 10px 35px #1b3b2310; }
.thesis:focus-within { border-color:#799b87; }
.thesis input { width:100%; min-width:0; padding:.62rem .64rem; border:0; background:transparent; font-size:1rem; }
.thesis input:focus-visible { outline:0; }
.thesis input::placeholder { color:#627066; }
.thesis button { display:inline-flex; align-items:center; gap:.3rem; border:0; border-radius:11px; padding:.55rem .72rem; min-height:42px; background:#174a3a; color:#fff; font-size:.87rem; font-weight:670; white-space:nowrap; }
.thesis button:hover,.primary:hover { background:#23654d; }
#strategy-error { max-width:550px; margin:-.15rem auto .8rem; color:#a03b38; font-size:.82rem; }
.starter-pills { display:flex; flex-wrap:wrap; justify-content:center; gap:.45rem; }
.starter-pills button { border:1px solid var(--line); border-radius:999px; background:transparent; padding:.38rem .74rem; font-size:.83rem; font-weight:520; }
.starter-pills button:hover { background:#e9eee7; border-color:#ced8cf; }
.alpha-hero { grid-column:1/-1; background:#eaf0e7; }
.home-alpha { display:grid; grid-template-columns:minmax(0,1.18fr) minmax(0,1fr); padding:0; overflow:hidden; }
.alpha-hero-content { padding:1.35rem; }
.alpha-field { width:100%; height:100%; min-height:200px; object-fit:cover; object-position:center 48%; display:block; background:#203e2a; }
.alpha-bio { display:flex; align-items:center; gap:.72rem; }
.alpha-bio img { border-radius:12px; background:#223a37; object-fit:cover; width:56px; height:56px; }
.alpha-bio h2 { font-size:1.65rem; line-height:1.05; letter-spacing:-.06em; }
.sports-tag,.muted,.empty { color:var(--sub); font-size:.82rem; }
.alpha-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.3rem; margin:1rem 0; }
.alpha-metrics > div { padding:.3rem .45rem .3rem 0; }
.alpha-metrics > div + div { padding-left:.6rem; border-left:1px solid #d4dfd3; }
.alpha-metrics small { display:block; color:var(--sub); }
.alpha-metrics strong { font:670 clamp(1rem,4.5vw,1.55rem)/1.27 var(--alpha-body); font-variant-numeric:tabular-nums; }
.favorite,.panel-head { display:flex; align-items:center; justify-content:space-between; gap:.65rem; }
.favorite { padding-top:.65rem; border-top:1px solid #d4dfd3; }
.favorite h3 { margin-bottom:.27rem; font-size:.82rem; font-weight:650; }
.action,.follow,.close { border:1px solid var(--line); border-radius:8px; background:var(--card); padding:.41rem .61rem; white-space:nowrap; font-size:.83rem; font-weight:620; }
.action:hover,.follow:hover { border-color:#6b9785; }
.primary { background:#174a3a; color:#fff; border-color:#174a3a; }
.record-panel { grid-column:2; grid-row:3; }
.leader-panel { grid-column:1; grid-row:3/span 2; scroll-margin-top:80px; }
.portfolio-panel { grid-column:2; scroll-margin-top:90px; }
#portfolio-heading { scroll-margin-top:90px; }
.board-controls { display:flex; align-items:center; justify-content:space-between; gap:.4rem; padding:.45rem 0 .22rem; }
.board-controls select { font-size:.79rem; border:1px solid var(--line); border-radius:6px; background:var(--page); padding:.26rem .35rem; }
table { width:100%; border-collapse:collapse; font-size:.82rem; font-variant-numeric:tabular-nums; margin-top:.38rem; }
th,td { text-align:right; padding:.49rem .25rem; border-bottom:1px solid var(--line); white-space:nowrap; }
th:first-child,td:first-child { text-align:left; white-space:normal; padding-left:0; }
thead th { color:var(--sub); font-weight:550; }
tbody th { font-weight:640; }
tbody th small,tbody td small { color:var(--sub); display:block; font-weight:420; }
.rank { color:var(--sub); padding-right:.35rem; font-variant-numeric:tabular-nums; }
.agent-name { border:0; background:none; padding:0; text-align:left; font-size:inherit; font-weight:650; }
.agent-name:hover,.benchmark th,.good { color:var(--green); }
.agent-rule { margin-top:.35rem; }
.empty { padding:.78rem 0 .15rem; }
.bad,#form-error { color:#a03b38; }
.portfolio-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:.35rem; margin:.48rem 0; }
.portfolio-metrics dt { color:var(--sub); font-size:.78rem; }
.portfolio-metrics dd { margin:0; font-weight:650; }
.portfolio-list { display:flex; flex-wrap:wrap; gap:.3rem; margin-bottom:.3rem; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
dialog { background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:17px; padding:1.15rem; width:min(440px,calc(100% - 1.5rem)); }
dialog::backdrop { background:#111d1880; }
dialog label { display:grid; gap:.25rem; font-size:.83rem; color:var(--sub); margin:.64rem 0 .2rem; }
dialog input,dialog select { width:100%; min-width:0; border:1px solid var(--line); border-radius:7px; padding:.5rem; background:var(--page); }
dialog.building { width:min(490px,calc(100% - 1.5rem)); padding:clamp(1rem,4vw,1.45rem); }
.field-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem; }
.builder-help { margin:.4rem 0 0; color:var(--sub); font-size:.8rem; }
.builder-advanced { margin:.85rem 0 0; padding:.55rem 0; border-top:1px solid var(--line); }
.builder-advanced summary { width:fit-content; color:var(--green); font-size:.82rem; font-weight:620; cursor:pointer; }
.builder-advanced label { margin-top:.3rem; }
.dialog-actions { display:flex; justify-content:flex-end; gap:.4rem; }
#form-error { margin:.38rem 0; font-size:.82rem; }
.record-page { grid-template-columns:minmax(0,1fr); margin-top:2.6rem; }
.record-page .alpha-hero { padding:1.55rem; }
.record-page h1 { font-size:clamp(2rem,7vw,2.65rem); line-height:1.05; letter-spacing:-.064em; }
.record-method { margin-top:.64rem; color:var(--sub); font-size:.82rem; }
.record-method summary { cursor:pointer; width:fit-content; }
.record-method p { margin-top:.3rem; }
:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
@media(max-width:760px) {
  main { grid-template-columns:minmax(0,1fr); width:calc(100% - 2rem); }
  .record-panel,.leader-panel,.portfolio-panel { grid-area:auto; }
  .leader-panel { order:1; } .portfolio-panel { order:2; }
  .home-alpha { grid-template-columns:1fr; }
  .alpha-field { height:122px; min-height:0; }
}
@media(max-width:420px) {
  main section,.record-page .alpha-hero { padding:.9rem; }
  .home-alpha,.composer { padding-inline:0; }
  .home-alpha { padding:0; }
  .alpha-hero-content { padding:.85rem; }
  .optional { display:none; }
  .follow { padding:.3rem .38rem; }
}
