/* ArchForge 4.1: visually isolated GitHub-inspired layout refresh. Loaded AFTER site.css. */
:root {--bg:#0d1117;--surface:#101721;--surface2:#151f2c;--surface3:#1b2837;--border:#303d4c;--fg:#e6edf3;--muted:#8f9fb2;--blue:#1793d1;--bright:#66c3fa;--shadow:0 14px 46px #0006;--max:1440px}
html {scroll-padding-top:86px}
body.af-body {background:var(--bg);color:var(--fg)}
body.af-body [hidden]{display:none!important}
body.af-body a:focus-visible,body.af-body button:focus-visible,body.af-body summary:focus-visible,body.af-body input:focus-visible{outline:2px solid #5ab6ef;outline-offset:3px}
.page-shell{max-width:var(--max);width:100%;padding:34px 30px 100px}
.site-header{height:66px;background:#0c111a;border-bottom:1px solid #283444;z-index:100}
.header-inner{max-width:1480px;width:100%;height:65px;padding:0 28px;gap:28px}
.header-inner .brand{font-size:21px;gap:11px}
.header-inner .brand-logo{background:#12354e;border:1px solid #235a7e;border-radius:9px;font-weight:700}
.header-search{max-width:360px;width:26vw;min-width:175px;margin-right:auto}
.header-search kbd{position:absolute;right:10px;top:7px;color:#8597a8;border:1px solid #374859;border-radius:4px;font-size:11px;line-height:1.3;padding:0 5px;background:#14202c;pointer-events:none}
.header-search input{padding-right:40px}
.header-links{margin-left:0;gap:20px}
.header-links a{color:#bac7d9;padding:8px 0;font-size:13px;font-weight:650;white-space:nowrap}
.header-links .nav-active{color:#f5fbff;border-bottom:2px solid var(--blue)}
.header-actions{display:flex;gap:12px;align-items:center;flex-shrink:0}
.header-icon-button{background:transparent;border:1px solid transparent;color:#b7c9db;min-width:32px;height:35px;display:grid;place-items:center;border-radius:6px;font-size:23px;text-decoration:none!important}
.header-icon-button:hover{background:#1d2b3c;color:white}
.header-actions .avatar-mini{font-size:12px;line-height:1;cursor:pointer;color:#e4f6ff!important;user-select:none;box-shadow:0 0 0 2px #0c111a}
.user-menu{position:relative;display:block}
.user-menu summary{cursor:pointer;list-style:none}
.user-menu summary::-webkit-details-marker{display:none}
.user-menu:not([open])>.user-dropdown{display:none!important}
.user-menu[open]>.user-dropdown{display:flex!important}
.user-dropdown{display:flex;right:0;top:42px;width:282px;max-width:calc(100vw - 28px);padding:9px;border-radius:10px;border:1px solid #3e5368;background:#161f2c;box-shadow:0 18px 56px #000a;z-index:150;flex-direction:column;gap:2px}
.user-dropdown .dropdown-head{display:flex;align-items:center;gap:10px;padding:10px 11px}
.dropdown-head>div{min-width:0}.dropdown-head small{display:block;color:#95aabc;font-size:11px}.dropdown-head strong{display:block;padding:0;font-size:13px;color:#eef5fd;overflow:hidden;text-overflow:ellipsis}
.user-dropdown a,.user-dropdown form button{padding:10px 11px;font-size:13px;font-family:inherit;line-height:1.4;border-radius:6px;white-space:normal}
.user-dropdown form{margin:0}.user-dropdown button{width:100%;cursor:pointer}
.dropdown-separator{margin:4px 0}
.mobile-menu-button{display:none}
.footer{background:#0c111a}.footer-inner{max-width:var(--max)}.footer-brand{text-decoration:none}
.btn{border-radius:6px}.btn-primary{background:#167daf;border-color:#2795ca}.btn-primary:hover{background:#1b99d6}.panel{border-color:#303d4c;box-shadow:none}.panel-head h2,.panel-head h3{font-size:14px;margin:0}
/* Dashboard desktop: repository rail | news feed | notifications */
.dashboard-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:14px 0 30px}
.dashboard-intro h1{font-size:32px;letter-spacing:-.7px;margin:6px 0}.dashboard-intro p{margin:0;font-size:13px}
.dashboard-v41{display:grid!important;grid-template-columns:minmax(220px,255px) minmax(0,1fr) minmax(235px,275px)!important;gap:22px;align-items:start;width:100%;margin-top:0;min-height:60vh}
.dashboard-v41>*{min-width:0}.dashboard-v41 .dashboard-sidebar{position:sticky;top:90px;padding:17px;border-radius:9px;grid-column:1}
.dashboard-v41 .dashboard-feed{grid-column:2;min-width:0}
.dashboard-v41 .dash-right{grid-column:3;min-width:0;display:block}
.dashboard-v41 .side-heading h2{font-size:14px;margin:0}.dashboard-v41 #repo-filter{font-size:12px;margin-bottom:15px;width:100%;height:37px}
.dashboard-v41 .side-repos{display:flex;flex-direction:column;gap:2px}
.dashboard-v41 .side-repo{line-height:1.5;display:flex;align-items:center;gap:9px;padding:9px 7px;color:#c3d6e6;min-width:0}
.dashboard-v41 .side-repo>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
.dashboard-v41 .sidebar-profile-link{margin-top:17px;padding-top:14px;border-top:1px solid #2e3b4a}
.dashboard-v41 .dashboard-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:20px}
.dashboard-v41 .dashboard-shortcuts>a{position:relative;padding:16px 15px;min-width:0;min-height:119px;gap:4px;background:#121e2b;border:1px solid #31465b;border-radius:9px;display:flex;flex-direction:column;text-decoration:none}
.dashboard-v41 .dashboard-shortcuts strong{font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.dashboard-v41 .dashboard-shortcuts small{font-size:11px;line-height:1.3}
.dashboard-v41 .shortcut-icon{font-size:23px;margin-bottom:8px;line-height:1}
.dashboard-v41 .shortcut-arrow{position:absolute;right:12px;top:10px;color:#819eb4;font-size:16px}
.dashboard-v41 .feed-panel{border-radius:9px;overflow:hidden}
.dashboard-v41 .panel-head{padding:14px 17px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.dashboard-v41 .feed-item{padding:18px;line-height:1.55}
.dashboard-v41 .feed-item strong{overflow-wrap:anywhere}
.dashboard-v41 .side-widget{margin-bottom:17px;border-radius:9px;overflow:hidden}
.dashboard-v41 .side-widget .trending-link{font-size:12px;gap:10px}
.dashboard-v41 .trending-link>span{min-width:0;flex:1;overflow-wrap:anywhere}
.dashboard-v41 .trending-link small{display:block;font-size:10px;margin-top:3px;color:#91a4b9}
.dashboard-v41 .side-widget .notice{display:flex;gap:10px;word-break:break-word}
.dashboard-v41 .side-widget .notice span{min-width:0}
.dashboard-v41 .small-pad{padding:17px;font-size:12px;margin:0}
.dashboard-help{display:flex;align-items:center;gap:16px;padding:19px;margin-top:19px;border-radius:9px;background:linear-gradient(120deg,#12283b,#111924)}
.dashboard-help>div{flex:1;min-width:0}.dashboard-help p{font-size:12px;margin:5px 0 0}.help-symbol{font-size:30px;color:#65c4f4}
.mini-empty{font-size:12px;padding:15px 0;text-align:left}
/* Better public home and other interface elements */
.v4-hero{gap:35px}.v4-hero h1{line-height:1.09}.v4-hero-content>p{max-width:530px}
.v4-feature-strip{background:#111c28;border-color:#2c4155;border-radius:10px}
.repo-grid>*{min-width:0}
.repo-toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.repo-context{overflow-wrap:anywhere}
.repo-tabs{display:flex;overflow-x:auto;scrollbar-width:thin;max-width:100%;white-space:nowrap}
.repo-body{min-width:0}.repo-body>*{min-width:0}
.repo-sidebar,.repo-main{min-width:0}.dropdown{position:relative}.dropdown:not([open])>.dropdown-content{display:none!important}
.quick-setup{border-radius:9px}.setup-code{max-width:100%;font-size:12px}
.explore-layout>section{min-width:0}.explore-form{flex-wrap:wrap}.explore-form label.grow{min-width:220px}
.af-toast{position:fixed;right:22px;bottom:22px;background:#12344d;color:#e8f8ff;border:1px solid #379bcc;border-radius:8px;padding:12px 17px;box-shadow:0 12px 35px #000a;z-index:300;opacity:0;pointer-events:none;transform:translateY(8px);transition:opacity .15s,transform .15s;font-size:13px}
.af-toast-visible{opacity:1;transform:translateY(0)}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media (max-width:1250px){
 .dashboard-v41{grid-template-columns:225px minmax(0,1fr)!important}
 .dashboard-v41 .dashboard-sidebar{grid-column:1}
 .dashboard-v41 .dashboard-feed{grid-column:2}
 .dashboard-v41 .dash-right{grid-column:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .dashboard-v41 .dash-right .side-widget{margin:0}
 .header-inner{gap:18px}
}
@media (max-width:850px){
 .page-shell{padding:26px 18px 70px}
 .site-header,.header-inner{height:auto;min-height:64px}
 .header-inner{flex-wrap:wrap;gap:12px;padding:12px 18px}
 .header-search{order:3;flex:1;max-width:none;min-width:0;width:100%;margin:0}
 .header-links{display:none;order:4;width:100%;margin:0;flex-basis:100%;background:#111d2a;border:1px solid #304254;padding:8px 14px;border-radius:8px;gap:0;flex-direction:column;align-items:stretch}
 .header-links[data-mobile-nav-open]{display:flex}
 .header-links a{padding:11px 8px;border-bottom:1px solid #253548}
 .header-links a:last-child{border:0}
 .header-links .nav-active{border-bottom:1px solid #37617e}
 .header-actions{margin-left:auto}
 .mobile-menu-button{display:grid}
 .dashboard-v41{grid-template-columns:minmax(0,1fr)!important;gap:18px}
 .dashboard-v41 .dashboard-sidebar,.dashboard-v41 .dashboard-feed,.dashboard-v41 .dash-right{grid-column:1;position:static}
 .dashboard-v41 .dashboard-feed{grid-row:1}.dashboard-v41 .dashboard-sidebar{grid-row:2}.dashboard-v41 .dash-right{grid-row:3}
 .dashboard-v41 .dashboard-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr))}
 .dashboard-intro h1{font-size:27px}
}
@media(max-width:600px){
 .header-inner{padding:11px 14px}
 .header-inner .brand{font-size:19px}
 .header-icon-button{min-width:29px}
 .header-actions{gap:6px}
 .dashboard-intro{align-items:flex-start;flex-direction:column;gap:16px;margin:3px 0 24px}
 .dashboard-v41 .dashboard-shortcuts{grid-template-columns:1fr;gap:9px}
 .dashboard-v41 .dashboard-shortcuts>a{min-height:auto;flex-direction:row;flex-wrap:wrap;align-items:center;gap:5px 9px;padding:12px 16px}
 .dashboard-v41 .dashboard-shortcuts strong{flex:1}
 .dashboard-v41 .dashboard-shortcuts small{flex-basis:100%;padding-left:34px}
 .dashboard-v41 .shortcut-icon{font-size:20px;margin:0}
 .dashboard-v41 .dash-right{display:block}
 .dashboard-v41 .dash-right .side-widget{margin-bottom:15px}
 .dashboard-help{align-items:flex-start;flex-wrap:wrap}
 .page-shell{padding:24px 14px 60px}
 .explore-form{display:flex;flex-direction:column;align-items:stretch}
 .explore-form>*{width:100%}
 .user-dropdown{right:-38px}
}
/* Old v3 mobile CSS hid the first two navigation links; explicitly restore them. */
@media(max-width:850px){.header-links[data-mobile-nav-open] a{display:block!important}}
/* ArchForge v5 responsive account and collaboration modules */
.v5-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.v5-medium{max-width:650px}.v5-header-row{display:flex;align-items:start;justify-content:space-between;gap:18px;flex-wrap:wrap}.v5-success{border:1px solid #2d765b;color:#8ce4b2;background:#102b24;padding:14px;border-radius:8px;margin:14px 0}.v5-recovery{border:1px solid #3b7aa3;padding:16px;border-radius:8px;margin:18px 0}.v5-details{border:1px solid #314051;padding:12px;margin:10px 0;border-radius:8px}.v5-kanban{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;min-height:150px}.v5-kanban-column{background:#101c28;border:1px solid #2e4053;border-radius:8px;padding:12px;min-width:0}.v5-kanban-column h3{font-size:13px}.v5-board-card{background:#182637;padding:11px;margin:8px 0;border:1px solid #34495f;border-radius:7px;overflow-wrap:anywhere}.v5-board-card form{margin-top:9px}.v5-board-card select{max-width:100%}.v5-grid .form-panel,.v5-grid .panel{min-width:0}.v5-grid .list-row{overflow-wrap:anywhere}.form-panel form+form{margin-top:18px}
@media(max-width:850px){.v5-grid{grid-template-columns:minmax(0,1fr)}.v5-kanban{grid-template-columns:minmax(0,1fr)}}

.v5-qr{background:white;padding:16px;display:inline-block;border-radius:8px;margin:12px 0}.v5-qr img{display:block}

/* Optional light appearance (default remains GitHub-inspired dark). */
.profile-avatar-image{width:100%;height:100%;object-fit:cover;border-radius:50%}
.theme-light{--bg:#f6f9fc;--surface:#fff;--surface2:#f1f5fa;--surface3:#e5edf6;--border:#d3deeb;--fg:#17283a;--muted:#617286;--bright:#0874b2;color:var(--fg);background:var(--bg)}
.theme-light .site-header,.theme-light .footer{background:#fff;border-color:#d6e0e8}.theme-light .brand,.theme-light .header-links a,.theme-light .header-icon-button{color:#1d3548}.theme-light .panel,.theme-light .v5-kanban-column,.theme-light .repo-card{background:#fff;color:#1d3548;border-color:#d7e3ed}.theme-light .panel-head,.theme-light .file-heading,.theme-light .dashboard-v41 .dashboard-shortcuts>a{background:#eaf1f9;color:#20364c}.theme-light input,.theme-light select,.theme-light textarea{background:#fff;color:#142f45;border-color:#b7c9d8}.theme-light .form-panel label{color:#253c53}.theme-light .list-row{color:#223a52;border-color:#d9e3ec}.theme-light .user-dropdown{background:#fff;border-color:#cbd9e5}.theme-light .user-dropdown a,.theme-light .user-dropdown form button{color:#214263}.theme-light .repo-context{background:#eff4fa}.theme-light .btn-secondary{background:#ecf3f9;color:#234862;border-color:#cbd8e5}.theme-light .markdown{color:#193146}.theme-light .code-editor,.theme-light .setup-code{background:#142436;color:#b0e0ff}
@media(prefers-color-scheme:light){.theme-system{--bg:#f6f9fc;--surface:#fff;--surface2:#f1f5fa;--border:#d3deeb;--fg:#17283a;--muted:#617286;--bright:#0874b2;background:var(--bg);color:var(--fg)}}
