/**
 * Portfolio Studio + dashboard portfolio cards — light theme.
 *
 * The dashboard already remaps Tailwind neutrals. This file covers the Studio's
 * custom hex surfaces, white-on-white CTAs, and form chrome that those remaps miss.
 */

html[data-dashboard-theme='light'] .portfolio-studio,
html[data-theme='light'] .app-dashboard .portfolio-studio,
html[data-theme='light'] .portfolio-studio {
  color: var(--agency-text, #0b1020);
}

html[data-dashboard-theme='light'] .portfolio-studio [class*='from-[#070b18]'],
html[data-dashboard-theme='light'] .portfolio-studio [class*='to-[#12082a]'],
html[data-dashboard-theme='light'] .portfolio-studio [class*='via-neutral-950'],
html[data-theme='light'] .app-dashboard [class*='from-[#070b18]'],
html[data-theme='light'] .app-dashboard [class*='to-[#12082a]'],
html[data-dashboard-theme='light'] .app-dashboard [class*='from-[#070b18]'],
html[data-dashboard-theme='light'] .app-dashboard [class*='to-[#12082a]'] {
  background-color: #ffffff !important;
  background-image: none !important;
}

html[data-dashboard-theme='light'] .portfolio-studio [class*='border-[#1f2a44]'],
html[data-dashboard-theme='light'] .app-dashboard [class*='border-[#1f2a44]'] {
  border-color: var(--agency-line, #c5cde0) !important;
}

html[data-dashboard-theme='light'] .portfolio-studio [class*='text-[#8ea2ff]'],
html[data-dashboard-theme='light'] .app-dashboard [class*='text-[#8ea2ff]'] {
  color: #1d4ed8 !important;
}

/* White fill + black ink is the dark-theme CTA. On a white card it disappears. */
html[data-dashboard-theme='light'] .portfolio-studio a.bg-white:not(.portfolio-studio__preview-page *),
html[data-dashboard-theme='light'] .portfolio-studio button.bg-white:not(.portfolio-studio__preview-page *),
html[data-dashboard-theme='light'] .app-dashboard .portfolio-nudge a.bg-white,
html[data-dashboard-theme='light'] .app-dashboard .portfolio-nudge button.bg-white {
  background-color: #0b1020 !important;
  color: #ffffff !important;
}

html[data-dashboard-theme='light'] .portfolio-studio a.bg-white:hover:not(.portfolio-studio__preview-page *),
html[data-dashboard-theme='light'] .portfolio-studio button.bg-white:hover:not(.portfolio-studio__preview-page *),
html[data-dashboard-theme='light'] .app-dashboard .portfolio-nudge a.bg-white:hover,
html[data-dashboard-theme='light'] .app-dashboard .portfolio-nudge button.bg-white:hover {
  background-color: #1e293b !important;
}

html[data-dashboard-theme='light'] .portfolio-studio input,
html[data-dashboard-theme='light'] .portfolio-studio textarea,
html[data-dashboard-theme='light'] .portfolio-studio select {
  background-color: #ffffff !important;
  border-color: var(--agency-line, #c5cde0) !important;
  color: var(--agency-text, #0b1020) !important;
}

html[data-dashboard-theme='light'] .portfolio-studio input::placeholder,
html[data-dashboard-theme='light'] .portfolio-studio textarea::placeholder {
  color: #94a3b8 !important;
}

html[data-dashboard-theme='light'] .portfolio-studio .border-dashed {
  border-color: #c5cde0 !important;
}

html[data-dashboard-theme='light'] .portfolio-studio [role='tablist'] {
  border-color: var(--agency-line, #c5cde0) !important;
}

html[data-dashboard-theme='light'] .portfolio-studio [role='tab'][aria-selected='true'] {
  color: var(--agency-text, #0b1020) !important;
}

html[data-dashboard-theme='light'] .portfolio-studio [role='tab'][aria-selected='true'] > span {
  background-color: #0b1020 !important;
}

/* Device frame stays a dark bezel so the preview reads as a phone/desktop, not a white box. */
html[data-dashboard-theme='light'] .portfolio-studio__preview .bg-black {
  background-color: #0b1020 !important;
}

html[data-dashboard-theme='light'] .portfolio-studio .hover\:bg-white\/5:hover,
html[data-dashboard-theme='light'] .app-dashboard .portfolio-nudge .hover\:bg-white\/5:hover {
  background-color: #f1f5f9 !important;
}

html[data-dashboard-theme='light'] .portfolio-studio button[role='switch']:not(.bg-emerald-500) {
  background-color: #cbd5e1 !important;
}

html[data-dashboard-theme='light'] .portfolio-studio button[role='switch'] span {
  background-color: #ffffff !important;
}

/*
 * The dashboard light theme paints a 1px border on `button.bg-neutral-700`, which is this
 * switch's off state. That border eats 2px of the track and is what shoved the knob out of
 * the pill. Kill it here, not on every grey button in the studio.
 */
.portfolio-studio button[role='switch'],
html[data-dashboard-theme='light'] .portfolio-studio button[role='switch'] {
  border: none !important;
  box-shadow: none;
}

/* ------------------------------------------------------------------ *
 * Accent colour swatches
 *
 * The ring is a pair of box-shadows rather than Tailwind's `ring` + `ring-offset`: the offset can
 * only ever be one hard-coded colour, and this control sits on a near-black card in one theme and
 * a white one in the other, so the gap has to follow the card.
 *
 * The idle rings are brand blue in the light theme on purpose. They were white, which is invisible
 * on a white card — so the selected swatch had no ring to be distinguishable *from*, and there was
 * no way to tell which accent was chosen. Blue idle, black selected reads at a glance.
 * ------------------------------------------------------------------ */

.portfolio-studio__swatch {
  --swatch-gap: #0a0a0a;
  --swatch-ring: rgba(255, 255, 255, 0.2);
  --swatch-ring-width: 1px;
  position: relative;
  overflow: hidden;
  height: 2.25rem;
  width: 2.25rem;
  cursor: pointer;
  border-radius: 9999px;
  box-shadow:
    0 0 0 2px var(--swatch-gap),
    0 0 0 calc(2px + var(--swatch-ring-width)) var(--swatch-ring);
  transition: box-shadow 150ms ease;
}

.portfolio-studio__swatch-band {
  position: absolute;
  inset-inline: 0;
  top: 36%;
  height: 28%;
  pointer-events: none;
}

.portfolio-studio__swatch:hover {
  --swatch-ring: rgba(255, 255, 255, 0.5);
}

/* The radio itself is visually hidden, so the plate has to carry its focus state. */
.portfolio-studio__swatch:focus-within {
  --swatch-ring-width: 2px;
}

.portfolio-studio__swatch.is-selected {
  --swatch-ring: #ffffff;
  --swatch-ring-width: 2px;
}

html[data-dashboard-theme='light'] .portfolio-studio__swatch,
html[data-theme='light'] .app-dashboard .portfolio-studio__swatch {
  --swatch-gap: #ffffff;
  --swatch-ring: var(--agency-brand, #3b5bfd);
}

html[data-dashboard-theme='light'] .portfolio-studio__swatch:hover,
html[data-theme='light'] .app-dashboard .portfolio-studio__swatch:hover {
  --swatch-ring: var(--agency-brand, #3b5bfd);
  --swatch-ring-width: 2px;
}

html[data-dashboard-theme='light'] .portfolio-studio__swatch.is-selected,
html[data-theme='light'] .app-dashboard .portfolio-studio__swatch.is-selected {
  --swatch-ring: #000000;
  --swatch-ring-width: 2px;
}

.portfolio-studio__align {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.55rem;
  color: #d4d4d8;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.portfolio-studio__align.is-selected {
  border-color: #ffffff;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

html[data-dashboard-theme='light'] .portfolio-studio__align {
  border-color: var(--agency-line, #c5cde0);
  color: var(--agency-text, #0b1020);
}

html[data-dashboard-theme='light'] .portfolio-studio__align.is-selected {
  border-color: #000000;
  background: #f1f5f9;
}

/* ------------------------------------------------------------------ *
 * Client logo plates
 *
 * The same mid grey the live page paints behind the logo band, so the thumbnail previews the
 * background the mark will actually land on. It used to be `bg-white/90`, which the light theme
 * resolved to plain white and erased every white-on-transparent logo — and a mix of white and
 * black marks is exactly what a creator's client list arrives as.
 * ------------------------------------------------------------------ */

.portfolio-studio__logo-plate {
  background-color: #83888f;
}

.portfolio-studio__favicon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.portfolio-studio__favicon-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1a1a1d;
  overflow: hidden;
  flex: 0 0 auto;
  color: #737373;
  font-size: 0.68rem;
  font-weight: 650;
  text-align: center;
  line-height: 1.15;
  padding: 0.2rem;
}

.portfolio-studio__favicon-preview img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
}

.portfolio-studio__favicon-preview.is-busy::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.55);
}

.portfolio-studio__favicon-progress {
  display: grid;
  gap: 0.45rem;
}

.portfolio-studio__favicon-progress p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  color: #fbbf24;
}

.portfolio-studio__favicon-bar {
  position: relative;
  height: 0.375rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.portfolio-studio__favicon-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #d4af37, #f5e6a8);
  transition: width 200ms ease;
}

.portfolio-studio__favicon-bar > span.is-indeterminate {
  width: 42%;
  animation: portfolio-studio-favicon-indeterminate 1.1s ease-in-out infinite;
}

@keyframes portfolio-studio-favicon-indeterminate {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(280%);
  }
}

html[data-dashboard-theme='light'] .portfolio-studio__favicon-preview,
html[data-theme='light'] .app-dashboard .portfolio-studio__favicon-preview {
  border-color: var(--agency-line, #c5cde0);
  background: #fff;
  color: #737373;
}

html[data-dashboard-theme='light'] .portfolio-studio__favicon-progress p,
html[data-theme='light'] .app-dashboard .portfolio-studio__favicon-progress p {
  color: #92400e;
}

html[data-dashboard-theme='light'] .portfolio-studio__favicon-bar,
html[data-theme='light'] .app-dashboard .portfolio-studio__favicon-bar {
  background: rgba(15, 23, 42, 0.1);
}

.portfolio-studio__save-btn {
  border-radius: 0.5rem;
  background: #141416;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 10px 28px -14px rgba(212, 175, 55, 0.45);
}

.portfolio-studio__save-btn:not(:disabled):hover {
  transform: translateY(-1px);
  background: #1c1c20;
}

html[data-dashboard-theme='light'] .portfolio-studio__save-btn,
html[data-theme='light'] .app-dashboard .portfolio-studio__save-btn {
  background: #0b1020;
  color: #ffffff;
  border-color: rgba(11, 16, 32, 0.85);
}

html[data-dashboard-theme='light'] .portfolio-studio__save-btn:not(:disabled):hover,
html[data-theme='light'] .app-dashboard .portfolio-studio__save-btn:not(:disabled):hover {
  background: #1e293b;
}

html[data-dashboard-theme='light'] .portfolio-studio__section-save {
  border-color: var(--agency-line, #c5cde0) !important;
}

.portfolio-studio__steps {
  margin-bottom: 16px;
  border: 1px solid var(--member-chrome-line, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  background: color-mix(in srgb, var(--member-chrome-surface, #0b1020) 88%, transparent);
  padding: 12px 14px 10px;
}

.portfolio-studio__steps-kicker {
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--member-chrome-text-3, #8ea2ff);
}

.portfolio-studio__steps-kicker-hint {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--member-chrome-text-2, #9aa3b8);
}

.portfolio-studio__steps-track {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.portfolio-studio__steps-track::-webkit-scrollbar {
  display: none;
}

.portfolio-studio__steps-item {
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 4.75rem;
}

.portfolio-studio__steps-rule {
  flex: 0 0 14px;
  height: 1px;
  margin: 0 6px 14px 0;
  background: var(--member-chrome-line, #2a3148);
}

.portfolio-studio__steps-item button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-width: 0;
  padding: 2px 2px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.portfolio-studio__steps-num {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--member-chrome-text-3, #5f6785);
}

.portfolio-studio__steps-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--member-chrome-text-2, #c5cde0);
}

.portfolio-studio__steps-item.is-current .portfolio-studio__steps-num,
.portfolio-studio__steps-item.is-current .portfolio-studio__steps-label {
  color: #ffffff;
}

.portfolio-studio__steps-item:not(.is-current) button:hover .portfolio-studio__steps-label {
  color: var(--studio-step-hover-ink, var(--member-chrome-text, #e8ecf8));
}

.portfolio-studio__steps-dirty {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fbbf24;
}

.portfolio-studio__step-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.portfolio-studio__step-pager-status {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--member-chrome-text-3, #8b93a7);
}

html[data-dashboard-theme='light'] .portfolio-studio__steps,
html[data-theme='light'] .app-dashboard .portfolio-studio__steps {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--agency-line, #c5cde0);
}

html[data-dashboard-theme='light'] .portfolio-studio__steps-kicker,
html[data-theme='light'] .app-dashboard .portfolio-studio__steps-kicker {
  color: #1d4ed8;
}

html[data-dashboard-theme='light'] .portfolio-studio__steps-kicker-hint,
html[data-theme='light'] .app-dashboard .portfolio-studio__steps-kicker-hint,
html[data-dashboard-theme='light'] .portfolio-studio__step-pager-status,
html[data-theme='light'] .app-dashboard .portfolio-studio__step-pager-status {
  color: var(--agency-text-2, #5b6478);
}

html[data-dashboard-theme='light'] .portfolio-studio__steps-num,
html[data-theme='light'] .app-dashboard .portfolio-studio__steps-num,
html[data-dashboard-theme='light'] .portfolio-studio__steps-label,
html[data-theme='light'] .app-dashboard .portfolio-studio__steps-label {
  color: var(--agency-text-2, #5b6478);
}

html[data-dashboard-theme='light'] .portfolio-studio__steps-item.is-current .portfolio-studio__steps-num,
html[data-dashboard-theme='light'] .portfolio-studio__steps-item.is-current .portfolio-studio__steps-label,
html[data-theme='light'] .app-dashboard .portfolio-studio__steps-item.is-current .portfolio-studio__steps-num,
html[data-theme='light'] .app-dashboard .portfolio-studio__steps-item.is-current .portfolio-studio__steps-label {
  color: var(--agency-text, #0b1020);
}

html[data-dashboard-theme='light'] .portfolio-studio__steps-rule,
html[data-theme='light'] .app-dashboard .portfolio-studio__steps-rule {
  background: var(--agency-line, #c5cde0);
}

html[data-dashboard-theme='light'] .portfolio-studio__section-nav,
html[data-theme='light'] .app-dashboard .portfolio-studio__section-nav {
  background: transparent;
  border-color: var(--agency-line, #c5cde0);
}

html[data-dashboard-theme='light'] .portfolio-studio__section-chip,
html[data-theme='light'] .app-dashboard .portfolio-studio__section-chip {
  color: var(--agency-text, #0b1020);
}

html[data-dashboard-theme='light'] .portfolio-studio__section-chip:hover,
html[data-theme='light'] .app-dashboard .portfolio-studio__section-chip:hover {
  background: transparent;
}

.portfolio-studio__range {
  display: block;
  width: 100%;
  height: 2.25rem;
  margin: 0;
  cursor: pointer;
  accent-color: #3b82f6;
  touch-action: none;
}

/* ------------------------------------------------------------------ *
 * Open Portfolio — studio preview toolbar
 *
 * Dark theme: white pill, black ink (same as other studio CTAs).
 * Light theme: ink fill so it does not disappear on a white card.
 * ------------------------------------------------------------------ */

.portfolio-studio__open-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #0a0a0a;
  padding: 0.4rem 0.8rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.portfolio-studio__open-live:hover {
  background: #e5e5e5;
  color: #0a0a0a;
}

html[data-dashboard-theme='light'] .portfolio-studio__open-live,
html[data-theme='light'] .app-dashboard .portfolio-studio__open-live,
html[data-theme='light'] .portfolio-studio__open-live {
  background: #0b1020;
  color: #ffffff;
}

html[data-dashboard-theme='light'] .portfolio-studio__open-live:hover,
html[data-theme='light'] .app-dashboard .portfolio-studio__open-live:hover,
html[data-theme='light'] .portfolio-studio__open-live:hover {
  background: #1e293b;
  color: #ffffff;
}

html[data-dashboard-theme='light'] .portfolio-studio__preview button[aria-pressed='false'],
html[data-theme='light'] .app-dashboard .portfolio-studio__preview button[aria-pressed='false'] {
  border-color: var(--agency-line, #c5cde0) !important;
  color: var(--agency-text, #0b1020) !important;
}

html[data-dashboard-theme='light'] .portfolio-studio__preview button[aria-pressed='false']:hover,
html[data-theme='light'] .app-dashboard .portfolio-studio__preview button[aria-pressed='false']:hover {
  background: #f1f5f9 !important;
}

/* ------------------------------------------------------------------ *
 * Studio Rail — layout only. Tokens from --member-chrome-* so light/dark
 * follow the dashboard toggle. Do not use --agency-* (scoped to .agency-dashboard).
 * ------------------------------------------------------------------ */

.portfolio-studio,
.portfolio-studio__shell,
.portfolio-studio__editor,
.portfolio-studio__section {
  overflow-anchor: none;
}

.portfolio-studio__shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  position: relative;
}

.portfolio-studio__workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portfolio-studio__stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.portfolio-studio__preview {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.portfolio-studio__fullview {
  min-width: 0;
  width: 100%;
  padding: 4px 0 28px;
}

/* Full-view toolkit tabs (Domain, Inbox, SEO, share→SEO, Insights).
   Insights keeps density: inset only, no 52rem reading column. */
.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview {
  padding: 8px clamp(20px, 4vw, 40px) 32px;
  box-sizing: border-box;
}

.portfolio-studio__shell[data-workspace='fullView']:not([data-panel='insights']) .portfolio-studio__fullview {
  max-width: 52rem;
  margin-inline: auto;
}

.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview .portfolio-studio__section {
  padding-top: 22px;
  padding-bottom: 22px;
}

.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview .portfolio-studio__section-title {
  font-size: 20px;
  line-height: 1.25;
}

.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview .portfolio-studio__section-desc {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.5;
}

.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview .portfolio-studio__insights-toolbar h2 {
  font-size: 24px;
  line-height: 1.2;
}

.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview .portfolio-studio__insights-toolbar p {
  font-size: 16px;
  line-height: 1.5;
}

.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview .portfolio-studio__steps-kicker,
.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview .portfolio-studio__steps-num {
  font-size: 12px;
  line-height: 1.35;
}

.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview .portfolio-studio__steps-label {
  font-size: 15px;
  line-height: 1.35;
}

.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview :is(.text-xs, .text-\[11px\], .text-\[12px\]) {
  font-size: 15px;
  line-height: 1.5;
}

.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview :is(p, li, label, h4) {
  font-size: 15px;
  line-height: 1.5;
}

/* DNS / data tables: keep compact type and allow horizontal scroll for TXT/CNAME. */
.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview table,
.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview table :is(th, td, p, .text-xs, .text-\[11px\], .text-\[12px\]) {
  font-size: 12px;
  line-height: 1.45;
}

.portfolio-studio__shell[data-workspace='fullView'][data-panel='insights'] .portfolio-studio__insights-stat dt {
  font-size: 11px;
  line-height: 1.3;
}

.portfolio-studio__shell[data-workspace='fullView'][data-panel='insights'] .portfolio-studio__insights-stat dd {
  font-size: 28px;
  line-height: 1;
}

.portfolio-studio__shell[data-workspace='fullView'][data-panel='insights'] .portfolio-studio__insights :is(.text-\[11px\]) {
  font-size: 12px;
  line-height: 1.35;
}

.portfolio-studio__topbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
}

.portfolio-studio__topbar-left,
.portfolio-studio__topbar-right {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.portfolio-studio__topbar-right {
  margin-left: auto;
  padding-right: 8px;
  flex-shrink: 0;
}

.portfolio-studio__device {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--member-chrome-line, #1e2338);
}

.portfolio-studio__device-btn {
  min-width: 72px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--member-chrome-line, #1e2338);
  background: transparent;
  color: var(--member-chrome-text-2, #9aa3bd);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.portfolio-studio__device-btn:last-child {
  border-right: 0;
}

.portfolio-studio__device-btn.is-current {
  background: var(--member-chrome-text, #fff);
  color: #0b1020;
}

.portfolio-studio__topbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--member-chrome-line, #1e2338);
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.portfolio-studio__exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.portfolio-studio__exit:hover {
  background: #b91c1c;
  color: #fff;
}

.portfolio-studio__open-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--member-chrome-line, #1e2338);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.portfolio-studio__share-url {
  margin: 0;
  font-size: 11px;
  color: var(--member-chrome-text-3, #5f6785);
}

.portfolio-studio__share-url a:hover {
  color: inherit;
}

.portfolio-studio__flyout-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}

.portfolio-studio__flyout {
  display: flex;
  flex-direction: column;
  width: clamp(360px, 32vw, 420px);
  max-width: calc(100% - 16px);
  height: 100%;
  max-height: 100%;
  background: var(--member-chrome-base, #07080f);
  border: 0;
  border-right: 1px solid var(--member-chrome-line, #1e2338);
  border-radius: 0;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.22);
  transform: translateX(-110%);
  transition: transform 180ms ease;
  pointer-events: none;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
}

.portfolio-studio__shell[data-flyout='open'][data-workspace='canvas'] .portfolio-studio__stage {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.portfolio-studio__shell[data-flyout='open'][data-workspace='canvas'] .portfolio-studio__flyout-layer {
  position: relative;
  inset: auto;
  z-index: 2;
  height: 100%;
  min-height: 0;
  align-self: stretch;
  overflow: hidden;
  pointer-events: auto;
  background: var(--member-chrome-base, #07080f);
}

.portfolio-studio__shell[data-flyout='open'][data-workspace='canvas'] .portfolio-studio__flyout {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  transform: none;
  box-shadow: none;
  pointer-events: auto;
  visibility: visible;
}

.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__flyout-layer,
.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__flyout {
  display: none;
}

.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__stage {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.portfolio-studio__flyout-head {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--member-chrome-line, #1e2338);
}

.portfolio-studio__flyout-body {
  flex: 1 1 0;
  min-height: 0;
  padding: 16px 20px 28px;
  overflow-x: hidden;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.portfolio-studio__flyout-collapse,
.portfolio-studio__flyout-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  background: #1b00ff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.92),
    0 10px 24px rgba(15, 18, 40, 0.28),
    0 8px 18px rgba(27, 0, 255, 0.38);
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.portfolio-studio__flyout-collapse {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex-shrink: 0;
}

.portfolio-studio__flyout-expand {
  position: absolute;
  top: 14px;
  left: 0;
  z-index: 24;
  width: 44px;
  height: 56px;
  border-left: 0;
  border-radius: 0 16px 16px 0;
}

.portfolio-studio__flyout-collapse:hover,
.portfolio-studio__flyout-expand:hover {
  background: #3a1aff;
  box-shadow:
    0 0 0 2px #fff,
    0 12px 28px rgba(15, 18, 40, 0.34),
    0 10px 22px rgba(27, 0, 255, 0.46);
}

.portfolio-studio__flyout-expand:hover {
  transform: translateX(2px);
}

.portfolio-studio__flyout-collapse:focus-visible,
.portfolio-studio__flyout-expand:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px rgba(27, 0, 255, 0.55),
    0 10px 24px rgba(15, 18, 40, 0.28);
}

html[data-dashboard-theme='light'] .portfolio-studio__flyout-collapse,
html[data-dashboard-theme='light'] .portfolio-studio__flyout-expand,
html[data-member-chrome-theme='light'] .portfolio-studio__flyout-collapse,
html[data-member-chrome-theme='light'] .portfolio-studio__flyout-expand,
html[data-theme='light'] .app-dashboard .portfolio-studio__flyout-collapse,
html[data-theme='light'] .app-dashboard .portfolio-studio__flyout-expand {
  background: #1b00ff;
  color: #fff;
  border-color: rgba(11, 16, 32, 0.16);
  box-shadow:
    0 0 0 2px #0b1020,
    0 10px 24px rgba(11, 16, 32, 0.22),
    0 8px 18px rgba(27, 0, 255, 0.28);
}

html[data-dashboard-theme='light'] .portfolio-studio__flyout-collapse:hover,
html[data-dashboard-theme='light'] .portfolio-studio__flyout-expand:hover,
html[data-member-chrome-theme='light'] .portfolio-studio__flyout-collapse:hover,
html[data-member-chrome-theme='light'] .portfolio-studio__flyout-expand:hover,
html[data-theme='light'] .app-dashboard .portfolio-studio__flyout-collapse:hover,
html[data-theme='light'] .app-dashboard .portfolio-studio__flyout-expand:hover {
  background: #1500d6;
  box-shadow:
    0 0 0 2px #0b1020,
    0 12px 28px rgba(11, 16, 32, 0.28),
    0 10px 22px rgba(27, 0, 255, 0.34);
}

.portfolio-studio__flyout-collapse svg,
.portfolio-studio__flyout-expand svg {
  width: 20px;
  height: 20px;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.portfolio-studio__flyout-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  border: 0;
  background: rgba(7, 8, 15, 0.45);
}

@media (max-width: 767px) {
  .portfolio-studio {
    --ps-strip-h: 80px;
    --ps-tap: 44px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .portfolio-studio :is(a, button) {
    touch-action: manipulation;
  }

  .portfolio-studio__rail-strip {
    position: relative;
    z-index: 90;
    background: var(--member-chrome-base, #07080f);
  }

  html[data-dashboard-theme='light'] .portfolio-studio__rail-strip,
  html[data-member-chrome-theme='light'] .portfolio-studio__rail-strip {
    background: #eef1f7;
  }

  .portfolio-studio__rail-strip-list {
    padding: 6px 8px 8px;
  }

  .portfolio-studio__strip-item {
    min-width: 60px;
    height: 64px;
    min-height: 64px;
  }

  .portfolio-studio__strip-icon {
    width: 36px;
    height: 36px;
  }

  .portfolio-studio__shell[data-flyout='open'][data-workspace='canvas'] .portfolio-studio__stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .portfolio-studio__flyout-backdrop {
    top: var(--ps-strip-h);
    height: calc(100% - var(--ps-strip-h));
    height: calc(100dvh - var(--ps-strip-h));
  }

  .portfolio-studio__flyout-layer,
  .portfolio-studio__shell[data-flyout='open'][data-workspace='canvas'] .portfolio-studio__flyout-layer {
    position: fixed;
    top: var(--ps-strip-h);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    overflow: hidden;
  }

  .portfolio-studio__flyout,
  .portfolio-studio__shell[data-flyout='open'][data-workspace='canvas'] .portfolio-studio__flyout {
    position: fixed;
    top: var(--ps-strip-h);
    left: 0;
    z-index: 81;
    width: 100%;
    max-width: none;
    height: calc(100% - var(--ps-strip-h));
    height: calc(100dvh - var(--ps-strip-h));
    max-height: calc(100dvh - var(--ps-strip-h));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateX(-110%);
    box-shadow: 16px 0 48px rgba(0, 0, 0, 0.35);
  }

  .portfolio-studio__shell[data-flyout='open'][data-workspace='canvas'] .portfolio-studio__flyout {
    transform: translateX(0);
  }

  .portfolio-studio__flyout-head {
    padding: 10px 16px;
  }

  .portfolio-studio__flyout-body {
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .portfolio-studio__work-actions {
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 0;
  }

  .portfolio-studio__work-actions .portfolio-studio__icon-btn {
    width: var(--ps-tap);
    height: var(--ps-tap);
  }

  .portfolio-studio__topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px 10px;
  }

  .portfolio-studio__topbar-left,
  .portfolio-studio__topbar-right {
    flex-wrap: wrap;
    flex-shrink: 1;
    width: 100%;
  }

  .portfolio-studio__topbar-right {
    justify-content: flex-start;
    padding-right: 0;
  }

  .studio-inspector__actions {
    flex-wrap: wrap;
  }

  .portfolio-studio__exit,
  .portfolio-studio__open-live,
  .portfolio-studio__topbar-btn,
  .portfolio-studio__device-btn,
  .studio-inspector__ghost,
  .studio-inspector__publish {
    min-height: var(--ps-tap);
    height: var(--ps-tap);
    padding: 0 14px;
    font-size: 14px;
  }

  .portfolio-studio input:not([type='checkbox']):not([type='radio']):not([type='range']),
  .portfolio-studio textarea,
  .portfolio-studio select,
  .portfolio-studio .cp-field {
    font-size: 16px !important;
    min-height: var(--ps-tap);
  }
}

.portfolio-studio__editor {
  min-width: 0;
}

.portfolio-studio__editor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.portfolio-studio__editor-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--member-chrome-text-3, #5f6785);
}

.portfolio-studio__rail-strip {
  display: block;
  border-bottom: 1px solid var(--member-chrome-line, #1e2338);
}

.portfolio-studio__rail-strip-list {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 10px 12px 8px;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.portfolio-studio__rail-strip-list::-webkit-scrollbar {
  display: none;
}

.portfolio-studio__strip-item {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 76px;
  height: 76px;
  padding: 8px 10px 6px;
  border: none;
  background: transparent;
  color: var(--member-chrome-text-3, #5f6785);
  cursor: pointer;
  border-radius: 12px;
}

.portfolio-studio__strip-icon {
  position: relative;
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--member-chrome-surface-2, #111527);
  color: inherit;
}

.portfolio-studio__strip-icon svg {
  width: 22px;
  height: 22px;
}

.portfolio-studio__strip-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.portfolio-studio__strip-item.is-current {
  background: transparent;
  color: var(--member-chrome-text, #eef1fb);
}

.portfolio-studio__strip-item.is-current .portfolio-studio__strip-icon {
  background: #0b1020;
  color: #fff;
}

.portfolio-studio__strip-item:hover,
.portfolio-studio__strip-item:focus-visible {
  background: transparent;
  color: var(--member-chrome-text, #eef1fb);
  outline: none;
}

.portfolio-studio__strip-item:hover .portfolio-studio__strip-icon,
.portfolio-studio__strip-item:focus-visible .portfolio-studio__strip-icon {
  background: #0b1020;
  color: #fff;
}

.portfolio-studio__rail {
  display: none;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
  color: var(--member-chrome-text, #eef1fb);
}

.portfolio-studio__rail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 12px;
  border-bottom: 1px solid var(--member-chrome-line, #1e2338);
}

.portfolio-studio__rail-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--member-chrome-text-3, #5f6785);
}

.portfolio-studio__rail-status {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--member-chrome-text, #eef1fb);
}

.portfolio-studio__rail-ring {
  position: relative;
  display: flex;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.portfolio-studio__rail-ring svg {
  width: 34px;
  height: 34px;
  transform: rotate(-90deg);
}

.portfolio-studio__rail-ring-track {
  color: var(--member-chrome-line, #1e2338);
}

.portfolio-studio__rail-ring-fill {
  color: var(--member-chrome-brand, #0025cc);
}

.portfolio-studio__rail-ring-fill.is-complete {
  color: #34d399;
}

.portfolio-studio__rail-ring-label {
  position: absolute;
  font-size: 9px;
  font-weight: 800;
  tabular-nums: true;
  font-variant-numeric: tabular-nums;
}

.portfolio-studio__rail-list {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
}

.portfolio-studio__rail-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin-bottom: 2px;
  border: none;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: var(--member-chrome-text-2, #9aa3bd);
  cursor: pointer;
  text-align: left;
}

.portfolio-studio__rail-item:hover,
.portfolio-studio__rail-item:focus-visible {
  background: var(--member-chrome-surface-2, #111527);
  color: var(--member-chrome-text, #eef1fb);
  outline: none;
}

.portfolio-studio__rail-item.is-current {
  background: var(--member-chrome-surface-2, #111527);
  color: var(--member-chrome-text, #eef1fb);
  border-left-color: var(--member-chrome-brand, #0025cc);
}

.portfolio-studio__rail-icon {
  position: relative;
  display: flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.portfolio-studio__rail-icon svg {
  width: 16px;
  height: 16px;
}

.portfolio-studio__rail-label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.portfolio-studio__rail-item.is-current .portfolio-studio__rail-label {
  font-weight: 700;
}

.portfolio-studio__rail-lock {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--member-chrome-text-3, #5f6785);
}

.portfolio-studio__rail-count {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #10b981;
  color: #052e16;
  font-size: 8px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}

.portfolio-studio__rail-tip.is-fixed {
  position: fixed;
  z-index: 120;
  white-space: nowrap;
  padding: 4px 8px;
  background: var(--member-chrome-base, #07080f);
  color: var(--member-chrome-text, #eef1fb);
  border: 1px solid var(--member-chrome-line, #1e2338);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.55);
}

@media (min-width: 1280px) {
  .portfolio-studio__shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .portfolio-studio__rail-strip {
    display: block;
  }

  .portfolio-studio__rail {
    display: none !important;
  }

  .portfolio-studio__rail-head {
    justify-content: center;
    padding: 4px 0 10px;
  }

  .portfolio-studio__rail-head-copy,
  .portfolio-studio__rail-label,
  .portfolio-studio__rail-lock {
    display: none;
  }

  .portfolio-studio__rail-item {
    justify-content: center;
    padding: 10px 0;
    border-left: 0;
    border-radius: 10px;
  }

  .portfolio-studio__rail-pending {
    position: absolute;
    top: 6px;
    right: 8px;
  }

  .portfolio-studio__preview {
    position: sticky;
    top: 1rem;
    align-self: start;
    width: 100%;
    min-width: 0;
  }

  .portfolio-studio__preview-frame {
    max-width: 100%;
  }
}

html[data-member-chrome-theme='light'] .portfolio-studio__strip-icon,
html[data-dashboard-theme='light'] .portfolio-studio__strip-icon {
  background: #e4e9f4;
  color: #3f4860;
}

html[data-member-chrome-theme='light'] .portfolio-studio__strip-item.is-current,
html[data-dashboard-theme='light'] .portfolio-studio__strip-item.is-current {
  background: transparent;
  color: #0b1020;
}

html[data-member-chrome-theme='light'] .portfolio-studio__strip-item.is-current .portfolio-studio__strip-icon,
html[data-dashboard-theme='light'] .portfolio-studio__strip-item.is-current .portfolio-studio__strip-icon {
  background: #0b1020;
  color: #fff;
}

html[data-member-chrome-theme='light'] .portfolio-studio__rail-item.is-current,
html[data-dashboard-theme='light'] .portfolio-studio__rail-item.is-current {
  background: #d5dcf0;
  color: #0b1020;
}

html[data-member-chrome-theme='light'] .portfolio-studio__rail-tip,
html[data-dashboard-theme='light'] .portfolio-studio__rail-tip {
  background: var(--member-chrome-base, #eef1f7);
  color: var(--member-chrome-text, #0b1020);
  box-shadow: 0 6px 16px -6px rgba(11, 16, 32, 0.28);
}

.portfolio-studio {
  --studio-inspector-bg: rgba(7, 11, 24, 0.55);
  --studio-inspector-line: var(--member-chrome-line, #1e2338);
  --studio-step-hover: rgba(27, 0, 255, 0.16);
  --studio-step-hover-ink: var(--member-chrome-text, #e8ecf8);
}

html[data-dashboard-theme='light'] .portfolio-studio,
html[data-theme='light'] .app-dashboard .portfolio-studio {
  --studio-inspector-bg: #f8fbff;
  --studio-inspector-line: var(--agency-line, #c5cde0);
  --studio-step-hover: #eef2ff;
  --studio-step-hover-ink: #0b1020;
}

.portfolio-studio__steps-item button:hover {
  background: var(--studio-step-hover);
  border-radius: 8px;
}

.portfolio-studio__section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.portfolio-studio__section-title {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--member-chrome-text, #eef1fb);
}

.portfolio-studio__section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.2rem;
  padding: 0 6px;
  border: 1px solid var(--member-chrome-line, #1e2338);
  border-radius: 999px;
  background: color-mix(in srgb, var(--member-chrome-text, #fff) 8%, transparent);
  color: var(--member-chrome-text-2, #9aa3bd);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.portfolio-studio__section-dirty {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
}

.portfolio-studio__section-desc {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--member-chrome-text-3, #5f6785);
}

.portfolio-studio__section-nav {
  display: none;
}

.portfolio-studio__section-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--member-chrome-text-2, #9aa3bd);
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}

.portfolio-studio__section-chip:hover {
  background: transparent;
  color: var(--studio-step-hover-ink);
}

.portfolio-studio__section {
  border: 0;
  border-bottom: 1px solid var(--member-chrome-line, #1e2338);
  border-radius: 0;
  background: transparent;
  padding: 18px 0;
}

.portfolio-studio__row {
  border: 0;
  border-bottom: 1px solid var(--member-chrome-line, #1e2338);
  border-radius: 0;
  background: transparent;
}

.portfolio-studio__work-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.portfolio-studio__work-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.portfolio-studio__work-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
  color: var(--member-chrome-text, #eef1fb);
}

.portfolio-studio__work-title.is-muted {
  color: var(--member-chrome-text-3, #5f6785);
}

.portfolio-studio__work-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  padding-left: 28px;
  min-width: 0;
}

.portfolio-studio__work-actions .portfolio-studio__topbar-btn,
.portfolio-studio__work-actions .portfolio-studio__icon-btn {
  flex: 0 0 auto;
}

.portfolio-studio__work-delete {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.45);
}

.portfolio-studio__work-delete:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.portfolio-studio__icon-btn.portfolio-studio__work-delete {
  border: 0;
}

html[data-dashboard-theme='light'] .portfolio-studio__work-delete,
html[data-member-chrome-theme='light'] .portfolio-studio__work-delete,
html[data-theme='light'] .app-dashboard .portfolio-studio__work-delete {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.38);
}

html[data-dashboard-theme='light'] .portfolio-studio__work-delete:hover,
html[data-member-chrome-theme='light'] .portfolio-studio__work-delete:hover,
html[data-theme='light'] .app-dashboard .portfolio-studio__work-delete:hover {
  background: #fef2f2;
  color: #991b1b;
}

.portfolio-studio__icon-btn {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--member-chrome-text-2, #9aa3bd);
  background: transparent;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.portfolio-studio__icon-btn:hover:not(:disabled),
.portfolio-studio__icon-btn:focus-visible {
  color: var(--member-chrome-text, #eef1fb);
  background: var(--member-chrome-surface-2, #111527);
  outline: none;
}

.portfolio-studio__icon-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.portfolio-studio__icon-btn.is-active {
  color: #fbbf24;
}

.portfolio-studio__icon-btn.is-active:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.12);
}

.portfolio-studio__media-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
}

.portfolio-studio__media-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--member-chrome-line, #1e2338);
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.portfolio-studio__media-action svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.portfolio-studio__media-action.is-danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
}

.portfolio-studio__insights {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.portfolio-studio__insights-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.portfolio-studio__insights-toolbar h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.portfolio-studio__insights-toolbar p {
  margin: 6px 0 0;
  max-width: 42rem;
  font-size: 13px;
  color: var(--member-chrome-text-2, #9aa3bd);
}

.portfolio-studio__insights-range {
  display: inline-flex;
  border: 1px solid var(--member-chrome-line, #1e2338);
}

.portfolio-studio__insights-range button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--member-chrome-line, #1e2338);
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.portfolio-studio__insights-range button:last-child {
  border-right: 0;
}

.portfolio-studio__insights-range button.is-current {
  background: #0b1020;
  color: #fff;
}

html[data-dashboard-theme='light'] .portfolio-studio__insights-range button,
html[data-theme='light'] .app-dashboard .portfolio-studio__insights-range button,
html[data-member-chrome-theme='light'] .portfolio-studio__insights-range button {
  color: #0b1020;
}

html[data-dashboard-theme='light'] .portfolio-studio__insights-range button.is-current,
html[data-theme='light'] .app-dashboard .portfolio-studio__insights-range button.is-current,
html[data-member-chrome-theme='light'] .portfolio-studio__insights-range button.is-current {
  background: #0b1020 !important;
  color: #fff !important;
}

html[data-dashboard-theme='light'] .portfolio-studio__insights-range button:hover,
html[data-theme='light'] .app-dashboard .portfolio-studio__insights-range button:hover,
html[data-member-chrome-theme='light'] .portfolio-studio__insights-range button:hover {
  background: #eef2ff;
  color: #0b1020;
}

html[data-dashboard-theme='light'] .portfolio-studio__insights-range button.is-current:hover,
html[data-theme='light'] .app-dashboard .portfolio-studio__insights-range button.is-current:hover,
html[data-member-chrome-theme='light'] .portfolio-studio__insights-range button.is-current:hover {
  background: #0b1020 !important;
  color: #fff !important;
}

.portfolio-studio__insights-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--member-chrome-line, #1e2338);
  border: 1px solid var(--member-chrome-line, #1e2338);
}

@media (min-width: 900px) {
  .portfolio-studio__insights-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.portfolio-studio__insights-stat {
  min-width: 0;
  padding: 16px 18px;
  background: var(--member-chrome-base, #07080f);
}

.portfolio-studio__insights-stat dt {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--member-chrome-text-3, #5f6785);
  white-space: nowrap;
}

.portfolio-studio__insights-stat dd {
  margin: 8px 0 0;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

.portfolio-studio__insights-chart {
  min-height: 220px;
  padding-top: 8px;
}

.portfolio-studio__rail-pending {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fbbf24;
  flex-shrink: 0;
}

.studio-inspector {
  min-width: 0;
}

.studio-inspector__bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--studio-inspector-line);
  border-radius: 0;
  background: transparent;
}

.studio-inspector__kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--member-chrome-text-3, #5f6785);
}

.studio-inspector__status {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--member-chrome-text-2, #9aa3bd);
}

.studio-inspector__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.studio-inspector__ghost,
.studio-inspector__publish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 0;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.studio-inspector__ghost {
  border: 1px solid var(--studio-inspector-line);
  background: transparent;
  color: inherit;
}

.studio-inspector__publish {
  border: 0;
  background: #1b00ff;
  color: #fff;
}

.studio-inspector__ghost:disabled,
.studio-inspector__publish:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.studio-inspector__group {
  margin-bottom: 16px;
}

.studio-inspector__group-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.studio-inspector__group-head p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--member-chrome-text-3, #5f6785);
}

.studio-inspector__field {
  margin-bottom: 12px;
}

.studio-empty-region {
  display: flex;
  width: 100%;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
  padding: 18px;
  border: 1px dashed color-mix(in srgb, var(--cp-ink, #fff) 28%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--cp-surface, #111) 70%, transparent);
  color: var(--cp-muted, #94a3b8);
  font-size: 13px;
  font-weight: 600;
}

.studio-empty-region--inline {
  display: inline;
  min-height: 0;
  margin: 0;
  padding: 0;
  width: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  opacity: 0.38;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.studio-canvas-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: visible;
}

.studio-canvas-overlay__box {
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  border-radius: 10px;
}

.studio-canvas-overlay__box.is-hover {
  border: 1px dashed rgba(142, 162, 255, 0.85);
}

.studio-canvas-overlay__box.is-field {
  border: 1px solid rgba(27, 0, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.studio-canvas-overlay__box.is-selected {
  border: 1.5px solid #1b00ff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.studio-canvas-overlay__chip {
  position: absolute;
  top: -22px;
  left: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #1b00ff;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.studio-canvas-overlay__box.is-editing {
  box-shadow: 0 0 0 1px #1b00ff;
}

.studio-canvas-overlay__hint {
  position: absolute;
  top: -22px;
  left: auto;
  right: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(7, 8, 15, 0.88);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.studio-canvas-overlay__align {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid #1b00ff;
  border-radius: 999px;
  background: #fff;
  color: #1b00ff;
  font-size: 13px;
  line-height: 1;
  pointer-events: auto;
  cursor: ew-resize;
}

.studio-canvas-overlay__guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.studio-canvas-overlay__guides.is-active {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.studio-canvas-overlay__guides[hidden] {
  display: none !important;
}

.studio-canvas-overlay__guide {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 28px;
  border-right: 1px dashed rgba(27, 0, 255, 0.28);
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-canvas-overlay__guide:last-of-type {
  border-right: 0;
}

.studio-canvas-overlay__guide.is-current {
  background: rgba(27, 0, 255, 0.1);
  color: #fff;
}

.studio-canvas-overlay__guides-note {
  position: absolute;
  left: 50%;
  top: 12px;
  bottom: auto;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(7, 8, 15, 0.86);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  transform: translateX(-50%);
  white-space: nowrap;
}

.portfolio-studio__media {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portfolio-studio__media-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  align-self: flex-start;
  gap: 10px;
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--member-chrome-brand, #1b00ff);
  border-radius: 999px;
  background: var(--member-chrome-brand, #1b00ff);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.portfolio-studio__media-kicker span {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  font-size: 11px;
}

.portfolio-studio__media-search {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--member-chrome-line, #1e2338);
  background: transparent;
  color: inherit;
  font-size: 13px;
}

.portfolio-studio__media-drop {
  position: relative;
  min-height: 88px;
  padding: 16px;
  border: 1px dashed var(--member-chrome-line, #1e2338);
  color: var(--member-chrome-text-2, #9aa3bd);
  font-size: 12px;
  text-align: center;
}

.portfolio-studio__media-drop.is-over {
  border-color: #1b00ff;
  color: inherit;
}

.portfolio-studio__media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.portfolio-studio__media-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--member-chrome-line, #1e2338);
  background: var(--member-chrome-surface-2, #111527);
  padding: 0;
}

.portfolio-studio__media-thumb.is-active {
  border-color: #1b00ff;
  box-shadow: 0 0 0 1px #1b00ff;
}

.portfolio-studio__media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-studio__media-thumb span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.portfolio-studio__media-empty {
  margin: 0;
  font-size: 12px;
  color: var(--member-chrome-text-3, #5f6785);
}

.studio-canvas-skeleton {
  display: flex;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
}

html[data-member-chrome-theme='light'] .portfolio-studio__rail-tip.is-fixed,
html[data-dashboard-theme='light'] .portfolio-studio__rail-tip.is-fixed {
  background: var(--member-chrome-base, #eef1f7);
  color: var(--member-chrome-text, #0b1020);
  box-shadow: 0 6px 16px -6px rgba(11, 16, 32, 0.28);
}

html[data-dashboard-theme='light'] .portfolio-studio__device-btn.is-current,
html[data-theme='light'] .app-dashboard .portfolio-studio__device-btn.is-current,
html[data-member-chrome-theme='light'] .portfolio-studio__device-btn.is-current {
  background: #0b1020;
  color: #fff;
}

/* Immersive studio: a real 100dvh box so settings/canvas can scroll inside it. */
[data-studio-immersive='true'] .portfolio-studio-tab,
[data-studio-immersive='true'] .portfolio-studio,
.app-dashboard[data-studio-immersive='true'] .portfolio-studio-tab,
.app-dashboard[data-studio-immersive='true'] .portfolio-studio {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-studio-immersive='true'] .portfolio-studio__shell,
.app-dashboard[data-studio-immersive='true'] .portfolio-studio__shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  gap: 0;
  align-items: stretch;
  grid-template-columns: none;
  grid-template-rows: none;
}

[data-studio-immersive='true'] .portfolio-studio__rail-strip,
.app-dashboard[data-studio-immersive='true'] .portfolio-studio__rail-strip {
  display: block;
  flex-shrink: 0;
}

[data-studio-immersive='true'] .portfolio-studio__rail,
.app-dashboard[data-studio-immersive='true'] .portfolio-studio__rail {
  display: none !important;
}

[data-studio-immersive='true'] .portfolio-studio__workspace,
.app-dashboard[data-studio-immersive='true'] .portfolio-studio__workspace {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

[data-studio-immersive='true'] .portfolio-studio__stage,
.app-dashboard[data-studio-immersive='true'] .portfolio-studio__stage {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  display: grid;
  align-items: stretch;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.app-dashboard[data-studio-immersive='true'] .portfolio-studio__share-url {
  display: none;
}

@media (min-width: 1280px) {
  .app-dashboard[data-studio-immersive='true'] .portfolio-studio__shell {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    grid-template-rows: none;
  }

  .app-dashboard[data-studio-immersive='true'] .portfolio-studio__preview,
  .app-dashboard[data-studio-immersive='true'] .portfolio-studio__rail {
    position: static;
    align-self: stretch;
    top: auto;
  }
}

.app-dashboard[data-studio-immersive='true'] .portfolio-studio__topbar {
  padding: 10px 18px 8px 14px;
  flex-shrink: 0;
}

.portfolio-studio__topbar .studio-inspector__status {
  margin: 0;
}

.app-dashboard[data-studio-immersive='true'] .portfolio-studio__preview {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.app-dashboard[data-studio-immersive='true'] .portfolio-studio__preview-frame {
  border: 0;
  border-radius: 0 !important;
  box-shadow: none;
  max-width: none;
  flex: 1 1 0%;
  width: 100% !important;
  height: 100%;
  min-height: 0;
}

.app-dashboard[data-studio-immersive='true'] .portfolio-studio__preview[data-device='desktop'] {
  display: flex;
  flex-direction: column;
}

.app-dashboard[data-studio-immersive='true'] .portfolio-studio__preview[data-device='desktop'] .portfolio-studio__preview-frame {
  flex: 1 1 auto;
  width: 100% !important;
  height: 100%;
  min-height: 0;
}

.app-dashboard[data-studio-immersive='true'] .portfolio-studio__preview[data-device='desktop'] .portfolio-studio__preview-viewport,
.app-dashboard[data-studio-immersive='true'] .portfolio-studio__preview-viewport {
  height: 100% !important;
  min-height: 0;
  overflow: auto;
}

.app-dashboard[data-studio-immersive='true'] .portfolio-studio__preview > p {
  display: none;
}

.app-dashboard[data-studio-immersive='true'] .portfolio-studio__fullview,
.portfolio-studio__shell[data-workspace='fullView'] .portfolio-studio__fullview {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
}

.portfolio-studio__leave-overlay {
  position: fixed;
  inset: 0;
  z-index: 100100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.portfolio-studio__leave-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid #1e2338;
  border-radius: 16px;
  background: #07080f;
  color: #eef1fb;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.portfolio-studio__leave-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.portfolio-studio__leave-card p {
  margin: 0 0 20px;
  color: #9aa3bd;
  font-size: 14px;
  line-height: 1.5;
}

.portfolio-studio__leave-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.portfolio-studio__leave-stay,
.portfolio-studio__leave-anyway,
.portfolio-studio__leave-save {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.portfolio-studio__leave-stay {
  background: #1e2338;
  color: #eef1fb;
}

.portfolio-studio__leave-anyway {
  background: transparent;
  color: #eef1fb;
  border: 1px solid #1e2338;
}

.portfolio-studio__leave-save {
  background: #1b00ff;
  color: #fff;
}

html[data-dashboard-theme='light'] .portfolio-studio__leave-card,
html[data-member-chrome-theme='light'] .portfolio-studio__leave-card {
  background: #fff;
  border-color: #d8e0ef;
  color: #0b1020;
}

html[data-dashboard-theme='light'] .portfolio-studio__leave-card p,
html[data-member-chrome-theme='light'] .portfolio-studio__leave-card p {
  color: #3f4860;
}

html[data-dashboard-theme='light'] .portfolio-studio__leave-stay,
html[data-member-chrome-theme='light'] .portfolio-studio__leave-stay {
  background: #e4e9f4;
  color: #0b1020;
}

html[data-dashboard-theme='light'] .portfolio-studio__leave-anyway,
html[data-member-chrome-theme='light'] .portfolio-studio__leave-anyway {
  border-color: #c5cde0;
  color: #0b1020;
}
