:root,
[data-theme="light"]{
  /* Backgrounds */
  --bg-page:#FFFFFF;
  --bg-subtle:#F9FAFB;
  --bg-raised:#FFFFFF;
  --bg-overlay:rgba(0,0,0,0.04);

  /* Borders */
  --border-default:#E5E7EB;
  --border-subtle:#F3F4F6;

  /* Text */
  --text-primary:#111827;
  --text-secondary:#374151;
  --text-muted:#6B7280;
  --text-faint:#9CA3AF;

  /* Brand */
  --brand:#FD4E2F;
  --brand-hover:#E0381A;
  --brand-tint:rgba(253,78,47,0.05);
  --brand-border:rgba(253,78,47,0.15);

  /* Interactive */
  --focus-ring:rgba(253,78,47,0.35);
  --il-stroke:#D1D5DB;

  /* Existing Scopey aliases */
  --bg:var(--bg-subtle);
  --surface:var(--bg-raised);
  --surface-2:var(--bg-subtle);
  --surface-3:var(--border-subtle);
  --muted:var(--text-muted);
  --text:var(--text-primary);
  --accent:var(--brand);
  --accent-600:var(--brand-hover);
  --border:var(--border-default);
  --border-strong:#D1D5DB;
  --success:#047857;
  --warning:#92400e;
  --danger:#991b1b;
  --shadow:0 1px 3px rgba(0,0,0,0.06);
  --shadow-soft:0 1px 2px rgba(0,0,0,0.04);
}

body.theme-soft,
[data-theme="soft"]{
  --bg-page:#FAF9F7;
  --bg-subtle:#F3F1EE;
  --bg-raised:#FFFFFF;
  --bg-overlay:rgba(0,0,0,0.03);
  --border-default:#E2DDD8;
  --border-subtle:#EDE9E4;
  --text-primary:#1C1917;
  --text-secondary:#44403C;
  --text-muted:#78716C;
  --text-faint:#A8A29E;
  --brand-tint:rgba(253,78,47,0.04);
  --brand-border:rgba(253,78,47,0.14);
  --il-stroke:#D1D5DB;
  --bg:var(--bg-subtle);
  --surface:var(--bg-raised);
  --surface-2:var(--bg-subtle);
  --surface-3:var(--border-subtle);
  --muted:var(--text-muted);
  --text:var(--text-primary);
  --accent:var(--brand);
  --accent-600:var(--brand-hover);
  --border:var(--border-default);
  --border-strong:#CFC7BE;
  --success:#047857;
  --warning:#8a5716;
  --danger:#991b1b;
  --shadow:0 1px 3px rgba(0,0,0,0.08);
  --shadow-soft:0 1px 2px rgba(0,0,0,0.06);
}

body.theme-dusk,
[data-theme="dusk"]{
  --bg-page:#1E2433;
  --bg-subtle:#252C3D;
  --bg-raised:#2C3448;
  --bg-overlay:rgba(255,255,255,0.04);
  --border-default:rgba(255,255,255,0.10);
  --border-subtle:rgba(255,255,255,0.06);
  --text-primary:#F1F5F9;
  --text-secondary:#CBD5E1;
  --text-muted:#94A3B8;
  --text-faint:#64748B;
  --brand-tint:rgba(253,78,47,0.10);
  --brand-border:rgba(253,78,47,0.25);
  --focus-ring:rgba(253,78,47,0.50);
  --il-stroke:rgba(255,255,255,0.15);
  --bg:var(--bg-page);
  --surface:var(--bg-raised);
  --surface-2:var(--bg-subtle);
  --surface-3:#20283A;
  --muted:var(--text-muted);
  --text:var(--text-primary);
  --accent:var(--brand);
  --accent-600:var(--brand);
  --border:var(--border-default);
  --border-strong:rgba(255,255,255,0.18);
  --success:#86efac;
  --warning:#fde68a;
  --danger:#fda4af;
  --shadow:none;
  --shadow-soft:none;
  color-scheme:dark;
}

body.theme-dusk,
body.theme-dark,
body.theme-high-contrast{
  background:var(--bg-page);
  color:var(--text-primary);
}

body.theme-dark,
[data-theme="dark"]{
  --bg-page:#0F1117;
  --bg-subtle:#161B27;
  --bg-raised:#1C2232;
  --bg-overlay:rgba(255,255,255,0.03);
  --border-default:rgba(255,255,255,0.08);
  --border-subtle:rgba(255,255,255,0.04);
  --text-primary:#F9FAFB;
  --text-secondary:#D1D5DB;
  --text-muted:#9CA3AF;
  --text-faint:#6B7280;
  --brand-tint:rgba(253,78,47,0.08);
  --brand-border:rgba(253,78,47,0.20);
  --focus-ring:rgba(253,78,47,0.45);
  --il-stroke:rgba(255,255,255,0.15);
  --bg:var(--bg-page);
  --surface:var(--bg-raised);
  --surface-2:var(--bg-subtle);
  --surface-3:#111827;
  --muted:var(--text-muted);
  --text:var(--text-primary);
  --accent:var(--brand);
  --accent-600:var(--brand);
  --border:var(--border-default);
  --border-strong:rgba(255,255,255,0.16);
  --success:#86efac;
  --warning:#fde68a;
  --danger:#fda4af;
  --shadow:none;
  --shadow-soft:none;
  color-scheme:dark;
}

body.theme-high-contrast,
[data-theme="high-contrast"]{
  --bg-page:#000000;
  --bg-subtle:#0A0A0A;
  --bg-raised:#111111;
  --bg-overlay:rgba(255,255,255,0.05);
  --border-default:#FFFFFF;
  --border-subtle:rgba(255,255,255,0.40);
  --text-primary:#FFFFFF;
  --text-secondary:#FFFFFF;
  --text-muted:#E5E5E5;
  --text-faint:#CCCCCC;
  --brand:#FF6B4A;
  --brand-hover:#FF8567;
  --brand-tint:transparent;
  --brand-border:#FF6B4A;
  --focus-ring:#FFFFFF;
  --il-stroke:rgba(255,255,255,0.4);
  --bg:var(--bg-page);
  --surface:var(--bg-raised);
  --surface-2:var(--bg-subtle);
  --surface-3:var(--bg-page);
  --muted:var(--text-muted);
  --text:var(--text-primary);
  --accent:var(--brand);
  --accent-600:var(--brand-hover);
  --border:var(--border-default);
  --border-strong:var(--border-default);
  --success:#FFFFFF;
  --warning:#FFFFFF;
  --danger:#FFFFFF;
  --shadow:none;
  --shadow-soft:none;
  color-scheme:dark;
}

*{
  box-sizing:border-box;
}

html.text-size-small{
  font-size:14px;
}

html.text-size-medium{
  font-size:16px;
}

html.text-size-large{
  font-size:18px;
}

body{
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"DM Sans","Inter",sans-serif;
  margin:0;
  min-height:100vh;
  background:
    linear-gradient(180deg,var(--bg-page) 0,var(--bg-subtle) 280px,var(--bg) 100%);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}

body.theme-soft{
  background:
    radial-gradient(circle at top left,var(--brand-tint),transparent 32vw),
    linear-gradient(180deg,var(--bg-page) 0,var(--bg-subtle) 340px,var(--bg) 100%);
}

body.theme-dark,
body.theme-high-contrast{
  background:var(--bg-page);
}

body.theme-dusk{
  background:
    radial-gradient(circle at top left,var(--brand-tint),transparent 34vw),
    linear-gradient(180deg,var(--bg-subtle) 0,var(--bg-page) 360px,var(--bg) 100%);
}

.container{
  max-width:1280px;
  margin:0 auto;
  padding:0 20px;
}

.toast-region{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:12000;
  display:grid;
  gap:10px;
  width:min(380px,calc(100vw - 32px));
  pointer-events:none;
}

.toast{
  display:grid;
  grid-template-columns:minmax(0,1fr) 34px;
  gap:12px;
  align-items:start;
  padding:14px 14px 14px 16px;
  border:1px solid var(--border);
  border-left:4px solid var(--accent);
  border-radius:16px;
  background:rgba(255,255,255,0.96);
  color:var(--text);
  box-shadow:0 20px 50px rgba(15,23,42,0.18);
  pointer-events:auto;
  animation:toast-in .24s cubic-bezier(.2,.8,.2,1);
}

.toast strong{
  display:block;
  font-size:.86rem;
  line-height:1.25;
}

.toast p{
  margin:4px 0 0;
  color:var(--muted);
  line-height:1.45;
  font-size:.9rem;
}

.toast button{
  width:30px;
  height:30px;
  border:1px solid var(--border);
  border-radius:999px;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-weight:800;
}

.toast button:hover{
  border-color:var(--border-strong);
  color:var(--text);
}

.toast-success{
  border-left-color:var(--success);
}

.toast-warning{
  border-left-color:#f59e0b;
}

.toast-error{
  border-left-color:var(--danger);
}

.toast-exiting{
  animation:toast-out .22s ease-in forwards;
}

body.theme-dark .toast,
body.theme-dusk .toast,
body.theme-high-contrast .toast{
  background:rgba(24,25,27,0.96);
  border-color:var(--border);
  box-shadow:0 24px 54px rgba(0,0,0,0.42);
}

@keyframes toast-in{
  from{
    opacity:0;
    transform:translateY(10px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes toast-out{
  to{
    opacity:0;
    transform:translateY(8px);
  }
}

@keyframes panel-rise{
  from{
    opacity:0;
    transform:translateY(8px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes skeleton-shimmer{
  from{
    background-position:120% 0;
  }
  to{
    background-position:-120% 0;
  }
}

body.app-view-active main.container{
  max-width:1480px;
}

body.app-view-active .topbar .container{
  max-width:1480px;
}

body:not(.app-view-active) main.container{
  max-width:min(1480px,calc(100vw - 48px));
}

.site-footer{
  border-top:1px solid var(--border);
  background:rgba(255,255,255,0.72);
  margin-top:36px;
}

.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding-top:20px;
  padding-bottom:20px;
  color:var(--muted);
  font-size:.92rem;
}

.footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:flex-end;
}

.footer-links button{
  border:0;
  background:transparent;
  color:var(--muted);
  font:inherit;
  cursor:pointer;
  padding:0;
}

.footer-links button:hover{
  color:var(--accent-600);
}

.hidden{
  display:none !important;
}

.margin-top-md{
  margin-top:16px;
}

.stack-sm{
  display:grid;
  gap:10px;
}

.btn-block{
  width:100%;
}

.btn-small{
  padding:8px 12px;
  font-size:.9rem;
}

.scopey-scroll-progress{
  position:fixed;
  top:0;
  left:0;
  width:0%;
  height:3px;
  background:var(--brand);
  z-index:1000;
  transition:width .1s linear;
  pointer-events:none;
}

.scopey-confetti-canvas{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:9999;
}

.scopey-exit-toast{
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translateX(-50%) translateY(80px);
  background:var(--bg-raised);
  border:1px solid var(--border-default);
  border-left:3px solid var(--brand);
  border-radius:8px;
  padding:14px 20px;
  display:flex;
  align-items:center;
  gap:12px;
  font-size:14px;
  color:var(--text-secondary);
  box-shadow:0 4px 16px rgba(0,0,0,0.12);
  z-index:1000;
  transition:transform .3s cubic-bezier(0.4,0,0.2,1);
  pointer-events:all;
}

.scopey-exit-toast.is-visible{
  transform:translateX(-50%) translateY(0);
}

.toast-icon{
  color:var(--brand);
  font-size:16px;
}

.toast-dismiss{
  margin-left:8px;
  font-size:13px;
  font-weight:600;
  color:var(--brand);
  background:none;
  border:none;
  cursor:pointer;
  padding:0;
}

.toast-dismiss:focus-visible{
  outline:3px solid var(--focus-ring);
  outline-offset:3px;
}

.scopey-tooltip{
  position:absolute;
  background:var(--text-primary);
  color:var(--bg-page);
  font-size:13px;
  line-height:1.5;
  padding:10px 14px;
  border-radius:8px;
  max-width:240px;
  z-index:500;
  opacity:0;
  transition:opacity .2s ease;
}

.scopey-tooltip.is-visible{
  opacity:1;
}

.scopey-tooltip::before{
  content:"";
  position:absolute;
  top:-6px;
  left:20px;
  border:6px solid transparent;
  border-bottom-color:var(--text-primary);
  border-top:none;
}

.scopey-tooltip p{
  margin:0;
}

.scopey-tooltip-actions{
  display:flex;
  gap:10px;
  margin-top:8px;
}

.scopey-tooltip-actions button{
  border:0;
  background:transparent;
  color:var(--brand);
  cursor:pointer;
  font-size:12px;
  font-weight:700;
  padding:0;
}

.scopey-tooltip-actions button:focus-visible{
  outline:2px solid var(--brand);
  outline-offset:3px;
}

@media (prefers-reduced-motion:reduce){
  .scopey-scroll-progress,
  .scopey-exit-toast,
  .scopey-tooltip,
  .is-exiting .scopey-underline{
    transition:none;
  }

  .scopey-underline path,
  .scopey-underline-sm path{
    animation:none;
    stroke-dashoffset:0;
  }

  .status-chip.is-completing,
  .change-card.is-declining{
    animation:none;
  }
}

body.theme-high-contrast .scopey-tooltip{
  background:#000;
  color:#fff;
  border:1px solid #fff;
}

body.theme-high-contrast .scopey-tooltip::before{
  border-bottom-color:#fff;
}

.card-copy-tight{
  margin-top:4px;
  margin-bottom:12px;
}

.card-copy-small{
  margin-top:8px;
}

.muted{
  color:var(--muted);
}

.muted-caption{
  color:var(--muted);
  font-size:.9rem;
}

.profile-preview,
.client-profile{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.profile-preview{
  margin-bottom:16px;
}

.profile-avatar{
  width:52px;
  height:52px;
  flex:0 0 52px;
  border-radius:50%;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:var(--surface-2);
  border:1px solid var(--border);
  color:var(--accent);
  font-weight:800;
  font-size:1.2rem;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.72);
}

.profile-avatar-large{
  width:68px;
  height:68px;
  flex-basis:68px;
  font-size:1.45rem;
}

.profile-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.profile-name{
  display:block;
  color:var(--text);
  font-size:1.05rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.profile-bio{
  color:var(--muted);
  font-size:.92rem;
  line-height:1.55;
  margin:4px 0 0;
}

.client-hero-card{
  display:grid;
  grid-template-columns:minmax(220px, .85fr) minmax(0, 1.15fr);
  gap:22px;
  align-items:center;
  background:
    linear-gradient(135deg,rgba(255,77,46,0.08),rgba(255,255,255,0) 46%),
    linear-gradient(180deg,#ffffff,#fbfcfe);
  border-color:rgba(255,77,46,0.16);
}

.client-project-heading{
  min-width:0;
}

.field-label{
  display:block;
  font-size:.9rem;
  color:#526075;
  margin:8px 0 6px;
  font-weight:650;
}

.section-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.status-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  background:#f8fafc;
  border-radius:999px;
  padding:8px 12px;
  font-size:.85rem;
  color:var(--muted);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.86);
}

.status-chip.is-completing{
  animation:scopey-status-pulse .72s ease-out;
}

.status-success{
  color:var(--success);
  border-color:rgba(4,120,87,0.24);
}

.status-warning{
  color:var(--warning);
  border-color:rgba(146,64,14,0.24);
}

.status-danger{
  color:var(--danger);
  border-color:rgba(153,27,27,0.24);
}

.status-neutral{
  color:var(--muted);
}

@keyframes scopey-status-pulse{
  0%{
    transform:scale(1);
    box-shadow:0 0 0 0 rgba(34,197,94,0.34),inset 0 1px 0 rgba(255,255,255,0.86);
  }

  48%{
    transform:scale(1.04);
    box-shadow:0 0 0 8px rgba(34,197,94,0.12),inset 0 1px 0 rgba(255,255,255,0.86);
  }

  100%{
    transform:scale(1);
    box-shadow:0 0 0 14px rgba(34,197,94,0),inset 0 1px 0 rgba(255,255,255,0.86);
  }
}

.project-header-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}

.project-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.card-value-project{
  font-size:1.75rem;
}

.metrics-grid{
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}

.two-up-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.agreement-editor-grid{
  grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr);
}

.field-action{
  align-self:end;
}

.skip-link{
  position:absolute;
  left:0;
  top:-56px;
  background:var(--text);
  color:var(--surface);
  padding:12px 16px;
  z-index:999;
  transition:top .2s ease;
}

.skip-link:focus{
  top:16px;
}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,0.86);
  padding:18px 0 12px;
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(148,163,184,0.22);
  box-shadow:0 10px 28px rgba(15,23,42,0.045);
}

body.theme-dark .topbar{
  background:rgba(16,17,18,0.92);
  border-color:rgba(255,255,255,0.08);
  box-shadow:0 1px 0 rgba(255,255,255,0.03);
}

body.theme-high-contrast .topbar{
  background:#000;
  border-color:#fff;
}

.nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand-logo-wrap{
  display:inline-flex;
  align-items:center;
}

.brand-logo{
  display:block;
  height:40px;
  width:auto;
}

.brand-logo-dark{
  display:none;
}

body.theme-dusk .brand-logo-light,
body.theme-dark .brand-logo-light,
body.theme-high-contrast .brand-logo-light{
  display:none;
}

body.theme-dusk .brand-logo-dark,
body.theme-dark .brand-logo-dark,
body.theme-high-contrast .brand-logo-dark{
  display:block;
}

.brand-name{
  font-size:20px;
  display:block;
}

.brand-tagline{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
}

.tagline-underlined,
.hero-underline-target{
  position:relative;
  display:inline-block;
}

.scopey-underline,
.scopey-underline-sm{
  position:absolute;
  left:0;
  width:100%;
  pointer-events:none;
}

.scopey-underline{
  bottom:-6px;
  opacity:1;
}

.scopey-underline-sm{
  bottom:-3px;
}

.scopey-underline path,
.scopey-underline-sm path{
  stroke-dasharray:600;
  stroke-dashoffset:600;
}

@keyframes scopey-draw{
  to{
    stroke-dashoffset:0;
  }
}

.is-active .scopey-underline path{
  animation:scopey-draw .6s cubic-bezier(0.4,0,0.2,1) .15s forwards;
}

.is-exiting .scopey-underline{
  opacity:0;
  transition:opacity .2s ease;
}

.nav .scopey-underline-sm path{
  animation:scopey-draw .6s cubic-bezier(0.4,0,0.2,1) .2s forwards;
}

.actions{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  min-width:260px;
  justify-content:flex-end;
}

.btn{
  border:0;
  padding:10px 18px;
  border-radius:12px;
  font-weight:600;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn:focus-visible{
  outline:3px solid var(--focus-ring);
  outline-offset:3px;
}

.btn-ghost{
  background:rgba(255,255,255,0.86);
  color:var(--text);
  border:1px solid rgba(148,163,184,0.28);
  backdrop-filter:blur(10px);
  box-shadow:0 8px 18px rgba(15,23,42,0.04);
}

.btn-primary{
  background:linear-gradient(90deg,var(--accent),var(--accent-600));
  color:#fff;
  box-shadow:0 12px 24px rgba(255,77,46,0.22),0 6px 14px rgba(15,23,42,0.08);
}

.btn-secondary{
  background:rgba(255,255,255,0.74);
  color:var(--text);
  border:1px solid rgba(148,163,184,0.34);
  box-shadow:0 8px 18px rgba(15,23,42,0.035);
}

.btn-danger{
  background:#b91c1c;
  color:#fff;
  box-shadow:0 12px 24px rgba(185,28,28,0.18),0 6px 14px rgba(15,23,42,0.08);
}

.btn-link{
  background:transparent;
  color:var(--accent);
  border:none;
  padding:0;
  font-weight:700;
  cursor:pointer;
  text-decoration:underline;
}

.btn[disabled]{
  opacity:.64;
  cursor:not-allowed;
  transform:none;
}

.btn.plan-locked{
  border-color:rgba(255,77,46,0.34);
  color:var(--accent-600);
}

body.theme-dark .btn-ghost,
body.theme-high-contrast .btn-ghost{
  background:rgba(255,255,255,0.08);
  color:var(--text);
  border:1px solid rgba(255,255,255,0.12);
}

body.theme-dark .btn-ghost{
  background:rgba(255,255,255,0.06);
  border-color:rgba(255,255,255,0.12);
}

body.theme-dark .btn-secondary{
  background:rgba(255,255,255,0.03);
  border-color:rgba(255,255,255,0.12);
}

body.theme-dark .btn-danger{
  background:#dc2626;
  box-shadow:0 14px 28px rgba(220,38,38,0.16);
}

body.theme-dark .btn-secondary:hover,
body.theme-dark .btn-ghost:hover{
  background:rgba(255,255,255,0.09);
  border-color:rgba(255,255,255,0.18);
}

body.theme-dark .btn-primary{
  box-shadow:0 14px 28px rgba(255,77,46,0.18);
}

body.theme-high-contrast .btn-primary{
  background:var(--brand);
  color:#000;
  box-shadow:none;
}

/* =========================
   GLOBAL FORM CONTROLS
   ========================= */
input,
select,
textarea{
  padding:14px 16px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  font-size:1rem;
  width:100%;
  min-width:0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.9),0 1px 2px rgba(15,23,42,0.025);
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input::placeholder,
textarea::placeholder{
  color:var(--muted);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:none;
  border-color:rgba(255,77,46,0.62);
  box-shadow:0 0 0 4px rgba(255,77,46,0.14),inset 0 1px 0 rgba(255,255,255,0.9);
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea{
  background:#131416;
  color:var(--text);
  border-color:#3b3f46;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.03);
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder{
  color:#7f8792;
}

body.theme-dark input:focus-visible,
body.theme-dark select:focus-visible,
body.theme-dark textarea:focus-visible{
  outline-color:rgba(255,77,46,0.85);
  border-color:rgba(255,77,46,0.75);
}

body.theme-high-contrast input,
body.theme-high-contrast select,
body.theme-high-contrast textarea{
  background:var(--bg-page);
  color:var(--text-primary);
  border-color:var(--border-default);
}

/* =========================
   HERO
   ========================= */
.hero{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:start;
  padding:20px 0 10px;
}

.hero-copy{
  width:min(980px,100%);
  max-width:100%;
  min-width:0;
}

.eyebrow{
  display:inline-block;
  margin-bottom:18px;
  color:var(--accent-600);
  font-size:13px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.hero h1{
  margin:0;
  font-size:3rem;
  line-height:1;
  display:grid;
  grid-template-rows:1.12em 1.12em;
  row-gap:0.04em;
  width:100%;
  max-width:100%;
}

.hero h1 > span{
  display:inline-block;
  justify-self:start;
  width:fit-content;
  max-width:100%;
  white-space:nowrap;
  overflow:visible;
  transition:
    opacity .42s cubic-bezier(.2,.8,.2,1),
    transform .42s cubic-bezier(.2,.8,.2,1),
    filter .42s cubic-bezier(.2,.8,.2,1);
  will-change:opacity, transform, filter;
  color:var(--accent);
}

.hero h1 > span.fade-out{
  opacity:0;
  transform:translateY(-6px);
  filter:blur(2px);
}

.hero-line-copy{
  display:inline;
}

.hero h1 .secondary-line{
  color:var(--text);
}

.lead{
  color:var(--muted);
  margin:18px 0 0;
  max-width:620px;
  font-size:1.05rem;
  line-height:1.8;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px;
}

.hero-proof-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:36px;
  max-width:980px;
}

.hero-proof-strip div{
  border:1px solid var(--border);
  background:linear-gradient(180deg,#ffffff,#f9fafc);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow-soft);
}

.feature-icon-sprite{
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
}

.feature-icon{
  display:block;
  width:54px;
  height:54px;
  margin:0 0 14px;
  color:#FF4D2E;
}

.feature-icon .ring{
  fill:none;
  stroke:#FF4D2E;
  stroke-width:1.5;
  opacity:.3;
}

.feature-icon .glyph{
  fill:none;
  stroke:#FF4D2E;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.hero-proof-strip span{
  display:block;
  color:var(--accent-600);
  font-size:.76rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  line-height:1.3;
}

.hero-proof-strip strong{
  display:block;
  margin-top:8px;
  font-size:.95rem;
  line-height:1.35;
}

.hero-proof-strip p{
  margin:10px 0 0;
  color:var(--muted);
  font-size:.88rem;
  line-height:1.55;
}

.premium-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:26px 0 34px;
}

.premium-strip div{
  border:1px solid var(--border);
  background:linear-gradient(180deg,#ffffff,#f9fafc);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow-soft);
}

.premium-strip span,
.command-grid span,
.health-score span{
  display:block;
  color:var(--accent-600);
  font-size:.75rem;
  font-weight:800;
  letter-spacing:.08em;
  line-height:1.3;
  text-transform:uppercase;
}

.premium-strip strong{
  display:block;
  margin-top:8px;
  font-size:1rem;
  line-height:1.35;
}

.premium-strip p{
  margin:10px 0 0;
  color:var(--muted);
  font-size:.88rem;
  line-height:1.6;
}

.coming-soon-banner{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  margin:28px 0;
  padding:20px 22px;
  border:1px solid rgba(255,77,46,0.24);
  border-radius:24px;
  background:
    linear-gradient(135deg,rgba(255,77,46,0.12),rgba(255,255,255,0) 44%),
    var(--surface);
  box-shadow:var(--shadow-soft);
}

.coming-soon-banner span:first-child{
  display:block;
  margin-bottom:8px;
  color:var(--accent-600);
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.82rem;
  font-weight:800;
}

.coming-soon-banner strong{
  display:block;
  font-size:1.2rem;
  line-height:1.25;
}

.coming-soon-banner p{
  margin:8px 0 0;
  color:var(--muted);
  line-height:1.65;
}

body.theme-dark .hero-proof-strip div{
  background:linear-gradient(180deg,#1b1c1f,#17181a);
  border-color:rgba(255,255,255,0.08);
  box-shadow:0 14px 28px rgba(0,0,0,0.24);
}

body.theme-dark .premium-strip div{
  background:linear-gradient(180deg,#1b1c1f,#17181a);
  border-color:rgba(255,255,255,0.08);
  box-shadow:0 14px 30px rgba(0,0,0,0.24);
}

body.theme-dark .coming-soon-banner{
  background:
    linear-gradient(135deg,rgba(255,77,46,0.14),rgba(255,255,255,0) 46%),
    #1b1c1f;
  border-color:rgba(255,77,46,0.28);
}

/* =========================
   BANNERS
   ========================= */
.banner{
  display:none;
  border-radius:16px;
  padding:16px 18px;
  margin:24px 0;
  font-weight:600;
}

.banner.info{
  background:#eff6ff;
  border:1px solid #dbeafe;
  color:#1d4ed8;
}

.banner.success{
  background:#ecfdf5;
  border:1px solid #d1fae5;
  color:#065f46;
}

.banner.warning{
  background:#fef3c7;
  border:1px solid #fde68a;
  color:#92400e;
}

.banner.error{
  background:#fee2e2;
  border:1px solid #fecaca;
  color:#991b1b;
}

body.theme-dark .banner.info{
  background:rgba(59,130,246,0.14);
  border-color:rgba(96,165,250,0.32);
  color:#c7ddff;
}

body.theme-dark .banner.success{
  background:rgba(34,197,94,0.12);
  border-color:rgba(74,222,128,0.3);
  color:#c7f9d7;
}

body.theme-dark .banner.warning{
  background:rgba(245,158,11,0.14);
  border-color:rgba(251,191,36,0.34);
  color:#ffe9a8;
}

body.theme-dark .banner.error{
  background:rgba(239,68,68,0.14);
  border-color:rgba(251,113,133,0.34);
  color:#ffd0d6;
}

/* =========================
   CARDS / GRIDS
   ========================= */
.dashboard-grid{
  display:grid;
  gap:18px;
  margin-top:20px;
  align-items:start;
}

.card{
  background:linear-gradient(180deg,#ffffff,#fbfcfe);
  padding:22px;
  border-radius:22px;
  border:1px solid rgba(203,213,225,0.78);
  box-shadow:var(--shadow);
  transition:transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease, border-color .2s ease;
  overflow:hidden;
  min-width:0;
}

.card:hover{
  transform:translateY(-2px);
  box-shadow:0 24px 48px rgba(15,23,42,0.105);
}

body.theme-dark .card{
  background:linear-gradient(180deg,#1b1c1f,#17181a);
  border:1px solid rgba(255,255,255,0.08);
}

body.theme-dark .card:hover{
  transform:translateY(-1px);
  box-shadow:0 22px 44px rgba(0,0,0,0.34);
}

body.theme-dark .nested-card{
  background:#202126;
  border-color:rgba(255,255,255,0.08);
}

.card.small{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:18px;
  box-shadow:0 8px 18px rgba(15,23,42,0.035);
}

.metrics-grid .card.small{
  border-radius:16px;
  min-height:108px;
}

.metrics-grid .card-title{
  font-size:11px;
  margin-bottom:8px;
}

.metrics-grid .card-value{
  font-size:1.45rem;
  line-height:1.08;
}

.metrics-grid .card-value-compact{
  font-size:1.08rem;
}

.command-card{
  border:1px solid var(--border);
  background:linear-gradient(180deg,#ffffff,#fbfcfe);
}

.command-header{
  display:grid;
  grid-template-columns:minmax(0,1fr) 180px;
  gap:22px;
  align-items:start;
}

.command-title{
  display:block;
  font-size:1.55rem;
  line-height:1.15;
}

.health-score{
  border:1px solid var(--border);
  background:#ffffff;
  border-radius:18px;
  padding:16px;
  box-shadow:0 10px 22px rgba(15,23,42,0.045);
}

.health-score strong{
  display:block;
  margin-top:8px;
  font-size:2rem;
  line-height:1;
}

.health-score p{
  margin:10px 0 0;
  color:var(--muted);
  font-size:.9rem;
  font-weight:700;
}

.health-meter{
  height:8px;
  margin-top:14px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(107,114,128,0.18);
}

.health-meter div{
  width:0;
  height:100%;
  border-radius:inherit;
  background:var(--accent);
  transition:width .28s ease;
}

.project-journey{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:8px;
  margin-top:20px;
}

.project-journey-step{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  border:1px solid var(--border);
  background:rgba(248,250,252,0.82);
  border-radius:999px;
  padding:9px 10px;
  color:var(--muted);
}

.project-journey-step span{
  width:10px;
  height:10px;
  flex:0 0 auto;
  border-radius:999px;
  background:var(--border-strong);
}

.project-journey-step strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.82rem;
  line-height:1.2;
}

.project-journey-step.complete{
  color:var(--success);
  border-color:rgba(4,120,87,0.22);
  background:rgba(4,120,87,0.055);
}

.project-journey-step.complete span{
  background:var(--success);
}

.project-journey-step.active{
  color:var(--accent-600);
  border-color:rgba(255,77,46,0.34);
  background:rgba(255,77,46,0.075);
}

.project-journey-step.active span{
  background:var(--accent);
  box-shadow:0 0 0 4px rgba(255,77,46,0.12);
}

.guided-action{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  margin-top:16px;
  border:1px solid rgba(255,77,46,0.22);
  background:
    linear-gradient(135deg,rgba(255,77,46,0.08),rgba(255,255,255,0) 48%),
    rgba(248,250,252,0.88);
  border-radius:18px;
  padding:18px;
}

.guided-action span{
  display:block;
  color:var(--accent-600);
  font-size:.74rem;
  font-weight:800;
  letter-spacing:.08em;
  line-height:1.3;
  text-transform:uppercase;
}

.guided-action strong{
  display:block;
  margin-top:6px;
  font-size:1.18rem;
  line-height:1.25;
}

.guided-action p{
  margin:8px 0 0;
  color:var(--muted);
  line-height:1.55;
}

.command-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:20px;
}

.command-grid div{
  border:1px solid var(--border);
  background:rgba(248,250,252,0.82);
  border-radius:16px;
  padding:14px;
  box-shadow:none;
}

.command-grid strong{
  display:block;
  margin-top:8px;
  font-size:.98rem;
  line-height:1.45;
}

.readiness-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}

.readiness-item{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:10px;
  align-items:start;
  border:1px solid var(--border);
  background:rgba(248,250,252,0.82);
  border-radius:16px;
  padding:12px;
  box-shadow:none;
}

.readiness-item > div{
  min-width:0;
}

.readiness-item > span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--muted);
  font-size:.72rem;
  font-weight:800;
}

.readiness-item.complete > span{
  color:var(--success);
  border-color:rgba(4,120,87,0.28);
}

.readiness-item strong{
  display:block;
  font-size:.92rem;
  line-height:1.35;
}

.readiness-item p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:.82rem;
  line-height:1.45;
  max-width:100%;
  overflow-wrap:break-word;
}

.readiness-item p.truncate{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body.theme-dark .command-card{
  border-color:rgba(255,255,255,0.08);
  background:linear-gradient(180deg,#1b1c1f,#17181a);
}

body.theme-dark .health-score,
body.theme-dark .command-grid div{
  background:#202126;
  border-color:rgba(255,255,255,0.08);
}

body.theme-dark .project-journey-step,
body.theme-dark .guided-action{
  background:#202126;
  border-color:rgba(255,255,255,0.08);
}

body.theme-dark .project-journey-step.active,
body.theme-dark .guided-action{
  background:rgba(255,77,46,0.1);
  border-color:rgba(255,77,46,0.28);
}

body.theme-dark .readiness-item{
  background:#191a1d;
  border-color:rgba(255,255,255,0.08);
}

body.theme-dark .profile-avatar{
  box-shadow:none;
}

body.theme-dark .client-hero-card,
body.theme-dusk .client-hero-card{
  background:
    linear-gradient(135deg,rgba(255,77,46,0.14),rgba(255,255,255,0) 48%),
    var(--surface);
  border-color:rgba(255,255,255,0.1);
}

.handoff-card{
  border-style:solid;
}

.handoff-grid,
.client-summary-grid,
.client-guidance-grid{
  display:grid;
  gap:12px;
  margin-top:18px;
}

.handoff-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.handoff-grid div,
.client-summary-grid div,
.client-guidance-grid div{
  border:1px solid var(--border);
  background:rgba(248,250,252,0.82);
  border-radius:16px;
  padding:14px;
  min-width:0;
  transition:transform .18s ease, border-color .18s ease, background .18s ease;
}

.client-summary-grid div:hover,
.client-guidance-grid div:hover{
  transform:translateY(-1px);
  border-color:rgba(255,77,46,0.22);
  background:#ffffff;
}

.handoff-grid span,
.client-summary-grid span{
  display:block;
  color:var(--muted);
  font-size:.78rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.handoff-grid strong,
.client-summary-grid strong{
  display:block;
  margin-top:8px;
  color:var(--text);
  font-size:1rem;
  line-height:1.35;
  overflow-wrap:anywhere;
}

.handoff-readiness-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}

.handoff-readiness-list .readiness-item{
  min-height:92px;
  background:var(--surface);
}

.client-link-note{
  margin-top:12px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface-2);
}

.client-link-note:empty{
  display:none;
}

.client-link-note.payment-warning{
  border-color:rgba(255,77,46,0.34);
  background:rgba(255,77,46,0.08);
  color:var(--text);
}

.readiness-item-action{
  cursor:pointer;
  transition:border-color .18s ease, transform .18s ease, background .18s ease;
}

.readiness-item-action:hover{
  transform:translateY(-1px);
  border-color:var(--border-strong);
}

.client-summary-card{
  padding:24px;
}

.client-link-problem-card,
.client-scoped-context-card{
  padding:24px;
}

.client-link-problem-card h2{
  margin:8px 0 10px;
  font-size:clamp(1.7rem,3vw,2.6rem);
  line-height:1.05;
}

.client-scoped-context-card{
  border-color:rgba(255,77,46,0.24);
  background:
    linear-gradient(135deg,rgba(255,77,46,0.08),rgba(255,255,255,0) 56%),
    var(--surface);
  box-shadow:0 18px 42px rgba(255,77,46,0.08);
}

.client-summary-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.client-action-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  background:
    linear-gradient(135deg,rgba(255,77,46,0.08),rgba(255,255,255,0) 58%),
    var(--surface);
  border-color:rgba(255,77,46,0.18);
}

.client-action-card strong{
  display:block;
  margin-top:8px;
  font-size:1.35rem;
  line-height:1.15;
}

.client-attention-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:16px;
}

.client-attention-item{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,0.72);
}

.client-attention-item span{
  color:var(--accent-600);
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.client-attention-item strong{
  margin:0;
  font-size:.86rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.client-flow-steps{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.client-flow-step{
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-width:0;
  padding:12px;
  border:1px solid var(--border);
  border-radius:16px;
  background:rgba(255,255,255,0.68);
  transition:transform .18s ease, border-color .18s ease, background .18s ease;
}

.client-flow-step:hover{
  transform:translateY(-1px);
  border-color:var(--border-strong);
}

.client-flow-step span{
  flex:0 0 auto;
  min-width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:var(--surface-muted);
  color:var(--muted);
  font-size:.72rem;
  font-weight:900;
}

.client-flow-step strong{
  display:block;
  margin:0;
  line-height:1.2;
}

.client-flow-step p{
  margin:5px 0 0;
  color:var(--muted);
  font-size:.85rem;
  line-height:1.35;
}

.client-flow-step.complete span{
  background:rgba(25,135,84,0.12);
  color:#087244;
}

.client-flow-step.active{
  border-color:rgba(255,75,48,0.34);
  background:rgba(255,75,48,0.07);
}

.client-guidance-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.client-guidance-grid strong{
  display:block;
  font-size:1rem;
  line-height:1.35;
}

.client-guidance-grid p{
  margin:8px 0 0;
  color:var(--muted);
  line-height:1.55;
}

body.theme-dark .handoff-grid div,
body.theme-dark .client-summary-grid div,
body.theme-dark .client-guidance-grid div,
body.theme-dark .client-attention-item,
body.theme-dark .client-flow-step{
  background:#191a1d;
  border-color:rgba(255,255,255,0.08);
}

body.theme-dark .client-summary-grid div:hover,
body.theme-dark .client-guidance-grid div:hover,
body.theme-dusk .client-summary-grid div:hover,
body.theme-dusk .client-guidance-grid div:hover{
  background:rgba(255,255,255,0.06);
  border-color:rgba(255,255,255,0.16);
}

.card-title{
  color:var(--muted);
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:10px;
}

.card-value{
  font-size:2rem;
  font-weight:700;
  line-height:1;
}

.card-value-compact{
  font-size:1.35rem;
  line-height:1.15;
}

.card-copy{
  color:var(--muted);
  font-size:.95rem;
  line-height:1.75;
  margin-top:12px;
}

.nested-card{
  background:rgba(248,250,252,0.78);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:none;
}

.empty-state{
  border:1px dashed var(--border);
  background:
    linear-gradient(180deg,rgba(255,77,46,0.035),rgba(255,255,255,0) 44%),
    #ffffff;
  padding:26px 20px;
  border-radius:18px;
  color:var(--muted);
  text-align:center;
  box-shadow:0 8px 18px rgba(15,23,42,0.025);
  position:relative;
}

.empty-state::before{
  content:"";
  display:block;
  width:34px;
  height:4px;
  margin:0 auto 14px;
  border-radius:999px;
  background:var(--accent);
  opacity:.72;
}

.empty-state strong{
  display:block;
  color:var(--text);
  font-size:1rem;
  line-height:1.35;
}

.empty-state p{
  max-width:420px;
  margin:8px auto 0;
  color:var(--muted);
  line-height:1.55;
}

.empty-state .btn{
  margin-top:14px;
}

body.theme-dark .empty-state{
  background:
    linear-gradient(180deg,rgba(255,77,46,0.08),rgba(255,255,255,0) 46%),
    #15171a;
  border-color:rgba(255,255,255,0.14);
}

body.theme-dark .status-chip{
  background:#202126;
  border-color:rgba(255,255,255,0.1);
}

.empty-state-panel{
  min-height:280px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  text-align:center;
  overflow:hidden;
}

.empty-state-heading{
  margin:0;
  font-size:2rem;
  line-height:1.1;
}

.scopey-empty-illustration{
  display:block;
  width:min(150px,42vw);
  height:auto;
  margin:0 auto 2px;
  filter:drop-shadow(0 18px 30px rgba(15,23,42,0.08));
}

.empty-state-panel .card-copy{
  max-width:440px;
  margin:0 auto;
}

.empty-state-cta{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  margin-top:8px;
  padding:0 18px;
  border:1px solid var(--brand);
  border-radius:999px;
  background:var(--brand);
  color:#fff;
  font:inherit;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 12px 26px rgba(253,78,47,0.2);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.empty-state-cta:hover{
  transform:translateY(-1px);
  background:var(--brand-hover);
  box-shadow:0 16px 30px rgba(253,78,47,0.24);
}

.empty-state-cta:focus-visible{
  outline:3px solid var(--focus-ring);
  outline-offset:3px;
}

.first-run-steps{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  width:100%;
  margin-top:22px;
}

.first-run-steps div{
  min-width:0;
  padding:14px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface);
  text-align:left;
}

.first-run-steps span{
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:var(--accent);
  color:#fff;
  font-weight:800;
  margin-bottom:10px;
}

.first-run-steps strong{
  display:block;
  color:var(--text);
  line-height:1.25;
}

.first-run-steps p{
  margin:7px 0 0;
  color:var(--muted);
  font-size:.9rem;
  line-height:1.45;
}

body.theme-dark .first-run-steps div{
  background:#191a1d;
  border-color:rgba(255,255,255,0.08);
}

/* =========================
   PROJECT LIST / WORKSPACE
   ========================= */
.dashboard-shell{
  display:grid;
  grid-template-columns:340px minmax(0,1fr);
  gap:22px;
  margin-top:20px;
  align-items:start;
}

.dashboard-sidebar,
.dashboard-main,
.workspace-stack{
  display:grid;
  gap:18px;
}

.client-shell{
  display:block;
}

.client-shell > .card{
  margin-left:252px;
  margin-bottom:18px;
}

.client-shell > #client-verification-card,
.client-shell > #client-link-problem-card{
  margin-left:0;
}

.client-contents-card.hidden ~ .card{
  margin-left:0;
}

.client-contents-card{
  float:left;
  width:230px;
  margin:0 22px 18px 0 !important;
  position:sticky;
  top:96px;
  z-index:12;
  align-self:start;
  max-height:calc(100vh - 120px);
  overflow:auto;
  padding:18px;
}

.client-contents-nav{
  display:grid;
  gap:8px;
  margin-top:14px;
}

.client-contents-link{
  width:100%;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
  color:var(--text);
  cursor:pointer;
  font:inherit;
  font-weight:750;
  line-height:1.2;
  padding:10px 12px;
  text-align:left;
  transition:background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.client-contents-link:hover{
  transform:translateY(-1px);
  border-color:var(--border-strong);
  background:var(--surface-2);
}

.client-contents-link:focus-visible{
  outline:3px solid var(--accent);
  outline-offset:3px;
}

.client-contents-link.active{
  border-color:rgba(255,77,46,0.38);
  background:rgba(255,77,46,0.1);
  color:var(--accent-600);
}

.client-agreement-contents{
  display:none;
}

.client-contents-sublink{
  display:none;
}

#client-view [data-client-section]{
  scroll-margin-top:112px;
}

.dashboard-main{
  align-content:start;
}

#project-workspace,
#owner-empty-state{
  order:1;
}

.project-create-main{
  order:0;
}

.billing-card{
  order:3;
}

.dashboard-shell .card:hover{
  transform:none;
}

.project-list{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.project-list-archived .project-list-item{
  opacity:.86;
}

.project-list-card{
  position:relative;
  min-width:0;
}

.project-list-item{
  width:100%;
  border:1px solid var(--border);
  background:#ffffff;
  color:var(--text);
  border-radius:16px;
  padding:14px 16px;
  text-align:left;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(15,23,42,0.03);
  transition:border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.project-list-item:hover{
  transform:translateY(-1px);
  border-color:var(--border-strong);
  box-shadow:0 12px 24px rgba(15,23,42,0.06);
}

.project-list-item.active{
  border-color:var(--accent);
  background:linear-gradient(180deg,rgba(255,77,46,0.09),rgba(255,255,255,0.88));
  box-shadow:0 12px 24px rgba(255,77,46,0.1);
}

.project-card-delete{
  position:absolute;
  right:10px;
  top:10px;
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid rgba(185,28,28,0.18);
  background:rgba(255,255,255,0.88);
  color:#991b1b;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
  font-weight:700;
  cursor:pointer;
  opacity:0;
  transform:translateY(-2px);
  transition:opacity .18s ease, transform .18s ease, background .18s ease, border-color .18s ease;
}

.project-list-card:hover .project-card-delete,
.project-card-delete:focus-visible{
  opacity:1;
  transform:translateY(0);
}

.project-card-delete:hover{
  background:#fee2e2;
  border-color:rgba(185,28,28,0.34);
}

body.theme-dark .project-list-item{
  background:#202126;
  border-color:rgba(255,255,255,0.08);
}

body.theme-dark .project-card-delete{
  background:#24191b;
  color:#fb7185;
  border-color:rgba(251,113,133,0.2);
}

body.theme-dark .project-card-delete:hover{
  background:#3a2025;
  border-color:rgba(251,113,133,0.4);
}

body.theme-dark .project-list-item:hover{
  background:#26282d;
  border-color:rgba(255,255,255,0.15);
}

body.theme-dark .project-list-item.active,
body.theme-dark .project-tab.active,
body.theme-dark .setup-step.active{
  background:rgba(255,77,46,0.14);
  border-color:rgba(255,77,46,0.64);
  color:#ffb5a6;
}

.project-list-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
  font-weight:700;
  font-size:1rem;
}

.project-list-title .title-text{
  min-width:0;
  overflow-wrap:anywhere;
}

.project-health{
  flex:0 0 auto;
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--muted);
  font-size:.72rem;
  font-weight:900;
  line-height:1;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.8);
}

.project-health-healthy{
  background:rgba(4,120,87,0.08);
  border-color:rgba(4,120,87,0.24);
  color:#047857;
}

.project-health-attention{
  background:rgba(253,78,47,0.1);
  border-color:rgba(253,78,47,0.28);
  color:var(--brand-hover);
}

.project-health-overdue{
  background:rgba(153,27,27,0.1);
  border-color:rgba(153,27,27,0.28);
  color:#991b1b;
}

.project-list-meta{
  margin-top:6px;
  color:var(--muted);
  font-size:.92rem;
}

.billing-card{
  display:grid;
  grid-template-columns:minmax(240px,.8fr) minmax(280px,1fr) minmax(240px,.7fr);
  grid-template-areas:
    "header details usage"
    "header details actions"
    "note note note";
  align-items:start;
  gap:18px;
  padding:28px 30px;
  background:
    linear-gradient(135deg,rgba(255,77,46,0.08),rgba(255,255,255,0) 52%),
    var(--surface);
}

.billing-header{
  grid-area:header;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  min-width:0;
}

.billing-title-stack{
  min-width:0;
}

.billing-plan-name{
  display:block;
  margin-top:10px;
  font-size:1.75rem;
  line-height:1.1;
}

.billing-title-stack .card-copy{
  margin-top:12px;
  max-width:360px;
}

.usage-meter{
  grid-area:usage;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:16px;
  border:1px solid var(--border);
  border-radius:16px;
  background:rgba(255,255,255,0.68);
  color:var(--muted);
}

.usage-meter strong{
  color:var(--text);
  white-space:nowrap;
}

.billing-details{
  grid-area:details;
  display:grid;
  gap:16px;
  min-width:0;
}

.billing-feature-list{
  display:grid;
  gap:8px;
  margin:0;
  padding:0;
  list-style:none;
}

.billing-feature-list li{
  position:relative;
  padding-left:20px;
  color:var(--muted);
  line-height:1.45;
}

.billing-feature-list li::before{
  content:"";
  position:absolute;
  left:0;
  top:.62em;
  width:8px;
  height:8px;
  border-radius:999px;
  background:var(--accent);
  box-shadow:0 0 0 3px rgba(255,77,46,0.12);
}

.upgrade-note{
  grid-area:note;
  border:1px solid rgba(255,77,46,0.28);
  background:rgba(255,77,46,0.08);
  color:var(--text);
  border-radius:16px;
  padding:14px 16px;
  line-height:1.55;
  font-size:.94rem;
}

#project-limit-note{
  grid-area:auto;
}

.billing-actions{
  grid-area:actions;
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  align-self:center;
}

.billing-actions .btn{
  width:100%;
  padding-inline:12px;
}

.billing-actions .btn.active{
  border-color:var(--accent);
  background:rgba(255,77,46,0.12);
  color:var(--accent-600);
}

.rights-card{
  display:grid;
  gap:22px;
}

.rights-launch-card{
  display:grid;
  gap:16px;
}

.rights-launch-card .section-row{
  align-items:flex-start;
}

.rights-launch-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.rights-launch-stats span{
  display:grid;
  gap:4px;
  min-width:0;
  padding:12px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface-muted);
  color:var(--muted);
  font-size:.86rem;
  line-height:1.25;
}

.rights-launch-stats strong{
  color:var(--text);
  font-size:1.05rem;
  overflow-wrap:anywhere;
}

.rights-panel{
  max-width:900px;
  width:min(900px,calc(100vw - 32px));
  max-height:calc(100vh - 48px);
  overflow:auto;
  display:grid;
  gap:22px;
}

.rights-modal-header{
  align-items:flex-start;
}

.rights-card .section-heading{
  margin:10px 0 10px;
  font-size:1.45rem;
}

.rights-summary-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.rights-actions{
  display:flex;
  justify-content:flex-start;
}

.rights-create{
  display:grid;
  gap:14px;
  padding:18px;
  border:1px solid var(--border);
  border-radius:20px;
  background:var(--surface-muted);
}

.rights-artwork-list{
  display:grid;
  gap:12px;
}

.rights-artwork-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:start;
  padding:18px;
  border:1px solid var(--border);
  border-radius:20px;
  background:var(--surface);
}

.rights-artwork-card.active{
  border-color:rgba(255,77,46,0.55);
  box-shadow:0 18px 42px rgba(255,77,46,0.1);
}

.rights-artwork-card strong,
.rights-artwork-card p{
  overflow-wrap:anywhere;
}

.rights-artwork-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}

.rights-artwork-meta .status-chip{
  white-space:nowrap;
}

.rights-license-panel{
  display:grid;
  gap:16px;
  padding:20px;
  border:1px solid var(--border);
  border-radius:20px;
  background:var(--surface-muted);
}

.rights-license-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-items:end;
}

.rights-license-grid > div,
.rights-license-grid label{
  min-width:0;
}

.rights-license-grid .field-wide{
  grid-column:1 / -1;
}

.toggle-field{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:56px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface);
  color:var(--text);
  font-weight:700;
}

.toggle-field input{
  width:auto;
}

.rights-license-list{
  grid-column:1 / -1;
  display:grid;
  gap:10px;
  padding-top:14px;
  border-top:1px solid var(--border);
}

.rights-certificate-link{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--brand-hover);
  cursor:pointer;
  font:inherit;
  font-size:.9rem;
  font-weight:800;
  padding:4px 0;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:4px;
}

.rights-certificate-link:hover{
  color:var(--brand);
}

.rights-certificate-link:focus-visible{
  outline:3px solid var(--focus-ring);
  outline-offset:4px;
  border-radius:6px;
}

.rights-conflict-panel{
  display:grid;
  gap:10px;
  padding:16px;
  border:1px solid rgba(255,77,46,0.35);
  border-radius:18px;
  background:rgba(255,77,46,0.1);
}

.rights-conflict-panel strong{
  color:var(--accent-600);
}

.rights-conflict-panel p{
  margin:0;
  color:var(--muted);
}

.rights-conflict-list{
  display:grid;
  gap:8px;
}

.rights-conflict-item{
  padding:10px 12px;
  border:1px solid rgba(255,77,46,0.28);
  border-radius:14px;
  background:var(--surface);
  overflow-wrap:anywhere;
}

.report-panel{
  max-width:620px;
  background:var(--surface);
}

.report-form{
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin:18px 0 14px;
}

.report-review-note{
  padding:10px 12px;
  border-left:3px solid var(--accent);
  background:var(--surface-muted);
  border-radius:10px;
}

.project-create-main{
  max-width:860px;
  width:100%;
  justify-self:center;
  display:grid;
  gap:22px;
  padding:34px;
}

.project-creation-state{
  max-width:860px;
  width:100%;
  justify-self:center;
  display:grid;
  gap:22px;
  padding:34px;
  animation:panel-rise .24s cubic-bezier(.2,.8,.2,1);
}

.project-creation-state.hidden{
  display:none;
}

.creation-skeleton{
  display:grid;
  gap:12px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:18px;
  background:rgba(248,250,252,0.72);
}

.creation-skeleton span{
  display:block;
  height:16px;
  border-radius:999px;
  background:
    linear-gradient(90deg,rgba(226,232,240,0.7),rgba(255,255,255,0.94),rgba(226,232,240,0.7));
  background-size:240% 100%;
  animation:skeleton-shimmer 1.2s ease-in-out infinite;
}

.creation-skeleton span:nth-child(1){
  width:82%;
}

.creation-skeleton span:nth-child(2){
  width:64%;
}

.creation-skeleton span:nth-child(3){
  width:74%;
}

body.theme-dark .creation-skeleton,
body.theme-dusk .creation-skeleton{
  background:rgba(255,255,255,0.04);
  border-color:rgba(255,255,255,0.1);
}

body.theme-dark .creation-skeleton span,
body.theme-dusk .creation-skeleton span{
  background:
    linear-gradient(90deg,rgba(255,255,255,0.08),rgba(255,255,255,0.18),rgba(255,255,255,0.08));
  background-size:240% 100%;
}

.project-create-heading{
  margin:8px 0 0;
  font-size:1.7rem;
  line-height:1.15;
}

.project-create-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-items:end;
}

.project-create-grid > div{
  min-width:0;
}

.project-create-submit{
  grid-column:1 / -1;
}

.project-settings-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:14px;
  align-items:end;
}

.project-settings-grid > div{
  min-width:0;
}

.project-settings-grid input{
  width:100%;
}

body.theme-dark .usage-meter{
  background:rgba(255,255,255,0.04);
  border-color:rgba(255,255,255,0.1);
}

body.theme-dark .upgrade-note{
  background:rgba(255,77,46,0.12);
  border-color:rgba(255,77,46,0.28);
  color:#f7d7d0;
}

body.theme-dark .billing-card{
  background:
    linear-gradient(135deg,rgba(255,77,46,0.12),rgba(255,255,255,0) 52%),
    var(--surface);
}

body.theme-dark .billing-actions .btn.active{
  background:rgba(255,77,46,0.16);
  color:#ffb5a6;
}

.compose-form{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(120px,140px);
  gap:12px;
  align-items:end;
  min-width:0;
}

.compose-form > div{
  min-width:0;
}

.compose-form-compact{
  margin-top:8px;
}

.form-stack{
  display:grid;
  gap:14px;
  margin-top:12px;
  min-width:0;
  width:100%;
}

.form-stack > div{
  min-width:0;
}

.form-stack textarea{
  display:block;
  max-width:100%;
  resize:vertical;
}

textarea{
  display:block;
  max-width:100%;
  resize:vertical;
}

.agreement-form-stack{
  margin-top:16px;
  gap:16px;
}

.agreement-template-grid{
  display:grid;
  grid-template-columns:minmax(150px,.9fr) minmax(220px,1.3fr) minmax(120px,140px);
  gap:12px;
  align-items:end;
  margin-top:8px;
  min-width:0;
}

.agreement-template-grid > div{
  min-width:0;
}

.agreement-form-stack textarea{
  min-height:132px;
  line-height:1.6;
}

.agreement-textarea{
  scroll-margin-top:120px;
}

.agreement-textarea:focus-visible{
  border-color:var(--brand);
  background:
    linear-gradient(180deg,rgba(253,78,47,0.045),rgba(255,255,255,0) 72%),
    var(--surface);
  box-shadow:0 0 0 4px var(--focus-ring),0 12px 26px rgba(253,78,47,0.08);
}

#agreement-scope{
  min-height:230px;
}

#agreement-exclusions,
#agreement-payment-terms,
#agreement-revision-terms{
  min-height:174px;
}

.form-row{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  align-items:end;
  min-width:0;
}

.form-row-action{
  grid-template-columns:minmax(120px,180px) minmax(0,1fr);
}

.field-action{
  min-width:0;
}

.list{
  display:grid;
  gap:14px;
  margin-top:24px;
}

.list-compact{
  gap:10px;
  margin-top:14px;
}

.list-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:18px;
  border:1px solid var(--border);
  background:#ffffff;
  border-radius:18px;
  box-shadow:0 8px 18px rgba(15,23,42,0.028);
}

body.theme-dark .list-item,
body.theme-dark .agreement-row{
  background:#191a1d;
  border-color:rgba(255,255,255,0.08);
}

body.theme-dark .list-item:hover{
  border-color:rgba(255,255,255,0.14);
}

.change-card.is-declining{
  animation:scopey-decline-flash .7s ease-out;
}

@keyframes scopey-decline-flash{
  0%{
    border-color:rgba(239,68,68,0.72);
    background:rgba(239,68,68,0.12);
  }

  42%{
    border-color:rgba(239,68,68,0.42);
    background:rgba(239,68,68,0.08);
  }

  100%{
    border-color:var(--border);
    background:var(--surface);
  }
}

.item-main{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.item-title{
  font-weight:700;
  font-size:1rem;
}

.item-client{
  color:var(--muted);
  font-size:.95rem;
  margin-top:6px;
  line-height:1.5;
}

.item-details{
  margin:10px 0 0;
  color:var(--text);
  font-size:.95rem;
  line-height:1.6;
  white-space:pre-line;
}

.agreement-version-preview{
  color:var(--muted);
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.item-meta{
  color:var(--muted);
  font-size:.95rem;
  white-space:nowrap;
}

.action-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
}

.image-preview{
  display:block;
  margin-top:14px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--border);
  background:var(--surface-3);
  max-width:260px;
}

.image-preview img{
  display:block;
  width:100%;
  height:auto;
  max-height:220px;
  object-fit:cover;
}

.gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:14px;
  margin-top:18px;
}

.gallery-card{
  border:1px solid var(--border);
  background:#ffffff;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 10px 22px rgba(15,23,42,0.045);
}

.gallery-card img{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  background:var(--surface-2);
}

.gallery-card div{
  padding:12px;
}

.gallery-card strong{
  display:block;
  font-size:.95rem;
  line-height:1.35;
}

.gallery-card span{
  display:block;
  color:var(--muted);
  font-size:.84rem;
  margin-top:4px;
}

body.theme-dark .gallery-card{
  background:#191a1d;
  border-color:rgba(255,255,255,0.08);
}

.agreement-snapshot{
  display:grid;
  gap:12px;
  margin-top:16px;
}

.agreement-row{
  border:1px solid var(--border);
  background:#ffffff;
  border-radius:16px;
  padding:14px 16px;
  box-shadow:0 8px 18px rgba(15,23,42,0.028);
}

.agreement-row strong{
  display:block;
  font-size:.9rem;
  color:var(--accent-600);
  margin-bottom:6px;
}

.agreement-row p{
  margin:0;
  color:var(--text);
  line-height:1.6;
  white-space:pre-line;
}

.acceptance-panel{
  margin-top:16px;
}

.project-tabs{
  display:flex;
  flex-wrap:nowrap;
  gap:8px;
  margin-top:10px;
  overflow-x:auto;
  padding:4px 2px 10px;
  scrollbar-width:thin;
}

.setup-wizard{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:16px 0 12px;
}

.setup-step{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  align-items:center;
  min-width:0;
  border:1px solid var(--border);
  background:rgba(248,250,252,0.82);
  color:var(--text);
  border-radius:16px;
  padding:12px;
  text-align:left;
  cursor:pointer;
  transition:background .18s ease, border-color .18s ease, transform .18s ease;
}

.setup-step:hover{
  transform:translateY(-1px);
  border-color:var(--border-strong);
}

.setup-step span{
  grid-row:1 / span 2;
  width:30px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:var(--surface-3);
  color:var(--muted);
  font-weight:800;
}

.setup-step strong,
.setup-step small{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.setup-step strong{
  font-size:.95rem;
  line-height:1.2;
}

.setup-step small{
  color:var(--muted);
  font-size:.78rem;
  line-height:1.2;
}

.setup-step.complete{
  border-color:rgba(4,120,87,0.22);
  background:rgba(4,120,87,0.055);
}

.setup-step.complete span{
  background:var(--success);
  color:#fff;
}

.setup-step.active{
  border-color:rgba(255,77,46,0.36);
  background:rgba(255,77,46,0.075);
}

.setup-step.active span{
  background:var(--accent);
  color:#fff;
}

.setup-step.optional span{
  background:rgba(100,112,132,0.12);
}

.project-tab{
  flex:0 0 auto;
  border:1px solid var(--border);
  background:#ffffff;
  color:var(--text);
  border-radius:999px;
  padding:9px 14px;
  font-weight:600;
  font-size:.95rem;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(15,23,42,0.028);
  transition:background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.project-tab:hover{
  transform:translateY(-1px);
  border-color:var(--border-strong);
}

body.theme-dark .project-tab{
  background:#191a1d;
  border-color:rgba(255,255,255,0.1);
}

body.theme-dark .project-tab:hover{
  background:#22242a;
  border-color:rgba(255,255,255,0.16);
}

body.theme-dark .setup-step{
  background:#191a1d;
  border-color:rgba(255,255,255,0.1);
}

body.theme-dark .setup-step.complete{
  background:rgba(74,222,128,0.1);
  border-color:rgba(74,222,128,0.26);
}

.project-tab.active{
  border-color:var(--accent);
  background:rgba(255,77,46,0.1);
  color:var(--accent-600);
  box-shadow:0 8px 18px rgba(255,77,46,0.08);
}

.project-tab-panel{
  margin-top:20px;
  animation:panel-rise .22s cubic-bezier(.2,.8,.2,1);
}

/* =========================
   MARKETING SECTIONS
   ========================= */
.onboarding{
  margin:28px 0 0;
}

.section-heading{
  margin-bottom:30px;
  max-width:660px;
}

.section-heading h2{
  margin:12px 0 0;
  font-size:2rem;
  line-height:1.1;
}

.section-heading p{
  margin:16px 0 0;
  color:var(--muted);
  font-size:1rem;
  line-height:1.8;
}

.section-heading-compact{
  margin-bottom:22px;
}

.demo-reels{
  margin:34px 0 36px;
  padding:28px;
  border:1px solid var(--border);
  border-radius:28px;
  background:
    linear-gradient(135deg,rgba(255,77,46,0.06),rgba(255,255,255,0) 44%),
    var(--surface);
  box-shadow:var(--shadow-soft);
}

.demo-reel-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,390px),1fr));
  gap:16px;
}

.demo-reel-card{
  min-width:0;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff,#fbfcfe);
  box-shadow:0 12px 28px rgba(15,23,42,0.055);
}

.demo-reel-media{
  aspect-ratio:16 / 9.4;
  min-height:280px;
  background:#f3f4f6;
  border-bottom:1px solid var(--border);
  overflow:hidden;
}

.demo-mini{
  position:relative;
  width:100%;
  height:100%;
  min-height:280px;
  overflow:hidden;
  background:
    radial-gradient(circle at 18% 18%,rgba(253,78,47,0.14),transparent 26%),
    linear-gradient(180deg,#f9fafb,#eef2f7);
  color:var(--text);
}

.demo-mini::before{
  content:"";
  position:absolute;
  inset:24px 28px 26px;
  border:1px solid rgba(203,213,225,0.84);
  border-radius:18px;
  background:rgba(255,255,255,0.76);
  box-shadow:0 18px 38px rgba(15,23,42,0.08);
}

.demo-mini *,
.demo-mini *::before,
.demo-mini *::after{
  box-sizing:border-box;
}

.mini-brand,
.mini-form,
.mini-project-card,
.mini-sent-pill,
.mini-contents,
.mini-document,
.mini-accepted-stamp,
.mini-suggestion-card,
.mini-change-card,
.mini-arrow,
.mini-recorded-banner{
  position:absolute;
  z-index:1;
}

.mini-brand{
  top:31px;
  left:42px;
  display:flex;
  align-items:center;
  width:88px;
}

.mini-logo{
  display:block;
  width:100%;
  height:auto;
}

.mini-logo-dark{
  display:none;
}

.mini-form{
  top:90px;
  left:42px;
  width:34%;
  min-width:0;
  padding:14px;
  border:1px solid rgba(203,213,225,0.9);
  border-radius:15px;
  background:#ffffff;
  box-shadow:0 14px 26px rgba(15,23,42,0.08);
}

.mini-form span,
.mini-project-card span,
.mini-document span,
.mini-suggestion-card span,
.mini-change-card span{
  display:block;
  color:#64748b;
  font-size:.64rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.mini-input{
  position:relative;
  height:22px;
  margin-top:12px;
  overflow:hidden;
  border:1px solid rgba(203,213,225,0.95);
  border-radius:8px;
  background:#f8fafc;
}

.mini-input::after{
  content:"";
  position:absolute;
  top:50%;
  left:9px;
  width:58%;
  height:4px;
  border-radius:99px;
  background:#cbd5e1;
  transform:translateY(-50%);
}

.mini-input-draw::after{
  width:0;
  background:#fd4e2f;
  animation:mini-type 5.4s ease-in-out infinite;
}

.mini-input-muted::after{
  width:72%;
}

.mini-button{
  height:26px;
  margin-top:13px;
  border-radius:999px;
  background:#fd4e2f;
  box-shadow:0 12px 18px rgba(253,78,47,0.22);
}

.mini-project-card{
  top:94px;
  right:42px;
  width:35%;
  min-width:0;
  padding:15px;
  border:1px solid rgba(203,213,225,0.92);
  border-radius:17px;
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  box-shadow:0 18px 34px rgba(15,23,42,0.1);
  animation:mini-rise 5.4s ease-in-out infinite;
}

.mini-project-card strong,
.mini-suggestion-card strong,
.mini-change-card strong{
  display:block;
  margin-top:7px;
  font-size:.88rem;
  line-height:1.18;
}

.mini-project-card p,
.mini-suggestion-card p,
.mini-change-card p{
  margin:8px 0 0;
  color:#64748b;
  font-size:.72rem;
  line-height:1.35;
}

.mini-sent-pill,
.mini-accepted-stamp{
  right:54px;
  bottom:40px;
  padding:8px 12px;
  border-radius:999px;
  background:#dcfce7;
  color:#047857;
  font-size:.72rem;
  font-weight:850;
  box-shadow:0 14px 28px rgba(4,120,87,0.14);
  animation:mini-pop 5.4s ease-in-out infinite;
}

.mini-contents{
  top:74px;
  left:42px;
  width:30%;
  display:grid;
  gap:9px;
  padding:13px;
  border:1px solid rgba(203,213,225,0.9);
  border-radius:16px;
  background:#ffffff;
}

.mini-contents span,
.mini-contents strong{
  display:block;
  height:18px;
  border-radius:7px;
  background:#e2e8f0;
}

.mini-contents span{
  width:64%;
  background:#fd4e2f;
}

.mini-contents strong:nth-child(2){
  width:92%;
}

.mini-contents strong:nth-child(3){
  width:76%;
}

.mini-contents strong:nth-child(4){
  width:84%;
}

.mini-document{
  top:66px;
  right:42px;
  width:47%;
  padding:17px;
  border:1px solid rgba(203,213,225,0.92);
  border-radius:18px;
  background:#ffffff;
  box-shadow:0 18px 34px rgba(15,23,42,0.09);
}

.mini-document div{
  height:10px;
  margin-top:13px;
  border-radius:99px;
  background:#dbe3ee;
}

.mini-document div:nth-child(3){
  width:88%;
}

.mini-document div:nth-child(4){
  width:72%;
}

.mini-document div:nth-child(5){
  width:82%;
}

.mini-document em{
  display:block;
  width:82%;
  height:28px;
  margin-top:14px;
  border-radius:9px;
  background:rgba(253,78,47,0.12);
  transform-origin:left center;
  animation:mini-scan 5.4s ease-in-out infinite;
}

.mini-accepted-stamp{
  right:62px;
  bottom:45px;
  background:#fd4e2f;
  color:#ffffff;
  box-shadow:0 16px 30px rgba(253,78,47,0.24);
}

.mini-suggestion-card,
.mini-change-card{
  top:92px;
  width:33%;
  min-height:118px;
  padding:15px;
  border:1px solid rgba(203,213,225,0.92);
  border-radius:18px;
  background:#ffffff;
  box-shadow:0 18px 34px rgba(15,23,42,0.09);
}

.mini-suggestion-card{
  left:42px;
}

.mini-change-card{
  right:42px;
  transform:translateY(10px);
  opacity:.62;
  animation:mini-change 5.4s ease-in-out infinite;
}

.mini-arrow{
  top:142px;
  left:50%;
  width:42px;
  height:22px;
  transform:translateX(-50%);
  opacity:.72;
  animation:mini-arrow-pulse 5.4s ease-in-out infinite;
}

.mini-arrow::before,
.mini-arrow::after{
  content:"";
  position:absolute;
  top:50%;
  background:#fd4e2f;
  transform:translateY(-50%);
}

.mini-arrow::before{
  left:0;
  width:31px;
  height:4px;
  border-radius:999px;
}

.mini-arrow::after{
  right:3px;
  width:13px;
  height:13px;
  border-radius:2px;
  clip-path:polygon(0 0,100% 50%,0 100%);
}

.mini-recorded-banner{
  right:58px;
  bottom:48px;
  left:58px;
  padding:10px 13px;
  border:1px solid rgba(4,120,87,0.18);
  border-radius:14px;
  background:#ecfdf5;
  color:#047857;
  font-size:.72rem;
  font-weight:800;
  text-align:center;
  opacity:0;
  transform:translateY(8px);
  animation:mini-record 5.4s ease-in-out infinite;
}

@keyframes mini-type{
  0%,14%{width:0;}
  34%,66%{width:72%;}
  86%,100%{width:0;}
}

@keyframes mini-rise{
  0%,22%{opacity:.45;transform:translateY(12px) scale(.98);}
  42%,66%{opacity:1;transform:translateY(0) scale(1);}
  86%,100%{opacity:.45;transform:translateY(12px) scale(.98);}
}

@keyframes mini-pop{
  0%,40%{opacity:0;transform:translateY(8px) scale(.94);}
  54%,70%{opacity:1;transform:translateY(0) scale(1);}
  88%,100%{opacity:0;transform:translateY(8px) scale(.94);}
}

@keyframes mini-scan{
  0%,20%{transform:scaleX(.28);opacity:.4;}
  42%,66%{transform:scaleX(1);opacity:1;}
  88%,100%{transform:scaleX(.28);opacity:.4;}
}

@keyframes mini-change{
  0%,30%{opacity:.45;transform:translateY(10px) scale(.98);}
  50%,70%{opacity:1;transform:translateY(0) scale(1);}
  90%,100%{opacity:.45;transform:translateY(10px) scale(.98);}
}

@keyframes mini-arrow-pulse{
  0%,24%{opacity:.28;transform:translateX(-58%) scaleX(.72);}
  44%,68%{opacity:1;transform:translateX(-50%) scaleX(1);}
  88%,100%{opacity:.28;transform:translateX(-58%) scaleX(.72);}
}

@keyframes mini-record{
  0%,46%{opacity:0;transform:translateY(8px);}
  62%,74%{opacity:1;transform:translateY(0);}
  92%,100%{opacity:0;transform:translateY(8px);}
}

@media (prefers-reduced-motion:reduce){
  .mini-input-draw::after,
  .mini-project-card,
  .mini-sent-pill,
  .mini-document em,
  .mini-accepted-stamp,
  .mini-change-card,
  .mini-arrow,
  .mini-recorded-banner{
    animation:none !important;
  }

  .mini-input-draw::after{
    width:72%;
  }

  .mini-project-card,
  .mini-sent-pill,
  .mini-accepted-stamp,
  .mini-change-card,
  .mini-arrow,
  .mini-recorded-banner{
    opacity:1;
    transform:none;
  }

  .mini-arrow{
    transform:translateX(-50%);
  }
}

.demo-reel-copy{
  padding:18px;
}

.demo-reel-copy span{
  display:block;
  color:var(--accent-600);
  font-size:.74rem;
  font-weight:800;
  letter-spacing:.1em;
  line-height:1.3;
  text-transform:uppercase;
}

.demo-reel-copy h3{
  margin:8px 0 0;
  font-size:1.05rem;
  line-height:1.25;
}

.demo-reel-copy p{
  margin:9px 0 0;
  color:var(--muted);
  font-size:.92rem;
  line-height:1.6;
}

.origin-block{
  margin:36px calc(50% - 50vw);
  padding:80px max(24px,calc((100vw - min(1480px,calc(100vw - 48px))) / 2));
  background:var(--brand-tint);
}

.origin-story{
  max-width:600px;
  margin:0 auto;
  text-align:center;
}

.origin-logo{
  display:block;
  width:auto;
  height:28px;
  margin:0 auto 24px;
  opacity:.4;
}

.origin-logo-dark{
  display:none;
}

.origin-story p{
  margin:0;
  color:var(--text-secondary);
  font-family:"DM Sans",Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:18px;
  font-weight:400;
  line-height:1.7;
}

.origin-divider{
  width:min(480px,100%);
  height:1px;
  margin:48px auto;
  border:0;
  background:var(--brand-border);
}

.origin-beliefs{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  max-width:760px;
  margin:0 auto;
}

.origin-beliefs div{
  display:grid;
  justify-items:center;
  align-content:start;
  gap:10px;
  min-width:0;
  padding:0 28px;
  text-align:center;
}

.origin-beliefs div + div{
  border-left:1px solid var(--border-subtle);
}

.origin-beliefs span{
  color:var(--brand);
  font-size:14px;
  line-height:1;
}

.origin-beliefs p{
  margin:0;
  color:var(--text-primary);
  font-family:"DM Sans",Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:15px;
  font-weight:600;
  line-height:1.45;
}

body.theme-dark .origin-logo-light,
body.theme-dusk .origin-logo-light,
body.theme-high-contrast .origin-logo-light{
  display:none;
}

body.theme-dark .origin-logo-dark,
body.theme-dusk .origin-logo-dark{
  display:block;
}

body.theme-high-contrast .origin-block{
  border-top:1px solid var(--border-subtle);
  border-bottom:1px solid var(--border-subtle);
  background:transparent;
}

body.theme-high-contrast .origin-logo{
  display:none;
}

body.theme-high-contrast .origin-story p,
body.theme-high-contrast .origin-beliefs p{
  color:var(--text-primary);
}

.onboarding-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
}

.step-card{
  border:1px solid var(--border);
  background:linear-gradient(180deg,#ffffff,#fbfcfe);
  border-radius:24px;
  padding:26px;
  box-shadow:var(--shadow-soft);
  transition:transform .18s ease, box-shadow .18s ease;
}

.step-card:hover{
  transform:translateY(-2px);
  box-shadow:0 24px 48px rgba(15,23,42,0.095);
}

.step-number{
  width:36px;
  height:36px;
  border-radius:12px;
  background:var(--accent);
  color:#fff;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:16px;
}

.step-card h3{
  margin:0 0 10px;
  font-size:1.05rem;
}

.step-card p{
  margin:0;
  color:var(--muted);
  line-height:1.75;
}

.pricing-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:18px;
  margin:32px 0 48px;
}

.pricing-grid-free-only{
  grid-template-columns:minmax(280px,460px);
  justify-content:center;
  margin-bottom:12px;
}

.pricing-card{
  border:1px solid var(--border);
  background:linear-gradient(180deg,#ffffff,#fbfcfe);
  border-radius:24px;
  padding:28px;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  gap:18px;
  min-height:380px;
}

.pricing-card.featured{
  border-color:rgba(255,77,46,0.3);
  background:
    linear-gradient(135deg,rgba(255,77,46,0.08),rgba(255,255,255,0) 42%),
    linear-gradient(180deg,#ffffff,#fbfcfe);
  box-shadow:0 24px 48px rgba(255,77,46,0.12),0 18px 42px rgba(15,23,42,0.06);
}

body.theme-dark .step-card,
body.theme-dark .pricing-card,
body.theme-dark .demo-reels,
body.theme-dark .demo-reel-card{
  background:linear-gradient(180deg,#1b1c1f,#17181a);
  border-color:rgba(255,255,255,0.08);
  box-shadow:0 18px 42px rgba(0,0,0,0.28);
}

body.theme-dark .demo-reel-media{
  background:#111827;
  border-color:rgba(255,255,255,0.08);
}

body.theme-dark .demo-mini,
body.theme-dusk .demo-mini{
  background:
    radial-gradient(circle at 18% 18%,rgba(253,78,47,0.18),transparent 28%),
    linear-gradient(180deg,#202226,#111318);
}

body.theme-dark .demo-mini::before,
body.theme-dusk .demo-mini::before{
  border-color:rgba(255,255,255,0.1);
  background:rgba(23,24,28,0.86);
  box-shadow:0 18px 38px rgba(0,0,0,0.34);
}

body.theme-dark .mini-project-card strong,
body.theme-dusk .mini-project-card strong,
body.theme-dark .mini-suggestion-card strong,
body.theme-dusk .mini-suggestion-card strong,
body.theme-dark .mini-change-card strong,
body.theme-dusk .mini-change-card strong{
  color:#f8fafc;
}

body.theme-dark .mini-form,
body.theme-dark .mini-project-card,
body.theme-dark .mini-contents,
body.theme-dark .mini-document,
body.theme-dark .mini-suggestion-card,
body.theme-dark .mini-change-card,
body.theme-dusk .mini-form,
body.theme-dusk .mini-project-card,
body.theme-dusk .mini-contents,
body.theme-dusk .mini-document,
body.theme-dusk .mini-suggestion-card,
body.theme-dusk .mini-change-card{
  border-color:rgba(255,255,255,0.11);
  background:linear-gradient(180deg,#24262b,#191b20);
  box-shadow:0 18px 34px rgba(0,0,0,0.28);
}

body.theme-dark .mini-input,
body.theme-dusk .mini-input,
body.theme-dark .mini-contents strong,
body.theme-dusk .mini-contents strong,
body.theme-dark .mini-document div,
body.theme-dusk .mini-document div{
  border-color:rgba(255,255,255,0.1);
  background:#30333a;
}

body.theme-dark .mini-logo-light,
body.theme-dusk .mini-logo-light,
body.theme-high-contrast .mini-logo-light{
  display:none;
}

body.theme-dark .mini-logo-dark,
body.theme-dusk .mini-logo-dark,
body.theme-high-contrast .mini-logo-dark{
  display:block;
}

body.theme-dark .step-card:hover{
  box-shadow:0 22px 48px rgba(0,0,0,0.34);
}

body.theme-dark .pricing-card.featured{
  border-color:rgba(255,77,46,0.42);
  box-shadow:0 22px 48px rgba(255,77,46,0.1),0 18px 42px rgba(0,0,0,0.28);
}

.pricing-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
}

.pricing-header span{
  color:var(--muted);
  text-transform:uppercase;
  font-size:.85rem;
  letter-spacing:.12em;
}

.price-value{
  font-size:2.1rem;
  font-weight:700;
  line-height:1;
}

.price-description{
  margin:0;
  color:var(--muted);
  line-height:1.8;
}

.price-list{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:12px;
  color:var(--muted);
  font-size:.95rem;
}

.price-list li::before{
  content:"*";
  color:var(--accent);
  display:inline-block;
  width:1em;
  margin-left:-1em;
}

.price-cta{
  margin-top:auto;
}

.pricing-card .btn{
  text-align:center;
}

.beta-pricing-note{
  max-width:620px;
  margin:0 auto 48px;
  color:var(--muted);
  text-align:center;
  line-height:1.65;
}

.legal-strip{
  margin:24px 0 0;
  padding:24px;
  border:1px solid var(--border);
  border-radius:24px;
  background:var(--surface);
  box-shadow:var(--shadow-soft);
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,.9fr);
  gap:24px;
  align-items:center;
}

.legal-strip h2{
  margin:8px 0 8px;
  font-size:1.65rem;
}

.legal-strip p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

.legal-link-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.legal-panel{
  max-width:940px;
  width:min(940px,calc(100vw - 32px));
  max-height:calc(100vh - 48px);
  overflow:auto;
}

.legal-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:20px 0 14px;
}

.legal-tabs .btn.active{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}

.legal-content{
  display:grid;
  gap:18px;
  margin-top:18px;
}

.legal-intro{
  margin:0;
  color:var(--muted);
  line-height:1.65;
}

.legal-section{
  padding:18px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--surface-2);
}

.legal-section h4{
  margin:0 0 12px;
}

.legal-section ul{
  display:grid;
  gap:9px;
  margin:0;
  padding-left:18px;
  color:var(--muted);
  line-height:1.55;
}

/* =========================
   MODAL
   ========================= */
.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(12,18,31,0.45);
  z-index:9999;
  padding:24px;
}

body.theme-dark .modal{
  background:rgba(0,0,0,0.62);
}

.modal-panel{
  background:var(--surface);
  border-radius:16px;
  padding:26px;
  max-width:520px;
  width:100%;
  box-shadow:0 30px 60px rgba(12,18,31,0.2);
  position:relative;
  border:1px solid var(--border);
}

body.theme-dark .modal-panel{
  background:linear-gradient(180deg,#1c1d20,#17181a);
  border-color:rgba(255,255,255,0.1);
  box-shadow:0 34px 72px rgba(0,0,0,0.52);
}

body.theme-dark .legal-strip,
body.theme-dark .legal-section{
  background:rgba(255,255,255,0.04);
  border-color:rgba(255,255,255,0.1);
}

body.theme-dark .site-footer{
  background:rgba(16,17,18,0.9);
  border-color:rgba(255,255,255,0.1);
}

.danger-panel{
  background:var(--surface);
  border-color:rgba(185,28,28,0.22);
}

.danger-panel h3{
  color:#991b1b;
}

.danger-panel strong{
  color:var(--text);
}

body.theme-dark .danger-panel{
  background:linear-gradient(180deg,#22191b,#181416);
  border-color:rgba(251,113,133,0.28);
}

body.theme-dark .danger-panel h3{
  color:#fb7185;
}

.modal-panel h3{
  margin:0 0 8px;
}

.auth-panel{
  max-width:560px;
  padding:34px 38px 30px;
  border-radius:24px;
}

.account-panel{
  max-width:960px;
  width:min(960px,calc(100vw - 32px));
  max-height:calc(100vh - 48px);
  overflow:auto;
}

.account-summary-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:22px;
}

.account-summary-tile,
.account-plan-card{
  border:1px solid var(--border);
  background:rgba(248,250,252,0.78);
  border-radius:18px;
  padding:18px;
}

.account-summary-tile span,
.account-plan-card span{
  color:var(--muted);
}

.account-summary-tile strong{
  display:block;
  margin-top:8px;
  font-size:1.65rem;
  line-height:1.05;
}

.account-summary-tile p,
.account-plan-card p{
  margin:10px 0 0;
  color:var(--muted);
  line-height:1.55;
}

.developer-diagnostics-panel{
  max-width:980px;
}

.feedback-panel{
  max-width:680px;
}

.developer-diagnostics-readiness{
  display:grid;
  gap:16px;
  margin-top:18px;
  padding:18px;
  border:1px solid var(--border);
  border-radius:20px;
  background:var(--surface-muted);
}

.launch-check-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.launch-check-list .readiness-item{
  background:var(--surface);
}

.demo-project-result{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:8px 14px;
  align-items:center;
  padding:14px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface);
}

.demo-project-result span{
  color:var(--muted);
  font-size:.78rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.demo-project-result a,
.demo-project-result strong{
  min-width:0;
  color:var(--text);
  overflow-wrap:anywhere;
}

.account-plan-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:18px;
}

.account-plan-card{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.account-plan-card.active{
  border-color:rgba(255,77,46,0.38);
  background:rgba(255,77,46,0.06);
}

.account-plan-card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.account-plan-card-header strong{
  display:block;
  font-size:1.2rem;
}

.account-plan-card ul{
  display:grid;
  gap:8px;
  margin:0;
  padding-left:18px;
  color:var(--muted);
  line-height:1.45;
}

.account-plan-card .btn{
  margin-top:auto;
}

.account-payment-setup{
  margin-top:18px;
  padding:18px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--surface-2);
}

.account-payment-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:16px;
}

.account-payment-grid .account-summary-tile{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}

.account-payment-grid .account-summary-tile strong{
  font-size:1.2rem;
  margin-top:0;
}

.account-payment-grid input{
  width:100%;
}

.account-legal-note{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:18px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--surface-2);
}

.account-legal-note p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}

.account-share-badge{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:center;
  margin-top:18px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:18px;
  background:
    linear-gradient(135deg,rgba(253,78,47,0.06),rgba(255,255,255,0) 56%),
    var(--surface-2);
}

.account-share-badge p{
  grid-column:1 / -1;
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

.scopey-badge-preview{
  min-width:0;
}

.scopey-badge-preview a{
  text-decoration:none;
}

body.theme-dark .account-summary-tile,
body.theme-dark .developer-diagnostics-readiness,
body.theme-dark .account-plan-card,
body.theme-dark .account-payment-setup,
body.theme-dark .account-legal-note,
body.theme-dark .account-share-badge{
  background:rgba(255,255,255,0.04);
  border-color:rgba(255,255,255,0.1);
}

body.theme-dark .account-plan-card.active{
  background:rgba(255,77,46,0.12);
  border-color:rgba(255,77,46,0.34);
}

.auth-header{
  padding-right:34px;
}

.auth-kicker{
  display:inline-block;
  margin-bottom:8px;
  color:var(--accent-600);
  font-size:.76rem;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.auth-header h3{
  font-size:1.85rem;
  line-height:1.1;
}

.auth-header .muted{
  margin:10px 0 0;
  font-size:1rem;
  line-height:1.65;
}

.auth-mode-switch{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  margin:22px 0 24px;
  padding:6px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--surface-2);
}

.auth-mode-switch .btn{
  border-radius:13px;
  border:1px solid transparent;
  box-shadow:none;
  padding:12px 14px;
}

.auth-mode-switch .btn.active{
  background:var(--accent);
  color:#fff;
  border-color:var(--accent);
}

.auth-fields{
  display:grid;
  gap:16px;
}

.auth-field .field-label{
  margin-top:0;
}

.auth-field input{
  border-radius:18px;
  padding:16px 18px;
}

.auth-actions{
  margin-top:24px;
  align-items:center;
}

.auth-actions .btn{
  min-height:48px;
}

.legal-consent{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:16px;
  color:var(--muted);
  line-height:1.45;
  font-size:.94rem;
}

.legal-consent input{
  width:auto;
  margin-top:3px;
  flex:0 0 auto;
}

.legal-consent button{
  border:0;
  background:transparent;
  color:var(--accent-600);
  font:inherit;
  font-weight:700;
  padding:0;
  cursor:pointer;
}

.legal-consent button:hover{
  color:var(--accent);
}

body.theme-dark .auth-mode-switch{
  background:#131416;
  border-color:rgba(255,255,255,0.1);
}

body.theme-dark .auth-mode-switch .btn:not(.active){
  background:transparent;
  color:var(--muted);
}

.modal-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.modal-actions-right{
  justify-content:flex-end;
}

.modal-close{
  position:absolute;
  right:12px;
  top:10px;
  border:0;
  background:transparent;
  font-size:20px;
  cursor:pointer;
  color:var(--text);
}

.modal[aria-hidden="false"]{
  display:flex;
}

.accessibility-section{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--border);
}

.accessibility-section h4{
  margin:0 0 10px;
  font-size:.98rem;
}

.theme-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.theme-buttons .btn.active{
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
}

body.theme-high-contrast .theme-buttons .btn.active{
  background:var(--border-default);
  color:#000;
  border-color:var(--border-default);
}

/* =========================
   DISPLAY THEME VARIANTS
   ========================= */
body.theme-soft .topbar{
  background:rgba(250,249,247,0.9);
  border-color:var(--border-subtle);
  box-shadow:var(--shadow-soft);
}

body.theme-soft .card,
body.theme-soft .modal-panel,
body.theme-soft .coming-soon-banner,
body.theme-soft .pricing-card,
body.theme-soft .step-card,
body.theme-soft .demo-reels,
body.theme-soft .demo-reel-card{
  background:var(--bg-raised);
  border-color:var(--border-default);
  box-shadow:var(--shadow);
}

body.theme-soft .hero-proof-strip div,
body.theme-soft .premium-strip div,
body.theme-soft .coming-soon-banner{
  background:var(--bg-raised);
  border-color:var(--border-subtle);
  box-shadow:var(--shadow);
}

body.theme-soft .pricing-card.featured{
  background:
    linear-gradient(135deg,var(--brand-tint),transparent 46%),
    var(--bg-raised);
  border-color:var(--brand-border);
  box-shadow:var(--shadow);
}

body.theme-soft .nested-card,
body.theme-soft .command-grid div,
body.theme-soft .readiness-item,
body.theme-soft .project-journey-step,
body.theme-soft .guided-action,
body.theme-soft .handoff-grid div,
body.theme-soft .client-summary-grid div,
body.theme-soft .client-guidance-grid div,
body.theme-soft .client-attention-item,
body.theme-soft .client-flow-step,
body.theme-soft .first-run-steps div,
body.theme-soft .account-summary-tile,
body.theme-soft .developer-diagnostics-readiness,
body.theme-soft .demo-project-result,
body.theme-soft .account-plan-card{
  background:var(--bg-subtle);
  border-color:var(--border-subtle);
}

body.theme-soft .project-journey-step.active,
body.theme-soft .guided-action{
  background:var(--brand-tint);
  border-color:var(--brand-border);
}

body.theme-soft .btn-secondary,
body.theme-soft .btn-ghost,
body.theme-soft input,
body.theme-soft select,
body.theme-soft textarea,
body.theme-soft .project-tab,
body.theme-soft .setup-step,
body.theme-soft .list-item,
body.theme-soft .agreement-row,
body.theme-soft .usage-meter{
  background:var(--bg-raised);
  border-color:var(--border-default);
}

body.theme-soft .btn-ghost:hover,
body.theme-soft .btn-secondary:hover,
body.theme-soft .project-tab:hover,
body.theme-soft .setup-step:hover,
body.theme-soft .list-item:hover{
  background:var(--bg-subtle);
  border-color:var(--border-default);
}

body.theme-dusk .topbar{
  background:rgba(44,52,72,0.9);
  border-color:var(--border-subtle);
  box-shadow:none;
  backdrop-filter:blur(8px);
}

body.theme-dusk .btn-ghost,
body.theme-dusk .btn-secondary{
  background:transparent;
  color:var(--text);
  border-color:var(--border-default);
}

body.theme-dusk .btn-ghost:hover,
body.theme-dusk .btn-secondary:hover{
  background:var(--bg-overlay);
  border-color:var(--brand-border);
}

body.theme-dusk input,
body.theme-dusk select,
body.theme-dusk textarea{
  background:var(--bg-subtle);
  color:var(--text);
  border-color:var(--border);
  box-shadow:none;
}

body.theme-dusk input::placeholder,
body.theme-dusk textarea::placeholder{
  color:var(--text-faint);
}

body.theme-dusk input:focus-visible,
body.theme-dusk select:focus-visible,
body.theme-dusk textarea:focus-visible{
  border-color:var(--brand);
  box-shadow:0 0 0 4px var(--focus-ring);
}

body.theme-dusk .card,
body.theme-dusk .command-card,
body.theme-dusk .modal-panel,
body.theme-dusk .coming-soon-banner,
body.theme-dusk .pricing-card,
body.theme-dusk .step-card,
body.theme-dusk .demo-reels,
body.theme-dusk .demo-reel-card{
  background:var(--bg-raised);
  border-color:var(--border-default);
  box-shadow:none;
}

body.theme-dusk .hero-proof-strip div,
body.theme-dusk .premium-strip div,
body.theme-dusk .coming-soon-banner,
body.theme-dusk .demo-reels{
  background:
    linear-gradient(135deg,var(--brand-tint),transparent 48%),
    var(--bg-raised);
  border-color:var(--border-default);
  box-shadow:none;
}

body.theme-dusk .pricing-card.featured{
  background:
    linear-gradient(135deg,rgba(253,78,47,0.08),transparent 48%),
    var(--bg-raised);
  border-color:var(--brand-border);
  border-top:3px solid var(--brand);
  box-shadow:none;
}

body.theme-dusk .nested-card,
body.theme-dusk .health-score,
body.theme-dusk .command-grid div,
body.theme-dusk .readiness-item,
body.theme-dusk .project-journey-step,
body.theme-dusk .guided-action,
body.theme-dusk .handoff-grid div,
body.theme-dusk .client-summary-grid div,
body.theme-dusk .client-guidance-grid div,
body.theme-dusk .client-attention-item,
body.theme-dusk .client-flow-step,
body.theme-dusk .first-run-steps div,
body.theme-dusk .list-item,
body.theme-dusk .agreement-row,
body.theme-dusk .project-list-item,
body.theme-dusk .project-tab,
body.theme-dusk .setup-step,
body.theme-dusk .account-summary-tile,
body.theme-dusk .developer-diagnostics-readiness,
body.theme-dusk .demo-project-result,
body.theme-dusk .account-plan-card,
body.theme-dusk .usage-meter{
  background:var(--bg-subtle);
  border-color:var(--border-default);
}

body.theme-dusk .account-share-badge,
body.theme-dusk .rights-license-panel,
body.theme-dusk .project-health{
  background:var(--bg-overlay);
  border-color:var(--border-default);
  box-shadow:none;
}

body.theme-dusk .project-journey-step.active,
body.theme-dusk .guided-action{
  background:var(--brand-tint);
  border-color:var(--brand-border);
}

body.theme-dusk .card:hover{
  box-shadow:none;
}

body.theme-dusk .project-list-item:hover,
body.theme-dusk .project-tab:hover,
body.theme-dusk .setup-step:hover,
body.theme-dusk .list-item:hover{
  background:var(--bg-overlay);
  border-color:var(--brand-border);
}

body.theme-dusk .project-list-item.active,
body.theme-dusk .project-tab.active,
body.theme-dusk .setup-step.active,
body.theme-dusk .billing-actions .btn.active,
body.theme-dusk .account-plan-card.active{
  background:var(--brand-tint);
  border-color:var(--brand-border);
  color:var(--text-primary);
}

body.theme-dusk .status-chip,
body.theme-dusk .empty-state{
  background:var(--bg-overlay);
  border-color:var(--border-default);
}

body.theme-dusk .agreement-textarea:focus-visible{
  background:var(--bg-subtle);
}

body.theme-dusk .billing-card{
  background:
    linear-gradient(135deg,var(--brand-tint),transparent 52%),
    var(--surface);
}

body.theme-dusk .upgrade-note,
body.theme-dusk .danger-panel{
  border-color:var(--brand-border);
  color:var(--text-secondary);
}

body.theme-dusk .danger-panel{
  background:var(--bg-subtle);
}

body.theme-dusk .upgrade-note{
  background:var(--brand-tint);
}

body.theme-dusk .site-footer{
  background:var(--bg-page);
  border-top-color:var(--border-subtle);
}

body.theme-dusk .footer-inner{
  color:var(--text-faint);
}

body.theme-dusk .footer-links button{
  color:var(--text-muted);
  font-weight:700;
}

body.theme-dusk .footer-links button:hover{
  color:var(--brand);
}

body.theme-dark .topbar{
  background:rgba(28,34,50,0.88);
  border-color:var(--border-subtle);
  box-shadow:none;
}

body.theme-dark .card,
body.theme-dark .command-card,
body.theme-dark .modal-panel,
body.theme-dark .coming-soon-banner,
body.theme-dark .pricing-card,
body.theme-dark .step-card,
body.theme-dark .demo-reels,
body.theme-dark .demo-reel-card{
  background:var(--bg-raised);
  border-color:var(--border-default);
  box-shadow:none;
}

body.theme-dark .hero-proof-strip div,
body.theme-dark .premium-strip div{
  background:
    linear-gradient(135deg,rgba(253,78,47,0.06),transparent 48%),
    var(--bg-raised);
  border-color:var(--border-subtle);
  box-shadow:none;
}

body.theme-dark .pricing-card.featured{
  border-color:var(--brand-border);
  border-top:3px solid var(--brand);
  background:
    linear-gradient(135deg,var(--brand-tint),transparent 48%),
    var(--bg-raised);
}

body.theme-dark .btn-secondary,
body.theme-dark .btn-ghost,
body.theme-dark .pricing-card:not(.featured) .btn-primary{
  background:transparent;
  border-color:var(--brand);
  color:var(--brand);
  box-shadow:none;
}

body.theme-dark .btn-secondary:hover,
body.theme-dark .btn-ghost:hover,
body.theme-dark .pricing-card:not(.featured) .btn-primary:hover{
  background:var(--brand-tint);
  border-color:var(--brand);
}

body.theme-dark .nested-card,
body.theme-dark .project-list-item,
body.theme-dark .project-tab,
body.theme-dark .setup-step,
body.theme-dark .list-item,
body.theme-dark .agreement-row,
body.theme-dark .usage-meter,
body.theme-dark .client-summary-grid div,
body.theme-dark .client-guidance-grid div,
body.theme-dark .client-attention-item,
body.theme-dark .client-flow-step,
body.theme-dark .account-plan-card{
  background:var(--bg-subtle);
  border-color:var(--border-default);
}

body.theme-dark .project-health,
body.theme-dark .rights-license-panel{
  background:var(--bg-overlay);
  border-color:var(--border-default);
  box-shadow:none;
}

body.theme-dark .agreement-textarea:focus-visible{
  background:var(--bg-subtle);
}

body.theme-dark .project-list-item.active,
body.theme-dark .project-tab.active,
body.theme-dark .setup-step.active,
body.theme-dark .billing-actions .btn.active,
body.theme-dark .account-plan-card.active{
  background:var(--brand-tint);
  border-color:var(--brand-border);
  color:var(--text-primary);
}

body.theme-dark .site-footer{
  background:var(--bg-page);
  border-top-color:var(--border-subtle);
}

body.theme-dark .footer-inner{
  color:var(--text-faint);
}

body.theme-high-contrast .topbar,
body.theme-high-contrast .card,
body.theme-high-contrast .nested-card,
body.theme-high-contrast .command-card,
body.theme-high-contrast .modal-panel,
body.theme-high-contrast .coming-soon-banner,
body.theme-high-contrast .pricing-card,
body.theme-high-contrast .step-card,
body.theme-high-contrast .demo-reels,
body.theme-high-contrast .demo-reel-card,
body.theme-high-contrast .demo-reel-media,
body.theme-high-contrast .hero-proof-strip div,
body.theme-high-contrast .premium-strip div,
body.theme-high-contrast .health-score,
body.theme-high-contrast .command-grid div,
body.theme-high-contrast .readiness-item,
body.theme-high-contrast .project-journey-step,
body.theme-high-contrast .guided-action,
body.theme-high-contrast .handoff-grid div,
body.theme-high-contrast .client-summary-grid div,
body.theme-high-contrast .client-guidance-grid div,
body.theme-high-contrast .client-attention-item,
body.theme-high-contrast .client-flow-step,
body.theme-high-contrast .first-run-steps div,
body.theme-high-contrast .list-item,
body.theme-high-contrast .agreement-row,
body.theme-high-contrast .project-list-item,
body.theme-high-contrast .project-tab,
body.theme-high-contrast .setup-step,
body.theme-high-contrast .account-summary-tile,
body.theme-high-contrast .developer-diagnostics-readiness,
body.theme-high-contrast .demo-project-result,
body.theme-high-contrast .account-plan-card,
body.theme-high-contrast .usage-meter,
body.theme-high-contrast .billing-card,
body.theme-high-contrast .account-payment-setup,
body.theme-high-contrast .account-legal-note,
body.theme-high-contrast .account-share-badge,
body.theme-high-contrast .empty-state,
body.theme-high-contrast .status-chip,
body.theme-high-contrast .project-health,
body.theme-high-contrast .rights-license-panel,
body.theme-high-contrast .creation-skeleton,
body.theme-high-contrast .scopey-exit-toast,
body.theme-high-contrast .site-footer,
body.theme-high-contrast .legal-strip,
body.theme-high-contrast .legal-section,
body.theme-high-contrast .danger-panel{
  background:var(--bg-raised) !important;
  background-image:none !important;
  color:var(--text-primary);
  border-color:var(--border-default) !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}

body.theme-high-contrast .topbar,
body.theme-high-contrast .site-footer{
  border-width:0 0 2px;
}

body.theme-high-contrast .demo-mini,
body.theme-high-contrast .demo-mini::before,
body.theme-high-contrast .mini-form,
body.theme-high-contrast .mini-project-card,
body.theme-high-contrast .mini-contents,
body.theme-high-contrast .mini-document,
body.theme-high-contrast .mini-suggestion-card,
body.theme-high-contrast .mini-change-card,
body.theme-high-contrast .mini-recorded-banner{
  background:var(--bg-raised) !important;
  background-image:none !important;
  border-color:var(--border-default) !important;
  color:var(--text-primary) !important;
  box-shadow:none !important;
}

body.theme-high-contrast .mini-input,
body.theme-high-contrast .mini-contents span,
body.theme-high-contrast .mini-contents strong,
body.theme-high-contrast .mini-document div{
  background:var(--bg-subtle) !important;
  border-color:var(--border-default) !important;
}

body.theme-high-contrast .mini-button,
body.theme-high-contrast .mini-input-draw::after,
body.theme-high-contrast .mini-arrow::before,
body.theme-high-contrast .mini-arrow::after,
body.theme-high-contrast .mini-accepted-stamp{
  background:var(--text-primary) !important;
  color:var(--bg-page) !important;
}

body.theme-high-contrast .site-footer{
  border-width:2px 0 0;
}

body.theme-high-contrast .btn,
body.theme-high-contrast .btn-ghost,
body.theme-high-contrast .btn-secondary,
body.theme-high-contrast .project-tab,
body.theme-high-contrast .setup-step,
body.theme-high-contrast .client-contents-link,
body.theme-high-contrast input,
body.theme-high-contrast select,
body.theme-high-contrast textarea{
  background:var(--bg-page) !important;
  background-image:none !important;
  color:var(--text-primary);
  border:2px solid var(--border-default) !important;
  box-shadow:none !important;
}

body.theme-high-contrast .btn-primary,
body.theme-high-contrast .btn.active,
body.theme-high-contrast .project-list-item.active,
body.theme-high-contrast .project-tab.active,
body.theme-high-contrast .setup-step.active,
body.theme-high-contrast .client-contents-link.active,
body.theme-high-contrast .billing-actions .btn.active,
body.theme-high-contrast .account-plan-card.active,
body.theme-high-contrast .project-journey-step.active{
  background:var(--brand) !important;
  color:#000 !important;
  border-color:var(--brand) !important;
}

body.theme-high-contrast .btn-danger,
body.theme-high-contrast .danger-panel{
  border-color:var(--border-default) !important;
}

body.theme-high-contrast .btn-danger{
  background:var(--bg-page) !important;
  color:var(--text-primary) !important;
}

body.theme-high-contrast .btn:hover,
body.theme-high-contrast .btn-ghost:hover,
body.theme-high-contrast .btn-secondary:hover,
body.theme-high-contrast .project-list-item:hover,
body.theme-high-contrast .project-tab:hover,
body.theme-high-contrast .setup-step:hover,
body.theme-high-contrast .client-contents-link:hover,
body.theme-high-contrast .list-item:hover{
  background:var(--bg-subtle) !important;
  border-color:var(--border-default) !important;
}

body.theme-high-contrast .btn-primary:hover,
body.theme-high-contrast .btn.active:hover,
body.theme-high-contrast .project-tab.active:hover,
body.theme-high-contrast .setup-step.active:hover{
  background:var(--brand-hover) !important;
  border-color:var(--brand-hover) !important;
  color:#000 !important;
}

body.theme-high-contrast input::placeholder,
body.theme-high-contrast textarea::placeholder{
  color:var(--text-faint);
}

body.theme-high-contrast input:focus-visible,
body.theme-high-contrast select:focus-visible,
body.theme-high-contrast textarea:focus-visible,
body.theme-high-contrast .btn:focus-visible,
body.theme-high-contrast .project-tab:focus-visible,
body.theme-high-contrast .setup-step:focus-visible,
body.theme-high-contrast .client-contents-link:focus-visible{
  outline:3px solid var(--focus-ring);
  outline-offset:2px;
  border-color:var(--border-default) !important;
  box-shadow:none !important;
}

body.theme-high-contrast .banner,
body.theme-high-contrast .toast{
  background:var(--bg-raised) !important;
  color:var(--text-primary);
  border:2px solid var(--border-default) !important;
  box-shadow:none !important;
}

body.theme-high-contrast .banner.success,
body.theme-high-contrast .toast.success{
  border-color:var(--border-default) !important;
}

body.theme-high-contrast .banner.warning,
body.theme-high-contrast .toast.warning{
  border-color:var(--border-default) !important;
}

body.theme-high-contrast .banner.error,
body.theme-high-contrast .toast.error{
  border-color:var(--border-default) !important;
}

body.theme-high-contrast .status-chip,
body.theme-high-contrast .pill,
body.theme-high-contrast .badge,
body.theme-high-contrast .project-card-delete,
body.theme-high-contrast .project-health{
  background:var(--bg-page) !important;
  color:var(--text-primary);
  border:2px solid var(--border-default) !important;
  box-shadow:none !important;
}

body.theme-high-contrast a,
body.theme-high-contrast .btn-link,
body.theme-high-contrast .footer-links button{
  color:var(--brand);
}

body.theme-high-contrast .muted,
body.theme-high-contrast .brand-tagline,
body.theme-high-contrast .small,
body.theme-high-contrast .form-help,
body.theme-high-contrast .empty-state p,
body.theme-high-contrast .legal-strip p,
body.theme-high-contrast .site-footer,
body.theme-high-contrast .footer-inner{
  color:var(--text-primary);
}

body.theme-high-contrast .modal{
  background:rgba(0,0,0,0.92);
}

body.theme-high-contrast .creation-skeleton span{
  background:var(--bg-subtle);
}

@media (prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    scroll-behavior:auto !important;
    transition-duration:.01ms !important;
  }
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width:1024px){
  .hero{
    grid-template-columns:1fr;
    gap:24px;
  }

  .hero-copy{
    width:100%;
  }

  .hero-proof-strip{
    max-width:none;
  }

  .premium-strip{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .demo-reel-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .demo-reel-card:first-child{
    grid-column:1 / -1;
  }

  .coming-soon-banner{
    grid-template-columns:1fr;
  }

  .legal-strip{
    grid-template-columns:1fr;
  }

  .metrics-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .command-header,
  .command-grid,
  .readiness-list{
    grid-template-columns:1fr;
  }

  .setup-wizard{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .first-run-steps{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .guided-action{
    grid-template-columns:1fr;
  }

  .guided-action .btn{
    width:100%;
  }

  .dashboard-shell{
    grid-template-columns:1fr;
  }

  .client-shell{
    display:grid;
    grid-template-columns:1fr;
  }

  .client-shell > .card,
  .client-shell > #client-verification-card,
  .client-shell > #client-link-problem-card,
  .client-contents-card{
    grid-column:1;
    margin-left:0;
  }

  .client-contents-card{
    float:none;
    width:auto;
    margin:0 !important;
    top:82px;
    max-height:none;
    overflow:visible;
  }

  .client-contents-nav{
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding-bottom:4px;
    scrollbar-width:thin;
  }

  .client-contents-link{
    flex:0 0 auto;
    width:auto;
    white-space:nowrap;
  }

  .billing-card{
    grid-template-columns:minmax(0,1fr) minmax(220px,.6fr);
    grid-template-areas:
      "header usage"
      "details details"
      "actions actions"
      "note note";
  }

  .billing-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .account-plan-grid{
    grid-template-columns:1fr;
  }

  .account-payment-grid{
    grid-template-columns:1fr;
  }

  .launch-check-list{
    grid-template-columns:1fr;
  }

  .client-flow-steps{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:720px){
  .toast-region{
    right:16px;
    bottom:16px;
    width:calc(100vw - 32px);
  }

  .container{
    padding:0 16px;
  }

  .auth-panel{
    padding:28px 22px 24px;
    border-radius:20px;
  }

  .auth-mode-switch,
  .auth-actions{
    grid-template-columns:1fr;
  }

  .auth-actions .btn{
    width:100%;
  }

  .account-summary-grid{
    grid-template-columns:1fr;
  }

  .actions{
    justify-content:flex-start;
  }

  .footer-inner{
    align-items:flex-start;
    flex-direction:column;
  }

  .footer-links{
    justify-content:flex-start;
  }

  .hero h1{
    font-size:2.35rem;
    width:100%;
    grid-template-rows:1.12em 1.12em;
  }

  .hero-proof-strip{
    grid-template-columns:1fr;
  }

  .premium-strip{
    grid-template-columns:1fr;
  }

  .demo-reels{
    padding:22px;
  }

  .origin-block{
    padding-top:56px;
    padding-bottom:56px;
  }

  .origin-logo{
    margin-bottom:24px;
  }

  .origin-story p{
    font-size:18px;
  }

  .origin-divider{
    margin:36px auto;
  }

  .origin-beliefs{
    grid-template-columns:1fr;
    gap:0;
  }

  .origin-beliefs div{
    padding:24px 0;
  }

  .origin-beliefs div:first-child{
    padding-top:0;
  }

  .origin-beliefs div:last-child{
    padding-bottom:0;
  }

  .origin-beliefs div + div{
    border-top:1px solid var(--border-subtle);
    border-left:0;
  }

  .demo-reel-grid{
    grid-template-columns:1fr;
  }

  .demo-reel-card:first-child{
    grid-column:auto;
  }

  .legal-link-grid{
    grid-template-columns:1fr;
  }

  .account-legal-note{
    align-items:flex-start;
    flex-direction:column;
  }

  .account-share-badge{
    grid-template-columns:1fr;
    justify-items:flex-start;
  }

  .metrics-grid,
  .two-up-grid,
  .agreement-editor-grid,
  .handoff-grid,
  .handoff-readiness-list,
  .client-summary-grid,
  .client-guidance-grid,
  .first-run-steps,
  .client-flow-steps,
  .client-action-card{
    grid-template-columns:1fr;
  }

  .project-journey{
    display:flex;
    overflow-x:auto;
    padding-bottom:4px;
    scrollbar-width:thin;
  }

  .project-journey-step{
    flex:0 0 auto;
    min-width:112px;
  }

  .setup-wizard{
    display:flex;
    overflow-x:auto;
    padding-bottom:4px;
    scrollbar-width:thin;
  }

  .setup-step{
    flex:0 0 190px;
  }

  .client-hero-card{
    grid-template-columns:1fr;
  }

  .compose-form{
    grid-template-columns:1fr;
  }

  .form-row,
  .form-row-action,
  .agreement-template-grid,
  .project-create-grid,
  .project-settings-grid,
  .rights-summary-grid,
  .rights-artwork-card{
    grid-template-columns:1fr;
  }

  .project-header-row,
  .section-row{
    flex-direction:column;
    align-items:flex-start;
  }

  .billing-header,
  .usage-meter{
    align-items:flex-start;
  }

  .billing-card{
    grid-template-columns:1fr;
    grid-template-areas:
      "header"
      "usage"
      "details"
      "actions"
      "note";
    padding:26px 22px;
  }

  .billing-actions{
    grid-template-columns:1fr;
  }

  .project-actions{
    justify-content:flex-start;
  }

  .list-item{
    flex-direction:column;
    align-items:flex-start;
  }

  .item-meta{
    margin-top:12px;
    white-space:normal;
  }

  .action-stack{
    align-items:flex-start;
  }

  .rights-artwork-meta{
    justify-content:flex-start;
  }
}
