:root { font-family: "Segoe UI", system-ui, sans-serif; --ink:#071a1f; --ink-soft:#16323a; --paper:#f6f4ee; --white:#fff; --mist:#e8ede8; --action:#0f6f55; --teal:#0c7f78; --gold:#b49152; --light:#eff7f3; --line:#d6dfd9; --muted:#52666b; --outline:#9ab0a7; --amber:#8b4e12; color:var(--ink); background:var(--paper); }
* { box-sizing: border-box; }
body { margin:0; min-height:100vh; }
a { color:var(--action); text-underline-offset:3px; }
button, input, select, textarea { font:inherit; }
button, .button { border:1px solid var(--line); border-radius:8px; background:var(--white); color:var(--ink-soft); font-weight:650; cursor:pointer; padding:.62rem .9rem; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:.4rem; }
button:hover,.button:hover { background:var(--light); }
button.primary,.button.primary { border-color:var(--action); background:var(--action); color:var(--white); }
button.primary:hover,.button.primary:hover { background:#0b5844; }
button:disabled { cursor:wait; opacity:.65; }
:focus-visible { outline:3px solid var(--teal); outline-offset:3px; }
.skip { position:absolute; top:-99px; left:1rem; z-index:6; padding:1rem; background:white; }
.skip:focus { top:1rem; }
.top { background:white; border-bottom:1px solid var(--line); }
.top-inner { max-width:1450px; padding:0 2rem; min-height:78px; margin:auto; display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.brand { display:flex; align-items:center; gap:1.15rem; color:var(--ink-soft); text-decoration:none; font-size:1rem; font-weight:750; }
.brand img { width:132px; height:47px; object-fit:contain; }
.brand span { padding-left:1.1rem; border-left:1px solid var(--line); }
#account { display:flex; align-items:center; gap:.8rem; font-size:.87rem; }
.frame,.loading { max-width:1450px; margin:auto; padding:1.6rem 2rem 3rem; }
.access { max-width:950px; min-height:440px; display:grid; grid-template-columns:1fr 1fr; overflow:hidden; margin:clamp(2rem,8vh,6.5rem) auto 3rem; border:1px solid var(--line); border-radius:18px; background:var(--white); box-shadow:0 22px 60px #071a1f19; }
.access-copy { background:linear-gradient(150deg,var(--ink),var(--ink-soft)); border-bottom:3px solid var(--gold); color:var(--white); padding:clamp(1.6rem,4vw,3rem); display:flex; flex-direction:column; justify-content:center; }
.access-copy p { color:var(--mist); max-width:34ch; font-size:1.05rem; }
.access-form { padding:clamp(1.6rem,4vw,3rem); align-self:center; }
h1,h2,h3,p { margin:0; }
h1 { font-size:clamp(1.8rem,3vw,2.65rem); line-height:1.12; letter-spacing:-.036em; }
h2 { font-size:1.28rem; line-height:1.25; letter-spacing:-.012em; }
h3 { font-size:1rem; line-height:1.3; }
p { line-height:1.55; }
.muted { color:var(--muted); }
.small { font-size:.875rem; }
.stack { display:grid; gap:.8rem; }
.stack-lg { display:grid; gap:1.15rem; }
.hero { display:flex; justify-content:space-between; align-items:flex-end; gap:1rem; background:linear-gradient(112deg,var(--ink),var(--ink-soft)); border-bottom:3px solid var(--gold); color:var(--white); padding:1.7rem 1.8rem; border-radius:14px 14px 0 0; }
.hero p { color:var(--mist); margin-top:.45rem; }
.hero .pill { color:var(--white); background:#ffffff25; border-color:#ffffff45; white-space:nowrap; }
.back { justify-self:start; margin-bottom:.05rem; font-weight:650; font-size:.9rem; }
.tabs { display:flex; align-items:center; flex-wrap:wrap; gap:.25rem; padding:.4rem .65rem; background:white; border:1px solid var(--line); border-top:0; border-radius:0 0 12px 12px; }
.tab { padding:.65rem .85rem; border-color:transparent; white-space:nowrap; }
.tab[aria-current="page"] { background:var(--light); color:var(--action); }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.8rem; }
.metric,.panel,.case-card { border:1px solid var(--line); background:white; border-radius:11px; padding:1rem 1.15rem; min-width:0; }
.metric strong { font-size:1.5rem; display:block; margin-bottom:.22rem; }
.case-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr)); gap:1rem; }
.case-card { text-align:left; display:grid; gap:.5rem; justify-content:stretch; width:100%; min-height:122px; }
.case-card:hover { border-color:var(--outline); }
.row { display:flex; gap:.65rem; align-items:center; flex-wrap:wrap; }
.between { justify-content:space-between; }
.actions { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.pill { border:1px solid var(--line); padding:.22rem .5rem; background:var(--light); border-radius:999px; font-size:.76rem; font-weight:700; color:var(--ink-soft); white-space:nowrap; }
.pill.good { background:var(--light); color:var(--action); border-color:#cde8de; }
.pill.warn { background:#fff3e4; color:var(--amber); border-color:#f1dcc2; }
.folder-layout { display:grid; grid-template-columns:minmax(235px,320px) minmax(0,1fr); gap:1rem; align-items:start; }
.folders { padding:.8rem; max-height:75vh; overflow:auto; }
.folders h2 { margin:.15rem .2rem .65rem; }
.chapter-list { display:grid; gap:.25rem; margin-top:.5rem; }
.folder-button { border:0; display:block; width:100%; text-align:left; font-weight:500; font-size:.875rem; padding:.45rem .5rem .45rem .7rem; border-radius:6px; overflow-wrap:anywhere; }
.folder-button[aria-current="true"] { background:var(--light); font-weight:700; }
.folder-code { color:var(--muted); font-variant-numeric:tabular-nums; margin-right:.3rem; }
.folder-meta { padding:.85rem; border:1px solid var(--line); background:var(--light); border-radius:8px; }
.requirements summary { cursor:pointer; font-weight:700; }
.requirements ul { display:grid; gap:.55rem; padding-left:1.4rem; margin:.7rem 0 .1rem; }
.upload { border:1px dashed var(--outline); background:#f7f8f4; border-radius:9px; padding:1rem; }
.upload input { padding:.6rem; }
.upload progress { width:100%; accent-color:var(--action); }
.record { border-top:1px solid var(--line); padding:.78rem 0; display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; justify-content:space-between; }
.record:first-child { border-top:0; }
.record-name { overflow-wrap:anywhere; min-width:0; max-width:100%; }
.record-name strong { display:block; }
.blank { padding:.9rem; border:1px dashed var(--line); border-radius:8px; color:var(--muted); }
label { font-weight:650; display:grid; gap:.35rem; font-size:.91rem; }
input:not([type=checkbox]),select,textarea { min-width:0; width:100%; border:1px solid var(--outline); border-radius:7px; padding:.62rem .7rem; background:var(--white); color:var(--ink); }
textarea { min-height:5.4rem; resize:vertical; }
fieldset { min-width:0; border:1px solid var(--line); border-radius:8px; padding:.85rem; }
legend { font-weight:650; }
.options { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:.55rem; }
.chapter-grant { margin-top:.7rem; }
.check { display:flex; align-items:start; gap:.45rem; line-height:1.3; font-weight:500; }
.check input { margin:.16rem 0 0; flex:none; accent-color:var(--action); }
.fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,195px),1fr)); gap:.75rem; }
.task-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:.65rem; align-items:start; }
.task-column { padding:.65rem; min-height:95px; background:var(--mist); border-radius:9px; }
.task-column h3 { padding:.15rem .3rem .6rem; }
.task { background:white; border:1px solid var(--line); border-radius:8px; padding:.75rem; margin-bottom:.5rem; overflow-wrap:anywhere; }
.task p { white-space:pre-wrap; }
.messages { min-height:135px; max-height:53vh; overflow:auto; display:grid; gap:.65rem; padding:.3rem .15rem; align-content:start; }
.message { padding:.75rem .9rem; border-radius:9px; background:#f7f8f4; justify-self:start; max-width:min(90%,720px); min-width:0; }
.message.mine { justify-self:end; background:var(--light); }
.message p { margin-top:.35rem; white-space:pre-wrap; overflow-wrap:anywhere; }
.toast { position:fixed; right:1rem; bottom:1rem; z-index:5; max-width:min(520px,calc(100vw - 2rem)); background:var(--ink-soft); color:var(--white); padding:.8rem 1.05rem; box-shadow:0 10px 20px #071a1f33; border-radius:8px; }
.toast.error { background:#8d2b26; }
[hidden] { display:none!important; }
.form-note { min-height:1.15rem; color:#8d2b26; }
@media(max-width:790px) {
  .frame,.loading { padding:1.15rem 1rem 2.5rem; }
  .top-inner { padding:0 1rem; min-height:66px; }
  .folder-layout { grid-template-columns:1fr; }
  .folders { max-height:38vh; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .access { margin:1.2rem auto 2rem; }
}
@media(max-width:560px) {
  .access { grid-template-columns:1fr; }
  .access-copy { padding:1.45rem; }
  #account .person { display:none; }
  .brand { gap:.55rem; font-size:.81rem; }
  .brand img { width:91px; height:42px; }
  .brand span { padding-left:.55rem; }
  .hero { padding:1.05rem; }
  .tab { padding:.45rem .53rem; font-size:.87rem; }
  .panel,.metric { padding:.85rem; }
}
