/* Nestly — interactive desktop demo. Logical stage is a fixed size, scaled to fit. */

.demo-section { padding: 8px 0 0; }
.demo-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.stage-outer { position: relative; width: 100%; }
.stage {
  position: absolute; left: 0; top: 0; transform-origin: 0 0;
  width: 1200px; height: 760px; border-radius: 22px; overflow: hidden; outline: none;
  font-family: var(--font); font-size: 13px; letter-spacing: -.005em; color: var(--d-ink);
  box-shadow: 0 50px 120px -30px rgba(40,30,120,.55), 0 0 0 1px rgba(255,255,255,.08);
  user-select: none; -webkit-user-select: none;
  /* entrance */
  opacity: 0; translate: 0 30px; transition: opacity 1s var(--ease-out), translate 1.1s var(--ease-out);
}
.stage.ready { opacity: 1; translate: 0 0; }
.stage.compact { width: 860px; height: 700px; }
.stage *, .stage *::before, .stage *::after { box-sizing: border-box; }
.stage :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: default; }
.stage :where(input) { font: inherit; color: inherit; }

/* ---- Themes ---- */
.stage[data-theme="minimalLight"] {
  --d-wall: radial-gradient(60% 70% at 20% 0%, #c9d6ee, transparent 70%), linear-gradient(180deg, #8ea6c8 0%, #b7c3d6 55%, #dce1e8 100%);
  --d-side: #f2f3f5; --d-content: #fbfbfc; --d-card: #fff; --d-card-h: #f4f6f9; --d-elev: #fff;
  --d-line: rgba(17,19,26,.08); --d-ink: #16181d; --d-ink2: rgba(22,24,29,.56); --d-ink3: rgba(22,24,29,.36);
  --d-accent: #2e6be6; --d-sel: rgba(46,107,230,.12); --d-r: 11px; --d-font: var(--font);
  --d-qa1: #2e6be6; --d-qa2: #7c5ce6; --d-qa3: #2ba66a; --d-qa4: #e5484d; --d-tint: .12; --d-dark: 0;
  --d-chrome: rgba(255,255,255,.55); --d-chrome-ink: #1d1d1f;
}
.stage[data-theme="dark"] {
  --d-wall: radial-gradient(50% 60% at 75% 10%, #2a3c66, transparent 70%), linear-gradient(180deg, #0b1220 0%, #16233b 55%, #1f2b44 100%);
  --d-side: #14161b; --d-content: #0f1115; --d-card: #1b1e25; --d-card-h: #232832; --d-elev: #1e222b;
  --d-line: rgba(255,255,255,.08); --d-ink: #f2f4f8; --d-ink2: rgba(242,244,248,.6); --d-ink3: rgba(242,244,248,.36);
  --d-accent: #4f8cff; --d-sel: rgba(79,140,255,.2); --d-r: 11px; --d-font: var(--font);
  --d-qa1: #5b93ff; --d-qa2: #9b7bff; --d-qa3: #3fd089; --d-qa4: #ff6b6f; --d-tint: .16; --d-dark: 1;
  --d-chrome: rgba(20,22,30,.55); --d-chrome-ink: #f2f4f8;
}
.stage[data-theme="colorful"] {
  --d-wall: radial-gradient(55% 65% at 15% 10%, #ff9f6b, transparent 65%), radial-gradient(60% 70% at 90% 20%, #8a5cf6, transparent 70%), linear-gradient(160deg, #8a5cf6, #5b8def 55%, #f59e42);
  --d-side: rgba(255,255,255,.78); --d-content: #fbf7ff; --d-card: rgba(255,255,255,.92); --d-card-h: #fff; --d-elev: #fff;
  --d-line: rgba(60,20,90,.09); --d-ink: #241a33; --d-ink2: rgba(36,26,51,.58); --d-ink3: rgba(36,26,51,.36);
  --d-accent: #e5468e; --d-sel: rgba(229,70,142,.14); --d-r: 15px; --d-font: ui-rounded, "SF Pro Rounded", var(--font);
  --d-qa1: #e5468e; --d-qa2: #8a5cf6; --d-qa3: #18b67a; --d-qa4: #f59e42; --d-tint: .16; --d-dark: 0;
  --d-chrome: rgba(255,255,255,.5); --d-chrome-ink: #241a33;
}
.stage[data-theme="nature"] {
  --d-wall: radial-gradient(60% 60% at 80% 0%, #a7b77a, transparent 60%), linear-gradient(180deg, #1c3a2e 0%, #2e5a43 55%, #6e8b5a 100%);
  --d-side: #18241d; --d-content: #12190f; --d-card: #1e2a20; --d-card-h: #26352a; --d-elev: #1f2b22;
  --d-line: rgba(234,242,228,.08); --d-ink: #eaf2e4; --d-ink2: rgba(234,242,228,.6); --d-ink3: rgba(234,242,228,.36);
  --d-accent: #5fb47a; --d-sel: rgba(95,180,122,.2); --d-r: 13px; --d-font: var(--font);
  --d-qa1: #5fb47a; --d-qa2: #c9a86a; --d-qa3: #7fb8a4; --d-qa4: #d9825b; --d-tint: .18; --d-dark: 1;
  --d-chrome: rgba(16,26,20,.5); --d-chrome-ink: #eaf2e4;
}

.desk { position: absolute; inset: 0; background: var(--d-wall); transition: background .6s; }
.desk::after { /* soft ridge silhouette */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 44%; opacity: .35; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.25)),
    conic-gradient(from 200deg at 30% 100%, transparent 0 20deg, rgba(20,30,60,.35) 20deg 60deg, transparent 60deg);
}
.stage .wall-fade { position: absolute; inset: 0; background: var(--d-wall); opacity: 0; transition: opacity .6s; }

/* ---- Menu bar ---- */
.mbar { position: absolute; left: 0; right: 0; top: 0; height: 28px; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 0 16px;
  background: var(--d-chrome); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); color: var(--d-chrome-ink); font-size: 13px; }
.mbar b { font-weight: 700; }
.mbar .apple { width: 13px; height: 15px; }
.mbar .mb-r { margin-left: auto; display: flex; gap: 14px; align-items: center; font-weight: 500; }
.mbar .mb-fa { width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; }
.mbar .mb-fa svg { width: 16px; height: 16px; }

/* ---- Desktop icons ---- */
.dicons { position: absolute; right: 20px; top: 46px; display: flex; flex-direction: column; gap: 14px; z-index: 2; }
.dicon { width: 92px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 4px; border-radius: 8px; color: #fff; font-size: 11.5px; font-weight: 600; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.dicon .th { width: 52px; height: 52px; }
.dicon.sel { background: rgba(0,0,0,.22); }
.dicon.sel span { background: var(--d-accent); border-radius: 4px; padding: 0 4px; text-shadow: none; }

/* ---- Window ---- */
.win {
  position: absolute; left: 32px; top: 46px; width: 1000px; height: 590px; z-index: 10;
  display: grid; grid-template-columns: 206px 1fr 236px; border-radius: 13px; overflow: hidden;
  background: var(--d-content); font-family: var(--d-font);
  box-shadow: 0 30px 70px -10px rgba(0,0,0,.5), 0 0 0 .5px rgba(0,0,0,.3), inset 0 0 0 .5px rgba(255,255,255,.12);
  transition: transform .5s var(--ease-out), opacity .35s var(--ease-out), left .45s var(--ease-out), top .45s var(--ease-out), width .45s var(--ease-out), height .45s var(--ease-out), grid-template-columns .4s var(--ease-out), background .4s;
  transform-origin: 50% 100%;
}
.win.no-insp { grid-template-columns: 206px 1fr 0px; }
.win.no-side { grid-template-columns: 0px 1fr 236px; }
.win.no-side.no-insp { grid-template-columns: 0px 1fr 0px; }
.win.zoomed { left: 8px; top: 36px; width: 1184px; height: 640px; }
.win.closed { opacity: 0; transform: scale(.92); pointer-events: none; }
.win.minimized { opacity: 0; transform: translate(var(--mx, 0), var(--my, 400px)) scale(.06); pointer-events: none; transition: transform .55s var(--ease-io), opacity .5s ease-in; }
.stage.compact .win { left: 16px; width: 828px; height: 560px; grid-template-columns: 186px 1fr 0px; }
.stage.compact .insp { display: none; }
.stage.compact .dicons { display: none; }

/* traffic lights */
.lights { position: absolute; left: 16px; top: 16px; display: flex; gap: 8px; z-index: 5; }
.lights button { width: 12px; height: 12px; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.2); }
.lights .l-r { background: #ff5f57; } .lights .l-y { background: #febc2e; } .lights .l-g { background: #28c840; }
.lights button::after { content: ""; position: absolute; inset: 0; display: grid; place-items: center; font: 700 9px/12px var(--font); color: rgba(0,0,0,.55); opacity: 0; text-align: center; }
.lights:hover button::after { opacity: 1; }
.lights .l-r::after { content: "×"; } .lights .l-y::after { content: "−"; } .lights .l-g::after { content: "+"; }

/* sidebar */
.side { background: var(--d-side); border-right: 1px solid var(--d-line); padding: 46px 10px 12px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: background .4s; }
.side-brand { display: flex; align-items: center; gap: 9px; padding: 0 6px 12px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.side-brand svg { width: 26px; height: 26px; flex: none; }
.side-scroll { overflow-y: auto; flex: 1; scrollbar-width: none; }
.side-scroll::-webkit-scrollbar { display: none; }
.s-item { width: 100%; display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; font-size: 13px; font-weight: 500; text-align: left; white-space: nowrap; transition: background .15s; }
.s-item:hover { background: var(--d-card-h); }
.s-item.on { background: var(--d-sel); color: var(--d-accent); font-weight: 600; }
.s-item svg { width: 16px; height: 16px; flex: none; opacity: .8; }
.s-item .n { margin-left: auto; font-size: 11.5px; color: var(--d-ink3); font-variant-numeric: tabular-nums; }
.s-item .n.acc { color: var(--d-accent); font-weight: 600; }
.s-item .n.badge { color: #fff; background: #e5484d; border-radius: 999px; padding: 0 6px; font-weight: 700; }
.s-sep { height: 1px; background: var(--d-line); margin: 8px 8px; }
.s-h { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; color: var(--d-ink3); padding: 10px 8px 4px; }
.s-tag { display: flex; align-items: center; gap: 9px; padding: 4px 8px; font-size: 13px; }
.s-tag i { width: 9px; height: 9px; border-radius: 50%; }

/* main */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px 10px; border-bottom: 1px solid var(--d-line); }
.sfield { flex: 1; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 9px; background: var(--d-elev); border: 1.5px solid var(--d-line); transition: border-color .2s, box-shadow .2s; min-width: 0; }
.sfield:focus-within { border-color: var(--d-accent); box-shadow: 0 0 0 3px var(--d-sel); }
.sfield svg { width: 15px; height: 15px; color: var(--d-ink3); flex: none; }
.sfield input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; min-width: 0; user-select: text; -webkit-user-select: text; }
.sfield input::placeholder { color: var(--d-ink3); }
.sfield .kk { font-size: 10.5px; color: var(--d-ink3); border: 1px solid var(--d-line); border-radius: 5px; padding: 1px 5px; }
.sfield .clr { width: 16px; height: 16px; border-radius: 50%; background: var(--d-ink3); color: var(--d-content); display: grid; place-items: center; font-size: 11px; line-height: 1; }
.tb-btn { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 9px; background: var(--d-elev); border: 1px solid var(--d-line) !important; font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: background .15s, transform .12s; }
.tb-btn:hover { background: var(--d-card-h); }
.tb-btn:active { transform: scale(.96); }
.tb-btn .sw { width: 12px; height: 12px; border-radius: 50%; background: var(--d-accent); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.tb-btn svg { width: 14px; height: 14px; }
.player { display: none; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 9px; background: var(--d-sel); color: var(--d-accent); font-size: 12px; font-weight: 600; max-width: 190px; }
.player.on { display: inline-flex; animation: popIn .35s var(--ease-out); }
.player span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .eqz i { background: var(--d-accent); }
.player.paused .eqz i { animation-play-state: paused; }
.theme-menu { position: absolute; right: 252px; top: 52px; z-index: 20; width: 186px; padding: 6px; border-radius: 12px; background: var(--d-elev); border: 1px solid var(--d-line); box-shadow: 0 20px 40px -12px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top right; pointer-events: none; transition: opacity .16s, transform .2s var(--ease-out); }
.win.no-insp .theme-menu, .stage.compact .theme-menu { right: 16px; }
.theme-menu.on { opacity: 1; transform: none; pointer-events: auto; }
.theme-menu button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 7px; font-size: 13px; font-weight: 500; text-align: left; }
.theme-menu button:hover { background: var(--d-sel); }
.theme-menu button i { width: 14px; height: 14px; border-radius: 50%; }
.theme-menu button .ck { margin-left: auto; color: var(--d-accent); font-weight: 700; }

.content { flex: 1; overflow-y: auto; padding: 18px 20px 24px; position: relative; scrollbar-width: thin; scrollbar-color: var(--d-line) transparent; }
.view { animation: viewIn .35s var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.v-h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.v-sub { color: var(--d-ink2); margin: 3px 0 0; font-size: 13px; }
.v-h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin: 22px 0 10px; }
.v-h2 .pill { font-size: 11px; font-weight: 700; color: #fff; background: var(--d-accent); padding: 2px 8px; border-radius: 999px; }
.v-h2 .cnt { font-size: 11px; color: var(--d-ink2); border: 1px solid var(--d-line); border-radius: 999px; padding: 0 7px; }
.v-h2 .link { margin-left: auto; color: var(--d-accent); font-size: 12px; font-weight: 600; }
.v-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--d-accent); font-weight: 600; font-size: 12.5px; margin-bottom: 8px; }

/* cards */
.qa-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.qa { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--d-r); background: var(--d-card); border: 1px solid var(--d-line); text-align: left; transition: transform .2s var(--ease-out), background .15s; }
.qa:hover { background: var(--d-card-h); transform: translateY(-1px); }
.qa:active { transform: scale(.97); }
.qa .qi { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; position: relative; color: var(--c); }
.qa .qi::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c); opacity: var(--d-tint); }
.qa .qi svg { width: 17px; height: 17px; position: relative; }
.qa b { display: block; font-size: 12.5px; font-weight: 600; }
.qa span { font-size: 11px; color: var(--d-ink2); }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lib { position: relative; padding: 12px 14px; border-radius: var(--d-r); border: 1px solid var(--d-line); text-align: left; overflow: hidden; background: var(--d-card); transition: transform .2s var(--ease-out); }
.lib::before { content: ""; position: absolute; inset: 0; background: var(--c); opacity: calc(.06 + var(--d-dark) * .06); }
.stage[data-theme="colorful"] .lib::before { opacity: .16; }
.lib:hover { transform: translateY(-2px); }
.lib:active { transform: scale(.98); }
.lib > * { position: relative; }
.lib .fold { width: 20px; height: 15px; border-radius: 3px; background: var(--c); display: block; clip-path: polygon(0 0, 40% 0, 50% 18%, 100% 18%, 100% 100%, 0 100%); }
.lib b { display: block; font-size: 15px; font-weight: 700; margin: 18px 0 8px; }
.lib .meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--d-line); padding-top: 7px; font-size: 11px; color: var(--d-ink2); }
.lib .stack { display: none; }
.lib .stack i { width: 16px; height: 16px; border-radius: 4px; background: var(--c); opacity: .55; margin-right: -4px; border: 1.5px solid var(--d-card); }
.clean-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cs { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; }
.cs b { margin-top: 0 !important; order: 3; }
.cs { padding: 11px 12px; border-radius: var(--d-r); background: var(--d-card); border: 1px solid var(--d-line); text-align: left; transition: background .15s; }
.cs:hover { background: var(--d-card-h); }
.cs b { display: block; font-size: 15px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.cs span { font-size: 11px; color: var(--d-ink2); }
.cs .ci { width: 24px; height: 24px; border-radius: 7px; display: block; background: var(--c); opacity: .9; }
.recents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* file tiles */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile, 118px), 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; border-radius: var(--d-r); text-align: left; border: 1.5px solid transparent; transition: background .12s, border-color .12s; min-width: 0; }
.tile:hover { background: var(--d-card-h); }
.tile.sel { background: var(--d-sel); border-color: var(--d-accent); }
.tile .tw { aspect-ratio: 4/3; border-radius: calc(var(--d-r) - 3px); overflow: hidden; display: grid; place-items: center; background: var(--d-card); border: 1px solid var(--d-line); }
.tile b { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile span { font-size: 10.5px; color: var(--d-ink3); margin-top: -4px; }
.flist { display: flex; flex-direction: column; border-radius: var(--d-r); background: var(--d-card); border: 1px solid var(--d-line); padding: 4px; }
.row { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 12px; align-items: center; padding: 7px 10px; border-radius: 8px; text-align: left; border: 1.5px solid transparent; }
.row:hover { background: var(--d-card-h); }
.row.sel { background: var(--d-sel); border-color: var(--d-accent); }
.row .rt { width: 34px; height: 34px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; }
.row b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .p { font-size: 11px; color: var(--d-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.row .why { display: block; font-size: 11px; color: var(--d-ink2); margin-top: 2px; }
.row .why mark { background: rgba(255,214,10,.45); color: inherit; border-radius: 3px; padding: 0 2px; }
.row .sz { font-size: 11.5px; color: var(--d-ink2); font-variant-numeric: tabular-nums; }
.row .dt { font-size: 11.5px; color: var(--d-ink3); min-width: 72px; text-align: right; }

/* thumbnails */
.th { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.th-img { background: linear-gradient(180deg, hsl(var(--h) 80% 72%), hsl(calc(var(--h) + 40) 60% 55%) 60%, hsl(calc(var(--h) + 80) 50% 35%)); }
.th-img::before { content: ""; position: absolute; width: 22%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.85); top: 16%; right: 20%; }
.th-img::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -25%; height: 62%; background: hsl(calc(var(--h) + 200) 35% 22%); clip-path: polygon(0 60%, 25% 15%, 45% 50%, 65% 5%, 100% 55%, 100% 100%, 0 100%); }
.th-img.v1::after { clip-path: ellipse(70% 55% at 50% 100%); }
.th-img.v2::before { left: 18%; right: auto; width: 30%; background: rgba(255,240,200,.9); }
.th-vid { background: linear-gradient(160deg, hsl(var(--h) 55% 45%), hsl(calc(var(--h) + 50) 50% 22%)); }
.th-vid .play { width: 30%; max-width: 34px; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.88); clip-path: none; display: grid; place-items: center; }
.th-vid .play::after { content: ""; width: 34%; height: 40%; background: #222; clip-path: polygon(0 0, 100% 50%, 0 100%); margin-left: 12%; }
.th-vid .dur { position: absolute; right: 5px; bottom: 4px; font-size: 9.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,.5); border-radius: 4px; padding: 0 4px; }
.th-aud { background: linear-gradient(135deg, hsl(var(--h) 75% 60%), hsl(calc(var(--h) + 60) 70% 45%)); color: #fff; }
.th-aud svg { width: 34%; height: 34%; }
.th-shot { background: linear-gradient(160deg, #6d7ff0, #9a6fe8); padding: 9%; }
.th-shot .sw { width: 100%; height: 100%; border-radius: 4px; background: #fff; display: flex; flex-direction: column; gap: 6%; padding: 7% 8%; color: #222; text-align: left; }
.th-shot .sw i { display: block; height: 7%; border-radius: 2px; background: #dfe1e8; }
.th-shot .sw i:nth-child(2) { width: 70%; } .th-shot .sw i:nth-child(3) { width: 85%; }
.th-shot .sw em { font: 700 7.5px/1.25 ui-monospace, Menlo, monospace; color: #333; display: block; white-space: nowrap; overflow: hidden; }
.th-doc, .th-arc, .th-pkg { background: var(--d-card); }
.page { position: relative; width: 44%; aspect-ratio: .78; background: #fff; border-radius: 3px 10px 3px 3px; box-shadow: 0 2px 6px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 9%; padding: 16% 13%; }
.page i { display: block; height: 4%; min-height: 2px; background: #e2e3e8; border-radius: 1px; }
.page .lbl { position: absolute; left: -10%; right: -10%; bottom: 14%; border-radius: 3px; color: #fff; font: 800 9px/1.6 var(--font); text-align: center; letter-spacing: .02em; }
.row .page { width: 62%; } .row .page .lbl { font-size: 6px; } .tile .page .lbl { font-size: 8.5px; }
.insp-prev .page .lbl, .ql-body .page .lbl { font-size: 13px; }
.th-arc .page::before { content: ""; position: absolute; left: 44%; top: 6%; width: 12%; height: 50%; background: repeating-linear-gradient(180deg, #9a7b4f 0 3px, transparent 3px 6px); }
.th-app { background: transparent; }
.appic { width: 58%; aspect-ratio: 1; border-radius: 23%; background: linear-gradient(160deg, hsl(var(--h) 75% 62%), hsl(calc(var(--h) + 30) 70% 45%)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; box-shadow: 0 3px 8px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.35); }
.row .appic { font-size: 11px; width: 80%; }
.th-pkg .disk { width: 54%; aspect-ratio: 1.15; border-radius: 6px; background: linear-gradient(180deg, #f2f2f5, #c9cad2); box-shadow: 0 2px 6px rgba(0,0,0,.3); position: relative; }
.th-pkg .disk::after { content: ""; position: absolute; left: 30%; right: 30%; top: 30%; bottom: 30%; border-radius: 50%; background: #9da0aa; }

/* search */
.understood { padding: 12px 14px; border-radius: var(--d-r); background: var(--d-card); border: 1px solid var(--d-line); margin-bottom: 14px; }
.understood .uh { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--d-ink2); margin-bottom: 9px; }
.understood .uh svg { width: 13px; height: 13px; color: var(--d-accent); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.dchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 999px; background: var(--d-sel); border: 1px solid color-mix(in srgb, var(--d-accent) 35%, transparent); font-size: 12px; font-weight: 600; animation: chipIn .4s var(--ease-out) both; }
.dchip .x { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; color: var(--d-ink2); font-size: 12px; }
.dchip .x:hover { background: var(--d-line); color: var(--d-ink); }
.dchip.off { opacity: .45; text-decoration: line-through; background: transparent; }
@keyframes chipIn { from { opacity: 0; transform: translateY(5px) scale(.9); } to { opacity: 1; transform: none; } }
.res-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.res-h b { font-size: 14px; }
.res-h span { font-size: 11px; color: var(--d-ink3); }
.empty { text-align: center; padding: 40px 10px; color: var(--d-ink2); }
.empty b { display: block; color: var(--d-ink); font-size: 15px; margin-bottom: 4px; }
.sugg { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 14px; }
.sugg button { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--d-line) !important; background: var(--d-card); font-size: 12px; font-weight: 500; }
.sugg button:hover { border-color: var(--d-accent) !important; color: var(--d-accent); }
.filters { display: flex; gap: 6px; padding: 0 16px 10px; border-bottom: 1px solid var(--d-line); }
.filters button { padding: 4px 11px; border-radius: 999px; border: 1px solid var(--d-line) !important; font-size: 11.5px; font-weight: 600; color: var(--d-ink2); }
.filters button.on { background: var(--d-accent); color: #fff; border-color: transparent !important; }

/* cleanup */
.c-hero { display: flex; gap: 20px; align-items: center; padding: 18px; border-radius: var(--d-r); background: var(--d-card); border: 1px solid var(--d-line); }
.c-ring { position: relative; width: 112px; height: 112px; flex: none; }
.c-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.c-ring circle { fill: none; stroke-width: 10; }
.c-ring .bg { stroke: var(--d-line); }
.c-ring .fg { stroke: var(--d-accent); stroke-linecap: round; stroke-dasharray: 289; transition: stroke-dashoffset 1s var(--ease-out); }
.c-ring .lbl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.c-ring .lbl b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.c-ring .lbl span { font-size: 11px; color: var(--d-ink2); }
.c-hero h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.c-hero p { margin: 4px 0 12px; color: var(--d-ink2); font-size: 12.5px; max-width: 420px; }
.d-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; background: var(--d-accent) !important; color: #fff !important; font-size: 12.5px; font-weight: 600; transition: transform .12s, filter .15s; }
.d-btn:hover { filter: brightness(1.08); }
.d-btn:active { transform: scale(.96); }
.d-btn.ghost { background: var(--d-sel) !important; color: var(--d-accent) !important; }
.d-btn.danger { background: #e5484d !important; }
.c-rows { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.c-row { border-radius: var(--d-r); background: var(--d-card); border: 1px solid var(--d-line); overflow: hidden; transition: opacity .4s, transform .4s var(--ease-out); }
.c-row.gone { opacity: .5; }
.c-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; text-align: left; }
.c-head .ci { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; position: relative; color: var(--c); flex: none; }
.c-head .ci::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c); opacity: var(--d-tint); }
.c-head .ci svg { width: 17px; height: 17px; position: relative; }
.c-head b { display: block; font-size: 13px; font-weight: 600; }
.c-head span { font-size: 11.5px; color: var(--d-ink2); }
.c-head .amt { margin-left: auto; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.c-head .rv { padding: 6px 12px; border-radius: 8px; background: var(--d-sel); color: var(--d-accent); font-weight: 600; font-size: 12px; }
.c-head .done { color: #22a35a; font-weight: 700; font-size: 12px; }
.c-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease-out); }
.c-row.open .c-body { grid-template-rows: 1fr; }
.c-body > div { overflow: hidden; }
.c-items { border-top: 1px solid var(--d-line); padding: 6px 10px 10px; }
.c-item { display: grid; grid-template-columns: 18px 30px 1fr auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 7px; font-size: 12px; }
.c-item:hover { background: var(--d-card-h); }
.c-item .rt { width: 30px; height: 30px; border-radius: 6px; overflow: hidden; }
.c-item b { font-weight: 600; display: block; }
.c-item em { font-size: 11px; color: var(--d-ink2); }
.c-item .sz { color: var(--d-ink2); font-variant-numeric: tabular-nums; }
.cb { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--d-ink3); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.cb.on { background: var(--d-accent); border-color: var(--d-accent); }
.cb.on::after { content: ""; width: 8px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.c-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 0; font-size: 11.5px; color: var(--d-ink2); }
.c-note { display: flex; gap: 6px; align-items: center; margin-top: 14px; font-size: 11.5px; color: var(--d-ink3); }

/* sources */
.src-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dsrc { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: var(--d-r); background: var(--d-card); border: 1px solid var(--d-line); text-align: left; transition: transform .2s var(--ease-out), background .15s; }
.dsrc:hover { background: var(--d-card-h); transform: translateY(-1px); }
.dsrc .si { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.dsrc b { display: block; font-size: 13px; }
.dsrc span { font-size: 11.5px; color: var(--d-ink2); }

/* dupes */
.dg { border-radius: var(--d-r); background: var(--d-card); border: 1px solid var(--d-line); padding: 10px 12px; margin-bottom: 9px; }
.dg-h { display: flex; justify-content: space-between; font-size: 12px; color: var(--d-ink2); margin-bottom: 8px; }
.dg-h b { color: var(--d-ink); }
.dg-items { display: flex; gap: 10px; }
.dg-it { width: 96px; font-size: 10.5px; color: var(--d-ink2); }
.dg-it .tw { aspect-ratio: 4/3; border-radius: 7px; overflow: hidden; border: 2px solid transparent; margin-bottom: 4px; background: var(--d-content); }
.dg-it.keep .tw { border-color: #22a35a; }
.dg-it .k { color: #22a35a; font-weight: 700; }

/* inspector */
.insp { background: var(--d-side); border-left: 1px solid var(--d-line); padding: 46px 14px 14px; overflow-y: auto; min-width: 0; transition: background .4s; scrollbar-width: none; }
.insp-prev { aspect-ratio: 4/3; border-radius: var(--d-r); overflow: hidden; border: 1px solid var(--d-line); background: var(--d-card); }
.insp h4 { margin: 12px 0 2px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; word-break: break-word; }
.insp .k { font-size: 11.5px; color: var(--d-ink2); }
.insp .pth { font-size: 11px; color: var(--d-ink3); margin-top: 2px; word-break: break-all; }
.insp-acts { display: flex; gap: 6px; margin: 12px 0; }
.insp-acts .ia { width: 32px; height: 30px; border-radius: 8px; border: 1px solid var(--d-line) !important; display: grid; place-items: center; background: var(--d-elev); transition: background .15s, transform .12s; }
.insp-acts .ia:hover { background: var(--d-card-h); }
.insp-acts .ia:active, .insp-acts .d-btn:active { transform: scale(.94); }
.insp-acts .ia svg { width: 14px; height: 14px; }
.insp dl { margin: 0; border-top: 1px solid var(--d-line); padding-top: 8px; display: grid; grid-template-columns: auto 1fr; gap: 7px 10px; font-size: 11.5px; }
.insp dt { color: var(--d-ink3); }
.insp dd { margin: 0; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.ocr-box { margin-top: 12px; padding: 10px; border-radius: 9px; background: var(--d-card); border: 1px solid var(--d-line); }
.ocr-box .oh { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; color: var(--d-ink2); margin-bottom: 6px; }
.ocr-box .oh button { color: var(--d-accent); font-size: 11px; font-weight: 600; }
.ocr-box p { margin: 0; font: 500 11px/1.45 ui-monospace, Menlo, monospace; white-space: pre-line; user-select: text; -webkit-user-select: text; }
.insp-empty { color: var(--d-ink3); font-size: 12px; text-align: center; margin-top: 60px; }

/* ---- Dock ---- */
.dock { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 25; display: flex; align-items: flex-end; gap: 7px; padding: 7px 9px; border-radius: 20px;
  background: rgba(255,255,255,.22); backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%); border: 1px solid rgba(255,255,255,.3); box-shadow: 0 10px 30px -10px rgba(0,0,0,.35); }
.dk { position: relative; width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; transition: transform .25s var(--ease-out); color: #fff; }
.dk:hover { transform: translateY(-6px) scale(1.12); }
.dk svg { width: 54%; height: 54%; }
.dk.run::after { content: ""; position: absolute; bottom: -6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: rgba(0,0,0,.6); }
.stage[data-theme="dark"] .dk.run::after, .stage[data-theme="nature"] .dk.run::after { background: rgba(255,255,255,.8); }
.dk .tip { position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%) translateY(4px); padding: 3px 9px; border-radius: 6px; background: rgba(30,30,34,.85); color: #fff; font-size: 11.5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s, transform .15s; }
.dk:hover .tip { opacity: 1; transform: translateX(-50%); }
.dk.bounce { animation: bounce .9s var(--ease-out); }
@keyframes bounce { 0%,100% { translate: 0 0; } 25% { translate: 0 -20px; } 50% { translate: 0 0; } 70% { translate: 0 -8px; } }
.dk-sep { width: 1px; height: 44px; background: rgba(255,255,255,.4); margin: 0 3px 3px; }
.dk-finder { background: linear-gradient(90deg, #4aa8ff 50%, #e8f2ff 50%); }
.dk-fa { background: none; }
.dk-fa svg { width: 100%; height: 100%; }
.dk-safari { background: radial-gradient(circle, #fff 0 30%, #2f8cff 32%); }
.dk-mail { background: linear-gradient(180deg, #5fb3ff, #1b74e8); }
.dk-msg { background: linear-gradient(180deg, #6ee77b, #2bc24a); }
.dk-photos { background: conic-gradient(#ff5f57, #febc2e, #28c840, #2fb8ff, #8a5cf6, #ff5f57); }
.dk-photos::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle, #fff 0 22%, transparent 24%); }
.dk-music { background: linear-gradient(180deg, #ff6b81, #fa2d48); }
.dk-notes { background: linear-gradient(180deg, #ffe066 0 30%, #fffbe8 30%); }
.dk-settings { background: linear-gradient(180deg, #a5a8b0, #6c6f78); }
.dk-dl { background: linear-gradient(180deg, #7fb0ff, #4a7ff0); }
.dk-trash { background: rgba(255,255,255,.35); color: #555; }
.dk-trash .fill { position: absolute; left: 30%; right: 30%; top: 26%; height: 0; background: repeating-linear-gradient(90deg, #ccc 0 3px, #eee 3px 6px); border-radius: 2px; transition: height .5s var(--ease-out); }
.dk-trash.full .fill { height: 22%; }

/* ---- Overlays ---- */
.scrim { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.18); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.qs { position: absolute; left: 50%; top: 120px; width: 600px; z-index: 45; transform: translateX(-50%) scale(.96); opacity: 0; pointer-events: none;
  border-radius: 16px; padding: 10px; background: color-mix(in srgb, var(--d-elev) 88%, transparent); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--d-line); box-shadow: 0 40px 80px -20px rgba(0,0,0,.6); transition: opacity .18s, transform .25s var(--ease-out); font-family: var(--d-font); }
.qs.on { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.qs-f { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.qs-f svg { width: 20px; height: 20px; color: var(--d-ink3); }
.qs-f input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 20px; font-weight: 500; letter-spacing: -.01em; user-select: text; -webkit-user-select: text; }
.qs-f .kk { font-size: 11px; color: var(--d-ink3); }
.qs-list { border-top: 1px solid var(--d-line); margin-top: 6px; padding-top: 6px; max-height: 300px; overflow-y: auto; }
.qs-sec { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; color: var(--d-ink3); padding: 8px 10px 4px; text-transform: uppercase; }
.qs-it { width: 100%; display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; text-align: left; }
.qs-it.on { background: var(--d-accent); color: #fff; }
.qs-it.on .p, .qs-it.on .hint { color: rgba(255,255,255,.8); }
.qs-it .rt { width: 32px; height: 32px; border-radius: 7px; overflow: hidden; }
.qs-it b { display: block; font-size: 13px; font-weight: 600; }
.qs-it .p { font-size: 11px; color: var(--d-ink3); }
.qs-it .hint { font-size: 11px; color: var(--d-ink3); }
.qs-foot { display: flex; gap: 14px; justify-content: flex-end; font-size: 11px; color: var(--d-ink3); padding: 8px 10px 2px; }

.ql { position: absolute; inset: 0; z-index: 46; display: grid; place-items: center; pointer-events: none; }
.ql-card { width: 560px; border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--d-elev) 92%, transparent); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border: 1px solid var(--d-line); box-shadow: 0 40px 90px -20px rgba(0,0,0,.65);
  opacity: 0; transform: scale(.85); transition: opacity .2s, transform .3s var(--ease-out); font-family: var(--d-font); }
.ql.on { pointer-events: auto; }
.ql.on .ql-card { opacity: 1; transform: none; }
.ql-bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--d-line); }
.ql-bar .ql-x { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.ql-bar span { flex: 1; text-align: center; }
.ql-bar .d-btn { padding: 4px 10px; font-size: 11.5px; }
.ql-body { height: 340px; display: grid; place-items: center; background: var(--d-content); }
.ql-body .th { border-radius: 0; }
.ql-body .page { width: 34%; }
.ql-meta { padding: 9px 12px; font-size: 11.5px; color: var(--d-ink2); display: flex; justify-content: space-between; }

.dtoast { position: absolute; left: 50%; bottom: 92px; z-index: 50; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 16px; border-radius: 12px; background: rgba(28,28,32,.92); color: #fff; font-size: 12.5px; font-weight: 500; box-shadow: 0 16px 40px -10px rgba(0,0,0,.5);
  transition: opacity .2s, transform .3s var(--ease-out); white-space: nowrap; }
.dtoast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.dtoast button { padding: 5px 10px; border-radius: 7px; background: rgba(255,255,255,.14); font-weight: 600; font-size: 12px; cursor: pointer; }
.dtoast button:empty { display: none; }

.flyer { position: absolute; z-index: 60; width: 30px; height: 30px; border-radius: 8px; pointer-events: none; overflow: hidden; box-shadow: 0 6px 14px rgba(0,0,0,.35); }

/* hint ring on a task target */
.pulse-hint { animation: hintPulse 1.4s ease-out 2; }
@keyframes hintPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--d-accent) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }

/* ---- Caption + tasks (page side) ---- */
.demo-caption { display: flex; justify-content: space-between; gap: 32px; padding: 26px 4px 0; align-items: flex-start; }
.dc-copy { max-width: 470px; }
.dc-copy h3 { margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -.025em; }
.dc-copy p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.dc-tasks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 560px; }
.task { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--btn-ghost); font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .14s var(--ease-out), border-color .2s, color .2s; }
.task:hover { background: var(--btn-ghost-hover); }
.task:active { transform: scale(.96); }
.task .tk-ic { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: var(--eyebrow); }
.task .tk-ic svg { width: 15px; height: 15px; }
.task .kc { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 5px; border: 1px solid var(--line); background: var(--kbd); font-size: 11px; font-weight: 600; margin-right: -3px; }
.task .kc.wide { margin-right: 2px; }
.task .tk-dots { display: inline-flex; gap: 2px; }
.task .tk-dots i { width: 8px; height: 8px; border-radius: 50%; }
.task .tk-dots i:nth-child(1) { background: #2e6be6; } .task .tk-dots i:nth-child(2) { background: #1b1e25; border: 1px solid #555; }
.task .tk-dots i:nth-child(3) { background: #e5468e; } .task .tk-dots i:nth-child(4) { background: #5fb47a; }
.task.done { border-color: rgba(50,208,116,.45); color: var(--green); }
.task.done::after { content: ""; width: 14px; height: 8px; border: 2.2px solid currentColor; border-top: 0; border-right: 0; transform: rotate(-45deg) translateY(-2px); margin-left: 2px; animation: popIn .3s var(--ease-out); }

@media (max-width: 900px) {
  .demo-caption { flex-direction: column; gap: 18px; }
  .dc-tasks { justify-content: flex-start; }
}
@media (max-width: 640px) { .demo-wrap { padding: 0 12px; } .stage { border-radius: 14px; } }
@media (prefers-reduced-motion: reduce) { .stage { opacity: 1; translate: none; } }

.d-btn svg { width: 14px; height: 14px; }
