/* Primer Training: the SBDC look for the portal. Loaded last, so it only re-skins: a painted restaurant behind every
   page (one painting per area), frosted cream cards, dark pill buttons, a tomato and sage palette, Instrument Serif and
   DM Sans. Markup, pages and flows are unchanged. Light only. */
@font-face{font-family:"Instrument Serif";src:url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Instrument Serif";src:url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"DM Sans";src:url("fonts/dm-sans-latin-wght-normal.woff2") format("woff2");font-weight:100 1000;font-display:swap}

:root{
  --bg:#f6f1e6; --surface:#fffdf7; --elevated:#fffdf7; --well:#efe8da; --tint:#faf6ec;
  --fg:#1e1b17; --ink:#1e1b17; --muted:#5f5a50; --subtle:#645f56;
  --border:#e6dfd0; --input:#9a917f; --rule:#e9e2d4; --hair:#ddd5c4;
  --accent:#1e1b17; --accent-hover:#34302a; --on-accent:#fffdf7; --accent-ink:#933b21; --accent-soft:#f5e1d7;
  --nav:#933b21; --ring:#a9472a;
  --tomato:#a9472a; --tomato-ink:#933b21; --tomato-soft:#f5e1d7;
  --sage:#4f6a44; --sage-soft:#e3ebdb;
  --gold:#b8892f; --gold-deep:#7a5a1a; --gold-soft:#f5ebd3;
  --saffron:#b8892f; --saffron-deep:#7a5a1a; --saffron-soft:#f5ebd3;
  --success:#4f6a44; --success-strong:#3e5636; --success-soft:#e3ebdb;
  --info:#4f6a44; --info-soft:#e3ebdb;
  --soft-line:#e8c4b6; --ok-line:#c3d3b8; --soon-line:#e6d2a4;
  --art:#a9472a; --art-hi:#b8892f;
  --display:"Instrument Serif",Georgia,"Times New Roman",serif;
  --sans:"DM Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --radius:16px; --r-ctl:12px;
  --glass:rgb(255 253 247 / .88); --glass-line:rgb(30 27 23 / .08);
  --lift:inset 0 1px 0 rgb(255 255 255 / .7),0 10px 28px -6px rgb(60 40 20 / .14),0 1px 2px rgb(30 27 23 / .07);
  --shadow-sm:var(--lift);
  --paint:url("img/primer/soft-linen-2560.webp");
}
html[data-paint="plaster"]{--paint:url("img/primer/soft-plaster-2560.webp")}
html[data-paint="kitchen"]{--paint:url("img/primer/kitchen-line-2560.webp")}
html[data-paint="prep"]{--paint:url("img/primer/prep-dish-2560.webp")}
html[data-paint="dining"]{--paint:url("img/primer/dining-room-2560.webp")}
@media (max-width:1280px){
  :root{--paint:url("img/primer/soft-linen-1280.webp")}
  html[data-paint="plaster"]{--paint:url("img/primer/soft-plaster-1280.webp")}
  html[data-paint="kitchen"]{--paint:url("img/primer/kitchen-line-1280.webp")}
  html[data-paint="prep"]{--paint:url("img/primer/prep-dish-1280.webp")}
  html[data-paint="dining"]{--paint:url("img/primer/dining-room-1280.webp")}
}
/* on a phone the trainee home sits in the dining room, like the mockup */
@media (max-width:700px){html[data-paint="linen"]{--paint:url("img/primer/dining-room-1280.webp")}}

html{background:var(--bg);font-synthesis-weight:none}
body{background:transparent;font-family:var(--sans)}
/* the painting stays put while the page scrolls; a warm 12% tint keeps cards apart from it */
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(rgb(107 79 58 / .12),rgb(107 79 58 / .12)),var(--site-paint,var(--paint)) 50% 50%/cover no-repeat,var(--bg)}

h1,h2,h3{font-family:var(--display);font-weight:400;letter-spacing:-.01em;font-variation-settings:normal}
h1{font-size:clamp(34px,3.8vw,50px);line-height:1.02}
h2{font-size:clamp(23px,2.2vw,28px);line-height:1.12}
h3{font:400 21px/1.2 var(--display)}
.card-head h2{font-size:25px}
.eyebrow{font:600 12px/1.25 var(--sans);letter-spacing:.12em;text-transform:uppercase;color:var(--tomato-ink)}
.side-eyebrow{color:var(--subtle)}
a{color:var(--nav)}
::selection{background:var(--tomato-soft)}
:focus-visible{outline-color:var(--ring)}

/* ---------- glass: every card floats on the painting ---------- */
.card,.page-band-in,.go-card,a.onb-link,.lcard,.toc,.side-card,.deck,.walk,.qcard,.cert,.practice,.ticket,.pin-list,
.pack-home,.dept-box,.pos-card,.quiz-row,.builder-prev,.modal>div,.modal>form,.gate-pop form,.menu,.p-menu,.pack-pop{
  background:var(--glass);border:1px solid var(--glass-line);border-radius:var(--radius);box-shadow:var(--lift);
  -webkit-backdrop-filter:blur(14px) saturate(1.25);backdrop-filter:blur(14px) saturate(1.25);
}
.go-card{border-left:1px solid var(--glass-line)}
/* "Up next" is one cream panel like the mockup, its lesson cards solid inside it */
.upnext{padding:18px 20px 20px;border:1px solid var(--glass-line);border-radius:var(--radius);background:var(--glass);box-shadow:var(--lift);
  -webkit-backdrop-filter:blur(14px) saturate(1.25);backdrop-filter:blur(14px) saturate(1.25)}
.upnext .lcard{background:var(--surface);box-shadow:none;border-color:var(--border);-webkit-backdrop-filter:none;backdrop-filter:none}
/* folds sit straight on the page: give each one its own glass so the summary never reads off the painting */
details.fold:not(.tight){padding:0 18px;border:1px solid var(--glass-line);border-radius:var(--radius);background:var(--glass);box-shadow:var(--lift);
  -webkit-backdrop-filter:blur(14px) saturate(1.25);backdrop-filter:blur(14px) saturate(1.25)}
details.fold:not(.tight)+details.fold:not(.tight){border-top:1px solid var(--glass-line);margin-top:8px}
.card details.fold:not(.tight),.side-card details.fold:not(.tight),.deck details.fold:not(.tight){padding:0;border:0;border-block:1px solid var(--hair);border-radius:0;background:transparent;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
.go-card.done{border-left-color:var(--glass-line)}
.go-img,.go-img.art-box{background:var(--tint);border-radius:12px}
a.onb-link:hover{background:var(--surface);border-color:var(--input)}
.card-head{border-bottom-color:var(--rule)}

/* ---------- chrome: a floating frosted rail and a frosted top bar ---------- */
.shell:not(.out){background:transparent}
.topbar{background:rgb(255 253 247 / .78);-webkit-backdrop-filter:blur(14px) saturate(1.25);backdrop-filter:blur(14px) saturate(1.25);border-bottom:1px solid var(--glass-line)}
.subnav,.foot{background:transparent}
.subnav a[aria-current]{border-bottom-color:var(--tomato)}
.wordmark,.side-brand span,.brand b{font-family:var(--display);font-weight:400}
.wordmark{font-size:22px}
.brand .wordmark .word{display:inline;font:400 22px/1 var(--display);color:var(--fg);white-space:nowrap}
.wordmark .mark,.side-brand .mark{width:32px;height:32px;padding:0;border-radius:50%;background:none}
.me-ini,.nbadge{background:var(--tomato-soft);color:var(--tomato-ink)}
.nbadge{background:var(--tomato);color:#fffdf7}
.iconbtn{background:var(--surface);border-color:var(--input);border-radius:999px}
.page-band{background:none!important;border-bottom:0;margin-bottom:8px}
.page-band::after{display:none}
.page-band-in{background:var(--glass)}

@media (min-width:1024px){
  .shell:not(.out){grid-template-columns:284px minmax(0,1fr)}
  html:not(.present) .shell:not(.out):not(:has(>.rail[hidden])){background:transparent}
  .shell:not(.out) .rail{
    top:16px;height:calc(100vh - 32px);margin:16px 0 16px 16px;padding:22px 14px 18px;border-radius:18px;
    background:rgb(255 253 247 / .87);border:1px solid var(--glass-line);box-shadow:inset 0 1px 0 rgb(255 255 255 / .7),0 12px 32px -6px rgb(60 40 20 / .14),0 1px 2px rgb(30 27 23 / .07);
    -webkit-backdrop-filter:blur(24px) saturate(1.25);backdrop-filter:blur(24px) saturate(1.25);
  }
  .me{background:var(--surface);border-color:var(--border);border-radius:999px}
  .side-brand{gap:10px}
  .side-brand span{font-size:20px;line-height:1.05;white-space:nowrap;overflow:visible}
  .side-brand i{border-color:var(--input);color:var(--muted)}
  .rail .nav a{border-left:0;border-radius:12px;padding:0 14px;color:var(--fg);font:500 15px/1 var(--sans)}
  .rail .nav a .ico{color:var(--muted)}
  .rail .nav a:hover{background:rgb(30 27 23 / .05);color:var(--fg)}
  .rail .nav a[aria-current]{background:var(--ink);color:#fffdf7;font-weight:600}
  .rail .nav a[aria-current] .ico{color:#fffdf7}
  .rail .nav a[aria-current] .nbadge{background:#fffdf7;color:var(--ink)}
  .rail-extra{border-top-color:var(--rule)}
  .quick:hover{color:var(--tomato-ink)}
  .shell.employee:not(.out) .rail::after{background:#e9dcc6 url("img/primer/dining-room-1280.webp") 70% 50%/cover no-repeat;border-radius:12px}
  html:not(.present) .shell:not(.out) .topbar{margin:16px 16px 0;border-radius:18px;border:1px solid var(--glass-line);box-shadow:var(--lift);top:16px}
  html:not(.present) .shell:not(.out) .topbar .subnav a{min-height:58px}
  html:not(.present) .shell:not(.out) .topbar .top-in{min-height:58px}
  html:not(.present) .shell:not(.out) .toc,html:not(.present) .shell:not(.out) .practice,html:not(.present) .shell:not(.out) .summary-card{top:100px}
}
@media (max-width:1023px){
  .shell:not(.out):not(.drawer-open) .rail{background:rgb(255 253 247 / .92);-webkit-backdrop-filter:blur(18px) saturate(1.25);backdrop-filter:blur(18px) saturate(1.25);border-top:1px solid var(--glass-line)}
  .shell:not(.out):not(.drawer-open) .rail .nav a{border-radius:12px;color:var(--muted)}
  .shell:not(.out):not(.drawer-open) .rail .nav a[aria-current]{background:var(--ink);color:#fffdf7;box-shadow:none}
  .shell.drawer-open:not(.out) .rail{background:var(--surface)}
  .shell.drawer-open .rail .nav a[aria-current]{background:var(--ink);color:#fffdf7;border-left-color:transparent}
}

/* ---------- controls ---------- */
.toast-msg.err{border-left-color:var(--tomato)}
@media (min-width:1024px){.subnav>div{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent);padding-right:32px}}
.btn{border-radius:999px;font-family:var(--sans)}
.btn.small{border-radius:999px}
.btn:hover{color:#fffdf7}
.btn.ghost{background:rgb(255 253 247 / .9);border-color:var(--input);color:var(--fg)}
.btn.ghost:hover{background:var(--surface);border-color:var(--fg);color:var(--fg)}
.btn.act-danger{background:rgb(255 253 247 / .9)}
input,select,textarea{background:#fffdf7;border-color:var(--input);border-radius:12px}
input:focus,select:focus,textarea:focus{border-color:var(--tomato);box-shadow:0 0 0 3px rgb(169 71 42 / .18)}
.link{color:var(--nav)}
.cchip,.ptag,.badge,.stage{border-radius:999px;background:var(--well);border-color:transparent}
.cchip.ok,.ptag.ok,.badge.ok,.stage.s-done{border-color:transparent}
.cchip.soon,.ptag.soon,.badge.soon,.stage.s-learning{border-color:transparent}
.cchip.bad,.ptag.bad,.badge.bad{background:var(--tomato-soft);color:var(--tomato-ink);border-color:transparent}
.cchip.info,.ptag.info,.stage.s-invite,.stage.s-floor{border-color:transparent}
.seg{border-radius:999px;background:rgb(255 253 247 / .8)}
.seg button{border-radius:999px}
.seg button[aria-selected="true"]{background:var(--ink);color:#fffdf7}
.bar,div.presbar{height:6px;border-radius:6px;background:#e6dfd0}
.bar i,div.presbar i{background:var(--sage);border-radius:6px}
.gstat,.stat-tile,.prog .stat{background:rgb(255 253 247 / .9);border:1px solid var(--glass-line);border-radius:14px;padding:14px 18px 16px;box-shadow:none}
.gstat.hot,.stat-tile.hot,.prog .stat.bad{box-shadow:inset 0 2px 0 var(--tomato)}
.gstat span,.stat-tile span,.prog .stat span{font:600 11.5px/1.25 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--subtle)}
.gstat b,.stat-tile b,.prog .stat b{font:400 34px/1.05 var(--display)}
.toc button[aria-current="true"]{border-left-color:var(--tomato);background:var(--tomato-soft)}
.toc button span .ico{color:var(--sage)}

/* the quiz PIN screen is the kitchen tablet moment: a big ticket on the prep painting */
.form-ticket{padding:28px 30px}
.pin-input{font:500 28px/1 var(--sans);letter-spacing:.4em;text-align:center}

/* no backdrop blur: solid cream so text never sits on a busy painting */
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  .card,.page-band-in,.go-card,a.onb-link,.lcard,.toc,.side-card,.deck,.walk,.qcard,.cert,.practice,.ticket,.pin-list,
  .pack-home,.dept-box,.pos-card,.quiz-row,.builder-prev,.modal>div,.modal>form,.gate-pop form,.menu,.p-menu,.pack-pop,
  .topbar,.shell:not(.out) .rail,details.fold:not(.tight),.shell:not(.out) .foot,.upnext{background:rgb(255 253 247 / .97)}
}
@media print{
  body::before{display:none}
  .card,.page-band-in{box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;background:#fff}
}

/* ---------- sign-in and join: the dining room for staff, the host stand for managers ---------- */
.shell.out:has(.auth){background:#e9dcc6}
.auth{
  --ink:#1e1b17; --muted:#5f5a50; --faint:#645f56; --card:#fffdf7; --border:#e6dfd0; --line:#9a917f;
  --gold:#b8892f; --gold-hover:#c99a40; --gold-deep:#933b21; --plum:#933b21; --glass:255 253 247;
  --sans:"DM Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  background:#e9dcc6;font-synthesis-weight:none;
}
.auth-hero img{object-position:62% 50%}
.auth::before{background:linear-gradient(rgb(107 79 58 / .12),rgb(107 79 58 / .12))}
.auth::after{display:none}
.auth :focus-visible{outline-color:#a9472a}
.auth-col{
  background:rgb(255 253 247 / .9);border:1px solid rgb(30 27 23 / .08);border-radius:18px;
  -webkit-backdrop-filter:blur(14px) saturate(1.25);backdrop-filter:blur(14px) saturate(1.25);
  box-shadow:inset 0 1px 0 rgb(255 255 255 / .7),0 18px 40px -10px rgb(60 40 20 / .2),0 1px 2px rgb(30 27 23 / .07);
}
.auth-wordmark{font:400 22px/1 "Instrument Serif",Georgia,serif}
.auth-wordmark .mark{width:32px;height:32px}
.auth .eyebrow,.auth.role-admin .eyebrow{color:#933b21;letter-spacing:.12em;font-size:12px}
.auth .eyebrow::before{display:none}
.auth h1{font-family:"Instrument Serif",Georgia,serif;font-variation-settings:normal;letter-spacing:-.01em;font-size:clamp(34px,3.4vw,44px);line-height:1.02}
.auth-form input:not([type="checkbox"]){background:#fffdf7;border-color:#9a917f;border-radius:12px}
.auth-form input::placeholder{color:#76736a}
.auth-form input:focus{border-color:#a9472a;box-shadow:0 0 0 3px rgb(169 71 42 / .18)}
.auth-check input{accent-color:#a9472a}
.auth .btn{border-radius:999px;border-color:#9a917f}
.auth.role-employee .btn.auth-main,.auth.role-admin .btn.auth-main{background:#1e1b17;border-color:#1e1b17;color:#fffdf7}
.auth.role-employee .btn.auth-main:hover,.auth.role-admin .btn.auth-main:hover{background:#34302a;border-color:#34302a}
.auth .err{color:#933b21}
.auth-panel{
  color:#1e1b17;background:rgb(255 253 247 / .86);border:1px solid rgb(30 27 23 / .08);border-radius:16px;
  -webkit-backdrop-filter:blur(14px) saturate(1.25);backdrop-filter:blur(14px) saturate(1.25);
  box-shadow:inset 0 1px 0 rgb(255 255 255 / .7),0 10px 28px -6px rgb(60 40 20 / .14);
}
.auth-panel h2{font-family:"Instrument Serif",Georgia,serif;font-variation-settings:normal;color:#1e1b17;letter-spacing:-.01em}
.auth-panel h2::before{background:#a9472a;height:2px}
.auth-panel p{color:#5f5a50}
.auth .preview-bar{background:rgb(30 27 23 / .92);color:#fffdf7}
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  .auth-col,.auth-panel{background:rgb(255 253 247 / .97)}
}

/* ---------- onboarding (public, before sign-in): the dining room behind a cream glass bar ---------- */
html.onb.present{
  --bg:#f6f1e6; --surface:#fffdf7; --elevated:#fffdf7; --well:#efe8da; --tint:#faf6ec;
  --fg:#1e1b17; --ink:#1e1b17; --muted:#5f5a50; --subtle:#645f56;
  --border:#e6dfd0; --input:#9a917f; --rule:#e9e2d4;
  --accent:#1e1b17; --accent-hover:#34302a; --accent-ink:#933b21; --accent-soft:#f5e1d7;
  --nav:#933b21; --ring:#a9472a; --success:#4f6a44; --success-strong:#3e5636; --success-soft:#e3ebdb;
  --sans:"DM Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --shadow-sm:var(--lift);
  --paint:url("img/primer/dining-room-2560.webp");
}
@media (max-width:1280px){html.onb.present{--paint:url("img/primer/dining-room-1280.webp")}}
html.onb.present body{background:transparent}
html.onb.present .topbar{
  margin:12px clamp(12px,2vw,20px) 0;border-radius:18px;color:var(--fg);
  background:rgb(255 253 247 / .82);border:1px solid var(--glass-line);box-shadow:var(--lift);
  -webkit-backdrop-filter:blur(14px) saturate(1.25);backdrop-filter:blur(14px) saturate(1.25);
}
html.onb.present .onb-brand{color:var(--fg);font:400 22px/1 var(--display)}
html.onb.present nav.presbar{background:rgb(30 27 23 / .05);border-color:var(--glass-line);border-radius:999px}
html.onb.present nav.presbar>a.tab{color:var(--fg);border-radius:999px}
html.onb.present nav.presbar>a.tab[aria-current="true"]{background:var(--ink);color:#fffdf7}
html.onb.present nav.presbar .iconbtn{color:var(--fg);border-radius:999px}
html.onb.present nav.presbar .iconbtn:hover{background:rgb(30 27 23 / .08);color:var(--fg)}
html.onb.present .deck-bar i{background:var(--tomato)}
html.onb.present .deck-nav .arrow{border-radius:999px}

/* footer text sits on the painting: give it a cream strip so it stays readable */
.shell:not(.out) .foot{background:rgb(255 253 247 / .86);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-top:1px solid var(--glass-line)}
