/* עונים לי · «מובן במבט אחד» (23.11.2026, glance.js): שורת מצב, משפט אחד לכל חדר, מה כל הגדרה עושה, «מה זה?»
   והקבלה של השבוע. אחיה בחר הכול מהדמו glance.onimli.pages.dev.
   כל צבע ומידה הם משתנים של המשפחה ושל hand.css, כך שהיום והלילה באים לבד. צהוב רק לסימון, תמיד עם טבעת דיו.
   במצבי ניגודיות (‎.a11y-contrast, ‎.hc) הטוקנים של hand.css לא מוגדרים, והשכבות נופלות לנייר ולדיו בלי זכוכית וצל.
   ⛔ אותו קובץ בדיוק בשני הלוחות: maane site/assets/glance.css ו-wa-bot-saas public/assets/css/glance.css. */

:root {
  --gl-ease: cubic-bezier(.2, .9, .25, 1);
  --gl-press: var(--hand-press, cubic-bezier(.3, 1.5, .5, 1));
}

/* ═════ 1 · שורת מצב: האם זה עובד, מי מחכה, כמה נשאר ═════ */
.gl-status {
  display: flex; align-items: stretch; width: fit-content; max-width: 100%; margin: 2px 0 16px; padding: 0;
  border-radius: 999px; background: var(--hand-glass, var(--sheet));
  box-shadow: var(--hand-rim, 0 0 #0000), 0 0 0 1px var(--hand-glass-line, var(--hair)), 0 8px 18px -14px rgba(60, 48, 10, .35);
  -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  list-style: none; overflow: hidden;
}
.gl-status li { display: flex; }
.gl-status li + li { border-inline-start: 1px solid var(--hair); }
.gl-st {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px;
  color: var(--ink); font: 15px/1.15 var(--f-ui); text-decoration: none; white-space: nowrap;
  transition: transform .45s var(--gl-press), background-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.gl-st:active { transform: scale(.94); }
@media (hover: hover) { .gl-st:hover { background: var(--hand-fill, rgba(27, 26, 23, .05)); } }
.gl-st:focus-visible { outline: 2.5px solid var(--ink); outline-offset: -4px; border-radius: 999px; }
.gl-st b { font: 400 17px/1 var(--f-display); font-variant-numeric: tabular-nums lining-nums; }
.gl-st small { color: var(--ink-soft); font: 13.5px/1 var(--f-ui); }
.gl-dot { position: relative; flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 1.5px var(--ink); }
.gl-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--ink); opacity: 0; animation: gl-breathe 2.8s var(--gl-ease) infinite; }
.gl-st--off { color: var(--err); }
.gl-st--off .gl-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--err); }
.gl-st--off .gl-dot::after { content: none; }
.gl-meter { position: relative; display: inline-block; width: 44px; height: 8px; border-radius: 999px; background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--ink); overflow: hidden; }
.gl-meter i { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p, 0%); background: var(--yellow); box-shadow: inset 0 0 0 1.5px var(--ink); border-radius: 999px; transform-origin: right; animation: gl-fill .9s var(--gl-ease) .25s backwards; }
@keyframes gl-breathe { 0% { opacity: .55; transform: scale(.6); } 70%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes gl-fill { from { transform: scaleX(0); } }

/* ═════ 2 · במשפט אחד: מתחת לכותרת, מה המצב ומה עושים ═════ */
.gl-answer { margin: 2px 0 18px; max-width: 32em; color: var(--ink-soft); font: 17px/1.6 var(--f-body); text-wrap: pretty; }
/* the number's stroke is hand.css's own mark (night: half the yellow, under cream words); in the contrast looks it is not there */
.gl-answer b {
  padding: 0 .14em; color: var(--ink); font: 400 1.18em/1 var(--f-display); font-variant-numeric: tabular-nums lining-nums;
  background: linear-gradient(var(--hand-mark), var(--hand-mark)) 0 88% / 100% .42em no-repeat;
  animation: gl-mark .7s var(--gl-ease) .2s backwards;
}
.gl-answer a { color: var(--ink); font-family: var(--f-ui); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; white-space: nowrap; }
.gl-answer a::after { content: " ←"; }
@keyframes gl-mark { from { background-size: 0 .42em; } }

/* ═════ 3 · מה זה עושה: כל הגדרה אומרת מה יקרה ═════ */
.gl-effect { display: block; margin-top: 3px; color: var(--ink-soft); font: 14.5px/1.45 var(--f-body); text-wrap: pretty; }
.gl-hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 1.5px; width: 100%; max-width: 168px; height: 10px; margin-top: 7px; }
.gl-hours span { border-radius: 2px; background: var(--hair); }
.gl-hours span.on { background: var(--ink); }
.gl-hours span.now { background: var(--yellow); box-shadow: 0 0 0 1.5px var(--ink); }
.gl-effect .gl-meter { display: block; width: 120px; margin-top: 7px; }
.gl-now {
  display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; padding: 10px 14px; border-radius: var(--hand-leaf-lens, 14px 6px 14px 6px);
  background: var(--ivory); color: var(--ink); font: 15px/1.45 var(--f-body);
  animation: gl-drop .5s var(--gl-press) backwards;
}
.gl-now::before { content: "✓"; display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--sheet); font: 14px/1 var(--f-ui); }
.gl-now b { font-family: var(--f-ui); font-weight: 400; }
.gl-now button { margin-inline-start: auto; min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--ink); font: 15px var(--f-ui); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.gl-now button:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; }
#sd .gl-now { margin-inline: 16px; }
@keyframes gl-drop { from { transform: translateY(-8px) scale(.97); opacity: 0; } }

/* ═════ 4 · מה זה?: עיגול קטן ליד כל קטע, ובועה עם «הראו לי איפה» ═════ */
.gl-pin {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-block: -12px; margin-inline: 2px -10px;
  padding: 0; border: 0; background: none; vertical-align: middle; cursor: pointer; -webkit-tap-highlight-color: transparent;
  animation: gl-nod .9s var(--gl-press) .5s backwards;
}
.gl-pin i {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ivory); box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink);
  font: 400 13px/1 var(--f-ui); font-style: normal; transition: transform .45s var(--gl-press), background-color .2s;
}
/* the «?» is drawn here, not written: a title's innerText goes to the bar on scroll (shell.js), and stays without it */
.gl-pin i::before { content: "?"; }
/* on the yellow the «?» stays in the day's ink, at night too */
.gl-pin[aria-expanded="true"] i { background: var(--yellow); color: #1b1a17; }
@media (hover: hover) { .gl-pin:hover i { background: var(--yellow); color: #1b1a17; } }
.gl-pin:active i { transform: scale(.86); }
.gl-pin:focus-visible { outline: none; }
.gl-pin:focus-visible i { box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 3px var(--sheet), 0 0 0 5px var(--ink); }
@keyframes gl-nod { 0% { transform: scale(.4) rotate(-30deg); } 60% { transform: scale(1.12) rotate(6deg); } }

.gl-pop {
  position: fixed; z-index: 2147483000; width: min(312px, calc(100vw - 28px)); padding: 16px 18px 12px;
  border-radius: var(--hand-leaf, 30px 14px 30px 14px); background: var(--sheet); color: var(--ink);
  box-shadow: var(--hand-rim, 0 0 #0000), 0 0 0 1.5px var(--ink), 0 18px 40px -18px rgba(40, 30, 0, .45);
  font: 16px/1.55 var(--f-body); text-align: start; transform-origin: var(--ox, 50%) var(--oy, 0);
  animation: gl-grow .42s var(--gl-press) backwards;
}
.gl-pop[hidden] { display: none; }
.gl-pop h4 { margin: 0 0 4px; padding-inline-end: 34px; font: 400 18px/1.25 var(--f-ui); }
.gl-pop p { margin: 0 0 12px; color: var(--ink-soft); text-wrap: pretty; }
.gl-pop .gl-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.gl-k { min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--hand-leaf-key, 26px 11px 26px 11px); cursor: pointer; font: 16px/1 var(--f-ui); color: var(--ink); transition: transform .45s var(--gl-press); }
.gl-k:active { transform: scale(.95); }
.gl-k--paper { background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--ink), 0 6px 14px -10px rgba(60, 48, 10, .5); }
.gl-k--word { padding: 0 2px; background: none; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.gl-k:focus-visible, .gl-pop__x:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; }
.gl-pop__x { position: absolute; inset-block-start: 2px; inset-inline-end: 2px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink-soft); font: 22px/1 var(--f-ui); cursor: pointer; }
@keyframes gl-grow { from { transform: scale(.6); opacity: 0; } }

/* the ring «הראו לי איפה» draws around the real control */
.gl-ring { position: fixed; z-index: 2147482999; pointer-events: none; overflow: visible; }
.gl-ring rect { fill: none; stroke-linecap: round; stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); animation: gl-draw .8s var(--gl-ease) forwards, gl-fade .5s ease 2.9s forwards; }
.gl-ring .y { stroke: var(--yellow); stroke-width: 7; }
.gl-ring .k { stroke: var(--ink); stroke-width: 2; }
@keyframes gl-draw { to { stroke-dashoffset: 0; } }
@keyframes gl-fade { to { opacity: 0; } }

/* ═════ 5 · הקבלה של השבוע: נייר שיוצא מהמדפסת ═════ */
.gl-print { position: relative; width: min(344px, 100%); margin: 26px auto 34px; padding-top: 10px; }
.gl-print::before { /* the slot it comes out of */
  content: ""; position: absolute; z-index: 2; inset-block-start: 0; inset-inline: -10px; height: 14px; border-radius: 999px;
  background: var(--ink); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .14), 0 6px 10px -6px rgba(0, 0, 0, .5);
}
.gl-feed { overflow: hidden; padding: 0 6px 18px; margin: 0 -6px; }
.gl-receipt {
  position: relative; margin-top: -2px; padding: 22px 22px 18px; background: var(--sheet); color: var(--ink);
  filter: drop-shadow(0 12px 14px rgba(60, 48, 10, .16)) drop-shadow(0 0 .6px rgba(27, 26, 23, .35));
  animation: gl-feed 1.5s steps(9, end) .3s backwards;
}
/* it waits, still in its slot, until it is on screen */
.gl-receipt.gl-wait { animation-play-state: paused; }
.gl-receipt::after { /* torn edge */
  content: ""; position: absolute; inset-inline: 0; inset-block-start: 100%; height: 9px;
  background: linear-gradient(135deg, var(--sheet) 50%, transparent 50.5%) 0 0 / 14px 9px repeat-x,
              linear-gradient(225deg, var(--sheet) 50%, transparent 50.5%) 0 0 / 14px 9px repeat-x;
}
@keyframes gl-feed { from { transform: translateY(-101%); } }
.gl-rc-pic { display: block; width: 26px; height: auto; margin: 0 auto 6px; }
.gl-rc-head { margin: 0; text-align: center; font: 400 21px/1.2 var(--f-display); }
.gl-rc-sub { margin: 4px 0 14px; text-align: center; color: var(--ink-soft); font: 14px/1.3 var(--f-ui); }
.gl-rc-lines { margin: 0; padding: 12px 0; list-style: none; border-block: 1.5px dashed var(--line-strong); }
.gl-rc-lines li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font: 15.5px/1.4 var(--f-body); }
.gl-rc-lines li span, .gl-rc-total span { flex: none; }
.gl-rc-lines li i { flex: 1; min-width: 12px; border-bottom: 2px dotted var(--line-strong); transform: translateY(-4px); }
.gl-rc-lines li b, .gl-rc-total b { font: 400 18px/1 var(--f-display); font-variant-numeric: tabular-nums lining-nums; }
.gl-rc-lines li small { color: var(--ink-soft); font: 13.5px var(--f-ui); }
.gl-rc-lines li b + small { margin-inline-start: -4px; }
.gl-rc-total { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 2px; font: 17px/1.3 var(--f-ui); }
.gl-rc-total i { flex: 1; }
.gl-rc-total b { padding: 0 .12em; font-size: 30px; background: linear-gradient(var(--hand-mark), var(--hand-mark)) 0 90% / 100% .4em no-repeat; }
.gl-rc-bars { height: 30px; margin: 14px auto 2px; width: 70%; opacity: .85;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px); }
.gl-rc-foot { margin: 6px 0 0; text-align: center; color: var(--ink-soft); font: 13px/1.4 var(--f-ui); }
.gl-rc-again { display: block; margin: 10px auto 0; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--ink); font: 15px var(--f-ui); text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.gl-rc-again:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; }

/* ═════ 6 · קודם מי שמחכה (בהודעות): הצעד הבא ו«עוד» עולים לראש «היום» כשהבוט עוד לא עונה (glance.js order) ═════ */
#room-home > :is(#next, #home-more) { width: min(100%, var(--sd-col, 640px)); margin-inline: auto; margin-block: 0 16px; }
/* «נתונים» is the same room: what moved up is not part of it */
#room-home[data-mode="stats"] > :is(#next, #home-more) { display: none !important; }

/* where each dashboard puts its column: the bot's settings window brings its own 16px to each part (simple.css .sd-group),
   and its home's live and «נתונים» views stand in a centred column (simple.css 376) */
#sd :is(.gl-status, .gl-answer) { margin-inline: 16px; max-width: calc(100% - 32px); }
.page-app #room-home:is([data-live="true"], [data-mode="stats"]) > :is(.gl-status, .gl-answer) { margin-inline-start: max(0px, calc((100% - var(--sd-col, 640px)) / 2)); }

/* a narrow phone: the capsule keeps its words and numbers, the bar goes (the numbers say it) */
@media (max-width: 380px) {
  .gl-status .gl-meter { display: none; }
  .gl-st { gap: 6px; padding: 0 11px; }
}
/* the contrast looks: paper and ink, no glass */
html:is(.a11y-contrast, .hc) .gl-status { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--sheet); box-shadow: 0 0 0 1.5px var(--ink); }
/* every moving part stops for reduced motion (the dashboard's own switch, .a11y-no-motion, too) */
@media (prefers-reduced-motion: reduce) {
  .gl-dot::after, .gl-meter i, .gl-answer b, .gl-now, .gl-pin, .gl-pop, .gl-receipt, .gl-ring rect { animation: none !important; }
  .gl-ring rect { stroke-dashoffset: 0; }
  .gl-st, .gl-k, .gl-pin i { transition: none; }
}
html.a11y-no-motion .gl-dot::after, html.a11y-no-motion :is(.gl-meter i, .gl-answer b, .gl-now, .gl-pin, .gl-pop, .gl-receipt, .gl-ring rect) { animation: none !important; }
html.a11y-no-motion .gl-ring rect { stroke-dashoffset: 0; }
