
/* Keep hidden dialogs and panels closed despite their layout styles. */
[hidden]{display:none!important}

/* ---------- tokens ---------- */
:root{
  --ground:#F4F6F9; --surface:#FFFFFF; --surface-2:#EDF1F6; --surface-3:#E4EAF2;
  --line:#D4DCE6; --line-strong:#AFBCCB;
  --ink:#0F1822; --ink-2:#3C4A5A; --ink-3:#6B7A8C;
  --accent:#1B5AA0; --accent-hi:#17497F; --accent-soft:#E3EDF9; --on-accent:#FFFFFF;
  --ok:#1A6E4A; --ok-soft:#E0F0E8;
  --warn:#8A5A06; --warn-soft:#FAEEDA;
  --bad:#A32319; --bad-soft:#FBE6E3;
  --shadow:0 1px 2px rgba(15,24,34,.06), 0 4px 14px rgba(15,24,34,.05);
  --r:10px;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --ground:#0C1118; --surface:#141B24; --surface-2:#1B242F; --surface-3:#222D3A;
    --line:#26313D; --line-strong:#3E4C5C;
    --ink:#E8EEF5; --ink-2:#AEBBC9; --ink-3:#7F8D9E;
    --accent:#5DA0EC; --accent-hi:#7DB5F2; --accent-soft:#16283C; --on-accent:#0A0F15;
    --ok:#5DC79A; --ok-soft:#12291F;
    --warn:#E0A752; --warn-soft:#2B2113;
    --bad:#F08579; --bad-soft:#2F1714;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"]{
  --ground:#0C1118; --surface:#141B24; --surface-2:#1B242F; --surface-3:#222D3A;
  --line:#26313D; --line-strong:#3E4C5C;
  --ink:#E8EEF5; --ink-2:#AEBBC9; --ink-3:#7F8D9E;
  --accent:#5DA0EC; --accent-hi:#7DB5F2; --accent-soft:#16283C; --on-accent:#0A0F15;
  --ok:#5DC79A; --ok-soft:#12291F;
  --warn:#E0A752; --warn-soft:#2B2113;
  --bad:#F08579; --bad-soft:#2F1714;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
}

*{box-sizing:border-box}
body{
  margin:0; background:var(--ground); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;
  font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased;
}
h1,h2,h3{margin:0; text-wrap:balance; font-weight:600; letter-spacing:-.01em}
button,input,select,textarea{font:inherit; color:inherit}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:4px}

/* ---------- app bar ---------- */
.bar{
  position:sticky; top:env(safe-area-inset-top,0px); z-index:50;
  background:var(--surface); border-bottom:1px solid var(--line);
}
.bar-in{max-width:none; margin:0 auto; padding:10px 20px; display:flex; align-items:center; gap:16px; flex-wrap:wrap}
.brand{display:flex; align-items:baseline; gap:9px; margin-right:auto}
.roster-bar{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-left:auto}
@media (max-width:760px){ .roster-bar{width:100%; margin-left:0} }
.brand b{font-size:16px; font-weight:700; letter-spacing:-.02em}
.brand span{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:12px; font-weight:600;
  text-transform:uppercase; letter-spacing:.1em; color:var(--ink-3);
}
.ver{
  border:1px solid var(--line-strong); background:var(--surface-2); color:var(--ink-3);
  font-size:11px; font-weight:600; padding:1px 7px; border-radius:999px; cursor:pointer;
  line-height:1.5; align-self:center;
}
.ver:hover{border-color:var(--accent); color:var(--accent)}
#changelog-body{max-height:300px; overflow-y:auto; padding-right:4px}
.cl-ver{margin:0 0 3px; display:flex; align-items:baseline; gap:7px}
.cl-ver h3{font-size:13px; font-weight:700}
.cl-ver .cl-date{font-size:10.5px; color:var(--ink-3)}
.cl-list{margin:0 0 12px; padding-left:17px}
.cl-list li{font-size:12px; line-height:1.4; color:var(--ink-2); margin:2px 0}
.acct-sec{font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-3); margin:0 0 8px; padding-bottom:6px; border-bottom:1px solid var(--line)}
.acct-msg{font-size:12px; line-height:1.4; margin-top:8px; min-height:0}
.acct-msg.ok{color:var(--ok)} .acct-msg.err{color:var(--bad)}
.crew-updated{font-size:12px; color:var(--ink-2); background:var(--surface-2); border:1px solid var(--line); border-radius:8px; padding:8px 11px}
.crew-updated b{color:var(--ink); font-weight:600}
.crew-updated .cu-abs{color:var(--ink-3)}
.tabs{display:flex; gap:2px; background:var(--surface-2); padding:3px; border-radius:8px}
.tab{
  border:0; background:transparent; color:var(--ink-2); cursor:pointer;
  padding:6px 13px; border-radius:6px; font-size:13px; font-weight:500;
}
.tab:hover{color:var(--ink)}
.tab[aria-selected="true"]{background:var(--surface); color:var(--ink); box-shadow:var(--shadow); font-weight:600}

.chip{
  display:inline-flex; align-items:center; gap:7px; padding:5px 11px; border-radius:999px;
  font-size:12px; font-weight:600; white-space:nowrap; border:1px solid transparent;
}
.chip .dot{width:7px; height:7px; border-radius:50%; background:currentColor; flex:none}
.chip.ok{background:var(--ok-soft); color:var(--ok); border-color:color-mix(in srgb,var(--ok) 25%,transparent)}
.chip.bad{background:var(--bad-soft); color:var(--bad); border-color:color-mix(in srgb,var(--bad) 25%,transparent)}
.chip.warn{background:var(--warn-soft); color:var(--warn); border-color:color-mix(in srgb,var(--warn) 28%,transparent)}
.chip.mute{background:var(--surface-2); color:var(--ink-3); border-color:var(--line)}

/* ---------- layout ---------- */
main{max-width:none; margin:0 auto; padding-inline:20px; padding-block:22px 64px}
/* Phone layout: tighter gutters, a scrollable tab strip, more room for the tabs */
@media (max-width:600px){
  main{padding-inline:16px; padding-block:16px 48px}
  .bar-in{padding:10px 14px; gap:8px 12px}
  .brand{margin-right:0; width:100%}
  .brand b{font-size:15px}
  .brand span{display:none}
  .ver{margin-left:auto}
  .tabs{order:2; width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; flex-wrap:nowrap; scrollbar-width:none}
  .tabs::-webkit-scrollbar{display:none}
  .tab{padding:8px 13px; white-space:nowrap}
  .cols{gap:14px}
  .stack{gap:14px}
}
.panel{background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow)}
.panel-hd{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding:13px 16px; border-bottom:1px solid var(--line);
}
.panel-hd h2{font-size:14px; font-weight:600}
.panel-hd .sub{font-size:12px; color:var(--ink-3); margin-right:auto}
.panel-bd{padding:16px}
.cols{display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:18px; align-items:start}
.stack{display:flex; flex-direction:column; gap:18px}
@media (max-width:880px){ .cols{grid-template-columns:1fr} }

/* collapsible panels */
.panel-hd .caret{
  border:0; background:transparent; cursor:pointer; color:var(--ink-3);
  padding:4px 6px; border-radius:6px; line-height:1; font-size:12px; margin-left:auto;
}
.panel-hd .caret:hover{background:var(--surface-2); color:var(--ink)}
.panel-hd .caret svg{display:block; transition:transform .16s}
.panel.collapsed .panel-hd{border-bottom:0}
/* hide everything in a collapsed panel except its header (some bodies set
   display:flex inline, so !important is needed to win) */
.panel.collapsed > *:not(.panel-hd){display:none !important}
.panel.collapsed .caret svg{transform:rotate(-90deg)}
.panel-hd h2{cursor:default}
@media (prefers-reduced-motion:reduce){ .panel-hd .caret svg{transition:none} }

/* ---------- fields ---------- */
.grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(168px,1fr)); gap:13px}
.f{display:flex; flex-direction:column; gap:5px; min-width:0}
.f.span2{grid-column:span 2}
@media (max-width:560px){ .f.span2{grid-column:span 1} }
label.lb{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:12px; font-weight:600;
  text-transform:uppercase; letter-spacing:.075em; color:var(--ink-2);
  display:flex; align-items:center; gap:6px;
}
label.lb .req{color:var(--bad); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; letter-spacing:0}
.hint{font-size:11px; color:var(--ink-3); line-height:1.35}
input[type=text],input[type=date],input[type=number],select,textarea{
  width:100%; padding:8px 10px; background:var(--surface);
  border:1px solid var(--line-strong); border-radius:7px; min-width:0;
}
textarea{resize:vertical; min-height:92px}
input:focus,select:focus,textarea:focus{border-color:var(--accent); outline:none; box-shadow:0 0 0 3px var(--accent-soft)}
input.mono,td .mono{font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; letter-spacing:.02em}
input.bad-in, select.bad-in{border-color:var(--bad); background:var(--bad-soft)}
input.bad-in:focus, select.bad-in:focus{box-shadow:0 0 0 3px var(--bad-soft)}
input.warn-in, select.warn-in{border-color:var(--warn); background:var(--warn-soft)}
input.warn-in:focus, select.warn-in:focus{box-shadow:0 0 0 3px var(--warn-soft)}
td.bad-cell{background:var(--bad-soft); color:var(--bad); font-weight:600}
/* A provider already scanned for this same subtopic on an earlier roster. */
tr.used-warn > td{background:var(--warn-soft)}
tr.used-note > td{
  background:var(--warn-soft); color:var(--warn); font-size:12px; font-weight:600;
  padding:4px 10px 8px; border-top:none}
tr.used-note .un-icon{margin-right:5px}
/* A provider whose certification is expired as of the class date. */
tr.expired-warn > td{background:var(--bad-soft)}
tr.expired-note > td{
  background:var(--bad-soft); color:var(--bad); font-size:12px; font-weight:600;
  padding:5px 10px 8px; border-top:none}
tr.expired-note .un-icon{margin-right:5px}
tr.expired-note .btn{margin-left:8px; vertical-align:baseline}
/* Expired providers in the library. */
tr.crew-expired > td{background:var(--bad-soft)}
td.exp-bad{color:var(--bad); font-weight:600}
/* Providers expiring within 30 days. */
tr.crew-soon > td{background:var(--warn-soft)}
td.exp-soon{color:var(--warn); font-weight:600}
/* Provider library search + filters */
.crew-tools{display:flex; flex-wrap:wrap; gap:8px; padding:12px 16px 0; align-items:center}
.crew-tools #crew-q{flex:1 1 170px; min-width:130px}
.crew-tools select{flex:0 0 auto; width:auto; min-width:110px}
.btn.warn{border-color:color-mix(in srgb,var(--warn) 45%,transparent); color:var(--warn)}
.btn.warn:hover{background:color-mix(in srgb,var(--warn) 14%,transparent)}
/* Setup: certification level → letter-prefix map */
.lvl-map{width:auto; border-collapse:collapse}
.lvl-map th{font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-3);
  text-align:left; font-weight:600; padding:0 6px 4px}
.lvl-map td{padding:3px 6px; border:none}
.lvl-map td:first-child input{width:200px; max-width:100%}
.lvl-map th.lvl-pfx, .lvl-map td.lvl-pfx{width:56px}
.lvl-map td.lvl-pfx input{width:48px}
.lvl-map td .x{margin:0}

/* Setup tab polish */
.setup-lead{margin:0 0 16px; color:var(--ink-2); font-size:13px; line-height:1.5; max-width:60ch}
.toggle-card{display:flex; gap:11px; align-items:flex-start; cursor:pointer;
  padding:12px 13px; border:1px solid var(--line-strong); border-radius:9px;
  background:var(--surface-2); transition:border-color .15s ease, background .15s ease}
.toggle-card:hover{border-color:color-mix(in srgb,var(--accent) 40%, var(--line-strong))}
.toggle-card input{margin-top:2px; width:16px; height:16px; accent-color:var(--accent); flex:none}
.toggle-card .tc-t{font-weight:600; font-size:13px; display:block}
.toggle-card .tc-d{font-size:11.5px; color:var(--ink-3); line-height:1.4; margin-top:3px; display:block}
.field-note{margin:2px 0 0; padding:9px 11px; background:var(--surface-2);
  border:1px solid var(--line); border-left:3px solid color-mix(in srgb,var(--accent) 55%, var(--line));
  border-radius:7px; font-size:11.5px; color:var(--ink-2); line-height:1.45}
.field-note b{color:var(--ink); font-weight:600}
.lvl-add{margin-top:10px; align-self:flex-start}
#s-hours{max-width:110px}
.autobak-wrap{margin-top:16px; padding-top:14px; border-top:1px solid var(--line)}
.autobak-sub{font-weight:400; text-transform:none; letter-spacing:0; color:var(--ink-3); font-size:11px}
.autobak-row{display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:6px 0; border-bottom:1px solid var(--line); font-size:12.5px}
.autobak-row:last-child{border-bottom:0}
.autobak-tag{font-size:10px; font-weight:600; color:var(--accent); background:var(--accent-soft);
  padding:1px 6px; border-radius:20px; margin-left:6px}
.seg{display:flex; gap:0; border:1px solid var(--line-strong); border-radius:7px; overflow:hidden}
.seg button{
  flex:1; border:0; background:var(--surface); padding:8px 6px; cursor:pointer;
  font-size:13px; color:var(--ink-2); border-right:1px solid var(--line); white-space:nowrap;
}
.seg button:last-child{border-right:0}
.seg button[aria-pressed="true"]{background:var(--accent); color:var(--on-accent); font-weight:600}
.seg.bad-in{border-color:var(--bad); box-shadow:0 0 0 1px var(--bad); background:var(--bad-soft)}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  padding:8px 14px; border-radius:7px; border:1px solid var(--line-strong);
  background:var(--surface); color:var(--ink); font-size:13px; font-weight:500; cursor:pointer;
}
.btn:hover{background:var(--surface-2)}
.btn.pri{background:var(--accent); border-color:var(--accent); color:var(--on-accent); font-weight:600}
.btn.pri:hover{background:var(--accent-hi); border-color:var(--accent-hi)}
.btn.sm{padding:5px 10px; font-size:12px}
.btn.wide{width:100%}
.save-roster{width:100%; padding:12px; font-size:14px; font-weight:600; box-shadow:var(--shadow)}
.roster-actions{display:flex; flex-direction:column; gap:8px}
/* Roster tab start / empty state */
.roster-start{display:flex; justify-content:center; padding:36px 16px}
.start-card{max-width:430px; width:100%; text-align:center; background:var(--surface);
  border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow);
  padding:38px 30px; display:flex; flex-direction:column; align-items:center; gap:13px}
.start-ic{width:54px; height:54px; border-radius:15px; display:grid; place-items:center;
  background:var(--accent-soft); color:var(--accent)}
.start-card h2{margin:0; font-size:19px; letter-spacing:-.01em}
.start-card p{margin:0; color:var(--ink-2); font-size:13.5px; line-height:1.5; max-width:34ch}
.start-btn{margin-top:6px; padding:11px 24px; font-size:14px; font-weight:600}
.start-resume{font-size:12.5px; padding:7px 14px}
.btn:disabled{opacity:.45; cursor:not-allowed}
.btn.danger{color:var(--bad); border-color:color-mix(in srgb,var(--bad) 35%,var(--line-strong))}
.btn.danger:hover{background:var(--bad-soft)}
.btn.pri.danger{background:var(--bad); border-color:var(--bad); color:var(--on-accent)}
.btn.pri.danger:hover{background:color-mix(in srgb,var(--bad) 85%,black)}
.row-actions{display:flex; gap:8px; flex-wrap:wrap}

/* ---------- roster table ---------- */
.tw{overflow-x:auto; -webkit-overflow-scrolling:touch}
table.roster{width:100%; border-collapse:collapse; min-width:760px}
table.roster td input, table.roster td select{width:100%}
#att-table col.c-idx{width:46px}
#att-table col.c-cert{width:160px}
#att-table col.c-lvl{width:150px}
#att-table col.c-hrs{width:84px}
#att-table col.c-del{width:158px}
#att-table th.mid, #att-table td.mid{text-align:center}
#att-table td.mid select, #att-table td.mid input{text-align:center; text-align-last:center}
#crew-table col.c-cert{width:132px}
#crew-table col.c-lvl{width:118px}
#crew-table col.c-exp{width:110px}
#crew-table col.c-act{width:236px}
#crew-table td, #crew-table th{padding-left:8px; padding-right:8px}
#crew-table td.val .tag.ec{margin-left:10px}
#course-table col.c-num{width:100px}
#course-table col.c-win{width:200px}
#course-table col.c-stu{width:100px}
#course-table col.c-hrs2{width:95px}
#course-table col.c-act{width:132px}
#course-table th.mid, #course-table td.mid{text-align:center}
#hist-table th.mid, #hist-table td.mid{text-align:center}
.st-badge{
  display:inline-block; font-size:11px; font-weight:600; padding:2px 8px; border-radius:999px; white-space:nowrap;
}
.st-badge.ok{background:var(--surface-3); color:var(--ink-3)}
.st-badge.err{background:var(--bad-soft); color:var(--bad)}
.st-badge.up{background:var(--ok-soft); color:var(--ok)}
.st-badge.done{background:var(--accent-soft); color:var(--accent)}
#hist-table tr.locked{background:color-mix(in srgb,var(--ok) 7%,transparent)}
#hist-table tr.locked:hover{background:color-mix(in srgb,var(--ok) 12%,transparent)}
#hist-table tr.locked .nm{font-weight:600}
.course-table .course-row{cursor:pointer}
.course-table .course-row:hover{background:var(--surface-2)}
.course-table .course-row.open{background:var(--accent-soft)}
.course-table .course-row.open:hover{background:var(--accent-soft)}
.course-table .cx{display:inline-block; width:14px; color:var(--ink-3); font-size:10px}
.course-table .course-row.open .cx{color:var(--accent)}
.course-detail > td{padding:0; background:var(--surface-2); border-bottom:1px solid var(--line-strong)}
.rst-wrap{padding:10px 16px 12px}
.rst-hd{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:12px; font-weight:600; text-transform:uppercase;
  letter-spacing:.06em; color:var(--ink-3); margin-bottom:7px;
}
.rst-row{
  display:flex; align-items:center; gap:12px; padding:6px 8px; border-radius:6px; background:var(--surface);
  border:1px solid var(--line); margin-bottom:5px;
}
.rst-row:last-child{margin-bottom:0}
.rst-date{font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:12px; white-space:nowrap; flex:none; width:92px}
.rst-topic{font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:12px; color:var(--ink-3); white-space:nowrap; flex:none; width:54px}
.rst-name{font-size:13px; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rst-n{font-size:12px; color:var(--ink-3); white-space:nowrap; flex:none}
.rst-row .btn{flex:none}
.rst-empty{font-size:12.5px; color:var(--ink-3); font-style:italic; padding:2px 4px}
@media (max-width:600px){
  .rst-row{flex-wrap:wrap}
  .rst-name{flex-basis:100%; order:-1}
}

.addbar{display:flex; gap:9px; padding:12px 16px; border-bottom:1px solid var(--line); background:var(--surface-2)}
.addbar input{flex:1; min-width:0}
#add-note:not(:empty){padding:10px 16px 0}
#add-note ul.issues li.ok{background:var(--ok-soft); border-left-color:var(--ok); color:var(--ok)}
#add-note .btn{margin-left:auto; flex:none}
#add-note ul.issues li{align-items:center}

th.sortable{cursor:pointer; user-select:none; white-space:nowrap}
th.sortable:hover{color:var(--ink)}
th.sortable .ar{margin-left:4px; font-size:9px; opacity:.3}
th.sortable[aria-sort] .ar{opacity:1; color:var(--accent)}
td.val{font-size:13px; color:var(--ink)}
td.val.dim{color:var(--ink-3); font-style:italic}
.rowbtns{display:flex; gap:5px; justify-content:flex-end; align-items:center}
tr.editing{background:var(--accent-soft)}
tr.editing:hover{background:var(--accent-soft)}
table.roster th{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:12px; font-weight:600;
  text-transform:uppercase; letter-spacing:.075em; color:var(--ink-2); text-align:left;
  padding:8px 10px; border-bottom:1px solid var(--line-strong); white-space:nowrap;
}
table.roster td{padding:5px 10px; border-bottom:1px solid var(--line); vertical-align:middle}
table.roster tbody tr:hover{background:var(--surface-2)}

/* Library tables (Providers, Courses, History): evenly distributed columns and
   uniform row height. Fixed layout splits width equally; nowrap + ellipsis keeps
   every cell to a single line so all rows are the same height. */
#crew-table, #course-table, #past-table, #hist-table{table-layout:fixed}
#crew-table col, #course-table col, #past-table col{width:auto !important}
#crew-table td, #crew-table th,
#course-table td, #course-table th,
#past-table td, #past-table th,
#hist-table td, #hist-table th{
  height:46px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
/* History keeps its action buttons legible: even data columns, fixed action column. */
#hist-table col.c-hist-act{width:172px !important}
#hist-table td:last-child, #hist-table th:last-child{overflow:visible}
#hist-table .rowbtns{display:flex; gap:6px; flex-wrap:nowrap; justify-content:flex-end}
.hist-scan{color:var(--ink-3); font-size:11px; margin-left:6px}

/* Filters condensed into a single icon button with a dropdown popover. */
.filter-wrap{position:relative; padding:12px 16px 0}
.btn.icon-btn{width:38px; height:38px; padding:0; display:inline-flex; align-items:center; justify-content:center}
.filter-toggle svg{width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round}
.filter-toggle.active{border-color:var(--accent); color:var(--accent)}
.filter-pop{position:absolute; top:calc(100% + 6px); left:16px; z-index:40;
  background:var(--surface); border:1px solid var(--line-strong); border-radius:12px;
  box-shadow:0 14px 34px rgba(0,0,0,.18); padding:14px; width:300px; max-width:calc(100vw - 32px)}
.filter-pop .crew-tools, .filter-pop .provider-filters, .filter-pop .history-filters{
  display:flex; flex-direction:column; align-items:stretch; gap:10px; padding:0; background:transparent; grid-template-columns:none}
.filter-pop select, .filter-pop input{width:100%; min-width:0}
.filter-pop .provider-month{width:100%; justify-self:stretch}
.filter-pop #crew-fexp, .filter-pop #crew-fmonth{width:100%}
.filter-pop .btn.sm{align-self:flex-start}
td.num{
  font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:12px; color:var(--ink-3);
  width:38px; text-align:right; font-variant-numeric:tabular-nums;
}
td.cert{font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:13px; font-weight:500; white-space:nowrap}
td.nm{min-width:150px}
td input,td select{padding:5px 7px; border-radius:6px}
td .h-in{width:72px; font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; text-align:right}
td .c-in{width:88px}
.x{
  border:0; background:transparent; color:var(--ink-3); cursor:pointer;
  font-size:17px; line-height:1; padding:3px 7px; border-radius:6px;
}
.x:hover{background:var(--bad-soft); color:var(--bad)}
.tag{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:11px; font-weight:600; text-transform:uppercase;
  letter-spacing:.06em; padding:2px 7px; border-radius:4px; background:var(--accent-soft); color:var(--accent);
  white-space:nowrap;
}
.tag.g{background:var(--surface-3); color:var(--ink-2)}
.tag.ec{background:var(--accent-soft); color:var(--accent); border:1px solid color-mix(in srgb,var(--accent) 30%,transparent)}
.empty{padding:34px 18px; text-align:center; color:var(--ink-3); font-size:13px}

/* ---------- crew picker ---------- */
.picker{max-height:290px; overflow-y:auto; border:1px solid var(--line); border-radius:8px; background:var(--surface-2)}
.pick{
  display:flex; align-items:center; gap:10px; padding:7px 11px;
  border-bottom:1px solid var(--line); cursor:pointer; background:var(--surface);
}
.pick:last-child{border-bottom:0}
.pick:hover{background:var(--surface-2)}
.pick input{width:15px; height:15px; accent-color:var(--accent); flex:none; cursor:pointer}
.pick .pc{font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:12px; color:var(--ink-3); margin-left:auto; white-space:nowrap}
.pick .pn{font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
/* Bigger tap targets when entering a roster on a phone in the field */
@media (pointer:coarse){
  .picker{max-height:52vh}
  .pick{padding:12px 13px; min-height:48px}
  .pick input{width:20px; height:20px}
  .pick .pn{font-size:15px}
  .pick .pc{font-size:13px}
}

/* ---------- issues ---------- */
ul.issues{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:7px}
ul.issues li{
  display:flex; gap:9px; align-items:flex-start; font-size:12.5px; line-height:1.4;
  padding:8px 11px; border-radius:7px; background:var(--surface-2); border-left:3px solid var(--line-strong);
}
ul.issues li.e{background:var(--bad-soft); border-left-color:var(--bad); color:var(--bad)}
ul.issues li.w{background:var(--warn-soft); border-left-color:var(--warn); color:var(--warn)}
ul.issues li b{font-weight:600}

/* ---------- xml preview ---------- */
pre.xml{
  margin:0; padding:14px; background:var(--surface-2); border:1px solid var(--line);
  border-radius:8px; overflow:auto; max-height:340px;
  font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:12px; line-height:1.55; color:var(--ink-2);
  white-space:pre; tab-size:4;
}
.fname{
  font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:12.5px; font-weight:500; color:var(--ink);
  background:var(--surface-2); border:1px solid var(--line); border-radius:6px;
  padding:7px 10px; word-break:break-all; display:block;
}
.kv{display:flex; justify-content:space-between; gap:12px; padding:6px 0; border-bottom:1px solid var(--line); font-size:12.5px}
.kv:last-child{border-bottom:0}
.kv dt{color:var(--ink-3)}
.kv dd{margin:0; font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-weight:500; text-align:right}
dl.meta{margin:0}
.note{
  font-size:12px; color:var(--ink-2); background:var(--accent-soft);
  border-radius:7px; padding:10px 12px; line-height:1.45;
}
.scan-seq{
  margin-top:13px; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2);
}
.seq-row{display:flex; align-items:baseline; gap:10px; padding:3px 0; min-width:0}
.seq-k{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:11.5px; font-weight:600; text-transform:uppercase;
  letter-spacing:.06em; color:var(--ink-3); white-space:nowrap; flex:none; width:78px;
}
.seq-row code{
  font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:12px; color:var(--ink); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; min-width:0;
}
.seq-v{font-size:12.5px; color:var(--ink-2); flex:1; min-width:0}
.seq-copy{flex:none; padding:3px 10px}
.demo-bar{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:var(--warn-soft); border:1px solid color-mix(in srgb,var(--warn) 30%,transparent);
  color:var(--warn); border-radius:var(--r); padding:10px 14px; margin-bottom:18px; font-size:13px;
}
.demo-bar b{font-weight:600}
.demo-bar .btn{margin-left:auto; border-color:color-mix(in srgb,var(--warn) 40%,transparent); color:var(--warn); background:transparent}
.demo-bar .btn:hover{background:color-mix(in srgb,var(--warn) 14%,transparent)}
/* ---------- pop-out sheet ---------- */
.sheet-wrap{position:fixed; inset:0; z-index:80; display:flex; align-items:center; justify-content:center; padding:20px}
/* lock background scroll while any pop-out is open */
html:has(.sheet-wrap:not([hidden])), body:has(.sheet-wrap:not([hidden])){overflow:hidden}
.sheet{max-height:calc(100vh - 40px); overflow-y:auto}
.sheet-bg{position:absolute; inset:0; background:rgba(15,24,34,.45)}
.sheet{
  position:relative; width:100%; max-width:460px; background:var(--surface);
  border:1px solid var(--line); border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,.3);
  max-height:calc(100vh - 40px); display:flex; flex-direction:column;
  animation:sheet-in .16s ease-out;
}
@keyframes sheet-in{ from{opacity:0; transform:translateY(8px) scale(.99)} to{opacity:1; transform:none} }
@media (prefers-reduced-motion:reduce){ .sheet{animation:none} }
.sheet-hd{display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--line)}
.sheet-hd h2{font-size:15px; font-weight:600; margin-right:auto}
.sheet-bd{padding:16px; overflow-y:auto; display:flex; flex-direction:column; gap:12px}
.sheet-bd .grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.sheet-ft{display:flex; gap:9px; justify-content:flex-end; padding:13px 16px; border-top:1px solid var(--line)}
@media (max-width:520px){ .sheet-ft{flex-direction:column-reverse} .sheet-ft .btn{width:100%} }

#offline-badge{display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; color:#8a5a00; background:#fff3d6; border:1px solid #f0d489; padding:2px 9px; border-radius:999px; margin-left:4px}

.sig-frame{position:relative; margin-top:6px; border:1px solid #b9c2cf; border-radius:10px; background:#fff; overflow:hidden}
.sig-frame canvas{display:block; width:100%; height:180px; touch-action:none; cursor:crosshair; background:#fff}
.sig-base{position:absolute; left:0; right:0; bottom:34px; margin:0 18px; border-bottom:1px dashed #9aa6b5; text-align:center; font-size:11px; color:#8a94a3; pointer-events:none; padding-bottom:2px}
.sig-cell img{height:34px; max-width:150px; object-fit:contain; vertical-align:middle}
.btn.signed{color:var(--ok); border-color:color-mix(in srgb,var(--ok) 40%,transparent)}

.uploaded-wrap{margin-top:22px; border-top:1px solid var(--line); padding-top:16px}
.uploaded-hd{display:flex; align-items:baseline; gap:10px; margin-bottom:4px}
.uploaded-hd h3{margin:0; font-size:15px}
.upg{border:1px solid var(--line); border-radius:9px; margin-bottom:8px; overflow:hidden; background:var(--surface)}
.upg-hd{display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:11px 13px; background:var(--surface-2); border:0; cursor:pointer; font:inherit; color:var(--ink)}
.upg-hd:hover{background:var(--surface-3)}
.upg-hd .upg-name{font-weight:600; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.upg-hd .upg-n{margin-left:auto; font-size:12px; color:var(--ink-3); white-space:nowrap}
.upg-hd svg{flex:none; transition:transform .15s; color:var(--ink-3)}
.upg.open .upg-hd svg{transform:rotate(180deg)}
.upg-bd{display:none; padding:2px 4px 6px}
.upg.open .upg-bd{display:block}
.uprow{display:flex; align-items:center; gap:10px; padding:9px 10px; border-bottom:1px solid var(--line)}
.uprow:last-child{border-bottom:0}
.uprow .up-date{font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:12px; white-space:nowrap; min-width:74px}
.uprow .up-topic{font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:12px; color:var(--ink-3); white-space:nowrap}
.uprow .up-meta{font-size:12px; color:var(--ink-3); flex:1; min-width:120px}
.uprow .up-btns{display:flex; gap:5px; align-items:center; margin-left:auto}
@media (max-width:560px){ .uprow{flex-wrap:wrap} .uprow .up-meta{flex-basis:100%; order:3} .uprow .up-btns{order:2} }

.ces-range{display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin-bottom:12px}
.ces-range label{display:flex; flex-direction:column; gap:3px; font-size:12px}
.ces-range input{font-size:14px}

.tr-meta{display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px 16px; padding:12px 14px; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; margin-bottom:14px}
.tr-meta .tr-k{display:block; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-3); margin-bottom:2px}
.tr-meta b{font-size:15px}
#crew-table .crew-row{cursor:pointer}
#crew-table .crew-row:hover{background:var(--surface-2)}
.pv-sub{margin:16px 0 8px;font-size:13px;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-3)}
.tr-table{width:100%}
.tr-table td.nm{white-space:normal}

.toast{
  position:fixed; left:50%; transform:translateX(-50%); bottom:calc(22px + env(safe-area-inset-bottom,0px));
  background:var(--ink); color:var(--ground); padding:10px 18px; border-radius:999px;
  font-size:13px; font-weight:500; z-index:99; box-shadow:0 8px 30px rgba(0,0,0,.28);
  opacity:0; pointer-events:none; transition:opacity .18s, transform .18s;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(-4px)}
@media (prefers-reduced-motion:reduce){ .toast{transition:none} }

/* ---------- print (TR-06) ---------- */
#print{display:none}
@media print{
  .bar,main,.toast{display:none !important}
  #print{display:block !important}
  @page{size:letter portrait; margin:.5in}
  body{background:#fff; color:#000; font-size:11px}
  .p-hd{display:flex; justify-content:space-between; align-items:flex-end; border-bottom:2px solid #000; padding-bottom:6px; margin-bottom:12px}
  .p-hd h1{font-size:19px; letter-spacing:-.02em}
  .p-hd .p-org{font-size:9px; text-align:right; line-height:1.4}
  .p-meta{display:grid; grid-template-columns:repeat(4,1fr); gap:7px 16px; margin-bottom:14px}
  .p-meta .pf{border-bottom:1px solid #000; padding-bottom:2px}
  .p-meta .pf.w2{grid-column:span 2}
  .p-meta .pl{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:8.5px; text-transform:uppercase; letter-spacing:.08em; color:#444; display:block}
  .p-meta .pv{font-size:12px; font-weight:600; min-height:15px; display:block}
  table.p-tbl{width:100%; border-collapse:collapse}
  table.p-tbl th{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:9px; text-transform:uppercase; letter-spacing:.08em; text-align:left; border-bottom:1.5px solid #000; padding:4px 5px}
  table.p-tbl td{border-bottom:1px solid #999; padding:7px 5px; height:26px; font-size:11px}
  table.p-tbl tr{break-inside:avoid}
  table.p-tbl .c-n{width:26px; text-align:right; color:#555; font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:10px}
  table.p-tbl .c-c{width:105px; font-family:ui-monospace,"SFMono-Regular",Menlo,monospace}
  table.p-tbl .c-l{width:58px}
  table.p-tbl .c-s{width:36%}
  table.p-scan{table-layout:fixed}
  table.p-scan td{height:auto; padding:4px 5px}
  table.p-scan th:nth-child(1), table.p-scan td:nth-child(1){width:6%}
  table.p-scan th:nth-child(2), table.p-scan td:nth-child(2){width:36%}
  table.p-scan th:nth-child(3), table.p-scan td:nth-child(3){width:20%}
  table.p-scan th:nth-child(4), table.p-scan td:nth-child(4){width:13%}
  table.p-scan th:nth-child(5), table.p-scan td:nth-child(5){width:25%; text-align:center}
  .qr-wrap{display:flex; flex-direction:column; align-items:center; gap:1px}
  .qr-wrap svg{display:block; width:70px; height:70px}
  .qr-txt{font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; font-size:6px; letter-spacing:-.01em; color:#333}
  .qr-err{font-size:8px; color:#a00; font-style:italic}
  .scan-steps{display:flex; gap:14px; margin:8px 0 12px}
  .scan-step{flex:1; border:1px solid #999; border-radius:6px; padding:7px 10px 9px; text-align:center; page-break-inside:avoid}
  .scan-step .ss-t{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:#111; text-align:left; margin-bottom:5px}
  .scan-step .qr-wrap svg{width:104px; height:104px}
  .scan-step .qr-txt{font-size:7.5px}
  .scan-step .ss-missing{font-size:9px; color:#a00; font-style:italic; padding:34px 0}
  .scan-step .ss-h{font-size:8px; color:#555; margin-top:3px}
  .scan-cap{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#111; margin:0 0 5px}
  .p-cert{margin-top:16px; font-size:9.5px; line-height:1.45; break-inside:avoid}
  .p-sign{display:grid; grid-template-columns:1.2fr 1.4fr .8fr; gap:22px; margin-top:26px; break-inside:avoid}
  .p-sign div{border-top:1px solid #000; padding-top:3px; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:9px; text-transform:uppercase; letter-spacing:.07em}
  .p-foot{margin-top:18px; padding-top:5px; border-top:1px solid #000; display:flex; justify-content:space-between; font-size:8px; color:#444}
}

/* Account controls sit outside the roster and its dialogs. */
#auth-gate{max-width:440px;margin:9vh auto;padding:28px;background:white;border:1px solid var(--line);border-radius:14px}
#auth-gate h1{font-size:24px;margin:0 0 12px} #auth-gate label{display:block;margin:14px 0 6px}
#auth-gate input{width:100%;box-sizing:border-box} #auth-gate button{margin:10px 6px 0 0}
#auth-message{margin-top:16px;line-height:1.5;overflow-wrap:anywhere}
#cloud-account{display:flex;gap:12px;flex-wrap:wrap;align-items:center;padding:12px 20px;background:white;border-bottom:1px solid var(--line)}
#cloud-message{flex:1;min-width:200px;font-size:13px} #cloud-email{font-weight:600;overflow-wrap:anywhere}
#cloud-warning{margin:0;padding:12px 20px;background:var(--warn-soft);color:var(--warn);line-height:1.5;border-bottom:1px solid color-mix(in srgb,var(--warn) 25%,transparent)}
@media print{#cloud-account,#cloud-warning,#auth-gate{display:none!important}}

/* Dashboard */
.dashboard{max-width:1260px;margin:0 auto;padding:8px 0 24px}
.dash-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:30px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(115deg,var(--surface),var(--accent-soft));margin-bottom:20px}
.dash-kicker{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--accent);font-weight:700;margin-bottom:8px}
.dash-hero h1{font-size:clamp(24px,3vw,34px);line-height:1.2}.dash-hero p{color:var(--ink-2);margin:10px 0 0;max-width:580px}
.dash-attn{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:20px}
.attn-card{display:flex;align-items:center;gap:11px;border:1px solid var(--line);border-radius:12px;padding:13px 17px;cursor:pointer;background:var(--surface);text-align:left}
.attn-card .attn-n{font-size:24px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.attn-card .attn-t{font-size:12.5px;font-weight:600;line-height:1.25}
.attn-card:hover{filter:brightness(.98)}
.attn-card.bad{border-color:color-mix(in srgb,var(--bad) 35%,var(--line));color:var(--bad);background:var(--bad-soft)}
.attn-card.warn{border-color:color-mix(in srgb,var(--warn) 35%,var(--line));color:var(--warn);background:var(--warn-soft)}
.attn-card.mid{border-color:color-mix(in srgb,var(--accent) 35%,var(--line));color:var(--accent);background:var(--accent-soft)}
.attn-clear{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--ink-3);padding:2px 2px 4px}
.attn-clear b{color:var(--ok);font-weight:700}
.dash-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.dash-metric{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:6px;border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:20px;cursor:pointer;min-width:0}
.dash-metric:hover{border-color:var(--accent);background:var(--accent-soft)}.dash-metric strong{font-size:32px;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums}.dash-metric span{font-size:13px;font-weight:600}.dash-metric small{font-size:11px;color:var(--ink-3)}
.dash-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:20px;align-items:start}.dash-stack{display:grid;gap:20px}
.dash-panel{border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}.dash-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid var(--line)}.dash-panel h2{font-size:16px}.dash-panel-body{padding:20px}
.dash-recent{list-style:none;margin:0;padding:0}.dash-recent li{display:flex;justify-content:space-between;gap:16px;padding:17px 20px;border-bottom:1px solid var(--line)}.dash-recent li:last-child{border:0}.dash-recent strong{display:block;font-size:14px;overflow-wrap:anywhere}.dash-recent small{display:block;margin-top:5px;color:var(--ink-3)}
.dash-badge{align-self:flex-start;white-space:nowrap;font-size:11px;font-weight:600;border-radius:20px;padding:4px 9px;background:var(--warn-soft);color:var(--warn)}.dash-badge.done{background:var(--ok-soft);color:var(--ok)}.dash-badge.mid{background:var(--accent-soft);color:var(--accent)}
.dash-empty{text-align:center;padding:40px 24px;color:var(--ink-2)}.dash-empty strong{display:block;color:var(--ink);margin-bottom:8px}.dash-empty p{margin:0 0 18px}
.dash-draft-title{font-size:18px;overflow-wrap:anywhere;margin-bottom:8px}.dash-muted{color:var(--ink-3);font-size:13px}.dash-actions{display:grid;gap:10px;margin-top:16px}.dash-actions .btn{justify-content:center}
@media(max-width:800px){.dash-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.dash-grid{grid-template-columns:1fr}.dash-hero{padding:22px;align-items:flex-start;flex-direction:column}.dashboard{padding-top:0}}
@media(max-width:440px){.dash-metric{padding:15px}.dash-recent li{flex-direction:column;gap:8px}.dash-panel-head{padding:16px}.tabs{max-width:100%;overflow-x:auto}.tab{white-space:nowrap}}

/* V2.2: quieter library views and grouped settings. */
.dash-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.library-layout{display:block}.library-layout>.stack{gap:20px}
.settings-heading{margin:0 0 20px}.settings-heading h1{font-size:25px;letter-spacing:-.5px}
#v-setup>.dash-panel{margin-bottom:24px}
.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#v-setup .dash-actions{display:flex;flex-wrap:wrap;margin:12px 0 18px}
#v-setup details{border-top:1px solid var(--line);padding-top:16px}
#v-setup details summary{cursor:pointer;font-weight:600}
#helper-status{font-size:13px;border-radius:20px;padding:6px 12px;background:var(--surface-2)}
#helper-jobs:empty{display:none}
.import-dialog{margin:auto;padding:0;border:1px solid var(--line);border-radius:18px;width:min(520px,calc(100vw - 32px));max-height:85vh;overflow:auto;background:var(--surface);color:var(--ink);box-shadow:0 24px 80px #0003}
.import-dialog::backdrop{background:#10223880;backdrop-filter:blur(3px)}
.panel-hd .sub:empty{display:none}
@media(max-width:880px){.settings-grid{grid-template-columns:1fr}}
@media(max-width:560px){.dash-metrics{grid-template-columns:1fr}.panel-hd{flex-wrap:wrap}.panel-hd h2{flex-basis:100%}}

/* Settings index and focused detail pages. */
#settings-home,.settings-page{max-width:880px;margin:0 auto}
.settings-links{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.settings-link{display:flex;align-items:center;gap:16px;padding:21px 4px;border-bottom:1px solid var(--line);color:var(--ink);font-size:16px;font-weight:600;text-decoration:none}
.settings-link:hover{color:var(--accent);background:var(--surface-2)}
.settings-arrow{margin-left:auto;font-size:25px;color:var(--ink-3);font-weight:400}
.settings-status{margin-left:auto;font-size:12px;font-weight:500;color:var(--ink-2);background:var(--surface-2);padding:5px 10px;border-radius:20px}
.settings-status+.settings-arrow{margin-left:0}
.settings-back{display:inline-block;margin-bottom:18px;color:var(--accent);text-decoration:none;font-weight:600}
.settings-page>h1{font-size:25px;margin:0 0 24px;letter-spacing:-.5px}
.settings-content{display:grid;gap:24px}
.settings-content .panel,.settings-content .dash-panel{box-shadow:none;border:0;background:transparent}
.settings-content .panel-hd,.settings-content .dash-panel-head{padding:0 0 14px;background:transparent}
.settings-content .panel-bd,.settings-content .dash-panel-body{padding:0}
.settings-content .caret{display:none}
.settings-content>.panel+.panel{padding-top:24px;border-top:1px solid var(--line)}
@media(max-width:560px){.settings-link{gap:10px;font-size:15px}.settings-status{max-width:115px;text-align:center}}

#helper-status[data-tone="ready"],.settings-status[data-tone="ready"]{color:var(--ok);background:var(--ok-soft)}
#helper-status[data-tone="unavailable"],.settings-status[data-tone="unavailable"]{color:var(--bad);background:var(--bad-soft)}
#helper-status[data-tone="error"],.settings-status[data-tone="error"]{color:#8A3C00;background:#FFF0DC}
@media(prefers-color-scheme:dark){#helper-status[data-tone="error"],.settings-status[data-tone="error"]{color:#FFC078;background:#422B13}}

.provider-alerts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:20px}
.provider-alert{display:flex;align-items:center;gap:14px;padding:18px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);cursor:pointer;text-align:left;font:inherit}
.provider-alert strong{font-size:28px;font-weight:700}.provider-alert span{font-size:14px}.provider-alert.bad strong{color:var(--bad)}.provider-alert.warn strong{color:var(--warn)}.provider-alert.mid strong{color:var(--accent)}
.provider-alert[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft)}
@media(max-width:650px){.provider-alerts{grid-template-columns:1fr}.provider-alert{padding:14px}}

.providers-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:40px}.providers-heading h1{font-size:27px;margin:0 0 5px;letter-spacing:-.6px}.providers-heading p{margin:0}
.provider-directory{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.provider-filters{display:grid;grid-template-columns:minmax(200px,2fr) repeat(2,minmax(140px,1fr));gap:12px;padding:20px;align-items:end;background:var(--surface)}
.provider-filters input,.provider-filters select{width:100%;min-width:0}.provider-filters #crew-q{min-width:0;width:100%}.provider-month{font-size:11px;color:var(--ink-3);display:grid;gap:4px}.provider-month input{font-size:14px}
.provider-usage{text-align:center;font-variant-numeric:tabular-nums;color:var(--ink-2)}.c-usage{width:80px}
#crew-table tbody tr:hover{background:var(--accent-soft)}
@media(max-width:700px){.provider-filters{grid-template-columns:1fr 1fr;padding:14px}.provider-filters #crew-q{grid-column:1/-1}.providers-heading h1{font-size:24px}}
@media(max-width:420px){.provider-filters{grid-template-columns:1fr}}

.level-cards{display:grid;gap:12px}.level-card{display:grid;grid-template-columns:minmax(0,2fr) minmax(100px,1fr) auto;align-items:end;gap:16px;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:12px}.level-card label{display:grid;gap:7px;font-size:12px;font-weight:600;color:var(--ink-2)}.level-card input{width:100%}
.column-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}.column-choice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface);color:var(--ink);padding:0;cursor:pointer}.column-choice span{padding:16px 8px;font-size:12px;border-right:1px solid var(--line)}.column-choice span:last-child{border:0}.column-choice[aria-pressed="true"]{border:2px solid var(--accent);background:var(--accent-soft);color:var(--accent)}
.helper-header-link{display:inline-flex;align-items:center;gap:8px;background:transparent;border:0;color:var(--ink-2);font:inherit;cursor:pointer}.helper-header-link .settings-status{margin:0}.account-signout{border-top:1px solid var(--line);padding-top:20px;margin-top:24px}
@media(max-width:560px){.column-choices{grid-template-columns:1fr}.level-card{grid-template-columns:minmax(0,2fr) minmax(90px,1fr)}.level-card button{grid-column:1/-1;justify-self:end}}

/* Unpublished: collapsible workspace navigation. */
#roster-app{display:grid;grid-template-columns:224px minmax(0,1fr);grid-template-rows:auto 1fr;align-items:start;min-height:calc(100vh - 60px)}
#roster-app>.bar{grid-column:1/-1;width:100%}#main-content{grid-column:2;min-width:0;width:100%;margin:0}
.app-sidebar{grid-column:1;grid-row:2;position:sticky;top:76px;padding:20px 12px;border-right:1px solid var(--line);background:var(--surface);height:calc(100dvh - 76px);overflow-y:auto}
.sidebar-heading{display:flex;align-items:center;justify-content:space-between;padding:0 12px 16px;color:var(--ink-3);font-size:11px;text-transform:uppercase;letter-spacing:.1em}
.app-sidebar nav{display:grid;gap:7px}.sidebar-item{display:flex;align-items:center;gap:13px;width:100%;padding:13px 14px;border:0;border-radius:10px;background:transparent;color:var(--ink-2);font:inherit;text-align:left;cursor:pointer;white-space:nowrap}
.sidebar-item svg{width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.sidebar-item:hover{background:var(--surface-2)}.sidebar-item[aria-current="page"]{background:var(--accent-soft);color:var(--accent);font-weight:600}
.sidebar-toggle{font-size:21px;padding:5px 11px}.sidebar-close,.sidebar-backdrop{display:none}
#roster-app.sidebar-collapsed{grid-template-columns:76px minmax(0,1fr)}.sidebar-collapsed .app-sidebar{padding-inline:9px}.sidebar-collapsed .sidebar-label{display:none}.sidebar-collapsed .sidebar-item{justify-content:center;padding:13px}.sidebar-collapsed .sidebar-heading{padding:0;height:8px}
@media(max-width:760px){
 #roster-app,#roster-app.sidebar-collapsed{display:block}#main-content{width:100%}
 .app-sidebar,.sidebar-collapsed .app-sidebar{position:fixed;z-index:301;inset:0 auto 0 0;width:260px;height:100dvh;transform:translateX(-100%);padding:24px 14px;box-shadow:12px 0 40px #0002;transition:transform .18s ease}
 .sidebar-open .app-sidebar{transform:translateX(0)}.sidebar-collapsed .sidebar-label{display:inline}.sidebar-collapsed .sidebar-item{justify-content:flex-start}.sidebar-collapsed .sidebar-heading{height:auto;padding:0 12px 16px}
 .sidebar-close{display:block;border:0;background:transparent;color:var(--ink);font-size:28px;cursor:pointer}.sidebar-open .sidebar-backdrop{display:block;position:fixed;inset:0;z-index:300;background:#0c152b66;border:0;width:100%;height:100%}
}
@media(prefers-reduced-motion:reduce){.app-sidebar{transition:none}}
@media print{#roster-app{display:block}.app-sidebar,.sidebar-backdrop{display:none!important}}

/* Keep expiration controls compact within the provider toolbar. */
.provider-filters .provider-month{width:180px;max-width:100%;justify-self:start;gap:3px}
.provider-filters #crew-fmonth{width:100%;min-width:0;height:38px;padding:7px 9px;font-size:13px}
.provider-filters #crew-fexp{width:200px;max-width:100%;justify-self:start;font-size:13px}

/* Unpublished: consistent always-open course and history directories. */
.directory-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:32px}.directory-heading h1{font-size:27px;margin:0 0 5px;letter-spacing:-.6px}.directory-heading p{margin:0}.directory-actions{display:flex;gap:10px;flex-wrap:wrap}
.directory-surface{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden}.directory-section-heading{padding:18px 20px;border-bottom:1px solid var(--line)}.directory-section-heading h2{font-size:16px;margin:0}
#v-courses .stack{gap:24px}.history-filters{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:20px}.history-filters #hist-q{flex:1;min-width:180px}.history-filters #hist-fstatus{width:160px}.history-filters #hist-fmonth{width:180px;min-width:0;height:38px;padding:7px 9px;font-size:13px}
.directory-surface .uploaded-wrap{margin:0;padding:24px 20px;border-top:1px solid var(--line);background:var(--surface-2)}.directory-surface tbody tr:hover{background:var(--accent-soft)}
@media(max-width:650px){.directory-heading{align-items:flex-start;flex-direction:column;gap:14px;margin-bottom:24px}.directory-heading h1{font-size:24px}.history-filters{padding:14px}.history-filters #hist-q{flex-basis:100%}.directory-actions{width:100%}}

/* Unpublished: simplified export controls. */
.export-content{display:flex;flex-direction:column;gap:16px}.export-content .fname{display:block;overflow-wrap:anywhere;padding:12px;border-radius:8px;background:var(--surface-2);font-size:12px}
.export-content .scanner-advanced{margin-top:8px;padding-top:16px;border-top:1px solid var(--line)}.export-content .scanner-advanced summary{cursor:pointer;color:var(--ink-2);font-size:13px;margin-bottom:12px}.export-content .scanner-advanced>.btn{margin-bottom:10px}.export-content .scan-seq{margin-top:16px}.export-content .issues{margin:0}

/* Unpublished roster workspace refresh. */
.roster-layout{grid-template-columns:minmax(0,1fr) 290px;gap:24px}.roster-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden}.roster-card .panel-hd{padding:18px 20px;flex-wrap:wrap;gap:10px}.roster-card .panel-bd{padding:20px}.roster-card .panel-hd h2{font-size:17px}.roster-layout>.stack{gap:24px}.roster-layout .addbar{padding:16px 20px}.roster-layout .roster-actions{padding:0 0 6px}.roster-layout #p-export{border-radius:14px}
.roster-single>.stack{display:flex;flex-direction:column;gap:24px}.roster-single .addbar{padding:16px 20px}
.provider-dialog{width:min(620px,calc(100vw - 32px))}.provider-dialog-summary{margin:0;padding:0 20px;color:var(--ink-3);font-size:13px}.provider-dialog .picker{max-height:45vh;overflow:auto}.provider-dialog .panel-bd{padding:16px 20px}.provider-dialog .sheet-ft{padding:16px 20px;border-top:1px solid var(--line)}
@media(max-width:1100px){.roster-layout{grid-template-columns:1fr}.roster-layout>.stack:last-child{display:grid;grid-template-columns:1fr 1fr;align-items:start}}
@media(max-width:650px){.roster-layout>.stack:last-child{display:flex}.roster-card .panel-hd,.roster-card .panel-bd{padding:16px}}

/* Searchable help and a keyboard-accessible, non-destructive tutorial. */
.help-entry{margin-top:18px}
.help-dialog{width:min(600px,calc(100vw - 32px));max-height:85vh;box-sizing:border-box;border:1px solid #d0dbea;border-radius:16px;padding:26px;color:#172333;background:#fff;overflow:auto}
.help-dialog::backdrop{background:rgba(15,30,50,.45)}
.help-top{display:flex;justify-content:space-between;align-items:center;gap:20px}.help-top h2{margin:0;font-size:23px}
.help-dialog p{line-height:1.6}.help-dialog h3{font-size:23px}.help-dialog label{display:block;margin:24px 0 8px;font-weight:600}
.help-dialog input{width:100%;box-sizing:border-box;padding:12px;border:1px solid #a1adbd;border-radius:7px;font:inherit}
.help-topics{margin:18px 0}.help-topics details{border-bottom:1px solid #dde3eb;padding:13px 0}.help-topics summary{cursor:pointer;font-weight:600;line-height:1.5}
.help-actions{display:flex;gap:10px;margin:24px 0}.help-dialog .hint{font-size:13px;color:#62738b}

/* Provider artwork keeps its original colors and aspect ratio. */
.social-options{display:flex;flex-direction:column;gap:12px;margin:20px 0}
.social-options[hidden]{display:none}
button.social-signin{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:48px;margin:0;padding:12px 16px;border:1px solid #747775;border-radius:6px;background:#fff;color:#1f1f1f;font:500 14px/20px Arial,sans-serif;cursor:pointer;overflow:hidden}
.social-signin__icon{position:absolute;left:16px;width:20px;height:20px;object-fit:contain}
button.social-signin--apple{border-color:#000;background:#000;color:#fff;font-family:system-ui,-apple-system,BlinkMacSystemFont,sans-serif}
.social-signin--apple .social-signin__icon{width:60px;height:60px;left:-4px}
button.social-signin:hover{background:#f7f8f8}
button.social-signin--apple:hover{background:#000;box-shadow:inset 0 0 0 2px #555}
button.social-signin:focus-visible{outline:3px solid #2167c4;outline-offset:3px}
button.social-signin:disabled{opacity:.55;cursor:wait}
.social-signin span{padding:0 24px}


.help-welcome{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.help-welcome p{margin:5px 0 0}@media(max-width:600px){.help-welcome{align-items:flex-start;flex-direction:column}}

/* Shared app and browser welcome screen. */
body.welcome-shell:has(#auth-gate:not([hidden])){display:flow-root;min-height:100vh;background:radial-gradient(ellipse at 20% 0%,#e5edf9 0,transparent 52%),radial-gradient(ellipse at 100% 100%,#e5f1ef 0,transparent 45%),#f5f7fb;color:#172b43}
#auth-gate.welcome-auth{box-sizing:border-box;width:calc(100% - 48px);max-width:456px;margin:clamp(24px,7vh,70px) auto;padding:36px 40px 28px;background:#fff;border:1px solid #e0e6ee;border-radius:24px;box-shadow:0 16px 55px #2039560d;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#172b43}
.welcome-auth .auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:28px;color:#243b57;font-size:16px;font-weight:650;letter-spacing:-.3px}
.welcome-auth .auth-brand img{width:48px;height:48px;object-fit:contain;border-radius:12px}
#auth-gate.welcome-auth h1{font-size:30px;line-height:1.2;font-weight:700;letter-spacing:-.9px;margin:0 0 10px}
#auth-gate.welcome-auth .auth-intro{font-size:14px;line-height:1.6;color:#66758a;margin:0 0 28px}
#auth-gate.welcome-auth .social-options{gap:12px;margin:0}
#auth-gate.welcome-auth button{margin:0;font-family:inherit}
#auth-gate.welcome-auth .social-signin{height:48px;border-radius:9px;font-size:14px;box-shadow:none}
#auth-gate.welcome-auth .social-signin--google{border-color:#747775;color:#1f1f1f;background:#fff}
.welcome-auth .auth-divider{display:flex;align-items:center;gap:14px;margin:20px 0;color:#8894a3;font-size:12px}
.welcome-auth .auth-divider:before,.welcome-auth .auth-divider:after{content:'';height:1px;flex:1;background:#e9edf2}
#auth-gate.welcome-auth .auth-email{display:flex;align-items:center;justify-content:center;width:100%;height:48px;background:#205ca4;color:#fff;border:1px solid #205ca4;border-radius:9px;font-size:14px;font-weight:600}
#auth-gate.welcome-auth .auth-email:hover{background:#194c88}
#auth-gate.welcome-auth .auth-remember{display:flex;align-items:center;gap:9px;margin:18px 0 0;color:#55657a;font-size:13px;line-height:20px;cursor:pointer}
#auth-gate.welcome-auth .auth-remember input{width:16px;height:16px;accent-color:#205ca4;border-radius:4px}
#auth-gate.welcome-auth #auth-message{font-size:13px;line-height:1.55;margin:18px 0 0;padding:12px 14px;border-radius:9px;background:#f0f5fc;color:#345476}
#auth-gate.welcome-auth #auth-message.auth-idle{display:none}
#auth-gate.welcome-auth .auth-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:28px;padding-top:20px;border-top:1px solid #e9edf2}
#auth-gate.welcome-auth .auth-footer .btn{padding:4px 0;min-height:28px;background:transparent;border:0;border-radius:3px;color:#526a85;font-size:12px;font-weight:500;box-shadow:none}
#auth-gate.welcome-auth .auth-footer .btn:hover{color:#205ca4;text-decoration:underline}
#auth-gate.welcome-auth .auth-note{margin:18px 0 0;font-size:11px;line-height:1.5;color:#8894a3;text-align:center}
#auth-gate.welcome-auth button:focus-visible,#auth-gate.welcome-auth input:focus-visible{outline:3px solid #78a9df;outline-offset:3px}
#auth-gate.welcome-auth button:disabled{opacity:.55;cursor:wait}
@media(max-height:740px){#auth-gate.welcome-auth{margin:24px auto;padding-top:28px;padding-bottom:24px}.welcome-auth .auth-brand{margin-bottom:20px}}
@media(max-width:480px){#auth-gate.welcome-auth{width:calc(100% - 24px);padding:28px 24px;border-radius:18px}}

#auth-gate.welcome-auth #auth-form input,#auth-gate.welcome-auth #auth-recovery input{border:1px solid #c9d3df;border-radius:9px;padding:12px;background:#fff;color:#172b43;font-size:15px}
#auth-gate.welcome-auth #auth-form label,#auth-gate.welcome-auth #auth-recovery label{font-size:13px;font-weight:600;color:#344b65;margin:16px 0 7px}
#auth-gate.welcome-auth #auth-submit,#auth-gate.welcome-auth #auth-change-password{width:100%;min-height:48px;border:0;border-radius:9px;background:#205ca4;color:#fff;font-weight:600;margin:8px 0 16px}
#auth-gate.welcome-auth #auth-signup,#auth-gate.welcome-auth #auth-reset,#auth-gate.welcome-auth .auth-back{background:transparent;border:0;box-shadow:none;color:#526a85;font-size:12px;padding:5px 0;min-height:32px}
#auth-gate.welcome-auth #auth-reset{float:right}
#auth-gate.welcome-auth .auth-back{margin-bottom:4px}
#auth-gate.welcome-auth .hint{color:#66758a}
#auth-gate.welcome-auth .web-signin-choices:has(.social-options[hidden]) .auth-divider{display:none}
#auth-gate.welcome-auth:has(#auth-recovery:not([hidden])) .web-signin-choices,#auth-gate.welcome-auth:has(#auth-recovery:not([hidden])) .auth-back{display:none}
.download-app-link{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;padding:12px 14px;border-radius:9px;font-weight:500}
.download-app-link:hover{background:var(--accent-soft);color:var(--accent)}
.download-app-link svg{width:20px;height:20px;flex-shrink:0}

/* Prominent, dismissible dashboard onboarding. */
.help-welcome{background:linear-gradient(120deg,#173e72,#205ca4)!important;color:#fff;border:1px solid #3974b8!important;padding:26px!important;box-shadow:0 8px 24px #163e7220;gap:22px}
.help-welcome[hidden]{display:none!important}.help-welcome-icon{display:grid;place-items:center;flex:0 0 52px;height:52px;border-radius:16px;background:#ffffff1c;font-size:30px;color:#a9dbff}.help-welcome-copy{flex:1}.help-welcome-label{font-size:11px;font-weight:800;letter-spacing:.14em;color:#bedcff}.help-welcome h2{font-size:23px;line-height:1.3;margin:5px 0 8px;color:#fff}.help-welcome p{font-size:14px;line-height:1.65;color:#e0edff;max-width:570px}.help-welcome-actions{display:flex;flex-direction:column;align-items:center;gap:10px;flex-shrink:0}.help-welcome-actions .btn{background:#fff;color:#173e72;border:1px solid #fff;font-weight:750;padding:12px 20px;white-space:nowrap}.help-welcome-actions .btn:hover{background:#e4f0ff}.help-welcome-dismiss{background:transparent;border:0;color:#e0edff;font:inherit;font-size:13px;cursor:pointer;padding:7px 14px;text-decoration:underline;text-underline-offset:3px}.help-welcome button:focus-visible{outline:3px solid #b5e4ff;outline-offset:4px}@media(max-width:600px){.help-welcome{gap:14px;padding:22px!important}.help-welcome-icon{display:none}.help-welcome-actions{flex-direction:row;flex-wrap:wrap;align-self:stretch;justify-content:space-between}.help-welcome h2{font-size:22px}}

/* Interactive tutorial: scoped so application controls keep their layout. */
.help-dialog{width:min(850px,calc(100vw - 24px))}
.help-dialog select{width:100%;font:inherit;padding:10px;border:1px solid #a1adbd;border-radius:8px;background:#fff;color:#172333}
.help-dialog progress{width:100%;height:7px;margin-top:16px;accent-color:#2463b3}
.help-instructions{padding-left:24px;line-height:1.65}.help-instructions li{padding:5px 0 8px 5px}
.help-route{background:#eff5fc;border-radius:10px;padding:18px 22px 18px 42px}
.help-actions{flex-wrap:wrap;align-items:center}.help-actions a{color:#185caa;text-underline-offset:3px}
.help-actions [aria-pressed="true"]{background:#184f8f;color:white}
.help-figure{margin:22px 0}.help-image-button{display:block;width:100%;padding:0;border:1px solid #c2cede;border-radius:10px;overflow:hidden;background:#f4f7fa;cursor:zoom-in}
.help-image-button img{display:block;width:100%;max-height:300px;object-fit:contain}.help-figure.enlarged img{max-height:none}.help-figure.enlarged button{cursor:zoom-out}
.help-figure figcaption{font-size:12px;color:#526279;margin-top:8px;line-height:1.5}
.help-highlight{outline:4px solid #eaa52b!important;outline-offset:5px;box-shadow:0 0 0 9px #eaa52b25!important}
.help-resume{position:fixed;z-index:9999;bottom:18px;right:18px;max-width:min(580px,calc(100vw - 36px));display:flex;flex-wrap:wrap;gap:10px;align-items:center;background:#fff;color:#172333;padding:16px;border:2px solid #2463b3;border-radius:12px;box-shadow:0 8px 32px #142b4933}
.help-resume span{flex-basis:100%;font-weight:600}
@media(max-width:600px){.help-dialog{padding:18px}.help-dialog h3{font-size:21px}.help-image-button img{max-height:210px}}

/* Keep account access anchored below the main navigation, including compact mode. */
.app-sidebar{display:flex;flex-direction:column;box-sizing:border-box}
.sidebar-footer{margin-top:auto;padding-top:20px}
.sidebar-footer .sidebar-item{border-top:1px solid var(--line);border-radius:0}
@media(min-width:761px){.app-sidebar{height:calc(100dvh - 132px)}}

.settings-heading{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.settings-heading h1{margin:0}.settings-heading .ver{margin-left:0}

.header-status-stack{display:flex;flex-direction:column;align-items:flex-end;gap:5px;margin-left:auto;max-width:100%}
.header-roster-status{font-size:12px;line-height:1.4;color:var(--ink-3)}
.roster-status-clear,.roster-status-link{display:inline-flex;align-items:center;gap:6px;text-align:right}
.roster-status-clear>span{color:var(--ok)}
.roster-status-link{border:0;background:transparent;padding:0;color:var(--accent);font:inherit;cursor:pointer}
.roster-status-link:hover{text-decoration:underline;text-underline-offset:3px}
.roster-status-link:disabled{opacity:.6;cursor:default}
.roster-status-dot{width:6px;height:6px;border-radius:50%;background:currentColor;flex:none}
@media(min-width:761px){.app-sidebar{height:calc(100dvh - 132px)}}
@media(max-width:600px){.header-status-stack{align-items:flex-start;width:100%}.roster-status-clear,.roster-status-link{text-align:left}}

/* Desktop background-upload confirmation keeps its checkbox beside the text. */
.scanner-upload-confirm{display:flex;align-items:flex-start;gap:10px;margin-top:16px}
.scanner-upload-confirm input[type="checkbox"]{width:auto;flex:none;margin:3px 0 0}

.brand-status-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:1;min-width:0}
.brand-status-row .brand{width:auto;flex:none;margin-right:0}
.brand-status-row .header-roster-status{margin-left:auto;text-align:right}
@media(max-width:600px){.brand-status-row{gap:10px}.brand-status-row .header-roster-status{font-size:11px}.brand-status-row .roster-status-clear,.brand-status-row .roster-status-link{text-align:right}}

.help-page-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:18px 0}
.help-page-menu .btn{text-align:left;white-space:normal}
.help-page-parts{display:grid;gap:12px;margin:18px 0}
.help-page-parts section{padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.help-page-parts h4{margin:0 0 6px;font-size:15px}
.help-page-parts p{margin:0 0 12px;line-height:1.6}
@media(max-width:600px){.help-page-menu{grid-template-columns:1fr}}

/* Tutorial comparison: paired flow diagrams and a semantic comparison table. */
.help-upload-flows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}
.help-upload-flows section{padding:18px;border:1px solid #c7d8ed;border-radius:12px;background:#f2f7fd}
.help-upload-flows h4{margin:0 0 14px;color:#173e72;font-size:17px}
.help-upload-flows ol{margin:0;padding-left:24px;line-height:1.55}
.help-upload-flows li{padding:0 0 12px 4px}
.help-upload-flows li:last-child{padding-bottom:0}
.help-upload-table{overflow-x:auto;border:1px solid #c7d8ed;border-radius:10px;margin:20px 0}
.help-upload-table table{width:100%;min-width:600px;border-collapse:collapse;table-layout:fixed;font-size:14px;line-height:1.55}
.help-upload-table caption{text-align:left;padding:14px;font-weight:700;background:#eff5fc}
.help-upload-table th,.help-upload-table td{white-space:normal;text-align:left;vertical-align:top;padding:12px;border-bottom:1px solid #dae3ef}
.help-upload-table thead th{background:#173e72;color:#fff}
.help-upload-table th:first-child{width:24%}
.help-upload-table tbody th{background:#f4f7fb;color:#173e72}
.help-upload-table tbody tr:last-child>*{border-bottom:0}
@media(max-width:600px){.help-upload-flows{grid-template-columns:1fr}}
.desktop-updates{margin-top:24px;padding:20px}.desktop-updates h2{margin-top:0}.desktop-updates button{margin:0 8px 8px 0}
.desktop-update-banner{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:14px 22px;background:#eaf3ff;border-bottom:1px solid #adc9ec;color:#173e72}.desktop-update-banner[hidden]{display:none}.desktop-update-banner span{flex:1;min-width:220px;font-weight:600}
@media print{.desktop-update-banner,.desktop-updates{display:none!important}}
.email-preference{display:flex;align-items:flex-start;gap:10px;line-height:1.5;margin:12px 0}.email-preference input{width:auto!important;margin-top:4px;flex:none}

/* Account is a workspace page, with independent settings cards. */
.account-page{max-width:1060px;margin:0 auto;padding:8px 0 32px}
.account-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}
.account-heading h1{margin:0 0 8px;font-size:30px;letter-spacing:-.03em}
.account-eyebrow{color:var(--accent);font-size:11px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;margin:0 0 8px}
.account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.account-card{padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
.account-card h2,.account-signout h2{font-size:17px;margin:0 0 12px}
.account-card .hint{line-height:1.6}
.account-card .acct-msg{min-height:18px}
.account-feedback{grid-column:1/-1}
.account-feedback .f{margin-bottom:14px}
.account-feedback textarea{width:100%;resize:vertical;min-height:130px}
.account-signout{display:flex;justify-content:space-between;align-items:center;gap:20px}
@media(max-width:760px){.account-grid{grid-template-columns:1fr}.account-heading{align-items:flex-start;flex-direction:column}.account-card{padding:18px}}
.account-card input[type=email],.account-card input[type=password]{width:100%;background:var(--surface);border:1px solid var(--line-strong);border-radius:6px;padding:9px 10px;min-height:38px}

.header-status-stack{flex-direction:row;align-items:center;flex-wrap:wrap;gap:12px 20px}
@media(max-width:600px){.header-status-stack{align-items:center;gap:8px 14px}}

/* Native-inspired workspace typography and surfaces. */
:root{--r:14px;--accent:#007AFF;--accent-hi:#0066D6;--accent-soft:#E8F2FF;--ground:#F5F5F7;--surface-2:#F2F2F7;--line:#E3E3E8;--line-strong:#CBCBD2;--ink:#1D1D1F;--ink-2:#48484A;--ink-3:#6E6E73;--shadow:0 2px 12px rgba(0,0,0,.035)}
:root[data-theme=dark]{--ground:#1C1C1E;--surface:#2C2C2E;--surface-2:#363638;--line:#414144;--line-strong:#59595D;--ink:#F5F5F7;--ink-2:#D1D1D6;--ink-3:#AEAEB2;--accent:#0A84FF;--accent-hi:#409CFF;--accent-soft:#173657;--on-accent:#FFF}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--ground:#1C1C1E;--surface:#2C2C2E;--surface-2:#363638;--line:#414144;--line-strong:#59595D;--ink:#F5F5F7;--ink-2:#D1D1D6;--ink-3:#AEAEB2;--accent:#0A84FF;--accent-hi:#409CFF;--accent-soft:#173657;--on-accent:#FFF}}
body{font-size:14px;letter-spacing:-.012em}
label.lb,.pick .pl,.brand span{font-family:inherit;text-transform:none;letter-spacing:0;font-size:12px;font-weight:500;color:var(--ink-2)}
.btn{border-radius:8px;font-weight:500;box-shadow:0 1px 2px rgba(0,0,0,.025);transition:background .15s,border-color .15s}
.btn.sm{padding:7px 12px;font-size:12px}
input[type=text],input[type=date],input[type=number],input[type=email],input[type=password],select,textarea{border-radius:8px;padding:10px 12px}
.sidebar-item{border-radius:9px;font-weight:500}
.sidebar-item[aria-current=page]{background:var(--accent-soft);color:var(--accent)}
.bar{background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.brand b{font-weight:600}.bar-in{padding-top:12px;padding-bottom:12px}
.roster-page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:8px 0 28px}
.roster-page-heading h1{font-size:34px;font-weight:700;letter-spacing:-.045em;line-height:1.2;margin:0 0 8px}
.roster-page-heading p{margin:0;color:var(--ink-3);font-size:14px}
.roster-page-heading .roster-eyebrow{font-size:12px;font-weight:500;color:var(--accent);margin-bottom:7px}
.roster-page-badge{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:7px 13px;color:var(--ink-3);font-size:12px;white-space:nowrap}
.roster-single{max-width:1120px;margin:0 auto}.roster-card{border-radius:16px;box-shadow:var(--shadow)}
.roster-card .panel-hd{padding:20px 24px;background:var(--surface);border-bottom:1px solid var(--line)}
.roster-card .panel-hd h2{font-size:18px;letter-spacing:-.025em;font-weight:600}
.roster-card .panel-bd{padding:24px}.roster-card .grid{gap:20px}
.roster-card label.lb{text-transform:none;letter-spacing:0;font-weight:500;font-size:12px}
.roster-card .addbar{padding:18px 24px;background:var(--surface-2);gap:12px}
.roster-card th{font-family:inherit;text-transform:none;letter-spacing:0;font-weight:500;color:var(--ink-3);background:var(--surface-2);padding-top:13px;padding-bottom:13px}
.roster-card td{padding-top:12px;padding-bottom:12px;border-bottom-color:var(--line)}
.start-card{border-radius:20px;box-shadow:var(--shadow);padding:40px}.start-card h2{font-size:28px;letter-spacing:-.035em}
@media(max-width:760px){.roster-page-heading{margin-bottom:20px}.roster-page-heading h1{font-size:29px}.roster-page-badge{display:none}.roster-card .panel-hd,.roster-card .panel-bd,.roster-card .addbar{padding:18px}.roster-card .grid{gap:16px}}
@media(prefers-reduced-motion:reduce){.btn{transition:none}}
.roster-card table.roster th{text-transform:none;letter-spacing:0;font-weight:500;color:var(--ink-3);padding:13px 10px;border-bottom-color:var(--line)}
.roster-card table.roster td{padding:12px 10px}
.roster-card .seg{padding:3px;gap:3px;background:var(--surface-2);border:0;border-radius:9px;overflow:visible}
.roster-card .seg button{border:0;border-radius:6px;background:transparent;padding:7px 10px;color:var(--ink-2)}
.roster-card .seg button[aria-pressed=true]{background:var(--surface);color:var(--ink);font-weight:500;box-shadow:0 1px 4px rgba(0,0,0,.12)}
#add-cert{font-family:inherit;letter-spacing:0}
