/* Editorial Light Operate shell — compact horizontal header.
   Do not import editorial-login.css. */

@import url("pnp-brand.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.editorial-body {
  margin: 0;
  min-height: 100vh;
  color: var(--ed-text);
  background: var(--ed-bg);
  font-family: var(--ed-ui-font);
  font-size: 0.875rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.editorial-body ::selection {
  background: var(--ed-selection-bg);
  color: var(--ed-selection-fg);
}

.editorial-skip {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  padding: 0.5rem 0.85rem;
  background: var(--ed-text);
  color: var(--ed-surface);
  text-decoration: none;
  border-radius: var(--ed-radius);
  font-size: 0.8125rem;
  font-weight: 500;
}

.editorial-skip:focus,
.editorial-skip:focus-visible {
  top: 0.65rem;
  outline: var(--pk-focus-ring);
  outline-offset: var(--pk-focus-offset);
}

.editorial-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.editorial-header {
  position: relative;
  flex: none;
  height: var(--ed-header-h);
  border-bottom: 1px solid color-mix(in srgb, var(--ed-border) 78%, transparent);
  box-shadow: 0 5px 16px -13px color-mix(in srgb, var(--ed-text) 12%, transparent);
}

/* Light chrome: same frosted surface as landing .lp-header (landing.css — not imported here). */
html[data-theme="light"] .editorial-header {
  background: rgba(250, 250, 252, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: color-mix(in srgb, #e5e7eb 72%, transparent);
}

html[data-theme="dark"] .editorial-header {
  border-bottom-color: color-mix(in srgb, var(--ed-border) 68%, #45433f);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--ed-surface) 88%, #32312e) 0%,
    color-mix(in srgb, var(--ed-bg) 70%, var(--ed-surface)) 100%
  );
  box-shadow: 0 6px 18px -14px rgba(0, 0, 0, 0.48);
}

.editorial-header__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 2.5rem;
  width: var(--ed-header-shell);
  max-width: 100%;
  height: 100%;
  margin-inline: auto;
  min-width: 0;
}

.editorial-brand {
  flex: none;
  justify-self: start;
  color: var(--ed-text);
  text-decoration: none;
}

.editorial-wordmark {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ed-text);
}

.editorial-wordmark b {
  font-weight: 800;
}

.editorial-wordmark__soft {
  color: var(--ed-muted);
  font-weight: 500;
}

.editorial-brand__space {
  font-family: var(--ed-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-text-secondary);
  line-height: 1;
}

.editorial-nav {
  display: none;
  align-items: stretch;
  justify-content: center;
  justify-self: stretch;
  gap: 0.15rem 1.15rem;
  min-width: 0;
  height: 100%;
}

.editorial-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0;
  color: var(--ed-text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.editorial-nav a:hover {
  color: var(--ed-text);
}

.editorial-nav a.is-active {
  color: var(--ed-accent);
  font-weight: 600;
}

.editorial-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--ed-accent);
}

.editorial-header a:focus-visible,
.editorial-header button:focus-visible,
.editorial-header summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--ed-accent);
  border-radius: 2px;
}

.editorial-nav-mobile {
  display: none;
  position: relative;
  justify-self: center;
}

.editorial-nav-mobile__toggle {
  list-style: none;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ed-text-secondary);
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  background: var(--ed-surface);
}

.editorial-nav-mobile__toggle::-webkit-details-marker {
  display: none;
}

.editorial-nav-mobile__panel {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  min-width: 12.5rem;
  padding: 0.4rem;
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  background: var(--ed-surface);
  box-shadow: var(--ed-shadow-panel);
  z-index: 40;
}

.editorial-nav-mobile__panel a {
  color: var(--ed-text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.55rem;
  border-radius: var(--ed-radius);
}

.editorial-nav-mobile__panel a:hover {
  color: var(--ed-text);
}

.editorial-nav-mobile__panel a.is-active {
  color: var(--ed-accent);
  font-weight: 600;
  background: transparent;
}

.editorial-nav-mobile__account {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.1rem;
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--ed-border);
}

.editorial-nav-mobile__journal {
  color: var(--ed-text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.55rem;
  border-radius: var(--ed-radius);
}

.editorial-nav-mobile__journal:hover {
  color: var(--ed-text);
  background: var(--ed-hover);
}

.editorial-nav-mobile__logout {
  margin: 0;
}

.editorial-nav-mobile__action {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.55rem;
  border: none;
  border-radius: var(--ed-radius);
  background: transparent;
  color: var(--ed-text-secondary);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.editorial-nav-mobile__action--logout:hover {
  color: var(--ed-text);
  background: var(--ed-hover);
}

.editorial-nav-mobile__action--logout:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--ed-accent);
}

.editorial-header__tools {
  display: none;
  align-items: center;
  gap: 0.4rem;
  justify-self: end;
  flex: none;
  min-width: 0;
}

.editorial-header__theme-center {
  display: none;
}

.editorial-user-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
  min-width: 0;
  font-size: 0.8125rem;
  color: var(--ed-text-secondary);
}

.editorial-journal {
  color: var(--ed-text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.editorial-journal:hover,
.editorial-journal:focus-visible {
  color: var(--ed-accent-ink);
}

.editorial-user-bar__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
  font-size: 0.75rem;
  font-family: var(--ed-mono);
  color: var(--ed-muted);
}

.logout-form {
  margin: 0;
}

.editorial-main {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: var(--ed-max-width);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2rem;
}

.editorial-page-title {
  font-family: var(--ed-ui-font);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.35rem;
  color: var(--ed-text);
}

.editorial-lead {
  color: var(--ed-muted);
  margin: 0 0 1rem;
  max-width: 42rem;
  font-size: 0.8125rem;
}

@media (min-width: 1200px) {
  .editorial-nav {
    display: flex;
  }

  .editorial-nav-mobile {
    display: none;
  }
}

@media (max-width: 1199px) {
  .editorial-body {
    --ed-header-shell: min(1440px, calc(100% - 2rem));
  }

  /* Dropdown must stack above Review/Planning workspace chrome (sibling .editorial-main paints later). */
  .editorial-header {
    z-index: 50;
  }

  .editorial-header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 0.5rem;
  }

  .editorial-nav {
    display: none;
  }

  .editorial-brand-group {
    grid-column: 1;
    justify-self: start;
  }

  .editorial-header__tools {
    display: flex;
    grid-column: 3;
    justify-self: end;
  }

  .editorial-header__theme-center,
  .editorial-theme-toggle-wrap--header {
    display: flex;
  }

  .editorial-nav-mobile {
    display: block;
    justify-self: end;
  }

  .editorial-nav-mobile__panel {
    left: auto;
    right: 0;
  }

  .editorial-user-bar {
    display: none;
  }
}

.editorial-brand-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: none;
  justify-self: start;
  min-width: 0;
}

.editorial-theme-toggle-wrap {
  display: flex;
  align-items: center;
  flex: none;
}

.editorial-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1;
}

.editorial-theme-toggle__track {
  position: relative;
  display: block;
  width: 2.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--ed-border-strong);
  background: var(--ed-surface-muted);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.editorial-theme-toggle__thumb {
  position: absolute;
  top: 50%;
  left: 0.14rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--ed-surface);
  border: 1px solid var(--ed-border-strong);
  box-shadow: 0 1px 2px rgba(15, 17, 21, 0.12);
  transform: translateY(-50%);
  transition: left 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.editorial-theme-toggle.is-dark .editorial-theme-toggle__track {
  background: color-mix(in srgb, var(--ed-accent) 22%, var(--ed-surface-raised));
  border-color: color-mix(in srgb, var(--ed-accent) 35%, var(--ed-border-strong));
}

.editorial-theme-toggle.is-dark .editorial-theme-toggle__thumb {
  left: calc(100% - 0.14rem - 0.9rem);
  background: var(--ed-text);
  border-color: var(--ed-border-strong);
}

.editorial-theme-toggle:hover .editorial-theme-toggle__track {
  border-color: var(--ed-border-strong);
  background: var(--ed-hover);
}

.editorial-theme-toggle:focus-visible {
  outline: none;
}

.editorial-theme-toggle:focus-visible .editorial-theme-toggle__track {
  border-color: var(--ed-accent);
  box-shadow: 0 0 0 1px var(--ed-accent);
}

.editorial-theme-toggle-wrap--mobile {
  display: none;
}

@media (max-width: 1199px) {
  .editorial-theme-toggle-wrap--desktop {
    display: none;
  }
}

@media (min-width: 1200px) {
  .editorial-header__tools {
    display: none;
  }

  .editorial-theme-toggle-wrap--header {
    display: none !important;
  }
}

@media (max-width: 1099px) {
  .editorial-user-bar__name {
    display: none;
  }
}

.editorial-switcher {
  box-sizing: border-box;
  margin: 0.75rem 0 0.5rem;
  padding: 0.55rem 0.65rem;
  min-width: 0;
  max-width: 100%;
  background: var(
    --ed-surface-muted,
    color-mix(in srgb, var(--ed-text) 4%, var(--ed-surface))
  );
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
}

.editorial-switcher__label {
  margin: 0 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--ed-muted);
}

.editorial-switcher__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.editorial-switcher__name {
  flex: 1 1 8rem;
  min-width: 0;
  margin: 0;
  font-family: var(--ed-ui-font);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ed-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editorial-switcher__action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.2rem 0.4rem;
  border: 0;
  border-radius: calc(var(--ed-radius) - 2px);
  background: transparent;
  color: var(--ed-text-secondary);
  font-family: var(--ed-ui-font);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.editorial-switcher__action:hover {
  color: var(--ed-accent-ink);
  background: color-mix(in srgb, var(--ed-text) 6%, transparent);
}

.editorial-switcher__action:focus-visible {
  color: var(--ed-accent-ink);
  background: color-mix(in srgb, var(--ed-text) 6%, transparent);
  outline: 2px solid var(--ed-accent, #c45c26);
  outline-offset: 2px;
}

.publishing-queue > .editorial-switcher {
  margin-bottom: 0.65rem;
}

@media (min-width: 1100px) {
  .review-workspace-shell .review-workspace__left-main > .editorial-switcher--sidebar {
    margin-inline: 0.65rem;
  }

  .planning-workspace-v2__left-main > .editorial-switcher--sidebar {
    margin-inline: 1.25rem;
  }

  .review-workspace__left-main:has(> .editorial-switcher--sidebar) > .review-workspace__sidebar-header {
    padding-top: 0.65rem;
  }

  .planning-workspace-v2__left-main:has(> .editorial-switcher--sidebar)
    .planning-materials-sidebar__header.review-workspace__sidebar-header {
    padding-top: 0.65rem;
  }
}

@media (max-width: 1199px) {
  .editorial-switcher--sidebar,
  .publishing-queue > .editorial-switcher,
  .planning-no-session-switcher-top .editorial-switcher {
    display: none;
  }
}

@media (min-width: 1200px) {
  .planning-no-session-switcher-top {
    margin-bottom: 0;
  }
}
