/* KRAcloud design (same tokens as the sign-in page, /var/www/kra-test/index.html); fonts are served from fonts/ (CSP: no external hosts) */
@font-face{font-family:"Readex Pro";font-style:normal;font-weight:160 700;font-display:swap;src:url(fonts/readex-pro-arabic-var.woff2) format("woff2");unicode-range:U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1}
@font-face{font-family:"Readex Pro";font-style:normal;font-weight:160 700;font-display:swap;src:url(fonts/readex-pro-latin-ext-var.woff2) format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:"Readex Pro";font-style:normal;font-weight:160 700;font-display:swap;src:url(fonts/readex-pro-latin-var.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"IBM Plex Sans Arabic";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:"IBM Plex Sans Arabic";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/ibm-plex-sans-arabic-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IBM Plex Sans Arabic";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2) format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:"IBM Plex Sans Arabic";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/ibm-plex-sans-arabic-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IBM Plex Sans Arabic";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:"IBM Plex Sans Arabic";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/ibm-plex-sans-arabic-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
:root{color-scheme:light;--bg:#F5F4F0;--panel:#FFFFFF;--panel2:#F5F4F0;--line:#E4E2DB;--line-2:#EEECE6;--text:#121316;--ink-2:#2C2E34;--muted:#6F7178;--faint:#9B9DA4;
  --accent:#0E7C5A;--accent-soft:#E7F2EC;--accent-line:#CDE6DA;--accent-ink:#0A5C43;--on-accent:#FFFFFF;
  --ok:#0E7C5A;--ok-soft:#E7F2EC;--ok-line:#CDE6DA;--ok-ink:#0A5C43;
  --bad:#B03A2E;--bad-soft:#FBEDEB;--bad-line:#F2D8D4;--bad-ink:#8C2B21;--warn:#A0640F;--warn-soft:#FBF3E4;--warn-line:#EEDDB8;--warn-ink:#7A4C0B;
  --hover-line:#D3D0C8;--hover-bg:#EDEBE5;--row-hover:#FAF9F6;--placeholder:#ABADB3;--shadow:rgba(18,19,22,.16);--backdrop:rgba(18,19,22,.38);
  --dark:#0E0F12;--dark-2:#16181C;--dark-line:#26282E;--dark-text:#E8E6E0;--ease:cubic-bezier(.22,.7,.28,1);
  --font:"Readex Pro","IBM Plex Sans Arabic",system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif;--mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace}
/* dark theme (theme.js sets data-theme from the user's choice or the device); the accent colour comes from theme.js */
:root[data-theme=dark]{color-scheme:dark;--bg:#0F1113;--panel:#171A1D;--panel2:#121416;--line:#2A2F34;--line-2:#23272B;--text:#E8EAE7;--ink-2:#C4C9C6;--muted:#8D959C;--faint:#646B72;
  --ok:#3DBE8F;--ok-soft:#12301F;--ok-line:#1E4A35;--ok-ink:#8EE0BE;
  --bad:#EF7B6E;--bad-soft:#3A1D19;--bad-line:#5A2A24;--bad-ink:#F6A99F;--warn:#E2A54F;--warn-soft:#33260F;--warn-line:#4E3A18;--warn-ink:#EFC27F;
  --hover-line:#3A4046;--hover-bg:#1F2327;--row-hover:#1A1D20;--placeholder:#5F666D;--shadow:rgba(0,0,0,.5);--backdrop:rgba(0,0,0,.6);
  --dark:#0B0D0F;--dark-2:#121416;--dark-line:#23272B;--dark-text:#E8E6E0}
/* true black for OLED screens */
:root[data-theme=dark][data-oled]{--bg:#000;--panel:#0A0A0A;--panel2:#000;--line:#1F1F1F;--line-2:#161616;--hover-bg:#141414;--row-hover:#0E0E0E;--dark:#000;--dark-2:#050505;--dark-line:#1A1A1A}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{background:var(--bg);color:var(--text);font:14px/1.5 var(--font);overflow:hidden;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
button,input,select,textarea{font:inherit;color:inherit}
button{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:5px 10px;cursor:pointer}
button:hover:not(:disabled){border-color:var(--accent)}
button:disabled{opacity:.45;cursor:not-allowed}
button.primary{background:var(--accent);border-color:var(--accent);color:#fff}
button.danger{border-color:var(--bad);color:var(--bad)}
button.ghost{background:transparent;border-color:transparent}
input[type=text],input[type=password],select,textarea{background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:5px 8px;width:100%}
input:focus,select:focus,textarea:focus,button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
#shell{display:grid;grid-template-rows:auto 1fr;height:100dvh}
header{display:flex;gap:8px;align-items:center;padding:6px 10px;background:var(--panel);border-bottom:1px solid var(--line);flex-wrap:wrap}
header .brand{font-weight:700;margin-inline-end:6px}
header .spacer{flex:1}
header select{width:auto;max-width:280px}
.pill{font-size:12px;padding:1px 8px;border-radius:99px;border:1px solid var(--line);color:var(--muted)}
.pill.running{color:var(--accent);border-color:var(--accent)}.pill.succeeded{color:var(--ok);border-color:var(--ok)}.pill.failed{color:var(--bad);border-color:var(--bad)}.pill.cancelled{color:var(--warn);border-color:var(--warn)}.pill.queued{color:var(--muted)}
main{display:grid;grid-template-columns:260px minmax(0,1fr);grid-template-rows:minmax(0,1fr);min-height:0}
#side{grid-row:1;border-inline-end:1px solid var(--line);background:var(--panel2);display:flex;flex-direction:column;min-height:0}
#bottom{grid-row:1;background:var(--panel2);display:flex;flex-direction:column;min-height:0;min-width:0}
/* the editor: a window of its own over the whole page while a file is open in it */
#editorPane{display:none;flex-direction:column;min-height:0;min-width:0}
main.editing #editorPane{display:flex;position:fixed;inset:0;z-index:40;background:var(--panel);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.edbar{display:flex;align-items:stretch;border-bottom:1px solid var(--line);background:var(--panel);flex:none}
.edbar #etabs{flex:1;min-width:0;border-bottom:0}
#edClose{border:0;border-inline-end:1px solid var(--line);border-radius:0;padding:6px 14px;font-weight:600;white-space:nowrap;flex:none}
.tab.edopen{margin-inline-start:auto;color:var(--accent);font-weight:600}
.tabs{display:flex;gap:2px;overflow-x:auto;border-bottom:1px solid var(--line);background:var(--panel);flex:none}
.tab{padding:6px 12px;border:0;border-radius:0;background:transparent;white-space:nowrap;border-bottom:2px solid transparent;display:flex;gap:6px;align-items:center}
.tab.active{border-bottom-color:var(--accent);color:var(--accent)}
.tab .x{opacity:.6}.tab .dot{color:var(--warn)}
.toolbar{display:flex;gap:4px;padding:6px;flex-wrap:wrap;border-bottom:1px solid var(--line)}
.toolbar button{padding:3px 8px;font-size:12px}
#tree{overflow:auto;flex:1;padding:4px 0;font-size:13px}
.node{display:flex;gap:4px;padding:2px 8px;cursor:pointer;white-space:nowrap;align-items:center}
.node:hover{background:var(--panel)}.node.sel{background:var(--panel);outline:1px solid var(--line)}
.node .nm{overflow:hidden;text-overflow:ellipsis}
.node .mt{margin-inline-start:auto;padding-inline-start:6px;font-size:11px;flex:none}
.rtlview{height:55vh;overflow:auto;font:12px/1.5 var(--mono);white-space:pre-wrap;word-break:break-word;background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:8px;unicode-bidi:plaintext}
.tfilter{padding:6px 6px 0;margin:0;gap:4px}.tfilter select,.tfilter input{font-size:12px;padding:2px 4px;flex:1;min-width:0}
#cm{flex:1;min-height:0;overflow:hidden}
#cm .cm-editor{height:100%}
.empty{color:var(--muted);padding:20px;text-align:center}
.panel{flex:1;min-height:0;overflow:auto;padding:10px}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
label.f{display:block;margin:6px 0;font-size:12px;color:var(--muted)}
label.f[hidden]{display:none}
label.f input,label.f select{margin-top:2px;color:var(--text)}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px}
pre.console{margin:0;font:12px/1.4 var(--mono);white-space:pre-wrap;word-break:break-all;background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:8px;overflow:auto;flex:1;min-height:80px}
.console .l{display:block;min-height:1.4em}.console .sys{color:var(--accent)}
.c1{font-weight:700}.c30{color:#6e7681}.c31{color:#f85149}.c32{color:#3fb950}.c33{color:#d29922}.c34{color:#58a6ff}.c35{color:#bc8cff}.c36{color:#39c5cf}.c90{color:#8b949e}.c91{color:#ff7b72}.c92{color:#56d364}.c93{color:#e3b341}.c94{color:#79c0ff}.c96{color:#56d4dd}
table{width:100%;border-collapse:collapse;font-size:13px}
td,th{padding:4px 8px;border-bottom:1px solid var(--line);text-align:start;vertical-align:top}
tr.click{cursor:pointer}tr.click:hover{background:var(--panel)}
.note{color:var(--muted);font-size:12px}
.warnbox{border:1px solid var(--warn);border-radius:8px;padding:8px;margin:8px 0;font-size:12px;color:var(--warn)}
.errbox{border:1px solid var(--bad);border-radius:8px;padding:8px;margin:8px 0;color:var(--bad)}
.okbox{border:1px solid var(--ok);border-radius:8px;padding:8px;margin:8px 0;font-size:13px;color:var(--ok, #3fb950)}
#term{height:100%;min-height:120px}
#toast{position:fixed;bottom:14px;left:50%;transform:translateX(-50%);background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:8px 14px;z-index:60;max-width:90vw}
#toast.bad{border-color:var(--bad)}
#xfers{position:fixed;bottom:14px;inset-inline-end:14px;z-index:21;width:min(380px,calc(100vw - 28px));display:flex;flex-direction:column;gap:8px;max-height:60vh;overflow:auto}
#xfers .xf{background:var(--panel);border:1px solid var(--accent);border-radius:10px;padding:8px 10px;box-shadow:0 4px 16px rgba(0,0,0,.35)}
#xfers .xfh{display:flex;gap:8px;align-items:center;justify-content:space-between}
#xfers .xfn{font-weight:600;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#xfers .xfh button{padding:2px 8px;font-size:12px;flex:none}#xfers .xfh button.xfx{color:var(--bad)}
#xfers progress{width:100%;height:8px;margin:6px 0 2px;accent-color:var(--accent)}
#xfers .xfd{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
dialog{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:16px;max-width:92vw;width:420px}
dialog::backdrop{background:rgba(0,0,0,.55)}
@media (max-width:820px){
  main,main.noside,main.lib{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
  #side,#bottom{grid-row:1;grid-column:1;display:none;border:0}
  main[data-view=files]:not(.lib) #side{display:flex}main[data-view=ops] #bottom,main.lib #bottom{display:flex}
}

.presign{border:1px solid var(--line);border-radius:8px;padding:10px;margin-bottom:12px;background:var(--panel2)}
.psbanner{padding:8px 10px;border-radius:8px;margin:10px 0;font-weight:600;border:1px solid}
.psbanner.ok{border-color:var(--ok);color:var(--ok)}
.psbanner.bad{border-color:var(--bad);color:var(--bad)}
.errbox{border:1px solid var(--bad);border-radius:8px;padding:8px;margin:8px 0;font-size:12px;color:var(--bad)}
.findings{list-style:none;padding:0;margin:4px 0 10px}
.findings li{border-inline-start:3px solid;padding:4px 8px;margin:4px 0}
.findings li.e{border-color:var(--bad)}
.findings li.w{border-color:var(--warn)}
.findings .fix{color:var(--muted);font-size:12px}
.findings .code{font-family:var(--mono);font-size:10px}
.grid3{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.kv td{padding:1px 8px 1px 0;vertical-align:top;word-break:break-all}
.note.warn{color:var(--warn)}

/* ---------- guided build workflow ---------- */
.card{border:1px solid var(--line);border-radius:10px;padding:12px;margin:0 0 12px;background:var(--panel);min-width:0}
.card>h3,details.card>summary{margin:0 0 8px;font-size:15px}
details.card>summary{cursor:pointer}
.card h4{margin:10px 0 4px;font-size:13px}
.danger-zone{border-color:color-mix(in srgb,var(--bad) 55%,var(--line))}
.target-name{font-size:18px;font-weight:700;margin-bottom:6px;overflow-wrap:anywhere;display:flex;align-items:center;gap:10px;min-width:0}
.target-name span{min-width:0}
dl.kv2{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 14px;margin:6px 0;font-size:13px}
dl.kv2 dt{color:var(--muted)}dl.kv2 dd{margin:0;overflow-wrap:anywhere;min-width:0}
.wrap{overflow-wrap:anywhere;word-break:break-word}
.panel{overflow-x:hidden}
.sticky-sum{position:sticky;top:-10px;z-index:3;background:var(--panel2);margin:-10px -10px 10px;padding:8px 10px;border-bottom:1px solid var(--line);display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.choice{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}
.choice .opt{display:block;border:1px solid var(--line);border-radius:8px;padding:8px 10px;cursor:pointer}
.choice .opt.on{border-color:var(--accent)}
.choice .opt input{margin-inline-end:6px}
.act{display:grid;grid-template-columns:minmax(190px,max-content) minmax(0,1fr);gap:6px 12px;align-items:start;padding:8px 0;border-top:1px solid var(--line)}
.act:first-of-type{border-top:0}
.act .grow{display:flex;flex-direction:column;gap:6px}
ol.steps{display:flex;flex-wrap:wrap;gap:4px;list-style:none;padding:0;margin:8px 0}
ol.steps li{font-size:12px;padding:2px 8px;border-radius:99px;border:1px solid var(--line);color:var(--muted)}
ol.steps li.done{color:var(--ok);border-color:var(--ok)}
ol.steps li.cur{color:#fff;background:var(--accent);border-color:var(--accent)}
ol.steps li.fail{color:var(--bad);border-color:var(--bad)}
progress{width:100%;height:8px}
pre.tail{margin:6px 0;font:12px/1.4 var(--mono);white-space:pre-wrap;overflow-wrap:anywhere;background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:6px 8px;max-height:9.5em;overflow:auto}
#ghRecent{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 8px}#ghRecent .chip{cursor:pointer;direction:ltr}#ghProbe{margin:-2px 0 8px;overflow-wrap:anywhere}
.chips .chip{border-radius:99px;font-size:12px}.chips .chip.on{border-color:var(--accent);color:var(--accent)}
.arts{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:10px}
.art,.asset{border:1px solid var(--line);border-radius:10px;padding:10px;background:var(--panel);min-width:0}
.asset{margin:6px 0}
.art-h{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.art .acts{margin:8px 0 0}.art .del{margin:8px 0 0;padding-top:8px;border-top:1px dashed var(--line)}
.pill.t-signed-ipa{color:var(--ok);border-color:var(--ok)}.pill.t-unsigned-ipa{color:var(--warn);border-color:var(--warn)}
ol.wizard{list-style:none;padding:0;margin:0}
.wstep{display:grid;grid-template-columns:28px minmax(0,1fr);gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.wstep:first-child{border-top:0}
.wn{width:26px;height:26px;border-radius:50%;border:1px solid var(--accent);color:var(--accent);display:grid;place-items:center;font-weight:700;font-size:12px}
.wb{display:flex;flex-direction:column;gap:6px;min-width:0}
fieldset.f{border:1px solid var(--line);border-radius:8px;margin:6px 0;padding:6px 8px;font-size:12px;color:var(--muted)}
label.chk{display:flex;gap:6px;align-items:baseline;color:var(--text);margin:4px 0}
p.warn,.warn{color:var(--warn)}
dialog{max-height:calc(100dvh - 32px);overflow:auto}
@media (max-width:820px){
  .panel{padding:10px 12px}
  .sticky-sum{margin:-10px -12px 10px;padding:8px 12px}
  button{min-height:44px;padding:8px 12px}
  .toolbar button{min-height:36px}
  .tab{min-height:44px}
  input[type=text],input[type=password],select,textarea{min-height:44px;font-size:16px}
  .grid2,.grid3,.choice,.arts{grid-template-columns:minmax(0,1fr)}
  .act{grid-template-columns:minmax(0,1fr)}
  .act>button{width:100%}
  dl.kv2{grid-template-columns:minmax(0,1fr);gap:0}
  dl.kv2 dt{margin-top:6px}
  dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px);padding:14px}
  header select{max-width:none;flex:1 1 100%;order:5}
  #runner .row select{flex:1 1 100%}
}

/* Safari draws native <select> menus with its own light background, ignoring ours, so light text became unreadable */
select{-webkit-appearance:none;appearance:none;background-color:var(--bg);color:var(--text);padding-inline-end:28px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239da6ae' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;text-overflow:ellipsis}
select option{background:var(--panel);color:var(--text)}
button.danger.solid{background:var(--bad);color:#fff}
/* libraries */
.rule{display:flex;gap:6px;flex-wrap:wrap}.rule>*{flex:1 1 140px;width:auto}
pre.diff{margin:6px 0;font:12px/1.4 var(--mono);white-space:pre;overflow:auto;max-height:50vh;background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:6px 8px}
.libpreview details{margin:6px 0}.libpreview summary{cursor:pointer;overflow-wrap:anywhere}
dialog:has(.libpreview){width:min(900px,96vw)}
.art.lib .chips .pill{font-size:11px}
.err{color:var(--bad);font-size:12px}
.errbox li.hint{font-weight:600;list-style:"💡 "}
.termbar{display:flex;flex-wrap:wrap;gap:6px 14px;margin:6px 0}
.termbar[hidden]{display:none}
.termbar .tgroup{gap:6px;flex-wrap:wrap}
.termbar .key{min-width:44px;font-family:var(--mono)}
@media (max-width:700px){.termbar button{min-height:44px}.termbar .key{min-width:48px}}
#term{overflow:auto;-webkit-overflow-scrolling:touch;flex:1 0 auto;min-height:min(60vh,560px);height:auto;max-height:560px}
#xfers .xf.warn{border-color:var(--warn)}#xfers .xf.warn .xfd{color:var(--warn)}
#xfers .xf.bad{border-color:var(--bad)}#xfers .xf.bad .xfd{color:var(--bad)}
#xfers .xfb{display:flex;gap:4px;flex:none}#xfers .xfb button:not(.xfx){color:var(--accent)}
dialog.wide{width:680px;max-height:90vh;overflow:auto}
.findings{list-style:none;padding:0;margin:8px 0}
.findings>li{display:flex;gap:8px;padding:6px 0;border-bottom:1px solid var(--line)}
.findings .ic{flex:none}
.findings .sol{margin:4px 0 0;padding-inline-start:18px;font-size:12px}
.fix{border:1px solid var(--line);border-radius:8px;padding:8px;margin:6px 0}
pre.preview{max-height:260px;overflow:auto;font-size:11px;background:var(--bg);padding:8px;border-radius:6px;white-space:pre}
.mono{font-family:ui-monospace,monospace}
#claudeChanges{margin:6px 0;max-height:40vh;overflow:auto;flex:none}
#claudeChanges .ccDiff ul{margin:4px 0;padding-inline-start:18px}
b.warn{color:var(--warn)} b.bad{color:var(--bad)} b.ok{color:var(--ok)}

/* ---------- KRAcloud look: components (after the rules above so these win) ---------- */
::selection{background:var(--accent-soft);color:var(--accent)}
button{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:6px 12px;color:var(--ink-2);transition:background .18s var(--ease),border-color .18s var(--ease),color .18s var(--ease)}
button:hover:not(:disabled){border-color:var(--hover-line);color:var(--text)}
button:active:not(:disabled){transform:translateY(1px)}
button.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-weight:500}
button.primary:hover:not(:disabled){background:var(--accent);border-color:var(--accent);color:var(--on-accent);filter:brightness(1.08)}
button.danger{border-color:var(--bad-line);color:var(--bad)}button.danger:hover:not(:disabled){border-color:var(--bad);color:var(--bad);background:var(--bad-soft)}
button.danger.solid{background:var(--bad);border-color:var(--bad);color:#fff}
button.ghost{background:transparent;border-color:transparent;color:var(--muted)}button.ghost:hover:not(:disabled){background:var(--panel);border-color:var(--line)}
input[type=text],input[type=password],input[type=date],input[type=number],select,textarea{background-color:var(--panel);border:1px solid var(--line);border-radius:10px;padding:6px 10px;color:var(--text);transition:border-color .18s var(--ease),box-shadow .18s var(--ease)}
select{padding-inline-end:30px}
input:hover,select:hover,textarea:hover{border-color:var(--hover-line)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
input::placeholder,textarea::placeholder{color:var(--placeholder)}
input[type=checkbox],input[type=radio],progress{accent-color:var(--accent)}
header{background:var(--panel);border-bottom:1px solid var(--line);padding:8px 14px;gap:10px}
header .brand{display:inline-flex;align-items:center;gap:9px;font-weight:600;font-size:15px;letter-spacing:-.01em;color:var(--text);text-decoration:none}
header .brand img{width:26px;height:26px;flex:none}
header .brand em{font-style:normal;font-weight:300;opacity:.55}
header .brand .prod{padding-inline-start:9px;border-inline-start:1px solid var(--line);font-weight:500;color:var(--muted)}
.pill{background:var(--panel);border-color:var(--line);color:var(--muted);font-size:11.5px;padding:2px 10px}
.pill.running{color:var(--accent);border-color:var(--accent-line);background:var(--accent-soft)}
.pill.succeeded{color:var(--ok);border-color:var(--ok-line);background:var(--ok-soft)}
.pill.failed{color:var(--bad);border-color:var(--bad-line);background:var(--bad-soft)}
#side{background:var(--panel2)}
#bottom{background:var(--panel2)}
.tabs{background:var(--panel)}
.tab{color:var(--muted);border-radius:0}.tab:hover:not(:disabled){color:var(--text);border-color:transparent}
.tab.active{color:var(--text);border-bottom-color:var(--accent);font-weight:500}
.toolbar{background:var(--panel)}
.toolbar button{border-radius:8px}
.node{border-radius:8px;margin:0 6px;padding-inline-end:8px}
.node:hover{background:var(--hover-bg)}.node.sel{background:var(--accent-soft);outline:0;color:var(--accent)}
.card,.art,.asset{background:var(--panel);border-color:var(--line);border-radius:16px;padding:16px}
.card>h3,details.card>summary{font-weight:600}
.sticky-sum{background:var(--panel2)}
.presign{background:var(--panel)}
.choice .opt{border-radius:12px;background:var(--panel)}.choice .opt.on{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
ol.steps li{background:var(--panel)}ol.steps li.done{background:var(--ok-soft);border-color:var(--ok-line)}
ol.steps li.cur{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
ol.steps li.fail{background:var(--bad-soft);border-color:var(--bad-line)}
.okbox{background:var(--ok-soft);border-color:var(--ok-line);color:var(--ok-ink);border-radius:12px}
.errbox{background:var(--bad-soft);border-color:var(--bad-line);color:var(--bad-ink);border-radius:12px}
.warnbox{background:var(--warn-soft);border-color:var(--warn-line);color:var(--warn-ink);border-radius:12px}
.psbanner{border-radius:12px}.psbanner.ok{background:var(--accent-soft)}.psbanner.bad{background:var(--bad-soft)}
.wn{border-color:var(--text);color:var(--text)}
dialog{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:20px;box-shadow:0 24px 64px var(--shadow)}
dialog::backdrop{background:var(--backdrop)}
dialog h3{font-weight:600}
#toast{background:var(--text);color:var(--bg);border-color:var(--text);border-radius:12px;box-shadow:0 12px 32px rgba(18,19,22,.2)}
#toast.bad{background:var(--bad);border-color:var(--bad);color:#fff}
#xfers .xf{background:var(--panel);border-color:var(--line);border-radius:12px;box-shadow:0 12px 32px rgba(18,19,22,.12)}
table th{color:var(--muted);font-weight:500;font-size:12px}
tr.click:hover{background:var(--row-hover)}
select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236F7178' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")}
[dir=rtl] select{background-position:left 10px center;padding-left:30px;padding-right:10px}

/* code stays on the dark surface of the sign-in page's side panel: editor, terminal, logs, diffs */
pre.console,pre.tail,pre.diff,pre.preview,.rtlview{background:var(--dark);color:var(--dark-text);border-color:var(--dark-line);border-radius:12px}
#cm .cm-editor{background:var(--dark)}#cm .cm-gutters{background:var(--dark);border-inline-end:1px solid var(--dark-line)}
#term{background:var(--dark);border-radius:12px;padding:6px}
#term .xterm-viewport{background:var(--dark)!important}
#cm .cm-scroller{font-family:var(--mono);font-size:13px}
@media (max-width:820px){header .brand>span:not(.prod){display:none}header .brand .prod{border:0;padding:0;color:var(--text);font-weight:600}header{gap:6px}}
/* snapshot file diffs: removed lines red, added green, on the dark code surface */
.fdl{margin:4px 0 10px;display:flex;flex-direction:column;gap:4px}
.fd{border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.fd>summary{cursor:pointer;padding:6px 10px;font-size:12.5px;overflow-wrap:anywhere}.fd[open]>summary{border-bottom:1px solid var(--line)}
.fd.warn>summary{border-inline-start:3px solid var(--warn);border-radius:10px}.fd.bad>summary{border-inline-start:3px solid var(--bad);border-radius:10px}.fd.ok>summary{border-inline-start:3px solid var(--ok);border-radius:10px}
.fdb{padding:8px}
.fdiff{background:var(--dark);color:var(--dark-text);border-radius:10px;overflow:auto;max-height:60vh;font:12px/1.55 var(--mono);padding:4px 0}
.fdiff .dl{display:grid;grid-template-columns:max-content max-content 18px minmax(0,1fr);min-width:max-content}
.fdiff .ln{color:#6B6E76;text-align:end;padding:0 8px;min-width:3.2em;user-select:none}
.fdiff .sg{text-align:center;user-select:none}
.fdiff .tx{white-space:pre;padding-inline-end:12px}
.fdiff .dl.del{background:rgba(214,72,62,.24)}.fdiff .dl.del .sg,.fdiff .dl.del .ln{color:#FF9B92}
.fdiff .dl.add{background:rgba(46,160,110,.24)}.fdiff .dl.add .sg,.fdiff .dl.add .ln{color:#7FE0B2}
.fdiff .dl.gap{color:#6B6E76;background:rgba(255,255,255,.03)}

/* duplicate-file question */
#dupDlg{width:min(520px,94vw)}
#dupDlg .mono{font-family:var(--mono);font-size:12px;overflow-wrap:anywhere}
#arcDlg .arc-list{max-height:45vh;overflow:auto;border:1px solid var(--line,#8884);border-radius:8px;margin:8px 0;padding:4px 0}
#arcDlg .arc-row{display:flex;justify-content:space-between;gap:12px;padding:3px 10px;font-size:13px}
#arcDlg .arc-row.dir{font-weight:600}
#arcDlg .arc-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#arcDlg .mono{font-family:var(--mono);font-size:12px;overflow-wrap:anywhere}
#arcQ{margin:6px 0}
table.dup td{padding:3px 10px 3px 0}

/* arrival from the main site: the orbit that covered it opens on this page */
#ofx{position:fixed;inset:0;z-index:1000;background:#0E0F12;pointer-events:none;display:grid;place-items:center;clip-path:circle(150vmax at 50% 50%);transition:clip-path .6s cubic-bezier(.7,0,.2,1)}
#ofx:not(.is-on){clip-path:circle(0 at 50% 50%);visibility:hidden;transition:clip-path .6s cubic-bezier(.7,0,.2,1),visibility 0s .6s}
#ofx svg{width:min(62vmin,360px);height:auto;transition:opacity .3s,transform .6s}
#ofx:not(.is-on) svg{opacity:0;transform:scale(.85)}
#ofx .r2{transform-origin:100px 100px;animation:ofxSpin 7s linear infinite}
#ofx .r3{transform-origin:100px 100px;animation:ofxSpin 13s linear infinite reverse}
@keyframes ofxSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){#ofx{display:none}}

/* iOS deployment target wheel (new project, project settings) */
.wheel{position:relative;height:200px;margin:6px 0;border-radius:14px;background:var(--panel2);border:1px solid var(--line);overflow:hidden;perspective:520px}
.wheel-list{position:relative;z-index:1;height:100%;overflow-y:auto;scroll-snap-type:y mandatory;scrollbar-width:none;outline:none;
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000 30%,#000 70%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 30%,#000 70%,transparent)}
.wheel-list::-webkit-scrollbar{display:none}
.wheel-pad{height:80px}
.wheel-item{height:40px;line-height:40px;text-align:center;scroll-snap-align:center;font-size:17px;color:var(--muted);cursor:pointer;transform-style:preserve-3d;transition:color .15s;font-variant-numeric:tabular-nums;user-select:none}
.wheel-item.on{color:var(--text);font-size:21px;font-weight:500}
.wheel-band{position:absolute;left:8px;right:8px;top:80px;height:40px;border-radius:10px;background:var(--panel);box-shadow:0 1px 0 var(--line),0 -1px 0 var(--line);pointer-events:none}
.wheel-list:focus-visible + .wheel-band,.wheel:focus-within .wheel-band{box-shadow:0 0 0 2px var(--accent)}
.newproj{min-width:min(360px,80vw)}

/* Claude chat panel */
.chat{display:flex;flex-direction:column;height:100%;min-height:0}
.chat-bar{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--panel);flex-wrap:wrap}
.chat-bar .spacer{flex:1}
.chat-dot{width:8px;height:8px;border-radius:50%;background:var(--faint);flex:none}
.chat-dot.on{background:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.chat-dot.busy{background:var(--accent);animation:chatPulse 1.2s ease-in-out infinite}
@keyframes chatPulse{50%{box-shadow:0 0 0 6px rgba(14,124,90,.12)}}
.chat-log{flex:1;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:var(--bg)}
.msg{max-width:min(760px,92%);padding:10px 14px;border-radius:16px;line-height:1.6;overflow-wrap:anywhere;animation:msgIn .25s var(--ease) both}
@keyframes msgIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.msg.user{align-self:flex-end;background:var(--dark);color:var(--dark-text);border-bottom-right-radius:6px;white-space:pre-wrap}
.msg.claude{align-self:flex-start;background:var(--panel);border:1px solid var(--line);border-bottom-left-radius:6px}
.msg.streaming .md{white-space:pre-wrap}
.msg.streaming .md::after{content:"▍";color:var(--accent);animation:chatCaret 1s steps(2) infinite}
@keyframes chatCaret{50%{opacity:0}}
.md p{margin:0}.md .md-gap{height:8px}.md .md-h{font-weight:600;margin:6px 0 2px}
.md ul,.md ol{margin:4px 0;padding-inline-start:22px}
.md code{font-family:var(--mono);font-size:12.5px;background:var(--panel2);border:1px solid var(--line-2);border-radius:5px;padding:0 4px}
.md pre.md-code{margin:6px 0;background:var(--dark);color:var(--dark-text);border-radius:10px;padding:10px 12px;overflow-x:auto;direction:ltr;text-align:left}
.md pre.md-code code{background:none;border:0;padding:0;color:inherit;font-size:12.5px}
.chip{align-self:flex-start;font-size:12.5px;color:var(--muted);background:var(--panel);border:1px solid var(--line-2);border-radius:99px;padding:3px 12px;max-width:92%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chip .mono{font-family:var(--mono);font-size:11.5px;color:var(--ink-2)}
.chip:has(.chip-sum){border-radius:12px;white-space:normal}
.chip-sum{margin:4px 0 0;font:12px/1.6 var(--font);white-space:pre-wrap;color:var(--ink-2)}
.ask{align-self:stretch;max-width:760px;background:var(--panel);border:1px solid var(--warn-line);border-radius:14px;padding:10px 12px;display:flex;flex-direction:column;gap:8px;animation:msgIn .25s var(--ease) both}
.ask.ok{border-color:var(--ok-line)}.ask.no{border-color:var(--bad-line);opacity:.8}
.ask-h{font-size:12px;color:var(--muted);font-weight:500}
.ask-cmd{margin:0;background:var(--dark);color:var(--dark-text);border-radius:8px;padding:8px 10px;font:12.5px/1.5 var(--mono);white-space:pre-wrap;overflow-wrap:anywhere;direction:ltr;text-align:left;max-height:260px;overflow:auto}
.out{align-self:stretch;max-width:760px}
.out summary{font-size:12px;color:var(--muted);cursor:pointer}
.out pre{margin:6px 0 0;background:var(--dark);color:var(--dark-text);border-radius:8px;padding:8px 10px;font:12px/1.5 var(--mono);white-space:pre-wrap;max-height:320px;overflow:auto;direction:ltr;text-align:left}
.out.bad summary{color:var(--bad)}
.changes{align-self:stretch;max-width:760px;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:10px 12px}
.chat-sys{align-self:center;font-size:12px;color:var(--faint);padding:2px 10px}
.chat-sys.bad{color:var(--bad)}.chat-sys.warn{color:var(--warn)}
.chat-done{align-self:flex-start;font-size:11.5px;color:var(--faint);padding-inline-start:6px}
.chat-input{display:flex;gap:8px;align-items:flex-end;padding:10px 12px;border-top:1px solid var(--line);background:var(--panel)}
.chat-input textarea{flex:1;resize:none;min-height:40px;max-height:180px;border-radius:12px;padding:9px 12px;line-height:1.5;background:var(--bg)}
.chat-input button{height:40px;border-radius:12px;padding:0 16px}
.chat-empty{margin:auto;text-align:center;max-width:420px;color:var(--ink-2)}
.chat-empty p{margin:6px 0}
.chat-orb{position:relative;width:64px;height:64px;margin:0 auto 10px}
.chat-orb i{position:absolute;inset:0;border-radius:50%;border:1px solid var(--line)}
.chat-orb i+i{inset:12px;border-style:dashed;animation:ofxSpin 12s linear infinite}
.chat-orb b{position:absolute;top:50%;left:50%;width:9px;height:9px;margin:-4.5px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 5px var(--accent-soft)}
.chat-compose{border-top:1px solid var(--line);background:var(--panel)}
.chat-compose .chat-input{border-top:0}
.att-row[hidden]{display:none}
.att-row{display:flex;gap:6px;flex-wrap:wrap;padding:8px 12px 0}
.att{display:inline-flex;align-items:center;gap:2px;font-size:12.5px;background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:4px 6px 4px 10px;cursor:pointer;max-width:100%;animation:msgIn .2s var(--ease) both}
.att small{color:var(--muted);font-size:11px}
.att-x{border:0;background:transparent;padding:0 6px;font-size:16px;line-height:1;color:var(--muted)}
.msg.user .msg-files{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.msg.user .att{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.2);color:#F5F4F0;cursor:default}
.msg.user .att small{color:rgba(245,244,240,.6)}
.att-preview{max-height:60vh;overflow:auto;white-space:pre-wrap;font:12px/1.5 var(--mono);background:var(--panel2);padding:10px;border-radius:8px;margin:0;direction:ltr;text-align:left;width:min(720px,86vw)}
.att-img{padding:3px 6px 3px 3px}.att-img img{width:30px;height:30px;object-fit:cover;border-radius:7px;margin-inline-end:6px}
.att-preview-img{display:block;max-width:min(860px,86vw);max-height:70vh;border-radius:8px;margin:auto}
.msg-files .msg-img{display:block;line-height:0}.msg-img img{max-width:min(260px,100%);max-height:240px;border-radius:10px;border:1px solid rgba(255,255,255,.2);object-fit:contain;background:rgba(0,0,0,.15)}
.chat-input .chat-attach{padding:0;width:40px;flex:none;display:inline-flex;align-items:center;justify-content:center}
.chat-input .chat-attach .ic{width:19px;height:19px}
.chat.drop{outline:2px dashed var(--accent);outline-offset:-6px}
#chatSend.sending{opacity:.6;pointer-events:none}
.export-opts{display:flex;flex-direction:column;gap:8px;width:min(400px,74vw);max-width:100%}
.export-opt{display:flex;gap:12px;align-items:center;text-align:start;padding:12px 14px;height:auto;border-radius:12px;width:100%;white-space:normal}
.export-opt span{display:flex;flex-direction:column;gap:2px}.export-opt .ic{width:22px;height:22px;flex:none}
/* app icon: Xcode-style slots, previews masked with the iOS corner radius */
.icon-now{display:flex;gap:12px;align-items:center;margin:8px 0}
.icon-now img{width:64px;height:64px;border-radius:22.37%;border:1px solid var(--line);flex:none}
.icon-grid h4{margin:12px 0 6px}
.icon-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:8px}
.icon-slot{margin:0;border:1px solid var(--line);border-radius:10px;padding:8px;display:flex;flex-direction:column;align-items:center;gap:6px;background:var(--panel2);min-width:0}
.icon-box{height:100px;display:grid;place-items:center}
.icon-box img{border-radius:22.37%;box-shadow:0 1px 3px rgba(0,0,0,.18)}
.icon-slot figcaption{display:flex;flex-direction:column;align-items:center;font-size:11px;color:var(--muted);text-align:center}
.icon-slot figcaption b{color:var(--text);font-size:12px}
.icon-dev{display:inline-flex;align-items:center;gap:6px;margin-inline-end:14px;color:var(--text);font-size:13px}
/* app icons next to names (Build target, Artifacts); a blank rounded square when there is none */
.app-ic{width:28px;height:28px;border-radius:22.37%;flex:none;border:1px solid var(--line);object-fit:cover;display:inline-block;vertical-align:middle;background:var(--panel2)}
.app-ic.lg{width:44px;height:44px}
.art-list{max-height:180px;overflow:auto}
.cc-dialog{min-width:min(640px,80vw);max-height:70vh;overflow:auto}
/* permissions & Info card */
.perm-row{border:1px solid var(--line, #e5e5e5);border-radius:10px;padding:8px 10px;margin:8px 0}
.perm-row .row{flex-wrap:wrap;align-items:baseline;gap:6px 10px}
.perm-row .row button{margin-inline-start:auto}
.perm-row textarea,#infoUrlSchemes,#infoQueries{width:100%;box-sizing:border-box;margin-top:6px}
.row.wrap{flex-wrap:wrap}
button.small{padding:2px 10px;font-size:12px}
.scroll-x{overflow-x:auto;max-width:100%}
#infoAll td{vertical-align:top;overflow-wrap:anywhere}
/* capabilities card */
.cap-row{border:1px solid var(--line);border-radius:10px;padding:8px 10px;margin:8px 0}
.cap-row label.chk{flex-wrap:wrap;align-items:center}
.cap-ed{margin:6px 0 2px}
.cap-ed textarea{width:100%;box-sizing:border-box}
.cap-st{font-size:12px;border-radius:999px;padding:1px 8px;margin-inline-start:auto}
.cap-st.ok{color:var(--ok);background:var(--ok-soft)}
.cap-st.bad{color:var(--bad);background:var(--bad-soft, #fbe9e7)}
.cap-st.muted{color:var(--muted)}
/* IPA inspector */
.insp{min-width:0;max-width:100%}
dialog:has(#inspector){width:min(860px,94vw);max-width:94vw}
.insp .findings li{display:block}
.insp-head{display:flex;gap:12px;align-items:flex-start;margin-bottom:8px}
.insp-head .pill{margin:6px 6px 0 0}
.insp details{margin:8px 0}.insp details>summary{cursor:pointer;font-weight:600}
.insp details details>summary{font-weight:500}
.insp td{vertical-align:top;overflow-wrap:anywhere}
.insp .bad{color:var(--bad)}
.findings li.n{border-color:var(--line)}
.pill.insp-e{color:var(--bad)}.pill.insp-w{color:var(--warn)}
.bar{display:inline-block;height:6px;width:var(--w);min-width:2px;max-width:120px;background:var(--muted);border-radius:3px;opacity:.5}
/* chat: full approval switch, where a message came from, "thinking…" */
.chat-auto{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:3px 10px;cursor:pointer;user-select:none}
.chat-auto input{margin:0}
.chat-auto.on{color:var(--warn-ink);border-color:var(--warn-line);background:var(--warn-soft);font-weight:600}
.msg-via{font-size:11px;opacity:.7;margin-bottom:4px}
.ask.auto{opacity:.85}.ask.auto .ask-h{color:var(--muted)}
.chat-thinking{align-self:flex-start;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:3px;padding:4px 8px}
.chat-thinking i{width:5px;height:5px;border-radius:50%;background:var(--muted);animation:chatPulse 1.2s ease-in-out infinite}
.chat-thinking i:nth-child(2){animation-delay:.2s}.chat-thinking i:nth-child(3){animation-delay:.4s}
/* the conversation scrolls; its cards never shrink to fit */
.chat-log>*{flex-shrink:0}
/* "Editor (n)" only while files are open (.tab and .mobnav buttons are flex, which would override [hidden]) */
.edopen[hidden]{display:none !important}
/* chat: "/" commands */
.chat-compose{position:relative}
.slash-menu{position:absolute;inset-inline:12px;bottom:calc(100% - 4px);max-height:260px;overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(18,19,22,.14);padding:4px;z-index:5}
.slash-item{padding:6px 10px;border-radius:8px;cursor:pointer}
.slash-item.on,.slash-item:hover{background:var(--bg)}
.slash-item .note{font-size:12px}
/* iPhone (Studio Connect) dialog */
pre.cmd{font:12px/1.4 var(--mono);background:var(--dark);color:var(--dark-text);border:1px solid var(--dark-line);border-radius:10px;padding:8px 10px}
#devDlg .ok{color:var(--ok);font-weight:600}
#devDlg .warn{font-weight:600}
#devDlg .dev{border:1px solid var(--line);border-radius:10px;padding:8px 10px;margin:6px 0;display:flex;flex-direction:column;gap:2px}
#devDlg .dev b{margin-inline-end:8px}
#devDlg .dev.link{flex-direction:row;align-items:center;justify-content:space-between;gap:8px}
#devDlg .udid{font-family:var(--mono);overflow-wrap:anywhere}
/* app details at the top of an artifact card */
.art .app-head{display:flex;flex-direction:column;gap:6px;margin:6px 0 2px}
.art .app-title{font-size:16px}
.art .app-facts{display:flex;flex-wrap:wrap;gap:6px 16px}
.art .app-facts>div{display:flex;flex-direction:column;font-size:13px}

/* ---------- phase 1 of the redesign: icons, sheets, jobs drawer, appearance, right-to-left ---------- */
.ic{width:16px;height:16px;flex:none;vertical-align:-3px}
header button,header a>button{display:inline-flex;align-items:center;gap:6px}
header #jobPill{cursor:pointer}
[data-theme=dark] header .brand img{filter:invert(1)}
header [hidden]{display:none!important}
header #who{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
header .lbl{display:none}

/* sheets: a close button that stays in view; on a phone the dialog opens from the bottom */
dialog[data-sheet]{--dlg-pad:20px}
.sheet-bar{position:sticky;top:0;z-index:6;height:0;display:flex;justify-content:flex-end}
.sheet-x{width:32px;height:32px;padding:0;border-radius:50%;display:grid;place-items:center;margin-top:-10px;margin-inline-end:-10px;background:var(--panel2);border-color:var(--line);color:var(--muted)}
.sheet-x:hover:not(:disabled){color:var(--text)}
.sheet-x .ic{width:15px;height:15px}
.sheet-grab{display:none}
dialog[data-sheet]:focus{outline:none}
dialog[data-sheet]>h3:first-of-type,dialog[data-sheet] form>h3:first-child{padding-inline-end:34px}
dialog[data-sheet]>.row:last-child,dialog[data-sheet] form>.row:last-child{position:sticky;bottom:calc(-1 * var(--dlg-pad));background:var(--panel);margin-bottom:calc(-1 * var(--dlg-pad));padding:12px 0 var(--dlg-pad);z-index:5;border-top:1px solid var(--line-2)}
@media (prefers-reduced-motion:no-preference){dialog[data-sheet][open]{animation:sheetIn .22s var(--ease)}@keyframes sheetIn{from{opacity:0;transform:translateY(8px) scale(.985)}}}
@media (max-width:820px){
  dialog[data-sheet]{--dlg-pad:16px;position:fixed;inset:auto 0 0 0;margin:0;width:100%;max-width:100%;max-height:calc(100dvh - 24px);border-radius:20px 20px 0 0;border-bottom:0;padding:16px 16px calc(16px + env(safe-area-inset-bottom));transition:transform .2s var(--ease)}
  .sheet-bar{height:22px;margin:-10px 0 4px;justify-content:center;align-items:flex-start;touch-action:none}
  .sheet-grab{display:block;width:40px;height:5px;border-radius:3px;background:var(--line);margin-top:2px}
  .sheet-x{position:absolute;inset-inline-end:-6px;top:-2px;margin:0;min-height:0}
  dialog[data-sheet]>.row:last-child,dialog[data-sheet] form>.row:last-child{padding-bottom:calc(var(--dlg-pad) + env(safe-area-inset-bottom));margin-bottom:calc(-1 * var(--dlg-pad) - env(safe-area-inset-bottom));bottom:calc(-1 * var(--dlg-pad) - env(safe-area-inset-bottom))}
  @media (prefers-reduced-motion:no-preference){dialog[data-sheet][open]{animation:sheetUp .26s var(--ease)}@keyframes sheetUp{from{transform:translateY(40%)}}}
}

/* the jobs drawer at the bottom of the work area */
.run{flex:none;border-top:1px solid var(--line);background:var(--panel);display:flex;flex-direction:column;min-height:0;box-shadow:0 -8px 24px -18px var(--shadow)}
.run-h{display:flex;align-items:center;gap:4px;padding:2px 6px}
.run-tg{flex:1;min-width:0;display:flex;align-items:center;gap:8px;justify-content:space-between;text-align:start;padding:6px 8px;color:var(--text)}
.run-sum{display:flex;align-items:center;gap:8px;min-width:0;overflow:hidden;white-space:nowrap}
.run-sum b{overflow:hidden;text-overflow:ellipsis;font-weight:500}
.run-sum .note{flex:none}
.run .chev{transition:transform .2s var(--ease)}.run.open .chev{transform:rotate(180deg)}
.run-x{padding:6px;color:var(--muted)}
.run-bar{height:2px;background:var(--line-2)}
.run-bar i{display:block;height:100%;width:0;background:var(--accent);transition:width .4s var(--ease)}
.run-bar i.running,.run-bar i.queued{width:35%}
.run-bar i.succeeded{background:var(--ok)}.run-bar i.failed{background:var(--bad)}.run-bar i.cancelled{background:var(--warn)}
@media (prefers-reduced-motion:no-preference){.run-bar i.running:not([style*=width]),.run-bar i.queued{animation:runSlide 1.4s ease-in-out infinite alternate}@keyframes runSlide{from{margin-inline-start:0}to{margin-inline-start:65%}}}
.run-b{display:none;overflow:auto;max-height:min(46vh,420px);padding:8px 12px 12px}
.run.open .run-b{display:block}
@media (max-width:820px){.run-sum .note{display:none}.run.open .run-b{max-height:55dvh}}

/* appearance */
#uiDlg{width:460px}
.ui-set{display:flex;flex-direction:column;gap:18px}
.ui-set h4{margin:0 0 8px;font-size:13px;color:var(--muted);font-weight:500}
.ui-set .note{margin:0 0 8px}
.seg{display:flex;padding:3px;gap:3px;border-radius:12px;background:var(--panel2);border:1px solid var(--line)}
.seg button{flex:1;border:0;background:transparent;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;gap:6px;color:var(--muted);padding:7px 10px}
.seg button.on{background:var(--panel);color:var(--text);box-shadow:0 1px 3px var(--shadow);font-weight:500}
label.switch{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;cursor:pointer}
label.switch>span{display:flex;flex-direction:column}
label.switch input{appearance:none;-webkit-appearance:none;width:44px;height:26px;border-radius:13px;background:var(--line);position:relative;flex:none;cursor:pointer;transition:background .2s var(--ease);margin:0}
label.switch input::after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:inset-inline-start .2s var(--ease)}
label.switch input:checked{background:var(--accent)}
label.switch input:checked::after{inset-inline-start:21px}
.accents{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.acc{display:flex;flex-direction:column;align-items:center;gap:6px;border:0;background:transparent;padding:6px;color:var(--muted)}
.acc .dot{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;color:#fff;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.acc.on{color:var(--text);font-weight:500}
.acc.on .dot{box-shadow:0 0 0 3px var(--panel),0 0 0 5px var(--accent)}
.acc .dot .ic{width:20px;height:20px;stroke-width:2.6}
@media (max-width:820px){#uiDlg{width:100%}.seg button{min-height:40px}}

/* right to left: code, logs, paths and identifiers stay left to right */
[dir=rtl] :is(#cm,#term,pre,code,kbd,.mono,.udid,.cmd,.fdiff,.console,input[type=password],#installUrl){direction:ltr;text-align:left}
[dir=rtl] :is(code,.mono){unicode-bidi:isolate}
[dir=rtl] .insp-head .pill{margin:6px 0 0 6px}

/* ---------- phase 2: navigation (workspace rail; a bottom bar on phones), single-row header, menus, Ctrl+K ---------- */
#shell{grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
#shell>header{grid-column:1/-1;flex-wrap:nowrap;min-width:0}
#shell>main{grid-row:2;grid-column:2}
main.noside,main.lib{grid-template-columns:minmax(0,1fr)}
main.noside #side,main.lib #side{display:none}
header select#projSel{min-width:0;flex:0 1 280px}
header kbd{font:11px var(--mono);border:1px solid var(--line);border-radius:5px;padding:0 5px;color:var(--faint)}
header .lbl{display:inline}
.pop{position:relative}
.menu{position:absolute;top:calc(100% + 6px);inset-inline-start:0;z-index:50;min-width:220px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 16px 40px var(--shadow);padding:5px;display:flex;flex-direction:column;gap:2px}
.menu[hidden]{display:none}
#acctMenu{inset-inline-start:auto;inset-inline-end:0}
.menu button{border:0;background:transparent;justify-content:flex-start;display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;color:var(--text);text-align:start}
.menu button:hover:not(:disabled),.menu button:focus-visible{background:var(--hover-bg);outline:none}
#acct{display:inline-flex;align-items:center;gap:8px;padding:4px 8px 4px 4px;border-radius:99px}
.ava{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent-ink);font-weight:600;font-size:12px;flex:none}
#acct .who{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:13px}
#newBtn .chev{width:14px;height:14px;opacity:.6}
/* rail */
.rail{grid-row:2;grid-column:1;width:78px;display:flex;flex-direction:column;align-items:stretch;gap:2px;padding:8px 6px;background:var(--panel);border-inline-end:1px solid var(--line);overflow-y:auto;scrollbar-width:none}
.rail-i{display:flex;flex-direction:column;align-items:center;gap:3px;border:0;background:transparent;border-radius:12px;padding:8px 2px;color:var(--muted);font-size:11px;line-height:1.2;text-align:center}
.rail-i .ic{width:20px;height:20px}
.rail-i:hover:not(:disabled){background:var(--hover-bg);color:var(--text)}
.rail-i.active{background:var(--accent-soft);color:var(--accent-ink);font-weight:500}
.rail-i.edopen{color:var(--accent)}
.rail-sep{flex:1;min-height:12px}
.rail-more{display:none}
#rail [hidden]{display:none!important}
#ptabs{padding-inline:6px}
/* Ctrl+K */
#cmdDlg{width:min(620px,94vw);padding:10px;top:12vh;margin-top:0}
#cmdDlg .sheet-bar{display:none}
#cmdQ{font-size:16px;padding:10px 12px;border-radius:10px}
.cmd-list{max-height:min(56vh,460px);overflow:auto;margin-top:8px;display:flex;flex-direction:column;gap:1px}
.cmd-g{font-size:11px;color:var(--faint);padding:8px 10px 4px;letter-spacing:.04em}
.cmd-i{display:flex;align-items:center;gap:10px;border:0;background:transparent;border-radius:8px;padding:8px 10px;text-align:start;color:var(--text)}
.cmd-i .note{margin-inline-start:auto}
.cmd-i.on{background:var(--accent-soft);color:var(--accent-ink)}
/* phone "More" */
.more-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.more-grid button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 4px;border-radius:14px;font-size:12px}
.more-grid .ic{width:22px;height:22px}
.more-space{display:flex;align-items:center;gap:12px;width:100%;margin-top:12px;padding:12px 14px;border-radius:14px;border:1px solid var(--line);background:var(--card-bg,transparent);color:inherit;text-align:start}
.more-space .ic{width:22px;height:22px;flex:none}
.more-space .rl{display:flex;flex-direction:column;flex:1;min-width:0;line-height:1.3}
.more-space small{font-size:11.5px;color:var(--muted)}.more-space b{font-size:15px;font-weight:600;text-align:start}
.more-space .ic:last-child{width:16px;height:16px;opacity:.6;transform:rotate(-90deg)}
[dir=rtl] .more-space .ic:last-child{transform:rotate(90deg)}
@media (max-width:1200px){header .lbl,header kbd{display:none}#acct .who{max-width:110px}}
@media (max-width:820px){
  #shell{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto}
  #shell>main{grid-column:1}
  header{gap:6px;padding:6px 10px}
  header .brand>span{display:none}
  header select#projSel{flex:1 1 auto;order:0;max-width:none}
  #cmdBtn,#acct .who{display:none}
  #acct{padding:2px}
  #jobPill{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #jobPill:not(.running):not(.queued){display:none}
  .rail{grid-row:3;grid-column:1;width:auto;flex-direction:row;padding:4px 4px calc(4px + env(safe-area-inset-bottom));border-inline-end:0;border-top:1px solid var(--line);overflow:visible}
  .rail-i{flex:1;min-width:0;min-height:52px;padding:6px 0;border-radius:10px;font-size:10.5px}
  .rail-i .rl{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .rail-x,.rail-sep{display:none!important}
  #rail .rail-i[data-k]:not(.on-bar):not(.rail-more){display:none!important}
  .rail-more{display:flex}
  .menu{position:fixed;top:56px;inset-inline:10px auto}
  #acctMenu{inset-inline:auto 10px}
  #cmdDlg{top:0}
}

/* the shared support chat inside the studio: opened from the rail, in the studio's colours, beside the rail */
html .ksc{--k-bg:var(--panel);--k-ink:var(--text);--k-mute:var(--muted);--k-line:var(--line);--k-soft:var(--panel2);--k-acc:var(--accent);--k-acc-ink:var(--on-accent);--k-me:var(--accent-soft)}
html .ksc-fab{display:none!important}
html .ksc-panel{left:auto;inset-inline-start:90px;bottom:16px;height:min(600px,calc(100dvh - 90px))}
.rail-i.has-reply,.more-grid button.has-reply{position:relative}
.rail-i.has-reply::after,.more-grid button.has-reply::after{content:"";position:absolute;top:6px;inset-inline-end:calc(50% - 16px);width:9px;height:9px;border-radius:50%;background:var(--bad);box-shadow:0 0 0 2px var(--panel)}
@media (prefers-reduced-motion:no-preference){.rail-i.has-reply::after{animation:chatPulse 1.6s ease-in-out infinite}}
@media (max-width:820px){html .ksc-panel{inset-inline:8px;width:auto;bottom:calc(66px + env(safe-area-inset-bottom));height:min(560px,calc(100dvh - 150px))}}

/* ---------- phase 3: sign & install sheet, app cards, device and account pages ---------- */
#signDlg{width:min(780px,96vw)}
.sign-head{display:flex;gap:12px;align-items:center;margin:4px 0 12px}
.sign-head .note{overflow-wrap:anywhere}
#signDlg .seg{margin-bottom:12px}
#signDlg .panel{padding:0;overflow:visible;flex:none}
#signDlg .panel>.card{border:0;padding:0;background:transparent}
.sign-apple{display:flex;flex-direction:column;gap:10px}
.sign-apple ul{margin:0;padding-inline-start:18px}
.sg-adv{margin-top:8px;border:1px solid var(--line);border-radius:10px;padding:6px 10px}
.sg-adv>summary{cursor:pointer;color:var(--muted);font-size:13px}
.sg-adv[open]>summary{margin-bottom:6px}
.wstep .wb>.f,.sg-adv .f{display:block;margin:6px 0}
.inst-here{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.sg-result{margin-top:8px}
.sg-ota .card{margin-top:8px}
/* app cards: what the app is first, the long facts folded under Details */
.art{display:flex;flex-direction:column;gap:6px}
.art .art-h .app-ic{width:44px;height:44px}
.art .art-h{gap:8px}
.art-more>summary{cursor:pointer;color:var(--muted);font-size:12.5px;padding:2px 0}
.art-more[open]>summary{margin-bottom:4px}
.art .acts{margin-top:auto}
/* pages that read better narrow (devices, Apple account) */
.panel.narrow>*{max-width:760px}
#devDlg .dev{background:var(--panel)}
.wb .row>select{flex:1 1 240px;width:auto;min-width:0}

/* ---------- phase 4: the assistant's provider ---------- */
.ai-chip{cursor:pointer;font-weight:500}
#aiDlg{width:min(620px,96vw)}
.ai-set label.f{display:flex;flex-direction:column;gap:2px;margin:10px 0}
.ai-set label.f b{color:var(--text);font-size:13px}
.ai-set section+section{border-top:1px solid var(--line-2);padding-top:14px}
#fixWithAi{display:inline-flex;align-items:center;gap:6px}
/* the assistant beside the work (Ctrl+J) */
#aiSide{position:fixed;top:57px;bottom:0;inset-inline-end:0;width:min(460px,100vw);z-index:30;background:var(--panel);border-inline-start:1px solid var(--line);box-shadow:-18px 0 40px -28px var(--shadow);display:flex;flex-direction:column;min-height:0}
#aiSide[hidden]{display:none}
.ai-side-h{display:flex;align-items:center;gap:8px;padding:8px 10px 8px 14px;border-bottom:1px solid var(--line)}
.ai-side-h .spacer{flex:1}
.ai-side-h .sheet-x{margin:0}
#aiSideBody{flex:1;min-height:0;display:flex;flex-direction:column}
#aiSideBody .chat-bar{flex-wrap:wrap;gap:6px}
#aiSideBody .chat-bar .spacer{display:none}
#shell.ai-open #bottom{padding-inline-end:min(460px,100vw)}
@media (max-width:820px){#aiSide{top:auto;height:85dvh;width:100%;border-radius:18px 18px 0 0;border:1px solid var(--line)}#shell.ai-open #bottom{padding-inline-end:0}}
/* the IPA Library as a grid of apps */
.lib-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.art.tile{padding:14px;gap:10px;align-items:stretch}
.tile-top{display:flex;flex-direction:column;align-items:center;gap:6px;border:0;background:transparent;padding:6px 4px;text-align:center;color:var(--text);border-radius:12px}
.tile-top:hover:not(:disabled){background:var(--hover-bg)}
.app-ic.xl{width:72px;height:72px}
.tile-name{font-size:15px;overflow-wrap:anywhere}
.tile-sub{overflow-wrap:anywhere;font-size:12px}
.tile-tags{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.tile-acts{display:flex;flex-direction:column;gap:6px;margin-top:auto}
.tile-acts button{width:100%;justify-content:center}
#artDlg .art{border:0;padding:0}
#aiBtn{color:var(--accent)}#aiBtn.on{background:var(--accent-soft)}
#aiBtn .ic{width:18px;height:18px}
/* phones: the side panel is a sheet from the bottom, with a grab handle and a swipe down to close */
@media (max-width:820px){#aiSide{z-index:45;box-shadow:0 -16px 40px -12px var(--shadow)}#aiSide .ai-side-h{touch-action:none}#aiSide .ai-side-h::before{content:"";position:absolute;left:50%;top:6px;width:40px;height:5px;margin-left:-20px;border-radius:3px;background:var(--line)}#aiSide .ai-side-h{position:relative;padding-top:16px}}
/* restore timeline */
.snap-line{display:flex;flex-direction:column;gap:8px}
.snap{border-inline-start:3px solid var(--line);padding:8px 10px;border-radius:8px}
.snap.session{border-inline-start-color:var(--accent)}
.snap.backup{border-inline-start-color:var(--muted)}
.snap.warn{border-inline-start-color:#d97706}
.snap-h{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.snap-acts{margin:6px 0 0}
.snap-confirm{margin-top:8px}
/* messages waiting while the assistant works */
.chat-queue[hidden]{display:none}
.chat-queue{display:flex;flex-direction:column;gap:4px;padding:6px 12px;border-top:1px dashed var(--line)}
.q-item{display:flex;align-items:center;gap:6px;font-size:13px;opacity:.85}
.q-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-sys.fresh{color:var(--accent-ink,var(--accent))}
/* chat: copy on each message and code block, the model picker, earlier chats */
.msg{position:relative}
.msg-copy{position:absolute;top:4px;inset-inline-end:4px;width:30px;height:30px;padding:0;display:grid;place-items:center;border-radius:8px;opacity:0;transition:opacity .15s}
.msg-copy .ic{width:15px;height:15px}
.msg:hover .msg-copy,.msg-copy:focus-visible{opacity:1}
.msg.user .msg-copy{color:var(--dark-text)}
.msg.user .msg-copy:hover{background:rgba(255,255,255,.12)}
@media (hover:none){.msg-copy{opacity:.7}.msg{padding-inline-end:38px}}
.md pre.md-code{position:relative}
.code-copy{position:absolute;top:6px;right:6px;width:28px;height:28px;padding:0;display:grid;place-items:center;border-radius:7px;color:var(--dark-text);background:rgba(255,255,255,.08)}
.code-copy .ic{width:14px;height:14px}
.ai-chip{display:inline-flex;align-items:center;gap:2px;cursor:pointer}
.ai-chip .chev{width:13px;height:13px;opacity:.6;margin-inline-start:2px}
.ai-chip small{color:var(--warn)}
.model-menu{min-width:260px}
.model-menu .menu-h{padding:6px 10px 4px;color:var(--muted);font-size:12px}
.model-menu button{width:100%}
.model-menu button.on{background:var(--accent-soft)}
.model-menu .mm-t{display:flex;flex-direction:column;flex:1;min-width:0;text-align:start}
.model-menu .mm-t small{font-size:11.5px}
.model-menu .mm-note{padding:4px 10px 6px;font-size:12px}
.model-menu hr{border:0;border-top:1px solid var(--line);margin:4px 0}
.chat-older{align-self:center;margin:4px 0 8px}
.hist-list{display:flex;flex-direction:column;gap:6px;max-height:60vh;overflow:auto}
.hist-i{display:flex;flex-direction:column;align-items:stretch;gap:2px;text-align:start;padding:10px 12px;border-radius:10px;min-height:44px}
.hist-i b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hist-log{max-height:60vh;overflow:auto;margin-top:8px;border:1px solid var(--line);border-radius:12px}
.snap-counts{margin:0 0 6px;padding-inline-start:18px}
.snap-names{font-size:11px;word-break:break-all;margin:2px 0 4px}
.sg-ext{margin:8px 0;padding:8px;border:1px solid var(--line);border-radius:8px}
.sg-routes{margin-top:8px}.sg-routes ol{margin:6px 0 0;padding-inline-start:20px;display:flex;flex-direction:column;gap:8px}

/* the project window (every visit starts here): projects as folders, the IPA Library and the Trash */
#home{display:none}
#shell.home-on>#home{display:block;grid-row:2;grid-column:2;overflow:auto;min-height:0;background:var(--bg);padding:18px}
#shell.home-on>main{display:none!important}
.home-win{max-width:1180px;margin:0 auto;background:var(--panel);border:1px solid var(--line);border-radius:16px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden}
.home-path{display:flex;align-items:center;gap:4px;padding:8px 10px;border-bottom:1px solid var(--line);background:var(--panel2)}
.home-path button{display:inline-flex;align-items:center;gap:6px;border:0;font-weight:500;color:var(--muted)}
.home-path button.on{color:var(--text)}
.home-path .sep{color:var(--faint)}
.home-bar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--line-2);flex-wrap:wrap}
#homeQ{width:min(320px,100%)}
.home-bar button{display:inline-flex;align-items:center;gap:6px}
.home-bar .spacer{flex:1}
.home-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;padding:14px}
.home-empty{grid-column:1/-1;margin:4px 2px}
.ptile{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px 8px 12px;border:1px solid transparent;border-radius:14px;background:transparent;text-align:center;cursor:pointer;color:var(--text);min-width:0;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;font:inherit}
.ptile:hover,.ptile:focus-visible{background:var(--hover-bg);border-color:var(--line)}
.ptile.cur{border-color:var(--accent-line);background:var(--accent-soft)}
.ptile .pic{width:64px;height:64px;display:grid;place-items:center;color:var(--accent)}
.ptile .pic .ic{width:58px;height:58px;stroke-width:1.3}
.ptile .pic img{width:60px;height:60px;border-radius:14px;box-shadow:0 1px 3px rgba(0,0,0,.18)}
.ptile b{font-weight:600;font-size:13.5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ptile .meta{font-size:11.5px;color:var(--muted);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ptile .bst{font-size:11px}
.bst.ok{color:var(--accent)}.bst.bad{color:#C2410C}.bst.none{color:var(--faint)}
.ptile .pmore{position:absolute;top:6px;inset-inline-end:6px;padding:2px 4px;border-radius:8px;opacity:0;border:0}
.ptile:hover .pmore,.ptile:focus-within .pmore,.ptile.cur .pmore{opacity:1}
.ptile.special .pic{color:var(--muted)}
.ptile.intrash{cursor:default}.ptile.intrash .pic{color:var(--faint)}
.ptile .tile-acts{margin-top:6px;gap:6px;justify-content:center;flex-wrap:wrap}
.tile-menu{width:min(360px,94vw)}
.menu-list{display:flex;flex-direction:column;gap:6px}
.menu-list button{display:flex;align-items:center;gap:10px;justify-content:flex-start;padding:10px 12px}
#homeBtn{display:inline-flex;align-items:center;gap:7px;max-width:260px;min-width:0}
#homeBtn .pname{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (hover:none){.ptile .pmore{opacity:1}}
@media (max-width:820px){
  #shell.home-on>#home{grid-row:2;grid-column:1;padding:0}
  .home-win{border-radius:0;border-inline:0;min-height:100%}
  .home-grid{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:4px;padding:10px 6px}
  .ptile{padding:12px 4px 10px}
  .ptile .pic{width:56px;height:56px}.ptile .pic img{width:54px;height:54px;border-radius:12px}
  .home-bar button span{display:none}
  #homeQ{flex:1 1 100%;order:9}
  #homeBtn{flex:1 1 auto;max-width:none}
}
/* the signing window: 1 the app — 2 the certificate — 3 signing, in one window */
#signDlg.sw{width:min(620px,96vw)}
.sw-steps{display:flex;align-items:center;list-style:none;margin:10px 0 14px;padding:0;counter-reset:none}
.sw-st{flex:1;display:flex;align-items:center;min-width:0}
.sw-st:not(:last-child)::after{content:"";flex:1;height:2px;margin:0 8px;background:var(--line);border-radius:2px}
.sw-st.ok:not(:last-child)::after{background:var(--ok,#2f9e6a)}
.sw-st>button{display:flex;align-items:center;gap:7px;border:0;background:transparent;padding:2px;min-width:0;color:var(--muted)}
.sw-st>button:disabled{opacity:.55;cursor:default}
.sw-n{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;flex:none;font-weight:600;font-size:13px;border:2px solid var(--line);background:var(--panel)}
.sw-st.on .sw-n{border-color:var(--accent);color:var(--accent)}
.sw-st.on .sw-l{color:var(--text);font-weight:600}
.sw-st.ok .sw-n{background:var(--ok,#2f9e6a);border-color:var(--ok,#2f9e6a);color:#fff}
.sw-st.bad .sw-n{background:var(--bad,#c2410c);border-color:var(--bad,#c2410c);color:#fff}
.sw-l{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sw-body{display:flex;flex-direction:column;gap:10px}
.sw-card{border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:var(--panel2)}
.sw-card>summary{cursor:pointer;font-weight:600;padding:2px 0}
.sw-card h4{margin:12px 0 4px;font-size:12px;color:var(--muted);font-weight:600;letter-spacing:.02em}
.sw-app{display:flex;flex-direction:column;gap:2px}
.sw-icon{display:flex;align-items:center;gap:12px;border:0;background:transparent;padding:4px 0;color:var(--accent);font-size:13px;align-self:flex-start}
.sw-icon img,.sw-icon .app-ic{width:60px;height:60px;border-radius:22.37%;object-fit:cover}
.sw-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--line-2)}
.sw-row>span{flex:none;min-width:96px;color:var(--muted);font-size:13px}
.sw-row input,.sw-row select{flex:1;min-width:0}
.sw-tog{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--line-2);cursor:pointer}
.sw-tog>span{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;overflow-wrap:anywhere}
.sw-tog small{font-size:11.5px}
.sw-tog input[type=checkbox],.sw-tweak input.sw-tweak-on,input.ai-on{appearance:none;-webkit-appearance:none;width:46px;height:28px;border-radius:99px;background:var(--line);position:relative;flex:none;cursor:pointer;transition:background .18s;margin:0}
.sw-tog input[type=checkbox]::after,.sw-tweak input.sw-tweak-on::after,input.ai-on::after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:inset-inline-start .18s}
.sw-tog input[type=checkbox]:checked,.sw-tweak input.sw-tweak-on:checked,input.ai-on:checked{background:var(--ok,#2f9e6a)}
.sw-tog input[type=checkbox]:checked::after,.sw-tweak input.sw-tweak-on:checked::after,input.ai-on:checked::after{inset-inline-start:21px}
.sw-nav{display:flex;align-items:center;gap:8px;margin-top:4px}
.sw-nav .spacer{flex:1}
.sw-check{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sw-check .pill{margin-inline-start:auto}
.sw-more{margin-top:6px}.sw-more>summary{cursor:pointer;color:var(--muted);font-size:13px}
.sw-sum{margin:0;padding-inline-start:18px;display:flex;flex-direction:column;gap:4px;font-size:13px}
.spin{width:14px;height:14px;border-radius:50%;border:2px solid var(--line);border-top-color:var(--accent);animation:swspin .8s linear infinite;display:inline-block}
@keyframes swspin{to{transform:rotate(360deg)}}
@media (max-width:820px){.sw-l{display:none}.sw-st.on .sw-l{display:inline}.sw-row>span{min-width:80px}}
/* in the signing window the progress shows its stages and status only; the full log stays in the jobs drawer */
#signDlg #swProgress>.row:first-child .note,#signDlg #swProgress>.note,#signDlg #swProgress .tail,#signDlg #swProgress>.row:last-child:has(button:not(.danger)){display:none}
/* installing a signed IPA: the same panel everywhere (card, signing window, results) */
.inst-dlg{width:min(520px,96vw)}
.inst-panel{display:flex;flex-direction:column;gap:10px}
.inst-app{display:flex;align-items:center;gap:12px}
.inst-who{font-size:13px;color:var(--ink-2);background:var(--panel2);border:1px solid var(--line);border-radius:12px;padding:8px 10px}
.inst-big{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:13px 16px;font-size:16px;font-weight:600;border-radius:14px;text-decoration:none;box-sizing:border-box}
a.btn.primary{background:var(--accent);color:var(--on-accent);border:1px solid var(--accent)}
.inst-link input{width:100%;font-size:12.5px}
.inst-link .row{margin:6px 0 0;gap:6px;flex-wrap:wrap}
.inst-link button{display:inline-flex;align-items:center;gap:6px}
.inst-dev>summary,.inst-notes>summary{cursor:pointer;font-weight:500;padding:4px 0}
.inst-notes ul{margin:6px 0 0;padding-inline-start:18px;font-size:12.5px;color:var(--muted);display:flex;flex-direction:column;gap:4px}
.sw-tweak>span:first-child{min-width:0;flex:none;color:var(--accent)}
.sw-tweak-n{flex:1;min-width:0;display:flex;flex-direction:column}
.sw-tweak-n b,.sw-tweak-n small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* the components library: a list of items, each opening like a folder */
.cmp-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0}
.cmp-tools #cmpQ{flex:1 1 220px;min-width:0}
.cmp-kinds{flex:0 1 auto;overflow-x:auto;max-width:100%}
.cmp-kinds button{flex:none;white-space:nowrap}
.cmp-list{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.cmp-row{display:flex;align-items:center;gap:8px;padding:6px 8px;border-top:1px solid var(--line);min-width:0}
.cmp-row:first-child{border-top:0}
.cmp-open{display:flex;align-items:center;gap:10px;flex:1;min-width:0;background:transparent;border:0;padding:4px;text-align:start;color:var(--text);font:inherit;border-radius:8px}
button.cmp-open{cursor:pointer}button.cmp-open:hover{background:var(--hover-bg)}
.cmp-ic{flex:none;color:var(--accent);display:grid;place-items:center;width:28px}
.cmp-n{display:flex;flex-direction:column;min-width:0}
.cmp-n b,.cmp-n small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cmp-acts{display:flex;gap:2px;flex:none}
.cmp-acts button{flex:none;width:auto;min-width:0;display:inline-flex;align-items:center;gap:5px;padding:6px 8px;font-size:12.5px}
.cmp-acts button .ic{width:16px;height:16px}
.cmp-crumb{display:flex;flex-wrap:wrap;align-items:center;gap:2px;margin-bottom:8px}
.cmp-crumb button{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cmp-sep{color:var(--muted)}
.cmp-loads{margin:6px 0 0;padding-inline-start:18px;overflow-wrap:anywhere;font-size:12px}
.cmp-info{min-width:min(420px,80vw)}
.sw-fw{padding-inline-start:36px}
@media (max-width:820px){.cmp-row{flex-wrap:wrap}.cmp-acts{width:100%;justify-content:flex-end}.cmp-acts .cmp-bl{display:none}.cmp-acts button{padding:8px 10px}}
#cmpAppDlg{width:min(640px,96vw)}
#cmpAppDlg .cmp-list{max-height:60vh;overflow:auto;margin-top:8px}
#cmpAppLibs .cmp-n small{white-space:normal;overflow-wrap:anywhere}
/* Theos: a project's builds and its place in the components library */
.th-head{align-items:center;gap:12px;flex-wrap:nowrap}
.th-ic{color:var(--accent);flex:none}.th-ic .ic{width:30px;height:30px}
.th-t{display:flex;flex-direction:column;min-width:0}.th-t small{overflow-wrap:anywhere}
.th-comp{align-items:center;gap:8px;flex-wrap:wrap}.th-comp .grow{flex:1;min-width:0;overflow-wrap:anywhere}
.th-builds{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.th-build{padding:8px 10px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:4px;min-width:0}
.th-build:first-child{border-top:0}
.th-build .row{margin:0;gap:8px;flex-wrap:wrap;align-items:center}
.th-err{overflow-wrap:anywhere;color:var(--danger)}
.th-outs button{display:inline-flex;align-items:center;gap:5px;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.th-outs .ic{width:15px;height:15px;flex:none}
.th-tpls{display:flex;flex-direction:column;gap:6px}
.th-tpl{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.th-tpl span{display:flex;flex-direction:column}
.th-tpl:has(input:checked){border-color:var(--accent-line);background:var(--accent-soft)}
.th-pick{cursor:pointer}.th-pick input{flex:none}
.sw-req{padding-inline-start:36px;font-size:12px}
.th-note{font-size:12px;overflow-wrap:anywhere}
.th-out{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap;max-width:100%}
.th-jb-steps{margin:6px 0 10px;padding-inline-start:20px;display:flex;flex-direction:column;gap:4px}
#thJbDlg{width:min(520px,96vw)}#thJbDlg input{width:100%;font-size:12.5px}
.ths .grid2{gap:8px 14px}.ths textarea{width:100%;box-sizing:border-box;font:inherit}
.ths .f select,.ths .f input{width:100%;box-sizing:border-box}
.ths-bar{position:sticky;bottom:0;background:var(--bg);padding:8px 0;gap:10px;flex-wrap:wrap}
/* Theos: the target app's classes */
.th-target{align-items:center;gap:10px;flex-wrap:wrap}.th-target .grow{flex:1;min-width:0;overflow-wrap:anywhere}
#thcList{max-height:60vh;overflow:auto}
.thc-class{width:100%;text-align:start;background:transparent;border:0;border-top:1px solid var(--line);cursor:pointer;color:var(--text);font:inherit}
.thc-class:first-child{border-top:0}.thc-class:hover{background:var(--hover-bg)}
#thcDlg{width:min(760px,96vw)}
.thc-methods{max-height:50vh;overflow:auto;border:1px solid var(--line);border-radius:10px;margin:8px 0}
.thc-m{display:flex;gap:8px;align-items:flex-start;padding:6px 10px;border-top:1px solid var(--line);cursor:pointer}
.thc-m:first-child{border-top:0}.thc-m code{font-size:12.5px;overflow-wrap:anywhere;min-width:0}
.thc-m input{flex:none;margin-top:2px}
.thc-code{max-height:40vh;overflow:auto;font-size:12px;white-space:pre-wrap;background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:10px}
.thc-image{display:flex;flex-direction:column;gap:4px;margin-bottom:10px}.thc-image select{max-width:100%}
.thc-bar{position:sticky;bottom:0;background:var(--panel);padding-top:8px}
.tool-desc{white-space:normal!important;overflow-wrap:anywhere}
/* the tweak rows: the switch keeps its size, and the delete button sits apart from it */
.sw-tweak{align-items:center;gap:10px}.sw-tweak .sw-tweak-del{margin-inline-start:6px}
#thRepoDlg{width:min(620px,96vw)}#thRepoDlg input{width:100%;font-size:12.5px}
.repo-add{flex-wrap:wrap;gap:8px;margin-top:8px}.repo-add a.btn{display:inline-flex;align-items:center;padding:8px 12px;border-radius:10px;border:1px solid var(--line);text-decoration:none;color:var(--text)}
.repo-add a.btn.primary{color:var(--on-accent)}
.th-pub{margin-top:10px}
.sw-saved{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--accent-soft);border:1px solid var(--accent-line);border-radius:12px;padding:8px 10px;margin-bottom:10px}.sw-saved .ic{color:var(--accent)}
.sign-preset{white-space:nowrap}

/* the iPhone's live log */
.dl-opts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.dl-opts input[type=text] { flex: 1 1 220px; min-width: 0; }
.dl-bar { flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dl-bar button.on, #dlMine.on { border-color: var(--accent); color: var(--accent); }
.dl-state { margin-inline-start: auto; }
.dl-state.on::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #3fb950); margin-inline-end: 6px; vertical-align: middle; }
.dl-lines { direction: ltr; text-align: left; font: 12px/1.45 var(--mono); background: var(--dark); color: var(--dark-text); border: 1px solid var(--dark-line); border-radius: 8px; padding: 6px 8px; height: min(60vh, 560px); overflow: auto; margin-top: 6px; }
.dl-line { white-space: pre-wrap; overflow-wrap: anywhere; padding: 1px 0; border-bottom: 1px solid rgba(127,127,127,.08); }
.dl-t { opacity: .55; margin-right: 6px; }
.dl-p { color: #7cb7ff; margin-right: 6px; }
.dl-p small { opacity: .8; }
.dl-line.lv-error .dl-m, .dl-line.lv-fault .dl-m { color: var(--danger, #f85149); }
.dl-line.lv-warning .dl-m { color: var(--warn, #d29922); }
.dl-line.lv-debug .dl-m { opacity: .7; }
/* the assistant's customisation (Assistant ▸ Customise) */
.ai-tabs{margin-top:8px}
.ai-list{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.ai-row{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel2)}
.ai-other{margin-top:12px}
.ai-other>summary{cursor:pointer;color:var(--muted);font-weight:600;padding:6px 0}
.ai-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.ai-top{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ai-top b{overflow-wrap:anywhere}
.ai-desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ai-fact{white-space:pre-wrap;overflow-wrap:anywhere}
.ai-acts{display:flex;align-items:center;gap:4px;flex-shrink:0}
.ai-bulk{margin-inline-start:auto}
.ai-group h4{margin:14px 0 4px}
.ai-op{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.ai-pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:60vh;overflow:auto;font-size:.85em;background:var(--panel2);padding:10px;border-radius:10px}
.ai-form textarea{min-height:8em}
.ai-start{margin-top:6px;align-items:flex-start}
.chat-mem{display:flex;align-items:center;gap:4px;justify-content:center}
@media (max-width:820px){.ai-row{flex-wrap:wrap}.ai-main{flex-basis:100%}.ai-acts{margin-inline-start:auto}}
/* My repository */
.repo-pkg{padding:8px 10px;border-top:1px solid var(--line)}
.repo-pkg:first-child{border-top:0}
.repo-pkg-h{align-items:flex-start}
.repo-file{padding-inline-start:34px;margin-top:2px}
.repo-ic{width:40px;height:40px;border-radius:9px;object-fit:cover}
.repo-icon{align-items:center;margin:6px 0}
.repo-pkg-h .grow,.repo-file .grow{flex:1;min-width:0}
/* the approval level in the chat bar */
.chat-auto select{border:0;background:transparent;color:inherit;font:inherit;padding:0 18px 0 0;min-height:0;cursor:pointer}
.chat-auto.strict{color:var(--ok,#2f9e6a);border-color:currentColor}
.ask-file{font-size:12px;margin:4px 0}
.ask-diff{max-height:240px;overflow:auto}
/* My repository: its own section */
.repo-win{max-width:1100px}
.repo-tabs{margin:6px 0 12px}
.repo-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;border-radius:9px;background:var(--accent,#2f7d5b);color:#fff;font-size:11px;padding:0 5px;margin-inline-start:6px}
.repo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.repo-card{display:flex;gap:12px;align-items:center;text-align:start;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--panel);cursor:pointer;min-width:0}
.repo-card:hover{border-color:var(--accent,#2f7d5b)}
.repo-card-t{display:flex;flex-direction:column;gap:2px;min-width:0}
.repo-card-t b,.repo-card-t small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.repo-ic{width:48px;height:48px;border-radius:11px;object-fit:cover;flex:none}
.repo-ic.big{width:72px;height:72px;border-radius:16px}
.repo-ic.ph{display:grid;place-items:center;background:var(--panel2);border:1px solid var(--line)}
.repo-pkg-head{align-items:center;gap:14px;flex-wrap:wrap}
.repo-stats{display:flex;gap:18px;flex-wrap:wrap;margin-top:8px}
.repo-stats span{display:flex;flex-direction:column}
.repo-shots{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:6px;margin-bottom:8px}
.repo-shot{flex:none;width:150px;margin:0;scroll-snap-align:start}
.repo-shot img{width:150px;height:300px;object-fit:cover;border-radius:12px;border:1px solid var(--line);background:var(--panel2)}
.repo-shot figcaption{justify-content:center;gap:2px}
.repo-change{padding:8px 0;border-top:1px solid var(--line)}
.repo-change:first-child{border-top:0}
.repo-change-t{white-space:pre-wrap;margin-top:2px}
.repo-versions{width:100%;border-collapse:collapse;font-size:13px}
.repo-versions th,.repo-versions td{text-align:start;padding:6px 8px;border-bottom:1px solid var(--line);white-space:nowrap}
.repo-versions tr.live td:first-child{font-weight:600}
.rq-h{align-items:center;gap:8px;flex-wrap:wrap}
.rq-files{margin:6px 0}
.rq-files .row{gap:6px;align-items:center}
.rq-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 14px}
.rq-grid textarea{width:100%}
.rq-pics{align-items:center;gap:8px;flex-wrap:wrap;margin:6px 0}
.th-pubmode{margin-top:6px}
@media (max-width:820px){.rq-grid{grid-template-columns:1fr}.repo-grid{grid-template-columns:1fr}}
.repo-win .home-path .mono{display:inline-block;max-width:38vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
/* import: picking files to copy */
.imp-pickbox{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.imp-pickbox .row{align-items:center;gap:6px;flex-wrap:wrap}
.imp-pickbox input[type=text]{flex:1;min-width:140px}
.imp-pick{max-height:260px;overflow:auto;border:1px solid var(--line);border-radius:10px;padding:4px 8px}
.imp-file{gap:8px;padding:3px 0;align-items:center;flex-wrap:nowrap!important}
.imp-file .mono{overflow-wrap:anywhere;font-size:12px}
.th-ver{align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px}
/* the rail: sections first, then where-you-are tools */
#rail .rail-i[hidden],#rail .rail-sep[hidden]{display:none!important}
#rail .rail-sec .rl{font-weight:600}

/* the phone's Sections button lives on the phone's bar only */
#rail .rail-phone{display:none}
@media (max-width:820px){#rail .rail-phone.on-bar{display:flex}}
/* the next step: one line after a section's job, pointing to the next section (never running anything there) */
.next-step{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0;padding:8px 10px;border:1px solid var(--accent-line);background:var(--accent-soft);color:var(--accent-ink);border-radius:12px;font-size:13px}
.next-step .next-ic{display:inline-flex;flex:none}.next-step .next-ic .ic{width:18px;height:18px}
.next-step .next-t{flex:1;min-width:140px}
.next-step .next-acts{display:flex;gap:6px;align-items:center;margin-inline-start:auto}
.next-step .next-go{display:inline-flex;align-items:center;gap:6px}
.next-step .next-arrow{display:inline-block}
:root[dir=rtl] .next-step .next-arrow{transform:scaleX(-1)}
.next-step .next-x{color:var(--muted)}
.art .next-step{margin:4px 0 0}
.art.tile .next-step{padding:6px;gap:6px}.art.tile .next-step .next-t,.art.tile .next-step .next-ic{display:none}.art.tile .next-step .next-acts{margin:0;width:100%;justify-content:space-between}
.art.picked{outline:2px solid var(--accent);outline-offset:2px}
#installPage .inst-row .acts{margin-top:6px}

/* ===================== The studio's design (every colour, light and dark) =====================
   One fixed look: glossy section icons, a header with an illustration over each section (art.js), status icons, coloured file-type badges. The colour chosen in Appearance recolours all of it. */
:root{--glow:color-mix(in srgb,var(--accent) 42%,transparent);--tile-ink-1:#2C2E34;--tile-ink-2:#6F7178;
  --tile-bg:linear-gradient(158deg,#FFFFFF 0%,#F3F1EC 60%,#E8E5DE 100%);--tile-shadow:inset 0 1px 0 #fff,0 0 0 1px var(--line),0 1px 2px rgba(18,19,22,.12);
  --tile-on-bg:linear-gradient(158deg,#FFFFFF,color-mix(in srgb,var(--accent) 16%,#fff));
  --hero-bg:linear-gradient(135deg,#FFFFFF,#F2F0EB);--card-bg:var(--panel);--bottom-bg:var(--panel2);--art-shadow:drop-shadow(0 6px 8px rgba(18,19,22,.22))}
/* dark: the design's own surfaces */
:root[data-theme=dark]{--bg:#101315;--panel:#191D22;--panel2:#14171B;--line:#2B3036;--line-2:#22272C;--text:#D9DDE2;--ink-2:#BCC2C9;--muted:#8B919A;--faint:#5E646C;
  --ok:#2ECC71;--ok-soft:#0F2A1B;--ok-line:#1D4A31;--ok-ink:#8CE8B4;
  --hover-bg:#20252B;--hover-line:#3A4048;--row-hover:#1C2025;--placeholder:#5E646C;--shadow:rgba(0,0,0,.55);--backdrop:rgba(5,6,8,.66);
  --dark:#0B0D0F;--dark-2:#121519;--dark-line:#23282D;--tile-ink-1:#F6F7F9;--tile-ink-2:#C9CED6;
  --tile-bg:linear-gradient(158deg,#2C323A 0%,#1B1F24 55%,#15181C 100%);--tile-shadow:inset 0 1px 0 rgba(255,255,255,.09),inset 0 -1px 0 rgba(0,0,0,.45),0 1px 2px rgba(0,0,0,.5);
  --tile-on-bg:linear-gradient(158deg,color-mix(in srgb,var(--accent) 24%,#1B1F24) 0%,#1D1A17 100%);
  --hero-bg:linear-gradient(135deg,#1D2127,#121519);--card-bg:linear-gradient(180deg,rgba(29,33,39,.94),rgba(23,26,31,.94));--bottom-bg:linear-gradient(180deg,#121519,#0F1214);
  --art-shadow:drop-shadow(0 8px 10px rgba(0,0,0,.45))}
:root[data-theme=dark][data-oled]{--bg:#000;--panel:#0A0A0A;--panel2:#000;--line:#1F1F1F;--line-2:#161616;--hover-bg:#141414;--row-hover:#0E0E0E;--hero-bg:linear-gradient(135deg,#111,#050505);--card-bg:#0A0A0A;--bottom-bg:#000}
/* one font everywhere, as in the design: Readex Pro (served from fonts/), on Apple devices too */
:root[data-theme=dark] body{background:radial-gradient(1100px 480px at 88% -12%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 62%),var(--bg)}
/* the rail: each entry a glossy tile */
.rail-i{gap:5px}
.rail-i>.ic{width:40px;height:40px;padding:9.5px;border-radius:12px;stroke:url(#kraIconGrad);stroke-width:1.7;background:var(--tile-bg);box-shadow:var(--tile-shadow);transition:box-shadow .2s var(--ease),background .2s var(--ease)}
.rail-i:hover:not(:disabled){background:transparent;color:var(--text)}
.rail-i:hover:not(:disabled)>.ic{box-shadow:var(--tile-shadow),0 8px 18px -8px var(--glow)}
.rail-i.active{background:transparent;color:var(--text)}
.rail-i.active>.ic{stroke:url(#kraIconGradOn);background:var(--tile-on-bg);box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 0 0 1px color-mix(in srgb,var(--accent) 60%,transparent),0 10px 20px -8px var(--glow)}
.more-grid button .ic{stroke:url(#kraIconGrad)}
/* the section header: an illustration, the name, what it is for */
#secHero:empty{display:none}
.sec-hero{display:flex;align-items:center;gap:16px;min-height:96px;margin:10px 10px 2px;padding:14px 20px;border:1px solid var(--line);border-radius:18px;overflow:hidden;
  background:radial-gradient(460px 140px at 92% 115%,color-mix(in srgb,var(--accent) 28%,transparent),transparent 70%),var(--hero-bg);
  box-shadow:inset 0 -1px 0 color-mix(in srgb,var(--accent) 45%,transparent),0 12px 30px -22px var(--glow)}
.sec-hero .hero-art{display:inline-flex;flex:none}
.sec-hero .art-ic{width:68px;height:68px;filter:var(--art-shadow) drop-shadow(0 0 14px color-mix(in srgb,var(--accent) 30%,transparent))}
.sec-hero .hero-t{display:flex;flex-direction:column;gap:2px;min-width:0}
.sec-hero .hero-t b{font-size:20px;font-weight:600;color:var(--text);letter-spacing:.1px}
.sec-hero .hero-sub{color:var(--ink-2);font-size:13px}
.sec-hero .hero-t small{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sec-hero.home-hero{max-width:1180px;margin:0 auto 14px}
/* panels and the project window: cards */
#bottom{background:var(--bottom-bg)}
.tabs{background:transparent}
.tab.active{color:var(--text);border-bottom-color:var(--accent)}
.card,.art{background:var(--card-bg);border-radius:14px}
:root[data-theme=dark] .card,:root[data-theme=dark] .art{box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
button.primary,a.btn.primary{background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 80%,#fff),color-mix(in srgb,var(--accent) 88%,#000));border-color:var(--accent);box-shadow:0 6px 16px -8px var(--glow)}
button.primary:hover:not(:disabled){background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 70%,#fff),var(--accent))}
/* filters and segments: the chosen one filled, as a pill */
.chip.on,.seg button.on,.chips .chip.on{background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-weight:500}
#shell.home-on>#home{background:var(--bg)}
:root[data-theme=dark] #shell.home-on>#home{background:transparent}
:root[data-theme=dark] .home-win{background:rgba(25,29,34,.9);box-shadow:0 20px 50px -30px rgba(0,0,0,.8)}
.ptile:hover{box-shadow:0 10px 24px -14px var(--glow)}
/* status: an icon in front of each state */
.pill.succeeded::before{content:"✓";margin-inline-end:4px;font-weight:700}
.pill.failed::before{content:"✕";margin-inline-end:4px;font-weight:700}
.pill.cancelled::before{content:"!";margin-inline-end:4px;font-weight:700}
.pill.queued::before{content:"◷";margin-inline-end:4px}
.pill.running::before{content:"";display:inline-block;width:8px;height:8px;margin-inline-end:5px;border:1.5px solid currentColor;border-top-color:transparent;border-radius:50%;animation:kraSpin .9s linear infinite;vertical-align:-1px}
@keyframes kraSpin{to{transform:rotate(360deg)}}
/* file types in the tree: small coloured badges */
.fmark{display:inline-grid;place-items:center;width:17px;height:17px;border-radius:5px;font-size:0;flex:none;vertical-align:-3px;box-shadow:inset 0 1px 0 rgba(255,255,255,.25)}
.fmark::after{font:700 8.5px/1 var(--mono);color:#fff}
.fmark[data-k=swift]{background:linear-gradient(160deg,#FF7A50,#E5482F)}.fmark[data-k=swift]::after{content:"S"}
.fmark[data-k=objc]{background:linear-gradient(160deg,#6E9BF5,#3F6FD8)}.fmark[data-k=objc]::after{content:"M"}
.fmark[data-k=plist]{background:linear-gradient(160deg,#9AA1AA,#646B73)}.fmark[data-k=plist]::after{content:"P"}
.fmark[data-k=json]{background:linear-gradient(160deg,#F2C14E,#C9952B)}.fmark[data-k=json]::after{content:"{}";color:#2A1E08}
.fmark[data-k=yml]{background:linear-gradient(160deg,#D776B0,#A84687)}.fmark[data-k=yml]::after{content:"Y"}
.fmark[data-k=md]{background:linear-gradient(160deg,#7D8794,#535C66)}.fmark[data-k=md]::after{content:"M↓"}
.fmark[data-k=zip]{background:linear-gradient(160deg,#F4AE5C,#D9822F)}.fmark[data-k=zip]::after{content:"Z"}
.fmark[data-k=deb]{background:linear-gradient(160deg,#F0B47A,#C77B3A)}.fmark[data-k=deb]::after{content:"D"}
.fmark[data-k=ipa]{background:linear-gradient(160deg,#4F9BFF,#1F6FE0)}.fmark[data-k=ipa]::after{content:"I"}
.fmark[data-k=pdf]{background:linear-gradient(160deg,#F2635F,#C9302C)}.fmark[data-k=pdf]::after{content:"P"}
.fmark[data-k=img]{background:linear-gradient(160deg,#3FDB86,#1FA75A)}.fmark[data-k=img]::after{content:"◐"}
.fmark[data-k=sh]{background:linear-gradient(160deg,#3A4048,#1B1F24)}.fmark[data-k=sh]::after{content:">_";color:#7EE2A8}
/* phones: the bottom bar as in the design (plain icons, the open one on a coloured pill), a compact header */
@media (max-width:820px){
  .rail{box-shadow:0 -8px 24px -16px var(--shadow)}
  .rail-i{gap:2px;border-radius:14px}
  .rail-i>.ic{width:24px;height:24px;padding:0;border-radius:0;background:none;box-shadow:none}
  .rail-i:hover:not(:disabled)>.ic{box-shadow:none}
  .rail-i.active{background:color-mix(in srgb,var(--accent) 22%,transparent);color:var(--accent-ink)}
  .rail-i.active>.ic{background:none;box-shadow:none}
  /* the tab and the bottom bar already name the section: no third title on a phone */
  #secHero{display:none}
  #rcOutputs{display:none} /* the bottom bar has Outputs */
  .sec-hero{min-height:74px;margin:8px 8px 0;padding:10px 14px;gap:12px;border-radius:16px}
  .sec-hero .art-ic{width:52px;height:52px}
  .sec-hero .hero-t b{font-size:17px}
  .sec-hero .hero-sub{font-size:12px}
  .sec-hero.home-hero{margin:8px 8px 10px}
}
/* a way back inside a section (the Trash, a package's page): the arrow points back in either direction */
:root[dir=rtl] .back-arrow{display:inline-block;transform:scaleX(-1)}
.repo-back{padding:8px 10px 0;margin:0}
/* the header names no section: the section header over the page does */
#homeBtn{display:none!important}
/* one tab alone (the section header already names it): no tab bar, unless the Editor button is shown */
#ptabs.solo .tab[data-panel]{display:none}
#ptabs.solo:not(:has(#edOpen:not([hidden]))){display:none}
/* the live log: a side panel like the assistant's */
#logSide{position:fixed;top:57px;bottom:0;inset-inline-end:0;width:min(520px,100vw);z-index:30;background:var(--panel);border-inline-start:1px solid var(--line);box-shadow:-18px 0 40px -28px var(--shadow);display:flex;flex-direction:column;min-height:0}
#logSide[hidden]{display:none}
#logSideBody{flex:1;min-height:0;overflow:auto}
#logSideBody .panel{padding:8px}
#logSideBody .dl-lines{max-height:none;min-height:240px}
#shell.log-open #bottom{padding-inline-end:min(520px,100vw)}
#logBtn.on,#aiBtn.on{color:var(--accent)}
@media (max-width:820px){#logSide{top:auto;height:85dvh;width:100%;border-radius:18px 18px 0 0;border:1px solid var(--line);z-index:45}#shell.log-open #bottom{padding-inline-end:0}}
/* the account's sections (Certificates, Components, Devices) */
.acct-tabs{margin:10px 12px 0}
.acct-body>.panel{padding:12px}
/* My repository: Add a .deb */
.repo-add{padding:10px 12px 0;margin:0;gap:10px}
#debPrep .row{margin:6px 0}
/* the jobs bar: part of the page, under every section (project windows and section windows alike) */
#shell{grid-template-rows:auto minmax(0,1fr) auto}
#shell>#run{grid-row:3;grid-column:2;min-width:0}
#shell>#run[hidden]{display:none}
.rail{grid-row:2/4}
#acctBody pre.console{min-height:50vh}
.hist-f{gap:8px;flex-wrap:wrap}
@media (max-width:820px){
  #shell{grid-template-rows:auto minmax(0,1fr) auto auto}
  #shell>#run{grid-row:3;grid-column:1}
  .rail{grid-row:4}
}
.trash-bar{gap:10px;flex-wrap:wrap}
.trash-row .cmp-n small.warn{color:var(--warn)}
/* the full console beside your work */
#conSide{position:fixed;top:57px;bottom:0;inset-inline-end:0;width:min(620px,100vw);z-index:31;background:var(--panel);border-inline-start:1px solid var(--line);box-shadow:-18px 0 40px -28px var(--shadow);display:flex;flex-direction:column;min-height:0}
#conSide[hidden]{display:none}
#conSideBody{flex:1;min-height:0;display:flex;flex-direction:column}
#conSideBody .panel{flex:1;min-height:0;display:flex;flex-direction:column;padding:8px}
#conSideBody pre.console{flex:1;min-height:0}
#shell.con-open #bottom{padding-inline-end:min(620px,100vw)}
@media (max-width:820px){#conSide{top:auto;height:85dvh;width:100%;border-radius:18px 18px 0 0;border:1px solid var(--line);z-index:46}#shell.con-open #bottom{padding-inline-end:0}}
/* an output's card: the head (icon, file, app, bundle ID, kind / signed / checked), its six facts, every action; a tap opens the details */
.art.ac{padding:14px;gap:12px}
.ac-top{cursor:pointer;display:flex;flex-direction:column;gap:12px}
.ac-head{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.ac-ic{flex:none;display:inline-flex}
.ac-img,.ac-ph{width:64px;height:64px;border-radius:22.37%;object-fit:cover;box-shadow:0 6px 16px -8px var(--shadow)}
.ac-ph{display:grid;place-items:center;background:linear-gradient(160deg,color-mix(in srgb,var(--accent) 75%,#fff),color-mix(in srgb,var(--accent) 80%,#000))}
.ac-ph span{background:#fff;color:color-mix(in srgb,var(--accent) 85%,#000);font:800 12px/1 var(--font);padding:5px 6px;border-radius:6px;letter-spacing:.3px}
.ac-t{flex:1;min-width:140px;display:flex;flex-direction:column;gap:1px}
.ac-file{font-size:17px}
.ac-app{color:var(--ink-2);font-size:14px}
.ac-bid{font-size:12.5px;text-align:start}
.ac-pills{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.ac-pills .pill{font-size:12px;padding:3px 11px}
.pill.ac-kind{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent-ink);font-weight:600}
.pill.ac-unsigned{background:var(--bad-soft);border-color:var(--bad-line);color:var(--bad-ink)}
.pill.ac-signed{background:var(--ok-soft);border-color:var(--ok-line);color:var(--ok-ink)}
.ac-facts{display:grid;grid-template-columns:1fr 1fr;column-gap:18px;border:1px solid var(--line);border-radius:14px;padding:2px 12px;background:var(--panel2)}
.ac-fact{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--line-2);min-width:0}
.ac-fact:nth-last-child(-n+2){border-bottom:0}
.ac-fic{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent)}
.ac-fic .ic{width:18px;height:18px}
.ac-fl{color:var(--muted);font-size:12.5px;white-space:nowrap}
.ac-fv{font-size:14px;text-align:end;overflow-wrap:anywhere;min-width:0}
.ac-fv a{color:var(--accent)}
.ac-acts{display:flex;flex-wrap:wrap;gap:8px}
.ac-acts>button,.ac-acts .inst>button{flex:1 1 auto;min-height:44px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;gap:7px}
.ac-acts>button.primary,.ac-acts .inst>button.primary{flex:1 1 40%}
.ac-acts .inst{display:contents}
.ac-acts .ic{width:18px;height:18px}
.ac .art-more{margin:0}
.ac .art-more>summary.ac-more{list-style:none;display:flex;align-items:center;justify-content:center;gap:6px;color:var(--muted);font-size:13px;cursor:pointer;padding:4px;border-radius:10px}
.ac .art-more>summary.ac-more::-webkit-details-marker{display:none}
.ac .art-more>summary.ac-more .ic{width:16px;height:16px;transition:transform .2s var(--ease)}
.ac .art-more[open]>summary.ac-more .ic{transform:rotate(180deg)}
.ac-sec{border:1px solid var(--line);border-radius:12px;margin:8px 0;background:var(--panel2)}
.ac-sec>summary{list-style:none;display:flex;align-items:center;gap:10px;padding:10px 12px;cursor:pointer}
.ac-sec>summary::-webkit-details-marker{display:none}
.ac-sic{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);flex:none}
.ac-sic .ic{width:17px;height:17px}
.ac-chev{margin-inline-start:auto;display:inline-flex;color:var(--muted)}.ac-chev .ic{width:16px;height:16px;transition:transform .2s var(--ease)}
.ac-sec[open]>summary .ac-chev .ic{transform:rotate(180deg)}
.pill.ac-count{font-size:11px;padding:1px 8px}
.ac-sb{padding:2px 12px 12px;min-width:0}
.ac-sub{margin:8px 0}.ac-sub>summary{cursor:pointer;color:var(--ink-2)}
@media (max-width:820px){.ac-facts{grid-template-columns:1fr}.ac-fact:nth-last-child(2){border-bottom:1px solid var(--line-2)}}
/* a card's window */
dialog.ac-dlg{width:min(760px,96vw);max-height:92dvh;padding:10px 14px 14px}
dialog.ac-dlg .ac-dlg-h{margin:0 0 4px}
dialog.ac-dlg article.ac{border:0;box-shadow:none;background:transparent;padding:0}
dialog.ac-dlg .ac-top{cursor:default}
.ac .ac-open{align-self:center;display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:13px}
.ac .ac-open .ic{width:16px;height:16px}
@media (max-width:820px){dialog.ac-dlg{width:100vw;max-width:100vw;max-height:92dvh;margin:auto 0 0;border-radius:18px 18px 0 0}}
/* Storage (account menu): one row per kind of temporary files */
#cleanDlg{max-width:520px}
#cleanDlg .clean-row{display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);cursor:pointer}
#cleanDlg .clean-row.off{opacity:.55;cursor:default}
#cleanDlg .clean-row input{margin-top:3px;flex:none}
#cleanDlg .clean-txt{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
#cleanDlg .clean-size{flex:none;font-variant-numeric:tabular-nums;white-space:nowrap}
#cleanDlg .clean-size,#cleanSum{unicode-bidi:plaintext}#cleanDlg .clean-size{direction:ltr}
#histTable .hist-out{margin-inline-start:6px;font-size:11px;vertical-align:middle}#histTable .hist-out svg{width:12px;height:12px;vertical-align:-2px}
/* the welcome page (every visit starts here): what the studio does, then its four sections as cards */
.welcome{max-width:1180px;margin:0 auto;display:flex;flex-direction:column;gap:18px}
.wel-hero{padding:26px 28px;border:1px solid var(--line);border-radius:20px;overflow:hidden;
  background:radial-gradient(520px 160px at 90% 120%,color-mix(in srgb,var(--accent) 26%,transparent),transparent 70%),var(--hero-bg);
  box-shadow:inset 0 -1px 0 color-mix(in srgb,var(--accent) 45%,transparent),0 12px 30px -22px var(--glow)}
.wel-hero h1{margin:0 0 10px;font-size:26px;font-weight:700;color:var(--text)}
.wel-hero p{margin:0 0 6px;max-width:760px;line-height:1.7;color:var(--text)}
.wel-hero .wel-pick{margin-top:12px;color:var(--muted);font-weight:600}
.wel-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.wel-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;padding:26px 18px 18px;border:1px solid var(--line);border-radius:20px;overflow:hidden;
  background:radial-gradient(300px 140px at 50% 0%,color-mix(in srgb,var(--accent) 16%,transparent),transparent 75%),var(--panel);color:var(--text);font:inherit;text-align:center;cursor:pointer;
  box-shadow:0 12px 30px -24px var(--glow);transition:transform .15s,border-color .15s,box-shadow .15s}
.wel-card:hover,.wel-card:focus-visible{transform:translateY(-2px);border-color:color-mix(in srgb,var(--accent) 55%,var(--line));box-shadow:0 18px 38px -22px var(--glow);outline:none}
.wel-card .wel-art .art-ic{width:96px;height:96px;filter:var(--art-shadow) drop-shadow(0 0 18px color-mix(in srgb,var(--accent) 30%,transparent))}
.wel-card .wel-t{font-size:20px;font-weight:700}
.wel-card .wel-d{color:var(--muted);line-height:1.6;font-size:14px;flex:1}
.wel-card .wel-n{min-height:1.4em;font-size:13px;color:var(--accent);font-weight:600}
.wel-card .wel-open{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:42px;margin-top:4px;border:1px solid color-mix(in srgb,var(--accent) 55%,var(--line));border-radius:99px;color:var(--text);font-weight:600}
:root[dir=rtl] .wel-card .wel-arrow{display:inline-block;transform:scaleX(-1)}
@media (max-width:1000px){.wel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.wel-grid{grid-template-columns:1fr}.wel-hero{padding:20px}.wel-hero h1{font-size:22px}
  .wel-card{flex-direction:row;flex-wrap:wrap;text-align:start;align-items:center;padding:16px}.wel-card .wel-art .art-ic{width:56px;height:56px}.wel-card .wel-t{flex:1}
  .wel-card .wel-d,.wel-card .wel-n{flex-basis:100%}.wel-card .wel-open{display:none}}
#shell.wel-on>#rail{display:none!important}
#shell.wel-on.home-on>#home{grid-column:1/-1}
@media (max-width:820px){#shell.wel-on.home-on>#home{grid-row:2}}
/* the jobs bar sits above the page, never under its cards */
#shell>#run{position:relative;z-index:6}
/* between the welcome page and a section: the page fades and settles, the rail slides in from its side (the bar from below on phones) */
#shell.vt-sec>#rail{view-transition-name:sec-rail}
#shell.vt-sec>#home,#shell.vt-sec>main{view-transition-name:sec-page}
::view-transition-group(sec-page),::view-transition-group(sec-rail){animation-duration:.42s;animation-timing-function:cubic-bezier(.2,.8,.2,1)}
::view-transition-old(sec-page){animation:secOut .22s ease both}
::view-transition-new(sec-page){animation:secIn .42s cubic-bezier(.2,.8,.2,1) both}
::view-transition-new(sec-rail):only-child{animation:railIn .42s cubic-bezier(.2,.8,.2,1) both}
::view-transition-old(sec-rail):only-child{animation:railIn .3s ease reverse both}
::view-transition-old(root),::view-transition-new(root){animation-duration:.3s}
@keyframes secOut{to{opacity:0;transform:scale(.985)}}
@keyframes secIn{from{opacity:0;transform:translateY(10px) scale(.99)}}
@keyframes railIn{from{opacity:0;transform:translateX(var(--rail-from,-24px))}}
:root[dir=rtl]{--rail-from:24px}
@media (max-width:820px){@keyframes railIn{from{opacity:0;transform:translateY(100%)}}}
/* (browsers without View Transitions) */
#shell.sec-enter>#rail{animation:railIn .4s cubic-bezier(.2,.8,.2,1) both}
#shell.sec-enter>#home,#shell.sec-enter>main{animation:secIn .4s cubic-bezier(.2,.8,.2,1) both}
.wel-card{animation:welCard .5s cubic-bezier(.2,.8,.2,1) backwards}
.wel-card:nth-child(2){animation-delay:.05s}.wel-card:nth-child(3){animation-delay:.1s}.wel-card:nth-child(4){animation-delay:.15s}
@keyframes welCard{from{opacity:0;transform:translateY(14px)}}
@media (prefers-reduced-motion:reduce){.wel-card,#shell.sec-enter>*{animation:none!important}}

/* a job running in another section: a chip beside the status that takes you there */
.else-run{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0 10px;border:1px solid color-mix(in srgb,var(--accent) 50%,var(--line));border-radius:99px;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--text);font:inherit;font-size:12.5px;cursor:pointer;white-space:nowrap}
.else-run[hidden]{display:none}
.else-run .else-dot{width:8px;height:8px;border-radius:50%;background:var(--accent);animation:elsePulse 1.4s ease-in-out infinite}
@keyframes elsePulse{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.else-run .else-dot{animation:none}}
@media (max-width:560px){.else-run{max-width:42vw;overflow:hidden;text-overflow:ellipsis}}

/* Certificate details: cards, label/value rows (technical values mono, left to right), entitlements by group with a dot per state */
#certDlg.cd-dlg{width:min(920px,100vw)}
#certDlg .cd-pick{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px;margin-bottom:10px}
#certDlg .cd-card{margin:10px 0}
#certDlg .cd-card h3{display:flex;align-items:center;gap:6px}
#certDlg .cd-row{display:grid;grid-template-columns:minmax(120px,34%) 1fr;gap:10px;padding:6px 0;border-bottom:1px solid var(--line);align-items:start}
#certDlg .cd-row:last-of-type{border-bottom:0}
#certDlg .cd-l{color:var(--muted);font-size:13px}
#certDlg .cd-v{display:flex;align-items:flex-start;gap:6px;min-width:0;overflow-wrap:anywhere}
#certDlg .cd-row.bad .cd-v{color:var(--bad)}
#certDlg .cd-mono{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:12.5px;overflow-wrap:anywhere;word-break:break-all}
#certDlg .cd-cp{flex:none;padding:2px 6px;min-height:0}
#certDlg .cd-cp svg{width:13px;height:13px}
#certDlg .cd-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px}
#certDlg .cd-group{border:1px solid var(--line);border-radius:12px;padding:6px 10px;margin:8px 0}
#certDlg .cd-group summary{cursor:pointer;font-weight:600;padding:4px 0}
#certDlg .cd-ent{display:flex;gap:10px;padding:8px 0;border-top:1px solid var(--line)}
#certDlg .cd-ent-t{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
#certDlg .cd-key,#certDlg .cd-val{display:flex;align-items:flex-start;gap:6px;flex-wrap:wrap;min-width:0}
#certDlg .cd-dot{width:10px;height:10px;border-radius:50%;margin-top:6px;flex:none;background:#9aa0a6}
#certDlg .cd-dot.on,#certDlg .cd-ent.on .cd-dot,#certDlg .cd-ent.empty .cd-dot{background:var(--ok)}
#certDlg .cd-ent.empty .cd-dot{background:transparent;border:2px solid var(--ok)}
#certDlg .cd-dot.off,#certDlg .cd-ent.off .cd-dot{background:#f2b705}
#certDlg .cd-ent.missing{opacity:.7}
#certDlg .cd-legend{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
#certDlg .cd-legend .cd-dot{margin:0 0 0 8px}
#certDlg .cd-udids{max-height:300px;overflow:auto;margin-top:8px}
#certDlg .cd-udid{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 0;border-bottom:1px solid var(--line)}
@media (max-width:560px){#certDlg .cd-row{grid-template-columns:1fr;gap:2px}}

/* Certificates: a certificate with the profiles that list it, as one card */
.cert-id{display:flex;flex-direction:column;gap:8px}
.cert-profs{display:flex;flex-direction:column;gap:6px;padding-inline-start:12px;border-inline-start:2px solid color-mix(in srgb,var(--accent) 45%,var(--line))}
.cert-prof{display:flex;align-items:flex-start;gap:8px}
.cert-prof svg{width:16px;height:16px;flex:none;margin-top:3px}
.cert-prof-t{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.cert-lock .cert-pw{max-width:260px}

/* when something happened: the short form, the full date as its tooltip */
time.when{white-space:nowrap}.job-times{overflow-wrap:anywhere}
/* outputs as tiles everywhere (a project's Outputs, the IPA Library, All outputs): date headings, the filter bar, two columns on a phone */
.out-list{display:flex;flex-direction:column;gap:10px}
.out-day{margin:6px 0 0;font-size:13px;color:var(--muted);font-weight:600}
.out-bar{gap:8px;flex-wrap:wrap;align-items:center}.out-bar #outQ{flex:1 1 220px;min-width:0;width:auto}.out-bar select{width:auto;flex:0 1 auto;max-width:100%;min-width:0}.out-bar button{flex:none}
.tile-when{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.tile-proj{display:inline-flex;align-items:center;gap:4px;border:0;background:transparent;color:var(--accent);padding:2px 6px;font-size:12px;max-width:100%;min-height:0;border-radius:8px}
.tile-proj:hover:not(:disabled){background:var(--hover-bg)}
.tile-proj span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tile-proj svg{width:13px;height:13px;flex:none}
.tile-acts .inst{display:flex;flex-direction:column;gap:4px}.tile-acts .inst:empty{display:none}.tile-acts .inst .note{text-align:center;font-size:11.5px;overflow-wrap:anywhere}
@media(max-width:560px){
  .lib-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .art.tile{padding:10px 8px;gap:8px}.art.tile .app-ic.xl{width:56px;height:56px}
  .tile-name{font-size:13.5px}.tile-sub{font-size:11px}.tile-tags .pill{font-size:10.5px}
  .tile-acts button{padding-inline:6px;font-size:12.5px;white-space:normal}
  .out-bar select,.out-bar #outRefresh{flex:1 1 40%}
}
/* a card's note in one short line; the rest folded under "More" (noteMore in main.js) */
.note-more{margin:4px 0}.note-more>p.note{margin:0}
details.more{margin:2px 0 0}
details.more>summary{cursor:pointer;color:var(--accent);font-size:12px;width:max-content;list-style:none;padding:2px 0}
details.more>summary::-webkit-details-marker{display:none}
details.more>summary::after{content:" ›";display:inline-block;transition:transform .2s var(--ease)}
details.more[open]>summary::after{transform:rotate(90deg)}
details.more>p.note{margin:4px 0 0}
.warnbox details.more>summary{color:inherit;text-decoration:underline}
/* signing: one page; Sign stays at the bottom of the window while the page scrolls */
.sw-foot{--p:20px;position:sticky;bottom:calc(-1 * var(--p));z-index:2;margin:6px calc(-1 * var(--p)) calc(-1 * var(--p));padding:12px var(--p) calc(12px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:12px;
  background:var(--panel);border-top:1px solid var(--line);box-shadow:0 -10px 24px -18px var(--shadow)}
.sw-foot-st{flex:1;min-width:0;font-size:12.5px}
.sw-foot-st .ok{color:var(--ok,#2f9e6a);font-weight:600}.sw-foot-st .bad{color:var(--bad,#c2410c);font-weight:600}
#swSign{flex:none;min-width:150px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 18px;font-size:15px;border-radius:14px}
#swSign[data-ready="false"]{opacity:.6}
#swSign .ic{width:18px;height:18px}
.sw-h{display:flex;align-items:center;gap:6px;margin:0 0 6px!important;font-size:13px!important;color:var(--text)!important}
.sw-h .ic{width:16px;height:16px;color:var(--accent)}
@media(max-width:820px){.sw-foot{--p:14px}}
@media(max-width:560px){.sw-foot{flex-direction:column;align-items:stretch;gap:6px}.sw-foot-st{text-align:center}#swSign{width:100%}}
/* signing: the output file's name with its extension, and the IPA/TIPA switch */
.sw-name-in{flex:1;min-width:0;display:flex;align-items:center;gap:6px}.sw-name-in input{flex:1;min-width:0}
.sw-ext{flex:none;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}
.sw-fmt{margin:0!important;flex:none}
/* Storage: the total with one bar split by part, each place's share, every part with its risk; Clean stays at the bottom */
#storeDlg.store{width:min(640px,96vw)}
.store-title{margin:0 0 10px}
.store-body{display:flex;flex-direction:column;gap:12px}
.store-card{border:1px solid var(--line);border-radius:16px;padding:14px;background:var(--panel2);display:flex;flex-direction:column;gap:8px}
.store-head{align-items:flex-start;justify-content:space-between;gap:12px;margin:0}
.store-big{font-size:28px;font-weight:700;letter-spacing:-.02em;white-space:nowrap;font-variant-numeric:tabular-nums}
.store-bar{display:flex;gap:3px;height:12px;border-radius:99px;overflow:hidden;background:var(--line-2)}
.store-bar i{display:block;height:100%;min-width:4px;border-radius:99px}
.store-chosen{display:flex;flex-direction:column;gap:2px}.store-chosen b{font-size:20px;font-variant-numeric:tabular-nums}
.store-place{display:flex;flex-direction:column;gap:5px;padding-top:4px}.store-place .row{margin:0}
.store-pname{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.store-pbar{height:5px;border-radius:99px;background:var(--line-2);overflow:hidden}.store-pbar i{display:block;height:100%;background:var(--accent);border-radius:99px}
.store-row{display:grid!important;grid-template-columns:auto auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 0;border-top:1px solid var(--line-2);cursor:pointer}
.store-row.off{cursor:default}.store-row.off .store-pick{opacity:.35}
.store-pick{width:22px;height:22px;border-radius:50%;accent-color:var(--accent);margin:0}
.store-ic{width:34px;height:34px;border-radius:10px;display:grid;place-items:center}.store-ic .ic{width:18px;height:18px}
.store-name{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.store-risk{font-size:10.5px;font-weight:600;padding:1px 7px;border-radius:99px;white-space:nowrap}
.store-risk.r-high{color:#c0392b;background:#c0392b1f}.store-risk.r-important{color:#c77a12;background:#e8963c24}.store-risk.r-safe{color:#2e7dbf;background:#3f8ec924}
.store-row .clean-size{display:flex;flex-direction:column;align-items:flex-end;gap:1px;white-space:nowrap;font-variant-numeric:tabular-nums}
.store-where{font-style:italic}
.store-never{margin:0}
.store-foot .danger.solid{display:inline-flex;align-items:center;gap:8px;padding:11px 18px;border-radius:14px;font-size:15px}
.store-foot .danger.solid .ic{width:17px;height:17px}
@media(max-width:820px){.store-foot{--p:14px}}
@media(max-width:560px){.store-row{grid-template-columns:auto auto minmax(0,1fr);}.store-row .clean-size{grid-column:3;align-items:flex-start;flex-direction:row;gap:8px}.store-foot{flex-direction:column;align-items:stretch}.store-foot .danger.solid{justify-content:center;width:100%}}
/* (the older Storage list's rules, kept for History's window, are undone here) */
#storeDlg #cleanDlg{max-width:none}
#storeDlg .clean-row{border-bottom:0;align-items:center}
#storeDlg .clean-row.off{opacity:1}
#storeDlg .store-pick{appearance:none;-webkit-appearance:none;width:24px;height:24px;margin:0;border:2px solid var(--line);border-radius:50%;display:grid;place-items:center;background:var(--panel);cursor:pointer;transition:background .15s,border-color .15s}
#storeDlg .store-pick:checked{background:var(--accent);border-color:var(--accent)}
#storeDlg .store-pick:checked::after{content:"";width:6px;height:11px;border:solid #fff;border-width:0 2.5px 2.5px 0;transform:translateY(-1px) rotate(45deg)}
#storeDlg .store-pick:disabled{opacity:.3;cursor:default}
/* ===================== 2026-11 design: a dark sidebar with the studio's groups, cool neutral surfaces, soft cards =====================
   Desktop: the sidebar runs the page's full height on the reading side (the KRAcloud mark on top, every entry under its group's
   heading, the space used at the bottom) and folds to icons; the header sits over the page only. Phones keep the bottom bar. */
:root{--bg:#F3F5F8;--panel:#FFFFFF;--panel2:#F7F8FA;--line:#E3E7ED;--line-2:#ECEFF3;--text:#141A26;--ink-2:#2B3240;--muted:#687182;--faint:#98A1B0;
  --hover-line:#CFD5DE;--hover-bg:#EEF1F5;--row-hover:#F8FAFC;--placeholder:#A5ADBA;--shadow:rgba(16,24,40,.16);
  --tile-bg:linear-gradient(158deg,#FFFFFF 0%,#F2F4F7 60%,#E6E9EE 100%);--hero-bg:linear-gradient(135deg,#FFFFFF,#F1F3F7);--tile-ink-1:#273041;--tile-ink-2:#687182;
  --side-bg:#1C2333;--side-ink:#C5CCD9;--side-mute:#7F8899;--side-hover:rgba(255,255,255,.06);--side-on:rgba(255,255,255,.11);--side-line:rgba(255,255,255,.08);
  --card-shadow:0 1px 2px rgba(16,24,40,.04),0 6px 18px -10px rgba(16,24,40,.14);--rail-w:248px}
:root[data-theme=dark]{--side-bg:#0C1016;--side-ink:#B8C0CC;--side-mute:#6C7584;--side-hover:rgba(255,255,255,.05);--side-on:rgba(255,255,255,.09);--side-line:rgba(255,255,255,.07);--card-shadow:none}
:root[data-theme=dark][data-oled]{--side-bg:#000}
:root:has(#rail.folded){--rail-w:68px}
.card,.art{box-shadow:var(--card-shadow)}
.rail-top,.rail-g,.rail-space,.rail-fold{display:none}
#bellBtn{display:inline-flex;align-items:center}
@media (min-width:821px){
  #shell{grid-template-columns:auto minmax(0,1fr)}
  #shell>header{grid-column:2;grid-row:1;min-height:57px;padding:8px 18px}
  #shell>header .brand{display:none}
  /* the dashboard has the sidebar too (phones: no bar under its section cards) */
  #shell.wel-on>#rail.rail{display:flex!important}
  #shell.wel-on.home-on>#home{grid-column:2}
  #cmdBtn{min-width:210px;justify-content:flex-start;background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:6px 10px;color:var(--muted)}
  #cmdBtn kbd{margin-inline-start:auto}
  #cmdBtn:hover:not(:disabled){border-color:var(--hover-line)}
  #bellBtn .ic,#logBtn .ic,#aiBtn .ic{width:19px;height:19px}
  .rail{grid-row:1/-1;grid-column:1;width:var(--rail-w);padding:0;gap:0;background:var(--side-bg);border-inline-end:0;color:var(--side-ink);overflow:hidden;transition:width .2s var(--ease)}
  .rail-top{display:flex;align-items:center;gap:8px;min-height:57px;padding:0 12px 0 16px;border-bottom:1px solid var(--side-line);flex:none}
  .rail-brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-weight:600;font-size:15px;min-width:0;white-space:nowrap}
  .rail-brand img{width:28px;height:28px;flex:none;filter:invert(1)}
  .rail-brand em{font-style:normal;font-weight:300;opacity:.7}
  .rail-brand b{font-weight:500;color:var(--side-mute);margin-inline-start:4px}
  .rail-fold{display:inline-flex;margin-inline-start:auto;background:transparent;border:0;color:var(--side-mute);padding:6px;border-radius:8px}
  .rail-fold:hover:not(:disabled){color:#fff;background:var(--side-hover)}
  .rail-fold .ic{width:18px;height:18px}
  .rail-list{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--side-line) transparent;display:flex;flex-direction:column;gap:1px;padding:6px 10px 10px}
  .rail-g{display:block;flex:none;font-size:11px;font-weight:600;color:var(--side-mute);padding:14px 10px 5px;letter-spacing:.02em;white-space:nowrap;overflow:hidden}
  .rail-i{flex-direction:row;justify-content:flex-start;gap:11px;padding:8px 10px;border-radius:10px;font-size:13.5px;color:var(--side-ink);text-align:start;white-space:nowrap;flex:none}
  .rail-i .rl{overflow:hidden;text-overflow:ellipsis}
  .rail-i>.ic{width:19px;height:19px;padding:0;border-radius:0;background:none;box-shadow:none;stroke:currentColor;stroke-width:1.8;flex:none}
  .rail-i:hover:not(:disabled){background:var(--side-hover);color:#fff}
  .rail-i:hover:not(:disabled)>.ic{box-shadow:none}
  .rail-i.active{background:var(--side-on);color:#fff;font-weight:500}
  .rail-i.active>.ic{stroke:currentColor;background:none;box-shadow:none;color:color-mix(in srgb,var(--accent) 55%,#fff)}
  .rail-i.edopen{color:color-mix(in srgb,var(--accent) 60%,#fff)}
  #rail .rail-sec .rl{font-weight:inherit}
  .rail-i.has-reply::after{top:50%;margin-top:-4.5px;inset-inline-end:12px;box-shadow:0 0 0 2px var(--side-bg)}
  .rail-space{display:flex;align-items:center;gap:10px;margin:10px;padding:10px 12px;border-radius:12px;background:var(--side-hover);border:1px solid var(--side-line);color:var(--side-ink);text-align:start;flex:none}
  .rail-space:hover:not(:disabled){border-color:var(--side-mute);background:var(--side-on)}
  .rail-space .ic{width:20px;height:20px;flex:none}
  .rail-space .rl{display:flex;flex-direction:column;min-width:0;line-height:1.3}
  .rail-space small{font-size:11px;color:var(--side-mute)}.rail-space b{color:#fff;font-weight:600;font-size:13px;text-align:start}
  html .ksc-panel{inset-inline-start:calc(var(--rail-w) + 12px)}
  /* folded: the icons only (a line between the groups) */
  .rail.folded .rl,.rail.folded .rail-brand b{display:none}
  .rail.folded .rail-top{flex-direction:column;justify-content:center;gap:4px;padding:8px 0}
  .rail.folded .rail-fold{margin:0}
  .rail.folded .rail-g{font-size:0;padding:0;height:1px;background:var(--side-line);margin:8px 8px}
  .rail.folded .rail-list{padding:6px 8px}
  .rail.folded .rail-i{justify-content:center;padding:10px 0}
  .rail.folded .rail-space{justify-content:center;margin:8px;padding:10px 0}
  .rail.folded .rail-i.has-reply::after{top:8px;margin:0;inset-inline-end:8px}
}
/* narrower screens: folded unless opened */
@media (min-width:821px) and (max-width:1100px){
  :root:not(:has(#rail.unfold)){--rail-w:68px}
  .rail:not(.unfold) .rl,.rail:not(.unfold) .rail-brand b{display:none}
  .rail:not(.unfold) .rail-top{flex-direction:column;justify-content:center;gap:4px;padding:8px 0}
  .rail:not(.unfold) .rail-fold{margin:0}
  .rail:not(.unfold) .rail-g{font-size:0;padding:0;height:1px;background:var(--side-line);margin:8px 8px}
  .rail:not(.unfold) .rail-list{padding:6px 8px}
  .rail:not(.unfold) .rail-i{justify-content:center;padding:10px 0}
  .rail:not(.unfold) .rail-space{justify-content:center;margin:8px;padding:10px 0}
}
@media (max-width:820px){
  .rail-list{display:contents}
}
/* flat, as in the design: no gradients, glows or raised illustrations; navy as the default colour (theme.js) */
:root{--tile-bg:var(--panel);--tile-on-bg:var(--accent-soft);--tile-shadow:0 0 0 1px var(--line);--hero-bg:var(--panel);--glow:transparent;--art-shadow:none}
:root[data-theme=dark]{--tile-bg:var(--panel);--tile-on-bg:var(--accent-soft);--tile-shadow:0 0 0 1px var(--line);--hero-bg:var(--panel);--card-bg:var(--panel);--bottom-bg:var(--bg)}
:root[data-theme=dark] body{background:var(--bg)}
.rail-i>.ic,.more-grid button .ic{stroke:currentColor}
.sec-hero{background:var(--panel);border-color:var(--line);box-shadow:var(--card-shadow);border-radius:14px;min-height:0;padding:14px 18px}
.sec-hero .hero-art,.wel-card .wel-art{display:grid;place-items:center;width:48px;height:48px;border-radius:12px;background:var(--accent-soft);color:var(--accent);flex:none}
.sec-hero .art-ic{width:24px;height:24px;filter:none}
.wel-card .wel-art{width:60px;height:60px;border-radius:16px}
.wel-card .wel-art .art-ic{width:28px;height:28px;filter:none}
.wel-hero,.wel-card{background:var(--panel);box-shadow:var(--card-shadow)}
.wel-card:hover,.wel-card:focus-visible{border-color:var(--hover-line);box-shadow:0 12px 28px -16px var(--shadow)}
.ptile:hover{box-shadow:none;background:var(--hover-bg)}
button.primary,a.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent);box-shadow:none}
button.primary:hover:not(:disabled){background:color-mix(in srgb,var(--accent) 86%,#fff)}
:root[data-theme=dark] button.primary:hover:not(:disabled){background:color-mix(in srgb,var(--accent) 86%,#000)}
.ac-ph{background:var(--accent-soft);color:var(--accent)}
@media (max-width:820px){.sec-hero .hero-art{width:42px;height:42px}.sec-hero .art-ic{width:22px;height:22px}}
@media (max-width:560px){.wel-card .wel-art{width:48px;height:48px}.wel-card .wel-art .art-ic{width:24px;height:24px}}
/* the dashboard: a greeting, four figures, the recent projects, the sections */
.welcome .wel-hero{padding:22px 24px}
.welcome .wel-hero h1{font-size:24px;margin-bottom:6px}
.wel-pick{margin:4px 2px -6px;color:var(--muted);font-weight:600}
.dash-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.dash-stat{display:flex;align-items:center;gap:14px;padding:16px 18px;background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:var(--card-shadow);min-width:0}
.dash-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--accent-soft);color:var(--accent);flex:none}.dash-ic .ic{width:22px;height:22px}
.dash-st{display:flex;flex-direction:column;min-width:0}
.dash-st small{color:var(--muted);font-size:12.5px}
.dash-st b{font-size:22px;font-weight:700;line-height:1.3;font-variant-numeric:tabular-nums;white-space:nowrap}
.dash-st .note{font-size:11.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-stat.warn .dash-ic{background:var(--warn-soft);color:var(--warn)}.dash-stat.warn b{color:var(--warn)}
.dash-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:var(--card-shadow);padding:16px 18px}
.dash-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.dash-h b{font-size:17px}
#dashAll{color:var(--accent);font-weight:600}
.dash-list{display:flex;flex-direction:column;gap:8px}
.dash-row{display:flex;align-items:center;gap:14px;padding:10px 12px;border:1px solid var(--line-2);border-radius:12px;background:var(--panel2);cursor:pointer;min-width:0}
.dash-row:hover,.dash-row:focus-visible{background:var(--hover-bg);outline:none;border-color:var(--line)}
.dash-pic{display:grid;place-items:center;width:44px;height:44px;border-radius:11px;background:var(--accent-soft);color:var(--accent);flex:none;overflow:hidden}
.dash-pic .ic{width:22px;height:22px}.dash-pic img{width:44px;height:44px;border-radius:11px}
.dash-name{display:flex;flex-direction:column;flex:1;min-width:0}
.dash-name b,.dash-name small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-badge{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:8px;font-size:12px;font-weight:600;white-space:nowrap}
.dash-badge .ic{width:13px;height:13px;stroke-width:2.4}
.dash-badge.ok{background:var(--ok-soft);color:var(--ok)}.dash-badge.bad{background:var(--bad-soft);color:var(--bad)}
.dash-badge.none{background:var(--hover-bg);color:var(--muted)}.dash-badge.run{background:var(--accent-soft);color:var(--accent)}
.dash-row .pmore{position:static;opacity:1;flex:none}
@media (max-width:1000px){.dash-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.dash-stats{gap:10px}.dash-stat{padding:12px;gap:10px}.dash-ic{width:38px;height:38px}.dash-st b{font-size:19px}.dash-card{padding:12px}.dash-row{gap:10px;padding:8px 10px}}
@media (max-width:820px){.welcome{padding:12px 12px 20px}}
/* the build page: the last build's card and the build's actions beside the project's facts (one column when narrow) */
.panel.build{container-type:inline-size}
.build-grid{display:flex;flex-direction:column;gap:12px}
.build-main{display:flex;flex-direction:column;gap:12px;min-width:0}
.build-main>.card,.build-side>.card{margin:0}
@container (min-width:820px){
  .build-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,280px);align-items:start;gap:14px}
  .build-side{position:sticky;top:44px}
  .build-info .target-name{flex-direction:column;text-align:center;gap:8px}
  .build-info .kv2{display:flex;flex-direction:column;gap:2px}
  .build-info .kv2 dt{margin-top:8px}
}
.rc{display:flex;flex-direction:column;gap:14px;padding:16px}
.rc-banner{display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:12px;border:1px solid var(--ok-line);background:var(--ok-soft)}
.rc.bad .rc-banner{border-color:var(--bad-line);background:var(--bad-soft)}
.rc.none .rc-banner{border-color:var(--line);background:var(--hover-bg)}
.rc-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--ok);color:#fff;flex:none}
.rc.bad .rc-mark{background:var(--bad)}.rc.none .rc-mark{background:var(--muted)}
.rc-mark .ic{width:22px;height:22px;stroke-width:2.6}
.rc-t{display:flex;flex-direction:column;min-width:0}
.rc-t b{font-size:17px;color:var(--ok-ink)}.rc.bad .rc-t b{color:var(--bad-ink)}.rc.none .rc-t b{color:var(--text)}
.rc-t .note{overflow-wrap:anywhere}
.rc-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:4px 2px}
.rc-fact{display:flex;flex-direction:column;gap:2px;min-width:0}
.rc-fact small{color:var(--muted);font-size:12px}
.rc-fact b{font-size:15px;font-weight:600;font-variant-numeric:tabular-nums;text-align:start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rc-acts{display:flex;gap:8px;flex-wrap:wrap}
.rc-acts button{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border-radius:12px;font-weight:600}
.rc-acts .ic{width:17px;height:17px}
.rc-logbox{display:flex;flex-direction:column;gap:8px}
.rc-log{margin:0;padding:10px 12px;border-radius:10px;background:var(--panel2);border:1px solid var(--line-2);font:12px/1.6 var(--mono);white-space:pre-wrap;word-break:break-word;max-height:190px;overflow:auto;text-align:left}
@media (max-width:560px){.rc-facts{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:12px}.rc-acts button{flex:1;justify-content:center}}
/* the editor window, as in the design: a bar (close, where the file is, open a file, the configuration, Build), the files beside the
   editor, its tabs with a + and a status line; light in light mode. Phones: the files open over the editor from the folder button. */
main.editing #editorPane{background:var(--bg)}
#editorPane .edbar{align-items:center;gap:8px;padding:8px 12px;min-height:56px;background:var(--panel)}
#edClose{border:1px solid var(--line);border-radius:10px;padding:6px 14px;font-weight:600}
#edTreeBtn{display:none}
.ed-crumb{display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden;white-space:nowrap;color:var(--muted);font-size:13.5px;direction:ltr}
.ed-crumb b{color:var(--text);font-weight:600}.ed-crumb .sep{color:var(--faint)}
.ed-crumb span:not(.sep),.ed-crumb b{overflow:hidden;text-overflow:ellipsis}
#editorPane .edbar .spacer{flex:1}
#edQuick{display:inline-flex;align-items:center;gap:6px;color:var(--muted)}
#edCfg{width:auto;border-radius:10px;padding:6px 10px}
#edRun{display:inline-flex;align-items:center;gap:8px;border-radius:10px;padding:7px 16px;font-weight:600}
#edRun .ic{width:16px;height:16px}
.ed-body{flex:1;min-height:0;display:grid;grid-template-columns:250px minmax(0,1fr);gap:12px;padding:12px}
.ed-tree{background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:auto;padding:8px 6px;font-size:13.5px;box-shadow:var(--card-shadow)}
.ed-node{display:flex;align-items:center;gap:6px;padding:5px 8px;border-radius:8px;cursor:pointer;white-space:nowrap;color:var(--ink-2)}
.ed-node:hover,.ed-node:focus-visible{background:var(--hover-bg);outline:none}
.ed-node.on{background:var(--accent-soft);color:var(--accent-ink);font-weight:500}
.ed-node .nm{overflow:hidden;text-overflow:ellipsis;min-width:0}
.ed-root{cursor:default}.ed-root:hover{background:transparent}
.ed-chev{display:inline-grid;place-items:center;width:14px;flex:none;color:var(--faint)}.ed-chev .ic{width:13px;height:13px;transform:rotate(-90deg)}
:root[dir=rtl] .ed-chev .ic{transform:rotate(90deg)}
.ed-node:has(.ed-fic.open) .ed-chev .ic{transform:none}
.ed-fic{display:inline-grid;place-items:center;color:color-mix(in srgb,var(--accent) 70%,var(--muted));flex:none}.ed-fic .ic{width:17px;height:17px}
.ed-main{display:flex;flex-direction:column;min-height:0;min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:var(--card-shadow)}
.ed-tabs{display:flex;align-items:stretch;border-bottom:1px solid var(--line);flex:none}
.ed-tabs #etabs{flex:1;min-width:0;border-bottom:0;padding:6px 6px 0;gap:4px}
.ed-tabs #etabs .tab{border:1px solid transparent;border-bottom:0;border-radius:10px 10px 0 0;padding:7px 12px;color:var(--muted);direction:ltr}
.ed-tabs #etabs .tab.active{background:var(--panel2);border-color:var(--line);color:var(--text);font-weight:500;margin-bottom:-1px}
#edNew{flex:none;border-radius:0;padding:0 14px}
#editorPane #etools{border-bottom:1px solid var(--line-2);padding:6px 8px;background:var(--panel)}
#editorPane #etools button{border-radius:8px}
#editorPane #cm .cm-editor{background:var(--panel)}
#editorPane #cm .cm-scroller{font-size:13.5px;line-height:1.6}
:root[data-theme=dark] #editorPane #cm .cm-editor{background:var(--dark)}
.ed-status{display:flex;gap:16px;align-items:center;padding:5px 14px;border-top:1px solid var(--line-2);font-size:12px;color:var(--muted);background:var(--panel);flex:none}
.ed-status .ed-saved{color:var(--ok);margin-inline-start:auto}.ed-status .ed-dirty{color:var(--warn);margin-inline-start:auto;font-weight:600}
/* Ctrl+P */
#qoDlg{width:min(600px,94vw);padding:10px;top:12vh;margin-top:0}
#qoDlg .sheet-bar{display:none}
#qoQ{font-size:16px;padding:10px 12px;border-radius:10px}
.qo-list{max-height:min(56vh,440px);overflow:auto;margin-top:8px;display:flex;flex-direction:column;gap:1px}
.qo-i{display:flex;align-items:center;gap:8px;border:0;background:transparent;border-radius:8px;padding:8px 10px;text-align:start;direction:ltr}
.qo-i .note{margin-inline-start:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.qo-i.on,.qo-i:hover{background:var(--accent-soft)}
@media (max-width:1000px){.ed-body{grid-template-columns:210px minmax(0,1fr)}#edQuick .lbl{display:none}}
@media (max-width:820px){
  #editorPane .edbar{padding:6px 8px;gap:6px;min-height:50px}
  #edTreeBtn{display:inline-flex}
  #edQuick{display:none}
  .ed-body{grid-template-columns:minmax(0,1fr);padding:0;gap:0;position:relative}
  .ed-main{border-radius:0;border:0;box-shadow:none}
  .ed-tree{display:none;position:absolute;inset:0;z-index:3;border-radius:0;border:0}
  #editorPane.tree-open .ed-tree{display:block}
  #edRun span{display:none}#edRun{padding:7px 10px}
  .ed-status{gap:10px}
}
#editorPane #cm .cm-gutters{background:var(--panel);color:var(--faint);border-inline-end:1px solid var(--line-2)}
:root[data-theme=dark] #editorPane #cm .cm-gutters{background:var(--dark);border-inline-end-color:var(--dark-line)}
#edCfg{min-width:112px;padding-inline-end:28px}
@media (max-width:820px){#edCfg{min-width:0;width:92px}}
/* every window in the design's style: rounded fields with a soft focus ring, the file picker as a button, softer dialogs */
input[type=text],input[type=password],input[type=search],input[type=number],input[type=url],input[type=email],input[type=date],select,textarea{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:7px 10px}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent)}
button{border-radius:10px}
button:hover:not(:disabled){border-color:var(--hover-line)}
button:not([class]):hover:not(:disabled){background:var(--hover-bg)}
button.primary:hover:not(:disabled){border-color:var(--accent)}
button.danger:not(.solid):hover:not(:disabled){border-color:var(--bad);background:var(--bad-soft)}
input[type=file]{font-size:13px;color:var(--muted);max-width:100%}
input[type=file]::file-selector-button{font:inherit;font-weight:600;color:var(--text);background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:7px 14px;margin-inline-end:10px;cursor:pointer}
input[type=file]::file-selector-button:hover{background:var(--hover-bg);border-color:var(--hover-line)}
dialog{border-radius:16px;border-color:var(--line);box-shadow:0 24px 60px -20px rgba(16,24,40,.35)}
dialog::backdrop{background:rgba(16,24,40,.42);backdrop-filter:blur(2px)}
:root[data-theme=dark] dialog::backdrop{background:rgba(0,0,0,.6)}
.card{border-color:var(--line);border-radius:14px}
.seg{border-radius:12px}
.menu,.kam-menu{border-radius:14px;box-shadow:0 18px 44px -16px rgba(16,24,40,.3)}
@media (min-width:821px){#rail:has(.rail-i.active:not(.rail-sec)) .rail-sec.active{background:transparent}}

/* the components library's space: a thin bar with the numbers under it */
.cmp-usage{display:flex;flex-direction:column;gap:6px;margin:4px 0 2px;position:relative;padding-top:8px}
.cmp-usage::before{content:"";position:absolute;inset:0 0 auto 0;height:6px;border-radius:99px;background:var(--line)}
.cmp-usage>i{position:absolute;top:0;inset-inline-start:0;height:6px;border-radius:99px;background:var(--accent);min-width:6px}
.cmp-row>.cmp-inject,.cmp-acts .tool-inject{flex:none;width:auto;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:6px}
@media (max-width:820px){.cmp-row>.cmp-inject{width:100%;padding:10px}}

/* a phone keeps the page's text sizes (iOS otherwise enlarges text in wide boxes) */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
/* a card's window never scrolls sideways: long lines (paths, identities) wrap */
dialog.ac-dlg{overflow-x:hidden}
dialog.ac-dlg article.ac,dialog.ac-dlg .ac-acts,dialog.ac-dlg .ac-t{min-width:0;max-width:100%}
.ac-acts .inst>.note{flex:1 1 100%;min-width:0;overflow-wrap:anywhere;font-size:12.5px;line-height:1.5}

/* installing: the ways as tabs, a line on what the chosen one does */
.inst-ways{margin:10px 0 4px}
.inst-way-d{margin:6px 0 10px}
.inst-way-b{display:flex;flex-direction:column;gap:10px}
#dlMenu .menu-list button>span{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:start}

/* a card's actions: the main one full width, the others in two equal columns */
.ac-acts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.ac-acts>button{min-width:0;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ac-acts>button.ac-main,.ac-acts>button.ac-wide{grid-column:1/-1}

/* Files: three buttons, a search with its filter, and a tree with folder pictures and clear arrows */
#side .fx-bar{display:flex;align-items:center;gap:6px;padding:8px 8px 4px;flex-wrap:nowrap}
#side .fx-bar button{display:inline-flex;align-items:center;gap:6px;min-height:36px;border-radius:10px}
#side .fx-new{padding:6px 14px}
#side .fx-more,#side .fx-ic{width:36px;padding:0;justify-content:center}
#side .fx-ic.on{color:var(--accent);background:var(--accent-soft)}
#side .fx-bar .ic,#side .fx-search .ic{width:17px;height:17px}
.fx-search{display:flex;align-items:center;gap:6px;margin:4px 8px 0;padding:0 4px 0 10px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.fx-search input{flex:1;min-width:0;border:0;background:transparent;padding:8px 2px;box-shadow:none;outline:none}
.fx-sic{color:var(--muted);display:inline-grid;flex:none}
#side .tfilter[hidden]{display:none}
#tree{padding:6px 0;font-size:14px}
#tree .node{gap:6px;padding-top:5px;padding-bottom:5px;min-height:30px}
#tree .nm{min-width:0;flex:0 1 auto}
#tree .tname{font-weight:600;overflow:hidden;text-overflow:ellipsis;min-width:0}
.tchev{display:inline-grid;place-items:center;width:16px;flex:none;color:var(--muted)}
.tchev .ic{width:14px;height:14px;transform:rotate(-90deg);transition:transform .15s var(--ease)}
:root[dir=rtl] .tchev .ic{transform:rotate(90deg)}
.node.open>.tchev .ic{transform:none}
.tfic{display:inline-grid;place-items:center;flex:none;color:color-mix(in srgb,var(--accent) 75%,var(--muted))}
.tfic .ic{width:18px;height:18px}
.tfile{display:inline-grid;place-items:center;width:18px;flex:none;color:var(--muted)}
.tfile .ic{width:16px;height:16px}
#tree .fmark{width:18px;height:18px}
#tree .tsz{font-size:11px;flex:none;opacity:.8}
#tree .mt{font-size:11px}
@media (max-width:820px){#tree .node{min-height:40px;font-size:15px}}
#tree .nm,#tree .tsz{direction:ltr;unicode-bidi:isolate}
/* ===================== 2026-11 themes: five complete looks (theme.js sets data-palette and the accent on <html>) =====================
   Each theme colours the whole studio: the sidebar, the surfaces, the text and the code surface; light and dark. Black OLED is
   always dark. The accent (--accent) is the readable shade for text and borders; --accent-fill is the brand colour on the main
   buttons and chosen chips, with --on-accent-fill as its text. */
:root[data-palette=graphite]{--bg:#F5F5F4;--panel:#FFFFFF;--panel2:#F9F9F8;--line:#E7E7E4;--line-2:#EFEFEC;--text:#1A1C1B;--ink-2:#3C403E;--muted:#6E7471;--faint:#9DA29F;
  --hover-line:#D4D5D1;--hover-bg:#EFEFED;--row-hover:#FAFAF9;--placeholder:#A8ACA9;--side-bg:#1C1F1E;--side-ink:#C8CDCB;--side-mute:#8A918E;--dark:#151817;--dark-2:#1B1F1D;--dark-line:#2A2E2C;
  --shadow:rgba(20,22,21,.16);--card-shadow:0 1px 2px rgba(20,22,21,.05),0 8px 24px -16px rgba(20,22,21,.2)}
:root[data-palette=graphite][data-theme=dark]{--bg:#121413;--panel:#1A1D1C;--panel2:#161918;--line:#2A2E2C;--line-2:#222624;--text:#E6E9E7;--ink-2:#C3C8C5;--muted:#8E9592;--faint:#646B68;
  --hover-line:#3A3F3C;--hover-bg:#202422;--row-hover:#1C1F1E;--placeholder:#5F6663;--side-bg:#0D0F0E;--side-ink:#C2C8C5;--side-mute:#7D8581;--dark:#0B0D0C;--dark-2:#111312;--dark-line:#222624;
  --ok:#5BE3A0;--ok-soft:#133325;--ok-line:#1E4A35;--ok-ink:#8EE9BE;--card-shadow:none}
:root[data-palette=espresso]{--bg:#F4F2EF;--panel:#FFFFFF;--panel2:#FAF9F7;--line:#E7E2DC;--line-2:#EFEBE6;--text:#211B17;--ink-2:#463C35;--muted:#776B62;--faint:#A3978E;
  --hover-line:#D6CEC6;--hover-bg:#F0ECE7;--row-hover:#FBFAF8;--placeholder:#ADA198;--side-bg:#2A2420;--side-ink:#DDD3CB;--side-mute:#A09288;--dark:#1C1815;--dark-2:#231E1A;--dark-line:#342D28;
  --ok:#3C8A5A;--ok-soft:#E5F2EA;--ok-line:#C3DFCD;--ok-ink:#2A6642;--shadow:rgba(33,27,23,.16);--card-shadow:0 1px 2px rgba(33,27,23,.05),0 8px 24px -16px rgba(33,27,23,.2)}
:root[data-palette=espresso][data-theme=dark]{--bg:#161311;--panel:#1F1B18;--panel2:#1A1715;--line:#342D28;--line-2:#2A2420;--text:#EDE6E0;--ink-2:#CFC5BD;--muted:#A2968C;--faint:#73685F;
  --hover-line:#463D36;--hover-bg:#26211D;--row-hover:#221E1B;--placeholder:#6E635B;--side-bg:#100D0B;--side-ink:#D6CCC4;--side-mute:#8F837A;--dark:#0E0B09;--dark-2:#14110F;--dark-line:#2A2420;
  --ok:#6CC08C;--ok-soft:#173022;--ok-line:#24493A;--ok-ink:#A4DDB8;--card-shadow:none}
:root[data-palette=forest]{--bg:#F3F3EE;--panel:#FFFFFF;--panel2:#F9F9F6;--line:#E3E3DA;--line-2:#ECECE5;--text:#18201C;--ink-2:#38423D;--muted:#69736E;--faint:#9AA29D;
  --hover-line:#D1D3C8;--hover-bg:#ECEDE6;--row-hover:#FAFAF7;--placeholder:#A4ABA6;--side-bg:#17251F;--side-ink:#C9D4CE;--side-mute:#84968D;--dark:#111A16;--dark-2:#16211C;--dark-line:#26322C;
  --ok:#2F7D55;--ok-soft:#E2F0E8;--ok-line:#BFDCCB;--ok-ink:#215C3E;--warn:#B5561C;--warn-soft:#FBEADF;--warn-line:#F0CDB6;--warn-ink:#8A3F12;
  --shadow:rgba(24,32,28,.16);--card-shadow:0 1px 2px rgba(24,32,28,.05),0 8px 24px -16px rgba(24,32,28,.2)}
:root[data-palette=forest][data-theme=dark]{--bg:#0F1512;--panel:#17201B;--panel2:#131B17;--line:#26322C;--line-2:#1E2924;--text:#E4EAE6;--ink-2:#C2CCC6;--muted:#8C9A92;--faint:#5F6D66;
  --hover-line:#34423B;--hover-bg:#1C2721;--row-hover:#18221D;--placeholder:#5A6862;--side-bg:#0A100D;--side-ink:#C2CEC7;--side-mute:#7D8F86;--dark:#0A0F0D;--dark-2:#0F1512;--dark-line:#1E2924;
  --ok:#6CC08C;--ok-soft:#173022;--ok-line:#24493A;--ok-ink:#A4DDB8;--warn:#EE9A62;--warn-soft:#3A2414;--warn-line:#5A3620;--warn-ink:#F5BF98;--card-shadow:none}
:root[data-palette=charcoal]{--bg:#F4F4F2;--panel:#FFFFFF;--panel2:#FAFAF9;--line:#E4E4E0;--line-2:#EDEDEA;--text:#191918;--ink-2:#3B3B39;--muted:#6F6F6A;--faint:#9F9F99;
  --hover-line:#D2D2CD;--hover-bg:#EEEEEB;--row-hover:#FAFAF8;--placeholder:#A9A9A3;--side-bg:#1A1A19;--side-ink:#CFCFCB;--side-mute:#8C8C87;--dark:#141413;--dark-2:#1A1A19;--dark-line:#2C2C2A;
  --ok:#4E7A16;--ok-soft:#ECF3DD;--ok-line:#D3E3B5;--ok-ink:#3A5C0F;--shadow:rgba(25,25,24,.16);--card-shadow:0 1px 2px rgba(25,25,24,.05),0 8px 24px -16px rgba(25,25,24,.2)}
:root[data-palette=charcoal][data-theme=dark]{--bg:#121211;--panel:#1B1B1A;--panel2:#171716;--line:#2C2C2A;--line-2:#232322;--text:#E8E8E4;--ink-2:#C7C7C2;--muted:#92928C;--faint:#66665F;
  --hover-line:#3B3B38;--hover-bg:#21211F;--row-hover:#1D1D1B;--placeholder:#61615B;--side-bg:#0C0C0B;--side-ink:#CACAC5;--side-mute:#85857F;--dark:#0B0B0A;--dark-2:#111110;--dark-line:#232322;
  --ok:#B9DB4E;--ok-soft:#2A3311;--ok-line:#3F4C19;--ok-ink:#CFE88A;--card-shadow:none}
:root[data-palette=oled]{color-scheme:dark;--bg:#000;--panel:#0A0A0A;--panel2:#000;--line:#1F1F1F;--line-2:#161616;--text:#E8E8E6;--ink-2:#C4C4C0;--muted:#8E8E89;--faint:#5E5E5A;
  --hover-line:#2E2E2E;--hover-bg:#141414;--row-hover:#0E0E0E;--placeholder:#5A5A56;--side-bg:#000;--side-ink:#C8C8C4;--side-mute:#7A7A76;--side-line:rgba(255,255,255,.08);--dark:#000;--dark-2:#050505;--dark-line:#1A1A1A;
  --ok:#5BE3A0;--ok-soft:#0C2419;--ok-line:#163D2A;--ok-ink:#8EE9BE;--bad:#EF7B6E;--bad-soft:#2A1411;--bad-line:#4A221D;--bad-ink:#F6A99F;--warn:#E2A54F;--warn-soft:#241A0A;--warn-line:#3E2E12;--warn-ink:#EFC27F;
  --shadow:rgba(0,0,0,.6);--backdrop:rgba(0,0,0,.7);--card-shadow:none;--card-bg:#0A0A0A;--bottom-bg:#000}
:root[data-palette] body,:root[data-palette][data-theme=dark] body{background:var(--bg)}
:root[data-palette=oled] .rail{border-inline-end:1px solid var(--line)}
/* the brand colour on the main buttons and chosen chips (the accent itself stays the readable shade) */
:root[data-palette] :is(button.primary,a.btn.primary,ol.steps li.cur,.chip.on,.seg button.on,.chips .chip.on){background:var(--accent-fill,var(--accent));border-color:var(--accent-fill,var(--accent));color:var(--on-accent-fill,var(--on-accent))}
:root[data-palette] :is(button.primary,a.btn.primary):hover:not(:disabled){background:color-mix(in srgb,var(--accent-fill,var(--accent)) 88%,#000);border-color:color-mix(in srgb,var(--accent-fill,var(--accent)) 88%,#000)}
:root[data-palette] .repo-add a.btn.primary{color:var(--on-accent-fill,var(--on-accent))}
/* the sidebar: the open entry marked with the theme's colour on its reading edge */
@media (min-width:821px){
  :root[data-palette] .rail-i.active{position:relative}
  :root[data-palette] .rail-i.active::before{content:"";position:absolute;inset-inline-start:0;top:8px;bottom:8px;width:3px;border-radius:3px;background:var(--accent-fill,var(--accent))}
  :root[data-palette] .rail-i.active>.ic{color:var(--accent-fill,var(--accent))}
  :root[data-palette] .rail.folded .rail-i.active::before{display:none}
}

/* black OLED: the main buttons and chosen chips are near-black with a light edge; hover lightens; the sidebar marker
   stays silver (the fill would vanish on black) */
:root[data-palette=oled] :is(button.primary,a.btn.primary,ol.steps li.cur,.chip.on,.seg button.on,.chips .chip.on){border-color:#5A5A5A}
:root[data-palette=oled] :is(button.primary,a.btn.primary):hover:not(:disabled){background:#2C2C2C;border-color:#8A8A8A}
:root[data-palette=oled] .rail-i.active::before{background:var(--accent)}
:root[data-palette=oled] .rail-i.active>.ic{color:var(--accent)}
/* the check badge: with problems it is a button that opens why (problemsDialog) */
.pill.vbtn{display:inline-flex;align-items:center;gap:5px;cursor:pointer;font:inherit;font-size:inherit;line-height:inherit}
.pill.vbtn .ic{width:13px;height:13px;opacity:.75}
.pill.vbtn .vb-n{font-weight:700;font-size:.9em;min-width:1.4em;padding:0 .35em;border-radius:999px;background:currentColor;color:var(--panel);text-align:center}
.pill.vbtn:hover{filter:brightness(1.08);text-decoration:underline}
#vbDlg h4{margin:14px 0 6px;font-size:13.5px}
#vbDlg .vb-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
#vbDlg .vb-item{border:1px solid var(--line);border-inline-start:3px solid var(--line);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:4px}
#vbDlg .vb-item.bad{border-inline-start-color:var(--bad)}
#vbDlg .vb-item.warn{border-inline-start-color:#C9871F}
#vbDlg .vb-fix{font-size:13px}#vbDlg .vb-fix span{font-weight:600}
#vbDlg .vb-code{font-size:11px;color:var(--muted);align-self:flex-start}
#vbDlg .vb-sign{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:10px;margin:8px 0;font-size:13.5px}
#vbDlg .vb-sign .ic{width:18px;height:18px;flex:none}
#vbDlg .vb-sign.ok{background:var(--ok-soft);color:var(--ok-ink)}
#vbDlg .vb-sign.bad{background:var(--bad-soft);color:var(--bad-ink)}
