*{
    box-sizing:border-box}
body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font:15px/1.65 var(--font-ui)}
button,input,textarea,select{
    font:inherit}
button,a,input,textarea,select{
    -webkit-tap-highlight-color:transparent}
button{
    border:1px solid var(--line);
    background:var(--input-bg);
    color:var(--text);
    border-radius:8px;
    padding:7px 13px;
    cursor:pointer}
button:hover{
    border-color:var(--accent)}
button:disabled{
    opacity:.5;
    cursor:wait}
button:focus-visible,a:focus-visible,input:focus,textarea:focus,select:focus{
    outline:2px solid var(--accent);
    outline-offset:3px}
a{
    color:var(--accent);
    text-decoration:none}
input,textarea,select{
    background:var(--bg);
    color:var(--text);
    border:1px solid var(--line);
    padding:10px;
    border-radius:7px;
    max-width:100%}
textarea{
    min-height:135px;
    resize:vertical}
input[type=checkbox]{
    accent-color:var(--accent)}
.rail{
    position:fixed;
    inset:0 auto 0 0;
    width:246px;
    background:var(--sidebar-bg);
    border-right:1px solid var(--line);
    padding:30px 20px;
    overflow:auto;
    display:flex;
    flex-direction:column;
    gap:8px}
.brand{
    display:block;
    font-size:26px;
    font-weight:650;
    letter-spacing:-1px;
    color:var(--text);
    margin-bottom:25px}
.brand span{
    color:var(--accent)}
.brand small{
    display:block;
    font-size:9px;
    letter-spacing:2.8px;
    color:var(--muted);
    font-weight:400}
.nav{
    width:100%;
    text-align:left;
    border-color:transparent;
    background:transparent}
.nav.active{
    background:var(--accent-dim);
    color:var(--accent);
    border-color:var(--accent)}
.rail-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-top:20px;
    color:var(--muted);
    font-size:12px;
    letter-spacing:1px}
.rail-heading button{
    padding:0 8px;
    font-size:20px;
    background:transparent;
    border:0}
.archive-filter{
    font-size:12px;
    color:var(--muted)}
#project-list button{
    display:block;
    width:100%;
    text-align:left;
    margin:6px 0;
    overflow-wrap:anywhere}
.rail-bottom{
    margin-top:auto;
    padding-top:30px;
    display:flex;
    flex-direction:column;
    gap:10px;
    font-size:13px}
.rail-bottom small{
    color:var(--muted);
    line-height:1.8}
main{
    margin-left:246px;
    padding:0 44px;
    max-width:1600px}
.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    border-bottom:1px solid var(--line);
    min-height:85px}
.topbar form{
    display:flex;
    gap:8px}
.topbar input{
    width:310px}
.topbar span{
    color:var(--muted);
    font-size:12px;
    white-space:nowrap}
.hero{
    padding:48px 0 30px;
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:20px}
.eyebrow{
    font-size:11px;
    letter-spacing:2px;
    color:var(--accent);
    margin:0 0 12px}
h1{
    font-size:clamp(27px,3vw,40px);
    font-weight:500;
    letter-spacing:-1px;
    line-height:1.35;
    margin:0;
    overflow-wrap:anywhere}
.hero p:last-child{
    color:var(--muted);
    margin-bottom:0}
#page-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap}
.primary{
    color:var(--on-accent);
    background:var(--accent);
    border-color:var(--accent);
    font-weight:600}
.stat-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    border:1px solid var(--line);
    border-radius:12px;
    margin-bottom:30px;
    overflow:hidden}
.stat{
    padding:20px;
    border-right:1px solid var(--line);
    background:var(--surface)}
.stat:last-child{
    border:0}
.stat strong{
    display:block;
    font-size:32px;
    font-weight:450}
.stat span{
    font-size:12px;
    color:var(--muted)}
.stat.overdue strong{
    color:var(--warning)}
.section{
    margin:24px 0 32px}
.section-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px}
.section h2{
    font-size:19px;
    font-weight:500;
    margin:0}
.section-head small{
    color:var(--muted)}
.list{
    border:1px solid var(--line);
    border-radius:10px;
    overflow:hidden}
.row{
    padding:15px 18px;
    display:flex;
    align-items:center;
    gap:14px;
    border-bottom:1px solid var(--line);
    background:var(--surface)}
.row:last-child{
    border-bottom:0}
.row .text{
    flex:1;
    min-width:0;
    overflow-wrap:anywhere}
.row h3{
    font-weight:500;
    font-size:15px;
    margin:0}
.row small{
    color:var(--muted);
    display:block}
.row .meta{
    font-size:12px;
    color:var(--muted);
    flex-shrink:0}
.row .status{
    min-width:90px;
    padding:5px;
    font-size:12px}
.empty{
    padding:30px;
    color:var(--muted);
    border:1px dashed var(--line);
    border-radius:10px;
    font-size:14px}
.note-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(245px,1fr));
    gap:14px}
.note{
    background:var(--surface);
    border:1px solid var(--line);
    padding:20px;
    border-radius:10px;
    overflow-wrap:anywhere}
.note h3{
    margin:0 0 10px;
    font-size:16px}
.note p{
    white-space:pre-wrap;
    color:var(--text-sub);
    max-height:180px;
    overflow:auto;
    font-size:14px}
.note .actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-top:15px}
.link-row a{
    overflow-wrap:anywhere}
.muted{
    color:var(--muted)}
#notice{
    font-size:14px;
    padding-top:12px;
    color:var(--warning)}
#notice:empty{
    display:none}
footer{
    display:flex;
    justify-content:space-between;
    gap:20px;
    border-top:1px solid var(--line);
    margin-top:55px;
    padding:20px 0 35px;
    color:var(--muted);
    font-size:10px;
    letter-spacing:2px}
footer span{
    letter-spacing:0}
dialog{
    border:1px solid var(--line);
    background:var(--surface);
    color:var(--text);
    border-radius:16px;
    width:520px;
    max-width:calc(100% - 30px);
    padding:25px}
dialog::backdrop{
    background:#000a;
    backdrop-filter:blur(3px)}
.dialog-head,.dialog-foot{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px}
.dialog-head h2{
    margin:0;
    font-size:23px}
.dialog-head button{
    border:0;
    background:transparent;
    font-size:25px}
.dialog-foot{
    justify-content:flex-end;
    margin-top:20px}
#editor-fields label{
    display:flex;
    flex-direction:column;
    gap:6px;
    margin-top:16px;
    font-size:13px;
    color:var(--muted)}
#editor-error{
    color:var(--warning);
    font-size:13px}
.sr-only{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0,0,0,0)}
@media(max-width:1000px){
    main{
    padding:0 24px}
.stat-grid{
    grid-template-columns:repeat(2,1fr)}
.stat:nth-child(2){
    border-right:0}
.stat:nth-child(-n+2){
    border-bottom:1px solid var(--line)}
.hero{
    align-items:flex-start;
    flex-direction:column}
.topbar span{
    display:none}
}
@media(max-width:650px){
    .rail{
    position:relative;
    width:100%;
    border-right:0;
    padding:18px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px}
.brand{
    grid-column:1/-1;
    margin:0 0 5px}
.rail-heading{
    margin-top:8px}
.rail #workspace-select{
    grid-column:1/-1}
#project-list{
    grid-column:1/-1;
    display:flex;
    gap:8px;
    overflow:auto}
#project-list button{
    width:auto;
    min-width:125px}
.rail-bottom{
    grid-column:1/-1;
    padding:10px 0 0;
    margin:0;
    flex-direction:row;
    flex-wrap:wrap}
.rail-bottom small{
    width:100%}
main{
    margin:0;
    padding:0 18px}
.topbar{
    min-height:75px}
.topbar form{
    width:100%}
.topbar input{
    min-width:0;
    flex:1}
.hero{
    padding-top:30px}
.row{
    flex-wrap:wrap;
    padding:12px}
.row .text{
    min-width:140px}
.row .meta{
    display:none}
.stat{
    padding:15px}
footer{
    flex-direction:column;
    gap:5px}
.note-grid{
    grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
    *{
    scroll-behavior:auto!important}
}

