:root{--canvas:#eeece8;--sidebar:#101114;--ink:#151827;--muted:#777985;--accent:#733fe2;--blue:#27a8ee;--surface:#fbfaf8;--lav:#eee7fb;--green:#178b43;--amber:#a16d0b}
*{box-sizing:border-box}html{font-size:16px}body{margin:0;color:var(--ink);background:var(--canvas);font:15px/1.42 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;-webkit-text-size-adjust:100%}a{color:inherit;text-decoration:none}img{max-width:100%;display:block}button,input{font:inherit}.sprite{position:absolute;width:0;height:0;overflow:hidden}.icon{width:20px;height:20px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round;flex:none}.icon.more{fill:currentColor;stroke:none}
.layout{display:flex;width:100%;max-width:none;min-height:100vh;margin:0}.sidebar{width:230px;flex:0 0 230px;background:var(--sidebar);color:#fff;min-height:100vh;padding:29px 15px 23px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{height:44px;display:flex;align-items:center;white-space:nowrap;line-height:1;margin:0 12px 44px}.brand img{width:43px;height:37px;object-fit:contain;flex:none}.brand span{color:#fff;font-size:30px;font-weight:810;letter-spacing:-1.5px;margin-left:-4px}.side-nav{display:grid;gap:5px}.side-link{display:flex;align-items:center;gap:11px;min-height:44px;padding:11px 12px;border-radius:11px;color:#f4f3f5;font-size:14px;font-weight:575;white-space:nowrap}.side-link .icon{width:19px;height:19px}.side-link .title{flex:1}.bubble{border-radius:20px;background:#e9dafe;color:#6734d2;font-size:12px;font-weight:750;padding:1px 8px}.side-link:hover{background:#242428}.workspace-wrap{border-top:1px solid #ffffff26;padding-top:19px;margin-top:27px}.workspace{border:1px solid #ffffff2d;border-radius:11px;padding:11px;display:flex;align-items:center;gap:10px;font-size:13px;font-weight:650}.workspace .icon{width:18px;height:18px}.workspace .push{margin-left:auto}.profile{margin-top:auto;display:flex;gap:9px;align-items:center;font-size:12px}.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#8055df;color:#fff;font-size:15px;font-weight:500;flex:none}.profile small{display:block;font-size:10px;color:#aeafb9}.content{min-width:0;flex:1;padding:24px clamp(24px,3.7vw,65px) 75px}.top-right{height:42px;margin-bottom:12px;display:flex;align-items:center;justify-content:flex-end;gap:22px}.top-right .icon{width:20px;height:20px}.top-right .avatar{width:33px;height:33px}.mobile-header,.mobile-nav{display:none}
h1{font-size:clamp(32px,3.1vw,42px);letter-spacing:-1.4px;line-height:1.12;margin:0;font-weight:780;color:var(--ink)}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:8px 0 30px}.primary{background:var(--accent);color:#fff;border-radius:11px;padding:12px 18px;display:inline-flex;align-items:center;gap:10px;font-weight:700;font-size:14px;white-space:nowrap}.primary .icon{width:18px;height:18px}.primary:hover{background:#6430d3}
/* Hash links keep the four views usable without scripts. */
.page-view{display:none}.page-projects{display:block}.page-view.is-target{display:block}body:has(.page-view.is-target) .page-projects{display:none}body:has(#projects.is-target) #projects{display:block}body:has(#new-workflow.is-target) .page-projects{display:none}
.side-link.link-projects,.mobile-nav .link-projects{background:#38383d}body:has(.page-view.is-target) .side-link.link-projects,body:has(#new-workflow.is-target) .side-link.link-projects{background:transparent}body:has(#reviews.is-target) .link-reviews,body:has(#workflows.is-target) .link-workflows,body:has(#settings.is-target) .link-settings,body:has(#new-workflow.is-target) .link-workflows{background:#38383d;color:#fff}body:has(#projects.is-target) .side-link.link-projects{background:#38383d;color:#fff}
/* projects */
.project-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:26px}.stat{min-height:102px;background:var(--surface);border-radius:17px;padding:22px;display:flex;align-items:center;gap:16px}.stat .icon{width:31px;height:31px;color:var(--accent)}.stat strong{display:block;font-size:29px;font-weight:780;line-height:1.1}.stat small{font-size:13px;color:var(--muted)}.stat.highlighted{color:#fff;background:linear-gradient(110deg,#7b41e7,#5865e5 64%,#20b5e9)}.stat.highlighted .icon,.stat.highlighted small{color:#fff}.tools{display:flex;gap:11px;margin-bottom:23px}.search{flex:1;min-width:0;border-radius:12px;background:var(--surface);height:46px;padding:0 15px;display:flex;align-items:center;gap:12px;color:#92949b;font-size:14px}.search .icon{width:18px;height:18px;color:#616477}.tool{display:grid;place-items:center;background:var(--surface);border-radius:12px;width:46px;height:46px;flex:none}.projects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:19px}.project-card{background:var(--surface);border-radius:19px;padding:17px;min-width:0}.project-card .card-top{display:flex;align-items:center;justify-content:space-between;height:26px;margin-bottom:12px}.project-card .type-tag,.review-card .type-tag{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;background:var(--lav);border-radius:30px;font-size:12px;color:#6c36d4;font-weight:700}.project-card .type-tag .icon{width:15px;height:15px}.project-card .more-control .icon{width:18px;height:18px;color:var(--ink)}.project-image{width:100%;aspect-ratio:2.9/1;object-fit:cover;border-radius:11px;background:#eee}.project-card .card-bottom{display:flex;justify-content:space-between;align-items:flex-end;gap:8px;padding:13px 2px 2px}.project-card .card-details{min-width:0}.project-card h2{margin:0 0 8px;font-size:16px;line-height:1.3;font-weight:750;letter-spacing:-.2px}.status{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:650;padding:5px 10px;border-radius:20px;white-space:nowrap}.status:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:currentColor}.status.active,.status.approved{background:#e5f6e8;color:var(--green)}.status.waiting{background:#fff1d7;color:var(--amber)}.project-card .comments{display:flex;align-items:center;gap:5px;color:var(--accent);font-size:13px;font-weight:700;white-space:nowrap}.project-card .comments .icon{width:17px;height:17px}
/* my reviews */
.review-controls{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:10px 0 23px}.tabs{display:flex;align-items:center;gap:4px;max-width:100%;background:var(--surface);border-radius:99px;padding:4px}.tab{white-space:nowrap;display:inline-flex;align-items:center;gap:9px;padding:10px 15px;font-size:13px;font-weight:640;color:#5a5c69;border-radius:99px}.tab.current{color:#6125d6;background:var(--lav)}.tab b{font-size:12px;min-width:23px;height:23px;border-radius:99px;background:#e9e7ea;color:#4b4a55;display:grid;place-items:center}.tab.current b{background:var(--accent);color:#fff}.sort-pill{display:flex;align-items:center;gap:15px;white-space:nowrap;font-size:13px;font-weight:580;padding:11px 15px;border-radius:30px;background:var(--surface)}.sort-pill .icon{width:16px;height:16px}.review-list{display:grid;gap:14px}.review-card{background:var(--surface);border-radius:20px;display:grid;grid-template-columns:minmax(175px,235px) minmax(0,1fr) auto;gap:22px;align-items:center;padding:17px;min-height:145px}.review-image{width:100%;height:112px;object-fit:cover;border-radius:12px;background:#f2eef4}.review-detail{min-width:0}.review-detail .type-tag{padding:5px 10px}.review-detail .type-tag .icon{width:15px;height:15px}.review-detail h2{font-size:20px;letter-spacing:-.5px;line-height:1.23;margin:10px 0 8px;font-weight:760}.metadata{color:var(--muted);font-size:13px}.sep{padding:0 6px;color:#9b9ca2}.review-activity{align-self:stretch;display:flex;align-items:center;gap:18px;justify-content:flex-end;min-width:100px;padding:0 5px}.review-activity .comments{color:var(--accent);font-weight:700;font-size:13px;display:flex;align-items:center;gap:6px}.review-activity .comments .icon{width:18px;height:18px}.review-btn{color:var(--accent);display:inline-flex;align-items:center;gap:7px;font-weight:700}.review-btn .icon{width:21px;height:21px}
/* workflow templates */
.section-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}.section-row h2{font-size:16px;font-weight:730;margin:0;color:var(--ink)}.section-row span{font-size:13px;color:var(--muted)}.workflows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:stretch}.workflow-card{display:flex;flex-direction:column;min-width:0;padding:23px 24px 19px;background:var(--surface);border-radius:20px;min-height:232px;color:var(--ink)}.workflow-top{display:flex;align-items:flex-start;gap:12px}.workflow-icon{flex:none;width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#eee9fa;color:#6537cf}.workflow-icon .icon{width:22px;height:22px}.workflow-icon.blue{background:#e5f5fc;color:#159cce}.workflow-icon.ink{background:#eae9ee;color:#38364d}.workflow-name{min-width:0;flex:1}.workflow-name h3{color:var(--ink);font-size:19px;letter-spacing:-.4px;margin:-1px 0 4px;line-height:1.25}.workflow-name p{font-size:12px;color:var(--muted);margin:0}.workflow-more{line-height:0;margin:0 -5px 0 4px;color:#27283a}.workflow-more .icon{width:19px;height:19px}.stage-label{font-size:10px;text-transform:uppercase;letter-spacing:1.1px;color:#8b8c98;font-weight:730;margin:25px 0 11px}.flowline{display:flex;align-items:center;gap:7px;min-width:0;flex-wrap:wrap}.step{white-space:nowrap;font-size:12px;font-weight:640;line-height:1.2;padding:10px 11px;border-radius:9px;background:#eeecea;color:#393b47}.flow-arrow{color:#8d8d98;flex:none}.flow-arrow .icon{width:17px;height:17px;stroke-width:1.7}.cluster{display:flex;align-items:center;gap:4px;padding:4px;border:1px dashed #d6d0e3;border-radius:12px}.cluster .step{padding:7px 8px;background:#efebf7;color:#5b4899}.optional{font-size:10px;color:#7e7395;background:#f1edf7;padding:5px 7px;border-radius:15px;font-weight:650}.workflow-card .card-bottom{display:flex;align-items:center;gap:8px;margin-top:auto;padding-top:27px;flex-wrap:wrap}.type-chip{background:#eae5f7;color:#6a3bd2;font-size:11px;padding:5px 10px;border-radius:18px;font-weight:730}.type-chip.blue{background:#e4f4fa;color:#197ca6}.type-chip.neutral{background:#ecebf0;color:#5d586e}.meta-sep{font-size:10px;color:#a4a4ae}.workflow-card .meta{color:var(--muted);font-size:12px}.helper{margin:28px 0 0;font-size:13px;color:var(--muted);line-height:1.6}.helper strong{color:#3e4151;font-weight:680}
/* settings */
.settings-intro{font-size:13px;color:var(--muted);margin-bottom:15px;font-weight:650}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.settings-item{background:var(--surface);border-radius:17px;padding:22px;display:flex;align-items:center;gap:14px}.setting-icon{width:43px;height:43px;border-radius:12px;background:var(--lav);color:#6c36d4;display:grid;place-items:center;flex:none}.setting-icon .icon{width:22px;height:22px}.settings-item>div{min-width:0;flex:1}.settings-item h3{font-size:16px;margin:0 0 5px}.settings-item p{margin:0;color:var(--muted);font-size:12px}.settings-arrow .icon{color:#9993a7;width:18px;height:18px}.settings-note{color:var(--muted);font-size:12px;margin-top:22px}
/* New Project is intentionally reserved for the next design pass. */
@media(max-width:1120px){.review-card{grid-template-columns:160px minmax(0,1fr) auto;gap:15px}.review-detail h2{font-size:18px}.workflow-card{padding:19px 17px}.flowline{gap:5px}.step{font-size:11px;padding:9px 8px}.workflow-name h3{font-size:17px}}
@media(max-width:970px) and (min-width:701px){.sidebar{width:202px;flex-basis:202px}.content{padding:24px 27px 70px}.stat{padding:14px;gap:9px}.stat .icon{width:26px;height:26px}.project-card{padding:13px}.project-image{aspect-ratio:2.4/1}.workflows{grid-template-columns:1fr}.workflow-card{min-height:190px}.review-card{grid-template-columns:120px minmax(0,1fr) auto;gap:12px}.review-image{height:85px}.review-detail h2{font-size:15px}.review-activity{gap:10px}}
@media(max-width:700px){.layout{display:block}.sidebar,.top-right{display:none}.content{padding:0 17px 100px}.mobile-header{height:74px;display:flex;align-items:center;justify-content:space-between;gap:12px}.mobile-header>.icon{width:22px;height:22px}.mobile-header .brand{height:38px;margin:0}.mobile-header .brand img{width:37px;height:34px}.mobile-header .brand span{font-size:27px;color:var(--ink)}.mobile-actions{display:flex;align-items:center;gap:15px}.mobile-actions .icon{width:21px;height:21px}.mobile-actions .avatar{width:31px;height:31px}.page-heading{margin:16px 0 22px}h1{font-size:32px}.page-heading .primary{width:40px;height:40px;padding:0;justify-content:center}.primary .btn-label{display:none}.project-stats{gap:9px;margin-bottom:21px}.stat{padding:10px 5px;min-height:76px;display:flex;flex-direction:column;gap:0;justify-content:center;text-align:center;border-radius:13px}.stat .icon{display:none}.stat strong{font-size:23px}.stat small{font-size:11px;margin-top:4px}.tools{gap:9px;margin-bottom:18px}.search{height:43px;font-size:13px;padding:0 11px}.tool{height:43px;width:43px}.projects{grid-template-columns:1fr;gap:12px}.project-card{padding:13px;display:grid;grid-template-columns:112px minmax(0,1fr);grid-template-rows:24px 92px;gap:9px 13px;border-radius:15px}.project-card .card-top{grid-column:1/-1;margin:0;height:24px}.project-card .type-tag{font-size:11px;padding:4px 8px}.project-card .type-tag .icon{width:14px;height:14px}.project-image{grid-column:1;grid-row:2;width:112px;height:92px;border-radius:9px;aspect-ratio:auto}.project-card .card-bottom{grid-column:2;grid-row:2;align-items:flex-end;padding:0;align-self:stretch}.project-card .card-details{align-self:center}.project-card h2{font-size:14px;margin-bottom:7px}.status{font-size:10px;padding:4px 8px}.project-card .comments{font-size:11px}.project-card .comments .icon{width:15px;height:15px}
.review-controls{margin:0 0 19px;gap:8px}.tabs{width:100%;justify-content:space-between;overflow-x:auto;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}.tab{font-size:11px;padding:9px 11px;gap:5px}.tab b{min-width:18px;height:18px;font-size:10px}.sort-pill{display:none}.review-list{gap:11px}.review-card{grid-template-columns:108px minmax(0,1fr) 43px;min-height:112px;gap:9px;padding:12px;border-radius:16px;align-items:center}.review-image{width:108px;height:88px;border-radius:10px}.review-detail .type-tag{font-size:10px;padding:4px 8px}.review-detail .type-tag .icon{width:13px;height:13px}.review-detail h2{font-size:14px;line-height:1.26;margin:7px 0;letter-spacing:-.18px}.metadata{font-size:11px}.metadata .sep{padding:0 3px}.review-activity{align-self:center;min-width:0;height:88px;display:flex;flex-direction:column;justify-content:space-between;gap:0;padding:5px 0;align-items:center}.review-activity .comments{font-size:11px;gap:3px}.review-activity .comments .icon{width:13px;height:13px}.review-btn span{display:none}.review-btn .icon{width:20px;height:20px}
.workflows{grid-template-columns:1fr;gap:12px}.workflow-card{padding:18px;min-height:200px;border-radius:16px}.workflow-name h3{font-size:17px}.section-row{margin-bottom:14px}.stage-label{margin-top:20px}.flowline{gap:5px}.step{font-size:11px}.workflow-card .card-bottom{padding-top:17px}.settings-grid{grid-template-columns:1fr;gap:11px}.settings-item{padding:17px}.mobile-nav{position:fixed;z-index:20;bottom:0;left:0;right:0;background:#fff;display:flex;justify-content:space-around;border-top:1px solid #e7e5e1;padding:10px 5px max(12px,env(safe-area-inset-bottom))}.mobile-nav .nav-item{display:grid;justify-items:center;gap:4px;position:relative;color:#787b84;font-size:10px;padding:0 4px}.mobile-nav .nav-item .icon{width:20px;height:20px}.badge-mini{position:absolute;top:-5px;right:1px;border-radius:15px;padding:1px 4px;color:#fff;background:var(--accent);font-size:9px}
.mobile-nav .link-projects{background:transparent;color:var(--accent)}body:has(.page-view.is-target) .mobile-nav .link-projects,body:has(#new-workflow.is-target) .mobile-nav .link-projects{background:transparent;color:#787b84}body:has(#reviews.is-target) .mobile-nav .link-reviews,body:has(#workflows.is-target) .mobile-nav .link-workflows,body:has(#settings.is-target) .mobile-nav .link-settings,body:has(#new-workflow.is-target) .mobile-nav .link-workflows{background:transparent;color:var(--accent);font-weight:750}body:has(#projects.is-target) .mobile-nav .link-projects{color:var(--accent);font-weight:750}
}
@media(max-width:380px){.project-card{grid-template-columns:96px minmax(0,1fr);gap:9px}.project-image{width:96px}.stat small{font-size:10px}.tab{padding:8px 7px;font-size:10px}.review-card{grid-template-columns:91px minmax(0,1fr) 34px;gap:8px}.review-image{width:91px;height:82px}.review-activity{height:82px}}

/* Keep the prototype overlays usable on short viewports. */

/* Saved workflows */
.workflow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.workflow-action { padding: 6px 10px; border: 1px solid #ddd4e9; border-radius: 8px; background: var(--surface); color: #5e36b7; cursor: pointer; font-size: 12px; font-weight: 650; }
.workflow-action:disabled { opacity: .55; cursor: default; }
.workflow-action:hover:not(:disabled) { background: var(--lav); }

.template-actions { margin-top: 12px; }
.workflow-path { flex-wrap: wrap; }
.workflow-path .cluster { flex-wrap: wrap; max-width: 100%; }
.workflow-path .step { white-space: normal; overflow-wrap: anywhere; }
.workflow-gate { min-width: 0; max-width: 100%; }
.workflow-path .workflow-optional { margin-left: 6px; }
.workflow-name h3 { overflow-wrap: anywhere; }



.workflow-error { color: #9d2038; font-size: 13px; }
.workflow-status { color: #524a64; font-size: 13px; }
.workflow-status:empty, .workflow-error:empty { margin: 0; }



/* Workflow wizard */
body:has(.workflow-wizard.is-target) { background: #f8f7fb; }
body:has(.workflow-wizard.is-target) .content { padding: 16px clamp(14px, 2vw, 28px) 28px; }
body:has(.workflow-wizard.is-target) .top-right { display: none; }
body:has(.workflow-wizard.is-target) .sidebar { background: linear-gradient(155deg, var(--sidebar) 42%, #352353); }
.workflow-wizard { --wizard-line: #e5dff0; --wizard-tint: #f3edfd; }
.workflow-wizard [hidden] { display: none; }
.wizard-header { position: relative; isolation: isolate; }
.wizard-header::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto 42%; height: 110px; border-radius: 20px; pointer-events: none;
  background: radial-gradient(ellipse at top right, #e1cff9, #f8f7fb 68%); }
.wizard-title { display: flex; align-items: center; gap: 14px; }
.wizard-title h1 { font-size: clamp(24px, 2.4vw, 33px); letter-spacing: -.7px; }
.wizard-title p, .wizard-step > p, .wizard-section-heading p { margin: 5px 0 0; color: #56536f; }
.wizard-return, .stage-close { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f2edf9; color: #391d70; font-size: 28px; line-height: 1; cursor: pointer; }
.wizard-progress { display: flex; justify-content: center; align-items: center; gap: 12px; list-style: none; padding: 0; margin: 26px auto; max-width: 850px; color: #56536f; font-size: 13px; font-weight: 750; }
.wizard-progress li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.wizard-progress li:not(:last-child) { flex: 1; }
.wizard-progress li:not(:last-child)::after { content: ""; flex: 1; min-width: 18px; height: 2px; margin-left: 8px; background: #dac9f7; }
.wizard-progress li span { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border-radius: 50%; background: #eae6f2; }
.wizard-progress [aria-current="step"] { color: #5420b4; }
.wizard-progress [aria-current="step"] span, .wizard-completed span { background: var(--accent); color: white; }
.wizard-progress li.wizard-completed::after { background: var(--accent); }
.wizard-step h2 { margin: 0; font-size: clamp(21px, 2.1vw, 28px); letter-spacing: -.65px; }
.wizard-details, .wizard-step[data-step="3"] { background: #fdfcfe; border: 1px solid var(--wizard-line); border-radius: 20px; padding: clamp(20px, 4vw, 36px); }
.wizard-details { max-width: 760px; margin-inline: auto; }
.wizard-details label, .wizard-field { display: grid; gap: 5px; font-size: 13px; font-weight: 700; min-width: 0; }
.wizard-details label { margin-top: 20px; }
.wizard-details small, .stage-hint { color: #625d76; font-weight: 500; }
.wizard-details input, .wizard-details textarea, .wizard-field input, .wizard-field select {
  width: 100%; min-width: 0; min-height: 38px; border: 1px solid #dfd8eb; border-radius: 9px; padding: 8px 10px; background: #fdfcfe; color: var(--ink); font: inherit; font-weight: 500;
}
.wizard-details textarea { resize: vertical; }
.wizard-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.wizard-footer .primary, .path-tools .primary { border: 0; cursor: pointer; background: #6028d4; }
.wizard-footer .workflow-action, .wizard-cancel { padding: 10px 16px; border: 1px solid var(--wizard-line); border-radius: 10px; background: #fdfcfe; font-size: 13px; font-weight: 700; }
.wizard-cancel { color: #4e4266; }
.path-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 32%); border: 1px solid var(--wizard-line); border-radius: 20px; overflow: hidden; background: #fdfcfe; }
.path-canvas { min-width: 0; }
.wizard-section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; }
.wizard-section-heading .type-chip { flex: none; margin-top: 3px; }
.path-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 20px; background: #f8f6fc; border-block: 1px solid var(--wizard-line); }
.path-tools .primary, .path-tools .workflow-action { padding: 8px 12px; font-size: 12px; }
.approval-graph { container: approval-path / inline-size; --connector: #a687e6; display: flex; flex-direction: column; align-items: center; gap: 25px; min-width: 0; padding: 23px clamp(10px, 3vw, 24px);
  background: radial-gradient(circle, #e6dff2 1px, transparent 1px) 0 0 / 16px 16px, #fbfaff; }
.path-group { position: relative; width: min(100%, 440px); }
.path-group-parallel { width: min(100%, 650px); border: 1px solid #e0d2f7; border-radius: 18px; padding: 10px 12px 9px; background: #f1eafb; }
.path-group:not(:first-child)::before, .path-add-end::before, .path-terminal:last-child::before { content: ""; position: absolute; bottom: 100%; left: 50%; width: 2px; height: 25px; background: var(--connector); }
.path-group:not(:first-child)::after { content: ""; position: absolute; top: -8px; left: calc(50% - 3px); width: 6px; height: 6px; border-bottom: 2px solid var(--connector); border-right: 2px solid var(--connector); transform: rotate(45deg); }
.path-group-label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #4e209d; }
.path-group-label .icon { width: 17px; height: 17px; }
.path-cards { display: flex; flex-wrap: wrap; justify-content: center; }
.path-branch { position: relative; min-width: 0; flex: 1 1 100%; }
.path-parallel .path-branch { flex: 1 1 160px; padding: 13px 4px 14px; }
.path-parallel { position: relative; margin-top: 7px; }
.path-parallel::before, .path-parallel::after { content: ""; position: absolute; left: 15%; right: 15%; height: 1px; background: var(--connector); }
.path-parallel::before { top: 0; }
.path-parallel::after { bottom: 0; }
.path-parallel .path-branch::before, .path-parallel .path-branch::after { content: ""; position: absolute; left: 50%; width: 1px; height: 14px; background: var(--connector); }
.path-parallel .path-branch::before { top: 0; }
.path-parallel .path-branch::after { bottom: 0; }
.path-card { position: relative; display: flex; gap: 9px; align-items: center; width: 100%; height: 100%; min-height: 57px; text-align: left; padding: 8px 11px; border: 1px solid #d7c8f0; border-radius: 13px; background: #fdfcfe; color: var(--ink); box-shadow: 0 2px 5px #37226712; }
button.path-card { cursor: pointer; }
button.path-card:hover { background: #f8f3ff; }
.path-card[aria-pressed="true"] { border-color: #732cf0; box-shadow: 0 0 0 1px #732cf0, 0 3px 9px #6726bf2a; }
.path-card-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #ede2fb; color: #6326c6; }
.path-card-icon .icon { width: 18px; height: 18px; }
.path-card-title { display: grid; gap: 1px; flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.path-card-meta { font-size: 11px; color: #5b546d; }
.path-card-number, .path-card-optional { border-radius: 20px; background: #eee4fb; color: #5024a4; font-size: 10px; font-weight: 750; padding: 2px 6px; }
.path-card-optional { justify-self: start; }
.path-join { position: relative; padding-top: 9px; text-align: center; color: #593692; font-size: 11px; font-weight: 650; }
.path-join::before { content: ""; position: absolute; left: 50%; top: 0; height: 7px; width: 1px; background: var(--connector); }
.path-terminal, .path-add-end { position: relative; border-radius: 10px; background: #f2eafb; color: #5425ad; padding: 6px 14px; font-size: 12px; font-weight: 750; }
.path-add-end { width: min(100%, 440px); min-height: 35px; border: 1px dashed #a989e5; background: #fcfaff; cursor: pointer; }
.stage-settings { min-width: 0; border-left: 1px solid var(--wizard-line); background: #faf9fd; }
.stage-settings-header { min-height: 60px; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 15px; background: #f3effb; border-bottom: 1px solid var(--wizard-line); }
.stage-settings h3 { margin: 0; font-size: 20px; letter-spacing: -.45px; }
.stage-settings h4 { margin: 0; font-size: 13px; }
.stage-close { width: 31px; height: 31px; font-size: 23px; background: #faf8fe; }
.stage-settings-fields { display: grid; gap: 10px; padding: 13px 15px 16px; }
.stage-settings-empty { padding: 0 15px; color: #625d76; font-size: 13px; }
.reviewer-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -6px; }
.reviewer-chips:empty { display: none; }
.reviewer-chip { border: 0; border-radius: 7px; padding: 4px 7px; background: #eee3fb; color: #5424b2; cursor: pointer; font-size: 11px; }
.stage-behavior { margin: 3px 0 0; padding: 0 0 9px; border: 0; border-bottom: 1px solid var(--wizard-line); min-width: 0; }
.stage-behavior legend { padding: 0; margin-bottom: 5px; font-size: 13px; font-weight: 750; }
.stage-behavior-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.stage-behavior-option { display: grid; align-content: start; gap: 3px; padding: 7px; min-height: 51px; border: 1px solid var(--wizard-line); border-radius: 9px; background: #fdfcfe; text-align: left; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.stage-behavior-option small { color: #625d76; font-weight: 500; }
.stage-behavior-option[aria-pressed="true"] { border-color: var(--accent); background: var(--wizard-tint); color: #5123ae; }
.stage-behavior-option:disabled { cursor: default; }
.stage-toggles { display: grid; gap: 5px; }
.stage-toggle { display: flex; align-items: flex-start; gap: 5px; font-size: 12px; }
.stage-toggle input { accent-color: var(--accent); }
.stage-actions { border-top: 1px solid var(--wizard-line); padding-top: 8px; gap: 5px; }
.stage-actions .workflow-action { font-size: 11px; padding: 5px 7px; }
.review-workflow-details { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 16px 0; }
.review-workflow-details h3, .review-workflow-details p { margin: 0; overflow-wrap: anywhere; }
.review-workflow-details p { flex-basis: 100%; white-space: pre-wrap; color: #56536f; }
.review-graph { border: 1px solid var(--wizard-line); border-radius: 14px; }
.stage-summaries { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; margin-top: 14px; }
.stage-summary { background: #f8f5fc; border: 1px solid var(--wizard-line); border-radius: 12px; padding: 10px; overflow-wrap: anywhere; }
.stage-summary h3 { font-size: 14px; margin: 0; }
.stage-summary p { font-size: 12px; margin: 4px 0; }
.stage-summary-meta { color: #625d76; }
.workflow-wizard :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 960px) {
  .path-layout { grid-template-columns: minmax(0, 1fr); }
  .stage-settings { border-left: 0; border-top: 1px solid var(--wizard-line); }
}
@media (max-width: 700px) {
  body:has(.workflow-wizard.is-target) .content { padding-bottom: 94px; }
  .wizard-progress { gap: 5px; font-size: 10px; }
  .wizard-progress li { gap: 4px; }
  .wizard-progress li span { width: 22px; height: 22px; }
  .wizard-progress li:not(:last-child)::after { min-width: 5px; margin-left: 1px; }
  .wizard-section-heading { flex-wrap: wrap; padding: 12px; }
  .path-tools { padding-inline: 12px; }
}
@container approval-path (max-width: 490px) {
  .path-parallel { flex-direction: column; gap: 5px; padding-inline: 10px; }
  .path-parallel .path-branch { flex: auto; padding: 0; }
  .path-parallel .path-branch::before, .path-parallel .path-branch::after { content: none; }
  .path-parallel::before, .path-parallel::after { top: 4px; bottom: 0; width: 1px; height: auto; }
  .path-parallel::before { left: 2px; right: auto; }
  .path-parallel::after { right: 2px; left: auto; }
}

.path-parallel:has(.path-branch:nth-child(4)) { flex-direction: column; gap: 5px; padding-inline: 10px; }
.path-parallel:has(.path-branch:nth-child(4)) .path-branch { flex: auto; padding: 0; }
.path-parallel:has(.path-branch:nth-child(4)) .path-branch::before,
.path-parallel:has(.path-branch:nth-child(4)) .path-branch::after { content: none; }
.path-parallel:has(.path-branch:nth-child(4))::before,
.path-parallel:has(.path-branch:nth-child(4))::after { top: 4px; bottom: 0; width: 1px; height: auto; }
.path-parallel:has(.path-branch:nth-child(4))::before { left: 2px; right: auto; }
.path-parallel:has(.path-branch:nth-child(4))::after { right: 2px; left: auto; }
body:has(.workflow-wizard.is-target) .side-link.link-workflows { background: linear-gradient(110deg, #6038a4, #352060); }
.wizard-progress li.wizard-completed span { background: var(--accent); color: #fff; }
.wizard-section-heading .type-chip { color: #5323a5; background: #efe3fc; }
@media (min-width: 961px) {
  .stage-settings-fields { max-height: max(360px, calc(100dvh - 300px)); overflow-y: auto; scrollbar-width: thin; }
}

/* New Project wizard */
body:has(#new-project.is-target) .side-link.link-projects { background: #38383d; color: #fff; }
body:has(#new-project.is-target) .mobile-nav .link-projects { color: var(--accent); font-weight: 750; }
.project-wizard .project-panel {
  max-width: none;
  padding: clamp(18px, 4vw, 36px);
  border: 1px solid var(--wizard-line);
  border-radius: 20px;
  background: #fdfcfe;
}
.project-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}
.project-choices label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--wizard-line);
  border-radius: 14px;
  cursor: pointer;
}
.project-choices label:has(:checked) { border-color: var(--accent); background: var(--wizard-tint); }
.project-choices input { accent-color: var(--accent); flex: none; }
.project-choices span { display: grid; gap: 5px; }
.project-choices .icon { color: var(--accent); }
.project-choices small, #project-template-summary { color: var(--muted); }
.project-wizard select { width: 100%; min-width: 0; }
.project-items, .mock-project .card-details { overflow-wrap: anywhere; }
.project-extra { margin-top: 16px; }
.project-extra summary { cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 700; }
.project-items:empty { display: none; }
.project-items li { margin-block: 8px; }
.project-items button { margin-inline-start: 8px; }
#add-project-html { margin-top: 8px; }
#project-file-note { display: block; margin-top: 16px; }
.mock-project { display: block; }
.mock-project .card-bottom { align-items: center; flex-wrap: wrap; }
.mock-project .type-tag { text-transform: capitalize; }
.mock-project .workflow-action { white-space: normal; }
@media (max-width: 700px) {
  .project-choices { grid-template-columns: 1fr; }
  .project-choices span { grid-template-columns: auto 1fr; align-items: center; }
  .project-choices small { grid-column: 2; }
}

/* Batch 03: site access and test-email intake, scoped to the project wizard */
.project-wizard .project-intake {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid var(--wizard-line);
  border-radius: 14px;
  background: #fff;
}
.project-wizard .project-intake h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 750;
}
.project-wizard .project-intake h4 { margin: 0 0 8px; font-size: 14px; }
.project-wizard .project-intake-note,
.project-wizard .project-guidance p { margin: 8px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.project-wizard .project-intake > label,
.project-wizard .project-guidance > label { display: block; margin-top: 14px; }
.project-wizard .project-intake select { display: block; width: 100%; margin-top: 8px; }
.project-wizard .project-guidance { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--wizard-line); }
.project-wizard .project-guidance-options { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-wizard .project-guidance-options > div { padding: 12px; background: var(--wizard-tint); border-radius: 10px; }
.project-wizard .project-guidance-options strong { font-size: 13px; }
.project-wizard .project-guidance-options p { margin-bottom: 0; }
.project-wizard .project-test-address { padding: 10px 12px; border-radius: 10px; background: var(--wizard-tint); overflow-wrap: anywhere; }
.project-wizard .project-test-address code { user-select: all; }
.project-wizard #project-test-email-status { color: var(--muted); font-size: 13px; }
@media (max-width: 800px) {
  .project-wizard .project-guidance-options { grid-template-columns: 1fr; }
}
/* Batch 04.2: reference-led minimal desktop sidebar, icon-only mobile. */
@media (min-width:971px) {
  .sidebar { width:248px; flex-basis:248px; }
}
@media (min-width:701px) and (max-width:970px) {
  .sidebar { width:224px; flex-basis:224px; }
}
.sidebar { padding-inline:26px; }
.sidebar > .brand {
  height:48px;
  margin:14px 0 62px;
  justify-content:center;
}
.sidebar .side-nav { gap:14px; }
.sidebar .side-link {
  position:relative;
  min-height:44px;
  padding:10px 12px;
  gap:14px;
  font-size:14px;
  font-weight:500;
  border-radius:0;
  color:#d6d5da;
  background:transparent !important;
}
.sidebar .side-link .icon { width:19px; height:19px; stroke-width:1.7; }
.sidebar .side-link:hover,
.sidebar .side-link[aria-current="page"] {
  background:transparent !important;
  color:#fff;
}
/* A tiny edge tab replaces the oversized active background. */
.sidebar .side-link[aria-current="page"]::after {
  content:"";
  position:absolute;
  right:-26px;
  top:50%;
  transform:translateY(-50%);
  width:5px;
  height:25px;
  border-radius:5px 0 0 5px;
  background:#fff;
}
.sidebar .profile {
  order:2;
  margin-top:auto;
  margin-bottom:24px;
  justify-content:center;
}
.sidebar .profile > .avatar { width:42px; height:42px; }
.sidebar .profile > div:not(.avatar) { display:none; }
.sidebar .workspace-wrap {
  order:3;
  margin:0 -26px;
  padding:18px 26px 0;
  border-top:1px solid rgba(255,255,255,.18);
}
.sidebar .workspace {
  min-height:42px;
  padding:9px 8px;
  border:0;
  border-radius:8px;
  color:#ecebf0;
  font-size:13px;
  font-weight:560;
}
.sidebar .workspace:hover { background:rgba(255,255,255,.06); }
body:has(.workflow-wizard.is-target) .sidebar { background:var(--sidebar); }
@media (min-width:701px) and (max-width:970px) {
  .sidebar { padding-inline:20px; }
  .sidebar .side-link[aria-current="page"]::after { right:-20px; }
  .sidebar .workspace-wrap { margin-inline:-20px; padding-inline:20px; }
}
@media (max-width:700px) {
  .layout { display:flex; align-items:stretch; }
  .sidebar {
    display:flex;
    flex:0 0 64px;
    width:64px;
    position:sticky;
    top:0;
    height:100dvh;
    min-height:100dvh;
    padding:18px 9px 16px;
    z-index:21;
  }
  .sidebar > .brand {
    height:37px;
    margin:4px 0 58px;
    justify-content:center;
  }
  .sidebar > .brand img { width:39px; height:37px; }
  .sidebar > .brand span,
  .sidebar .side-link .title,
  .sidebar .side-link .bubble,
  .sidebar .workspace span,
  .sidebar .profile > div:not(.avatar) { display:none; }
  .sidebar .side-nav { gap:14px; }
  .sidebar .side-link {
    width:46px;
    min-height:44px;
    padding:11px;
    gap:0;
    justify-content:center;
  }
  .sidebar .side-link .icon { width:21px; height:21px; }
  .sidebar .side-link[aria-current="page"]::after {
    right:-9px;
    width:4px;
    height:24px;
  }
  .sidebar .profile { margin-bottom:20px; }
  .sidebar .profile > .avatar { width:36px; height:36px; font-size:13px; }
  .sidebar .workspace-wrap { margin:0 -9px; padding:16px 9px 0; }
  .sidebar .workspace {
    padding:6px 0;
    justify-content:center;
    min-height:40px;
  }
  .sidebar .workspace .icon { width:20px; height:20px; }
  .content { flex:1; min-width:0; padding:16px 12px 30px; }
  .mobile-header, .mobile-nav { display:none !important; }
}


