/* =====================================================================
   دربني · review hub (index.html only)
   The hub is a review tool around the app, so it stays calm:
   paper, hairlines, ink; the brand colours appear only as meaning.
   ===================================================================== */
body.hub{margin:0;min-height:100vh;background:var(--bg);color:var(--fg);font-family:var(--font);overflow:hidden}
.hub-top{height:64px;display:flex;align-items:center;gap:16px;padding:0 20px;border-bottom:1px solid var(--line);background:var(--surface);position:relative;z-index:5}
.hub-top .logo{display:inline-flex;align-items:center;gap:10px;font-size:22px;font-weight:900}
.hub-top .logo img{width:36px;height:36px;border-radius:11px}
.hub-top .tagline{font-size:13.5px;font-weight:700;color:var(--muted)}
.hub-top .sp{flex:1}
.hub-top .counts{font-size:13px;font-weight:700;color:var(--muted);white-space:nowrap}
.hub-top .seg{min-width:220px}
.hub-top .menu-btn{display:none}
.hub-main{display:grid;grid-template-columns:300px minmax(0,1fr) 340px;height:calc(100vh - 64px)}
.hub-main.gallery-mode{grid-template-columns:300px minmax(0,1fr)}
.hub-main.gallery-mode .info,.hub-main.gallery-mode .stage{display:none}
.hub-main:not(.gallery-mode) .gallery{display:none}

/* catalog */
.catalog{border-inline-end:1px solid var(--line);background:var(--surface);display:flex;flex-direction:column;min-height:0}
.catalog .cat-search{padding:14px 14px 10px}
.catalog nav{flex:1;overflow-y:auto;padding:0 10px 24px;scrollbar-width:thin}
.cat-role{margin-top:8px}
.cat-role>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 8px;font-family:var(--font);font-weight:700;font-size:15px;cursor:pointer;border-radius:10px}
.cat-role>summary::-webkit-details-marker{display:none}
.cat-role>summary:hover{background:var(--tint)}
.cat-role>summary .n{font-family:var(--font);font-size:12px;font-weight:600;color:var(--muted);background:var(--tint);border-radius:10px;padding:1px 8px}
.cat-flow{margin:6px 0 10px}
.cat-flow h3{font-family:var(--font);font-size:12.5px;font-weight:800;color:var(--muted);padding:6px 8px 4px;letter-spacing:0}
.cat-item{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:6px 8px;border-radius:10px;font-size:14px;font-weight:600;color:var(--fg-2);text-align:start}
.cat-item:hover{background:var(--tint)}
.cat-item .code{font-family:var(--font);font-size:11.5px;font-weight:600;color:var(--muted);background:var(--tint);border-radius:7px;padding:2px 6px;min-width:38px;text-align:center;direction:ltr}
.cat-item .ph{margin-inline-start:auto;font-size:10.5px;font-weight:800;color:var(--muted);border:1px solid var(--line-2);border-radius:6px;padding:0 5px}
.cat-item[aria-current="true"]{background:var(--navy);color:#fff}
.cat-item[aria-current="true"] .code{background:var(--pri);color:#fff}
.cat-item[aria-current="true"] .ph{color:#C9C6BE;border-color:#55534E}
.cat-note{margin:14px 8px 0;padding:10px 12px;border:1.5px dashed var(--line-2);border-radius:12px;font-size:12.5px;font-weight:600;color:var(--muted);line-height:1.6}

/* stage */
.stage{display:flex;flex-direction:column;min-height:0;min-width:0}
.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 18px;border-bottom:1px solid var(--line);background:var(--bg)}
.toolbar .grp{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:12.5px;font-weight:800;color:var(--muted)}
.toolbar .seg{grid-auto-columns:auto}
.toolbar .seg button{min-height:34px;padding:0 10px;font-size:13px}
.toolbar .inp{min-height:38px;border-radius:11px;padding:0 10px}
.toolbar .inp select{min-height:34px;font-size:14px}
.toolbar .btn-sm{min-height:38px}
.stage-body{flex:1;min-height:0;display:grid;place-items:start center;padding:22px 16px;overflow:auto;background:
  radial-gradient(60% 50% at 85% 0%,rgba(255,107,43,.10),transparent),radial-gradient(50% 50% at 5% 100%,rgba(37,99,235,.08),transparent),radial-gradient(circle at 1px 1px,var(--line-2) 1px,transparent 0) 0 0/22px 22px}
.device-wrap{position:relative;margin-inline:auto}
.device{position:absolute;top:0;left:50%;transform-origin:top center;border-radius:50px;box-shadow:0 0 0 9px #0A1226,0 0 0 10px #2A3550,0 40px 80px -20px rgba(7,26,62,.45);overflow:hidden;background:var(--surface)}
.device iframe{display:block;border:0;width:100%;height:100%;background:var(--bg)}
.stage-cap{display:flex;justify-content:center;gap:10px;margin-top:14px;font-size:12.5px;font-weight:700;color:var(--muted)}

/* info panel */
.info{border-inline-start:1px solid var(--line);background:var(--surface);overflow-y:auto;padding:18px 18px 28px;display:flex;flex-direction:column;gap:16px}
.info .code-big{font-family:var(--font);font-weight:800;font-size:13px;direction:ltr;display:inline-block;background:var(--grad-pri);color:#fff;border-radius:8px;padding:1px 10px}
.info h2{font-size:24px;margin-top:8px}
.info .purpose{font-size:15px;line-height:1.7;color:var(--fg-2)}
.info h3{font-family:var(--font);font-size:12.5px;font-weight:800;color:var(--muted);margin-bottom:8px;letter-spacing:0}
.info .feat{display:grid;gap:6px}
.info .feat span{display:flex;gap:8px;align-items:baseline;font-size:13.5px;font-weight:600}
.info .feat b{font-family:var(--font);font-size:11.5px;font-weight:600;color:var(--muted);direction:ltr;min-width:38px}
.info .states{display:flex;flex-wrap:wrap;gap:6px}
.info .states button{min-height:34px;padding:0 12px;border:1.5px solid var(--line-2);border-radius:var(--r-pill);font-size:13px;font-weight:700;background:var(--surface)}
.info .states button[aria-pressed="true"]{background:var(--navy);color:#fff;border-color:var(--navy)}
.journey-list{display:grid;gap:6px}
.journey-list button{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:40px;padding:6px 10px;border:1px solid var(--line);border-radius:12px;font-size:13.5px;font-weight:700;text-align:start;background:var(--surface)}
.journey-list button:hover{border-color:var(--line-2)}
.journey-list button .n{font-family:var(--font);font-size:11.5px;color:var(--muted)}
.player{border:1.5px solid var(--pri-line);border-radius:18px;background:var(--pri-tint);padding:14px;display:grid;gap:10px;background:var(--surface)}
.player .steps{display:flex;flex-wrap:wrap;gap:6px}
.player .steps button{font-family:var(--font);font-size:11.5px;font-weight:600;min-width:40px;min-height:30px;border-radius:8px;border:1.5px solid var(--line-2);direction:ltr}
.player .steps button.on{background:var(--navy);color:#fff;border-color:var(--navy)}
.player .steps button.done{background:var(--ok-soft);border-color:var(--ok-line)}

/* gallery */
.gallery{overflow-y:auto;padding:22px 26px 40px}
.gallery section{margin-bottom:30px}
.gallery h2{font-size:20px;margin-bottom:4px}
.gallery .g-sub{font-size:13px;font-weight:600;color:var(--muted);margin-bottom:14px}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:18px}
.thumb{display:grid;gap:8px;text-align:start;cursor:pointer}
.thumb .frame{width:168px;height:363px;border:1px solid var(--line-2);border-radius:24px;overflow:hidden;background:var(--bg);position:relative;box-shadow:var(--sh-2)}
.thumb .frame iframe{width:390px;height:844px;border:0;transform:scale(.4308);transform-origin:top right;pointer-events:none;position:absolute;top:0;right:0}
[dir="ltr"] .thumb .frame iframe{transform-origin:top left;left:0;right:auto}
.thumb .cap{font-size:13px;font-weight:700;line-height:1.35}
.thumb .cap b{font-family:var(--font);font-size:11.5px;color:var(--muted);font-weight:600;margin-inline-end:6px}
.thumb:hover .frame{box-shadow:var(--sh-3);border-color:var(--pri)}

/* narrow screens: catalog becomes a drawer, info goes under the phone */
@media (max-width:1180px){
  .hub-main{grid-template-columns:280px minmax(0,1fr)}
  .info{display:none}
  .hub-main.show-info .info{display:flex;position:fixed;inset-block:64px 0;inset-inline-end:0;width:min(360px,92vw);z-index:30;box-shadow:var(--sh-3)}
}
@media (max-width:860px){
  body.hub{overflow:auto}
  .hub-top{padding:0 12px;gap:10px}
  .hub-top .tagline,.hub-top .counts{display:none}
  .hub-top .menu-btn{display:grid}
  .hub-top .seg{min-width:0}
  .hub-main,.hub-main.gallery-mode{grid-template-columns:1fr;height:auto;min-height:calc(100vh - 64px)}
  .catalog{position:fixed;inset-block:64px 0;inset-inline-start:0;width:min(320px,88vw);z-index:40;transform:translateX(105%);transition:transform var(--dur-3) var(--ease);box-shadow:var(--sh-3)}
  [dir="ltr"] .catalog{transform:translateX(-105%)}
  .hub-main.show-cat .catalog{transform:none}
  .toolbar{padding:10px 12px;gap:8px}
  .stage-body{padding:14px 8px;overflow:visible}
  .gallery{padding:16px 12px 32px}
  .thumbs{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
  .thumb .frame{width:150px;height:325px}
  .thumb .frame iframe{transform:scale(.3846)}
}
.hub-scrim{display:none}
@media (max-width:860px){ .hub-main.show-cat .hub-scrim{display:block;position:fixed;inset:64px 0 0;background:var(--scrim);z-index:35} }

/* products: app (phone frame) · web dashboard & site (browser frame) */
.cat-prod{display:flex;align-items:center;gap:8px;margin:18px 6px 4px;padding-top:12px;border-top:1px solid var(--line);font-size:13px;font-weight:800;color:var(--fg);font-family:var(--font)}
.cat-prod:first-child{border-top:0;margin-top:6px;padding-top:0}
.cat-prod svg.i{width:18px;height:18px;color:var(--muted)}
.cat-prod .n{margin-inline-start:auto;font-family:var(--font);font-size:12px;font-weight:600;color:var(--muted);background:var(--tint);border-radius:10px;padding:1px 8px}

.browser-bar{height:34px;display:flex;align-items:center;gap:12px;padding:0 14px;background:var(--tint);border-bottom:1.5px solid var(--line-2);direction:ltr}
.browser-bar .dots{display:flex;gap:6px}
.browser-bar .dots i{width:11px;height:11px;border-radius:50%;background:var(--line-2)}
.browser-bar .addr{flex:1;max-width:520px;margin:0 auto;height:22px;border-radius:7px;background:var(--surface);font-size:12px;font-weight:700;color:var(--muted);display:grid;place-items:center;direction:rtl;overflow:hidden;white-space:nowrap}
.device.browser iframe{height:calc(100% - 34px)}
.thumb.wide .frame{width:300px;height:188px;border-radius:12px}
.thumb.wide .frame iframe{width:1440px;height:900px;transform:scale(.2083)}
@media (max-width:860px){ .thumb.wide .frame{width:260px;height:163px} .thumb.wide .frame iframe{transform:scale(.1806)} }
