/* The attribute is present only on the nine standalone customer pages. */
html[data-studio-page] {
  --studio-ground: #101012;
  --studio-surface: #1b1b1d;
  --studio-inset: #151517;
  --studio-raised: #252426;
  --studio-ink: #f3eee6;
  --studio-secondary: #d3cec8;
  --studio-muted: #b9b4ad;
  --studio-rule: #3e3b3c;
  --studio-accent: #ddc6a0;
  --studio-on-accent: #2b2114;
  --studio-wash: #35302a;
  --studio-active-rule: #ac916d;
  --studio-amber: #e0bfa2;
  --studio-issue: #ffaaa0;
  --studio-shadow: #09080924;
  --studio-display: "STIX Two Text", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, Georgia, serif;
  --studio-ui: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --studio-mono: "IBM Plex Mono", Consolas, "Microsoft YaHei", monospace;
}
/* Late site-wide injections set !important custom properties on both html and body. */
html[data-studio-page][data-studio-appearance],
html[data-studio-page][data-studio-appearance] body {
  --v2-ground: var(--studio-ground); --v2-panel: var(--studio-surface); --v2-raised: var(--studio-raised);
  --v2-field: var(--studio-inset); --v2-rule: var(--studio-rule); --v2-text: var(--studio-ink);
  --v2-muted: var(--studio-muted); --v2-action: var(--studio-accent); --v2-action-text: var(--studio-on-accent);
  --bg: var(--studio-ground) !important; --bg-2: var(--studio-inset) !important;
  --card: var(--studio-surface) !important; --panel: var(--studio-surface) !important; --surface: var(--studio-surface) !important;
  --panel2: var(--studio-raised); --panel-2: var(--studio-raised) !important; --surface-2: var(--studio-raised) !important;
  --ink: var(--studio-ink) !important; --text: var(--studio-ink) !important; --txt: var(--studio-ink) !important;
  --ink2: var(--studio-secondary); --ink3: var(--studio-muted); --sub: var(--studio-muted) !important;
  --muted: var(--studio-muted) !important; --text-muted: var(--studio-muted) !important; --text-secondary: var(--studio-muted) !important;
  --line: var(--studio-rule) !important; --border: var(--studio-rule) !important; --border-subtle: var(--studio-rule) !important;
  --brand: var(--studio-accent) !important; --brand-2: var(--studio-accent) !important;
  --pink: var(--studio-accent) !important; --pink-2: var(--studio-accent) !important; --primary: var(--studio-accent) !important;
  --accent: var(--studio-accent) !important; --brand-soft: var(--studio-wash) !important; --accent-soft: var(--studio-wash) !important;
  --lime: var(--studio-accent); --violet: var(--studio-accent); --violet-wash: var(--studio-wash);
  --accent-wash: var(--studio-wash); --accent-line: var(--studio-active-rule); --gold: var(--studio-amber);
  --ok: #a0d1ad !important; --warn: var(--studio-amber) !important; --err: var(--studio-issue) !important;
  color-scheme: dark; background: var(--studio-ground) !important; color: var(--studio-ink) !important;
}
html[data-studio-page] body { font-family: var(--studio-ui); }
html[data-studio-page] body::before,
html[data-studio-page] :is(#lm-stars,#lm-aura,.lm-ripple,#lm-progress) { display: none !important; }
html[data-studio-page] .lm-char { font: inherit; color: inherit !important; text-shadow: none !important; transform: none !important; animation: none !important; }
html[data-studio-page] :is(.wrap, main, article, section, .card, .intro, .kpi) { min-width: 0; }
html[data-studio-page] :is(h1,h2,h3,h4) { color: var(--studio-ink) !important; text-shadow: none; }
html[data-studio-page] h1 { font-family: var(--studio-display); font-weight: 700; letter-spacing: .005em; line-height: 1.22; }
html[data-studio-page] body :is(.v2-page-chrome,.wrap > header,.wrap > .top,body > header,.invoice-top) {
  gap: 10px 16px; border-color: var(--studio-rule); background: var(--studio-ground); color: var(--studio-ink);
}
html[data-studio-page] :is(.v2-page-chrome strong,.top .brand,.wrap header .brand,.invoice-top span) {
  color: var(--studio-ink); font-weight: 750; letter-spacing: .045em;
}
html[data-studio-page] :is(.v2-page-chrome,.invoice-top) > a,
html[data-studio-page] body > header > a { color: var(--studio-accent); text-underline-offset: 3px; }
html[data-studio-page] body :is(input,textarea)::placeholder { color: var(--studio-muted) !important; opacity: 1; }
html[data-studio-page] body :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),textarea,select) {
  background: var(--studio-inset) !important; border-color: var(--studio-rule) !important; color: var(--studio-ink) !important;
}
html[data-studio-page] body :is(input,select,textarea,button,a,summary,[tabindex]):focus-visible {
  outline: 2px solid var(--studio-accent) !important; outline-offset: 3px; scroll-margin-block: 4rem;
}
html[data-studio-page] body :is(input,select,textarea):focus-visible { border-color: var(--studio-active-rule) !important; box-shadow: none !important; }
html[data-studio-page] body :is(.btn,button,.chip,.tag) { animation: none !important; text-shadow: none !important; box-shadow: none !important; }
html[data-studio-page] :is(.tag,.chip) { border-radius: 6px !important; }
html[data-studio-page] body :is(.btn.primary,.btn.brand,.invoice-primary,#pubBtn,#publishBtn,#pubSubmit,#saveProfile,#upload,#gen-open,#gen-submit,.cta .btn:not(.ghost)) {
  border: 1px solid var(--studio-accent) !important; background: var(--studio-accent) !important;
  color: var(--studio-on-accent) !important; font-weight: 700; transform: none !important;
}
html[data-studio-page] body :is(.btn.primary,.btn.brand,.invoice-primary,#pubBtn,#publishBtn,#pubSubmit,#saveProfile,#upload,#gen-open,#gen-submit):hover:enabled { filter: brightness(1.08); }
html[data-studio-page] body :is(.tab,.chip,.btn,.tag,.top-nav a,.v2-section-nav a,.v2-team-nav a,.v2-doc-links a) { text-decoration: none; }
html[data-studio-page] body :is(.tab.on,.chip.on,.v2-withdraw-link,.v2-team-create,[aria-current="location"],[data-tab].active) {
  background: var(--studio-wash) !important; color: var(--studio-accent) !important; border-color: var(--studio-active-rule) !important;
}
html[data-studio-page] :is(.v2-section-nav,.v2-team-nav,.v2-doc-links) a { color: var(--studio-secondary); font-weight: 550; }
html[data-studio-page] :is(.v2-section-nav,.v2-team-nav,.v2-doc-links) a:hover { color: var(--studio-accent) !important; background: var(--studio-wash); }
html[data-studio-page] body :is(th,td) { border-color: var(--studio-rule) !important; }
html[data-studio-page] body tbody td { color: var(--studio-secondary) !important; }
html[data-studio-page] body thead th { background: var(--studio-raised) !important; color: var(--studio-secondary) !important; }
html[data-studio-page] body tbody tr:hover { background: var(--studio-inset) !important; }
html[data-studio-page] body :is(.hint,.tip,.kpi-label,label,small) { color: var(--studio-muted) !important; }
html[data-studio-page] :is(.grid > .card,#list > .card)::after { content: none !important; }
html[data-studio-page] body ::selection { background: var(--studio-accent) !important; color: var(--studio-on-accent) !important; }
html[data-studio-page] body .brand .dot,
html[data-studio-page] .wrap .brand i { background: var(--studio-wash); color: var(--studio-accent); box-shadow: none; }

/* Script dossiers and editor: a slate on the cover, then a navigation rail and manuscript. */
html[data-studio-page="script"] .top { background: var(--studio-inset); border-color: var(--studio-rule); }
html[data-studio-page="script"] .top .brand-label { color: var(--studio-accent); }
html[data-studio-page="script"] .wrap { max-width: 1560px; }
html[data-studio-page="script"] .page-head.list-heading {
  gap: 12px 22px; align-items: end; margin-bottom: 23px; padding: clamp(18px,3.3vw,44px) 0 clamp(16px,2vw,30px);
  border-bottom: 1px solid var(--studio-rule);
}
html[data-studio-page="script"] .list-heading h1 { font-size: clamp(32px,4vw,57px); }
html[data-studio-page="script"] :is(.page-head p,.logline) { max-width: 55em; }
html[data-studio-page="script"] #scriptGrid { grid-template-columns: repeat(auto-fill,minmax(min(100%,298px),1fr)); gap: clamp(12px,1.4vw,20px); }
html[data-studio-page="script"] #scriptGrid .card {
  padding: 20px 21px 20px 26px; border-left: 4px solid var(--studio-active-rule);
  border-radius: 5px 12px 12px 5px; background: var(--studio-surface);
}
html[data-studio-page="script"] #scriptGrid .card:hover { border-color: var(--studio-active-rule); background: var(--studio-raised); }
html[data-studio-page="script"] #scriptGrid .card h3 { font: 700 1.35rem/1.5 var(--studio-display); }
html[data-studio-page="script"] .card .foot { border-top: 1px solid var(--studio-rule); padding-top: 12px; }
html[data-studio-page="script"] .bar { background: var(--studio-rule); }
html[data-studio-page="script"] #emptyBox {
  background: var(--studio-surface); border: 1px solid var(--studio-rule); border-radius: 12px; padding: clamp(36px,6.5vw,80px) 18px;
}
html[data-studio-page="script"] .slate-mark {
  width: 60px; height: 44px; margin: 0 auto 18px; position: relative; border: 2px solid var(--studio-active-rule);
  border-radius: 4px; background: linear-gradient(var(--studio-active-rule),var(--studio-active-rule)) 9px 22px/24px 2px no-repeat, var(--studio-inset);
}
html[data-studio-page="script"] .slate-mark::before {
  content: ""; position: absolute; height: 9px; inset: 0 -2px auto;
  border-radius: 2px; background: repeating-linear-gradient(125deg,var(--studio-active-rule) 0 8px,var(--studio-ground) 8px 13px);
  transform: rotate(-8deg); transform-origin: left bottom;
}
html[data-studio-page="script"] .editor-heading h1 { min-width: 0; font-size: clamp(25px,3vw,43px); }
html[data-studio-page="script"] .editor { gap: clamp(10px,1.2vw,18px); }
html[data-studio-page="script"] :is(.side,.editor-context,.main-panel) { border-radius: 10px; }
html[data-studio-page="script"] :is(.side,.editor-context) { background: var(--studio-inset); }
html[data-studio-page="script"] .side h4 { font-size: .75rem; letter-spacing: .1em; }
html[data-studio-page="script"] .main-panel { border-top: 3px solid var(--studio-active-rule); }
html[data-studio-page="script"] .main-panel h2 { font-family: var(--studio-display); }
html[data-studio-page="script"] .reading-toggle { white-space: nowrap; margin-inline-start: auto; }
html[data-studio-page="script"] .reading-toggle[aria-pressed="true"] { background: var(--studio-wash); border-color: var(--studio-accent); color: var(--studio-accent); }
html[data-studio-page="script"] #editorView.reading .editor { grid-template-columns: minmax(0,1fr); max-width: 970px; margin-inline: auto; }
html[data-studio-page="script"] #editorView.reading :is(.side,.editor-context) { display: none; }
html[data-studio-page="script"] :is(.top-nav a.on,.tag.lime,.side button.on,.ep-item .no) { color: var(--studio-accent); }
html[data-studio-page="script"] .side button.on { border-left: 3px solid var(--studio-accent); }
html[data-studio-page="script"] .main-panel .text-body {
  padding: 1.35em clamp(16px,3vw,38px); color: var(--studio-ink); background: var(--studio-inset);
  border-left: 3px solid var(--studio-amber); border-radius: 3px 10px 10px 3px; font: 1.08rem/2.1 var(--studio-display);
}
html[data-studio-page="script"] .ep-item[aria-current="true"] { background: var(--studio-wash); }
html[data-studio-page="script"] :is(.mode-pick button,.tpl-card) { text-align: left; color: var(--studio-ink); }
html[data-studio-page="script"] :is(.mode-pick button,.tpl-card)[aria-pressed="true"] { background: var(--studio-wash); box-shadow: inset 3px 0 var(--studio-accent) !important; }
html[data-studio-page="script"] :is(.btn:not(.primary):hover,.dropzone:hover,.dropzone.drag) { background: var(--studio-raised); }
html[data-studio-page="script"] .dropzone { border-color: var(--studio-active-rule); }
html[data-studio-page="script"] .shot-wrap { border-radius: 6px; max-height: min(48vh,480px); }
html[data-studio-page="script"] #shotTable td.k { font: 700 .85rem/1.5 var(--studio-mono); color: var(--studio-accent) !important; }
html[data-studio-page="script"] #shotTable .shot-segment { background: var(--studio-wash); color: var(--studio-accent) !important; font-weight: 700; }
html[data-studio-page="script"] #shotTable .shot-transition { background: var(--studio-inset); color: var(--studio-muted) !important; }
html[data-studio-page="script"] #shotTable .shot-dialogue { color: var(--studio-accent); }
html[data-studio-page="script"] :is(.img-thumb .del,.vm-thumb button) { color: white; }

/* The market and library keep their original cards and cover data. */
html:is(.v2-market,.v2-skills) .wrap { max-width: 1360px; }
html:is(.v2-market,.v2-skills) .wrap > .top { padding-block: 10px 20px; }
html:is(.v2-market,.v2-skills) .wrap > .top > div:last-child { align-items: center; flex-wrap: wrap; min-width: 0; }
html:is(.v2-market,.v2-skills) #list .title { font-family: var(--studio-display); font-size: 1.22rem !important; }
html:is(.v2-market,.v2-skills) .tabs { border-radius: 9px; width: fit-content; max-width: 100%; }
html:is(.v2-market,.v2-skills) .card .cat { background: var(--studio-wash); color: var(--studio-accent); }
html:is(.v2-market,.v2-skills) .empty {
  padding: clamp(32px,5vw,66px) 16px; border: 1px dashed var(--studio-rule); border-radius: 10px; background: var(--studio-surface);
}
html:is(.v2-market,.v2-skills) .note { border-left: 3px solid var(--studio-amber); line-height: 1.85; }
html:is(.v2-market,.v2-skills) :is(.err,[style*="color:#b3261e"]) { color: var(--studio-issue) !important; }
html:is(.v2-market,.v2-skills) .modal [style*="background:#fff4f4"] { background: var(--studio-inset) !important; border-color: var(--studio-issue) !important; }
html:is(.v2-market,.v2-skills) .modal :is([style*="color:#7c6b75"],[style*="color:#9b8a93"]) { color: var(--studio-muted) !important; }
html.v2-skills .modal #dropZone { background: var(--studio-inset) !important; border-color: var(--studio-active-rule) !important; }
html.v2-skills #dropZone :is(b,#upProgress) { color: var(--studio-accent) !important; }
html.v2-market #list article.card { border-left: 3px solid var(--studio-active-rule) !important; }
html.v2-market .status { background: var(--studio-wash); color: var(--studio-accent); }
html.v2-market .status.s-draft { background: var(--studio-inset); color: var(--studio-amber); }
html:is(.v2-market,.v2-skills) .mask .modal { border: 1px solid var(--studio-rule); background: var(--studio-surface) !important; }

/* Account and membership pages. */
html:is(.v2-team,.v2-agent) .wrap h1 { font-size: clamp(30px,3.6vw,48px); }
html:is(.v2-team,.v2-agent) .sec-head { border-color: var(--studio-rule) !important; }
html:is(.v2-team,.v2-agent) .sec-head h2 { font-size: 1.15rem; }
html:is(.v2-team,.v2-agent) :is(.kpi,.intro-item) { border-top: 2px solid var(--studio-active-rule) !important; }
html.v2-team .v2-team-nav { border-top: 3px solid var(--studio-active-rule); }
html.v2-team #main .card { border-radius: 9px !important; }
html.v2-team .intro-item b { color: var(--studio-ink); }
html.v2-team body #gate:not([hidden]) { background: var(--studio-surface) !important; color: var(--studio-ink); }
html.v2-team :is(.sec-head,[id="wlStatus"]) [style*="color:#b3164f"] { color: var(--studio-amber) !important; }
html.v2-agent .invite { background: var(--studio-surface); border-left: 3px solid var(--studio-active-rule); }
html.v2-agent .kpi .v { font-family: var(--studio-mono); }
html.v2-agent .tag.ok { color: var(--studio-accent) !important; border-color: var(--studio-active-rule); background: var(--studio-wash); }
html.v2-agent .tag.wait { color: var(--studio-amber) !important; border-color: var(--studio-rule); background: var(--studio-inset); }
html.v2-agent .gate-card { max-width: calc(100% - 28px); }
html.v2-benefits .hero { padding-block: clamp(8px,2vw,24px) clamp(18px,2.5vw,32px); }
html.v2-benefits .hero h1 { margin: 10px 0; }
html.v2-benefits .hero h1 em { animation: none !important; background: none; color: var(--studio-accent) !important; }
html.v2-benefits .hero .kicker, html.v2-benefits :is(.price s,footer) { color: var(--studio-muted); }
html.v2-benefits .card.member { border-top: 3px solid var(--studio-accent) !important; border-color: var(--studio-active-rule) var(--studio-rule) var(--studio-rule) !important; }
html.v2-benefits .card.agent { border-top: 3px solid var(--studio-amber) !important; }
html.v2-benefits .price { flex-wrap: wrap; }
html.v2-benefits .price b { font-variant-numeric: tabular-nums; }
html.v2-benefits :is(.teamItem b,ul.benefits li b) { color: var(--studio-ink); }
html.v2-benefits ul.benefits li { display: block; position: relative; padding-inline-start: 14px; color: var(--studio-secondary); }
html.v2-benefits ul.benefits li::before { position: absolute; top: .22em; left: 0; width: 4px; height: 4px; margin-top: .4em; box-shadow: none; }
html.v2-benefits [style*="color:#d8dde4"] { color: var(--studio-secondary) !important; }
html.v2-benefits .faq details[open] { border-color: var(--studio-active-rule); }
html.v2-benefits .faq summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
html.v2-benefits .faq summary::after { content: "+"; color: var(--studio-accent); font: 1.05rem var(--studio-mono); }
html.v2-benefits .faq details[open] summary::after { content: "−"; }

/* Reference material, service states and order details. */
html.v2-docs .v2-doc-layout { max-width: 1230px; grid-template-columns: 188px minmax(0,820px); justify-content: center; }
html.v2-docs .v2-doc-links { border-top: 3px solid var(--studio-active-rule); }
html.v2-docs .v2-doc-content { padding-block: 4px 26px; }
html.v2-docs .v2-doc-content > h1 { margin-block: 0 .35em; }
html.v2-docs .v2-doc-content :is(a,code) { color: var(--studio-accent); }
html.v2-docs .v2-doc-content :not(pre) > code { background: var(--studio-wash); font-family: var(--studio-mono); overflow-wrap: anywhere; }
html.v2-docs .v2-doc-content h2 { padding-block: 11px; }
html.v2-docs .v2-doc-content table, html.v2-docs .v2-doc-content pre { background: var(--studio-surface); border-color: var(--studio-rule); }
html:is(.v2-invoices,.v2-replica) #featureStatus {
  box-sizing: border-box; margin: clamp(14px,4vw,50px) 0; padding: clamp(24px,5vw,66px);
  border: 1px solid var(--studio-rule); border-top: 3px solid var(--studio-active-rule);
  border-radius: 10px; background: var(--studio-surface);
}
html:is(.v2-invoices,.v2-replica) #featureStatus h1 { margin: 0 0 12px; line-height: 1.25; }
html:is(.v2-invoices,.v2-replica) #featureStatus [role=status] { color: var(--studio-muted); margin: 0 0 18px; }
html:is(.v2-invoices,.v2-replica) #featureStatus a { color: var(--studio-accent); font-weight: 650; text-decoration: underline; text-underline-offset: .25em; }
html.v2-invoices :is(.invoice-order,.invoice-total,.invoice-section-head,.invoice-record,.invoice-dialog dt) { background: var(--studio-surface); color: var(--studio-secondary); }
html.v2-invoices .invoice-order:has(input:checked), html.v2-invoices .invoice-card h2 b { background: var(--studio-wash); color: var(--studio-accent); border-color: var(--studio-active-rule); }
html.v2-invoices .invoice-card h2 b { font-family: var(--studio-mono); }
html.v2-replica :is(.upload,.composer,#shots > *) { background: var(--studio-inset); border-color: var(--studio-rule); }
html.v2-replica .panel { border-top: 3px solid var(--studio-active-rule) !important; }
html.v2-replica .upload:focus-within { outline: 2px solid var(--studio-accent); }
html[data-studio-page] :target { scroll-margin-block-start: 4.8rem; }

@media (max-width: 760px) {
  html.v2-docs .v2-doc-layout { grid-template-columns: minmax(0,1fr); }
  html.v2-docs .v2-doc-links, html.v2-team .v2-team-nav { padding: 7px; }
  html.v2-docs .v2-doc-links > strong { grid-column: 1 / -1; padding-block: 3px; }
  html.v2-benefits .v2-section-nav { gap: 5px; }
  html.v2-benefits .v2-section-nav a { padding-inline: 9px; }
  html.v2-benefits .card { overflow-x: auto; }
  html.v2-agent .form-actions { flex-wrap: wrap; }
  html[data-studio-page="script"] .editor-context { padding: 14px; }
}
@media (max-width: 580px) {
  html[data-studio-page="script"] .list-heading .sp { margin-left: 0; }
  html[data-studio-page="script"] .main-panel .text-body { max-height: none; }
  html[data-studio-page="script"] .editor-heading { flex-wrap: wrap; }
  html[data-studio-page="script"] .editor-heading > div:first-child { flex-basis: auto; }
  html:is(.v2-market,.v2-skills) .wrap > .top { gap: 12px; }
  html:is(.v2-market,.v2-skills) :is(.tabs,#skillTab) { gap: 4px; }
  html.v2-market .tabs .tab { padding-inline: 10px !important; }
  html.v2-team .wrap { row-gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-studio-page] *,html[data-studio-page] *::before,html[data-studio-page] *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
