/* Shared look for the licences and admin pages. Same colours as the book:
   the black bar with the yellow tape strip, and yellow main buttons. */
:root{
  --paper:#E9ECEE; --surface:#FBFCFC; --surface2:#F0F3F4;
  --ink:#141A1E; --ink2:#4E5A62; --rule:#D5DADD;
  --navy:#1B1B1B; --navy-ink:#FFFFFF; --blue:#12558E; --blue-soft:#E3EDF5;
  --pri:#FFC72C; --pri-ink:#1B1B1B;
  --copper:#A8551F; --warn:#8E3019; --warn-soft:#F8E6E1; --ok:#2F6B4F; --ok-soft:#E3F1E9;
  --f:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --paper:#0E1113; --surface:#171B1E; --surface2:#1F2428;
    --ink:#E8EBEC; --ink2:#98A4AB; --rule:#2A3135;
    --navy:#1B1B1B; --navy-ink:#FFFFFF; --blue:#7FB6E2; --blue-soft:#15293A;
    --copper:#E0946A; --warn:#EC8A70; --warn-soft:#2E1A15; --ok:#72BC99; --ok-soft:#16281F;
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
    --paper:#0E1113; --surface:#171B1E; --surface2:#1F2428;
    --ink:#E8EBEC; --ink2:#98A4AB; --rule:#2A3135;
    --navy:#1B1B1B; --navy-ink:#FFFFFF; --blue:#7FB6E2; --blue-soft:#15293A;
    --copper:#E0946A; --warn:#EC8A70; --warn-soft:#2E1A15; --ok:#72BC99; --ok-soft:#16281F;
    color-scheme:dark;
  }
:root[data-theme="light"]{color-scheme:light}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.5 var(--f);-webkit-text-size-adjust:100%}
.bar{position:relative;background:var(--navy);color:var(--navy-ink);padding:calc(10px + env(safe-area-inset-top,0px)) 16px 17px;display:flex;align-items:center;gap:12px}
.bar a{color:var(--navy-ink);text-decoration:none;font-weight:700;font-size:15px}
.bar .t{font-weight:800;font-size:17px;flex:1}
.bar .t::before{content:"";display:inline-block;width:24px;height:24px;margin-right:8px;vertical-align:-6px;border-radius:6px;background:url(/icon.svg) center/cover}
.bar::after{content:"";position:absolute;left:0;right:0;bottom:0;height:7px;
  background:repeating-linear-gradient(90deg,#1B1B1B 0 1px,transparent 1px 32px) 0 0/100% 5px no-repeat,
    repeating-linear-gradient(90deg,#1B1B1B 0 1px,transparent 1px 16px) 0 0/100% 3.5px no-repeat,
    repeating-linear-gradient(90deg,#1B1B1B 0 1px,transparent 1px 4px) 0 0/100% 2px no-repeat,#FFC72C}
main{max-width:640px;margin:0 auto;padding:16px 16px 48px}
h1{font-size:24px;line-height:1.2;margin:8px 0 6px}
h2{font-size:18px;margin:26px 0 8px}
p{margin:0 0 12px}
.lead{color:var(--ink2)}
.card{background:var(--surface);border:1px solid var(--rule);border-radius:12px;padding:16px;margin:0 0 14px}
label{display:block;font-weight:700;font-size:14px;margin:10px 0 4px}
.keepme{display:flex;align-items:center;gap:10px;min-height:44px;margin:12px 0 0;font-weight:600;font-size:15px;cursor:pointer}
.keepme input{width:22px;height:22px;min-height:0;margin:0;padding:0;flex:none}
input,select,textarea{width:100%;min-height:46px;font:inherit;font-size:17px;padding:8px 10px;border:1px solid var(--rule);border-radius:8px;background:var(--surface2);color:var(--ink)}
textarea{min-height:96px}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 16px;border-radius:9px;border:1px solid var(--rule);background:var(--surface2);color:var(--ink);font:inherit;font-weight:700;font-size:15px;cursor:pointer;text-decoration:none}
.btn.pri{background:var(--pri);border-color:var(--pri);color:var(--pri-ink)}
.btn.wide{width:100%;margin-top:12px}
.btn.sm{min-height:36px;padding:0 10px;font-size:13.5px}
.btn:disabled{opacity:.55}
.msg{padding:10px 12px;border-radius:8px;background:var(--blue-soft);margin:12px 0 0}
.msg.warn{background:var(--warn-soft);color:var(--warn)}
.msg.ok{background:var(--ok-soft);color:var(--ok)}
.price{font-size:30px;font-weight:800}
.price small{font-size:15px;font-weight:600;color:var(--ink2)}
.muted{color:var(--ink2);font-size:14px}
.pill{display:inline-block;padding:2px 8px;border-radius:99px;font-size:12px;font-weight:800;letter-spacing:.02em;text-transform:uppercase;background:var(--surface2);border:1px solid var(--rule)}
.pill.ok{background:var(--ok-soft);color:var(--ok);border-color:transparent}
.pill.warn{background:var(--warn-soft);color:var(--warn);border-color:transparent}
.meter{height:10px;border-radius:99px;background:var(--surface2);border:1px solid var(--rule);overflow:hidden;margin:6px 0 4px}
.meter i{display:block;height:100%;background:var(--blue)}
.people{list-style:none;margin:0;padding:0}
.people li{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:10px 0;border-top:1px solid var(--rule)}
.people .who{flex:1 1 200px;min-width:0;overflow-wrap:anywhere}
.people .who b{display:block;font-size:15px}
.row{display:flex;gap:10px;flex-wrap:wrap}
.row>*{flex:1 1 140px}
.code{font:800 26px ui-monospace,Menlo,Consolas,monospace;letter-spacing:4px}
ul.ticks{padding-left:20px;margin:0 0 12px}
a{color:var(--blue)}

/* quiz question pictures (src/qfig), drawn with the book's figure classes */
.qfig{margin:0 0 10px;padding:8px 8px 6px;background:var(--surface2);border:1px solid var(--rule);border-radius:8px}
.qfig svg{display:block;width:100%;max-width:460px;height:auto;margin:0 auto;color:var(--ink2)}
.qfig svg text{font-family:ui-monospace,"SF Mono",Menlo,Consolas,"Roboto Mono",monospace;font-size:9.5px;font-weight:400;fill:currentColor}
.qfig svg text.big{font-size:11.5px;font-weight:600}
.qfig svg text.cop{fill:var(--copper);font-weight:600}
.qfig svg text.wrn{fill:var(--warn);font-weight:600}
.qfig svg text.blu{fill:var(--blue);font-weight:600}
.qfig svg text.ink{fill:var(--ink);font-weight:600}
.qfig svg .steel{fill:currentColor;fill-opacity:.15;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
.qfig svg .thin{fill:none;stroke:currentColor;stroke-width:1}
.qfig svg .dash{fill:none;stroke:currentColor;stroke-width:1;stroke-dasharray:4 3;opacity:.5}
.qfig svg .halo{paint-order:stroke;stroke:var(--surface2);stroke-width:3px;stroke-linejoin:round}
@media print{.qfig{break-inside:avoid}}

/* ---- the book's look on the dashboard (look.js): text size, gloves mode,
   the book's bottom bar, the Look sheet, and a soft hand-over ---- */
html.hasbar main{zoom:var(--ffz,1)}
html.hasbar body{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))}
html.hasbar #toast{bottom:calc(76px + env(safe-area-inset-bottom,0px))}
.ffbar{position:fixed;left:0;right:0;bottom:0;z-index:15;background:var(--surface);border-top:1px solid var(--rule);
  display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);
  padding:0 max(4px,env(safe-area-inset-left,0px)) env(safe-area-inset-bottom,0px) max(6px,env(safe-area-inset-right,0px));box-shadow:0 -4px 14px rgba(0,0,0,.06)}
.ffbar button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:56px;border:0;background:transparent;
  color:var(--ink2);font:700 10px/1.2 var(--f);letter-spacing:.02em;cursor:pointer;padding:6px 0 5px;white-space:nowrap;-webkit-tap-highlight-color:transparent}
.ffbar svg{width:22px;height:22px;display:block}
.ffbar button.on{color:#C8102E}
.ffbar button.on::before{content:"";position:absolute;top:0;left:22%;right:22%;height:3px;border-radius:0 0 3px 3px;background:currentColor}
.ffbar button:active{background:var(--surface2)}
.ffbar button:focus-visible{outline:2px solid var(--blue);outline-offset:-3px}
/* the same top line as the book's bar, so the hand-over from the app shows no change */
.ffbar{border-top-color:#B6BEC3}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .ffbar{border-top-color:#3C454A}}
:root[data-theme="dark"] .ffbar{border-top-color:#3C454A}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .ffbar button.on{color:var(--pri)}}
:root[data-theme="dark"] .ffbar button.on{color:var(--pri)}
@media (max-width:360px){.ffbar button{font-size:9px;letter-spacing:0}.ffbar svg{width:20px;height:20px}}
.fflk-open{margin-left:auto;flex:none;min-width:40px;min-height:36px;border:1px solid rgba(255,255,255,.35);border-radius:8px;background:transparent;color:var(--navy-ink);font:800 15px/1 var(--f);cursor:pointer}
.fflk-open:focus-visible{outline:2px solid var(--pri);outline-offset:2px}
#fflk{position:fixed;inset:0;z-index:30;display:flex;align-items:flex-end;justify-content:center}
#fflk .fflk-bg{position:absolute;inset:0;background:rgba(0,0,0,.45)}
#fflk .fflk-box{position:relative;width:100%;max-width:520px;background:var(--surface);color:var(--ink);border-radius:16px 16px 0 0;
  padding:18px max(16px,env(safe-area-inset-left,0px)) calc(20px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-right,0px));box-shadow:0 -8px 30px rgba(0,0,0,.25)}
#fflk h2{margin:0 0 4px;font-size:19px}
#fflk h3{margin:16px 0 6px;font-size:14px;color:var(--ink2);text-transform:uppercase;letter-spacing:.05em}
.fflk-x{position:absolute;top:8px;right:8px;width:44px;height:44px;border:0;background:none;color:var(--ink2);font-size:28px;cursor:pointer}
.fflk-seg{display:flex;gap:4px;background:var(--surface2);border-radius:10px;padding:4px}
.fflk-seg button{flex:1;min-height:42px;border:0;border-radius:8px;background:none;color:var(--ink2);font:inherit;font-weight:700;font-size:14.5px;cursor:pointer}
.fflk-seg button[aria-checked="true"]{background:var(--pri);color:var(--pri-ink)}
.gloves .btn,.gloves .fflk-seg button{min-height:56px}
.gloves .tabs button{min-height:52px}
.gloves .it{padding:16px 12px}
.gloves .ffbar button{min-height:64px;font-size:10.5px}
.gloves input,.gloves select{min-height:54px}
/* while the dashboard loads: the shape of the page, not a blank screen */
.skel{display:grid;gap:10px;padding-top:8px}
.skel i{display:block;border-radius:10px;background:var(--surface2);border:1px solid var(--rule)}
.skel .h{height:28px;width:60%}.skel .s{height:16px;width:40%;border:0}
.skel .g{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.skel .g i{height:58px}
.skel .t{height:48px}.skel .r{height:62px}
@media (prefers-reduced-motion:no-preference){.skel i{animation:skel 1.2s ease-in-out infinite alternate}}
@keyframes skel{to{opacity:.55}}
@media print{.ffbar,.fflk-open{display:none!important}html.hasbar body{padding-bottom:0}}

/* ---- desktops and laptops use the whole screen (1100px and wider) ----
   The book's bottom bar becomes a side panel on the left, as it does in the
   book, and the dashboards get wider. Phones and tablets held upright are
   unchanged. body.wide is set on the owner, admin and sales dashboards. */
@media (min-width:1100px){
  html.hasbar body{padding-bottom:0;padding-left:232px}
  html.hasbar .bar{position:sticky;top:0;z-index:16;margin-left:-232px}
  html.hasbar main .lead,body.wide main .lead{max-width:72ch}
  html.hasbar .ffbar{top:0;right:auto;width:232px;box-sizing:border-box;display:flex;flex-direction:column;gap:2px;
    padding:76px 10px 16px;border-top:0;border-right:1px solid var(--rule);box-shadow:none;z-index:15}
  html.hasbar .ffbar button{flex-direction:row;justify-content:flex-start;gap:12px;min-height:42px;padding:0 12px;border-radius:8px;font-size:14px;letter-spacing:0}
  html.hasbar .ffbar button:hover{background:var(--surface2)}
  html.hasbar .ffbar button.on{background:var(--surface2)}
  html.hasbar .ffbar button.on::before{top:9px;bottom:9px;left:0;right:auto;width:3px;height:auto;border-radius:0 3px 3px 0}
  html.hasbar .ffbar svg{width:20px;height:20px}
  html.hasbar #toast{bottom:24px}
  html.hasbar main,body.wide main{max-width:1040px;padding:24px 32px 56px}
  .gloves .ffbar button{min-height:52px}
}
@media (min-width:1500px){
  html.hasbar main,body.wide main{max-width:1180px}
}
