/* thread.css — B4 «ما يسافر وما يبقى». Paper #F1F0EC, ink, red. */
body.th{ background:#F1F0EC; }
/* the scene is drawn on paper in both themes: pin the kit tokens to their light values on this page,
   so the appbar (back, wordmark, أ+) and the buttons never turn white on this paper in dark mode */
body.th{ --paper:#FFFFFF; --paper-2:#F1F0EC; --paper-3:#E7E6E1; --ink:#0B0B0B; --ink-2:#3A3A3A; --ink-3:#5C5C5C; --hair:#E2E1DC; color:#0B0B0B; color-scheme:light; }
.th .appbar{ background:#F1F0EC; }
.th-stage{ position:relative; height:calc(100svh - var(--bar-h)); min-height:560px; overflow:hidden; background:#F1F0EC; }
#cv{ position:absolute; inset:0; width:100%; height:100%; display:block; }

.th-col{ position:absolute; top:50%; inset-inline-start:0; width:34%; transform:translateY(-50%); padding-inline:var(--gutter) 24px; display:flex; flex-direction:column; gap:18px; }
.th-col [data-at]{ opacity:0; will-change:opacity, transform; }
.th-kick{ font:500 16px/1.4 var(--f-text); color:#5C5C5C; }
.th-say{ font:900 clamp(30px, 3.1vw, 50px)/1.3 var(--f-display); color:#0B0B0B; max-width:13ch; }
.th-say2{ font:800 clamp(22px, 2vw, 32px)/1.35 var(--f-display); color:#0B0B0B; margin-top:-6px; }
.th-legend{ display:flex; align-items:center; gap:10px; font:400 16px/1.5 var(--f-text); color:#3A3A3A; }
.th-legend .sq{ width:10px; height:10px; background:var(--paper-2, #F1F0EC); flex:none; }
.th-legend .sim{ color:#0B0B0B; font-weight:700; box-shadow:inset 0 -2px 0 var(--action, #1739A8); }
.th-rule{ display:flex; align-items:center; gap:14px; background:#FFFFFF; padding:12px 16px; box-shadow:inset -3px 0 0 var(--action, #1739A8); }
[dir="ltr"] .th-rule{ box-shadow:inset 3px 0 0 var(--action, #1739A8); }
.th-rule svg{ width:84px; height:28px; flex:none; }
.th-rule p{ font:700 16px/1.5 var(--f-text); color:#0B0B0B; }
.th-src{ font:300 14px/1.6 var(--f-text); color:#5C5C5C; max-width:44ch; }
.th-src bdi{ font-family:ui-monospace, Menlo, monospace; font-size:13px; }
.th-ctl{ display:flex; gap:8px; margin-top:6px; }
.th-ctl .btn{ min-height:52px; padding:8px 20px; font-size:17px; }
.th-ctl .btn-tone{ background:#E7E6E1; color:#0B0B0B; }
.th-ctl .btn-tone:hover{ background:#DCDBD5; }

@media (max-width:820px){
  .th-stage{ min-height:640px; }
  .th-col{ top:auto; bottom:0; transform:none; width:100%; padding:0 16px calc(14px + env(safe-area-inset-bottom)); gap:10px; }
  .th-kick{ display:none; }
  .th-say{ font-size:24px; max-width:none; }
  .th-say2{ font-size:19px; margin-top:-8px; }
  .th-legend{ font-size:14px; }
  .th-rule{ padding:8px 12px; gap:10px; } .th-rule svg{ width:60px; height:20px; } .th-rule p{ font-size:14px; }
  .th-src{ font-size:14px; font-weight:400; line-height:1.5; }
  .th-ctl .btn{ min-height:44px; font-size:15px; padding:6px 14px; }
}

/* recording: ?clean=1 hides the chrome */
.th.is-clean .appbar, .th.is-clean .th-ctl{ display:none; }
.th.is-clean .th-stage{ height:100svh; }
@media (prefers-reduced-motion:reduce){ .th-col [data-at]{ opacity:1; } }
