/* demo.dgtl.mov — DGTL application scale. Denser than the marketing pages:
   14px body, 10px-padding controls, sidebar shell, quiet chrome. */

body { font-size: 14px; overflow: hidden; }

.app {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  grid-template-rows: 60px minmax(0, 1fr);
  grid-template-areas: "brand top" "side main";
  height: 100dvh;
}

/* ---------- top bar ------------------------------------------------------ */
.app-brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-1);
  text-decoration: none;
}
.app-brand img { height: 22px; width: auto; }
.app-brand .divider { width: 1px; height: 18px; background: var(--border); }
.app-brand b { font-size: 13px; color: #fff; font-weight: 700; }

.app-top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px) saturate(1.8);
  -webkit-backdrop-filter: blur(8px) saturate(1.8);
  border-bottom: 1px solid var(--border-subtle);
}
.app-top h1 { font-size: 16px; font-weight: 700; color: #fff; }
.app-top .status { font-size: 12px; color: var(--text-dim); }
.app-top .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.badge-live {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-tint); color: var(--gold);
  border-radius: var(--r-pill); font-size: 11px; font-weight: 700;
  padding: 4px 10px; text-transform: uppercase; letter-spacing: 0.08em;
}
.badge-live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
}

/* ---------- sidebar ------------------------------------------------------ */
.app-side {
  grid-area: side;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-dim); font-weight: 700; padding: 0 10px; margin-bottom: 8px;
}
.side-label + .side-label, .side-sep { margin-top: 22px; }
.nav-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: 0; border-radius: var(--r-control);
  color: var(--text-muted); font-family: var(--font); font-size: 14px;
  font-weight: 500; padding: 10px 12px; cursor: pointer; text-align: left;
  min-height: 40px; text-decoration: none;
}
.nav-btn:hover { background: var(--surface-2); color: #fff; }
.nav-btn svg { flex: 0 0 auto; color: currentColor; }
.nav-btn[aria-current="true"] {
  background: var(--gold-tint); color: var(--gold); font-weight: 700;
  box-shadow: inset 2px 0 0 var(--gold);
}
.side-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); }
.side-foot p { font-size: 11px; color: var(--text-dim); line-height: 1.55; margin-bottom: 10px; }

/* ---------- main --------------------------------------------------------- */
.app-main { grid-area: main; overflow-y: auto; padding: 24px; background: #000; }
.view[hidden] { display: none; }
.view-head { margin-bottom: 20px; }
.view-head h2 { font-size: 20px; font-weight: 700; color: #fff; }
.view-head p { font-size: 13px; color: var(--text-dim); margin-top: 6px; max-width: 68ch; line-height: 1.6; }

/* ---------- search ------------------------------------------------------- */
.search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search-field { position: relative; flex: 1 1 320px; }
.search-field svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); pointer-events: none;
}
.search-field input {
  width: 100%; background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--r-control); padding: 12px 14px 12px 38px;
  font-family: var(--font); font-size: 14px; color: var(--text); min-height: 44px;
}
.chip-scroll { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-pill);
  color: var(--text-muted); font-family: var(--font); font-size: 12px; font-weight: 600;
  padding: 7px 14px; cursor: pointer; min-height: 34px;
}
.chip:hover { border-color: #3a3a3a; color: #fff; }
.chip[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }

/* ---------- facets ------------------------------------------------------- */
.facets {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--surface-1); padding: 16px; margin-bottom: 18px;
}
.facet { display: flex; flex-direction: column; gap: 5px; min-width: 132px; }
.facet label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); font-weight: 700; }
.facet select {
  background: #000; border: 1px solid var(--border); border-radius: var(--r-control);
  color: var(--text); font-family: var(--font); font-size: 13px; padding: 9px 11px;
  min-height: 40px;
}
.facet-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.result-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px; font-size: 13px; color: var(--text-dim);
}

/* ---------- asset grid --------------------------------------------------- */
.asset-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
}
.asset {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--surface-1); cursor: pointer; text-align: left;
  font-family: var(--font); padding: 0; color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.asset:hover { border-color: #3a3a3a; transform: translateY(-2px); }
.asset-media { position: relative; background: #000; }
.asset-media img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.asset-media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.asset-media .dur {
  position: absolute; right: 7px; bottom: 7px;
  background: rgba(0, 0, 0, 0.72); border-radius: 4px;
  font-size: 10px; font-weight: 700; color: #fff; padding: 2px 6px;
  font-variant-numeric: tabular-nums;
}
.asset-media .kind {
  position: absolute; left: 7px; top: 7px;
  background: rgba(0, 0, 0, 0.72); border-radius: var(--r-pill);
  font-size: 9px; font-weight: 700; color: var(--text-muted);
  padding: 3px 8px; text-transform: uppercase; letter-spacing: 0.08em;
}
.asset-body { padding: 10px 11px 12px; }
.asset-body .name {
  font-size: 12px; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.asset-body .meta { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.asset-body .tags { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.asset-body .tags .pill { font-size: 9px; padding: 2px 7px; }
.asset .stars { color: var(--gold); font-size: 10px; letter-spacing: 1px; }
.asset .why { font-size: 10px; color: var(--gold-tan); margin-top: 6px; }

/* ---------- inspector drawer --------------------------------------------- */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px); z-index: 60;
}
.drawer-scrim[hidden], .drawer[hidden] { display: none; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw);
  background: var(--surface-1); border-left: 1px solid var(--border);
  z-index: 61; overflow-y: auto; padding: 20px;
}
.drawer-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.drawer-head h3 { font-size: 15px; font-weight: 700; color: #fff; word-break: break-all; }
.drawer-head p { font-size: 11px; color: var(--text-dim); margin-top: 4px; word-break: break-all; }
.drawer-close {
  margin-left: auto; flex: 0 0 auto; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: var(--r-control);
  background: transparent; color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.drawer-close:hover { background: var(--surface-2); color: #fff; }
.drawer video, .drawer .poster {
  width: 100%; border-radius: 10px; border: 1px solid var(--border); background: #000;
}
.drawer h4 {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-dim); font-weight: 700; margin: 22px 0 10px;
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 12px; }
.kv dt { color: var(--text-dim); }
.kv dd { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; word-break: break-word; }
.keyframes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.keyframes figure { margin: 0; }
.keyframes img { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 5px; object-fit: cover; }
.keyframes figcaption { font-size: 9px; color: var(--text-dim); text-align: center; margin-top: 3px; font-variant-numeric: tabular-nums; }
.summary { font-size: 13px; color: var(--text-muted); line-height: 1.65; }
.tag-groups { display: grid; gap: 10px; }
.tag-group .gname { font-size: 10px; color: var(--text-dim); margin-bottom: 5px; }
.tag-group .pills { display: flex; flex-wrap: wrap; gap: 5px; }
.drawer-actions { display: grid; gap: 8px; margin-top: 24px; }
.drawer-actions .btn { width: 100%; }

/* Disabled desktop-only controls stay visible where the workflow is the point */
.locked {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 1px dashed var(--border); border-radius: var(--r-control);
  background: transparent; color: var(--text-dim);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 12px 16px; min-height: 44px; cursor: pointer;
}
.locked:hover { border-color: #3a3a3a; color: var(--text-muted); }
.locked svg { flex: 0 0 auto; }

/* ---------- projects ----------------------------------------------------- */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.board {
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--surface-1); padding: 16px;
}
.board h3 { font-size: 14px; font-weight: 700; color: #fff; }
.board .count { font-size: 11px; color: var(--text-dim); margin-top: 3px; }
.board ul { list-style: none; margin-top: 12px; display: grid; gap: 7px; }
.board li {
  display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-muted);
}
.board li img { width: 44px; height: 25px; border-radius: 3px; object-fit: cover; flex: 0 0 auto; }
.board li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li button {
  margin-left: auto; background: transparent; border: 0; color: var(--text-dim);
  cursor: pointer; font-size: 15px; line-height: 1; padding: 6px; border-radius: 5px;
}
.board li button:hover { color: var(--error); background: var(--error-tint); }

.empty {
  text-align: center; padding: 64px 24px;
  border: 1px dashed var(--border); border-radius: var(--r-card);
}
.empty img { width: 44px; height: 44px; opacity: 0.28; margin: 0 auto 18px; }
.empty h3 { font-size: 16px; font-weight: 700; color: #fff; }
.empty p { font-size: 13px; color: var(--text-dim); margin: 8px auto 20px; max-width: 46ch; line-height: 1.6; }

/* ---------- studio / grade examples -------------------------------------- */
.stage-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.stage {
  border: 1px solid var(--border); border-radius: var(--r-control);
  background: var(--surface-1); padding: 13px 14px;
}
.stage .n { font-size: 10px; color: var(--text-dim); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.stage b { display: block; font-size: 13px; color: #fff; margin: 6px 0 4px; }
.stage p { font-size: 11px; color: var(--text-dim); line-height: 1.5; }
.stage.done { border-color: rgba(123, 196, 127, 0.3); }
.stage.done .n { color: var(--success); }

.compare { position: relative; border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.compare img { width: 100%; height: auto; display: block; }
.compare .after { position: absolute; inset: 0; overflow: hidden; }
.compare .after img { height: 100%; object-fit: cover; filter: var(--grade-look); }
.compare-range { width: 100%; margin-top: 14px; accent-color: var(--gold); min-height: 40px; }
.compare-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); margin-top: 4px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

/* ---------- conversion prompt -------------------------------------------- */
.prompt {
  position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(360px, calc(100vw - 40px));
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--gold); border-radius: 12px; padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.prompt[hidden] { display: none; }
.prompt h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 6px; padding-right: 24px; }
.prompt p { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.prompt .row { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.prompt .dismiss {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px;
  background: transparent; border: 0; color: var(--text-dim); cursor: pointer; border-radius: 5px;
}
.prompt .dismiss:hover { color: #fff; background: var(--surface-1); }

/* ---------- guided tour --------------------------------------------------- */
.tour-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 69;
  width: min(560px, calc(100vw - 40px));
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-card);
}
.tour-bar[hidden] { display: none; }
.tour-bar .txt { min-width: 0; }
.tour-bar .step { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold-tan); font-weight: 700; }
.tour-bar b { display: block; font-size: 13px; color: #fff; margin-top: 3px; }
.tour-bar p { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.tour-bar .acts { margin-left: auto; display: flex; gap: 8px; flex: 0 0 auto; }

/* ---------- responsive ---------------------------------------------------- */
.side-toggle { display: none; }
.label-short { display: none; }
@media (max-width: 700px) {
  .app-top { padding: 0 12px; gap: 8px; }
  .app-top h1 { font-size: 14px; }
  .top-secondary { display: none; }
  .label-long { display: none; }
  .label-short { display: inline; }
  .badge-live { font-size: 10px; padding: 4px 8px; }
  .app-top .right { gap: 6px; }
}
@media (max-width: 420px) {
  .app-top h1 { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  .app-brand { display: none; }
  .app-side {
    position: fixed; inset: 60px 0 0 0; z-index: 65; width: 100%;
    display: none; border-right: 0;
  }
  .app-side[data-open="true"] { display: flex; }
  .side-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: transparent;
    border: 1px solid var(--border); border-radius: var(--r-control);
    color: #fff; cursor: pointer;
  }
  .app-top .status { display: none; }
  .drawer { width: 100vw; }
  .tour-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .tour-bar .acts { margin-left: 0; width: 100%; }
  .tour-bar .acts .btn { flex: 1; }
}
