:root{
  --ink:#241A13;--ink-2:#4A392C;--coffee:#6F4E37;--coffee-lt:#8C6A4E;
  --parchment:#F2EBE0;--parchment-2:#E7DDCC;--card:#FBF7F0;
  --cardamom:#6E8358;--alert:#A8371F;--alert-soft:#F3DED8;--gold:#B08D4F;
  --line:rgba(36,26,19,.14);--line-2:rgba(36,26,19,.07);
  --shadow:0 1px 2px rgba(36,26,19,.05),0 8px 24px -12px rgba(36,26,19,.18);
}
*{box-sizing:border-box;margin:0;padding:0}
body{background:var(--parchment);color:var(--ink);font-family:'IBM Plex Sans Arabic',system-ui,sans-serif;
  font-size:15px;line-height:1.6;padding-bottom:60px;
  background-image:radial-gradient(circle at 1px 1px,rgba(36,26,19,.035) 1px,transparent 0);background-size:22px 22px}
.mono{font-family:'IBM Plex Mono',monospace;font-feature-settings:"tnum";direction:ltr;display:inline-block}
.wrap{max-width:none;margin:0 auto;padding:0 clamp(16px,2.5vw,40px)}
header{border-bottom:1px solid var(--line);background:linear-gradient(180deg,#FBF7F0,#F2EBE0)}
.hbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding-block:20px 18px}
.brand{display:flex;align-items:center;gap:10px}
.brand .mark{width:58px;height:58px;flex:none;display:block}
.brand h1{font-family:'El Messiri','Reem Kufi',system-ui,sans-serif;font-size:27px;font-weight:700;line-height:1.1;color:var(--ink)}
.brand .en{font-family:'IBM Plex Mono';font-size:10px;letter-spacing:2.4px;color:var(--coffee-lt)}
.tag{font-size:13px;color:var(--ink-2);border-right:1px solid var(--line);padding-right:15px}
.spacer{flex:1}
.seg{display:flex;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:var(--card)}
.seg button{font-family:'IBM Plex Sans Arabic';font-size:13px;font-weight:500;background:transparent;border:0;
  padding:8px 15px;cursor:pointer;color:var(--ink-2);border-left:1px solid var(--line-2);transition:.15s;white-space:nowrap}
.seg button:last-child{border-left:0}
.seg button:hover{background:var(--parchment-2)}
.seg button[aria-pressed="true"]{background:var(--ink);color:var(--parchment)}

.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:22px 0 10px}
.stats .c{position:relative;text-align:start;font:inherit;color:inherit;cursor:pointer;background:var(--card);
  border:1px solid var(--line);border-radius:12px;padding:16px 18px 14px;box-shadow:var(--shadow);
  border-inline-start:4px solid var(--cardamom);transition:transform .15s,box-shadow .15s,border-color .15s}
.stats .c:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(36,26,19,.12);border-color:var(--ink)}
.stats .c:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.stats .c{border-inline-start-color:var(--alert)}
.stats .l{font-size:12.5px;font-weight:500;color:var(--ink-2)}
.stats .n{font-family:'IBM Plex Mono';font-size:30px;font-weight:600;line-height:1.15;margin:8px 0 4px;color:var(--ink)}
.stats .n small{font-size:13px;font-weight:500;color:var(--coffee-lt)}
.stats .c.hot .n{color:var(--alert)}
.stats .s{font-size:11.5px;color:var(--coffee-lt)}
.stats .go{position:absolute;top:14px;inset-inline-end:16px;font-size:14px;color:var(--coffee-lt);opacity:0;transition:.15s}
.stats .c:hover .go{opacity:1}
.riskline{font-size:12px;color:var(--ink-2);margin-bottom:20px}

.tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin-bottom:20px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tabs button{background:none;border:0;padding:11px 1px;cursor:pointer;font-family:'IBM Plex Sans Arabic';
  font-size:14.5px;font-weight:500;color:var(--coffee-lt);border-bottom:2px solid transparent;margin-bottom:-1px;
  transition:.15s;white-space:nowrap;display:flex;align-items:center;gap:7px}
.tabs button:hover{color:var(--ink)}
.tabs button[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--ink)}
.pill{font-family:'IBM Plex Mono';font-size:10.5px;background:var(--parchment-2);color:var(--ink-2);padding:1px 6px;border-radius:20px}
.pill.hot{background:var(--alert);color:#fff}

.panel{background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);overflow:auto}
table{width:100%;border-collapse:collapse}
thead th{font-family:'IBM Plex Sans Arabic';font-size:15px;letter-spacing:0;color:var(--ink);
  font-weight:700;text-align:right;padding:14px 16px;border-bottom:2px solid var(--ink);background:#E6D9C3;white-space:nowrap}
tbody td{padding:13px 16px;border-bottom:1px solid var(--line-2);font-size:14.5px;vertical-align:middle}
tbody tr:nth-child(even) td{background:rgba(231,221,204,.22)}
td .plain{font-size:14.5px}td .none{font-size:14px;color:var(--ink-2)}
/* clearer text inside tables */
tbody td{font-size:15px;color:var(--ink)}
tbody td .t1{font-size:15.5px;font-weight:600}
tbody td .t2{font-size:13.5px;color:var(--ink-2)}
tbody td .badge{font-size:13px;padding:4px 10px}
tbody td .mono{font-size:14.5px}
.log-row td{font-size:14.5px}
.log-row.bad td{background:var(--alert-soft)}
/* black grid lines in the access matrix too */
.panel .mx th,.panel .mx td,.panel .mx td.cell,.panel .mx td.rowh,.panel .mx th.colh,.panel .mx tfoot td{border:1px solid var(--ink)}
.panel .mx th.colh .v{font-size:13.5px;color:var(--ink)}
.panel .mx td.rowh .t1{font-size:15px}
/* a PIN box the browser won't fill with a saved password */
.pin-in{-webkit-text-security:disc;letter-spacing:4px;font-family:'IBM Plex Mono',monospace}
.upconfirm{flex-basis:100%;border:2px solid var(--gold);background:var(--parchment);border-radius:10px;padding:10px 12px;margin-top:8px}
.upconfirm .t{font-weight:700;font-size:14.5px}.upconfirm .s{font-size:13px;margin:4px 0 8px}
tbody tr:last-child td{border-bottom:0}
.panel{border-color:var(--ink)}
.panel table th,.panel table td{border:1px solid var(--ink)}
.panel table tr:first-child th{border-top:0}.panel table thead th{border-bottom:2px solid var(--ink)}.panel table tr:last-child td{border-bottom:0}
.panel table th:first-child,.panel table td:first-child{border-inline-start:0}
.panel table th:last-child,.panel table td:last-child{border-inline-end:0}
tbody tr.clickable{cursor:pointer}
tbody tr.clickable:hover{background:rgba(231,221,204,.4)}
.t1{font-weight:500}
.t2{font-size:11.5px;color:var(--coffee-lt);margin-top:1px}
.badge{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;padding:3px 9px;border-radius:6px;
  border:1px solid var(--line);background:var(--parchment);color:var(--ink-2);white-space:nowrap}
.badge.ok{border-color:rgba(110,131,88,.4);background:rgba(110,131,88,.12);color:#4C6039}
.badge.hot{border-color:rgba(168,55,31,.35);background:var(--alert-soft);color:var(--alert);font-weight:500}
.badge.mute{opacity:.72}
.co-dot{width:7px;height:7px;border-radius:2px;display:inline-block;margin-left:5px;vertical-align:1px}
.btn{font-family:'IBM Plex Sans Arabic';font-size:13px;font-weight:500;border:1px solid var(--line);background:var(--card);
  color:var(--ink);padding:6px 13px;border-radius:8px;cursor:pointer;transition:.15s}
.btn:hover{background:var(--parchment-2)}
.btn.dark{background:var(--ink);color:var(--parchment);border-color:var(--ink)}
.btn.dark:hover{background:#3A2A1E}
.btn.danger{background:var(--alert);border-color:var(--alert);color:#fff}
.btn.danger:hover{filter:brightness(1.08)}
.btn.sm{padding:4px 10px;font-size:12px}
.btn:disabled{opacity:.4;cursor:not-allowed}
.who{display:flex;align-items:center;gap:11px}
.av{width:31px;height:31px;border-radius:9px;background:var(--coffee);color:var(--parchment);display:grid;
  place-items:center;font-size:12.5px;font-weight:600;flex:none;font-family:'Reem Kufi'}
.av.out{background:var(--parchment-2);color:var(--coffee-lt);border:1px dashed var(--coffee-lt)}
.stack{display:flex;align-items:center}
.stack .a{width:26px;height:26px;border-radius:7px;background:var(--coffee);color:var(--parchment);display:grid;
  place-items:center;font-size:11px;font-weight:600;font-family:'Reem Kufi';margin-left:-7px;border:2px solid var(--card);flex:none}
.stack .a:first-child{margin-left:0}
.stack .a.out{background:var(--alert)}
.stack .more{font-family:'IBM Plex Mono';font-size:12px;color:var(--coffee-lt);margin-right:8px}
.ring{display:inline-flex;align-items:center;gap:8px}
.ring svg{transform:rotate(-90deg);flex:none}
.ring .d{font-family:'IBM Plex Mono';font-size:12.5px;color:var(--ink-2)}

/* matrix */
.mx{border-collapse:separate;border-spacing:0;font-size:13px;min-width:760px}
.mx th.corner{position:sticky;right:0;background:rgba(231,221,204,.95);z-index:3;min-width:230px;text-align:right}
.mx td.rowh{position:sticky;right:0;background:var(--card);z-index:2;min-width:230px;border-left:1px solid var(--line);cursor:pointer}
.mx tbody tr:hover td.rowh,.mx tbody tr:hover td.cell{background:rgba(231,221,204,.4)}
.mx th.colh{padding:0;border-bottom:1px solid var(--line);background:rgba(231,221,204,.45);vertical-align:bottom;min-width:46px}
.mx th.colh .v{writing-mode:vertical-rl;transform:rotate(180deg);font-family:'IBM Plex Sans Arabic';font-size:12px;
  font-weight:500;color:var(--ink-2);padding:12px 4px 10px;white-space:nowrap;height:120px;display:inline-block;text-transform:none;letter-spacing:0}
.mx th.colh.out .v{color:var(--alert)}
.mx td.cell{text-align:center;padding:0;border-bottom:1px solid var(--line-2);border-left:1px solid var(--line-2);cursor:pointer;transition:background .12s}
.mx td.cell .box{width:22px;height:22px;margin:8px auto;border-radius:6px;border:1.5px solid var(--line);
  background:var(--parchment);display:grid;place-items:center;transition:.14s}
.mx td.cell:hover .box{border-color:var(--ink)}
.mx td.cell:not(.on):not(.na) .box{background:#C9BBA6;border-color:#B3A28A}
.mx td.cell.on .box{background:var(--cardamom);border-color:var(--cardamom)}
.mx td.cell.on .box::after{content:"✓";color:#fff;font-size:13px;font-weight:700;line-height:1}
.mx td.cell.on.out .box{background:var(--alert);border-color:var(--alert)}
.mx td.cell.on.out .box::after{content:"!"}
.mx td.count{text-align:center;font-family:'IBM Plex Mono';font-size:13px;font-weight:600;
  border-bottom:1px solid var(--line-2);border-right:1px solid var(--line);background:rgba(231,221,204,.28);min-width:52px}
.mx tfoot td{font-family:'IBM Plex Mono';font-size:12px;text-align:center;padding:8px 2px;color:var(--coffee-lt);
  border-top:1px solid var(--line);background:rgba(231,221,204,.28)}
.mx tfoot td.rowh{position:sticky;right:0;text-align:right;font-family:'IBM Plex Sans Arabic';font-size:12px;padding-right:15px;cursor:default}
.legend{display:flex;gap:18px;flex-wrap:wrap;font-size:12px;color:var(--ink-2);margin:12px 2px 0;align-items:center}
.legend i{width:14px;height:14px;border-radius:4px;display:inline-block;vertical-align:-3px;margin-left:6px}

/* drawer */
.scrim{position:fixed;inset:0;background:rgba(36,26,19,.44);opacity:0;pointer-events:none;transition:opacity .22s;z-index:40;backdrop-filter:blur(2px)}
.scrim.on{opacity:1;pointer-events:auto}
.drawer{position:fixed;top:0;bottom:0;left:0;width:min(580px,100%);background:var(--card);z-index:50;
  transform:translateX(-102%);transition:transform .26s cubic-bezier(.4,0,.2,1);
  box-shadow:12px 0 44px -18px rgba(36,26,19,.5);display:flex;flex-direction:column}
.drawer.on{transform:none}
.dhead{padding:20px 22px 16px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#F7F1E7,#FBF7F0)}
.dhead .top{display:flex;gap:12px;align-items:flex-start}
.dhead h2{font-family:'Reem Kufi';font-size:21px;font-weight:600;line-height:1.3}
.dhead .meta{font-size:12.5px;color:var(--coffee-lt);margin-top:6px}
.x{background:none;border:0;font-size:22px;cursor:pointer;color:var(--coffee-lt);padding:2px 6px;border-radius:6px;line-height:1}
.x:hover{background:var(--parchment-2);color:var(--ink)}
.dbody{padding:18px 22px 26px;overflow-y:auto;flex:1}
.sec-t{font-family:'IBM Plex Sans Arabic';font-size:16px;font-weight:700;color:var(--ink);
  margin:22px 0 11px;display:flex;align-items:center;gap:9px}
.dpane > .sec-t:first-child{display:none}
.dtabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 16px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.dtab{font:inherit;font-size:14px;font-weight:600;padding:8px 14px;border-radius:999px;border:1px solid var(--line);
  background:var(--parchment);color:var(--ink-2);cursor:pointer;transition:.15s}
.dtab:hover{border-color:var(--ink);color:var(--ink)}
.dtab[aria-selected="true"]{background:var(--ink);border-color:var(--ink);color:var(--parchment)}
.sec-t::after{content:"";flex:1;height:1px;background:var(--line)}
.sec-t:first-child{margin-top:0}
.item{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;
  margin-bottom:7px;background:var(--parchment);font-size:13.5px}
.item{flex-wrap:wrap}
.item .g{flex:1 1 220px;min-width:0}
.item .t{font-weight:500}
.item .s{font-size:11.5px;color:var(--coffee-lt);margin-top:1px}
.item.done{opacity:.5}.item.done .t{text-decoration:line-through}
.av2{width:30px;height:30px;border-radius:8px;background:var(--coffee);color:var(--parchment);display:grid;
  place-items:center;font-size:12px;font-weight:600;font-family:'Reem Kufi';flex:none}
.av2.out{background:var(--parchment-2);color:var(--alert);border:1px dashed var(--alert)}
.chk{width:19px;height:19px;flex:none;border:1.5px solid var(--coffee-lt);border-radius:5px;cursor:pointer;
  display:grid;place-items:center;background:var(--card);transition:.14s}
.chk:hover{border-color:var(--ink)}
.chk.on{background:var(--cardamom);border-color:var(--cardamom)}
.chk.on::after{content:"✓";color:#fff;font-size:13px;font-weight:700;line-height:1}
.sw{width:42px;height:24px;border-radius:20px;background:var(--parchment-2);border:1px solid var(--line);
  position:relative;cursor:pointer;flex:none;transition:.18s}
.sw::after{content:"";position:absolute;top:2px;right:2px;width:18px;height:18px;border-radius:50%;
  background:var(--card);box-shadow:0 1px 3px rgba(36,26,19,.28);transition:.18s}
.sw.on{background:var(--cardamom);border-color:var(--cardamom)}
.sw.on::after{right:calc(100% - 20px)}
.secret{border:1px solid var(--line);border-radius:11px;overflow:hidden;background:var(--parchment)}
.secret .row{display:flex;align-items:center;gap:12px;padding:13px 14px}
.secret .val{flex:1;font-family:'IBM Plex Mono';font-size:16px;letter-spacing:1px;direction:ltr;text-align:left;user-select:none}
.secret .val.masked{color:var(--coffee-lt);letter-spacing:3px}
.secret .foot{border-top:1px solid var(--line-2);padding:9px 14px;font-size:11.5px;color:var(--coffee-lt);
  display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;background:rgba(231,221,204,.35)}
.timer{font-family:'IBM Plex Mono';font-size:12px;color:var(--alert)}
.note{font-size:12.5px;color:var(--ink-2);background:rgba(176,141,79,.11);border:1px solid rgba(176,141,79,.3);
  border-radius:9px;padding:11px 13px;margin:14px 0;line-height:1.65}
.note.red{background:var(--alert-soft);border-color:rgba(168,55,31,.3)}
.note b{font-weight:600}
.log{font-size:12.5px;border-right:2px solid var(--line);padding:4px 12px 4px 0;margin-bottom:9px;color:var(--ink-2)}
.log .w{font-family:'IBM Plex Mono';font-size:11px;color:var(--coffee-lt)}

/* clearance stamp */
.stampbox{margin-top:24px;padding:22px;border:1px dashed var(--line);border-radius:12px;text-align:center;
  background:repeating-linear-gradient(45deg,transparent,transparent 9px,rgba(36,26,19,.02) 9px,rgba(36,26,19,.02) 18px)}
.stamp{width:152px;height:152px;margin:0 auto;border-radius:50%;display:grid;place-items:center;position:relative;
  transition:.4s;filter:grayscale(1);opacity:.34}
.stamp::before{content:"";position:absolute;inset:0;border:3px solid var(--alert);border-radius:50%}
.stamp::after{content:"";position:absolute;inset:9px;border:1px solid var(--alert);border-radius:50%}
.stamp .in{text-align:center;color:var(--alert);padding:0 14px}
.stamp .in .k{font-family:'Reem Kufi';font-size:20px;font-weight:700;line-height:1.25}
.stamp .in .e{font-family:'IBM Plex Mono';font-size:8.5px;letter-spacing:1.6px;margin-top:5px}
.stamp .in .n{font-family:'IBM Plex Mono';font-size:11px;margin-top:7px;padding-top:6px;border-top:1px solid currentColor}
.stamp.on{filter:none;opacity:1;transform:rotate(-7deg);animation:press .45s cubic-bezier(.2,1.5,.4,1)}
.stamp.on::before,.stamp.on::after{border-color:var(--cardamom)}
.stamp.on .in{color:var(--cardamom)}
@keyframes press{0%{transform:rotate(-7deg) scale(1.5);opacity:0}60%{opacity:1}100%{transform:rotate(-7deg) scale(1)}}
.stampcap{font-size:12.5px;color:var(--ink-2);margin-top:15px;line-height:1.6}
.empty{padding:44px 20px;text-align:center;color:var(--coffee-lt)}
footer{margin-top:30px;padding-top:15px;border-top:1px solid var(--line);font-size:12px;color:var(--coffee-lt);
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media(max-width:820px){.stats{grid-template-columns:1fr 1fr}.tag{display:none}.hide-s{display:none}
  .seg{width:100%}.seg button{flex:1;padding:8px 5px;font-size:12px}}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* ===== added for the working version ===== */
.bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:-6px 0 14px}
.bar .hint{font-size:12px;color:var(--coffee-lt);margin-inline-start:auto}
a.btn{text-decoration:none;display:inline-block}
.btn.ok{background:var(--cardamom);border-color:var(--cardamom);color:#fff}
.btn.ok:hover{filter:brightness(1.06)}
.fld{display:block;margin-bottom:12px}
.fld span{display:block;font-size:14px;font-weight:600;color:var(--ink);margin-bottom:6px}
.fld input,.fld select,.fld textarea,select.in{width:100%;font:inherit;font-size:15px;color:var(--ink);background:var(--parchment);
  border:1px solid var(--line);border-radius:8px;padding:8px 10px}
.fld textarea{min-height:110px;font-family:'IBM Plex Mono',monospace;font-size:12.5px;direction:ltr}
.fld input:focus,.fld select:focus,.fld textarea:focus{outline:2px solid var(--gold);outline-offset:1px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.chkline{display:flex;align-items:center;gap:8px;font-size:13.5px;margin-bottom:12px;cursor:pointer}
.actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
select.in{width:auto;padding:5px 8px;font-size:12.5px}
.item .actions{flex:0 1 auto;margin-inline-start:auto;justify-content:flex-end}
.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-size:13.5px;margin-bottom:6px}
.kv dt{color:var(--coffee-lt)}
.toast{position:fixed;bottom:22px;right:50%;transform:translate(50%,20px);background:var(--ink);color:var(--parchment);
  padding:11px 18px;border-radius:10px;font-size:13.5px;box-shadow:var(--shadow);opacity:0;pointer-events:none;
  transition:.22s;z-index:60;max-width:min(92vw,520px);text-align:center}
.toast.on{opacity:1;transform:translate(50%,0)}
.toast.err{background:var(--alert)}
.log-row td{font-size:13px}
.err-list{font-size:12.5px;color:var(--alert);margin-top:8px}
@media(max-width:820px){.grid2{grid-template-columns:1fr}.bar .hint{display:none}}
.mx td.cell.na{cursor:not-allowed}
.mx td.cell.na .box{opacity:.3;border-style:dashed}
.mx td.cell.na:hover .box{border-color:var(--line)}
[hidden]{display:none!important}
.gate{min-height:100vh;display:grid;place-items:center;padding:20px;background:#F3ECDF;position:relative}
/* Sign-in, "quiet ivory": no card; the logo large in the middle, a gold rule, fields with a line under them. */
.gate-card{width:min(360px,100%);padding:12px 4px 28px}
.gate-lang{position:absolute;top:18px;inset-inline-end:18px;background:transparent}
.gate-logo{display:flex;flex-direction:column;align-items:center;margin-bottom:14px}
.gate-logo svg{width:92px;height:auto;display:block}
.gate-logo h1{font-family:'El Messiri','Reem Kufi',system-ui,sans-serif;font-weight:700;font-size:44px;line-height:1.15;color:#13213C;margin-top:2px}
.gate-rule{display:flex;align-items:center;gap:8px;margin-top:8px}
.gate-rule span{width:48px;height:1px;background:#B08D4F}
.gate-rule i{width:7px;height:7px;background:#B08D4F;transform:rotate(45deg)}
.gate-card .gate-sub{text-align:center;margin-bottom:22px}
.gate-card .fld span{font-size:13px;font-weight:500;color:#6B5E4E;margin-bottom:2px}
.gate-card .fld input{background:transparent;border:0;border-bottom:1px solid #B9A98C;border-radius:0;padding:10px 2px;font-size:16px}
.gate-card .fld input:focus{outline:none;border-bottom:2px solid #13213C;padding-bottom:9px}
.gate-card .fld input:-webkit-autofill{-webkit-box-shadow:0 0 0 40px #F3ECDF inset;-webkit-text-fill-color:var(--ink)}
.gate-card .fld{margin-bottom:18px}
.gate-card #gateBtn{width:100%;margin-top:8px;padding:13px;border-radius:999px;background:#13213C;border-color:#13213C;color:#F3ECDF;font-size:15px;font-weight:600}
.gate-card #gateBtn:hover{background:#1C2E52}
.gate-card #gateBtn:focus-visible{outline:2px solid #B08D4F;outline-offset:3px}
.gate-card .note{background:transparent;border:1px solid #DCCFB6}
.gate-card .gate-link{text-decoration:none;font-size:13.5px}
.gate-card .gate-link:hover{text-decoration:underline}
.gate-sub{font-size:13.5px;color:var(--ink-2);margin-bottom:18px}
.gate-link{display:block;margin:14px auto 0;background:none;border:0;padding:4px 6px;font:500 14px 'IBM Plex Sans Arabic',system-ui,sans-serif;color:var(--coffee);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.gate-link:hover{color:var(--ink)}
.gate-link:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:4px}
.bell{position:relative;background:var(--card);border:1px solid var(--line);border-radius:9px;width:38px;height:36px;display:grid;place-items:center;cursor:pointer;color:var(--ink-2)}
.bell:hover{background:var(--parchment-2)}
.bell .pill{position:absolute;top:-6px;left:-6px}
.me{font:500 13px 'IBM Plex Sans Arabic';background:var(--card);border:1px solid var(--line);border-radius:9px;padding:7px 12px;cursor:pointer;color:var(--ink);white-space:nowrap}
.me:hover{background:var(--parchment-2)}
.me small{color:var(--coffee-lt);font-weight:400;margin-right:6px}
.logout{font:600 13px 'IBM Plex Sans Arabic';background:var(--card);border:1px solid var(--alert);border-radius:9px;padding:7px 12px;cursor:pointer;color:var(--alert);white-space:nowrap}
.logout:hover{background:var(--alert);color:#fff}


/* employee page */
.panel.staffp{background:none;border:0;box-shadow:none;overflow:visible}
.me-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:6px 0 18px}
.me-hero .hi{font-family:'Reem Kufi';font-size:30px;font-weight:700;color:var(--ink)}
.me-hero .sub{font-size:14px;color:var(--ink-2);margin-top:4px}
.me-tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:20px}
.me-tile{font:inherit;text-align:start;cursor:pointer;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px 18px;
  display:flex;flex-direction:column;gap:4px;box-shadow:var(--shadow);transition:.15s;color:var(--ink)}
.me-tile:hover{border-color:var(--ink)}
.me-tile.on{border:2px solid var(--ink);padding:15px 17px}
.me-tile .l{font-size:14px;font-weight:600}
.me-tile .n{font-family:'IBM Plex Mono';font-size:32px;font-weight:600;line-height:1.1}
.me-tile .s{font-size:12.5px;color:var(--coffee-lt)}
.me-tile.hot .n,.me-tile.hot .s{color:var(--alert)}
.me-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.me-card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px 18px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:10px}
.me-card.hot{border-inline-start:4px solid var(--alert)}
.me-card .top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.me-card .kind{font-size:12.5px;font-weight:600;color:var(--coffee);background:var(--parchment-2);padding:3px 10px;border-radius:999px}
.me-card h3{font-size:18px;font-weight:700;margin:0}
.me-card dl{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:0;font-size:13.5px}
.me-card dt{color:var(--coffee-lt)}.me-card dd{margin:0}
.me-card .signForm{display:flex;flex-direction:column;gap:8px;border-top:1px dashed var(--line);padding-top:10px}
.me-card .steps{margin:0;padding-inline-start:20px;font-size:13.5px;color:var(--ink-2)}
.me-card .revForm{margin:0}
.me-empty{background:var(--card);border:1px dashed var(--line);border-radius:14px;padding:28px;text-align:center;color:var(--coffee-lt);font-size:14.5px}
.me-foot{font-size:12.5px;color:var(--coffee-lt);margin-top:18px}

/* phone and installed-app view */
@media(max-width:640px){
  .hbar{gap:8px;padding-block:12px}
  .hbar .tag,.brand .en{display:none}
  .brand .mark{width:46px;height:46px}
  .seg{order:10;width:100%;overflow-x:auto}
  .me,.logout,.lang,.bell{padding:6px 9px;font-size:12px}

  .stats{grid-template-columns:1fr 1fr;gap:8px}
  .stats .c{padding:12px}
  .stats .n{font-size:22px}
  .panel{border-radius:10px}
  thead th,tbody td{padding:10px 10px;font-size:13px}
  .drawer{width:100%}
  .me-tiles{grid-template-columns:1fr 1fr;gap:8px}
  .me-tile{padding:12px}.me-tile .n{font-size:24px}.me-tile .s{display:none}
  .me-hero .hi{font-size:24px}
  .me-grid{grid-template-columns:1fr}
}
@media(display-mode:standalone){header{padding-top:env(safe-area-inset-top)}body{padding-bottom:env(safe-area-inset-bottom)}}
#meBtn{display:inline-flex;align-items:baseline;gap:7px}#meBtn small{margin:0}
.item.unread{border-color:var(--gold);background:#FBF3E4}
.item.link{cursor:pointer}
.item.link:hover{border-color:var(--ink)}
.solo{font-family:'Reem Kufi';font-size:14px;color:var(--ink-2);border:1px solid var(--line);border-radius:9px;padding:7px 14px;background:var(--card)}

/* ===== both languages: the layout follows dir="rtl" or dir="ltr" ===== */
thead th{text-align:start}
.end{text-align:end!important}
.inline-in{flex:1;min-width:140px;font:inherit;font-size:13px;padding:5px 8px;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--ink)}
.lang{font:500 12.5px 'IBM Plex Sans Arabic',system-ui,sans-serif;background:var(--card);border:1px solid var(--line);border-radius:9px;padding:7px 11px;cursor:pointer;color:var(--ink-2);white-space:nowrap}
.lang:hover{background:var(--parchment-2)}
.me small{margin-inline-start:6px;margin-right:0}
[dir=ltr] .tag{border-right:0;padding-right:0;border-left:1px solid var(--line);padding-left:15px}

[dir=ltr] .drawer{left:auto;right:0;transform:translateX(102%);box-shadow:-12px 0 44px -18px rgba(36,26,19,.5)}
[dir=ltr] .drawer.on{transform:none}
[dir=ltr] .mx th.corner,[dir=ltr] .mx td.rowh,[dir=ltr] .mx tfoot td.rowh{right:auto;left:0;text-align:left}
[dir=ltr] .mx td.rowh{border-left:0;border-right:1px solid var(--line)}
[dir=ltr] .mx tfoot td.rowh{padding-right:0;padding-left:15px}
[dir=ltr] .mx td.count{border-right:0;border-left:1px solid var(--line)}
[dir=ltr] .stack .a{margin-left:0;margin-right:-7px}
[dir=ltr] .stack .a:first-child{margin-right:-7px}
[dir=ltr] .stack .more{margin-right:0;margin-left:8px}
[dir=ltr] .sw::after{right:auto;left:2px}
[dir=ltr] .sw.on::after{right:auto;left:calc(100% - 20px)}
[dir=ltr] .log{border-right:0;padding-right:0;border-left:2px solid var(--line);padding-left:12px}
[dir=ltr] .co-dot{margin-left:0;margin-right:5px}
[dir=ltr] .legend i{margin-left:0;margin-right:6px}
[dir=ltr] .mono{text-align:left}
/* A closed drawer is hidden, so switching language does not slide it across the screen. */
.drawer:not(.on){visibility:hidden;transition:transform .26s cubic-bezier(.4,0,.2,1),visibility 0s .26s}
.drawer.on{visibility:visible}
input.in.ded{width:120px;font:inherit;font-size:12.5px;padding:5px 8px;border:1px solid var(--line);border-radius:8px;background:var(--card)}
.vault-where{flex:1;min-width:0}
.vault-where .t{font-size:14px;color:var(--ink)}
.vault-where .s{font-size:12px;color:var(--coffee-lt);margin-top:3px}

/* asset card: four steps, one sentence, the buttons for this step */
.acard{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin-bottom:10px}
.acard.wait{border:2px solid var(--gold);padding:13px 15px}
.acard .top{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}
.acard .top .t{font-size:16.5px;font-weight:700}
.acard .top .s{font-size:12.5px;color:var(--coffee-lt)}
.steps4{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:12px 0 8px}
.steps4 span{font-size:12px;text-align:center;padding-top:7px;border-top:4px solid var(--line);color:var(--coffee-lt)}
.steps4 span.d{border-top-color:var(--cardamom);color:var(--cardamom);font-weight:600}
.steps4 span.n{border-top-color:var(--gold);color:var(--ink);font-weight:700}
.acard .now{font-size:14.5px;margin:4px 0 10px;color:var(--ink)}
.acard .why{display:block;margin-top:4px;color:var(--alert);font-size:13px}
.acard .actions{align-items:flex-start}
.acard details.more{margin-inline-start:auto}
.acard details summary{list-style:none;cursor:pointer}
.acard details summary::-webkit-details-marker{display:none}
.acard details.more>summary{font-size:13px;color:var(--coffee-lt);padding:6px 4px}
.acard details.more>summary::after{content:" ▾"}
.acard details.more[open]>summary::after{content:" ▴"}
.acard details.more[open]{flex-basis:100%;margin-inline-start:0}
.acard details.ret[open]{flex-basis:100%}
.btn.danger-o{background:transparent;color:var(--alert);border:1px solid var(--alert)}
.rejForm{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.rejForm textarea{font:inherit;font-size:14.5px;padding:9px 12px;border:1px solid var(--alert);border-radius:9px;background:var(--parchment);resize:vertical}
.rolepick{display:flex;flex-direction:column;gap:6px;flex:1;min-width:180px}
.rolepick select,.rolepick input{width:100%;font:inherit;font-size:15px;color:var(--ink);background:var(--parchment);border:1px solid var(--line);border-radius:9px;padding:9px 12px}
.steps4.back span.n{border-top-color:var(--alert);color:var(--alert)}

/* Every table: one line weight everywhere (1px black), and bold, slightly larger text inside. */
.panel table,.panel .mx{border-collapse:collapse!important}
.panel table th,.panel table td{border:1px solid var(--ink)!important}
.panel table tr>:first-child{border-inline-start:0!important}
.panel table tr>:last-child{border-inline-end:0!important}
.panel table thead tr:first-child>*{border-top:0!important}
.panel table tbody:last-child tr:last-child>*,.panel table tfoot tr:last-child>*{border-bottom:0!important}
.panel table tbody td,.panel table tfoot td{font-size:15.5px!important;font-weight:600;color:var(--ink)}
.panel table tbody td .t2,.panel table tbody td .s{font-weight:500}
.panel table tfoot td{background:var(--parchment-2)}

/* company logos beside company names */
.co-logo{height:18px;width:auto;max-width:30px;object-fit:contain;vertical-align:-4px;margin-inline-end:6px;display:inline-block}
.co-logo.co-albaker{max-width:80px;height:20px}
.seg .co-logo{height:20px;max-width:34px}
.seg .co-logo.co-albaker{max-width:88px;height:22px}
.seg button[aria-pressed="true"] .co-logo{filter:brightness(0) invert(1)}

/* company switcher: logo + English name, kept in full colour */
.seg button{display:inline-flex;align-items:center;gap:8px;padding:6px 14px;min-height:42px}
.seg button span{font-family:'IBM Plex Sans',system-ui,sans-serif;font-size:14px;font-weight:600}
.seg-logo{height:32px;width:auto;display:block}
.seg-logo.seg-finjan{height:34px}
.seg-logo.seg-albaker{height:30px;max-width:none}
.seg button[aria-pressed="true"]{background:var(--parchment-2);color:var(--ink);box-shadow:inset 0 -3px 0 var(--ink)}
.seg button[aria-pressed="true"] .co-logo{filter:none}
@media(max-width:640px){.seg-logo{height:22px}.seg-logo.seg-albaker{height:22px}.seg button{padding:4px 10px;min-height:36px}}
@media(max-width:1350px){.hbar .tag{display:none}}

/* company chips: the logo alone, a little bigger */
.badge.logo-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;min-height:34px;vertical-align:middle;background:#fff}
.chip-logo{height:24px;width:auto;display:block}
.chip-logo.chip-finjan{height:28px}
.chip-logo.chip-albaker{height:24px}
.logo-badge span{font-size:13.5px;font-weight:600}
.badge.logo-badge.hot{background:var(--alert-soft)}
#dMeta{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
#dMeta>*{margin:0!important}
td:has(> .logo-badge){white-space:nowrap}td > .logo-badge + .logo-badge{margin-inline-start:6px}

/* bigger company logos in tables */
.chip-logo{height:30px}
.chip-logo.chip-finjan{height:36px}
.chip-logo.chip-albaker{height:30px}
.badge.logo-badge{min-height:40px;padding:4px 12px}
/* folders grouped by company; staff sections */
.files-co{display:flex;align-items:center;gap:10px;font-size:17px;margin:18px 16px 10px}
.me-sub{display:flex;align-items:center;gap:10px;font-size:17px;margin:22px 0 10px}
.seg.solo{display:inline-flex;align-items:center;gap:10px;padding:6px 14px;font-weight:700}
#seg.solo{display:inline-flex!important;flex-direction:row;align-items:center;gap:10px;white-space:nowrap}
.me-co .me-sub .btn{margin-inline-start:auto}.me-co{margin-bottom:8px}
#seg[hidden]{display:none!important}

/* every column starts on the right (in Arabic), including the last one */
.end{text-align:start!important}
th.end,td.end{text-align:start!important}
/* files: one framed table per company, with all its lines */
.panel table.ftable{width:calc(100% - 32px);margin:0 16px 18px;border:1px solid var(--ink)!important}
.panel table.ftable tr>*{border:1px solid var(--ink)!important}

/* confirmation inside the page */
.askbox{border:2px solid var(--alert);background:#fff;border-radius:10px;padding:12px 14px;margin:8px 0 12px}
.askbox .t{font-weight:600;font-size:14.5px;margin-bottom:10px;line-height:1.7}

/* reveal: after the PIN, only the password with Copy and Hide */
.revForm.shown input[name=pin],.revForm.shown>button{display:none}
.revOut{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.revOut .pw{font-family:'IBM Plex Mono',monospace;font-size:16px;font-weight:600;direction:ltr;user-select:all}
.pin-in:placeholder-shown{letter-spacing:normal;font-family:inherit}
.mini-logo{height:20px;width:auto;vertical-align:middle;display:inline-block}.mini-logo.mini-finjan{height:24px}.mini-logo.mini-albaker{height:18px}
/* account info line: one font, one size, evenly spaced */
.secret .foot.info3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;font-family:'IBM Plex Sans Arabic',sans-serif;font-size:13.5px;color:var(--ink-2)}
.secret .foot.info3 b{display:block;font-size:12px;font-weight:600;color:var(--coffee-lt);margin-bottom:2px}
.chip-pair{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;vertical-align:middle}
.badge.chip-word{min-height:40px;display:inline-flex;align-items:center;padding:4px 12px;font-size:13.5px;font-weight:600}
td:has(> .chip-pair){white-space:nowrap}td > .chip-pair + .chip-pair{margin-inline-start:8px}

.signsteps{margin-top:10px;display:flex;flex-direction:column;gap:6px;align-items:center;font-size:14px}
/* the thing an alert pointed to, highlighted for a moment */
@keyframes flashy{0%,40%{box-shadow:0 0 0 3px var(--gold)}100%{box-shadow:0 0 0 0 transparent}}
.flash{animation:flashy 2.4s ease-out 1;border-radius:10px}

.badge.logo-badge.shared-badge{gap:0}
.shared-badge .chip-logo + .chip-logo{margin-inline-start:12px;padding-inline-start:12px;border-inline-start:1px solid var(--line, #e3d9c8)}


/* Log search bar, older-entries button */
.logbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:14px;border-bottom:1px solid var(--line)}
.logbar input[type=search]{flex:1 1 220px;min-width:0}
.logbar label{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--ink-2)}
.morebar{display:flex;justify-content:center;padding:14px}
/* Requests: the employee's form and report, the list on both sides */
.me-ask{margin:6px 0 14px}.me-ask>summary{list-style:none;display:inline-flex}.me-ask>summary::-webkit-details-marker{display:none}
.me-ask form{margin-top:12px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:16px}
.me-report{margin-top:10px}.me-report>summary{cursor:pointer;font-size:13.5px;color:var(--coffee)}
.me-report form{display:grid;gap:8px;margin-top:8px}
.me-reqs{display:grid;gap:8px;margin-bottom:10px}
.item.req .g{min-width:0}.item.req .t .badge{margin-inline-start:6px}
.ireqForm{display:grid;gap:8px;margin-top:8px}
/* Written notes and replies are prose: the page's own font, any direction, not the CSV-paste style. */
.fld textarea[name=notes],.fld textarea[name=note]{font-family:'IBM Plex Sans Arabic',system-ui,sans-serif;font-size:15px;direction:inherit;min-height:64px}
.ireqForm textarea,.me-report textarea{width:100%;font:inherit;font-size:15px;color:var(--ink);padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--parchment);resize:vertical}
.ireqForm textarea:focus,.me-report textarea:focus,.me-report select:focus{outline:2px solid var(--gold);outline-offset:1px}
.me-report select{font:inherit;font-size:15px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:var(--parchment);color:var(--ink)}
.logbar .in{font:inherit;font-size:14px;padding:8px 11px;border:1px solid var(--line);border-radius:9px;background:var(--parchment);color:var(--ink);min-height:38px}
.logbar .in:focus{outline:2px solid var(--gold);outline-offset:1px}
/* Read by screen readers only (the page title next to the logo). */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.btn.dark{background:#13213C;border-color:#13213C;color:#F7F2E9}
.btn.dark:hover{background:#1C2E52;border-color:#1C2E52}

/* Inside: gold for the details, the content ivory (the layout itself is the navy sidebar, below). */
.stats .c{background:#fff;border:1px solid #E6DCC8;border-radius:10px;box-shadow:none}
.stats .c:hover{border-color:#13213C;box-shadow:none}
.stats .n{font-family:'El Messiri','IBM Plex Sans Arabic',sans-serif;font-weight:700;color:#13213C}
.stats .c.hot .n{color:#13213C}
.stats .c[data-go="matrix"].hot .n{color:var(--alert)}
.tabs{border-bottom:1px solid #E1D5BE}
.tabs button{color:#6B5E4E}
.tabs button[aria-selected="true"]{color:#13213C;font-weight:600;border-bottom-color:#D2B064}
.panel table:not(.mx) thead th{background:#F1E9D9;color:#3B2A1E}
/* An employee's page shows none of the manager's parts, not even for a moment while it loads. */
.staffv #stats,.staffv #riskLine,.staffv #tabs,.staffv #bar,.staffv #legend,.staffv #seg{display:none}

/* Gold through the inside: a gold line on the number cards, a gold-tinted table heading, gold counts and initials,
   and gold writing on the navy buttons. The tables keep their black lines. */
.stats .c{border-top:3px solid #D2B064}
.stats .c:hover{border-top-color:#B08D4F}
.stats .l{color:#7A5C22}
.panel table:not(.mx) thead th{background:#EFE3C6;color:#13213C}
.tabs .pill{background:#EFE3C6;color:#7A5C22}
.tabs button[aria-selected="true"] .pill{background:#D2B064;color:#13213C}
.tabs .pill.hot{background:var(--alert);color:#fff}
.av,.av2{background:#13213C;color:#D2B064}
.btn.dark{color:#E8C979}
.btn.dark:hover{color:#F1D891}
/* Headings and greetings in the logo's font (El Messiri), everywhere the page used Reem Kufi. */
.me-hero .hi,.dhead h2,.stamp .in .k,.solo,.av,.av2{font-family:'El Messiri','Reem Kufi',system-ui,sans-serif}
.me-hero .hi{font-weight:700;color:#13213C}

/* The access matrix in the same colours as the other tables: gold-tinted heading and totals, navy writing, black lines. */
.mx th.corner,.mx th.colh,.mx tfoot td{background:#EFE3C6;color:#13213C}
.panel .mx th.colh .v{color:#13213C}
.panel .mx th.colh.out .v{color:var(--alert)}
.mx th.corner{font-size:15px;font-weight:700}
.mx tfoot td{color:#13213C;font-weight:600}
/* Numbers in black: the counts on the section tabs. */
.tabs .pill,.tabs button[aria-selected="true"] .pill{color:#111}
/* Tables, "navy and gold": a navy heading with gold writing and gold lines between the headings (black would not
   show on navy), black lines everywhere else, and every other row lightly tinted. The access matrix matches. */
/* (!important: an older rule forces black on every table line; on the navy heading the lines are gold instead.) */
.panel table:not(.mx) thead th{background:#13213C;color:#D2B064;border-left:1px solid #9C8550!important;border-right:1px solid #9C8550!important;border-top:0!important;border-bottom:2px solid #241A13!important}
.panel table:not(.mx) thead th:first-child{border-inline-start:0!important}
.panel table:not(.mx) thead th:last-child{border-inline-end:0!important}
.panel table:not(.mx) tbody tr:nth-child(even) td{background:#FAF6EE}
.mx th.corner,.mx th.colh{background:#13213C;color:#D2B064}
.panel .mx th.corner,.panel .mx th.colh{border:1px solid #9C8550!important;border-top:0!important;border-bottom:2px solid #241A13!important}
.panel .mx th.colh .v{color:#D2B064}
.panel .mx th.colh.out .v{color:#F2A592}

/* Inside, "navy sidebar": the sections in a navy menu with the logo; a light top row with the companies,
   alerts and sign-out; the content stays ivory. */
.shell{display:flex;align-items:flex-start;min-height:100vh}
.side{width:228px;flex:none;position:sticky;top:0;height:100vh;overflow-y:auto;background:#13213C;padding:22px 14px;display:flex;flex-direction:column;gap:18px}
.side-logo{display:flex;flex-direction:column;align-items:center;gap:2px;padding-bottom:16px;border-bottom:1px solid rgba(210,176,100,.25)}
.side-logo svg{width:66px;height:auto;display:block}
.side-logo h1{font-family:'El Messiri','Reem Kufi',system-ui,sans-serif;font-weight:700;font-size:29px;line-height:1.1;color:#D2B064}
.main{flex:1;min-width:0}
.side .tabs{flex-direction:column;gap:4px;border:0;margin:0;overflow:visible}
.side .tabs button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:10px 12px;border:0;border-radius:9px;color:#E9E1CF;font-size:14.5px;font-weight:500;text-align:start}
.side .tabs button:hover{background:rgba(233,225,207,.08);color:#fff}
.side .tabs button[aria-selected="true"]{background:#D2B064;color:#13213C;font-weight:600}
.side .tabs .pill{background:#EFE3C6;color:#111}
.side .tabs button[aria-selected="true"] .pill{background:#F7F2E9;color:#111}
.side .tabs .pill.hot,.side .tabs button[aria-selected="true"] .pill.hot{background:#A8371F;color:#fff}
.side .tabs button:focus-visible{outline:2px solid #D2B064;outline-offset:2px}
header{background:transparent;border-bottom:1px solid #E1D5BE}
.hbar{padding-block:14px}
.hbar .tag{display:none}
.hbar .brand{display:none}
.staffv .hbar .brand{display:flex}
.staffv .side{display:none}
.brand .mark{width:52px;height:52px}
.seg{background:transparent;border:0;gap:6px;border-radius:0;overflow:visible}
.seg button{border:1px solid #D9CCB3;border-radius:999px;background:#fff;color:#3B2A1E;padding:6px 14px;min-height:34px;font-size:13.5px}
.seg button:last-child{border-left:1px solid #D9CCB3}
.seg button:hover{background:#F7F2E9}
.seg button[aria-pressed="true"]{background:#13213C;border-color:#13213C;color:#D2B064;font-weight:600}
.seg button:focus-visible{outline:2px solid #D2B064;outline-offset:2px}
#seg.solo{border:0;background:transparent;color:#13213C;font-size:15px;font-weight:600;padding:0}
@media(max-width:820px){
  .shell{flex-direction:column;align-items:stretch}
  .side{z-index:20;width:auto;height:auto;flex-direction:row;align-items:center;gap:10px;padding:8px 10px}
  .side-logo{flex-direction:row;gap:6px;padding:0;border:0}
  .side-logo svg{width:30px}
  .side-logo h1{font-size:18px}
  .side .tabs{flex-direction:row;overflow-x:auto;flex:1;min-width:0;scrollbar-width:none}
  .side .tabs button{width:auto;white-space:nowrap;padding:7px 10px;font-size:13.5px}
  .seg{flex-wrap:wrap}
}
@media(max-width:640px){.brand .mark{width:42px;height:42px}}

/* Motion: calm and quick. All of it stops for anyone whose device asks for reduced motion (rule near the top). */
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes draw{from{stroke-dashoffset:70}to{stroke-dashoffset:0}}
@keyframes ring{0%,100%{transform:rotate(0)}20%{transform:rotate(14deg)}40%{transform:rotate(-12deg)}60%{transform:rotate(8deg)}80%{transform:rotate(-4deg)}}
/* The first look after signing in: the logo's rings draw themselves, the menu and cards rise in turn. */
.intro .side-logo circle,.gate-logo circle{stroke-dasharray:70;animation:draw 1.1s cubic-bezier(.6,0,.2,1) both}
.intro .side-logo circle:nth-child(2),.gate-logo circle:nth-child(2){animation-delay:.15s}
.intro .side-logo circle:nth-child(3),.gate-logo circle:nth-child(3){animation-delay:.3s}
.intro .side-logo h1,.gate-logo h1{animation:fadeIn .7s .45s both}
.gate-rule{animation:fadeIn .7s .7s both}
.intro .side .tabs button{animation:rise .45s cubic-bezier(.2,.8,.2,1) both}
.intro .side .tabs button:nth-child(2){animation-delay:.04s}.intro .side .tabs button:nth-child(3){animation-delay:.08s}
.intro .side .tabs button:nth-child(4){animation-delay:.12s}.intro .side .tabs button:nth-child(5){animation-delay:.16s}
.intro .side .tabs button:nth-child(6){animation-delay:.2s}.intro .side .tabs button:nth-child(7){animation-delay:.24s}
.intro .side .tabs button:nth-child(8){animation-delay:.28s}.intro .side .tabs button:nth-child(9){animation-delay:.32s}
.intro .stats .c,.intro .me-tile,.intro .me-card{animation:rise .55s cubic-bezier(.2,.8,.2,1) both}
.intro .stats .c:nth-child(2),.intro .me-tile:nth-child(2){animation-delay:.08s}
.intro .stats .c:nth-child(3){animation-delay:.16s}.intro .stats .c:nth-child(4){animation-delay:.24s}
.intro #riskLine,.intro #bar{animation:fadeIn .6s .3s both}
.intro #panel{animation:rise .6s .25s cubic-bezier(.2,.8,.2,1) both}
.gate-card{animation:rise .6s cubic-bezier(.2,.8,.2,1) both}
/* Opening a section: its content fades up, the first rows one after another. */
#panel.swap{animation:rise .35s cubic-bezier(.2,.8,.2,1)}
#panel.swap tbody tr{animation:fadeIn .4s both}
#panel.swap tbody tr:nth-child(2){animation-delay:.03s}#panel.swap tbody tr:nth-child(3){animation-delay:.06s}
#panel.swap tbody tr:nth-child(4){animation-delay:.09s}#panel.swap tbody tr:nth-child(5){animation-delay:.12s}
#panel.swap tbody tr:nth-child(6){animation-delay:.15s}#panel.swap tbody tr:nth-child(n+7){animation-delay:.18s}
/* Small feedback: buttons give a little when pressed, rows warm up under the pointer, the bell rings for a new alert. */
.btn:active,.seg button:active,.side .tabs button:active,.stats .c:active{transform:scale(.97)}
.side .tabs button{transition:background .2s,color .2s,transform .12s}
.panel table:not(.mx) tbody tr.clickable:hover td{background:#F3EAD6;transition:background .15s}
.bell.ring svg{animation:ring .9s ease-in-out;transform-origin:50% 10%}
.stats .num{font-variant-numeric:tabular-nums}
