/* =====================================================================
   Rattib app window, rebuilt in HTML/CSS for the landing page (26 November 2026).
   Tokens, sizes and type come from FileFlow-AppleNative/Sources/FileFlow/Features/GlassTheme.swift,
   ContentView.swift (sidebar), MyFoldersView.swift, PreviewView.swift, HistoryView.swift, SmartSearchView.swift.
   The window is laid out at its real size in points (1240 wide) and scaled to fit, like a screenshot.
   ===================================================================== */
.rapp-host{position:relative;width:100%;aspect-ratio:var(--cw) / var(--ch);container-type:inline-size}
.rapp{
  --bg:#F5F6F8; --surface:#FFFFFF; --surface2:#F0F2F5; --border:#E4E7EC; --sidebar:#ECEDF1;
  --text:#101828; --text2:#475467; --text3:#98A2B3;
  --brand:#1148F7; --brandSolid:#1148F7; --brandInk:#1148F7; --brandTint:#EEF2FF;
  --success:#12B76A; --successInk:#067647; --warning:#F79009;
  --c-images:#0BA5EC; --c-video:#EE46BC; --c-docs:#EAAA08; --c-design:#7A5AF8; --c-archive:#667085;
  position:absolute;top:0;left:0;width:calc(var(--cw) * 1px);height:calc(var(--ch) * 1px);
  transform:scale(var(--s,1));transform-origin:0 0;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Arabic","Geeza Pro","Segoe UI","Noto Sans Arabic",system-ui,sans-serif;
  font-size:15px;line-height:1.3;color:var(--text);background:var(--bg);text-align:start;
  border-radius:12px;overflow:hidden;box-shadow:0 0 0 1px rgba(0,0,0,.14);-webkit-font-smoothing:antialiased;
  display:flex;user-select:none;-webkit-user-select:none
}
/* the app follows the page theme */
:root[data-theme="dark"] .rapp{
  --bg:#0F1013; --surface:#17191D; --surface2:#202328; --border:#2A2E35; --sidebar:#1C1E22;
  --text:#F2F4F7; --text2:#A6AFBD; --text3:#6B7380;
  --brand:#4D7CFF; --brandInk:#8AA8FF; --brandTint:rgba(77,124,255,.14);
  --success:#32D583; --successInk:#32D583; --warning:#FDB022;
  box-shadow:0 0 0 1px rgba(255,255,255,.12)
}
.rapp.flat{border-radius:0;box-shadow:none}
.rapp *{box-sizing:border-box}
.rapp svg{display:block}
:where(.rapp) button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;text-align:inherit}
.rapp.static button{cursor:default}
.rapp .num{font-variant-numeric:tabular-nums}
.rapp bdi{unicode-bidi:isolate}
.rapp .ltr{direction:ltr;unicode-bidi:isolate}

/* traffic lights sit at the top left of a Mac window in both languages */
.rw-lights{position:absolute;top:10px;left:10px;display:flex;gap:9px;direction:ltr;z-index:6}
.rw-lights i{width:13px;height:13px;border-radius:50%;background:#FF5F57;box-shadow:inset 0 0 0 .5px rgba(0,0,0,.18)}
.rw-lights i:nth-child(2){background:#FEBC2E}.rw-lights i:nth-child(3){background:#28C840}

/* ---- sidebar (ContentView.SidebarView: 236 wide, rows 32 high, 2 apart) ---- */
.rw-side{flex:none;width:236px;background:var(--sidebar);border-inline-end:1px solid var(--border);padding:0 12px;display:flex;flex-direction:column}
.rw-brand{display:flex;align-items:center;gap:8px;padding:42px 16px 22px;color:var(--brandInk)}
.rapp[dir="ltr"] .rw-brand{padding-top:52px}
.rw-brand img{width:24px;height:24px;border-radius:5px}
.rw-brand svg{height:19px;width:auto;fill:currentColor}
:root[data-theme="dark"] .rw-brand{color:#fff}
.rw-nav{display:grid;gap:2px}
.rw-row{display:flex;align-items:center;gap:9px;height:32px;padding:0 10px;border-radius:8px;font-size:15px;color:var(--text);white-space:nowrap}
.rw-row .ic{width:18px;height:18px;flex:none;color:var(--text2)}
.rw-row .tr{margin-inline-start:auto;font-size:14px;color:var(--text3)}
.rw-row.sel{background:var(--brandTint);color:var(--brandInk);font-weight:600}
.rw-row.sel .ic{color:var(--brandInk)}
.rapp:not(.static) .rw-row:not(.sel):hover{background:color-mix(in srgb,var(--text) 5%,transparent)}
.rw-sec{font-size:13px;font-weight:500;color:var(--text3);padding:26px 14px 8px}
.rw-foot{margin-top:auto;display:flex;align-items:center;justify-content:space-between;padding:0 6px 14px;font-size:14px;color:var(--text3)}
.rw-foot svg{width:18px;height:18px;color:var(--text2)}

/* ---- detail ---- */
.rw-main{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;background:var(--bg)}
.rw-page{flex:1;min-height:0;overflow:hidden;padding:72px 32px 24px;display:flex;flex-direction:column;gap:18px;transition:opacity .22s ease}
.rw-page.fade{opacity:0}
.rw-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.rw-title{font-size:26px;font-weight:700;line-height:1.15}
.rw-sub{font-size:15px;color:var(--text2);margin-top:4px}
.rw-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:0 1px 1px rgba(0,0,0,.04)}
/* buttons (GlassTheme: primary, neutral, brand link) */
.rw-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 14px;border-radius:8px;font-size:15px;font-weight:500;white-space:nowrap;transition:opacity .15s ease,transform .1s ease}
.rw-btn.lg{height:40px;padding:0 18px}
.rw-btn.pri{background:var(--brandSolid);color:#fff}
.rw-btn.neu{background:var(--surface2);box-shadow:inset 0 0 0 1px var(--border);color:var(--text)}
.rw-btn[disabled]{opacity:.45;cursor:default}
.rw-btn.press{transform:scale(.96);opacity:.85}
.rw-btn svg{width:15px;height:15px}
.rw-link{font-size:14px;font-weight:500;color:var(--brand)}
.rw-tile{display:grid;place-items:center;border-radius:10px;background:var(--surface2);color:var(--text2);flex:none}

/* ---- My Folders (MyFoldersView) ---- */
.rw-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.rw-fcard{padding:20px}
.rw-fcard .top{display:flex;gap:14px;align-items:flex-start}
.rw-fcard .rw-tile{width:44px;height:44px}
.rw-fcard .rw-tile svg{width:19px;height:19px}
.rw-fcard .nm{font-size:17px;font-weight:600}
.rw-fcard .st{font-size:15px;font-weight:500;margin-top:3px}
.rw-fcard .st.ok{color:var(--successInk);display:flex;align-items:center;gap:4px}
.rw-fcard .st.ok svg{width:13px;height:13px}
.rw-fcard .act{font-size:14px;color:var(--text2);margin-top:16px}
.rw-fcard hr{border:0;height:1px;background:var(--border);margin:14px 0}
.rw-fcard .bot{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--text2);min-height:32px}
.rw-fcard .bot .sp{flex:1}
.rw-fcard .finder{font-size:14px;font-weight:500;color:var(--text)}
.rw-sw{position:relative;width:32px;height:19px;border-radius:10px;background:color-mix(in srgb,var(--text) 14%,transparent);flex:none;transition:background-color .2s ease}
.rw-sw::after{content:"";position:absolute;top:2px;left:2px;width:15px;height:15px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);transition:transform .2s ease}
.rw-sw.on{background:var(--brandSolid)}
.rw-sw.on::after{transform:translateX(13px)}
.rw-recent{padding:16px 20px}
.rw-recent .hd{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px}
.rw-recent .hd b{font-size:16px;font-weight:600}
.rw-recent .ln{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--border);font-size:15px}
.rw-recent .ln .t{margin-inline-start:auto;font-size:14px;color:var(--text3)}
.rw-recent .ln .new{animation:rw-in .5s ease}
/* the done banner */
.rw-done{padding:16px 20px}
.rw-done .top{display:flex;align-items:center;gap:14px}
.rw-check{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:color-mix(in srgb,var(--success) 14%,transparent);color:var(--successInk);flex:none}
.rw-check svg{width:16px;height:16px}
.rw-done .tt{font-size:16px;font-weight:600}
.rw-done .dt{font-size:14px;color:var(--text2);margin-top:2px}
.rw-done .sp{flex:1}
.rw-x{width:24px;height:24px;display:grid;place-items:center;color:var(--text3)}
.rw-x svg{width:12px;height:12px}
.rw-done hr{border:0;height:1px;background:var(--border);margin:14px 0}
.rw-done .offer{display:flex;align-items:center;gap:14px}
.rw-done .offer b{display:block;font-size:15px;font-weight:600}
.rw-done .offer span{display:block;font-size:14px;color:var(--text2)}
.rw-done .later{font-size:15px;font-weight:500;color:var(--text2);padding:0 10px}
@keyframes rw-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.rw-done{animation:rw-in .45s ease}

/* ---- the plan (PreviewView) ---- */
.rw-crumb{display:flex;align-items:center;gap:5px;font-size:14px;color:var(--text2);margin-bottom:6px}
.rw-crumb svg{width:10px;height:10px;color:var(--text3)}
.rapp[dir="rtl"] .rw-crumb svg,.rapp[dir="rtl"] .rw-chev{transform:scaleX(-1)}
.rw-plan-t{font-size:24px;font-weight:700;line-height:1.2}
.rw-modes{display:flex;align-items:center;gap:14px;padding-bottom:2px}
.rw-seg{display:flex;padding:2px;border-radius:8px;background:var(--surface2);box-shadow:inset 0 0 0 1px var(--border)}
.rw-seg span{height:26px;padding:0 12px;display:flex;align-items:center;border-radius:6px;font-size:14px;color:var(--text2)}
.rw-seg span.on{background:var(--surface);color:var(--text);font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.rw-list{overflow:hidden;flex:1;min-height:0}
.rw-grp{display:flex;align-items:center;gap:12px;padding:14px 16px;border-top:1px solid var(--border);transition:opacity .25s ease,background-color .2s ease}
.rw-grp:first-child{border-top:0}
.rw-grp.off .rw-gtext,.rw-grp.off .rw-thumbs,.rw-grp.off .rw-cat{opacity:.45}
.rw-grp.gone{opacity:.3}
.rapp:not(.static) .rw-grp:hover{background:color-mix(in srgb,var(--text) 2.5%,transparent)}
.rw-cb{width:24px;height:24px;display:grid;place-items:center;flex:none}
.rw-cb i{width:16px;height:16px;border-radius:4px;background:var(--brandSolid);display:grid;place-items:center;color:#fff;transition:background-color .15s ease}
.rw-cb i svg{width:11px;height:11px}
.rw-grp.off .rw-cb i{background:var(--surface);box-shadow:inset 0 0 0 1px var(--text3)}
.rw-grp.off .rw-cb i svg{opacity:0}
.rw-cat{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;flex:none}
.rw-cat svg{width:15px;height:15px}
.rw-gtext{min-width:0;flex:1}
.rw-gtext b{display:block;font-size:16px;font-weight:600}
.rw-gtext span{display:block;font-size:14px;color:var(--text2);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rw-thumbs{display:flex;gap:6px}
.rw-thumbs i,.rw-fly{width:32px;height:32px;border-radius:6px;overflow:hidden;display:block;flex:none;background:var(--surface2)}
.rw-thumbs svg,.rw-fly svg{width:100%;height:100%}
.rw-chev{width:20px;height:13px;color:var(--text3);flex:none}
.rw-bar{flex:none;display:flex;align-items:center;gap:12px;padding:14px 32px;border-top:1px solid var(--border);background:var(--surface)}
.rw-bar .note{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--text2);flex:1;min-width:0}
.rw-bar .note svg{width:15px;height:15px;color:var(--successInk);flex:none}
.rw-bar .moving{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--text2)}
.rw-spin{width:14px;height:14px;border-radius:50%;border:2px solid var(--border);border-top-color:var(--text2);animation:rw-spin .8s linear infinite}
@keyframes rw-spin{to{transform:rotate(360deg)}}
.rw-fly{position:absolute;z-index:20;pointer-events:none;box-shadow:0 6px 16px rgba(0,0,0,.25)}

/* ---- History (HistoryView) ---- */
.rw-op{padding:16px 20px;overflow:hidden;flex:1;min-height:0}
.rw-op .top{display:flex;align-items:flex-start;gap:14px}
.rw-op .tt{font-size:16px;font-weight:600}
.rw-op .dt{font-size:14px;color:var(--text2);margin-top:2px}
.rw-op .tools{margin-inline-start:auto;display:flex;align-items:center;gap:16px;color:var(--text2)}
.rw-op .tools svg{width:16px;height:16px}
.rw-op .det{display:flex;align-items:center;gap:4px;font-size:14px;color:var(--text2);margin:12px 0 4px;padding-inline-start:46px}
.rw-op .det svg{width:10px;height:10px}
.rw-hg{padding:12px 0 12px 46px;border-top:1px solid var(--border)}
.rapp[dir="rtl"] .rw-hg{padding:12px 46px 12px 0}
.rw-hg:first-of-type{border-top:0}
.rw-hg .h{display:flex;align-items:center;gap:10px}
.rw-hg .rw-cat{width:28px;height:28px;border-radius:6px}
.rw-hg .rw-cat svg{width:13px;height:13px}
.rw-hg .h b{display:block;font-size:15px;font-weight:600}
.rw-hg .h span{display:block;font-size:13px;color:var(--text2)}
.rw-hg .h .rw-link{margin-inline-start:auto}
.rw-hg ul{list-style:none;margin:6px 0 0;padding:0 38px 0 0;display:grid;gap:7px}
.rapp[dir="ltr"] .rw-hg ul{padding:0 0 0 38px}
.rw-hg li{display:flex;justify-content:space-between;font-size:14px}
.rw-hg li em{font-style:normal;font-size:13px;color:var(--text3)}
.rw-hg.back li span{color:var(--text3)}
.rw-hg.back{background:color-mix(in srgb,var(--success) 6%,transparent);border-radius:8px}

/* ---- Search (SmartSearchView) ---- */
.rw-field{display:flex;align-items:center;gap:12px;height:42px;padding:0 14px;border-radius:10px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--border);font-size:16px}
.rw-field .q{flex:1;display:flex;align-items:center}.rw-field .ph{color:var(--text3)}
.rw-caret{display:inline-block;width:2px;height:20px;background:var(--brand);margin-inline-start:1px}
.rw-field svg{width:17px;height:17px;color:var(--text2);flex:none}
.rw-scope{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:var(--text3)}
.rw-chips{display:flex;gap:8px}
.rw-chips span{height:28px;padding:0 12px;border-radius:14px;display:flex;align-items:center;font-size:14px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--border);color:var(--text2)}
.rw-chips span.on{background:var(--brandTint);box-shadow:none;color:var(--brandInk);font-weight:600}
.rw-res{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;align-content:start}
.rw-rc{overflow:hidden}
.rw-rc .th{height:112px;display:grid;place-items:center;background:var(--surface2);border-bottom:1px solid var(--border)}
.rw-rc .th svg{width:58px;height:66px}
.rw-rc .bd{padding:10px 12px 12px}
.rw-rc b{display:block;font-size:13.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rw-rc p{margin:4px 0 0;font-size:12px;color:var(--text2);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.rw-rc small{display:block;margin-top:6px;font-size:11.5px;color:var(--text3)}
.rw-rc mark{background:none;color:var(--brandInk);font-weight:700}

/* ---- compact window for phones: no sidebar, fewer things, same type ---- */
.rapp.compact .rw-side{display:none}
.rapp.compact .rw-page{padding:32px 14px 10px;gap:10px}
.rapp.compact .rw-title{font-size:21px}
.rapp.compact .rw-plan-t{font-size:19px}
.rapp.compact .rw-sub{font-size:14px}
.rapp.compact .rw-modes,.rapp.compact .rw-recent,.rapp.compact .rw-thumbs,.rapp.compact .rw-head .rw-btn.neu,.rapp.compact .rw-grid .rw-fcard:nth-child(n+3),.rapp.compact .rw-done hr,.rapp.compact .rw-done .offer,.rapp.compact .rw-fcard .act{display:none}
.rapp.compact .rw-grid{gap:10px}
.rapp.compact .rw-fcard{padding:14px}
.rapp.compact .rw-fcard .top{gap:10px}
.rapp.compact .rw-fcard .rw-tile{width:36px;height:36px}
.rapp.compact .rw-fcard .nm{font-size:16px}
.rapp.compact .rw-fcard .st{font-size:14px}
.rapp.compact .rw-fcard hr{margin:10px 0}
.rapp.compact .rw-fcard .bot span.lbl{display:none}
.rapp.compact .rw-grp{padding:9px 12px;gap:10px}
.rapp.compact .rw-cat{width:30px;height:30px}
.rapp.compact .rw-gtext b{font-size:15px}
.rapp.compact .rw-gtext span{font-size:13px;margin-top:1px}
.rapp.compact .rw-bar{padding:10px 16px}
.rapp.compact .rw-bar .note{display:none}
.rapp.compact .rw-done{padding:12px 14px}
.rapp.compact .rw-crumb{display:none}
.rapp.compact .rw-res{grid-template-columns:1fr 1fr;gap:8px}
.rapp.compact .rw-res .rw-rc:nth-child(n+3),.rapp.compact .rw-chips span:nth-child(n+4){display:none}
.rapp.compact .rw-rc .th{height:56px}.rapp.compact .rw-rc .th svg{width:34px;height:40px}
.rapp.compact .rw-op{padding:12px 14px}.rapp.compact .rw-hg:nth-child(n+5){display:none}.rapp.compact .rw-hg li:nth-child(n+3){display:none}
.rapp.compact .rw-op .det{padding-inline-start:0}.rapp.compact .rw-hg,.rapp[dir="rtl"].compact .rw-hg{padding:8px 0}
.rapp.compact .rw-done .dt{display:none}
.rapp.compact .rw-head .rw-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (prefers-reduced-motion:reduce){
  .rapp *,.rapp *::before,.rapp *::after{animation:none !important;transition:none !important}
}
