/* Clear Ground — shared workspace shell.
   Used by handbook, performance-pack, investigations, recruit, templates, awards, admin.
   Provides: fixed sidebar, mobile bar, page header pattern, refined surfaces.
   Kept brand-true: teal #0D9488, Playfair Display headings, DM Sans body. */

:root {
  --ws-bg:           #F4F6F4;
  --ws-surface:      #FFFFFF;
  --ws-sidebar-bg:   #FBFCFB;
  --ws-border:       #E5E7EB;
  --ws-border-soft:  #EEF2F1;
  --ws-text:         #0F172A;
  --ws-text-strong:  #0B1220;
  --ws-text-muted:   #64748B;
  --ws-text-subtle:  #94A3B8;
  --ws-teal:         #0D9488;
  --ws-teal-deep:    #0F766E;
  --ws-teal-soft:    #F0FDFA;
  --ws-teal-line:    #CCFBF1;
  --ws-shadow-sm:    0 1px 2px rgba(15,23,42,0.04);
  --ws-shadow-card:  0 1px 2px rgba(15,23,42,0.04), 0 8px 24px -10px rgba(15,23,42,0.10);
  --ws-shadow-md:    0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --ws-shadow-lg:    0 4px 14px rgba(15,23,42,0.08);
  --ws-shadow-pop:   0 8px 28px -8px rgba(13,148,136,0.28);
  --ws-radius:       10px;
  --ws-radius-lg:    14px;
  --ws-radius-xl:    18px;
  --ws-sidebar-w:    248px;
}

body.ws-body {
  margin: 0;
  padding-left: var(--ws-sidebar-w);
  background: var(--ws-bg);
  color: var(--ws-text);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Sidebar ---------- */
.ws-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--ws-sidebar-w);
  background: var(--ws-sidebar-bg);
  border-right: 1px solid var(--ws-border);
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.ws-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 22px 18px;
  text-decoration: none;
  color: var(--ws-text);
  border-bottom: 1px solid var(--ws-border-soft);
}
.ws-brand-mark { width: 28px; height: 22px; flex-shrink: 0; }
.ws-brand-text { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.ws-brand-text > span { color: var(--ws-teal); }

.ws-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ws-nav-section {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ws-text-subtle);
  padding: 18px 12px 8px;
}
.ws-nav-section:first-child { padding-top: 6px; }

.ws-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.ws-nav-item:hover {
  background: var(--ws-teal-soft);
  color: var(--ws-teal-deep);
}
.ws-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
  stroke-width: 1.8;
}
.ws-nav-item.active {
  background: var(--ws-teal-soft);
  color: var(--ws-teal-deep);
  font-weight: 600;
  position: relative;
}
.ws-nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ws-teal);
}
.ws-nav-item.active svg { opacity: 1; color: var(--ws-teal-deep); }

.ws-sidebar-foot {
  padding: 12px 14px;
  border-top: 1px solid var(--ws-border-soft);
  font-size: 11px;
  color: var(--ws-text-subtle);
  letter-spacing: 0.02em;
}

/* ---------- Mobile bar (shows < 880px) ---------- */
.ws-mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--ws-surface);
  border-bottom: 1px solid var(--ws-border);
  position: sticky;
  top: 0;
  z-index: 25;
}
.ws-mobile-toggle {
  background: none;
  border: 1px solid var(--ws-border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ws-text);
  padding: 6px 8px;
  display: flex;
}

/* ---------- Page header — slim context bar.
   Demoted from a hero to a "you are here" strip so the in-tool step title
   becomes the natural primary heading (avoids competing-titles problem). */
.ws-page-head {
  background: var(--ws-surface);
  border-bottom: 1px solid var(--ws-border-soft);
  padding: 14px 32px;
}
.ws-page-head-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  min-height: 28px;
}
.ws-page-head-text { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ws-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ws-teal);
  margin: 0;
  padding-right: 12px;
  border-right: 1px solid var(--ws-border);
  line-height: 1;
}
.ws-title {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ws-text-strong);
  margin: 0;
  letter-spacing: -0.005em;
}
.ws-title em {
  color: var(--ws-teal-deep);
  font-style: normal;
  font-weight: 600;
}
.ws-subtitle {
  margin: 0;
  color: var(--ws-text-subtle);
  font-size: 13px;
  line-height: 1.4;
}
@media (max-width: 720px) {
  .ws-subtitle { display: none; }
}
.ws-page-head-actions { display: flex; gap: 10px; flex-shrink: 0; }

.ws-page-body {
  padding: 28px 40px 64px;
}
.ws-page-inner {
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- Refined card surface (apply via .ws-card or extend in tool CSS) ---------- */
.ws-card {
  background: var(--ws-surface);
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius-xl);
  box-shadow: var(--ws-shadow-card);
}

/* ============================================================
   POLISH LAYER — scoped to body.ws-body so it lifts the existing
   tool content without rewriting per-tool CSS. Targets legacy
   classes already in use across handbook, recruit, awards,
   templates, performance-pack, investigations, admin.
   ============================================================ */

/* Lift cards across all tools */
body.ws-body .hb-card,
body.ws-body .rc-content,
body.ws-body .rc-sidebar,
body.ws-body .tf-template-card,
body.ws-body .pp-card,
body.ws-body .inv-card,
body.ws-body .card,
body.ws-body .awards-card,
body.ws-body .aw-card {
  background: var(--ws-surface);
  border: 1px solid var(--ws-border-soft) !important;
  border-radius: var(--ws-radius-xl) !important;
  box-shadow: var(--ws-shadow-card) !important;
}

/* Recruit's split layout — keep sidebar attached to content visually */
body.ws-body .rc-layout {
  border-radius: var(--ws-radius-xl);
  overflow: hidden;
  background: var(--ws-surface);
  border: 1px solid var(--ws-border-soft);
  box-shadow: var(--ws-shadow-card);
}
body.ws-body .rc-layout > .rc-sidebar,
body.ws-body .rc-layout > .rc-content {
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
body.ws-body .rc-layout > .rc-sidebar { border-right: 1px solid var(--ws-border-soft) !important; background: #FAFCFB !important; }

/* Step bar — flat 28px circles with 2px teal ring, charcoal number.
   Removed the teal glow per design review (it read as decorative). */
body.ws-body .step-bar { padding: 4px 0 10px; }
body.ws-body .step-circle {
  width: 28px !important;
  height: 28px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  box-shadow: none !important;
}
body.ws-body .step-circle.active {
  background: #fff !important;
  color: var(--ws-text-strong) !important;
  border: 2px solid var(--ws-teal) !important;
}
body.ws-body .step-circle.done {
  background: var(--ws-teal) !important;
  color: #fff !important;
  border: 2px solid var(--ws-teal) !important;
}
body.ws-body .step-circle.pending {
  background: #fff !important;
  color: var(--ws-text-subtle) !important;
  border: 1.5px solid #D6DEE3 !important;
}
body.ws-body .step-bar-line { background: #E2E8F0 !important; height: 2px !important; }
body.ws-body .step-label { font-size: 11.5px; }
body.ws-body .step-label.active { color: var(--ws-text-strong) !important; font-weight: 600 !important; }

/* In-card primary headings — promote so they own the page */
body.ws-body .hb-step-title,
body.ws-body .pp-step-title,
body.ws-body .inv-step-title,
body.ws-body .rc-stage-title,
body.ws-body .tf-templates-header h2 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 26px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  color: var(--ws-text-strong) !important;
  letter-spacing: -0.01em !important;
  margin-bottom: 8px !important;
}
body.ws-body .hb-step-desc,
body.ws-body .pp-step-desc,
body.ws-body .inv-step-desc { font-size: 14.5px !important; color: var(--ws-text-muted) !important; line-height: 1.6 !important; margin-bottom: 28px !important; }

/* Generic section labels — refine spacing */
body.ws-body .section-label,
body.ws-body .review-label,
body.ws-body .review-policies-header { letter-spacing: 0.1em !important; }

/* Form input polish — calmer borders, teal focus glow */
body.ws-body input[type="text"],
body.ws-body input[type="email"],
body.ws-body input[type="password"],
body.ws-body input[type="number"],
body.ws-body input[type="tel"],
body.ws-body input[type="search"],
body.ws-body input[type="url"],
body.ws-body input[type="date"],
body.ws-body textarea,
body.ws-body select {
  border-radius: 10px !important;
  border: 1px solid #DDE3E1 !important;
  padding: 11px 14px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  background: #FCFDFD !important;
  color: var(--ws-text-strong) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(15,23,42,0.02);
  width: 100%;
  box-sizing: border-box;
}
body.ws-body textarea { min-height: 96px; line-height: 1.55; }
body.ws-body input:focus,
body.ws-body textarea:focus,
body.ws-body select:focus {
  outline: none !important;
  border-color: var(--ws-teal) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(13,148,136,0.14) !important;
}
body.ws-body label,
body.ws-body .form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ws-text-strong);
  letter-spacing: 0.005em;
}

/* Primary buttons — gradient + lift */
body.ws-body .btn-primary,
body.ws-body button.primary,
body.ws-body .pp-btn-primary,
body.ws-body .inv-btn-primary,
body.ws-body .hb-btn-primary,
body.ws-body .rc-btn-primary,
body.ws-body .aw-btn-primary {
  background: linear-gradient(180deg, #14A89B 0%, #0D9488 60%, #0F766E 100%) !important;
  color: #fff !important;
  border: 1px solid var(--ws-teal-deep) !important;
  padding: 10px 20px !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  letter-spacing: 0.01em !important;
  cursor: pointer !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, var(--ws-shadow-pop) !important;
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
  font-family: inherit !important;
}
body.ws-body .btn-primary:hover,
body.ws-body .pp-btn-primary:hover,
body.ws-body .inv-btn-primary:hover,
body.ws-body .hb-btn-primary:hover,
body.ws-body .rc-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset, 0 12px 32px -8px rgba(13,148,136,0.42) !important;
}
body.ws-body .btn-primary:active { transform: translateY(0); filter: brightness(0.97); }
body.ws-body .btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; filter: grayscale(0.3); }

body.ws-body .btn-secondary {
  background: #fff !important;
  color: var(--ws-text-strong) !important;
  border: 1px solid #DDE3E1 !important;
  padding: 9px 18px !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background 0.12s, border-color 0.12s !important;
}
body.ws-body .btn-secondary:hover {
  background: var(--ws-teal-soft) !important;
  border-color: var(--ws-teal-line) !important;
  color: var(--ws-teal-deep) !important;
}

/* Recruit checklist polish */
body.ws-body .rc-check-item {
  border: 1px solid transparent;
  padding: 12px 14px !important;
  transition: background 0.12s, border-color 0.12s;
}
body.ws-body .rc-check-item:hover {
  background: var(--ws-teal-soft) !important;
  border-color: var(--ws-teal-line);
}
body.ws-body .rc-check-item.checked {
  background: rgba(13,148,136,0.06) !important;
  border-color: rgba(13,148,136,0.18);
}
body.ws-body .rc-stage-pill,
body.ws-body .stage-pill {
  background: var(--ws-teal-soft) !important;
  color: var(--ws-teal-deep) !important;
  border: 1px solid var(--ws-teal-line) !important;
  border-radius: 999px !important;
  padding: 4px 12px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
}

/* Recruit sidebar item active */
body.ws-body .rc-sidebar-item.active,
body.ws-body .rc-sidebar-item[aria-current="page"] {
  background: var(--ws-teal-soft) !important;
  color: var(--ws-text-strong) !important;
  border-left: 3px solid var(--ws-teal) !important;
}

/* Templates / awards card grid items */
body.ws-body .tf-template-card,
body.ws-body .aw-card {
  padding: 22px !important;
  transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.15s ease;
}
body.ws-body .tf-template-card:hover,
body.ws-body .aw-card:hover {
  transform: translateY(-2px);
  border-color: var(--ws-teal-line) !important;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 16px 32px -12px rgba(13,148,136,0.18) !important;
}

/* Tighten spacing inside cards globally */
body.ws-body .hb-card,
body.ws-body .pp-card,
body.ws-body .inv-card,
body.ws-body .card { padding: 32px 32px !important; }

/* ============================================================
   RECORDS LIST — left-accent architecture, gradient-ghost leading
   element, hover lift with teal-tinted shadow, fade-in trailing.
   Targets: .pack-list-item (perf-pack), .inv-list-item
   (investigations), .tf-tpl-item (templates), .history-item (chat),
   and a generic .ws-record-item class for future use.
   ============================================================ */
body.ws-body .pack-list-item,
body.ws-body .inv-list-item,
body.ws-body .ws-record-item,
body.ws-body .history-item {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 14px 18px 14px 72px !important;
  margin: 0 0 8px !important;
  background: #fff !important;
  border: 1px solid var(--ws-border-soft) !important;
  border-left: 3px solid transparent !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1),
              border-left-color 0.18s ease,
              background 0.15s ease !important;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03) !important;
}
body.ws-body .pack-list-item::before,
body.ws-body .inv-list-item::before,
body.ws-body .ws-record-item::before,
body.ws-body .history-item::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(13,148,136,0.18) 0%, rgba(20,184,166,0.10) 100%);
  border: 1px solid rgba(13,148,136,0.14);
  transition: background 0.18s ease, border-color 0.18s ease;
}
body.ws-body .pack-list-item:hover,
body.ws-body .inv-list-item:hover,
body.ws-body .ws-record-item:hover,
body.ws-body .history-item:hover {
  transform: translateY(-2px) !important;
  border-left-color: var(--ws-teal) !important;
  border-color: var(--ws-teal-line) !important;
  box-shadow: 0 4px 14px -2px rgba(13,148,136,0.18),
              0 2px 4px rgba(15,23,42,0.04) !important;
}
body.ws-body .pack-list-item:hover::before,
body.ws-body .inv-list-item:hover::before,
body.ws-body .ws-record-item:hover::before {
  background: linear-gradient(135deg, rgba(13,148,136,0.28) 0%, rgba(20,184,166,0.16) 100%);
  border-color: rgba(13,148,136,0.28);
}
body.ws-body .pack-list-item.active,
body.ws-body .inv-list-item.active,
body.ws-body .ws-record-item.active {
  background: var(--ws-teal-soft) !important;
  border-left-color: var(--ws-teal) !important;
  border-color: var(--ws-teal-line) !important;
  transform: none !important;
}

/* Title + meta inside records — promote title, soften meta with bullet sep */
body.ws-body .pack-list-item > div:first-of-type,
body.ws-body .inv-list-item > div:first-of-type,
body.ws-body .ws-record-item > .ws-record-body {
  flex: 1;
  min-width: 0;
}
body.ws-body .pack-list-item > div:first-of-type > div:first-child,
body.ws-body .inv-list-item > div:first-of-type > div:first-child,
body.ws-body .ws-record-title {
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--ws-text-strong) !important;
  letter-spacing: -0.005em !important;
  line-height: 1.35 !important;
  margin-bottom: 4px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.ws-body .pack-list-meta,
body.ws-body .inv-list-meta,
body.ws-body .ws-record-meta {
  font-size: 12.5px !important;
  font-weight: 400 !important;
  color: var(--ws-text-muted) !important;
  letter-spacing: 0 !important;
  line-height: 1.45 !important;
}

/* Status badges — flatter, taller-tracked, framed pills */
body.ws-body .badge,
body.ws-body .ws-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  border: 1px solid transparent !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}
body.ws-body .badge-draft,
body.ws-body .badge-in_progress,
body.ws-body .badge-screens_complete,
body.ws-body .badge-recommended,
body.ws-body .badge-intake,
body.ws-body .badge-active {
  background: #FEF7E6 !important;
  color: #92400E !important;
  border-color: #FDE68A !important;
}
body.ws-body .badge-generated,
body.ws-body .badge-complete,
body.ws-body .badge-completed,
body.ws-body .badge-closed {
  background: var(--ws-teal-soft) !important;
  color: var(--ws-teal-deep) !important;
  border-color: var(--ws-teal-line) !important;
}
body.ws-body .badge-blocked,
body.ws-body .badge-on_hold {
  background: #FEF2F2 !important;
  color: #B91C1C !important;
  border-color: #FECACA !important;
}

/* Templates list rows — apply same record polish */
body.ws-body .tf-tpl-item {
  border-radius: 0 !important;
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--ws-border-soft) !important;
  transition: background 0.15s ease, padding 0.15s ease;
}
body.ws-body .tf-tpl-item:hover {
  background: var(--ws-teal-soft) !important;
  padding-left: 22px !important;
}
body.ws-body .tf-tpl-item .tpl-name {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--ws-text-strong) !important;
}

/* Templates category cards — lift on hover */
body.ws-body .tf-cat {
  border-radius: var(--ws-radius-lg) !important;
  border: 1px solid var(--ws-border-soft) !important;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
body.ws-body .tf-cat.open {
  box-shadow: var(--ws-shadow-card);
  border-color: var(--ws-teal-line) !important;
}

/* "Open a new ..." starter card — give it a subtle teal accent */
body.ws-body .card:has(> button.btn-primary:only-of-type),
body.ws-body .card:first-of-type {
  position: relative;
}
body.ws-body .card h2,
body.ws-body .ws-card-title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  color: var(--ws-text-strong) !important;
  letter-spacing: -0.01em !important;
  margin: 0 0 6px !important;
}
body.ws-body .lede {
  font-size: 14.5px !important;
  color: var(--ws-text-muted) !important;
  line-height: 1.55 !important;
  margin: 0 0 16px !important;
}

/* Investigator-of-record disclaimer — refine */
body.ws-body .ior {
  background: linear-gradient(135deg, var(--ws-teal-soft) 0%, #fff 80%) !important;
  border: 1px solid var(--ws-teal-line) !important;
  border-left: 3px solid var(--ws-teal) !important;
  border-radius: 12px !important;
  padding: 14px 18px !important;
  font-size: 13.5px !important;
  color: var(--ws-text-strong) !important;
  margin-bottom: 18px !important;
  line-height: 1.55 !important;
}
body.ws-body .ior strong { color: var(--ws-teal-deep) !important; font-weight: 700 !important; }

/* Page body padding tighten now that header is slim */
body.ws-body .ws-page-body { padding: 24px 32px 56px; }
@media (max-width: 720px) {
  body.ws-body .ws-page-body { padding: 18px 16px 48px; }
  body.ws-body .hb-card,
  body.ws-body .pp-card,
  body.ws-body .inv-card,
  body.ws-body .card { padding: 22px 20px !important; }
  body.ws-body .hb-step-title,
  body.ws-body .pp-step-title,
  body.ws-body .inv-step-title,
  body.ws-body .rc-stage-title { font-size: 22px !important; }
}

/* ---------- Mobile ---------- */
@media (max-width: 880px) {
  body.ws-body { padding-left: 0; }
  .ws-sidebar {
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
  }
  .ws-sidebar.open {
    transform: translateX(0);
    visibility: visible;
    box-shadow: var(--ws-shadow-lg);
    transition: transform 0.22s ease, visibility 0s;
  }
  .ws-mobile-bar { display: flex; }
  .ws-page-head { padding: 22px 20px 18px; }
  .ws-page-body { padding: 20px 16px 48px; }
  .ws-title { font-size: 24px; }
}

/* ---------- Auth-gate / denied state: drop chrome until authorized.
   Uses :has() so any page that shows an .auth-gate (templates) or
   #admin-denied (admin) hides workspace chrome and the sidebar offset. */
body.ws-body:has(.auth-gate:not(.hidden)),
body.ws-body:has(#admin-denied:not(.hidden)) {
  padding-left: 0;
}
body.ws-body:has(.auth-gate:not(.hidden)) > .ws-sidebar,
body.ws-body:has(.auth-gate:not(.hidden)) > .ws-mobile-bar,
body.ws-body:has(.auth-gate:not(.hidden)) > .ws-page-head,
body.ws-body:has(#admin-denied:not(.hidden)) > .ws-sidebar,
body.ws-body:has(#admin-denied:not(.hidden)) > .ws-mobile-bar {
  display: none;
}

/* ---------- Embedded mode (when iframe-embedded as preview) ---------- */
body.embedded {
  padding-left: 0;
}
body.embedded .ws-sidebar,
body.embedded .ws-mobile-bar { display: none; }
body.embedded .ws-page-head { padding-top: 16px; }
