/* Asset detail (board 2). Desktop baseline; responsive.css stacks it on narrow
   screens. Photos and video stay square-cornered (no radius on the stage). */

.asset { display: flex; flex-direction: column; gap: 28px; }

.asset__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.asset__back {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px 0 10px;
  border: 0; border-radius: var(--radius);
  background: var(--tone-1); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background var(--t-hover) var(--ease-out);
}
.asset__back:hover { background: var(--tone-2); }
.asset__back svg { stroke: currentColor; }
.asset__pos { font-size: 13px; color: var(--text-quiet); }

/* ---- Preview stage ---------------------------------------------------- */

.asset__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 68vh;
  min-height: 320px;
  overflow: hidden;
  background: var(--media-bg);
  display: flex; align-items: center; justify-content: center;
}
.asset__tools { position: absolute; left: 14px; bottom: 14px; z-index: 3; display: flex; gap: 8px; }
.asset__tool {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 0; border-radius: var(--radius);
  background: var(--glass-dark); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  color: var(--on-media); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.asset__tool:hover { background: rgba(0, 0, 0, .6); }
.asset__tool svg { stroke: currentColor; }
/* The photo sits in a viewport that fills the stage. Zoomed, it shows the photo at its real pixels
   and scrolls or drags inside, over the actions panel. */
.asset__viewport { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.asset__viewport .asset__img { position: static; }
.asset__stage.is-zoomed { z-index: 6; }
.asset__stage.is-zoomed .asset__viewport { overflow: auto; display: block; cursor: grab; }
.asset__stage.is-panning .asset__viewport { cursor: grabbing; user-select: none; }
.asset__stage.is-zoomed .asset__bg { display: none; }
.asset__stage.is-zoomed .asset__img { max-width: none; max-height: none; margin: 0 auto; }
.asset__stage:fullscreen { max-height: none; aspect-ratio: auto; min-height: 0; width: 100vw; height: 100vh; background: #000; }
.asset__stage:fullscreen .asset__img, .asset__stage:fullscreen .asset__video { max-height: 100vh; }
.asset__bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(40px) brightness(.4); transform: scale(1.12); }
.asset__img { position: relative; z-index: 1; max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.asset__video { position: relative; z-index: 1; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.asset__doc { position: relative; z-index: 1; width: 38%; aspect-ratio: 4 / 5; background: var(--surface); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 40px; color: var(--text-quiet); }
.asset__badge {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  padding: 5px 10px;
  background: var(--glass-dark); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  color: var(--on-media); font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  border-radius: var(--radius);
}
.asset__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-dark); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  color: var(--on-media);
}
.asset__nav--prev { left: 16px; } .asset__nav--next { right: 16px; }
.asset__nav:hover { background: rgba(0, 0, 0, .6); }
.asset__nav svg { stroke: currentColor; }

.asset__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3;
  width: 72px; height: 72px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--on-media-ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.asset__play:hover { background: var(--on-media); }

/* ---- Content ---------------------------------------------------------- */

/* The metadata block spans the full content width (like the stage and More like
   this), so on wide screens its right edge lines up with them instead of
   stopping mid-page. The reading measures below (title, description, notes) are
   capped so text stays comfortable however wide the block gets. */
.asset__content { max-width: none; }

/* A PDF: white sheets on the grey stage, scrolling, with a pager (Page n of N, arrows, Full screen). */
.asset__pages {
  container-type: size; /* so a page can size itself to the preview (cqw, cqh) */
  position: absolute; inset: 0; z-index: 1; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 24px 0 96px;
}
.asset__pages:focus-visible { outline: 0; box-shadow: inset var(--focus); }
.asset__page { flex: none; margin: 0; width: min(calc(100% - 48px), 560px); background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px -8px rgba(0, 0, 0, .35); }
.asset__page img { display: block; width: 100%; height: auto; aspect-ratio: auto var(--page-ratio, .7071); }
/* Slides and other wide pages are as large as the preview allows: the whole page fits the height (with room
   for the pager), or the width, whichever is smaller. Portrait pages stay narrower and scroll. */
.asset__pages--wide .asset__page { width: min(calc(100cqw - 48px), calc((100cqh - 72px) * var(--page-ratio, 1.7778))); }
.asset__stage:fullscreen .asset__page { width: min(calc(100% - 48px), 900px); }
.asset__stage:fullscreen .asset__pages--wide .asset__page { width: min(calc(100cqw - 48px), calc((100cqh - 72px) * var(--page-ratio, 1.7778))); }
.asset__pager {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 6px; padding: 5px;
  background: var(--glass-dark); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  color: var(--on-media); border-radius: var(--radius);
}
.asset__pg { width: 34px; height: 34px; border: 0; border-radius: var(--radius); background: transparent; color: var(--on-media); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.asset__pg:hover:not(:disabled) { background: rgba(255, 255, 255, .16); }
.asset__pg:disabled { opacity: .35; cursor: default; }
.asset__pg svg { stroke: currentColor; }
.asset__pgnum { min-width: 104px; text-align: center; font-size: 13px; font-weight: 500; }
.asset__tool--bare { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; height: 34px; border-left: 1px solid rgba(255, 255, 255, .2); border-radius: 0 var(--radius) var(--radius) 0; }

/* A logo: centred on checks (they stay light in dark mode), with a Checks, Light, Dark switch. */
.asset__logo { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 48px; }
.asset__logo .asset__img { position: static; max-width: min(70%, 760px); max-height: 100%; }
.asset__logo--checks { background-color: #fff; background-image: conic-gradient(#e9e6e0 25%, #fff 0 50%, #e9e6e0 0 75%, #fff 0); background-size: 24px 24px; }
.asset__logo--light { background: #faf9f6; }
.asset__logo--dark { background: #1a1a1a; }
.asset__bgswitch {
  position: absolute; left: 14px; bottom: 14px; z-index: 3; display: flex; gap: 2px; padding: 3px;
  background: var(--glass-dark); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-radius: var(--radius);
}
.asset__bgbtn { height: 30px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: var(--on-media); font: inherit; font-size: 13px; cursor: pointer; }
.asset__bgbtn:hover { background: rgba(255, 255, 255, .12); }
.asset__bgbtn[aria-pressed="true"] { background: rgba(255, 255, 255, .22); font-weight: 600; }

/* Section headers (Details, Custom fields, Notes): the small-caps eyebrow over a
   Rule-gray hairline with a short red tick (the brand's hairline + Red moment).
   This gives each section a clear start, which matters most when the columns
   stack on narrow screens and would otherwise run together. */
.asset__sechead { display: block; position: relative; padding-bottom: 9px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); }
.asset__sechead::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 26px; height: 1px; background: var(--red); }

.asset__eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.asset__chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--radius); background: var(--inverse-bg); color: var(--inverse-text); font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.asset__crumb { color: var(--red-text); }
.asset__title { font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em; font-size: 40px; line-height: 1.1; margin: 10px 0 16px; max-width: 760px; }
/* The AI description spans the full width of the page: the overview first, then the detail
   sections in columns that wrap to however many fit (each at least 300px), so lines stay readable. */
.asset__ai { margin-top: 4px; }
.asset__desc { font-size: 17px; line-height: 1.6; max-width: none; }
.asset__details { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px 40px; margin-top: 24px; }
.asset__detail { display: flex; flex-direction: column; gap: 10px; }
.asset__detail p { margin: 0; font-size: 14px; line-height: 1.6; }

.asset__tagsec { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.asset__taglegend { font-size: 12px; color: var(--text-quiet); }
.asset__aitag-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.aitag { height: 30px; padding: 0 12px; border: 1px dashed var(--text-quiet); border-radius: var(--radius); background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background var(--t-hover) var(--ease-out); }
.aitag svg { color: var(--text-quiet); flex: none; }
.aitag:hover { background: var(--tone-1); }
.aitag--all { border: 0; height: 30px; background: var(--inverse-bg); color: var(--inverse-text); font-weight: 600; }
.aitag--all:hover { background: var(--inverse-bg); opacity: .9; }

.asset__rule { border: 0; border-top: 1px solid var(--rule); margin: 28px 0; }
/* Details and Custom fields are a two-column pair (.asset__meta). */
.asset__cols { position: relative; }
.asset__meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.asset__group { display: flex; flex-direction: column; gap: 10px; }
.asset__dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.asset__dl dt { color: var(--text-quiet); }
.asset__dl dd { margin: 0; color: var(--text); }
.asset__src { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.asset__src-site { font-weight: 600; }
.asset__src-path { color: var(--text-quiet); overflow-wrap: anywhere; line-height: 1.45; }
.asset__src-link { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; width: fit-content; margin-top: 2px; color: var(--text); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.asset__src-link:hover { color: var(--red-text); }
.asset__src-link svg { stroke: currentColor; }
.asset__swatches { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.asset__swatch { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.asset__swatch i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.5); }
.asset__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tagchip { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; background: var(--tone-1); border-radius: var(--radius); font-size: 13px; }
.asset__empty { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-quiet); }

/* ---- More like this --------------------------------------------------- */

.asset__more { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.simrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.simcard { text-decoration: none; color: var(--text); }
.simcard__frame { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface); }
.simcard__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.simcard__doc { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--text-quiet); }
.simcard__play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--glass-dark); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-radius: 50%; color: var(--on-media); }
.simcard__title { display: block; margin-top: 8px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simcard:hover .simcard__title { color: var(--red-text); }

.asset-skel { aspect-ratio: 16 / 9; max-height: 68vh; background: var(--surface); border-radius: 2px; animation: pulse 1.2s ease-in-out infinite; }
.asset-missing { padding: 60px 0; }
@media (prefers-reduced-motion: reduce) { .asset-skel { animation: none; } }

/* ---- Scenes (video) ---------------------------------------------------- */

.asset__scenes { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.scenegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 16px; }
.scene {
  display: flex; flex-direction: column; gap: 8px;
  padding: 0; border: 0; background: none; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.scene__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); } /* square corners, like all media */
.scene__frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--t-hover) var(--ease-out); }
.scene:hover .scene__frame img { transform: scale(1.03); }
.scene__time {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 7px;
  background: var(--glass-dark); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  color: var(--on-media); font-size: 11px; font-weight: 600; letter-spacing: .02em; border-radius: var(--radius);
}
.scene__cap, .scene__text { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.scene__cap { font-size: 13px; line-height: 1.45; -webkit-line-clamp: 3; }
.scene__text { font-size: 12px; line-height: 1.4; color: var(--text-quiet); -webkit-line-clamp: 2; }
.scene:hover .scene__cap { color: var(--red-text); }
.scene:focus-visible { outline: 0; box-shadow: var(--focus); }
/* The scene the video is playing now. */
.scene.is-now .scene__frame { outline: 2px solid var(--red); outline-offset: -2px; }
.scene.is-now .scene__time { background: var(--red); color: #fff; }
@media (prefers-reduced-motion: reduce) { .scene__frame img { transition: none; } .scene:hover .scene__frame img { transform: none; } }

/* Captions on a video. */
.asset__captions { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.asset__sechead-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.capsList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.capsList__item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius); background: var(--tone-1); }
.capsList__lang { font-weight: 600; }
.capsList__meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text-quiet); }
.capsList__rm { flex: none; }
.asset__capnote { margin: 0; font-size: 13px; color: var(--text-quiet); }

/* A photo that is one frame of a burst: a short note under the title with a link to all of them. */
.asset__burst { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 14px; color: var(--text-2); }
.asset__burst svg { stroke: currentColor; flex: none; }
.asset__burst a { color: var(--red-text); font-weight: 600; text-decoration: none; }
.asset__burst a:hover { text-decoration: underline; }
.asset__burstcover { height: 28px; padding: 0 12px; border: 0; border-radius: var(--radius); background: var(--tone-1); color: var(--text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.asset__burstcover:hover { background: var(--tone-2); }
.asset__burstcover:disabled { opacity: .5; cursor: default; }
.asset__burstnote { color: var(--text-quiet); }

/* The licence ends soon (or has ended): a red tinted note, with words as well as colour. */
.asset__licence { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 0; padding: 12px 14px; max-width: 620px; border-radius: var(--radius); background: var(--active-tint); color: var(--active-text); font-size: 14px; line-height: 1.45; }
.asset__licence strong { font-weight: 600; }

/* Text in image: what the AI read, with Copy text. */
.asset__tii { margin: 24px 0 0; max-width: 760px; }
.asset__tii-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.asset__tii-text { margin: 0 0 8px; padding: 14px 16px; background: var(--tone-1); border-radius: var(--radius); font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.asset__tii-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-quiet); }
.asset__tii-copy { height: 36px; padding: 0 14px; border: 0; border-radius: var(--radius); background: var(--tone-1); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background var(--t-hover) var(--ease-out); }
.asset__tii-copy:hover { background: var(--tone-2); }

/* ---- Action row (a thin command bar under the preview) ---------------- */

.asset__actionbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
.asset__info { font-size: 12px; color: var(--text-quiet); }
.asset__info strong { color: var(--text); font-weight: 600; }
.asset__iconacts { display: inline-flex; gap: 2px; }
/* Frameless: the control sits on the page with no chrome. The button shape
   (a soft tint) only surfaces on hover and press, so the row reads as a line
   of icons, not a strip of buttons. */
.iconbtn {
  width: 30px; height: 30px;
  border: 0; border-radius: var(--radius);
  background: transparent; color: var(--text-quiet); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out);
}
.iconbtn:hover { background: var(--tone-1); color: var(--text); }
.iconbtn:active { background: var(--tone-2); }
.iconbtn svg { stroke: currentColor; width: 16px; height: 16px; }
/* Download reads as the lead action only on hover; delete warms to red. */
.iconbtn--primary:hover { color: var(--red-text); }
.iconbtn.is-done { color: var(--red-text); }
.asset__project { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.asset__project:hover { color: var(--red-text); }
.asset__project svg { stroke: currentColor; }
/* Frameless and the same 30x30 as the action-row icons. z-index lifts it above
   the section header so its whole area is clickable; it sits just above the eyebrow line. */
.asset__edit { position: absolute; top: -15px; right: 0; z-index: 2; width: 30px; height: 30px; border: 0; border-radius: var(--radius); background: transparent; color: var(--text-quiet); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out); }
.asset__edit:hover { background: var(--tone-1); color: var(--text); }
.asset__edit:active { background: var(--tone-2); }
.asset__edit svg { stroke: currentColor; width: 16px; height: 16px; }
/* Notes sits in the right column beside Details on wide screens, filling the gap under Custom fields;
   on narrow screens it stacks full width below everything. */
.asset__notes-sec { margin-top: 0; }
.asset__notes-sec p { font-size: 14px; line-height: 1.6; max-width: 640px; }
.asset__notes-sec p.asset__empty { font-size: 13px; line-height: 1.5; }
/* Details and Custom fields are a two-column pair (.asset__meta) that takes the left side; Notes is its own
   column filling the right side. All three always show, empty or not, so people see what they can add. */
.asset__cols--notes { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
