/* =====================================================================
   site.css: styles shared by every page
     - the colour and type tokens of the MODERN look (the same values app.css uses)
     - the Wizify button and the rules that show or hide the parts that differ
       between the two looks (see "the two looks" at the end of this file)
     - the bar across the top of signed-in pages
     - the simple pages: sign in, register, account, My protocols, console
   The protocol builder's own styles are in app.css.
   To change a modern colour everywhere, change the token here AND in app.css.
   The retro look is theme.css, which only takes effect after "Wizify" is clicked.
   ===================================================================== */
:root{color-scheme:light dark;
 --fBody:"Instrument Sans",system-ui,sans-serif;--fHead:"Sofia Sans Condensed","Arial Narrow",sans-serif;
 --bg:light-dark(#ffffff,#111112);--ink:light-dark(#121212,#ececec);--mut:light-dark(#5d5d5d,#a3a3a3);
 --line:light-dark(#e2e2e2,#2c2c2e);--soft:light-dark(#f5f5f4,#1b1b1d);--acc:#ff4a1c;--accInk:light-dark(#c4300c,#ff7a55);
 --ok:light-dark(#1f7a3d,#5cc983);--part:light-dark(#a86400,#f0b04a)}
:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{color-scheme:dark}
*{box-sizing:border-box;min-width:0}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.55 var(--fBody)}
h1,h2,h3{font-family:var(--fHead);font-weight:800;line-height:1.05;margin:0;text-wrap:balance}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:inherit}
:focus-visible{outline:2px solid var(--acc);outline-offset:2px}

/* ---------- the top bar ---------- */
.sitebar{display:flex;align-items:center;gap:4px 14px;flex-wrap:wrap;padding:8px max(3vw,16px);border-bottom:1px solid var(--line);font-size:14px;background:var(--soft)}
.sitebar a,.sitebar button{color:inherit;text-decoration:none;background:none;border:0;padding:6px 4px;min-height:32px;display:inline-flex;align-items:center}
.sitebar a:hover,.sitebar button:hover{text-decoration:underline}
.sitebar a[aria-current=page]{font-weight:600;box-shadow:inset 0 -2px 0 var(--ink)}
.sb-brand{font-size:17px;letter-spacing:-.01em;margin-right:6px}
.sb-brand b{font-weight:800;color:var(--accInk)}
.sb-mid{flex:1;display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap}
.sb-proto{font-weight:600;max-width:40ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sb-save{color:var(--mut);font-size:13px}
.sb-save.busy{color:var(--part)}
.sb-save.bad{color:var(--accInk);font-weight:600}
.sb-who{color:var(--mut)}
.sb-tag{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;border:1px solid var(--line);border-radius:20px;padding:1px 7px;color:var(--ink);white-space:nowrap}
.bootfail{padding:16px max(3vw,16px);border-left:3px solid var(--acc);background:var(--soft)}

/* The builder's administrator strip is shown only to administrators (platform.js adds .is-admin to <body>). */
body:not(.is-admin) .adminbar{display:none}

/* ---------- simple pages ---------- */
.page{max-width:1080px;margin:0 auto;padding:28px max(3vw,16px) 64px}
.page h1{font-size:clamp(30px,4vw,42px);margin-bottom:6px}
.page h2{font-size:24px;margin:34px 0 10px}
.lede{color:var(--mut);margin:0 0 22px;max-width:70ch}
.small{font-size:13px;color:var(--mut)}
.btn{min-height:44px;padding:0 16px;border:1.5px solid var(--ink);background:transparent;border-radius:2px;font-weight:600;display:inline-flex;align-items:center;text-decoration:none}
.btn.solid{background:var(--ink);color:var(--bg)}
.btn.sm{min-height:34px;padding:0 10px;font-size:14px;font-weight:500;border-width:1px}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn.danger{border-color:var(--accInk);color:var(--accInk)}
label{display:block;font-weight:600;font-size:14px;margin:14px 0 4px}
input[type=text],input[type=email],input[type=password],input[type=number],select{width:100%;min-height:44px;padding:8px 10px;border:1.5px solid var(--ink);border-radius:2px;background:var(--bg)}
.msg{border-left:3px solid var(--acc);background:var(--soft);padding:8px 12px;font-size:14px;margin:14px 0}
.msg.ok{border-color:var(--ok)}
.msg:empty{display:none}

/* sign in / register: one narrow column */
.auth{max-width:420px;margin:8vh auto 0;padding:0 20px 60px}
.auth .wordmark{font-size:34px;letter-spacing:-.02em;margin-bottom:2px}
.auth .wordmark b{color:var(--accInk);font-weight:800}
.auth .btn{width:100%;justify-content:center;margin-top:20px}
.auth p{font-size:14px}

/* lists and tables */
.tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0 0 14px}
.tools input[type=text],.tools select{width:auto;flex:1 1 220px;min-height:40px}
table.grid{width:100%;border-collapse:collapse;font-size:14px}
table.grid th{text-align:left;font-weight:600;padding:6px 8px;border-bottom:2px solid var(--ink);white-space:nowrap}
table.grid td{padding:8px;border-bottom:1px solid var(--line);vertical-align:middle}
table.grid td.num,table.grid th.num{text-align:right;font-variant-numeric:tabular-nums}
table.grid select{min-height:34px;padding:2px 6px;width:auto;border-width:1px}
.scroll{overflow-x:auto}
.rowbtns{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.empty{border:1px dashed var(--mut);padding:28px;text-align:center;color:var(--mut)}
.plist{list-style:none;margin:0;padding:0;border-top:2px solid var(--ink)}
.plist li{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:14px 4px;border-bottom:1px solid var(--line)}
.plist .pname{flex:1 1 280px}
.plist .pname a{font-weight:600;font-size:17px;text-decoration:none}
.plist .pname a:hover{text-decoration:underline}
.tabs2{display:flex;gap:2px;flex-wrap:wrap;border-bottom:2px solid var(--ink);margin:18px 0 20px}
.tabs2 button{background:none;border:0;padding:10px 14px;font-weight:600;color:var(--mut)}
.tabs2 button[aria-selected=true]{background:var(--ink);color:var(--bg)}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:0 0 18px}
.card{border:1px solid var(--line);padding:12px 14px}
.card b{display:block;font:800 30px/1.1 var(--fHead);font-variant-numeric:tabular-nums}
.card span{font-size:13px;color:var(--mut)}
.code{font:600 15px/1 ui-monospace,Menlo,Consolas,monospace;letter-spacing:.06em;background:var(--soft);padding:4px 8px;border-radius:2px;user-select:all}
.formrow{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0 14px;align-items:end;max-width:900px}
.formrow .btn{margin-top:14px}
.once{border:1.5px solid var(--ink);padding:12px 14px;margin:14px 0;background:var(--soft)}
.pillr{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;border:1px solid var(--line);border-radius:20px;padding:1px 7px;white-space:nowrap}
.pillr.off{color:var(--accInk);border-color:var(--accInk)}

/* ---------- the two looks: modern and retro ("Wizify") ----------
   js/theme.js puts data-skin="modern" or "retro" on <html>. Anything that
   belongs to one look only carries the class only-modern or only-retro
   (the wizard pictures, the Info and Exit pictures and the picture logo are
   retro; the text logo, the spinner and the "Sign out" text are modern).
   Without JavaScript there is no data-skin, and the modern look shows. */
html:not([data-skin=retro]) .only-retro{display:none!important}
html[data-skin=retro] .only-modern{display:none!important}

/* The Wizify button: the staff-waving wizard plus a word. Modern version here;
   theme.css redraws it as a raised button for the retro look. */
.wizify,.sitebar .wizify{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:2px 12px 2px 8px;border:1px solid var(--ink);border-radius:20px;background:var(--bg);color:var(--ink);font-weight:600;font-size:14px;line-height:1.2;white-space:nowrap}
.wizify:hover,.sitebar .wizify:hover{background:var(--ink);color:var(--bg);text-decoration:none}
.wizify picture{display:block;line-height:0;flex:none}
.wizify img{display:block;height:30px;width:auto}
/* a button that looks like a link (dark mode on the sign-in pages) */
.textbtn{background:none;border:0;padding:0;min-height:32px;font-size:14px;text-decoration:underline}

/* sign-in pages: the row under the form (Info link, dark mode, Wizify) */
.auth .foot{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;margin-top:22px;padding-top:14px;border-top:1px solid var(--line);font-size:14px}
.auth .foot .wizify{margin-left:auto}

/* the info page (/info) in the modern look */
.infohead p{margin:0 0 12px;max-width:75ch}
.infobox{border-left:3px solid var(--acc);background:var(--soft);padding:10px 14px;margin:12px 0}
.info ol,.info ul{padding-left:22px;max-width:80ch}.info li{margin:6px 0}
.infohead{margin-top:12px}
