/* CRTVLY portal — clean white workspace with focused brand accents. */
:root {
  /* Brand Guidelines v2: Black #030408, Cream #FCF5E5, Orange #FF5A26,
     Sky Blue #C8E3ED, Olive #CAC550 */
  --studio-black: #030408;
  --studio-ink: #030408;
  --studio-cream: #ffffff;
  --studio-paper: #ffffff;
  --studio-orange: #ff5a26;
  --studio-blue: #c8e3ed;
  --studio-acid: #cac550;
}

/* Clean professional light presentation */
:root[data-theme="light"] body,
.auth-unified { background: #fff; }
:root[data-theme="light"] .app-shell { background: #fff; }
:root[data-theme="light"] .app-shell .topbar {
  background: rgba(255,255,255,.94);
  border-color: #e7e7e2;
  backdrop-filter: blur(16px);
}
/* Layout (sizes, spacing, radius) is shared by both themes so switching never resizes anything; light-only rules are colors. */
:root .main { padding-top: 58px; }
:root .dashboard-hero {
  min-height: 380px;
  margin-bottom: 38px;
}
:root .dashboard-hero h1 {
  max-width: 680px;
  font-size: clamp(58px, 6vw, 84px);
  letter-spacing: -.055em;
}
:root[data-theme="light"] .dashboard-hero p { max-width: 500px; color: #595956; }
:root[data-theme="light"] .dashboard-hero .hero-note {
  background: #f7f7f4;
  border-color: #e1e1dc;
}
:root .creative-contact-sheet { height: 338px; }
:root .frame-main {
  inset: 0 38px 30px 0;
  transform: none;
  border-radius: 16px;
}
:root .frame-small {
  width: 38%;
  height: 38%;
  transform: none;
  border-radius: 12px;
}
:root[data-theme="light"] .contact-frame {
  border-color: #deded8;
  box-shadow: 0 18px 48px rgba(3,4,8,.12);
}
:root .dashboard-grid { gap: 18px; }
:root[data-theme="light"] .dashboard-grid .panel,
:root[data-theme="light"] .form-card,
:root[data-theme="light"] .account-stat {
  border-color: #e2e2dd;
  box-shadow: 0 10px 35px rgba(3,4,8,.06);
}
:root .dashboard-grid .panel,
:root .form-card,
:root .account-stat { border-radius: 18px; }
:root[data-theme="light"] .requests-panel { background: #fff; }
:root[data-theme="light"] .requests-panel .request-row {
  background: #fafaf8;
  border-color: #e8e8e3;
}
:root .requests-panel .request-row { border-radius: 12px; }
:root[data-theme="light"] .status-strip div { background: #fff; border-color: #e5e5e0; }
:root[data-theme="light"] .quick-card {
  border-color: transparent;
  background: var(--studio-orange);
  box-shadow: none;
}
:root .how-it-works { margin-top: 68px; }
:root .process-step { padding-top: 24px; }
:root[data-theme="light"] .form-card { background: #fff; }
:root[data-theme="light"] .option,
:root[data-theme="light"] .style-option,
:root[data-theme="light"] .deliverable,
:root[data-theme="light"] .brand-toggle {
  border-color: #deded9;
}
:root .option,
:root .style-option,
:root .deliverable,
:root .brand-toggle { border-radius: 12px; }
:root[data-theme="light"] .option:hover,
:root[data-theme="light"] .style-option:hover,
:root[data-theme="light"] .deliverable:hover { border-color: #a8a8a0; }

.auth-unified { color: #030408; }
.auth-header,
.auth-footer { border-color: #e5e5df; }
.auth-main { width: min(1120px, calc(100% - 64px)); gap: clamp(58px, 8vw, 112px); }
.auth-welcome h1 { font-size: clamp(56px, 5.7vw, 82px); }
.auth-welcome p { color: #5e5e5a; }
.auth-capabilities { border-color: var(--studio-orange); }
.auth-capabilities span::before { background: var(--studio-orange); }
.auth-login-card {
  background: #fff;
  border-color: #deded8;
  border-radius: 16px;
  box-shadow: 0 16px 45px rgba(3,4,8,.07);
}
.auth-login-card .input { background: #fafaf8; border-color: #deded8; }
.auth-login-card .btn-primary { background: #030408; color: #fff; box-shadow: none; }
.auth-login-card .btn-primary:hover { background: #ff5a26; color: #030408; }

@media (max-width: 800px) {
  :root .creative-contact-sheet { height: 300px; }
}

.ui-icon { display: block; flex: 0 0 auto; }

/* Every surface owns its foreground color. This prevents the dark shell from
   leaking light text into cream/white cards as routes and components change. */
.app-shell .panel,
.app-shell .form-card,
.app-shell .account-stat,
.app-shell .brand-profile-preview,
.app-shell .summary-section,
.app-shell .custom-deliverables,
.app-shell .style-help,
.app-shell .success-card {
  color: var(--studio-ink);
}
.app-shell .panel h1,
.app-shell .panel h2,
.app-shell .panel h3,
.app-shell .form-card h1,
.app-shell .form-card h2,
.app-shell .form-card h3,
.app-shell .account-stat h1,
.app-shell .account-stat h2,
.app-shell .account-stat h3 { color: var(--studio-ink); }
.app-shell .form-card .serif,
.app-shell .panel .serif { color: var(--studio-orange); }

.app-shell {
  background: var(--studio-black);
  color: var(--studio-cream);
}

.app-shell .topbar {
  height: 84px;
  background: rgba(3, 4, 8, .86);
  border-color: rgba(252, 245, 229, .15);
}

.app-shell .brand img { filter: invert(1) brightness(2.3); }
.app-shell .portal-name,
.app-shell .help-link { color: rgba(252, 245, 229, .58); }
.app-shell .portal-name { border-color: rgba(252, 245, 229, .18); }
.app-shell .portal-dot { background: var(--studio-orange); }
.app-shell .nav-link { color: var(--studio-cream); }
.app-shell .nav-link:hover,
.app-shell .help-link:hover { color: var(--studio-orange); }
.app-shell .avatar { background: var(--studio-blue); color: var(--studio-black); }

.dashboard-main { padding-top: 54px; }
.dashboard-hero {
  min-height: 430px;
  align-items: center;
  gap: clamp(42px, 7vw, 100px);
  margin-bottom: 46px;
}
.hero-copy { flex: 1 1 48%; }
.dashboard-hero .eyebrow { color: var(--studio-orange); }
.dashboard-hero h1 { color: var(--studio-cream); font-size: clamp(60px, 6.7vw, 94px); }
.dashboard-hero .serif { color: var(--studio-orange); }
.dashboard-hero p { color: rgba(252, 245, 229, .65); font-size: 16px; }
.dashboard-hero .hero-note {
  width: max-content;
  min-width: 0;
  margin-top: 34px;
  padding: 13px 18px;
  gap: 12px;
  border: 1px solid rgba(252, 245, 229, .17);
  border-radius: 999px;
  color: var(--studio-acid);
}
.dashboard-hero .hero-note strong { color: var(--studio-cream); font-size: 18px; }
.dashboard-hero .hero-note span { color: rgba(252, 245, 229, .52); }

.creative-contact-sheet {
  position: relative;
  flex: 0 1 540px;
  height: 370px;
  isolation: isolate;
}
.contact-frame {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(252, 245, 229, .2);
  background: #222;
  box-shadow: 0 28px 70px rgba(0,0,0,.45);
}
.contact-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.contact-frame figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(3,4,8,.86);
  color: var(--studio-cream);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.frame-main { inset: 0 46px 48px 0; transform: rotate(-2deg); }
.frame-small { width: 42%; height: 42%; right: 0; bottom: 0; transform: rotate(4deg); z-index: 2; }

.dashboard-grid { grid-template-columns: minmax(0, 1.75fr) minmax(290px, .75fr); }
.dashboard-grid .panel { border-color: rgba(20,20,16,.16); box-shadow: 0 24px 65px rgba(0,0,0,.28); }
.requests-panel { background: var(--studio-paper); color: var(--studio-ink); }
.requests-panel .eyebrow { color: #c83e1c; }
.requests-panel .request-row { background: rgba(255,255,255,.5); }
.request-icon { overflow: hidden; background: #e9e2d3 !important; color: var(--studio-ink) !important; }
.request-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.request-icon .ui-icon { margin: auto; }
.request-row:hover { border-color: var(--studio-orange); }

.quick-card {
  background: var(--studio-orange);
  color: var(--studio-black);
}
.quick-card::after {
  content: "";
  inset: auto -20px -60px auto;
  width: 220px; height: 220px;
  border: 38px solid rgba(3,4,8,.08);
  border-radius: 50%;
}
.quick-card p { color: rgba(3,4,8,.86); }
.quick-badge { border-color: rgba(3,4,8,.3); }
.quick-spark { color: var(--studio-black); }
.quick-card .btn-light { background: var(--studio-black); color: var(--studio-cream); }
.quick-card .btn-light:hover { background: var(--studio-cream); color: var(--studio-black); }
.quick-card .btn span { display: inline-block; vertical-align: middle; }

.how-it-works { color: var(--studio-cream); margin-top: 78px; padding-bottom: 10px; }
.how-it-works .eyebrow,
.process-step span { color: var(--studio-orange); }
.process-grid { border-color: rgba(252,245,229,.17); }
.process-step { border-color: rgba(252,245,229,.17); }
.process-step p { color: rgba(252,245,229,.56); }

/* Dark request rail */
.app-shell .stepper { color: var(--studio-cream); }
.app-shell .stepper .eyebrow { color: var(--studio-orange); }
.app-shell .stepper .step,
.app-shell .stepper .step.active,
.app-shell .stepper .step.done { color: rgba(252,245,229,.72); }
.app-shell .stepper .step.active,
.app-shell .stepper .step.done { color: var(--studio-cream); }
.app-shell .stepper .step-num { border-color: rgba(252,245,229,.3); color: var(--studio-cream); }
.app-shell .stepper .step.active .step-num { background: var(--studio-orange); border-color: var(--studio-orange); color: var(--studio-black); }
.app-shell .stepper .step.done .step-num { background: var(--studio-acid); border-color: var(--studio-acid); color: var(--studio-black); }
.app-shell .stepper .progress { background: rgba(252,245,229,.18); }
.app-shell .stepper .progress span { background: var(--studio-orange); }
.app-shell .stepper-intro p,
.app-shell .stepper-footer { color: rgba(252,245,229,.6); }
.app-shell .stepper-footer { border-color: rgba(252,245,229,.18); }
.app-shell .stepper .queue-card {
  background: rgba(252,245,229,.07);
  border-color: rgba(252,245,229,.18);
  color: var(--studio-cream);
  box-shadow: none;
}
.app-shell .stepper .queue-card p { color: rgba(252,245,229,.58); }
.app-shell .stepper .queue-label { color: var(--studio-orange); }
.app-shell .stepper .capacity-dots i { background: rgba(252,245,229,.18); }
.app-shell .stepper .capacity-dots i.filled { background: var(--studio-orange); }

/* White and cream form controls always use dark readable text. */
.app-shell .input,
.app-shell .textarea,
.app-shell .option,
.app-shell .style-option,
.app-shell .deliverable,
.app-shell .upload-drop,
.app-shell .brand-toggle { color: var(--studio-ink); }
.app-shell .input::placeholder,
.app-shell .textarea::placeholder { color: #77746d; opacity: 1; }
.app-shell .trello-board,
.app-shell .account-stat.featured { color: #fff; }
.app-shell .trello-board h1,
.app-shell .trello-board h2,
.app-shell .trello-board h3,
.app-shell .account-stat.featured h1,
.app-shell .account-stat.featured h2,
.app-shell .account-stat.featured h3 { color: #fff; }

@media (max-width: 980px) {
  .dashboard-hero { min-height: 0; align-items: start; }
  .creative-contact-sheet { flex-basis: 410px; height: 315px; }
}

@media (max-width: 800px) {
  .dashboard-hero { display: grid; }
  .creative-contact-sheet { width: 100%; height: 330px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .dashboard-hero h1 { font-size: 58px; }
  .creative-contact-sheet { height: 260px; }
  .frame-main { right: 28px; bottom: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-frame { transform: none; }
}

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(252,245,229,.22);
  border-radius: 50%;
  background: transparent;
  color: var(--studio-cream);
  transition: border-color .2s, color .2s;
}
.theme-toggle:hover { border-color: var(--studio-orange); color: var(--studio-orange); }
.theme-toggle:focus-visible { outline: 2px solid var(--studio-orange); outline-offset: 2px; }

/* Light mode: white shell and crisp work surfaces. Overrides the dark shell above. */
:root[data-theme="light"] .app-shell { background: var(--studio-cream); color: var(--studio-ink); }
:root[data-theme="light"] .app-shell .topbar { background: rgba(255,255,255,.94); border-color: #e7e7e2; }
:root[data-theme="light"] .app-shell .brand img { filter: none; }
:root[data-theme="light"] .app-shell .portal-name,
:root[data-theme="light"] .app-shell .help-link { color: rgba(3,4,8,.6); }
:root[data-theme="light"] .app-shell .portal-name { border-color: rgba(3,4,8,.16); }
:root[data-theme="light"] .app-shell .nav-link { color: var(--studio-ink); }
:root[data-theme="light"] .app-shell .nav-link:hover,
:root[data-theme="light"] .app-shell .help-link:hover { color: #c93c10; }
:root[data-theme="light"] .theme-toggle { border-color: rgba(3,4,8,.18); color: var(--studio-ink); }
:root[data-theme="light"] .theme-toggle:hover { border-color: var(--studio-orange); color: #c93c10; }

:root[data-theme="light"] .dashboard-hero .eyebrow { color: #c93c10; }
:root[data-theme="light"] .dashboard-hero h1 { color: var(--studio-ink); }
:root[data-theme="light"] .dashboard-hero p { color: rgba(3,4,8,.66); }
:root[data-theme="light"] .dashboard-hero .hero-note { border-color: rgba(3,4,8,.16); color: #807c14; }
:root[data-theme="light"] .dashboard-hero .hero-note strong { color: var(--studio-ink); }
:root[data-theme="light"] .dashboard-hero .hero-note span { color: rgba(3,4,8,.55); }
:root[data-theme="light"] .contact-frame { border-color: rgba(3,4,8,.12); box-shadow: 0 24px 55px rgba(3,4,8,.18); }
:root[data-theme="light"] .dashboard-grid .panel { border-color: rgba(3,4,8,.12); box-shadow: 0 22px 54px rgba(3,4,8,.08); }

:root[data-theme="light"] .how-it-works { color: var(--studio-ink); }
:root[data-theme="light"] .how-it-works .eyebrow,
:root[data-theme="light"] .process-step span { color: #c93c10; }
:root[data-theme="light"] .process-grid,
:root[data-theme="light"] .process-step { border-color: rgba(3,4,8,.14); }
:root[data-theme="light"] .process-step p { color: rgba(3,4,8,.6); }

:root[data-theme="light"] .app-shell .stepper { color: var(--studio-ink); }
:root[data-theme="light"] .app-shell .stepper .eyebrow { color: #c93c10; }
:root[data-theme="light"] .app-shell .stepper .step { color: rgba(3,4,8,.55); }
:root[data-theme="light"] .app-shell .stepper .step.active,
:root[data-theme="light"] .app-shell .stepper .step.done { color: var(--studio-ink); }
:root[data-theme="light"] .app-shell .stepper .step-num { border-color: rgba(3,4,8,.22); color: var(--studio-ink); }
:root[data-theme="light"] .app-shell .stepper .step.active .step-num { color: var(--studio-black); }
:root[data-theme="light"] .app-shell .stepper .progress { background: rgba(3,4,8,.12); }
:root[data-theme="light"] .app-shell .stepper-intro p,
:root[data-theme="light"] .app-shell .stepper-footer { color: rgba(3,4,8,.6); }
:root[data-theme="light"] .app-shell .stepper-footer { border-color: rgba(3,4,8,.14); }
:root[data-theme="light"] .app-shell .stepper .queue-card { background: var(--studio-paper); border-color: rgba(3,4,8,.14); color: var(--studio-ink); }
:root[data-theme="light"] .app-shell .stepper .queue-card p { color: rgba(3,4,8,.6); }
:root[data-theme="light"] .app-shell .stepper .queue-label { color: #c93c10; }
:root[data-theme="light"] .app-shell .stepper .capacity-dots i { background: rgba(3,4,8,.12); }
:root[data-theme="light"] .app-shell .stepper .capacity-dots i.filled { background: var(--studio-orange); }

@media (max-width: 520px) {
  .app-shell .topbar { gap: 12px; }
  .app-shell .nav-actions { gap: 12px; }
  .app-shell .brand img { width: 118px; }
  .theme-toggle, .app-shell .avatar { width: 34px; height: 34px; }
  .app-shell .nav-link { white-space: nowrap; font-size: 12px; }
}

/* "Need creative direction" spans the full row under the style choices. */
.style-option.style-direction { grid-column: 1 / -1; }
.style-option.style-direction .style-preview { background: var(--studio-black); color: var(--studio-orange); }
.style-option.style-direction .style-preview b { font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: 34px; }

/* Style thumbnails: real example work for each look. */
.style-preview.has-image { padding: 0; background: #e9e4d6; }
.style-preview.has-image img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* Safari < 18 needs the prefixed blur. */
.topbar { -webkit-backdrop-filter: blur(18px); }
.app-shell .topbar { -webkit-backdrop-filter: blur(16px); }

/* Selected options and checked deliverables: brand orange, not the old blue. */
.option.selected, .style-option.selected { border-color: var(--studio-orange); background: #fff6f1; }
.deliverable:has(input:checked) { border-color: var(--studio-orange); background: #fff6f1; }
.option:hover, .style-option:hover { border-color: rgba(255,90,38,.55); }
.helper { background: #fff6f1; }
a.help-link { text-decoration: none; }

/* Delete a request: icon button on desktop, swipe-to-reveal on touch screens. */
.request-row { position: relative; z-index: 1; transition: transform .22s ease; }
.row-delete-inline { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #8a877f; transition: color .15s, background .15s, border-color .15s; }
.row-delete-inline:hover, .row-delete-inline:focus-visible { color: #c8361a; background: #fff1eb; border-color: rgba(200,54,26,.25); outline: none; }
.request-swipe { position: relative; border-radius: 12px; overflow: hidden; }
.request-swipe + .request-swipe, .request-swipe + .request-row, .request-row + .request-swipe { margin-top: 10px; }
.row-delete-reveal { position: absolute; inset: 0 0 0 auto; width: 96px; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 0 12px 12px 0; background: #d93a17; color: #fff; font-size: 12px; font-weight: 700; }
.request-swipe.open .request-row { transform: translateX(-96px); }
@media (hover: none) and (pointer: coarse) {
  .row-delete-inline { display: none; }
  .row-delete-reveal { display: flex; }
  .request-row { touch-action: pan-y; }
  .request-row:hover { transform: none; }
}
.request-list { display: grid; gap: 10px; }
.request-list > .request-swipe, .request-list > .request-row { margin-top: 0 !important; }

/* Confirmation sheet: centered on desktop, bottom sheet on phones. */
.confirm-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(3,4,8,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade-in .18s ease both; }
.confirm-sheet { width: min(420px, 100%); background: #fffdf7; color: #030408; border-radius: 18px; padding: 24px; box-shadow: 0 30px 80px rgba(3,4,8,.35); animation: sheet-up .22s ease both; }
.confirm-sheet h3 { margin: 12px 0 6px; font-size: 22px; letter-spacing: -.01em; }
.confirm-sheet p { margin: 0 0 18px; color: #5f5d57; font-size: 14px; line-height: 1.5; }
.confirm-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #fff1eb; color: #c8361a; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-actions .btn { min-height: 44px; }
.btn-danger { background: #d93a17; color: #fff; }
.btn-danger:hover { background: #b92f12; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
@media (max-width: 600px) {
  .confirm-backdrop { place-items: end center; padding: 0; }
  .confirm-sheet { width: 100%; border-radius: 20px 20px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
  .confirm-actions { flex-direction: column-reverse; }
  .confirm-actions .btn { width: 100%; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .confirm-backdrop, .confirm-sheet { animation: none; } .request-row { transition: none; } }

/* Uploads: big, thumb-friendly target that opens Photos / Camera / Files on phones. */
@media (max-width: 600px) {
  .upload-drop { grid-template-columns: 40px 1fr; min-height: 72px; }
  .upload-cta { grid-column: 1 / -1; text-align: center; padding: 11px; }
  .image-preview button { width: 32px; height: 32px; }
}

.confirm-sheet .btn:focus-visible, .row-delete-inline:focus-visible { outline: 2px solid var(--studio-orange); outline-offset: 2px; }

/* PDF uploads show as a document tile instead of a picture. */
.file-thumb { width: 100%; height: 100%; min-height: 56px; display: grid; place-content: center; justify-items: center; gap: 2px; background: #fff1eb; color: #c8361a; border-radius: inherit; }
.file-thumb b { font-size: 10px; letter-spacing: .12em; }
.review-images .file-thumb { width: 54px; height: 54px; border-radius: 10px; }

/* Show/hide password: eye button inside the field, big enough to tap. */
.password-field { position: relative; }
.password-field .input { width: 100%; padding-right: 52px; }
.password-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #77746d; cursor: pointer; }
.password-toggle:hover { color: var(--studio-ink); }
.password-toggle:focus-visible { outline: 2px solid var(--studio-orange); outline-offset: -2px; }
.password-toggle[aria-pressed="true"] { color: #c8361a; }
.password-field .input::-ms-reveal { display: none; }

/* Rendering: the wrapper only gives each screen an identity; it doesn't affect layout. */
.view { display: contents; }
/* A new screen fades in quickly; nothing replays on clicks within a screen. */
.screen { animation: screen-in .22s ease-out both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }
/* Loading screen while a saved sign-in is checked (replaces the sign-in flash). */
.boot { min-height: 100vh; display: grid; place-items: center; background: var(--studio-cream); }
:root[data-theme="dark"] .boot { background: var(--studio-black); }
:root[data-theme="dark"] .boot-logo { filter: invert(1) brightness(2.3); }
.boot-logo { width: 140px; opacity: .85; animation: boot-pulse 1.4s ease-in-out infinite; }
@keyframes boot-pulse { 50% { opacity: .45; } }

/* Back link on account pages */
.back-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 8px 14px 8px 10px; border: 1px solid var(--line, #e2e2dd); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.back-link:hover { border-color: var(--studio-orange); }
.back-link:focus-visible { outline: 2px solid var(--studio-orange); outline-offset: 2px; }

/* Request details sheet */
.request-row[data-open-request] { cursor: pointer; }
.request-row[data-open-request]:focus-visible { outline: 2px solid var(--studio-orange); outline-offset: 2px; }
.request-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.request-sheet-details { display: grid; gap: 10px; margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: #f4f2ec; }
.request-sheet-details div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.request-sheet-details dt { color: #6b6963; }
.request-sheet-details dd { margin: 0; font-weight: 700; text-align: right; }
.request-sheet .confirm-actions a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* First-sign-in tutorial */
.tour-sheet { width: min(480px, 100%); padding: 26px; }
.tour-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tour-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--studio-orange); color: #030408; }
.tour-skip { border: 0; background: none; color: #6b6963; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; padding: 8px; }
.tour-skip:hover { color: #030408; }
.tour-sheet .eyebrow { color: #c8361a; }
.tour-title { margin: 8px 0 14px; font-size: 32px; line-height: 1.02; letter-spacing: -.03em; }
.tour-title .serif { color: var(--studio-orange); }
.tour-body { color: #4f4d48; font-size: 15px; line-height: 1.5; min-height: 150px; }
.tour-body p { margin: 0 0 12px; color: inherit; font-size: inherit; }
.tour-body strong { color: #030408; }
.tour-list { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.tour-list .ui-icon { display: inline-block; vertical-align: -3px; }
.tour-cards { display: grid; gap: 10px; }
.tour-cards > div { padding: 14px 16px; border-radius: 12px; background: #f4f2ec; }
.tour-cards p { margin: 4px 0 0; font-size: 14px; }
.tour-note { font-size: 13px; color: #6b6963; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots span { width: 7px; height: 7px; border-radius: 50%; background: #d9d6ce; }
.tour-dots span.on { width: 20px; border-radius: 4px; background: var(--studio-orange); }
.tour-buttons { display: flex; gap: 8px; }
.tour-buttons .btn { min-height: 44px; }
@media (max-width: 600px) {
  .tour-sheet { padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); }
  .tour-title { font-size: 28px; }
}
@media (max-width: 600px) { .tour-sheet { min-height: 480px; display: flex; flex-direction: column; } .tour-body { flex: 1; } }
button.help-link { font-family: inherit; cursor: pointer; }
.help-sheet h3 { margin-top: 8px; }
.help-actions { display: grid; gap: 8px; margin-top: 12px; }
.help-actions .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }

/* Tutorial: looping "add to home screen" demo (mini phone + synced captions). 9s loop, three 3s scenes offset by --d. */
.install-demo { display: flex; align-items: center; gap: 18px; margin: 4px 0 14px; }
.demo-phone { flex: none; width: 112px; height: 196px; padding: 5px; border-radius: 22px; background: #030408; box-shadow: 0 10px 24px rgba(3,4,8,.18); }
.demo-screen { position: relative; height: 100%; border-radius: 17px; overflow: hidden; background: #fbf8f1; }
.demo-scene { position: absolute; inset: 0; opacity: 0; animation: demo-scene 9s var(--d) infinite; }
.demo-page { padding: 22px 12px; display: grid; gap: 7px; }
.demo-page i { display: block; height: 7px; border-radius: 4px; background: #e6e1d6; }
.demo-page i:first-child { height: 26px; background: #f0d9cd; }
.demo-page i.short { width: 60%; }
.demo-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center; height: 26px; background: #f1ede4; color: #8a867d; font-size: 11px; }
.demo-bar.top { top: 0; bottom: auto; justify-content: flex-end; gap: 6px; padding: 0 6px; }
.demo-url { flex: 1; height: 13px; border-radius: 7px; background: #e2ddd2; }
.demo-btn { position: relative; display: grid; place-items: center; width: 18px; height: 18px; color: #2a62d8; font-weight: 700; }
.demo-sheet, .demo-menu { position: absolute; display: grid; background: #fff; font-size: 7px; font-weight: 600; color: #030408; box-shadow: 0 -6px 18px rgba(3,4,8,.14); }
.demo-sheet { left: 0; right: 0; bottom: 0; padding: 8px 4px 12px; border-radius: 12px 12px 0 0; animation: demo-sheet 9s var(--d) infinite; }
.demo-menu { top: 4px; right: 4px; width: 94px; padding: 4px 0; border-radius: 6px; transform-origin: top right; animation: demo-menu 9s var(--d) infinite; }
.demo-sheet span, .demo-menu span { position: relative; display: flex; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 6px; white-space: nowrap; letter-spacing: -.01em; }
.demo-sheet .hit, .demo-menu .hit { animation: demo-hit 9s var(--d) infinite; }
.demo-tap { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid var(--studio-orange); background: rgba(255,87,34,.18); opacity: 0; animation: demo-tap 9s var(--d) infinite; pointer-events: none; }
.demo-sheet .demo-tap, .demo-menu .demo-tap { position: absolute; display: block; padding: 0; left: 22%; border-radius: 50%; }
.demo-home { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; padding: 26px 12px; }
.demo-home i, .demo-home img { display: block; width: 100%; min-width: 0; aspect-ratio: 1; border-radius: 8px; background: #e6e1d6; }
.demo-home b { min-width: 0; display: grid; justify-items: center; gap: 2px; animation: demo-pop 9s var(--d) infinite; }
.demo-home small { font-size: 6.5px; font-weight: 600; color: #030408; }
.demo-steps { margin: 0; padding-left: 18px; display: grid; gap: 10px; font-size: 14px; line-height: 1.35; }
.demo-steps li { opacity: .4; animation: demo-step 9s var(--d) infinite; }
.demo-steps li::marker { font-weight: 700; }
@keyframes demo-scene { 0%, 30% { opacity: 1; } 34%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes demo-step { 0%, 30% { opacity: 1; color: #030408; } 34%, 96% { opacity: .4; color: inherit; } 100% { opacity: 1; color: #030408; } }
@keyframes demo-tap { 0%, 12% { opacity: 0; transform: scale(.4); } 17% { opacity: 1; transform: scale(1); } 24%, 100% { opacity: 0; transform: scale(1.7); } }
@keyframes demo-sheet { 0% { transform: translateY(100%); } 8%, 100% { transform: none; } }
@keyframes demo-menu { 0% { transform: scale(.6); opacity: 0; } 7%, 100% { transform: none; opacity: 1; } }
@keyframes demo-hit { 0%, 16% { background: transparent; } 19%, 100% { background: #fde3d8; } }
@keyframes demo-pop { 0%, 3% { transform: scale(0); } 9% { transform: scale(1.12); } 12%, 100% { transform: none; } }
@media (max-width: 380px) { .install-demo { gap: 12px; } .demo-steps { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) {
  .demo-scene, .demo-steps li, .demo-sheet, .demo-menu, .demo-hit, .demo-home b, .demo-tap { animation: none; }
  .demo-scene:nth-child(2) { opacity: 1; }
  .demo-steps li { opacity: 1; }
  .demo-sheet .hit, .demo-menu .hit { background: #fde3d8; }
}
.demo-home img { box-shadow: 0 0 0 1px rgba(3,4,8,.12), 0 3px 8px rgba(3,4,8,.14); }
a.billing-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }

/* Phones: keep the sign-in form near the top so people don't have to scroll past the intro to log in. */
@media (max-width: 520px) {
  .auth-main { padding: 24px 0 36px; gap: 22px; }
  .auth-welcome h1 { font-size: 40px; margin: 10px 0 0; }
  .auth-welcome p, .auth-capabilities { display: none; }
}
