/* Authenticated Studio: shared identity, scoped geometry. The preview editor owns its own layout. */
.workspace-shell {
  --font: "Studio Instrument", system-ui, sans-serif; --font-display: var(--font);
  --radius: 14px; --radius-sm: 10px; --dur: 160ms; --ease: cubic-bezier(.4,0,.2,1);
  min-height: 100dvh; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font);
}
.workspace-shell .topbar { min-height: 88px; height: auto; padding: 16px max(24px, calc((100vw - 1280px)/2)); gap: 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.workspace-shell .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 24px/1 var(--font); letter-spacing: -.035em; min-height: 44px; flex: none; }
.workspace-shell .brand > span { display: block; }
.studio-mark { display: flex !important; width: 32px; height: 30px; align-items: center; }
.studio-mark > span { width: 33.333%; height: 24px; background: var(--accent); transform: skewY(-24deg); }
.studio-mark > span:nth-child(2) { transform: skewY(24deg); opacity: .65; }
.workspace-shell .workspace-nav { display: flex; gap: 4px; align-items: center; margin-left: 12px; }
.workspace-shell .workspace-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 10px 12px; font-size: 15px; font-weight: 500; color: var(--ink-3); text-decoration: none; border-radius: 8px; }
.workspace-shell .workspace-nav a:hover { background: var(--surface-2); color: var(--ink); }
.workspace-shell .workspace-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); font-weight: 600; }
.workspace-shell .workspace-nav a.admin-link { border-left: 1px solid var(--line); border-radius: 0 8px 8px 0; }
.workspace-shell .workspace-label { color: var(--ink-3); font-size: 14px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }
.workspace-shell .header-actions { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.workspace-shell .nav-toggle { display: none; }
.workspace-shell .page { width: min(100%, 1360px); max-width: 1360px; padding: 48px 40px 64px; margin: 0 auto; }
.workspace-shell .page-head { align-items: center; margin-bottom: 36px; gap: 24px; }
.workspace-shell .page-head > div { min-width: 0; }
.workspace-shell .page-head h1 { overflow-wrap: anywhere; }
.workspace-shell .page-head h1 { font-size: clamp(2rem, 2.6vw, 2.75rem); font-weight: 550; letter-spacing: -.045em; line-height: 1.15; }
.workspace-shell .page-head p { color: var(--ink-3); font-size: 16px; margin-top: 10px; max-width: 64ch; }
.workspace-shell .page-head .workspace-context { margin: 0 0 12px; color: var(--ink-3); font-size: 14px; }
.workspace-shell .btn-small { min-height: 44px; }
.workspace-shell .btn { font-size: 15px; }
.workspace-shell .btn:active:not(:disabled) { background: var(--surface-3); }
.workspace-shell .btn-primary:active:not(:disabled) { background: var(--accent-hover); }
.workspace-shell .subtle, .workspace-shell .hint, .workspace-shell .meta, .workspace-shell .badge { font-size: 14px; }
.workspace-shell .menu-pop { width: 300px; max-width: calc(100vw - 32px); border-color: var(--line-strong); padding: 12px; }
.workspace-shell .menu-pop .who { padding: 8px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: 14px; overflow-wrap: anywhere; }
.workspace-shell .menu-pop a, .workspace-shell .menu-pop button { display: flex; justify-content: flex-start; width: 100%; min-height: 44px; text-decoration: none; border-radius: 8px; }
.workspace-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.workspace-operations, .workspace-secondary { display: grid; gap: 24px; min-width: 0; }
.work-section { min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; overflow: clip; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 84px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.section-heading h2 { font-size: 19px; font-weight: 550; letter-spacing: -.025em; }
.section-heading > .btn { flex-shrink: 0; padding-inline: 8px; }
.section-empty { padding: 28px 24px; color: var(--ink-3); }
.workspace-shell .site-list { display: grid; gap: 0; }
.workspace-shell .site-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 24px; display: flex; flex-direction: row; align-items: center; text-align: left; gap: 18px; background: var(--surface); box-shadow: none; min-width: 0; }
.workspace-shell .site-card:last-child { border-bottom: 0; }
.site-symbol { width: 48px; height: 56px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px 12px 6px 6px; color: var(--ink-3); flex-shrink: 0; }
.site-description { min-width: 0; flex: 1; }
.workspace-shell .site-card h2 { font-size: 18px; line-height: 1.4; font-weight: 550; overflow-wrap: anywhere; }
.workspace-shell .site-card h2 a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.workspace-shell .site-card h2 a:hover { text-decoration: underline; }
.workspace-shell .site-card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; overflow-wrap: anywhere; }
.workspace-shell .site-card .actions { margin: 0; flex-shrink: 0; }
.recent-work { min-height: 320px; }
.first-site { min-height: 390px; padding: 48px 40px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; }
.first-site h2 { font-size: 28px; font-weight: 500; letter-spacing: -.035em; max-width: 15ch; }
.first-site p { max-width: 38ch; color: var(--ink-3); }
.workspace-fold { display: flex; width: 90px; height: 64px; align-items: center; margin: 0 0 16px; }
.workspace-fold > span { width: 33.333%; height: 48px; background: var(--accent); transform: skewY(-24deg); }
.workspace-fold > span:nth-child(2) { transform: skewY(24deg); background: var(--accent-hover); }
.workspace-status { display: grid; gap: 12px; padding: 24px; }
.workspace-status strong { font-size: 24px; font-weight: 500; letter-spacing: -.035em; }
.workspace-status a { display: inline-flex; align-items: center; min-height: 44px; }
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-list > li { display: flex; gap: 12px; align-items: flex-start; padding: 20px 24px; border-bottom: 1px solid var(--line); min-width: 0; }
.activity-list > li:last-child { border: 0; }
.activity-icon { color: var(--ink-3); margin-top: 3px; }
.activity-copy { display: flex; flex-direction: column; align-items: flex-start; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.activity-copy > * + * { margin-top: 4px; }
.activity-copy > strong { font-weight: 550; }
.activity-copy a { display: inline-flex; align-items: center; min-height: 44px; }
.activity-list .badge { flex-shrink: 0; max-width: 40%; white-space: normal; overflow-wrap: anywhere; }
.snapshot { line-height: 1.7; }
.library-tools { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.library-tools .field { width: min(100%, 420px); }
.library-more { display: flex; justify-content: center; margin-top: 24px; }
.workspace-shell .page > .stack-lg > .site-list { border: 1px solid var(--line); border-radius: 16px; overflow: clip; }
.workspace-shell .empty { border: 1px solid var(--line); background: var(--surface); padding: 48px 32px; min-height: 280px; }
.workspace-shell .empty .workspace-fold { margin: 0 auto 24px; }
.workspace-shell .empty h2 { font-size: 28px; font-weight: 500; letter-spacing: -.035em; }
.workspace-shell .card { box-shadow: none; padding: 24px; }
.workspace-shell .card h2 { font-size: 20px; }
.email-workspace .email-service-state { border-inline-start: 4px solid var(--accent); padding: 12px 16px; margin-bottom: 24px; color: var(--ink-2); }
.email-workspace .email-form-host:empty, .email-workspace .email-feedback:empty { display: none; }
.email-workspace .email-form { max-width: 640px; display: grid; gap: 20px; margin-bottom: 32px; }
.email-workspace .email-feedback { margin-bottom: 24px; overflow-wrap: anywhere; }
.email-workspace .email-record h3, .email-workspace .email-record p { overflow-wrap: anywhere; }
.inbox-access-link { margin-top:12px; }
.inbox-access-link p { margin:0 0 8px; }
.inbox-access-link .btn { min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.email-workspace .email-record h3 { font-size: 18px; line-height: 1.4; }
.email-workspace .email-record .row-between > div { min-width: 0; }
.email-workspace .email-record .badge { flex-shrink: 0; }
.email-workspace .email-record > p, .email-workspace .email-record > .row { margin-top: 16px; }
.email-workspace .email-refresh { margin-top: 32px; }
.email-workspace section + section { margin-top: 36px; }
.email-domain-check, .email-domain-check .stack, .email-domain-check .field,
.email-domain-reservation, .email-domain-reservation .stack, .email-domain-reservation .field { min-width: 0; }
.email-domain-check h2, .email-domain-check p,
.email-domain-reservation h2, .email-domain-reservation p, .email-domain-reservation .btn { overflow-wrap: anywhere; }
.email-domain-reservation .btn { max-width: 100%; white-space: normal; }
.email-domain-check textarea { max-width: 100%; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 16px; }
.domains-title { border-inline-start: 6px solid var(--accent); padding-inline-start: 24px; }
.domains-feedback:empty { display: none; }
.domains-service-state { color: var(--ink-2); max-width: 65ch; }
.domains-form { display: grid; gap: 20px; max-width: 800px; }
.domains-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.domains-fields > [hidden] { display: none; }
.domains-workspace .field, .domains-record, .domains-record .row-between > * { min-width: 0; }
.domains-record h3, .domains-record p, .domains-feedback { overflow-wrap: anywhere; }
.domains-record h3 { font-size: 18px; }
.domains-record > p, .domains-record > .row { margin-top: 16px; }
.domains-recovery { max-width: 640px; display: grid; gap: 16px; }
.domain-quotes, .domain-terms { min-width: 0; }
.domain-price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 10px 20px; }
.domain-price dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.domain-terms p, .domain-terms h4, .domain-quotes h3 { overflow-wrap: anywhere; }
.domain-terms-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.domain-consent, .domain-consent p { min-width: 0; overflow-wrap: anywhere; }
.domain-affirmation { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-block: 10px; line-height: 1.5; cursor: pointer; }
.domain-affirmation input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; }
.domains-workspace .input { font-size: 16px; }
@media (max-width: 560px) { .domains-fields { grid-template-columns: minmax(0,1fr); } }
.workspace-shell .notice { font-size: 15px; }
.workspace-shell .notice-body { min-width: 0; overflow-wrap: anywhere; }
.workspace-shell .notice-body .btn { max-width: 100%; white-space: normal; padding-block: 10px; line-height: 1.3; }
.workspace-shell .sheet { color: var(--ink); background: var(--surface); }
.workspace-shell .sheet .tab { min-height: 44px; }
.workspace-shell .sheet .tpl { border-color: var(--line-strong); }
.admin-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
.metric-group { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.metric-group h2 { font-size: 19px; font-weight: 550; overflow-wrap: anywhere; }
.metric-group dl { margin: 20px 0 0; display: grid; gap: 8px; }
.metric-group dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.metric-group dt { color: var(--ink-3); text-transform: capitalize; overflow-wrap: anywhere; }
.metric-group dd { margin: 0; font-variant-numeric: tabular-nums; }
.metric-group dl > div:first-child { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 4px; }
.metric-group dl > div:first-child dd { font-size: 32px; line-height: 1; letter-spacing: -.035em; }
.admin-records { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; align-items: start; }
.record-id { font-variant-numeric: tabular-nums; }
.inventory-status { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.admin-inventory .library-more { margin: 0; padding: 0 24px 20px; }
.admin-inventory .library-more:has(> [hidden]) { display: none; }
.capability-list { display: grid; gap: 24px; padding: 24px; }
.capability-list h3 { font-size: 16px; font-weight: 550; margin-bottom: 8px; }
.capability-list p { color: var(--ink-3); }
.capability-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.capability-list li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
@media (max-width: 1100px) {
  .workspace-shell .topbar { gap: 12px; padding-inline: 24px; }
  .workspace-shell .workspace-label { display: none; }
  .workspace-shell .page { padding: 40px 24px 56px; }
  .workspace-body { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
  .section-heading { padding: 16px; flex-wrap: wrap; }
  .workspace-shell .site-card { padding: 20px 16px; gap: 12px; }
  .admin-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .workspace-shell .topbar { display: flex; flex-wrap: wrap; justify-content: space-between; min-height: 80px; gap: 8px; position: relative; }
  .workspace-shell .nav-toggle { display: inline-flex; margin-left: auto; }
  .workspace-shell .header-actions { margin-left: 0; }
  .workspace-shell .workspace-nav { display: none; width: 100%; margin: 8px 0 0; order: 5; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
  .workspace-shell .workspace-nav[data-open] { display: flex; }
  .workspace-shell .workspace-nav a { flex: 1 1 40%; }
  .workspace-body { grid-template-columns: minmax(0,1fr); }
  .workspace-secondary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .recent-work { min-height: 430px; }
  .first-site { min-height: 320px; }
}
@media (max-width: 560px) {
  .workspace-shell .topbar { padding: 12px 5vw; }
  .workspace-shell .brand { font-size: 22px; gap: 7px; }
  .workspace-shell .brand > span { display: block; }
  .workspace-shell .studio-mark { width: 26px; }
  .workspace-shell .studio-mark > span { display: block; }
  .workspace-shell .nav-toggle { padding-inline: 12px; }
  .workspace-shell .page { padding: 32px 5vw 48px; }
  .workspace-shell .page-head { align-items: flex-start; margin-bottom: 28px; }
  .workspace-shell .page-head > .btn { width: 100%; }
  .workspace-shell .page-head h1 { font-size: 32px; }
  .workspace-shell .page-head p { line-height: 1.6; }
  .workspace-shell .site-card { flex-wrap: wrap; }
  .site-symbol { width: 36px; height: 44px; }
  .workspace-shell .site-card .actions { flex-basis: 100%; padding-left: 48px; }
  .workspace-shell .site-card .actions .btn { flex: 1; }
  .workspace-shell .site-card h2 { font-size: 18px; }
  .first-site { padding: 32px 24px; }
  .workspace-secondary, .admin-records { grid-template-columns: minmax(0,1fr); }
  .activity-list > li { padding: 20px 16px; gap: 10px; }
  .library-tools { flex-direction: column; align-items: stretch; gap: 12px; }
  .library-tools .field { width: 100%; }
  .admin-summary { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12em), 1fr)); gap: 12px; }
  .metric-group { padding: 16px; }
  .metric-group dl > div { gap: 8px; flex-wrap: wrap; }
  .metric-group dt { font-size: 14px; }
  .metric-group h2 { font-size: 17px; }
  .workspace-shell .sheet-foot { flex-wrap: wrap; }
  .workspace-shell .sheet-foot > .grow { flex-basis: 100%; }
  .workspace-shell .sheet-foot > .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .workspace-shell *, .workspace-shell *::before, .workspace-shell *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
