/* Power & Sun MRS — application stylesheet (v2, mobile-first refresh). No external fonts or scripts. */
:root{--orange:#E9622B;--orange-d:#c84d1c;--orange-bg:#fff1ea;--amber:#F6A63A;--navy:#1E4F9E;--navy-2:#173f80;--navy-3:#12315f;--ink:#1c2230;--muted:#6b7280;--line:#e5e7eb;--line-2:#eef0f3;--bg:#f3f5f9;--card:#fff;--green:#15803d;--green-bg:#dcfce7;--amber-text:#b45309;--amber-bg:#fef3c7;--red:#b91c1c;--red-bg:#fee2e2;--blue:#1d4ed8;--blue-bg:#dbeafe;--teal:#0f766e;--teal-bg:#ccfbf1;--grey-bg:#e5e7eb;--radius:12px;--radius-sm:8px;--shadow:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.08);--shadow-lg:0 8px 24px rgba(16,24,40,.12);--focus:0 0 0 3px rgba(233,98,43,.28);--nav-h:58px}
*{box-sizing:border-box}html{font-size:15px;-webkit-text-size-adjust:100%}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.5;-webkit-font-smoothing:antialiased}
a{color:var(--navy-2)}a:hover{color:var(--orange-d)}
h1{font-size:1.5rem;margin:.2rem 0 .6rem;letter-spacing:-.01em}h2{font-size:1.12rem;margin:0 0 .6rem;letter-spacing:-.01em}h3{font-size:.98rem;margin:1rem 0 .4rem}p{margin:.3rem 0 .7rem}
.muted{color:var(--muted)}.small{font-size:.85rem}.mt{margin-top:1rem}.right{text-align:right}.center{text-align:center}.nowrap{white-space:nowrap}.inline{display:inline}

/* ---- shell ---- */
.shell{display:flex;min-height:100vh}
.sidebar{width:252px;background:linear-gradient(180deg,var(--navy) 0%,var(--navy-3) 100%);color:#dbe3f5;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;overflow-y:auto;flex-shrink:0}
.brand{display:block;padding:.9rem 1rem .8rem;border-bottom:1px solid rgba(255,255,255,.08)}.brand-card{background:#fff;border-radius:10px;padding:.5rem .6rem}.brand-card img{width:100%;display:block}
.brand-mark{width:40px;height:40px;flex-shrink:0}.brand-mark img{width:40px;height:40px;display:block}.brand-logo{width:220px;max-width:100%;display:block;margin:0 auto .6rem}
.brand-name{font-weight:800;color:#fff;letter-spacing:.02em}.brand-name .p{color:var(--orange)}.brand-name .s{color:var(--amber)}.brand-sub{font-size:.72rem;opacity:.75}
.brand-lg{padding:0 0 1rem;border:0}.brand-lg .brand-name{color:var(--navy)}.brand-lg .brand-sub{color:var(--muted)}
.sidebar nav{padding:.5rem 0;flex:1}.nav-group{font-size:.66rem;text-transform:uppercase;letter-spacing:.14em;opacity:.55;padding:.9rem 1rem .3rem}
.sidebar nav a{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem .5rem .9rem;color:#dbe3f5;text-decoration:none;font-size:.92rem;border-left:3px solid transparent;transition:background .15s}
.sidebar nav a:hover{background:rgba(255,255,255,.07);color:#fff}.sidebar nav a.active{background:rgba(255,255,255,.13);border-left-color:var(--amber);color:#fff;font-weight:600}
.badge{background:var(--orange);color:#fff;border-radius:99px;font-size:.68rem;padding:.08rem .45rem;font-weight:700;line-height:1.3}
.sidebar-foot{padding:1rem;border-top:1px solid rgba(255,255,255,.08);text-align:center}.group-name{font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;opacity:.7}.group-logos{display:grid;grid-template-columns:1fr 1fr;gap:.4rem;margin:.45rem 0}.group-card{background:#fff;border-radius:8px;padding:.3rem .4rem;display:flex;align-items:center;justify-content:center;height:44px}.group-card img{max-width:100%;max-height:100%;width:auto;height:auto;display:block}.group-sub{font-size:.66rem;opacity:.6;letter-spacing:.06em}
.sidebar-foot .foot-links{margin-top:.5rem;font-size:.7rem}.sidebar-foot .foot-links a{color:#c7d3ec}
.main{flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{display:flex;align-items:center;gap:.8rem;background:#fff;border-bottom:3px solid var(--amber);padding:.55rem 1.2rem;position:sticky;top:0;z-index:15;min-height:var(--nav-h)}
.topbar-title{font-weight:700;font-size:1.05rem;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar-right{display:flex;align-items:center;gap:.7rem}.clock{font-size:.78rem;color:var(--muted);white-space:nowrap}
.icon-btn{display:none;background:none;border:1px solid var(--line);border-radius:8px;font-size:1.1rem;padding:.2rem .55rem;cursor:pointer;line-height:1.4}
.js-back{white-space:nowrap}
.user-chip{display:flex;align-items:center;gap:.5rem;text-decoration:none;color:inherit}.user-meta{display:flex;flex-direction:column;line-height:1.15}.user-meta small{color:var(--muted);font-size:.72rem}
.avatar{width:34px;height:34px;border-radius:50%;background:var(--navy-2);color:#fff;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:700;flex-shrink:0}
.content{padding:1.2rem;flex:1}.foot{padding:.8rem 1.2rem;font-size:.72rem;color:var(--muted);border-top:1px solid var(--line);display:flex;gap:.8rem;flex-wrap:wrap;justify-content:space-between}
.topsearch{display:flex;gap:.3rem}.topsearch input{width:230px;padding:.4rem .7rem;border:1px solid var(--line);border-radius:99px;font:inherit;font-size:.85rem;background:#f8fafc}.topsearch input:focus{background:#fff}
.search-toggle{display:none}

/* ---- cards & grids ---- */
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:1.1rem 1.2rem;margin-bottom:1.1rem;border:1px solid rgba(16,24,40,.04)}.card.narrow{max-width:560px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:.6rem}.card-head h2{margin:0}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1.1rem}.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:1.1rem}.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem}
.stat{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:.9rem 1rem;border:1px solid rgba(16,24,40,.04)}.stat .label{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.stat .value{font-size:1.6rem;font-weight:700;margin:.1rem 0;color:var(--navy);letter-spacing:-.02em}.stat .sub{font-size:.8rem;color:var(--muted)}
.stat.ok .value{color:var(--green)}.stat.warn .value{color:#b45309}.stat.bad .value{color:var(--red)}

/* ---- tables ---- */
.table{width:100%;border-collapse:collapse;font-size:.9rem}.table th,.table td{padding:.55rem .6rem;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.table th{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);background:#f8fafc;position:sticky;top:0}
.table.small{font-size:.83rem}.table tbody tr:hover td,.table tr:hover td{background:#fbfcfe}.table tfoot td{font-weight:700;background:#f8fafc}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:var(--radius-sm)}
.pill{display:inline-block;padding:.12rem .58rem;border-radius:99px;font-size:.73rem;font-weight:600;white-space:nowrap;line-height:1.5}
.pill-green{background:var(--green-bg);color:var(--green)}.pill-amber{background:#fdecd2;color:#9a5a00}.pill-red{background:var(--red-bg);color:var(--red)}.pill-blue{background:var(--blue-bg);color:var(--blue)}.pill-teal{background:var(--teal-bg);color:var(--teal)}.pill-grey{background:var(--grey-bg);color:#374151}

/* ---- buttons ---- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;border:1px solid var(--line);background:#fff;color:var(--ink);padding:.48rem .95rem;border-radius:var(--radius-sm);font-size:.9rem;font-weight:500;cursor:pointer;text-decoration:none;line-height:1.3;transition:background .15s,box-shadow .15s;white-space:nowrap}
.btn:hover{background:#f3f4f6;color:var(--ink)}.btn:focus-visible{outline:none;box-shadow:var(--focus)}.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-primary{background:var(--orange);border-color:var(--orange);color:#fff}.btn-primary:hover{background:var(--orange-d);border-color:var(--orange-d);color:#fff}
.btn-dark{background:var(--navy);border-color:var(--navy);color:#fff}.btn-dark:hover{background:var(--navy-2);color:#fff}
.btn-danger{background:#fff;border-color:#fecaca;color:var(--red)}.btn-danger:hover{background:var(--red-bg)}
.btn-ghost{background:transparent;border-color:transparent;color:var(--muted)}.btn-ghost:hover{background:#f3f4f6;color:var(--ink)}
.btn-sm{padding:.28rem .62rem;font-size:.8rem}.btn-lg{padding:.75rem 1.3rem;font-size:1.02rem;font-weight:600}.btn-block{width:100%}
.stack{display:flex;flex-direction:column;gap:.8rem}

/* ---- forms ---- */
label{display:flex;flex-direction:column;gap:.25rem;font-size:.88rem;font-weight:600}label .help{font-weight:400;color:var(--muted);font-size:.8rem}
input[type=text],input[type=password],input[type=number],input[type=date],input[type=month],input[type=time],input[type=search],input[type=email],select,textarea{width:100%;padding:.52rem .65rem;border:1px solid #cfd4dc;border-radius:var(--radius-sm);font:inherit;font-size:.92rem;background:#fff;color:var(--ink);min-height:40px}
input[type=file]{font-size:.85rem}
textarea{min-height:90px;resize:vertical}input:focus,select:focus,textarea:focus{outline:none;box-shadow:var(--focus);border-color:var(--orange)}
input[readonly],.computed{background:#f3f4f6;color:#374151}input.is-invalid,select.is-invalid{border-color:var(--red)}
.check{flex-direction:row;align-items:flex-start;gap:.6rem;font-weight:500}.check input{width:auto;margin-top:.25rem;min-height:0}
.form-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:.85rem 1rem}.form-grid>*{min-width:0}.section-body,.card{min-width:0}.table-wrap{max-width:100%}.form-grid .span-2{grid-column:span 2}.form-grid .span-all{grid-column:1/-1}
.filters{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center;margin-bottom:.9rem}.filters input,.filters select{width:auto;min-width:150px}
.flash{padding:.75rem .95rem;border-radius:var(--radius-sm);margin-bottom:.9rem;font-size:.9rem;border:1px solid transparent}.flash ul{margin:.3rem 0 0 1rem}.flash-ok{background:var(--green-bg);color:var(--green);border-color:#bbf7d0}.flash-warn{background:#fdecd2;color:#9a5a00;border-color:#fcd9b0}.flash-err{background:var(--red-bg);color:var(--red);border-color:#fecaca}
.dl{display:grid;grid-template-columns:max-content 1fr;gap:.35rem 1rem;font-size:.9rem}.dl dt{color:var(--muted)}.dl dd{margin:0;min-width:0;overflow-wrap:anywhere}

/* ---- guest ---- */
.guest{background:radial-gradient(circle at 20% 20%,#2a63b8 0%,var(--navy) 45%,var(--navy-3) 100%);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem}.guest-wrap{width:100%;max-width:440px}
.guest-card{background:#fff;border-radius:16px;padding:1.6rem 1.5rem 1.4rem;box-shadow:var(--shadow-lg)}.guest-group{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:1rem;color:#dbe3f5;font-size:.8rem}.guest-group img{height:26px;background:#fff;border-radius:6px;padding:.15rem .4rem}.guest-foot{color:#c7d3ec;font-size:.72rem;text-align:center;margin-top:.7rem}.guest-foot a{color:#fff}

/* ---- dashboard ---- */
.due-list{display:flex;flex-direction:column;gap:.6rem}.due{display:flex;align-items:center;gap:.9rem;padding:.7rem .9rem;border:1px solid var(--line);border-radius:10px;background:#fff}.due.overdue{border-color:#fecaca;background:#fff7f7}.due .meta{flex:1;min-width:0}.due small{display:block;color:var(--muted)}
.howto{background:linear-gradient(135deg,#fff7f2,#fff);border:1px solid #fbd9c4}.howto ol{margin:.3rem 0 .4rem 1.1rem;padding:0}.howto li{margin:.15rem 0}
.task-row.overdue td{background:#fff7f5}.prio-Critical{color:var(--red);font-weight:700}.prio-High{color:#b45309;font-weight:600}.task-mini{display:flex;justify-content:space-between;gap:.6rem;padding:.4rem 0;border-bottom:1px solid #f1f3f6;font-size:.86rem}.task-mini:last-child{border:0}
.checkin-card{background:linear-gradient(135deg,#f5f8ff,#fff);border:1px solid #d6e2f7}

/* ---- report forms ---- */
.section{border:1px solid var(--line);border-radius:var(--radius);margin-bottom:1rem;background:#fff;box-shadow:var(--shadow)}.section-head{padding:.75rem 1rem;background:#f8fafc;border-bottom:1px solid var(--line);border-radius:var(--radius) var(--radius) 0 0}.section-head h3{margin:0;font-size:1rem}.section-head p{margin:.25rem 0 0;color:var(--muted);font-size:.83rem}.section-body{padding:1rem}
.note{background:#fffbeb;border-left:3px solid #f59e0b;padding:.55rem .75rem;font-size:.85rem;border-radius:0 6px 6px 0}
.ftable{width:100%;border-collapse:collapse;font-size:.85rem}.ftable th{font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);padding:.35rem .3rem;text-align:left;border-bottom:1px solid var(--line);white-space:nowrap}.ftable td{padding:.25rem .2rem;vertical-align:top}.ftable td input,.ftable td select{padding:.35rem .4rem;min-height:34px;font-size:.85rem}.ftable td.rowlabel{font-weight:600;font-size:.82rem;padding-top:.5rem;min-width:140px}
.ftable .rm{color:var(--red);background:none;border:0;cursor:pointer;font-size:1.05rem;padding:0 .3rem}
.ftable-view td{padding:.35rem .4rem}
.view-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:.5rem 1.2rem}.view-grid .kv{display:flex;flex-direction:column;padding:.35rem 0;border-bottom:1px dashed #eef0f3}.view-grid .kv .k{font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}.view-grid .kv.span-all{grid-column:1/-1}
.stars{color:#f59e0b;letter-spacing:.05em}
.notice{display:flex;justify-content:space-between;gap:1rem;padding:.7rem .8rem;border:1px solid var(--line);border-radius:8px;margin-bottom:.5rem}.notice.read{opacity:.65}.notice.level-3,.notice.level-4{border-color:#fecaca;background:#fff7f7}.notice .actions{display:flex;gap:.4rem;align-items:flex-start}
.timeline{list-style:none;padding:0;margin:0}.timeline li{padding:.45rem 0;border-bottom:1px solid #f1f3f6;font-size:.88rem}
.progress{height:8px;background:#e5e7eb;border-radius:99px;overflow:hidden}.progress span{display:block;height:100%;background:var(--green)}.progress.warn span{background:#f59e0b}.progress.bad span{background:var(--red)}
.sticky-actions{position:sticky;bottom:0;background:#fff;border-top:1px solid var(--line);padding:.7rem 1rem;display:flex;gap:.5rem;align-items:center;justify-content:flex-end;flex-wrap:wrap;border-radius:0 0 var(--radius) var(--radius);z-index:6;box-shadow:0 -4px 12px rgba(16,24,40,.06)}
.legend{font-size:.8rem;color:var(--muted)}.kbd{font-family:ui-monospace,Menlo,monospace;background:#f3f4f6;padding:.05rem .3rem;border-radius:4px;font-size:.85em}
pre.code{background:#0f172a;color:#e2e8f0;padding:1rem;border-radius:8px;overflow:auto;font-size:.8rem}textarea.code{font-family:ui-monospace,Menlo,monospace;font-size:.8rem;min-height:420px}
.tabs{display:flex;gap:.3rem;border-bottom:1px solid var(--line);margin-bottom:1rem;overflow-x:auto}.tabs a{padding:.5rem .8rem;text-decoration:none;color:var(--muted);border-bottom:2px solid transparent;font-weight:600;white-space:nowrap}.tabs a.active{color:var(--navy);border-bottom-color:var(--orange)}
th.sortable a{color:inherit;text-decoration:none;white-space:nowrap}th.sortable a:hover{color:var(--orange)}th.sortable.active a{color:var(--navy)}.sort-idle{opacity:.35;font-size:.7rem}.sort-on{color:var(--orange);font-size:.7rem}
input.computed.rag-G{background:var(--green-bg);color:var(--green);font-weight:700;text-align:center}input.computed.rag-A{background:#fdecd2;color:#9a5a00;font-weight:700;text-align:center}input.computed.rag-R{background:var(--red-bg);color:var(--red);font-weight:700;text-align:center}
.duration{display:inline-flex;align-items:center;gap:.25rem;white-space:nowrap}.duration input,.duration select{padding:.35rem .4rem;min-height:34px}
.pagination ul{list-style:none;display:flex;gap:.3rem;padding:0;margin:.8rem 0 0;flex-wrap:wrap;align-items:center}.pagination li a,.pagination li span{display:inline-block;padding:.25rem .6rem;border:1px solid var(--line);border-radius:6px;font-size:.85rem;background:#fff;text-decoration:none}.pagination li.active span{background:var(--navy);color:#fff;border-color:var(--navy)}.pagination li.disabled span,.pagination li.muted span{color:var(--muted);border-color:transparent;background:transparent}
.bar{display:inline-block;width:80px;height:6px;background:#e5e7eb;border-radius:3px;vertical-align:middle;margin-left:.3rem;overflow:hidden}.bar span{display:block;height:100%}.bar-navy{background:var(--navy)}.bar-green{background:var(--green)}.bar-amber{background:#f59e0b}.bar-red{background:var(--red)}
[hidden]{display:none!important}

/* ---- step-by-step report form ---- */
.stepper{display:flex;gap:.35rem;list-style:none;padding:0 0 .2rem;margin:0 0 1rem;overflow-x:auto;scrollbar-width:thin;max-width:100%;min-width:0;-webkit-overflow-scrolling:touch}.stepper li{flex-shrink:0}.stepper button{display:flex;align-items:center;gap:.4rem;border:1px solid var(--line);background:#fff;border-radius:99px;padding:.32rem .75rem .32rem .35rem;font:inherit;font-size:.8rem;color:var(--muted);cursor:pointer;white-space:nowrap}
.stepper button .n{width:22px;height:22px;border-radius:50%;background:#e5e7eb;color:#374151;display:inline-flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:700}
.stepper button.active{border-color:var(--orange);color:var(--ink);background:var(--orange-bg);font-weight:600}.stepper button.active .n{background:var(--orange);color:#fff}.stepper button.done .n{background:var(--green);color:#fff}.stepper button.has-error{border-color:#fecaca;color:var(--red)}
.step-progress{height:5px;background:#e5e7eb;border-radius:99px;overflow:hidden;margin:-.4rem 0 1rem}.step-progress span{display:block;height:100%;background:linear-gradient(90deg,var(--orange),var(--amber));transition:width .25s}
.js-form{min-width:0;max-width:100%}.kbd{overflow-wrap:anywhere}.js-form.stepped .section.step{display:none}.js-form.stepped .section.step.current{display:block}
.step-meta{font-size:.8rem;color:var(--muted);margin-right:auto}

/* ---- cookie notice ---- */
.cookie-notice{position:fixed;left:1rem;right:1rem;bottom:1rem;z-index:40;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);padding:.8rem 1rem;display:flex;gap:1rem;align-items:center;font-size:.85rem;max-width:760px;margin:0 auto}

/* ---- mobile bottom navigation & drawer ---- */
.bottom-nav{display:none}
.drawer-overlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:19}
.drawer-overlay.show{display:block}

@media (max-width:1100px){.grid-4{grid-template-columns:1fr 1fr}.grid-3{grid-template-columns:1fr 1fr}}
@media (max-width:960px){.grid-2{grid-template-columns:1fr}.topsearch input{width:170px}}
@media (max-width:760px){
  html{font-size:15.5px}
  .sidebar{position:fixed;left:-270px;top:0;bottom:0;height:100%;width:270px;transition:left .22s;z-index:20;box-shadow:none}.sidebar.open{left:0;box-shadow:var(--shadow-lg)}
  .icon-btn{display:block}.topsearch{display:none}.search-toggle{display:block}.topbar.search-open .topsearch{display:flex;position:absolute;left:0;right:0;top:100%;background:#fff;padding:.5rem .8rem;border-bottom:1px solid var(--line)}.topbar.search-open .topsearch input{flex:1;width:auto}
  .topbar{padding:.5rem .8rem;gap:.5rem}.user-meta{display:none}.clock{display:none}.topbar .btn-ghost.js-back{padding:.25rem .4rem}
  .content{padding:.8rem;padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 1.2rem)}.card{padding:.9rem .95rem;border-radius:10px}.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}.form-grid .span-2{grid-column:auto}.filters input,.filters select{min-width:0;flex:1 1 140px}.filters .btn{flex:0 0 auto}
  .card-head{gap:.5rem}.card-head>div{display:flex;gap:.4rem;flex-wrap:wrap}
  .dl{grid-template-columns:1fr}.dl dt{margin-top:.3rem;font-size:.75rem;text-transform:uppercase;letter-spacing:.05em}
  .sticky-actions{bottom:calc(var(--nav-h) + env(safe-area-inset-bottom));border-radius:0;margin:0 -.8rem;padding:.6rem .8rem;max-width:calc(100% + 1.6rem)}.sticky-actions .legend{display:none}.sticky-actions .btn{flex:1 1 auto}
  .foot{padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + .8rem)}
  .bottom-nav{display:flex;position:fixed;left:0;right:0;bottom:0;height:calc(var(--nav-h) + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);z-index:18;justify-content:space-around;align-items:stretch;box-shadow:0 -4px 14px rgba(16,24,40,.08);padding-bottom:env(safe-area-inset-bottom)}
  .bottom-nav a,.bottom-nav button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.1rem;font-size:.66rem;color:var(--muted);text-decoration:none;background:none;border:0;font-family:inherit;cursor:pointer;position:relative}
  .bottom-nav .ic{font-size:1.25rem;line-height:1}.bottom-nav a.active{color:var(--orange);font-weight:600}.bottom-nav .badge{position:absolute;top:6px;right:18%}
  .cookie-notice{left:.6rem;right:.6rem;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + .6rem);flex-direction:column;align-items:stretch;gap:.6rem}
  .stat .value{font-size:1.35rem}.table{font-size:.85rem}.table th,.table td{padding:.45rem .5rem}
}
@media print{.sidebar,.topbar,.foot,.sticky-actions,.btn,.filters,.bottom-nav,.cookie-notice,.stepper,.step-progress{display:none!important}.content{padding:0}.card,.section{box-shadow:none;border:1px solid #ccc;break-inside:avoid}body{background:#fff}.js-form.stepped .section.step{display:block!important}}

/* ---- colour codes ---- */
.pill-navy{background:#dbe5f7;color:var(--navy)}
.due.due-soon{border-color:#fcd9b0;background:#fffaf3}.due.on-track{border-left:4px solid var(--green)}.due.overdue{border-left:4px solid var(--red)}.due.due-soon{border-left:4px solid var(--amber)}
.due .freq{display:none}
.score-g{color:var(--green);font-weight:700}.score-a{color:#9a5a00;font-weight:700}.score-r{color:var(--red);font-weight:700}
tr.row-late td{background:#fffaf3}tr.row-missing td,tr.row-overdue td{background:#fff5f5}tr.row-exempt td{color:var(--muted)}
.legend-codes{display:flex;gap:.5rem .9rem;flex-wrap:wrap;font-size:.78rem;color:var(--muted);align-items:center}.legend-codes .pill{font-size:.7rem}
.prio-Critical,.prio-High{font-weight:600}
.cookie-notice.above-actions{bottom:auto;top:calc(var(--nav-h) + .6rem)}

.pill-purple{background:#ece6fb;color:#4c2d9c}

.date-dmy{display:inline-block;margin-left:.35rem;font-size:.78rem;color:var(--muted);font-variant-numeric:tabular-nums}.date-dmy.empty{opacity:.6}

/* ---- v3 polish: elegant, calmer surfaces, clearer hierarchy ---- */
:root{--radius:14px;--radius-sm:9px;--shadow:0 1px 2px rgba(16,24,40,.04),0 6px 18px -8px rgba(16,24,40,.12);--shadow-lg:0 20px 50px -20px rgba(16,24,40,.35);--focus:0 0 0 3px rgba(233,98,43,.22);--gold-bg:#fbf1d6;--gold:#7a5a00}
body{background:linear-gradient(180deg,#f6f8fc 0%,#f1f4f9 100%) fixed;letter-spacing:.005em}
h1,h2{color:var(--navy-3);font-weight:750}h2{font-size:1.15rem}h3{color:#26324a;font-weight:700;text-transform:none}
.card{border-radius:var(--radius);border:1px solid rgba(30,79,158,.07);box-shadow:var(--shadow);padding:1.2rem 1.35rem}
.card-head{padding-bottom:.55rem;border-bottom:1px solid var(--line-2);margin-bottom:.8rem}
.sidebar{background:linear-gradient(175deg,#1d4d9c 0%,#153b78 55%,#10305e 100%)}
.sidebar nav a{margin:.1rem .55rem;border-radius:9px;border-left:0;padding:.5rem .8rem}.sidebar nav a.active{background:rgba(255,255,255,.16);box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}.sidebar nav a:hover{background:rgba(255,255,255,.1)}
.nav-group{padding:1rem 1.3rem .35rem;opacity:.5}
.topbar{background:rgba(255,255,255,.92);backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--line);box-shadow:0 1px 0 rgba(233,98,43,.35),0 6px 20px -16px rgba(16,24,40,.25)}
.topbar-title{color:var(--navy-3);letter-spacing:-.01em}
.avatar{background:linear-gradient(135deg,var(--orange),var(--amber));box-shadow:0 2px 6px rgba(233,98,43,.35)}
.btn{border-radius:10px;box-shadow:0 1px 1px rgba(16,24,40,.04)}.btn-primary{background:linear-gradient(180deg,#ee6c36,var(--orange));box-shadow:0 2px 8px -2px rgba(233,98,43,.55)}.btn-primary:hover{background:var(--orange-d)}
.btn-dark{background:linear-gradient(180deg,#245aac,var(--navy))}.btn-ghost{box-shadow:none}
input[type=text],input[type=password],input[type=number],input[type=date],input[type=month],input[type=time],input[type=search],input[type=email],input[type=url],select,textarea{border-radius:10px;border-color:#d5dae3;background:#fbfcfe;transition:border-color .15s,box-shadow .15s,background .15s}
input:focus,select:focus,textarea:focus{background:#fff}input[type=url]{width:100%;padding:.52rem .65rem;border:1px solid #d5dae3;border-radius:10px;font:inherit;font-size:.92rem;min-height:40px}
label{color:#2b3548}label .help{line-height:1.35}
.table th{background:#f4f6fa;color:#4b5563;letter-spacing:.07em;border-bottom:2px solid #e3e7ee}.table td{border-bottom:1px solid #eef1f5}.table tbody tr:nth-child(even) td,.table tr:nth-child(even) td{background:#fbfcfe}.table tr:hover td{background:#f5f8ff}
.pill{font-weight:650;letter-spacing:.01em;padding:.15rem .62rem}.pill-gold{background:var(--gold-bg);color:var(--gold)}
.stat{border-radius:var(--radius);background:linear-gradient(180deg,#fff,#fbfcff)}.stat .value{font-weight:800;color:var(--navy-3)}
.section{border-radius:var(--radius);border:1px solid rgba(30,79,158,.08)}.section-head{background:linear-gradient(180deg,#f8fafd,#f2f5fa);border-radius:var(--radius) var(--radius) 0 0}.section-head h3{color:var(--navy-3);font-size:1.02rem}
.note{border-radius:0 10px 10px 0;background:#fffaf0}
.flash{border-radius:10px;box-shadow:0 2px 8px -4px rgba(16,24,40,.12)}
.due{border-radius:11px;transition:box-shadow .15s,transform .15s}.due:hover{box-shadow:var(--shadow);transform:translateY(-1px)}
.guest{background:radial-gradient(circle at 15% 15%,#2f6dc4 0%,#1e4f9e 40%,#0f2c57 100%)}.guest-card{border-radius:20px;padding:1.9rem 1.7rem 1.6rem;box-shadow:0 30px 70px -25px rgba(0,0,0,.55)}
.guest-card h2,.guest-card h1{color:var(--navy-3)}
.pw-wrap{position:relative;display:flex;align-items:center}.pw-wrap input{padding-right:2.6rem;flex:1}.pw-eye{position:absolute;right:.35rem;top:50%;transform:translateY(-50%);border:0;background:transparent;cursor:pointer;font-size:1.05rem;line-height:1;padding:.3rem .45rem;border-radius:8px;color:var(--muted)}.pw-eye:hover{background:#f3f4f6;color:var(--ink)}.pw-eye.on{color:var(--orange)}
.plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:1.1rem;align-items:start}.plan-col .due{margin-bottom:.5rem}.plan-annual{border-top:4px solid var(--gold)}.plan-quarterly{border-top:4px solid #4c2d9c}.plan-monthly{border-top:4px solid var(--navy)}.plan-weekly{border-top:4px solid var(--teal)}.plan-daily{border-top:4px solid var(--blue)}
.matrix td,.matrix th{white-space:nowrap}.matrix td:first-child{white-space:normal;min-width:220px}
.foot{background:transparent}
@media (max-width:760px){.card{padding:1rem 1rem;border-radius:12px}.sidebar nav a{margin:.1rem .4rem}}

/* ---- brand: smaller logo, larger system name ---- */
.brand-card{padding:.35rem .5rem;max-width:199px;margin:0 auto}.brand-card img{width:100%}
.sidebar .brand-sub{font-size:1.02rem;font-weight:800;color:#fff;opacity:1;letter-spacing:.02em;line-height:1.25;margin-top:.5rem!important}
.brand-logo{width:150px;margin:0 auto .5rem}
.brand-lg .brand-name{font-size:1.32rem;font-weight:800;letter-spacing:.01em;line-height:1.2}.brand-lg .brand-sub{font-size:.8rem}

img.avatar{border-radius:50%;display:inline-block;flex-shrink:0;box-shadow:0 2px 6px rgba(16,24,40,.2)}.avatar-lg{border:3px solid #fff;box-shadow:0 4px 14px -4px rgba(16,24,40,.35)}

.budget-grid td input{min-width:80px;width:88px;padding:.25rem .3rem;min-height:30px;font-size:.8rem;text-align:right}.budget-grid td{white-space:nowrap;padding:.25rem .35rem;text-align:right}.budget-grid td:first-child,.budget-grid td:nth-child(2){text-align:left}.budget-grid tr.var-row td{font-size:.78rem;border-bottom:2px solid #e3e7ee}.budget-grid tr.plan-row td:first-child{vertical-align:middle}
/* v3.1 — getting-started flow, manual layout */
.flow{display:flex;flex-wrap:wrap;gap:.5rem;align-items:stretch;margin:.6rem 0 1rem}.flow .step{flex:1 1 150px;min-width:150px;background:linear-gradient(180deg,#fff,#f6f8fb);border:1px solid var(--line);border-radius:12px;padding:.6rem .7rem;position:relative}.flow .step .n{display:inline-block;width:22px;height:22px;border-radius:50%;background:var(--orange);color:#fff;font-weight:800;font-size:.75rem;text-align:center;line-height:22px;margin-right:.35rem}.flow .step strong{display:block;margin:.25rem 0 .2rem;color:var(--navy)}.flow .step .small{line-height:1.35}.flow .step .who{display:block;margin-top:.35rem;font-size:.72rem;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}.flow .step::after{content:"›";position:absolute;right:-.55rem;top:38%;font-size:1.3rem;color:var(--muted)}.flow .step:last-child::after{content:""}
.checklist{list-style:none;padding:0;margin:.3rem 0}.checklist li{padding:.35rem 0 .35rem 1.7rem;position:relative;border-bottom:1px dashed var(--line)}.checklist li::before{content:"☐";position:absolute;left:.2rem;top:.3rem;color:var(--orange);font-weight:700}
.manual-layout{display:grid;grid-template-columns:260px 1fr;gap:1.2rem;align-items:start}.manual-toc{position:sticky;top:70px;max-height:calc(100vh - 90px);overflow:auto;border-right:1px solid var(--line);padding-right:.6rem}.manual-toc ul{list-style:none;padding:0;margin:.3rem 0}.manual-toc li{margin:.15rem 0}.manual-toc .toc-2{padding-left:.6rem}.manual-toc .toc-3{padding-left:1.3rem;font-size:.8rem}.manual-body h2{margin-top:1.6rem;border-bottom:1px solid var(--line);padding-bottom:.25rem}.manual-body h3{margin-top:1.1rem}.manual-body h4{margin-top:.9rem}.manual-body code{background:#f1f3f7;padding:.05rem .3rem;border-radius:4px;font-size:.85em}.manual-body p,.manual-body li{max-width:80ch;line-height:1.55}
@media (max-width:900px){.manual-layout{grid-template-columns:1fr}.manual-toc{position:static;max-height:none;border-right:0}}
/* v3.1 — video guide */
.video-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:1.2rem;align-items:start}.guide-video{width:100%;aspect-ratio:16/10;background:#0f2a55;border-radius:12px;box-shadow:0 10px 30px rgba(15,42,85,.25)}
.video-chapters{max-height:70vh;overflow:auto;border-left:1px solid var(--line);padding-left:1rem}.chapter-list{list-style:none;padding:0;margin:0;counter-reset:ch}.chapter-list li{margin:0}.chapter-list a{display:flex;gap:.5rem;align-items:baseline;padding:.32rem .4rem;border-radius:8px;text-decoration:none;color:var(--text,#1d2733);font-size:.86rem;line-height:1.3}.chapter-list a:hover{background:#f1f4f9}.chapter-list a.current{background:#fff1e8;color:#a33d0d;font-weight:700}.chapter-list a.chapter-head{font-weight:700;margin-top:.35rem;color:var(--navy)}.chapter-list .ts{font-variant-numeric:tabular-nums;color:var(--muted);min-width:44px;font-size:.78rem}
@media (max-width:900px){.video-layout{grid-template-columns:1fr}.video-chapters{border-left:0;padding-left:0;max-height:none}}
/* v3.1 — appearance switch (sidebar) */
.theme-switch{display:flex;gap:.2rem;margin:.6rem 0 .2rem;background:rgba(255,255,255,.09);border-radius:10px;padding:.2rem}.theme-switch button{flex:1;border:0;background:transparent;color:#c7d3ec;font:inherit;font-size:.72rem;font-weight:600;padding:.32rem .2rem;border-radius:8px;cursor:pointer;white-space:nowrap}.theme-switch button:hover{color:#fff;background:rgba(255,255,255,.08)}.theme-switch button.active{background:#fff;color:#12315f;box-shadow:0 1px 3px rgba(0,0,0,.25)}
/* v3.1 — dark theme (html[data-theme=dark], resolved by js/theme.js from the light / dark / system choice) */
html[data-theme=dark]{--bg:#0f1626;--card:#182238;--ink:#e6eaf3;--muted:#98a3b8;--line:#2b3650;--line-2:#25304a;--navy:#9dbbf0;--navy-2:#2b5aa6;--navy-3:#0b1a36;--orange-bg:#3b2114;--green:#5ee49a;--green-bg:#123524;--amber-text:#f6c15b;--amber-bg:#3a2a0a;--red:#ff8a8a;--red-bg:#43201f;--blue:#93c5fd;--blue-bg:#1c3559;--teal:#6ee7d5;--teal-bg:#10403b;--grey-bg:#2e3950;--gold:#f3d67f;--gold-bg:#3a2f10;--shadow:0 1px 2px rgba(0,0,0,.35),0 6px 18px -8px rgba(0,0,0,.55);--shadow-lg:0 20px 50px -20px rgba(0,0,0,.75);color-scheme:dark}
html[data-theme=dark] body{background:linear-gradient(180deg,#0f1626 0%,#0b1120 100%) fixed;color:var(--ink)}
html[data-theme=dark] a{color:#a9c6f5}html[data-theme=dark] .sidebar nav a,html[data-theme=dark] .btn,html[data-theme=dark] .bottom-nav a{color:inherit}html[data-theme=dark] .sidebar nav a{color:#dbe3f5}
html[data-theme=dark] .card,html[data-theme=dark] .stat,html[data-theme=dark] .section,html[data-theme=dark] .due,html[data-theme=dark] .sticky-actions,html[data-theme=dark] .pagination li a,html[data-theme=dark] .pagination li span,html[data-theme=dark] .stepper button,html[data-theme=dark] .cookie-notice,html[data-theme=dark] .bottom-nav,html[data-theme=dark] .guest-card{background:var(--card);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .btn{background:#1f2a44;color:var(--ink);border-color:#34405c}html[data-theme=dark] .btn:hover,html[data-theme=dark] .btn-ghost:hover{background:#2a3754;color:#fff}html[data-theme=dark] .btn-dark{background:linear-gradient(180deg,#2f63b8,#1e4f9e);border-color:#2f63b8;color:#fff}html[data-theme=dark] .btn-primary{color:#fff}
html[data-theme=dark] .topbar{background:rgba(17,26,44,.94);border-bottom-color:var(--line)}html[data-theme=dark] .topsearch input{background:#0f1626;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] input[type=text],html[data-theme=dark] input[type=password],html[data-theme=dark] input[type=number],html[data-theme=dark] input[type=date],html[data-theme=dark] input[type=month],html[data-theme=dark] input[type=time],html[data-theme=dark] input[type=datetime-local],html[data-theme=dark] input[type=email],html[data-theme=dark] input[type=search],html[data-theme=dark] input[type=url],html[data-theme=dark] input[type=tel],html[data-theme=dark] select,html[data-theme=dark] textarea{background:#0f1626;color:var(--ink);border-color:#3a4763}
html[data-theme=dark] input[readonly],html[data-theme=dark] .computed{background:#1f2940;color:#c4ccdb}html[data-theme=dark] input:focus,html[data-theme=dark] select:focus,html[data-theme=dark] textarea:focus{background:#121c30}
html[data-theme=dark] .table th{background:#1d2740;color:#aab4c8;border-bottom-color:#2b3650}html[data-theme=dark] .table td{border-bottom-color:#25304a}html[data-theme=dark] .table tbody tr:nth-child(even) td,html[data-theme=dark] .table tr:nth-child(even) td{background:#1b2540}html[data-theme=dark] .table tbody tr:hover td,html[data-theme=dark] .table tr:hover td{background:#22304d}html[data-theme=dark] .table tfoot td{background:#1d2740}
html[data-theme=dark] .section-head{background:linear-gradient(180deg,#1d2740,#182238);border-bottom-color:var(--line)}html[data-theme=dark] .stat{background:var(--card)}html[data-theme=dark] .flow .step{background:linear-gradient(180deg,#1d2740,#182238)}
html[data-theme=dark] .note{background:#2a2410;color:#f1e6c8;border-left-color:#f6a63a}html[data-theme=dark] .howto{background:linear-gradient(135deg,#2a1c14,#182238);border-color:#4a2c1c}html[data-theme=dark] .checkin-card{background:linear-gradient(135deg,#16233d,#182238);border-color:#2b3f66}
html[data-theme=dark] .flash-warn{background:#3a2a0a;color:#f6c15b;border-color:#5a4212}html[data-theme=dark] .flash-err{background:#43201f;color:#ff8a8a;border-color:#6b2f2f}html[data-theme=dark] .flash-ok{border-color:#1f5a3a}
html[data-theme=dark] .pill-amber{background:#3a2a0a;color:#f6c15b}html[data-theme=dark] .pill-navy{background:#1c3559;color:#a9c6f5}html[data-theme=dark] .pill-purple{background:#2d2350;color:#c9b8f5}html[data-theme=dark] .pill-grey{color:#d5dbe6}html[data-theme=dark] .score-a{color:#f6c15b}
html[data-theme=dark] .due.overdue{background:#3a1d1d;border-color:#6b2f2f}html[data-theme=dark] .due.due-soon{background:#2f2410;border-color:#5a4212}html[data-theme=dark] tr.row-late td{background:#2a2410}html[data-theme=dark] tr.row-missing td,html[data-theme=dark] tr.row-overdue td,html[data-theme=dark] .task-row.overdue td,html[data-theme=dark] .notice.level-3,html[data-theme=dark] .notice.level-4{background:#3a1d1d;border-color:#6b2f2f}
html[data-theme=dark] .task-mini,html[data-theme=dark] .timeline li,html[data-theme=dark] .view-grid .kv,html[data-theme=dark] .checklist li,html[data-theme=dark] .budget-grid tr.var-row td{border-color:#25304a}html[data-theme=dark] .progress{background:#2e3950}
html[data-theme=dark] .kbd,html[data-theme=dark] .manual-body code,html[data-theme=dark] code{background:#25304a;color:#e6eaf3}html[data-theme=dark] .tabs a.active{color:#a9c6f5}html[data-theme=dark] .chapter-list a{color:var(--ink)}html[data-theme=dark] .chapter-list a:hover{background:#22304d}html[data-theme=dark] .chapter-list a.current{background:#3b2114;color:#ffb48a}
html[data-theme=dark] .pagination li.active span{background:#2b5aa6;color:#fff;border-color:#2b5aa6}html[data-theme=dark] .stepper button.active .n{color:#fff}html[data-theme=dark] .step-progress{background:#2e3950}
html[data-theme=dark] .guest-foot,html[data-theme=dark] .guest-foot a{color:#c7d3ec}html[data-theme=dark] .foot{color:var(--muted)}html[data-theme=dark] .avatar{color:#fff}
html[data-theme=dark] .brand-card,html[data-theme=dark] .group-card{background:#fff}
html[data-theme=dark] .budget-grid td input{background:#0f1626;color:var(--ink)}html[data-theme=dark] .plan-col,html[data-theme=dark] .plan-grid .card{background:var(--card)}html[data-theme=dark] .guide-video{background:#000}
html[data-theme=dark] h1,html[data-theme=dark] h2,html[data-theme=dark] h3,html[data-theme=dark] h4,html[data-theme=dark] .topbar-title,html[data-theme=dark] label,html[data-theme=dark] .section-head h3,html[data-theme=dark] .card-head h2{color:#eef2f8}
html[data-theme=dark] .stat .value{color:#a9c6f5}html[data-theme=dark] .stat.ok .value{color:#5ee49a}html[data-theme=dark] .stat.warn .value{color:#f6c15b}html[data-theme=dark] .stat.bad .value{color:#ff8a8a}
html[data-theme=dark] .stepper button .n{background:#2e3950;color:#e6eaf3}html[data-theme=dark] .stepper button.active{color:#fff;border-color:#4a5a80}html[data-theme=dark] .prio-High{color:#ffb48a}html[data-theme=dark] input.computed.rag-A{background:#3a2a0a;color:#f6c15b}html[data-theme=dark] .pw-eye:hover{color:#fff}
html[data-theme=dark] .muted,html[data-theme=dark] .small.muted,html[data-theme=dark] .legend{color:var(--muted)}
/* v3.1 — channels */
.post{border:1px solid var(--line);border-radius:12px;padding:.7rem .9rem;margin:.6rem 0;background:var(--card)}.post.pinned{border-color:#f2c14e;box-shadow:inset 3px 0 0 #f2c14e}.post.kind-alert{box-shadow:inset 3px 0 0 var(--red)}.post.kind-decision{box-shadow:inset 3px 0 0 var(--green)}.post.kind-action{box-shadow:inset 3px 0 0 var(--teal)}
.post-head{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.post-meta{flex:1 1 auto}.post-tags{display:flex;gap:.3rem;flex-wrap:wrap}.post-body{margin:.5rem 0 .3rem;line-height:1.55;overflow-wrap:anywhere}.post-foot{display:flex;gap:.3rem;flex-wrap:wrap;align-items:center;color:var(--muted)}.post-foot form{display:inline}
.mention{background:var(--navy-soft,#e6eefb);color:var(--navy);border-radius:6px;padding:0 .3rem;font-weight:600}.refchip{display:inline-block;border:1px solid var(--line);border-radius:999px;padding:0 .5rem;font-size:.82em;text-decoration:none;background:var(--bg)}
.composer{border:1px dashed var(--line);border-radius:12px;padding:.7rem .9rem;margin:.6rem 0 1rem;background:var(--bg)}.thread .post{margin-left:2rem}.share-box summary{list-style:none;cursor:pointer;display:inline-block}.share-box summary::-webkit-details-marker{display:none}
html[data-theme=dark] .mention{background:#1c3559;color:#a9c6f5}html[data-theme=dark] .refchip{background:#22304d}html[data-theme=dark] .composer{background:#121c30}
