/* BRIEF-025 T1 — the Touch portal shell, after the original Touch mockups:
   black top bar (atollon wordmark · Touch · user), white left nav with count
   pills and expandable status sub-filters, grey canvas, white cards, coloured
   status edge-bars on rows, blue primary buttons. Status colours are the
   legacy Touch palette (redesign2018 requestsColors). */
:root{font-family:"Nunito Sans",Arial,Helvetica,sans-serif;color:#242424;background:#f4f4f4;font-size:15px;
 --blue:#0b6ee0;--blue-dark:#0959b5;--line:#e2e2e2;--nav-w:220px;--bar:#0b0b0b;--muted:#6e6e6e;
 --st-INITIAL:#FF851B;--st-ACCEPTED:#B5DC10;--st-RESOLVING:#3366cc;--st-RESOLVED:#FFDC00;--st-CLOSED:#FF4136;--st-DISMISSED:#9a9a9a}
*{box-sizing:border-box}body{margin:0;background:#f4f4f4}html,body{max-width:100%;overflow-x:hidden}
button,input,textarea,select{font:inherit}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
a{color:var(--blue)}
.button,button.button,button{border:1px solid var(--blue);background:var(--blue);color:#fff;border-radius:3px;padding:10px 18px;cursor:pointer;font-weight:700;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;min-height:44px;line-height:1.2}
.button.primary{background:var(--blue);border-color:var(--blue)}
.button.secondary,button.secondary,.ghost,button.ghost{background:#fff;color:var(--blue);border-color:#cfd8e3}
button:hover,.button:hover{filter:brightness(.94)}
button:disabled,.button:disabled{opacity:.45;cursor:default;filter:none}
button:focus-visible,a:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #55b6ff;outline-offset:2px}
.link{background:none;border:0;color:var(--blue);padding:8px 0;font-weight:700;text-decoration:underline;display:inline-block;min-height:44px;line-height:28px}

/* top bar */
.topbar{background:var(--bar);color:#fff;display:flex;align-items:center;height:60px;padding:0 0 0 24px;gap:0}
.topbar .brand{font-size:24px;font-weight:800;letter-spacing:-.5px;color:#fff;text-decoration:none;width:calc(var(--nav-w) - 24px);border-right:1px solid #2a2a2a;height:60px;display:flex;align-items:center}
.topbar .brand img{height:32px;width:auto;display:block}
.topbar .product{font-size:20px;font-weight:600;padding:0 28px}
.topbar .header-label{color:#9a9a9a;font-size:14px}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:14px;height:60px;padding:0 20px;background:#000}
.topbar-right #profile{font-size:14px;font-weight:600}
.topbar-right select{background:#1c1c1c;color:#fff;border:1px solid #333;border-radius:3px;padding:6px 8px;min-height:44px}
#signout{background:#1c1c1c;border-color:#333;font-size:13px;min-height:44px;padding:6px 12px}

/* frame */
main{min-height:calc(100vh - 60px - 52px)}
#app{display:grid;grid-template-columns:var(--nav-w) minmax(0,1fr);min-height:calc(100vh - 60px - 52px)}
#sidenav{background:#fff;border-right:1px solid var(--line);padding:6px 0}
.nav-item{display:flex;align-items:center;gap:10px;padding:0 14px 0 16px;min-height:56px;color:#5a5a5a;text-decoration:none;font-size:12px;letter-spacing:.4px;text-transform:uppercase;font-weight:700;border-left:4px solid transparent;border-bottom:1px solid #f0f0f0;white-space:nowrap}
.nav-item:hover{background:#fafafa}
.nav-item.active{color:var(--blue);background:#f2f6fb;border-left-color:var(--blue)}
.nav-icon{width:16px;height:16px;border:2px solid currentColor;border-radius:3px;opacity:.7;flex:0 0 16px}
.nav-icon-in{border-radius:50%}.nav-icon-out{border-radius:50%;transform:rotate(180deg)}.nav-icon-atollon{border-radius:50%;border-width:4px}
.nav-pill{margin-left:auto}
.chevron{width:9px;height:9px;border-right:2px solid #999;border-bottom:2px solid #999;transform:rotate(45deg);margin-left:4px;margin-top:-4px;cursor:pointer;flex:0 0 9px}
.nav-group.open .chevron{transform:rotate(-135deg);margin-top:4px}
.nav-group .sub{display:none;list-style:none;margin:0;padding:6px 0;background:#f7f7f7;border-bottom:1px solid #f0f0f0}
.nav-group.open .sub{display:block}
.sub-item{display:flex;align-items:center;gap:12px;padding:0 20px 0 30px;min-height:44px;color:#666;text-decoration:none;font-size:14px;text-transform:none;letter-spacing:0}
.sub-item.active{background:#eaf1fa;color:#242424;font-weight:700}
.sub-item .pill{margin-left:auto}
.dot{width:8px;height:8px;border-radius:50%;background:#bbb;flex:0 0 8px}
.pill{display:inline-block;min-width:30px;text-align:center;background:#e9e9e9;color:#666;border-radius:20px;padding:3px 8px;font-size:11px;font-weight:700;letter-spacing:0;text-transform:none}
.pill:empty{display:none}
.nav-item.active .pill,.pill-active{background:var(--blue);color:#fff}
.state-INITIAL{background:var(--st-INITIAL)}.state-ACCEPTED{background:var(--st-ACCEPTED)}.state-RESOLVING{background:var(--st-RESOLVING)}.state-RESOLVED{background:var(--st-RESOLVED)}.state-CLOSED{background:var(--st-CLOSED)}.state-DISMISSED{background:var(--st-DISMISSED)}

/* content */
#content{min-width:0}
#page-head{background:#fff;border-bottom:1px solid var(--line);padding:26px 32px;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:120px}
#page-head h1{font-size:30px;font-weight:300;margin:0;line-height:1.2}
#page-head p{margin:6px 0 0}
.muted,time{font-size:13px;color:var(--muted)}
.eyebrow{text-transform:uppercase;font-size:12px;letter-spacing:2px;color:#777;font-weight:700}
.empty{padding:30px 16px;color:#757575;line-height:1.5;margin:0}
.error{color:#a33622;background:#fff2ed;padding:14px;line-height:1.5;border-radius:3px}
#notice:not(:empty){padding:14px 32px;background:#fff3d9;color:#644900}
.section-title{font-size:18px;margin:28px 32px 12px;font-weight:700}

/* dashboard tiles */
.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding:28px 32px 0}
.tile{background:#fff;border:1px solid var(--line);border-top:4px solid var(--blue);border-radius:3px;padding:20px 22px;text-decoration:none;color:#242424;display:flex;flex-direction:column;gap:6px}
.tile-others{border-top-color:var(--st-ACCEPTED)}.tile-all{border-top-color:#9a9a9a}
.tile-count{font-size:34px;font-weight:300;line-height:1}
.tile-label{font-size:13px;color:#666;text-transform:uppercase;letter-spacing:.6px;font-weight:600}

/* list */
.queue{padding:28px 32px}
#dashboard-view + .queue{padding-top:0}
.table-card{background:#fff;border:1px solid var(--line);border-radius:3px}
.table-head,.row{display:grid;grid-template-columns:5px minmax(180px,1.3fr) minmax(220px,2fr) minmax(140px,1.2fr) 120px 110px;align-items:center;column-gap:16px}
.table-head{grid-template-columns:5px minmax(180px,1.3fr) minmax(220px,2fr) minmax(140px,1.2fr) 120px 110px;padding:18px 16px 18px 21px;color:var(--blue);font-size:13px;font-weight:700;border-bottom:1px solid var(--line);background:#fafafa}
.table-head span:first-child{grid-column:2}
.row{padding:0 16px 0 0;min-height:78px;color:#242424;text-decoration:none;border-bottom:1px solid #ececec}
.row:last-child{border-bottom:0}
.row:hover{background:#f7faff}
.row .bar{align-self:stretch;width:5px;border-radius:0 2px 2px 0}
.row .col{min-width:0;padding:14px 0;font-size:14px}
.row .from{display:flex;align-items:center;gap:12px;padding-left:16px}
.avatar{width:38px;height:38px;border-radius:50%;background:#dfe6ee;flex:0 0 38px}
.row strong{display:block;font-weight:700;line-height:1.35;overflow-wrap:anywhere}
.row small{display:block;color:#777;font-weight:400;margin-top:4px;font-size:12px;overflow-wrap:anywhere}
.row .step{display:block;font-size:11px;letter-spacing:1px;text-transform:uppercase;color:#777;font-weight:700;margin-bottom:3px}
.row .id{font-variant-numeric:tabular-nums;color:#555}
.badge{display:inline-block;background:#e5f2ff;color:#0068ad;border-radius:20px;padding:3px 9px;font-size:11px;font-weight:700;white-space:nowrap}
.state-badge{color:#fff;text-shadow:0 0 2px rgba(0,0,0,.35);font-size:12px;padding:4px 10px}
.badge.state-INITIAL{background:var(--st-INITIAL)}.badge.state-ACCEPTED{background:var(--st-ACCEPTED)}.badge.state-RESOLVING{background:var(--st-RESOLVING)}.badge.state-RESOLVED{background:var(--st-RESOLVED)}.badge.state-CLOSED{background:var(--st-CLOSED)}.badge.state-DISMISSED{background:var(--st-DISMISSED)}
.state-badge.state-RESOLVED,.state-badge.state-ACCEPTED{color:#333;text-shadow:none}
.row .state-text{font-weight:700}
.pagination{display:flex;align-items:center;gap:12px;margin:18px 0;font-size:13px;color:#666;flex-wrap:wrap}
.pagination .ghost{min-height:44px;padding:8px 14px}
#refresh{margin-left:auto}

/* detail */
article#detail{padding:24px 32px;max-width:1100px}
.back{margin-bottom:14px}
.card,article section.card{background:#fff;border:1px solid var(--line);padding:26px 28px;margin-bottom:20px;border-radius:3px}
.status-head{background:#fff;border:1px solid var(--line);border-left:6px solid #9a9a9a;border-radius:3px;padding:24px 28px;margin-bottom:20px;display:flex;justify-content:space-between;gap:20px;align-items:flex-start;flex-wrap:wrap}
.state-edge-INITIAL{border-left-color:var(--st-INITIAL)}.state-edge-ACCEPTED{border-left-color:var(--st-ACCEPTED)}.state-edge-RESOLVING{border-left-color:var(--st-RESOLVING)}.state-edge-RESOLVED{border-left-color:var(--st-RESOLVED)}.state-edge-CLOSED{border-left-color:var(--st-CLOSED)}.state-edge-DISMISSED{border-left-color:var(--st-DISMISSED)}
.status-head h1{font-size:26px;font-weight:300;margin:8px 0 10px;line-height:1.25;overflow-wrap:anywhere}
.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.card h2{font-size:21px;margin:0 0 14px;font-weight:700}
h3{font-size:17px;margin:20px 0 8px}
.description{white-space:pre-wrap;line-height:1.55;color:#555;margin:0}
.facts{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;margin:22px 0 0}
.facts div{min-width:0}
dt{color:#777;font-size:11px;text-transform:uppercase;letter-spacing:.6px;margin-bottom:6px}
dd{margin:0;font-size:15px;overflow-wrap:anywhere;line-height:1.4}
.status-card{background:#edf5ff;border:1px solid #d0e3fa;padding:16px;border-radius:4px;line-height:1.5;margin:12px 0}
.status-card.attention{background:#fff8e8;border-color:#eecb74}
.status-card.ready{background:#edf9f3;border-color:#a1d5bb}
.estimate{font-weight:700;line-height:1.5}
summary{cursor:pointer;font-weight:700;padding:5px 0;min-height:44px;display:flex;align-items:center}
pre{white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.7 Arial;margin-bottom:0;max-height:450px;overflow:auto}
#timeline{padding-left:22px;margin-bottom:0}
#timeline li{padding:0 0 16px 8px;line-height:1.5}
#timeline time{display:block}
.comment{border-bottom:1px solid #eee;margin-bottom:14px;padding-bottom:14px}
.comment strong{margin-right:10px}
.comment.mine strong{color:var(--blue)}
.comment p{white-space:pre-wrap;line-height:1.5;margin:8px 0 0}
label{display:block;font-size:14px;margin:14px 0 8px;font-weight:600}
textarea{display:block;width:100%;resize:vertical;border:1px solid #bbb;border-radius:4px;padding:12px;margin-bottom:12px;min-height:96px}
.attachments{list-style:none;margin:0 0 12px;padding:0}
.attachments li{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid #eee}
.attachments strong{display:block}.attachments small{display:block;color:#777;margin-top:3px}
.milestones{list-style:none;padding:0;margin:20px 0 0}
.milestones li{padding:12px 0;border-top:1px solid #eee}
.milestones strong{display:block;font-size:14px}
.milestones span{display:block;font-size:13px;color:#666;margin-top:5px}

/* progress panel (D25-2) */
.steps{list-style:none;margin:18px 0 0;padding:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.steps li{position:relative;padding:14px 12px 12px;border-top:4px solid #d9d9d9;background:#fafafa;border-radius:2px;min-width:0}
.steps strong{display:block;font-size:14px;margin:4px 0 4px}
.steps span{font-size:12px;color:#666;display:block;line-height:1.4}
.steps .step-no{display:inline-flex;width:22px;height:22px;border-radius:50%;background:#d9d9d9;color:#fff;font-size:12px;font-weight:700;align-items:center;justify-content:center}
.steps .step-done{border-top-color:var(--st-ACCEPTED)}.steps .step-done .step-no{background:var(--st-ACCEPTED);color:#333}
.steps .step-active{border-top-color:var(--blue);background:#f2f6fb}.steps .step-active .step-no{background:var(--blue)}
.steps .step-failed{border-top-color:var(--st-CLOSED)}.steps .step-failed .step-no{background:var(--st-CLOSED)}
.links{margin:16px 0 0;display:flex;gap:20px;flex-wrap:wrap}

/* My Atollon (BRIEF-025 T2): role filters with count pills, cards with a
   coloured right edge (green ready · blue in flight · red failed), the
   in-flight progress inline, a gear that opens the consulting-resource form. */
#instances-view{padding:28px 32px}
.role-filters{display:flex;gap:28px;flex-wrap:wrap;margin:6px 0 22px}
.role-filter{display:inline-flex;align-items:center;gap:10px;font-size:16px;font-weight:600;margin:0;min-height:44px;cursor:pointer}
.role-filter input{width:20px;height:20px;accent-color:var(--blue);margin:0}
.role-filter .pill{color:#fff;font-size:12px}
.role-pill-owner{background:var(--blue)}.role-pill-admin{background:var(--st-CLOSED)}.role-pill-user{background:#43c526}
.workspace-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:20px}
.workspace-grid .empty{grid-column:1/-1;background:#fff;border:1px solid var(--line);border-radius:3px}
.workspace{background:#fff;border:1px solid var(--line);border-right:6px solid #bdbdbd;border-radius:3px;display:flex;align-items:stretch;min-height:80px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.workspace.edge-ready{border-right-color:#43c526}.workspace.edge-inflight{border-right-color:var(--blue)}.workspace.edge-failed{border-right-color:var(--st-CLOSED)}
.ws-logo{width:80px;flex:0 0 80px;background:#f0f0f0;position:relative}
.ws-logo::after{content:"";position:absolute;inset:0;margin:auto;width:40px;height:40px;border-radius:50%;border:6px solid #d5d5d5}
.ws-body{min-width:0;flex:1;padding:14px 16px}
.ws-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.workspace h3{margin:0 0 3px;font-size:16px;overflow-wrap:anywhere}
.ws-domain{margin:0;font-size:13px;color:#888;overflow-wrap:anywhere}
.ws-meta{margin:10px 0 0;font-size:13px}
.badge.role-owner{background:#e5f2ff;color:#0068ad}.badge.role-admin{background:#ffe9e7;color:#b3261e}.badge.role-user{background:#e9f9e3;color:#2b7a1a}
.ws-gear{flex:0 0 44px;width:44px;height:44px;margin:-8px -8px 0 0;padding:0;background:none;border:0;border-radius:50%;position:relative;cursor:pointer}
.ws-gear::before{content:"";position:absolute;inset:0;margin:auto;width:16px;height:16px;border-radius:50%;border:5px solid var(--blue);box-sizing:border-box}
.ws-gear::after{content:"";position:absolute;inset:0;margin:auto;width:24px;height:24px;border-radius:50%;border:3px dotted var(--blue);box-sizing:border-box}
.ws-gear:hover,.ws-gear[aria-expanded="true"]{background:#eaf1fa}
.workspace .button{margin-top:14px;width:auto}
.steps-mini{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-top:14px}
.steps-mini li{padding:8px 6px 6px;border-top-width:3px}
.steps-mini strong{font-size:11px;margin:3px 0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.steps-mini span{font-size:11px}
.steps-mini .step-no{width:18px;height:18px;font-size:10px}
.ws-form{margin-top:14px;padding-top:14px;border-top:1px solid #eee}
.ws-form label{margin-top:0}
.ws-form input{display:block;width:100%;border:1px solid #bbb;border-radius:4px;padding:10px 12px;min-height:44px;margin-bottom:6px}
.ws-form .muted{margin:0 0 10px}
.ws-form .actions .button{margin-top:0}
.form-status:not(:empty){margin:10px 0 0;color:#a33622}
.new-atollon{gap:10px}.new-atollon[aria-disabled="true"]{opacity:.45;pointer-events:none}
.new-atollon-icon{width:18px;height:18px;border-radius:50%;background:#fff;position:relative;flex:0 0 18px}
.new-atollon-icon::after{content:"";position:absolute;inset:0;margin:auto;width:8px;height:8px;border-radius:50%;background:var(--blue)}

/* sign-in + footer */
#signin-panel{max-width:720px;margin:60px auto;background:#fff;border:1px solid var(--line);border-top:5px solid var(--blue);padding:40px}
#signin-panel h1{font-size:30px;line-height:1.2;margin:12px 0 20px}
#signin-panel p{line-height:1.7;color:#666;margin-bottom:28px}
footer{font-size:12px;color:#888;padding:18px 32px;border-top:1px solid #ddd;background:#f4f4f4}

/* R20 — every step completes on a phone (390×844): no horizontal scroll,
   44px targets, one stacked flow. */
#app,main,article,section,dl,pre{min-width:0;max-width:100%}
@media(max-width:1100px){.table-head,.row{grid-template-columns:5px minmax(140px,1fr) minmax(180px,1.6fr) minmax(110px,1fr) 100px 90px}.facts{grid-template-columns:1fr 1fr}.steps{grid-template-columns:repeat(3,minmax(0,1fr))}.steps.steps-mini{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:767px){
 .topbar{padding-left:14px}.topbar .brand{width:auto;border:0;padding-right:14px;font-size:22px}.topbar .product{padding:0 12px;font-size:18px}.topbar .header-label,#profile{display:none}.topbar-right{padding:0 12px;gap:8px}
 #app{display:block}
 #sidenav{display:flex;overflow-x:auto;border-right:0;border-bottom:1px solid var(--line);padding:0}
 .nav-item{min-height:48px;border-left:0;border-bottom:3px solid transparent;white-space:nowrap;padding:0 14px;font-size:12px}
 .nav-item.active{border-bottom-color:var(--blue);background:#fff}
 .nav-group{display:flex}.nav-group.open .sub{display:flex;padding:0}.sub-item{padding:0 10px;min-height:48px}.chevron{display:none}
 .nav-item .nav-icon{display:none}
 #page-head{padding:16px;min-height:0;flex-wrap:wrap}#page-head h1{font-size:24px}
 .tiles{grid-template-columns:1fr;padding:16px 16px 0;gap:12px}.section-title{margin:18px 16px 8px}
 .queue,#instances-view,article#detail{padding:16px}
 .table-head{display:none}
 .row{display:grid;grid-template-columns:5px 1fr;grid-auto-rows:auto;column-gap:12px;padding:0 12px 0 0}
 .row .bar{grid-row:1/span 5}
 .row .col{padding:6px 0}
 .row .from{padding-top:14px;padding-left:0}.row .id{padding-bottom:14px;font-size:12px}
 .row .ctx,.row .date{font-size:13px;color:#555}
 .status-head,.card,article section.card{padding:18px}
 .status-head h1{font-size:22px}
 .facts{grid-template-columns:1fr;gap:14px}
 .steps{grid-template-columns:1fr}
 .steps.steps-mini{grid-template-columns:repeat(5,minmax(0,1fr))}
 .steps-mini strong{display:none}
 .role-filters{gap:12px 18px;margin-bottom:16px}.role-filter{font-size:14px}
 .workspace-grid{grid-template-columns:1fr}.ws-logo{width:56px;flex-basis:56px}
 button,.button{width:100%}
 .topbar button,.topbar .button,.pagination button,.attachments .button,.link,.ws-gear{width:auto}
 .actions .button{flex:1 1 auto}
 #signin-panel{margin:24px 16px;padding:26px}
 footer{padding:16px}
}

/* BRIEF-025 T4 — Members panel + invite page (appended; nothing above is
   changed). Same shell as every other card: white card on the grey canvas,
   blue primary action, 44px targets, one column on a phone. */
.members{margin:20px 0 0}
.members h3{margin:26px 0 8px;font-size:15px;text-transform:uppercase;letter-spacing:.6px;color:#777}
.members-list{list-style:none;margin:0;padding:0}
.members-list li{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid #eee}
.members-list li:last-child{border-bottom:0}
.members-list li.empty{display:block;padding:16px 0;color:#757575}
.members-list .avatar{width:34px;height:34px;flex:0 0 34px}
.members-list .avatar.invited{background:#f0e6d2}
.members-list .member-id{min-width:0;flex:1}
.members-list .member-id strong{display:block;overflow-wrap:anywhere}
.members-list .member-id small{display:block;color:#777;margin-top:3px;font-size:12px;overflow-wrap:anywhere}
.members-list .button{flex:0 0 auto;padding:8px 14px}
.invite-form{margin-top:22px;border-top:1px solid #eee;padding-top:18px}
.invite-form input{display:block;width:100%;max-width:420px;border:1px solid #bbb;border-radius:4px;padding:12px;margin:8px 0 14px;min-height:44px}
.invite-form .invite-status:not(:empty){margin:12px 0 0;line-height:1.5}

/* invite page — no left nav, so the shell grid is one column */
#app.invite-only{grid-template-columns:minmax(0,1fr)}
#invite-view{padding:28px 32px;max-width:760px;margin:0 auto}
.invite-card{border-top:5px solid var(--blue)}
.invite-card h1{font-size:28px;font-weight:300;line-height:1.25;margin:12px 0 16px}
.invite-card p{line-height:1.6;color:#555;margin:0 0 14px}
.invite-card .facts{margin:20px 0 6px}
.invite-card .actions{margin-top:22px}
@media(max-width:767px){
 #invite-view{padding:16px}
 .members-list li{flex-wrap:wrap}
 .members-list .button{width:100%}
 .invite-form input{max-width:none}
}
