  :root {
    --bg: #0e0f11;
    --bg-2: #08090a;
    --glass: rgba(255, 255, 255, .022);
    --glass-top: rgba(255, 255, 255, .055);
    --glass-line: rgba(255, 255, 255, .055);
    --orange: #ea751a;
    --orange-dim: rgba(234, 117, 26, .42);
    --late: #e63d2e;
    --review: #e3b52c;
    --ok: #4da571;
    --new: #4f9fd8;
    --info: rgba(255, 255, 255, .34);
    --w-hi: rgba(255, 255, 255, .82);
    --w: rgba(255, 255, 255, .6);
    --w-dim: rgba(255, 255, 255, .46);
    --w-faint: rgba(255, 255, 255, .08);
    --hud: "Rajdhani", "IBM Plex Sans Arabic", system-ui, sans-serif;
    --body: "IBM Plex Sans Arabic", "Rajdhani", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  }
  :root[data-theme="light"] {     /* light mode: much stronger contrast (Ahmad, 2026-10-22) */
    --bg: #ecedeb;
    --bg-2: #dcdedb;
    --glass: rgba(255, 255, 255, .72);
    --glass-top: rgba(255, 255, 255, .95);
    --glass-line: rgba(20, 22, 22, .17);
    --late: #b3170a;
    --review: #94690a;
    --ok: #23693f;
    --new: #135f99;
    --info: rgba(18, 20, 20, .62);
    --w-hi: rgba(12, 13, 14, .96);
    --w: rgba(14, 16, 16, .8);
    --w-dim: rgba(14, 16, 16, .64);
    --w-faint: rgba(14, 16, 16, .2);
    --orange-dim: rgba(186, 80, 8, .62);
    --orange: #b8530a;
  }

  :root[dir="rtl"] { --hud: "Cairo", system-ui, sans-serif; --body: "Cairo", system-ui, sans-serif; }
  * { box-sizing: border-box; }
  html { background: var(--bg-2); }
  html, body { height: 100%; }
  body {
    margin: 0; color: var(--w); font: 400 14px/1.5 var(--body); overflow: hidden;
    background: radial-gradient(1100px 780px at 62% 50%, #16181b 0%, var(--bg) 44%, var(--bg-2) 100%);
    -webkit-font-smoothing: antialiased;
  }
  :root[data-theme="light"] body { background: radial-gradient(1100px 780px at 62% 50%, #f2f2f0 0%, var(--bg) 46%, var(--bg-2) 100%); }
  button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
  :focus-visible { outline: 1px solid var(--orange); outline-offset: 3px; }
  .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
  .k { font: 500 9.5px/1.4 var(--hud); letter-spacing: .2em; text-transform: uppercase; color: var(--w-dim); }
  [dir="rtl"] .k { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 11px; }

  /* ---------- top bar ---------- */
  .topbar { position: fixed; z-index: 40; top: env(safe-area-inset-top, 0px); inset-inline: 0; height: 58px; display: flex; align-items: center; gap: 13px; padding: 0 20px; }
  .brand { display: flex; align-items: center; gap: 10px; }
  .brand .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: beat 3.2s ease-in-out infinite; }
  @keyframes beat { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(234,117,26,.3); } 50% { opacity: .45; box-shadow: 0 0 0 5px rgba(234,117,26,0); } }
  .brand b { font: 600 17px/1 var(--hud); letter-spacing: .38em; color: var(--w-hi); }
  [dir="rtl"] .brand b { letter-spacing: .04em; }
  .topbar .spacer { flex: 1; }
  .seg { display: flex; border: 1px solid var(--glass-line); border-radius: 2px; }
  .seg button { padding: 6px 10px; font: 600 10.5px/1 var(--hud); letter-spacing: .14em; color: var(--w-dim); }
  .seg button[aria-pressed="true"] { background: var(--orange); color: #fff; }
  .who { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 99px; border: 1px solid var(--glass-line); }
  .who:hover { border-color: var(--orange-dim); }
  .who .avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(234,117,26,.14); border: 1px solid var(--orange-dim); font: 600 11px/1 var(--hud); letter-spacing: .06em; color: var(--w-hi); }
  .who b { font: 500 13px/1 var(--hud); letter-spacing: .1em; color: var(--w-hi); }
  [dir="rtl"] .who b { letter-spacing: 0; font-family: var(--body); }
  .icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--glass-line); color: var(--w-dim); }
  .icon-btn:hover { color: var(--w-hi); border-color: var(--orange-dim); }

  .menu {
    position: fixed; z-index: 50; top: calc(62px + env(safe-area-inset-top, 0px)); inset-inline-end: 20px; width: 250px;
    background: rgba(14,15,17,.8); backdrop-filter: blur(22px) saturate(1.3);
    border: 1px solid var(--glass-line); border-radius: 10px; padding: 7px;
    box-shadow: 0 18px 50px rgba(0,0,0,.45), inset 0 1px 0 var(--glass-top);
  }
  :root[data-theme="light"] .menu { background: rgba(240,240,238,.82); box-shadow: 0 18px 46px rgba(30,32,32,.14), inset 0 1px 0 rgba(255,255,255,.7); }
  .menu[hidden] { display: none; }
  .menu .k { padding: 8px 10px 6px; }
  .menu button, .menu .row { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; font-size: 13px; color: var(--w); text-align: start; }
  .menu button:hover { background: var(--glass-top); color: var(--w-hi); }
  .menu .row { justify-content: space-between; }
  .menu .row span:last-child { color: var(--w-hi); font-size: 12px; }
  .menu .sep { height: 1px; background: var(--glass-line); margin: 6px 2px; }
  .switch { width: 30px; height: 17px; border-radius: 99px; background: var(--w-faint); position: relative; flex: none; margin-inline-start: auto; }
  .switch::after { content: ""; position: absolute; top: 2.5px; inset-inline-start: 2.5px; width: 12px; height: 12px; border-radius: 50%; background: var(--w-dim); transition: inset-inline-start .18s, background .18s; }
  [aria-pressed="true"] > .switch { background: rgba(234,117,26,.28); }
  [aria-pressed="true"] > .switch::after { inset-inline-start: 15.5px; background: var(--orange); }

  /* ---------- left column ---------- */
  .left {
    position: fixed; z-index: 30; inset-inline-start: 22px; top: calc(70px + env(safe-area-inset-top, 0px));
    width: 292px; display: flex; flex-direction: column; gap: 14px;
    max-height: calc(100% - 150px - env(safe-area-inset-top, 0px));
    transition: opacity .35s ease, transform .35s ease;
  }
  .zoomed .left { opacity: 0; transform: translateX(-14px); pointer-events: none; }
  [dir="rtl"].zoomed .left { transform: translateX(14px); }
  .card {
    background: var(--glass); border: 1px solid var(--glass-line); border-radius: 12px;
    backdrop-filter: blur(16px) saturate(1.25); padding: 16px 20px;
    box-shadow: inset 0 1px 0 var(--glass-top);
  }

  /* clock: no box */
  .head { padding: 0 20px; }
  .head .row1 { display: flex; flex-direction: column; gap: 5px; }
  .head .t { font: 300 40px/1 var(--mono); color: var(--w-hi); letter-spacing: -.02em; }
  .head .d { font: 500 10.5px/1 var(--hud); letter-spacing: .22em; text-transform: uppercase; color: var(--w-dim); }
  [dir="rtl"] .head .d { letter-spacing: 0; font-family: var(--body); text-transform: none; }
  .head .greet { margin-top: 12px; font-size: 13px; color: var(--w-hi); }
  .head .greet small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--w-dim); }
  .head .fresh { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0 -6px; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--w-dim); font: inherit; font-size: 11px; cursor: pointer; }
  .head .fresh:hover, .head .fresh:focus-visible { color: var(--w-hi); background: rgba(255,255,255,.05); }
  .head .fresh.busy svg { animation: freshspin 1s linear infinite; }
  .head .fresh.fail { color: var(--late); }
  @keyframes freshspin { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .head .fresh.busy svg { animation: none; } }

  .stat .top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
  .stat .big { font: 300 29px/1 var(--mono); color: var(--w-hi); transition: color .6s ease; }
  .stat .big.ok { color: var(--ok); } .stat .big.mid { color: #d2a03a; } .stat .big.low { color: var(--late); }
  .stat .k { margin-bottom: 3px; }
  .stat .sub { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--glass-line); font-size: 12.5px; color: var(--w-dim); display: grid; gap: 6px; }
  .stat .sub .row { display: flex; justify-content: space-between; gap: 8px; }
  .stat .sub .row b { font: 400 12.5px/1 var(--mono); color: var(--w); }
  .bar { height: 3px; border-radius: 2px; background: var(--w-faint); overflow: hidden; margin-top: 10px; }
  .bar i { display: block; height: 100%; width: 22%; background: var(--late); transition: width 1s ease, background 1s ease; }

  .log { min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
  .log-head { display: flex; align-items: center; gap: 7px; padding-bottom: 8px; }
  .log-head .live { width: 4px; height: 4px; border-radius: 50%; background: var(--orange); animation: beat 2.6s ease-in-out infinite; }
  .log-list { list-style: none; margin: 0; padding: 0; overflow: hidden auto; display: grid; gap: 2px; scrollbar-width: thin; }
  .log-list button { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: start; width: 100%; padding: 9px 10px; border-radius: 7px; text-align: start; }
  .log-list .meta { display: grid; gap: 3px; }
  .log-list time { font: 400 11px/1.4 var(--mono); color: var(--w-dim); }
  .log-list button:hover, .log-list button:focus-visible { background: var(--glass-top); }
  .log-list .act { display: block; font-size: 13px; line-height: 1.35; color: var(--w-hi); }
  .log-list .st { font: 500 9.5px/1.4 var(--hud); letter-spacing: .06em; overflow-wrap: anywhere; text-transform: uppercase; }
  [dir="rtl"] .log-list .st { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 10.5px; }
  .log-list .desc { display: block; margin-top: 3px; font-size: 12px; color: var(--w-dim); }
  .log-list li.fresh button { animation: logIn .5s ease both; }
  @keyframes logIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
  .t-new { color: var(--new); }
  .t-late { color: var(--late); } .t-review { color: var(--review); } .t-ok { color: var(--ok); } .t-info { color: var(--info); }

  /* ---------- stage ---------- */
  .stage { position: fixed; inset: 0; z-index: 10; overflow: hidden; }
  #orb { position: absolute; inset: 0; width: 100%; height: 100%; }
  .map { position: absolute; inset: 0; transition: transform .9s cubic-bezier(.65,.02,.25,1), opacity .5s ease; }
  .zoomed .map { opacity: 0; }
  .map svg { width: 100%; height: 100%; }
  .nodegrid { display: none; }
  .node { cursor: pointer; --tone: var(--w-hi); }
  .node.late { --tone: var(--late); }
  .node.review { --tone: var(--review); }
  .node .hit { fill: transparent; }
  .node.late text.nm, .node.review text.nm { fill: var(--w-hi); }   /* needs attention: the name turns white, the dot and count carry the colour */
  .node .ball { fill: var(--bg); stroke: var(--w-dim); stroke-width: 1; transition: stroke .3s, fill .3s; }
  .node .core { fill: var(--w); transition: fill .3s; }
  .node.late .ball { stroke: var(--late); } .node.late .core { fill: var(--late); }
  .node.review .ball { stroke: var(--review); } .node.review .core { fill: var(--review); }
  .node .ping { fill: none; stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: ping 5s ease-out infinite; }
  .node.late .ping { stroke: var(--late); } .node.review .ping { stroke: var(--review); }
  @keyframes ping { 0% { transform: scale(.9); opacity: .45; } 70% { opacity: 0; } 100% { transform: scale(2.6); opacity: 0; } }
  .node text.nm { font: 500 13px/1 var(--hud); letter-spacing: .18em; text-transform: uppercase; fill: var(--w-dim); transition: fill .3s; }
  [dir="rtl"] .node text.nm { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 14.5px; }
  .node text.ct { font: 400 11px/1 var(--mono); }
  .node.late text.ct { fill: var(--late); } .node.review text.ct { fill: var(--review); }
  .node:hover .ball, .node:focus-visible .ball { stroke: var(--tone); fill: color-mix(in srgb, var(--tone) 16%, transparent); }
  .node:hover .core, .node:focus-visible .core { fill: var(--tone); }
  .node:hover text.nm, .node:focus-visible text.nm { fill: var(--w-hi); }

  /* ---------- section ---------- */
  .section {
    position: fixed; z-index: 35; inset: calc(86px + env(safe-area-inset-top, 0px)) 22px calc(94px + env(safe-area-inset-bottom, 0px));
    max-width: 1060px; margin-inline: auto; display: grid; grid-template-rows: auto auto 1fr; gap: 16px;
    opacity: 0; visibility: hidden; transform: scale(.97); pointer-events: none;
    transition: opacity .45s ease .12s, transform .55s cubic-bezier(.65,.02,.25,1) .08s, visibility 0s .6s;
  }
  .zoomed .section { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: .2s, .16s, 0s; }
  .sec-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  .sec-head h2 { margin: 0; font: 600 25px/1 var(--hud); letter-spacing: .2em; text-transform: uppercase; color: var(--w-hi); }
  [dir="rtl"] .sec-head h2 { font-family: var(--body); letter-spacing: 0; text-transform: none; font-weight: 500; }
  .sec-head .sub { font-size: 12.5px; color: var(--w-dim); max-width: 44ch; }
  .back { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--glass-line); font: 500 10.5px/1 var(--hud); letter-spacing: .16em; text-transform: uppercase; color: var(--w-dim); }
  .back:hover { color: var(--w-hi); border-color: var(--orange-dim); }
  [dir="rtl"] .back { letter-spacing: 0; font-family: var(--body); }
  .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
  .tile { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 12px; padding: 13px 15px; backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 var(--glass-top); }
  .tile .v { font: 300 24px/1 var(--mono); color: var(--w-hi); }
  .tile .v.hot { color: var(--review); }
  .tile .k { margin-top: 7px; }
  .rows { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 12px; overflow: auto; backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 var(--glass-top); }
  .rows .r { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; padding: 12px 15px; border-bottom: 1px solid var(--glass-line); font-size: 13px; align-items: center; }
  .rows .r:last-child { border-bottom: 0; }
  .rows .r time { font: 400 10.5px/1 var(--mono); color: var(--w-dim); }
  .rows .r b { font-weight: 400; color: var(--w-hi); }
  .rows .r em { font-style: normal; color: var(--w-dim); font-size: 12px; }
  .pill { font: 500 9.5px/1 var(--hud); letter-spacing: .16em; text-transform: uppercase; padding: 5px 9px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; color: var(--info); }
  [dir="rtl"] .pill { letter-spacing: 0; font-family: var(--body); }
  .stub { padding: 30px 16px; text-align: center; color: var(--w-dim); font-size: 12.5px; }

  /* ---------- voice ---------- */
  .voice { position: fixed; z-index: 40; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 9px; }
  .wave { display: flex; align-items: center; gap: 3px; height: 24px; }
  .wave i { width: 2px; height: 3px; border-radius: 1px; background: var(--w-faint); }
  .listening .wave i { background: var(--orange-dim); }
  .mic { display: flex; align-items: center; gap: 9px; padding: 8px 17px; border-radius: 99px; border: 1px solid var(--glass-line); background: var(--glass); backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 var(--glass-top); font: 500 10.5px/1 var(--hud); letter-spacing: .18em; text-transform: uppercase; color: var(--w-dim); }
  [dir="rtl"] .mic { letter-spacing: 0; font-family: var(--body); font-size: 12px; }
  .mic .led { width: 5px; height: 5px; border-radius: 50%; background: var(--w-dim); }
  #micBtn { color: var(--orange); border-color: var(--orange-dim); } #micBtn .led { background: var(--orange); }
  .listening .mic { border-color: var(--orange-dim); color: var(--orange); }
  .listening .mic .led { background: var(--orange); animation: beat 1.2s ease-in-out infinite; }

  @media (max-width: 980px) { .left { width: 244px; } .brand b { font-size: 15px; letter-spacing: .26em; } }
  @media (max-width: 900px) {                       /* phones and tablets: one column, map first, blocks below */
    html, body { height: auto; }
    body { overflow: visible; overflow-x: clip; min-height: 100dvh; display: flex; flex-direction: column; padding-top: calc(62px + env(safe-area-inset-top, 0px)); padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
    .topbar { padding: 0 14px; gap: 9px; }
    .who b { display: none; }
    .left { display: contents; }
    .zoomed .left { display: none; }
    .head { order: 1; padding: 4px 22px 0; }
    .stage { order: 2; position: relative; inset: auto; flex: none; height: min(46vh, 440px); min-height: 320px; }
    .map { display: none; }
    .nodegrid { display: grid; order: 3; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 14px 2px; }
    .zoomed .nodegrid { display: none; }
    .nbtn { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 15px 16px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-top); backdrop-filter: blur(16px); font: 500 12px/1.2 var(--hud); letter-spacing: .14em; text-transform: uppercase; color: var(--w-hi); text-align: start; }
    [dir="rtl"] .nbtn { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 14.5px; }
    .nbtn:active { background: var(--glass-top); }
    .nbtn .nb-ct { font-size: 12.5px; color: var(--w); }
    .nbtn.review { border-color: rgba(227,181,44,.42); } .nbtn.review .nb-ct { color: var(--review); }
    .nbtn.late { border-color: rgba(230,61,46,.5); } .nbtn.late .nb-ct { color: var(--late); }
    .zoomed .stage { display: none; }
    #notices { order: 4; margin: 0 14px; }
    .card { order: 5; margin: 12px 14px 0; padding: 16px 20px; }
    .done-row { order: 5; margin: 12px 14px 0; display: flex; align-items: center; gap: 10px; } .done-row .card { margin: 0; flex: 1; min-width: 0; }
    .done-row > .team-ring { position: relative; top: auto; inset-inline-start: auto; transform: none; flex: none; }
    .log { flex: none; }
    .log-list { max-height: none; }
    .section { display: none; order: 6; position: static; inset: auto; margin: 4px 14px 0; opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
    .zoomed .section { display: grid; }
    .voice { position: fixed; left: 0; right: 0; bottom: 0; transform: none; z-index: 45; padding: 30px 0 calc(16px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg) 52%, transparent); pointer-events: none; }
    .voice > * { pointer-events: auto; }
    body.summoned { overflow: hidden; }
    .node text.nm { font-size: 10.5px; letter-spacing: .05em; }
    .voice .mic { background: color-mix(in srgb, var(--bg) 93%, transparent); }
    [dir="rtl"] .node text.nm { font-size: 13px; letter-spacing: 0; }
    .menu { inset-inline-end: 12px; max-width: calc(100vw - 24px); }
  }
  @media (min-width: 600px) and (max-width: 900px) { .stage { height: min(46vh, 480px); } .nbtn { padding: 18px 20px; font-size: 13px; } }
  @media (prefers-reduced-motion: reduce) {
    .node, .node .ping, .brand .dot, .log-head .live, .mic .led { animation: none; }
    .map, .section, .left { transition: none; }
  }

/* ===================== additions for the real app ===================== */
.flag { background: var(--late); color: #fff; border-radius: 4px; padding: 2px 8px; font: 600 11px/1.4 var(--hud); letter-spacing: .14em; }
.mic.on { border-color: var(--orange-dim); color: var(--orange); }
.mic.on .led { background: var(--orange); animation: beat 1.2s ease-in-out infinite; }
.vrow { display: flex; gap: 8px; align-items: center; }
.mic.small { padding: 8px 12px; color: var(--w); }
.mic .ico { display: block; }
.mic.small.on { color: var(--orange); border-color: var(--orange-dim); }
.mic.small.on .ico { animation: beat 1.2s ease-in-out infinite; }
.log-head .age { margin-inline-start: auto; }
.card.notice { border-color: var(--orange-dim); }
.notice .k { color: var(--orange); margin-bottom: 4px; }
.notice .ntext { max-height: 150px; overflow: auto; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; margin-bottom: 8px; color: var(--w-hi); }
.chip { background: none; border: 1px solid var(--glass-line); border-radius: 99px; padding: 5px 12px; font-size: 12px; color: var(--w); }
.chip:hover { color: var(--w-hi); border-color: var(--orange-dim); }
.drawer { position: fixed; z-index: 70; inset-block: 0; inset-inline-end: 0; width: min(520px, 100%); background: rgba(14,15,17,.92); backdrop-filter: blur(22px); border-inline-start: 1px solid var(--glass-line); padding: 18px; overflow-y: auto; }
:root[data-theme="light"] .drawer { background: rgba(240,240,238,.94); }
.drawer[hidden] { display: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--w-hi); }
#dbody div { padding: 8px 0; border-bottom: 1px solid var(--glass-line); font-size: 13px; white-space: pre-wrap; color: var(--w); }
#dbody .bad { color: var(--late); }

/* ---------- the summon (from the Dana Summon design) ---------- */
.summon { position: fixed; inset: 0; z-index: 60; }
.summon[hidden] { display: none; }
.summon .scrim { position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 50%, rgba(0,0,0,.4), rgba(0,0,0,.8)); backdrop-filter: blur(3px); }
.summon canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.summon .hud { position: absolute; inset: 0; pointer-events: none; }
.summon .panel { position: absolute; top: auto; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); width: min(580px, calc(100% - 32px));
  max-height: calc(100% - 50vh); display: flex; flex-direction: column; gap: 10px; pointer-events: auto; }   /* the bar never moves: what Dana says grows upward and scrolls */
.summon .plog { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; gap: 11px; text-align: center; padding: 2px 4px; }
.summon .plog > :first-child { margin-top: auto; }   /* sits on the bar when short; scrolls from the top when long */
.summon .plog > * { flex: none; max-width: 100%; }
.summon .pbar { flex: none; }
.summon .state { display: flex; align-items: center; justify-content: center; gap: 8px; }
.summon .state .led { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.summon .state .lbl { font: 500 10px/1 var(--hud); letter-spacing: .24em; text-transform: uppercase; color: var(--orange); }
[dir="rtl"] .summon .state .lbl { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 12px; }
.summon .said { min-height: 22px; font-size: 15.5px; color: var(--w-hi); white-space: pre-line; }
.summon .said:empty { display: none; }
.summon .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; justify-items: center; font-size: 12px; color: var(--w-dim); }
.summon .steps li { display: flex; gap: 7px; align-items: baseline; }
.summon .steps li::before { content: "✓"; color: var(--ok); }
.summon .steps li.err { color: var(--late); }
.summon .steps li.err::before { content: "✗"; color: var(--late); }   /* a step that failed never shows a green tick */
.summon .reply { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--w-hi); max-width: 52ch; white-space: pre-wrap; }
.summon .reply:empty { display: none; }
.summon .hint { font-size: 11.5px; color: var(--w-dim); }
.summon .acard { text-align: start; display: grid; gap: 9px; padding: 13px 15px; border-radius: 12px; width: 100%; background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px); box-shadow: inset 0 1px 0 var(--glass-top), 0 20px 50px rgba(0,0,0,.5); }
.summon .acard[hidden] { display: none; }
.summon .acard .k { color: var(--review); }
.summon .acard pre { margin: 0; white-space: pre-wrap; font: 12.5px/1.5 var(--mono); color: var(--w-hi); max-height: 22vh; overflow: auto; }
.summon .acard input { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--glass-line); background: transparent; color: var(--w-hi); }
.summon .warn { color: var(--late); font-size: 12.5px; font-weight: 600; margin: 0; }
.summon .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.summon .btn { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--glass-line); background: none; font: 500 10.5px/1 var(--hud); letter-spacing: .16em; text-transform: uppercase; color: var(--w-dim); }
[dir="rtl"] .summon .btn { letter-spacing: 0; font-family: var(--body); font-size: 12px; }
.summon .btn:hover:not(:disabled) { color: var(--w-hi); border-color: var(--orange-dim); }
.summon .btn.go { color: var(--orange); border-color: var(--orange-dim); }
.summon .btn:disabled { opacity: .4; cursor: not-allowed; }
.summon form { display: flex; gap: 8px; width: 100%; align-items: center; }
.summon form input, .summon form textarea { flex: 1; min-width: 0; padding: 10px 16px; border-radius: 99px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--w-hi); backdrop-filter: blur(16px); }
.summon form textarea { font: inherit; line-height: 1.45; resize: none; max-height: 9.5em; overflow-y: auto; border-radius: 20px; }   /* grows with long text */
.summon form textarea:focus-visible { outline: none; border-color: var(--orange-dim); }
.sfiles { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-bottom: 8px; }
.sfile { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 5px 6px 5px 11px; border-radius: 99px; border: 1px solid var(--glass-line); background: var(--glass); font-size: 12px; color: var(--w-hi); }
.sfile .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.sfile .st { color: var(--w-dim); font-size: 11px; }
.sfile.busy .st { color: var(--review); } .sfile.bad { border-color: rgba(230,61,46,.5); } .sfile.bad .st { color: var(--late); }
.sfile button { width: 20px; height: 20px; border-radius: 50%; border: 0; background: none; color: var(--w-dim); cursor: pointer; padding: 0; line-height: 1; }
.sfile button:hover { color: var(--w-hi); }
.summon .panel.drop { outline: 1px dashed var(--orange-dim); outline-offset: -6px; }
.dock { position: fixed; z-index: 80; top: 66px; inset-inline-end: 22px; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 7px; border-radius: 99px; border: 1px solid var(--glass-line); background: var(--glass);
  backdrop-filter: blur(14px); font: 500 10px/1 var(--hud); letter-spacing: .18em; text-transform: uppercase; color: var(--w-dim); opacity: 0; transform: translateY(-6px); transition: opacity .4s, transform .4s; pointer-events: none; }
.dock.on { opacity: 1; transform: none; }
.dock .bead { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
body.summoned .left, body.summoned .stage { filter: blur(2px) saturate(.7); transition: filter .5s; }
@media (max-width: 900px) {                          /* phones and tablets: the Summon is a sheet above the keyboard */
  .summon, .summon .scrim { touch-action: none; overscroll-behavior: contain; }
  .summon .panel { top: auto; bottom: calc(var(--kb, 0px) + 12px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); max-height: min(54dvh, calc(var(--vvh, 100dvh) - 170px)); overflow-x: hidden; }
  .summon .plog { touch-action: pan-y; }
  .summon .reply, .summon .said { overflow-wrap: anywhere; max-width: 100%; }
  .summon form { flex-wrap: wrap; }
  .summon form input, .summon form textarea { flex: 1 1 100%; order: 0; font-size: 16px; padding: 12px 16px; }   /* 16px stops iPhone zooming in */
  .summon form .mic { order: 1; }
  .summon form .btn { order: 2; flex: 1 1 0; padding: 12px 10px; text-align: center; letter-spacing: .1em; }
  .summon .acard input { font-size: 16px; }
  body.kbd .summon .chips, body.kbd .summon .hint, body.kbd .summon .steps { display: none; }
  .vrow { flex-wrap: wrap; justify-content: center; }
}

/* ---------- sign-in page ---------- */
body.login { display: grid; place-items: center; overflow: auto; }
.login-card { text-align: center; max-width: 340px; padding: 24px; display: grid; gap: 14px; justify-items: center; }
.login-card .mark { display: flex; align-items: center; gap: 10px; justify-content: center; }
.login-card .mark b { font: 600 20px/1 var(--hud); letter-spacing: .38em; color: var(--w-hi); }
.login-card .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); animation: beat 3.2s ease-in-out infinite; }
.login-card p { margin: 0; color: var(--w); }
.login-card .note { color: var(--w-dim); font-size: 12px; }
.btn { display: inline-block; padding: 10px 20px; border-radius: 99px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--w-hi); text-decoration: none; font: 500 11px/1 var(--hud); letter-spacing: .16em; text-transform: uppercase; }
.btn.primary { border-color: var(--orange-dim); color: var(--orange); }
.btn:hover { border-color: var(--orange-dim); }

.summon .chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; max-width: 560px; }
.summon .chips[hidden] { display: none; }
.summon .chips .k { width: 100%; }
.summon .chips .chip { font-size: 12.5px; padding: 6px 13px; }

/* ---------- guided set-up ---------- */
.onb { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(60% 60% at 50% 40%, rgba(0,0,0,.52), rgba(0,0,0,.88)); backdrop-filter: blur(6px); }
.onb[hidden] { display: none; }
body.onbOpen { overflow: hidden; }
.onb-card { width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; display: grid; gap: 16px; padding: 22px 24px 24px; border-radius: 16px;
  background: rgba(18,19,21,.9); border: 1px solid var(--glass-line); box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 var(--glass-top); }
:root[data-theme="light"] .onb-card { background: rgba(244,244,242,.95); }
.onb-top { display: flex; align-items: center; gap: 14px; min-height: 22px; }
.onb-top .k { white-space: nowrap; min-width: 0; }
.onb-bar { flex: 1; height: 3px; border-radius: 3px; background: var(--glass-line); overflow: hidden; }
.onb-bar i { display: block; height: 100%; background: var(--orange); border-radius: 3px; transition: width .3s ease; }
.onb-x { width: 28px; height: 28px; border-radius: 50%; color: var(--w-dim); border: 1px solid var(--glass-line); font-size: 12px; line-height: 1; }
.onb-x:hover { color: var(--w-hi); border-color: var(--orange-dim); }
.onb h2 { margin: 0; font: 500 22px/1.35 var(--body); color: var(--w-hi); }
.onb p { margin: 0; color: var(--w); font-size: 14.5px; line-height: 1.6; }
.onb .hint { color: var(--w-dim); font-size: 13px; }
.onb-intro { display: grid; gap: 8px; }
.onb-intro.second { padding-top: 14px; border-top: 1px solid var(--glass-line); opacity: .8; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { padding: 11px 17px; border-radius: 99px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--w-hi); font-size: 14px; line-height: 1.3; text-align: start; transition: border-color .2s, color .2s, background .2s; }
.opt:hover { border-color: var(--orange-dim); }
.opt[aria-pressed="true"] { border-color: var(--orange); color: var(--orange); background: rgba(234,117,26,.1); }
.onb-other { display: flex; gap: 10px; align-items: flex-start; }
.onb-other input, .onb-other textarea { flex: 1; min-width: 0; font: 400 16px/1.5 var(--body); padding: 12px 16px; border-radius: 14px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--w-hi); }
.onb-other textarea { resize: vertical; min-height: 88px; }
.onb-other input:focus, .onb-other textarea:focus { outline: none; border-color: var(--orange-dim); }
.onb-mic { flex: none; width: 46px; height: 46px; padding: 0 !important; justify-content: center; }
.onb-status { min-height: 18px; font-size: 12.5px; color: var(--w-dim); }
.onb-nav { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.onb-nav .grow { flex: 1; }
.onb-nav .btn { cursor: pointer; }
.onb-nav .btn:disabled { opacity: .35; cursor: default; }
.recap { display: grid; gap: 8px; }
.recap-row { display: grid; gap: 3px; text-align: start; padding: 11px 15px; border-radius: 12px; border: 1px solid var(--glass-line); background: var(--glass); }
.recap-row:hover { border-color: var(--orange-dim); }
.recap-row .rq { font-size: 12px; color: var(--w-dim); }
.recap-row .ra { font-size: 14px; color: var(--w-hi); overflow-wrap: anywhere; }
.recap-row .ra.none { color: var(--w-dim); font-style: italic; }
.onb-toast { position: fixed; z-index: 95; inset-inline: 16px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); margin-inline: auto; width: fit-content; max-width: 560px; padding: 12px 18px;
  border-radius: 14px; background: rgba(18,19,21,.92); border: 1px solid var(--orange-dim); color: var(--w-hi); font-size: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
@media (max-width: 900px) {
  .onb { padding: 10px; padding-bottom: calc(var(--kb, 0px) + 10px); place-items: end center; }
  .onb-card { max-height: calc(var(--vvh, 100dvh) - 20px); padding: 18px 18px 20px; }
  .onb h2 { font-size: 20px; }
  .onb-nav { flex-wrap: wrap; }
  .onb-nav .btn { padding: 12px 16px; }
}
.onb-card .onb-nav { position: sticky; bottom: -24px; margin-bottom: -24px; padding: 14px 0 24px; background: linear-gradient(to bottom, transparent, rgba(18,19,21,.97) 28%); }
:root[data-theme="light"] .onb-card .onb-nav { background: linear-gradient(to bottom, transparent, rgba(244,244,242,.98) 28%); }
@media (max-width: 900px) { .onb-card .onb-nav { bottom: -20px; margin-bottom: -20px; padding-bottom: 20px; } }

/* ---------- dashboard sections: headings and links ---------- */
.rows .rhead { padding: 14px 15px 6px; font: 500 10px/1.4 var(--hud); letter-spacing: .2em; text-transform: uppercase; color: var(--w-dim); border-bottom: 1px solid var(--glass-line); }
[dir="rtl"] .rows .rhead { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 12px; }
.rows .rlink { color: var(--w-hi); text-decoration: none; }
.rows .rlink:hover { color: var(--orange); }
/* section header: links, then Dashboard, always together at the top right (top left in Arabic, mirrored) */
.sec-head .sec-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.sec-head .sec-actions .back { margin-inline-start: 0; text-decoration: none; }
.sec-head .sec-actions .back[hidden] { display: none; }
.rows .rnote { padding: 12px 15px; font-size: 13px; color: var(--w); border-bottom: 1px solid var(--glass-line); overflow-wrap: anywhere; }
.rows .rnote + .rnote { color: var(--w-dim); font-size: 12px; }
.sec-head #secLink2 { margin-inline-start: auto; text-decoration: none; }
.sec-head #secLink2[hidden] { display: none; }
.sec-head #secLink2:not([hidden]) + #secLink { margin-inline-start: 8px; }

/* usage meters (top centre) */
.usage { display: flex; align-items: center; gap: 38px; background: transparent; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 999px;
  padding: 9px 32px; color: inherit; font: inherit; font-size: 11px; line-height: 1; cursor: pointer; }
.usage .m { display: inline-flex; align-items: center; gap: 10px; opacity: .9; }
.usage .m svg { width: 14px; height: 14px; flex: none; display: block; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.usage .m .mono { line-height: 1; min-width: 2.6em; }
.usage .bar { width: 64px; height: 5px; margin: 0; border-radius: 3px; background: rgba(127,127,127,.25); overflow: hidden; display: block; align-self: center; }   /* margin 0: the page's own .bar has a top margin */
.usage .bar i { display: block; height: 100%; background: var(--ok, #6fbf73); transition: width .4s, background .4s; }
.usage .bar i.mid { background: #d2a03a; } .usage .bar i.high { background: var(--late, #e0663a); }
.usage .m.mid .mono { color: #d2a03a; } .usage .m.high .mono { color: var(--late, #e0663a); }
.usage-panel { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); max-height: 75vh; overflow: auto; padding: 18px 20px; z-index: 60; }
.usage-panel h4 { margin: 14px 0 6px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.usage-panel .row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(127,127,127,.15); }
.usage-panel .row small { grid-column: 1 / -1; opacity: .6; }
.usage-panel .wide { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: rgba(127,127,127,.2); overflow: hidden; }
.usage-panel .wide i { display: block; height: 100%; background: var(--ok, #6fbf73); } .usage-panel .wide i.mid { background: #d2a03a; } .usage-panel .wide i.high { background: var(--late, #e0663a); }
@media (max-width: 900px) { .usage { gap: 0; padding: 7px 12px; } .usage .m { gap: 6px; } .usage .m:not(.worst) { display: none; } .usage .bar { width: 26px; } }
.usage[hidden] { display: none; }
@media (min-width: 901px) and (max-width: 1180px) { .usage { gap: 24px; padding: 9px 22px; } .usage .bar { width: 48px; } }

/* sections in boxes: one box per heading (Ahmad, 2026-10-22) */
.rows.boxed { background: none; border: 0; box-shadow: none; backdrop-filter: none; display: grid; gap: 14px; overflow: hidden; min-height: 0;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-auto-rows: minmax(0, 1fr); align-content: stretch; }
.rows.boxed .box { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 12px; overflow: auto; min-height: 0;
  backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 var(--glass-top); }
.rows.boxed .box .rhead { position: sticky; top: 0; z-index: 1; background: var(--glass); backdrop-filter: blur(16px); }
.rows .rsub { padding: 12px 15px 4px; font: 500 9.5px/1.4 var(--hud); letter-spacing: .16em; text-transform: uppercase; color: var(--w-dim); }
[dir="rtl"] .rows .rsub { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 11.5px; }
/* Overview: emails top left, meetings the whole right side, tasks and lead follow-ups under emails */
.rows.boxed.L-report { grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: auto;
  grid-template-areas: "mail meet" "tasks meet" "leads meet"; }
/* Leads: SHAREKAT and MEDARES boxes on the left, recent updates on the right */
.rows.boxed.L-crm { grid-template-columns: 1.15fr 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "a upd" "b upd"; }
@media (max-width: 900px) {
  .rows.boxed, .rows.boxed.L-report, .rows.boxed.L-crm { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: auto; overflow: visible;
    grid-template-areas: none; }
  .rows.boxed { grid-template-columns: 1fr !important; }
  .rows.boxed .box { grid-area: auto !important; overflow: visible; }
}
.rows.boxed .box.strip { grid-column: 1 / -1; }
.rows.boxed .box.strip .rnote { border-bottom: 0; }

/* first box: icons (Ahmad, 2026-10-22) */
.sicon { display: inline-flex; width: 15px; height: 15px; flex: none; color: var(--orange); opacity: .9; }
.sicon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#projK { display: inline-flex; align-items: center; gap: 7px; }
.card.stat .sub .row .lbl { display: inline-flex; align-items: center; gap: 9px; }
.card.stat .sub .row .lbl .sicon { color: var(--w); width: 14px; height: 14px; }
/* your completion this week, with the company ring outside the box, next to it */
.done-row { position: relative; }
.done-row > .team-ring { position: absolute; top: 50%; inset-inline-start: calc(100% + 10px); transform: translateY(-50%); width: 40px; height: 40px; }
.done-row > .team-ring > svg:first-child { inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
.done-row > .team-ring circle { stroke-width: 5; }
.done-row > .team-ring #teamPct { font-size: 9.5px; margin-top: 0; }
.done-row > .team-ring .ico { display: none; }
.done-card { display: flex; align-items: center; gap: 14px; }
.done-card .done-main { flex: 1; min-width: 0; }
.team-ring { position: relative; flex: none; width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass);
  display: grid; place-items: center; cursor: pointer; color: var(--w-hi); padding: 0; }
.team-ring:hover { border-color: var(--orange-dim); }
.team-ring > svg:first-child { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); transform: rotate(-90deg); }
.team-ring circle { fill: none; stroke-width: 4; }
.team-ring .trk { stroke: var(--w-faint); }
.team-ring .val { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.team-ring .val.mid { stroke: #d2a03a; } .team-ring .val.low { stroke: var(--late); }
.team-ring #teamPct { font-size: 13px; line-height: 1; margin-top: -8px; }
.team-ring .ico { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); width: 13px; height: 13px; fill: none; stroke: var(--w); stroke-width: 1.6; }
.team-panel { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); padding: 18px 20px; z-index: 60; }
.team-panel .row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--glass-line); }
.team-panel .row small { grid-column: 1 / -1; color: var(--w-dim); }
.team-panel .wide { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--w-faint); overflow: hidden; }
.team-panel .wide i { display: block; height: 100%; background: var(--ok); } .team-panel .wide i.mid { background: #d2a03a; } .team-panel .wide i.high { background: var(--late); }
/* text size (Settings), per person */
.menu .sizes { display: flex; gap: 6px; padding: 4px 12px 10px; }
.menu .sizes .size { flex: 1; height: 34px; border-radius: 8px; border: 1px solid var(--glass-line); background: transparent; color: var(--w-hi); cursor: pointer; font-family: var(--body); }
.menu .sizes .size.on { border-color: var(--orange); color: var(--orange); }
.left, .section, .menu, .nodegrid, .summon, .sheet, .drawer, .onb-card { zoom: var(--ts, 1); }   /* the top bar stays as it is */
.team-ring .val { stroke-dasharray: 170; stroke-dashoffset: 170; }
.done-card .bar i { width: 0; }

/* ---- views: Today/Week, List/Week/Month toggle; calendars; agreements ---- */
.sec-actions .vseg { border-radius: 99px; overflow: hidden; }
.sec-actions .vseg[hidden] { display: none; }
.sec-actions .vseg button { padding: 7px 13px; border: 0; background: none; cursor: pointer; }
.sec-actions .vseg button[aria-pressed="true"] { background: var(--orange); color: #fff; }
[dir="rtl"] .sec-actions .vseg button { font-family: var(--body); letter-spacing: 0; font-size: 12px; }
.t-live { color: var(--orange); }
.rows .tags { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.rows .tag { font-size: 10.5px; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--glass-line); color: var(--w); }
.rows.boxed.L-week { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 30%) minmax(0, 1fr); }
.rows.boxed.L-agr { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 36%) minmax(0, 1fr); }
.rows.boxed.L-cal { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
.rows.boxed .wide { grid-column: 1 / -1; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; min-height: 0; overflow: auto; padding: 8px; border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(18px); border: 1px solid var(--glass-line); }   /* solid enough that the sphere does not show through the gaps */
.cal .day { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 12px; padding: 10px 8px; min-height: 150px; display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow: hidden; }
.cal.month .day { min-height: 104px; padding: 8px 6px; }
.cal .day.today { border-color: var(--orange-dim); box-shadow: inset 0 0 0 1px var(--orange-dim); }
.cal .day.out { opacity: .45; }
.cal .dh { font: 500 10px/1.2 var(--hud); letter-spacing: .14em; text-transform: uppercase; color: var(--w-dim); margin-bottom: 2px; }
.cal .day.today .dh { color: var(--orange); }
[dir="rtl"] .cal .dh { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 11.5px; }
.cal .it { display: block; padding: 6px 8px; border-radius: 8px; border-inline-start: 3px solid var(--info); background: var(--glass-top); font-size: 12px; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.cal .it b { font-weight: 400; color: var(--w-hi); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cal.month .it b { -webkit-line-clamp: 2; }
.cal .it small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .it small { display: block; color: var(--w-dim); font-size: 10.5px; margin-top: 2px; }
.cal a.it:hover b { color: var(--orange); }
.cal .it.t-late { border-color: var(--late); } .cal .it.t-review { border-color: var(--review); } .cal .it.t-ok { border-color: var(--ok); }
.cal .it.t-live { border-color: var(--orange); } .cal .it.t-meet { border-color: #6f9cff; } .cal .it.t-lead { border-color: #b48cff; }
.cal .more { color: var(--w-dim); font-size: 11px; }
.calhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.caltitle { font: 500 13px/1 var(--hud); letter-spacing: .16em; text-transform: uppercase; color: var(--w-hi); }
[dir="rtl"] .caltitle { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 14px; }
.calnav { display: flex; gap: 6px; }
@media (max-width: 900px) {
  .rows.boxed.L-week, .rows.boxed.L-agr, .rows.boxed.L-cal { grid-template-columns: 1fr; grid-template-rows: none; }
  .cal { grid-template-columns: 1fr; overflow: visible; }
  .cal .day { min-height: 0; }
  .cal .day:not(.has):not(.today) { display: none; }   /* phones: only the days with something on them */
  .sec-head .sec-actions { flex-wrap: wrap; }
}

/* ---- reminder pop-ups ---- */
.toasts { position: fixed; z-index: 95; top: 64px; inset-inline-end: 18px; display: grid; gap: 10px; width: min(340px, calc(100vw - 24px)); }
.toast { padding: 13px 15px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 86%, transparent); border: 1px solid var(--orange-dim); backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35); display: grid; gap: 8px; animation: toastIn .35s ease; }
.toast.late { border-color: rgba(230,61,46,.6); }
.toast .th { display: flex; align-items: center; gap: 8px; font: 500 10.5px/1.2 var(--hud); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.toast.late .th { color: var(--late); }
[dir="rtl"] .toast .th { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.toast .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: beat 1.2s ease-in-out infinite; }
.toast .tb { font-size: 14px; color: var(--w-hi); line-height: 1.4; }
.toast .ta { display: flex; gap: 8px; }
.toast .ta a { text-decoration: none; color: var(--orange); border-color: var(--orange-dim); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* the state line when Dana is out of reach */
.summon .state.bad .led { background: var(--late); }
.summon .state.bad .lbl { color: var(--late); cursor: pointer; text-transform: none; letter-spacing: .02em; }

/* ---- the daily briefing pop-up ---- */
.brief .onb-card { width: min(520px, 100%); gap: 10px; }
.brief .bt { display: flex; justify-content: space-between; align-items: baseline; }
.brief .bt .k { color: var(--orange); }
.brief .bd { font-size: 12px; color: var(--w-dim); }
.brief .bg { margin: 2px 0 4px; font-size: 17px; line-height: 1.45; color: var(--w-hi); }
.brief .bp { margin: 0; font-size: 14px; color: var(--w); }
.brief .bh { margin-top: 6px; font: 500 10.5px/1 var(--hud); letter-spacing: .18em; text-transform: uppercase; color: var(--w-dim); }
[dir="rtl"] .brief .bh { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.brief .bl { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.brief .bl li { position: relative; padding-inline-start: 16px; font-size: 14.5px; line-height: 1.45; color: var(--w-hi); }
.brief .bl li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.brief .vrow { margin-top: 8px; display: flex; gap: 8px; }
.brief .chip.go { color: var(--orange); border-color: var(--orange-dim); }

/* ---- marking done from the dashboard ---- */
.rows .rend { display: inline-flex; align-items: center; gap: 8px; justify-self: end; }
.rows .rdone { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--glass-line); background: none; color: var(--w-dim); cursor: pointer; font-size: 13px; line-height: 1; padding: 0; flex: none; }
.rows .rdone:hover, .rows .rdone:focus-visible { color: var(--ok); border-color: var(--ok); }
.rows .r.gone { opacity: .35; pointer-events: none; transition: opacity .3s; }
.toast.ok { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.toast.ok .th { color: var(--ok); }
/* the choice box: Dana's question, a preview, answers as buttons, "Other" */
.choice .bt { align-items: center; }
.choice .cpre { max-height: 38vh; overflow-y: auto; white-space: pre-wrap; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--w); font-size: 13.5px; line-height: 1.55; }
.choice .copts { display: grid; gap: 8px; }
.choice .copt { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; align-items: baseline; text-align: start; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--w-hi); font-size: 14.5px; cursor: pointer; transition: border-color .2s, background .2s; }
.choice .copt:hover, .choice .copt:focus-visible { border-color: var(--orange-dim); background: rgba(234,117,26,.08); outline: none; }
.choice .copt.first { border-color: var(--orange-dim); }
.choice .copt .cn { font: 500 11px/1 var(--hud); color: var(--orange); }
.choice .copt .cd { grid-column: 2; font-size: 12.5px; color: var(--w-dim); margin-top: 3px; }
.choice .onb-other input { font-size: 14.5px; padding: 10px 14px; }
/* the draft review box */
.draftbox .onb-card { width: min(640px, 100%); }
.draftbox .dform { display: grid; gap: 8px; }
.draftbox .dfield { display: grid; grid-template-columns: 70px 1fr; align-items: baseline; gap: 10px; }
.draftbox .dfield .dl { font: 500 10.5px/1 var(--hud); letter-spacing: .14em; text-transform: uppercase; color: var(--w-dim); }
[dir="rtl"] .draftbox .dfield .dl { font-family: var(--body); letter-spacing: 0; font-size: 12.5px; }
.draftbox .dfield input, .draftbox .dfield textarea { width: 100%; min-width: 0; font: 400 14.5px/1.5 var(--body); padding: 8px 12px; border-radius: 10px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--w-hi); }
.draftbox .dfield textarea { resize: vertical; max-height: 46vh; }
.draftbox .dfield input:focus, .draftbox .dfield textarea:focus { outline: none; border-color: var(--orange-dim); }
.draftbox .dnote { font-size: 12px; color: var(--w-dim); }
.draftbox .chip:disabled { opacity: .45; }
@media (max-width: 600px) { .draftbox .dfield { grid-template-columns: 1fr; gap: 4px; } }
/* staging label, and the Update pop-up when a new version is live */
.brand .stagetag { font: 600 10px/1 var(--hud); letter-spacing: .16em; color: #111; background: #f2c14e; padding: 4px 7px; border-radius: 5px; }
.update { position: fixed; z-index: 96; inset-inline: 16px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); margin-inline: auto; width: fit-content; max-width: 560px;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-radius: 14px; background: rgba(18,19,21,.94); border: 1px solid var(--orange-dim);
  color: var(--w-hi); font-size: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.update .chip.go { color: var(--orange); border-color: var(--orange-dim); }
:root[data-theme="light"] .update { background: rgba(244,244,242,.97); }
/* saved chat threads: the Chats box, the thread bar and the whole conversation in the panel */
.chats .log-head .chip { margin-inline-start: auto; padding: 4px 10px; font-size: 11px; }
.chatq { width: 100%; margin: 0 0 8px; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--w-hi); font: 400 13px/1.4 var(--body); }
.chatq:focus { outline: none; border-color: var(--orange-dim); }
.chat-list li.on button { background: var(--glass-top); }
.chat-list li.empty { padding: 10px; font-size: 12.5px; color: var(--w-dim); }
.chat-list .act { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.summon .tbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(18px); }
.summon .tbar .ttitle { flex: 1; min-width: 0; font: 500 13px/1.3 var(--body); color: var(--w-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.summon .tbar .tb { flex: none; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--glass-line); background: none; color: var(--w-dim); font: 500 11px/1 var(--body); cursor: pointer; white-space: nowrap; }
.summon .tbar .tb:hover { color: var(--w-hi); border-color: var(--orange-dim); }
.summon .tbar .tb[hidden] { display: none; }
.summon .thist { display: grid; gap: 14px; width: 100%; text-align: start; }
.summon .thist:empty { display: none; }
.summon .tm { display: grid; gap: 3px; }
.summon .tm .tw { font: 500 10px/1 var(--hud); letter-spacing: .16em; text-transform: uppercase; color: var(--w-dim); }
.summon .tm.user .tw { color: var(--orange); }
.summon .tm.error .tt { color: var(--late); }
.summon .tm .tt { font-size: 14px; line-height: 1.55; color: var(--w-hi); white-space: pre-wrap; overflow-wrap: anywhere; }
.summon .tm.user .tt { color: var(--w); }
.summon .tm .tsteps { font-size: 11.5px; color: var(--w-dim); }
.summon .tm .tfl { font-size: 12px; color: var(--w-dim); }
[dir="rtl"] .summon .tm .tw { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 11.5px; }
#dbody .shr { display: flex; align-items: center; gap: 10px; padding: 9px 4px; font-size: 14px; color: var(--w-hi); cursor: pointer; }
#dbody .shr input { width: 17px; height: 17px; accent-color: var(--orange); }
#dbody .hintp { font-size: 13px; color: var(--w-dim); line-height: 1.5; margin: 0 0 8px; }
#dbody .tfile { display: block; padding: 9px 4px; color: var(--w-hi); text-decoration: none; font-size: 14px; }
#dbody .tfile:hover { color: var(--orange); }
#dbody .chip.go { margin-top: 10px; color: var(--orange); border-color: var(--orange-dim); }
/* while recording, Send says it will send what was said */
.summon #ssend.rec { color: #111; background: var(--orange); border-color: var(--orange); }
.draftbox .dtabs { justify-self: start; margin-top: 2px; }
.draftbox .dprev { max-height: 46vh; overflow-y: auto; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--w-hi); font-size: 14.5px; line-height: 1.55; }
.draftbox .dprev p { margin: 0 0 10px; }
.draftbox .dprev ul, .draftbox .dprev ol { margin: 0 0 10px; padding-inline-start: 22px; }
.draftbox .dprev a { color: var(--orange); }
.draftbox .dfield[hidden] { display: none; }
