:root {
  color-scheme: dark; --bg:#141414; --menu:#191919; --panel:#1d1d1d; --raised:#242424;
  --line:#303030; --accent:#f5bc32; --text:#f1f1f1; --muted:#a6a6a6; --radius:5px;
  --workspace:clamp(1100px,70vw,1580px); --side:clamp(200px,11vw,248px); --top-height:59px;
  --gutter:clamp(18px,2.1vw,40px); --gap:clamp(10px,1vw,18px);
  font: clamp(15px,calc(14px + .12vw),17px)/1.5 Inter, system-ui, sans-serif;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); }
a { color:var(--accent); text-underline-offset:.2em; }
button,input,textarea { font:inherit; }
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.top { border-bottom:1px solid var(--line); background:var(--menu); }
.brand { color:var(--text); text-decoration:none; font-weight:750; }
.division { border-left:1px solid var(--line); padding-left:16px; font-size:.9rem; }
.account { display:flex; align-items:center; gap:12px; margin-inline-start:auto; }
.account a { display:flex; align-items:center; gap:8px; text-decoration:none; color:var(--text); }
.account small { display:block; color:var(--muted); line-height:1.2; }
.avatar { display:grid; place-items:center; width:32px; height:32px; background:var(--raised); border:1px solid var(--line); border-radius:50%; }
.shell { display:grid; grid-template-columns:var(--side) minmax(0,1fr); min-height:calc(100svh - var(--top-height)); }
.shell.guest { display:block; min-height:0; }
aside { background:var(--menu); border-right:1px solid var(--line); padding:14px 10px; }
aside nav { display:grid; gap:5px; }
aside a,.tabs a { padding:7px 12px; text-decoration:none; color:var(--text); border-radius:var(--radius); }
aside a:hover,.tabs a:hover { background:var(--raised); }
aside [aria-current=page],.tabs a.active,.primary { background:var(--accent); color:#201806; font-weight:700; }
main { width:min(100%,var(--workspace)); min-width:0; margin-inline:auto; padding:clamp(22px,2.2vw,42px) var(--gutter) 48px; }
.guest main { width:min(100%,520px); margin-inline:auto; }
h1 { margin:0 0 4px; font-size:clamp(1.45rem,3vw,1.8rem); line-height:1.25; }
h2 { margin:0; font-size:1.15rem; }
.muted { margin:0 0 18px; color:var(--muted); }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); }
.shortcuts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--gap); margin:18px 0 28px; }
.shortcuts a { display:grid; place-items:center; min-height:76px; text-align:center; padding:12px; font-weight:650; text-decoration:none; color:var(--text); }
.shortcuts a:hover,.list a:hover { background:var(--raised); }
.section-head,.list a { display:flex; justify-content:space-between; gap:8px 14px; align-items:center; flex-wrap:wrap; }
.section-head { margin:14px 0 8px; }
.list a,.list p { padding:10px 14px; margin:0; text-decoration:none; color:var(--text); }
.list a+a { border-top:1px solid var(--line); }
.list small { color:var(--muted); }
.badge { color:var(--accent)!important; }
.tabs { display:flex; flex-wrap:wrap; gap:8px; margin-block:14px; }
.tabs a,button { border:1px solid var(--line); background:var(--raised); }
button { min-height:38px; padding:6px 12px; border-radius:var(--radius); color:var(--text); cursor:pointer; }
.primary { padding:8px 14px; }
.form { display:grid; gap:12px; padding:16px; justify-items:start; }
label { width:100%; display:grid; gap:4px; }
label.check { display:flex; align-items:center; gap:8px; }
input,textarea { width:100%; border:1px solid var(--line); border-radius:var(--radius); background:var(--bg); color:var(--text); padding:8px; }
input[type=checkbox] { width:auto; accent-color:var(--accent); }
textarea { min-height:160px; resize:vertical; }
.table { max-width:100%; overflow:auto; overscroll-behavior-inline:contain; }
table { width:100%; border-collapse:collapse; text-align:left; }
th,td { padding:8px 12px; border-bottom:1px solid var(--line); }
th { background:var(--raised); }
tr:last-child td { border-bottom:0; }
.profile { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr); padding:14px; gap:8px; }
.profile dt { color:var(--muted); }
.profile dd { margin:0; }
.prose { padding:16px; white-space:pre-wrap; overflow-wrap:anywhere; }
.notice { padding:10px 12px; border:1px solid #633838; border-radius:var(--radius); background:#332424; }
.material-search { display:flex; gap:8px; max-width:540px; margin-bottom:14px; }
.material-search button { white-space:nowrap; }
.material-summary { display:block; margin-top:3px; }
.material-body { padding:clamp(14px,3vw,26px); overflow-wrap:anywhere; }
.material-body > :first-child { margin-top:0; }
.material-body > :last-child { margin-bottom:0; }
.material-body blockquote { margin-inline:0; padding:8px 12px; border-left:3px solid var(--accent); background:var(--raised); }
.material-body pre,.forum-post-table { overflow:auto; }
.material-body pre { padding:10px; background:var(--bg); }
.material-body .forum-post-table { margin-bottom:1em; }
.form select { font:inherit; color:var(--text); background:var(--bg); padding:7px; border:1px solid var(--line); border-radius:var(--radius); }
.work-categories { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.work-categories a { color:var(--text); font-weight:700; padding:24px; text-decoration:none; }
.work-categories a:hover { border-color:var(--accent); }
.work-fields { display:grid; width:100%; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.workflow-bar { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin-block:8px; }
.work-cta { color:#201806; background:var(--accent); border-radius:var(--radius); padding:7px 12px; text-decoration:none; font-weight:700; }
.work-badge { display:inline-block; padding:3px 7px; color:#f5d485; background:#392e17; border-radius:4px; font-size:.875rem; white-space:nowrap; }
.work-event { padding:9px 13px; border-bottom:1px solid var(--line); }
.work-event:last-child { border-bottom:0; }
.work-event small { color:var(--muted); }
.work-message { white-space:pre-wrap; overflow-wrap:anywhere; }
.work-history-title,.work-reply { margin-top:14px; }
.top-inner { width:100%; display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:9px var(--gutter); min-height:58px; }
aside { padding-inline:12px; }
.shortcuts a { min-height:94px; }
.point-count { text-align:right; font-variant-numeric:tabular-nums; }
.crumbs { display:flex; flex-wrap:wrap; gap:7px; color:var(--muted); font-size:.875rem; margin-bottom:12px; }
.crumbs a { color:var(--accent); text-decoration:none; }
.curator-label,.leader-points { color:var(--accent); }
.leader-faction { display:block; color:var(--muted); }
.leader-table th { white-space:nowrap; }
.leader-table td { vertical-align:top; }
.status-active,.status-idle { display:inline-block; padding:2px 7px; border-radius:4px; background:#282828; white-space:nowrap; }
.status-active { background:#213b2c; color:#c6ebd0; }
.report-subnav { margin-inline:24px 0; border-left:1px solid var(--line); display:grid; }
.report-subnav a { font-size:.875rem; padding-block:4px; }
aside nav > a { display:flex; align-items:center; gap:9px; }
.portal-icon { display:inline-block; width:15px; height:15px; border:1.5px solid currentColor; border-radius:3px; flex:none; position:relative; }
.portal-icon--home { transform:rotate(45deg) scale(.8); }
.portal-icon--info,.portal-icon--group { border-radius:50%; }
.portal-icon--info::before { content:'i'; position:absolute; inset:-3px 0 0; text-align:center; font-size:11px; font-weight:700; }
.portal-icon--table::before,.portal-icon--document::before { content:''; position:absolute; inset:3px 2px; border-block:1px solid currentColor; }
.portal-icon--chat::after { content:''; position:absolute; bottom:-3px; left:2px; width:4px; height:4px; border-left:1px solid currentColor; }
.shortcuts a { align-content:center; gap:10px; }
.shortcuts .portal-icon { width:21px; height:21px; color:var(--accent); }
.shortcuts .portal-icon--info::before { inset:0; font-size:14px; }
.work-upload { border:1px solid var(--line); padding:10px; border-radius:var(--radius); }
.work-upload small { color:var(--muted); }
.notice-link { min-height:32px; padding-inline:5px; }
.portal-icon--bell { border-radius:8px 8px 3px 3px; width:12px; height:12px; }
.portal-icon--bell::after { content:''; position:absolute; width:4px; height:2px; left:2px; bottom:-4px; background:currentColor; }
.profile-menu { position:relative; }
.profile-menu summary { list-style:none; display:flex; align-items:center; gap:9px; cursor:pointer; padding:4px; }
.profile-menu summary::-webkit-details-marker { display:none; }
.profile-menu summary::after { content:''; width:6px; height:6px; border-right:1px solid currentColor; border-bottom:1px solid currentColor; transform:rotate(45deg); margin:0 3px 4px; }
.profile-menu-list { position:absolute; z-index:2; right:0; top:100%; min-width:155px; padding:8px; }
.profile-menu-list a { padding:5px; }
.profile-menu-list form { margin-top:5px; }
.profile-menu-list button { width:100%; text-align:left; }
.work-categories a { display:grid; gap:12px; align-content:center; min-height:124px; }
.work-categories .portal-icon { color:var(--accent); width:21px; height:21px; }

.leader-table th:first-child,.leader-table td:first-child { width:3.1rem; text-align:center; color:var(--muted); }
.leader-table .point-count { text-align:center; width:12%; }
.leader-table th,.leader-table td { vertical-align:middle; }
.leader-table tbody tr:hover { background:#232323; }
.leader-faction { margin-top:3px; }
.leader-table .leader-points { font-weight:700; }
.metric-picker { grid-template-columns:minmax(0,1fr) auto; align-items:end; }
.metric-picker,.metric-profile,.metric-form { max-width:790px; margin-bottom:14px; }
.metric-profile { padding:16px; }
.metric-profile .muted { margin:2px 0 12px; }
.metric-values { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:0; border-top:1px solid var(--line); padding-top:11px; gap:9px; }
.metric-values dt { color:var(--muted); font-size:.875rem; overflow-wrap:anywhere; }
.metric-values dd { margin:3px 0 0; font-size:1.2rem; font-weight:750; font-variant-numeric:tabular-nums; }
.metric-fields { width:100%; display:grid; grid-template-columns:2fr 1fr; gap:12px; }
.metric-success { border-color:#385642; background:#21352a; }
.admin-tools { margin-top:12px; }
.portal-nav > summary { display:none; }
.shortcuts a,.work-categories a { transition:background-color .15s,border-color .15s; }
.shortcuts a:hover,.work-categories a:hover { border-color:#786331; }
.form > label,.metric-fields > label,.work-fields > label { min-width:0; }
input,select,textarea { min-width:0; max-width:100%; }
.table:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.material-body { max-width:100%; }
th { font-size:.875rem; font-weight:650; }
.leader-table th:nth-child(5) { white-space:normal; }
.profile-menu summary > span:not(.avatar) { min-width:0; overflow-wrap:anywhere; }
.avatar { flex:none; }
@media (max-width:1024px) {
  :root { --side:178px; --gutter:20px; }
  .shortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .work-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  th,td { padding-inline:9px; }
}
@media (max-width:760px) {
  :root { --gutter:16px; }
  .shell { grid-template-columns:minmax(0,1fr); }
  aside { border-right:0; border-bottom:1px solid var(--line); padding:4px var(--gutter); }
  .portal-nav > summary { display:list-item; padding:10px 0; cursor:pointer; font-weight:650; }
  .portal-nav[open] > nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding-bottom:10px; }
  .report-subnav { margin-inline:10px 0; }
  .top-inner { gap:8px 12px; }
  .division { padding-left:12px; }
  main { padding-block-start:18px; }
  .shortcuts a,.tabs a,.work-cta { min-height:42px; }
  .table > table { min-width:520px; }
  .table > .leader-table { min-width:570px; }
}
@media (max-width:540px) {
  .top-inner { display:grid; grid-template-columns:auto minmax(0,1fr); }
  .account { grid-column:1/-1; margin:0; justify-content:space-between; }
  .profile-menu summary { min-height:44px; }
  .notice-link { min-height:44px; min-width:44px; }
  .work-fields,.work-categories,.metric-fields { grid-template-columns:minmax(0,1fr); }
  .work-categories a { min-height:88px; padding:16px; }
  .metric-values { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metric-picker { grid-template-columns:minmax(0,1fr); }
  .shortcuts a { min-height:82px; padding:8px; overflow-wrap:anywhere; }
  .form { padding:12px; }
  .workflow-bar button,.work-cta,.tabs a { min-height:44px; }
}
@media (prefers-reduced-motion:reduce) { .shortcuts a,.work-categories a { transition:none; } }


@media (min-width:761px) {
  .top { position:sticky; top:0; z-index:5; }
  .shell > aside { padding:0; }
  .portal-nav { position:sticky; top:var(--top-height); max-height:calc(100svh - var(--top-height)); overflow-y:auto; padding:18px 12px; }
}
aside nav > a { min-height:40px; }
aside nav > a[aria-current=page]:hover { background:#ffd06a; }
h1 + .muted { margin-top:6px; }
.section-head h2 { font-weight:650; }
.section-head > a { font-size:.9rem; }
.shortcuts a,.work-categories a { background:#202020; }
.shortcuts a:hover,.work-categories a:hover { background:#24231e; }
.list a small { line-height:1.35; }
.table th { color:#dedede; }
.table tbody tr:nth-child(even) { background:#202020; }
.table tbody tr:hover { background:#25241f; }
.form > h2 { width:100%; padding-bottom:8px; border-bottom:1px solid var(--line); }
.form label { font-size:.94rem; font-weight:550; }
.form :is(input,textarea,select) { font-weight:400; }
.form select { min-height:40px; }
.primary:hover,.work-cta:hover { background:#ffd06a; }
.work-badge--accepted,.work-badge--working { color:#caebd3; background:#243c2b; }
.work-badge--rejected { color:#f0bcbc; background:#482b2c; }
.work-badge--draft,.work-badge--closed { color:#d5d5d5; background:#303030; }
@media (max-width:760px) {
  main { width:100%; }
  .section-head { row-gap:6px; }
  .table th,.table td { padding-block:9px; }
}
