/*
 * End of the Line Studios — 063 Contrast / Admin / Scroll Navigation Pass
 * Brand authority: EOTLS brand guide.
 * Goals:
 *   1. Remove the old admin/login visual fallback.
 *   2. Enforce dark, readable copy on every light publisher/system surface.
 *   3. Let the global masthead + main menu scroll away.
 *   4. Let property-level navigation take over at the top of JAZS/New Moreland.
 *   5. Keep the protected 062 editor and commerce behavior intact.
 */

:root {
  --e063-ink: #121212;
  --e063-ink-soft: #323232;
  --e063-muted: #555b5b;
  --e063-muted-strong: #414646;
  --e063-paper: #f1f5f5;
  --e063-paper-deep: #e5eaea;
  --e063-line: rgba(0, 0, 0, 0.22);
  --e063-purple: #7631a0;
  --e063-yellow: #e9c116;
  --e063-black: #000000;
  --e063-silver: #bdbdbd;
}

/* ============================================================
   GLOBAL HEADER / SCROLL BEHAVIOR
   The large publisher masthead and primary nav are intentionally
   part of the document flow now. Property navigation takes over.
   ============================================================ */
body.eotls-063 .e062-header {
  position: relative !important;
  top: auto !important;
  z-index: 30 !important;
}

body.eotls-063 .e062-nav.nav-wrap {
  position: relative !important;
  top: auto !important;
  z-index: 30 !important;
}

/* Property subnav: this is the persistent menu once the masthead is gone. */
body.eotls-063 .e062-property-nav.e063-property-sticky {
  position: sticky !important;
  top: 0 !important;
  z-index: 260 !important;
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) 54px !important;
  justify-content: initial !important;
  align-items: stretch !important;
  gap: 0 !important;
  min-height: 58px !important;
  padding: 0 var(--e062-pad) !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18) !important;
  background: rgba(241, 245, 245, 0.985) !important;
  color: var(--e063-ink) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
  backdrop-filter: blur(12px);
}

body.eotls-063 .e063-property-mark {
  grid-column: 1;
  align-self: center;
  justify-self: start;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 3px;
  color: var(--e063-ink) !important;
}

body.eotls-063 .e063-property-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none !important;
}

body.eotls-063 .e063-property-links {
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-width: 0;
}

body.eotls-063 .e062-property-nav.e063-property-sticky .e063-property-links > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 1.15rem;
  color: #202020 !important;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 1 !important;
}

body.eotls-063 .e062-property-nav.e063-property-sticky .e063-property-links > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--e063-purple);
  transform: translateX(-50%);
  transition: width 150ms ease;
}

body.eotls-063 .e062-property-nav.e063-property-sticky .e063-property-links > a:hover,
body.eotls-063 .e062-property-nav.e063-property-sticky .e063-property-links > a.is-section-active {
  color: #000 !important;
}

body.eotls-063 .e062-property-nav.e063-property-sticky .e063-property-links > a:hover::after,
body.eotls-063 .e062-property-nav.e063-property-sticky .e063-property-links > a.is-section-active::after {
  width: calc(100% - 2.3rem);
}

body.eotls-063 .e063-property-spacer {
  grid-column: 3;
}

/* ============================================================
   LIGHT-SURFACE CONTRAST CONTRACT
   063 deliberately overrides old inherited "paper" text tokens.
   ============================================================ */
body.eotls-063 .e062-white,
body.eotls-063.e062-system main,
body.eotls-063 .e063-light-surface {
  color: var(--e063-ink) !important;
}

body.eotls-063 .e062-white h1,
body.eotls-063 .e062-white h2,
body.eotls-063 .e062-white h3,
body.eotls-063 .e062-white h4,
body.eotls-063 .e062-white h5,
body.eotls-063 .e062-white h6,
body.eotls-063.e062-system main h1,
body.eotls-063.e062-system main h2,
body.eotls-063.e062-system main h3,
body.eotls-063.e062-system main h4,
body.eotls-063.e062-system main h5,
body.eotls-063.e062-system main h6 {
  color: #0f0f0f !important;
  text-shadow: none !important;
}

body.eotls-063 .e062-white p,
body.eotls-063 .e062-white li,
body.eotls-063 .e062-white dd,
body.eotls-063 .e062-white figcaption,
body.eotls-063 .e062-white .lede,
body.eotls-063 .e062-white .muted,
body.eotls-063.e062-system main p,
body.eotls-063.e062-system main li,
body.eotls-063.e062-system main dd,
body.eotls-063.e062-system main figcaption,
body.eotls-063.e062-system main .lede,
body.eotls-063.e062-system main .muted,
body.eotls-063.e062-system main small {
  color: var(--e063-muted-strong) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

body.eotls-063 .e062-white strong,
body.eotls-063 .e062-white b,
body.eotls-063.e062-system main strong,
body.eotls-063.e062-system main b {
  color: #151515 !important;
}

body.eotls-063 .e062-white a:not(.e062-btn),
body.eotls-063.e062-system main a:not(.e062-btn):not(.btn) {
  color: #242424;
}

body.eotls-063 .e062-white a:not(.e062-btn):hover,
body.eotls-063.e062-system main a:not(.e062-btn):not(.btn):hover {
  color: var(--e063-purple);
}

/* Keep intentional brand labels colored and readable. */
body.eotls-063 .e062-white .e062-kicker.dark,
body.eotls-063 .e062-white .e062-meta,
body.eotls-063.e062-system .eyebrow {
  color: #66278d !important;
}

body.eotls-063 .e062-white .e062-cover-rail p,
body.eotls-063 .e062-white .e062-news-grid .e062-meta {
  color: #66278d !important;
}

/* Forms on every light/system surface. */
body.eotls-063.e062-system label,
body.eotls-063 .e062-white label,
body.eotls-063 .e063-admin-login-card label {
  color: #202020 !important;
  font-weight: 700;
  opacity: 1 !important;
}

body.eotls-063.e062-system input,
body.eotls-063.e062-system select,
body.eotls-063.e062-system textarea,
body.eotls-063 .e062-white input,
body.eotls-063 .e062-white select,
body.eotls-063 .e062-white textarea,
body.eotls-063 .e063-admin-login-card input {
  border: 1px solid #777d7d !important;
  background: #ffffff !important;
  color: #101010 !important;
  caret-color: #101010 !important;
  box-shadow: none !important;
}

body.eotls-063.e062-system input::placeholder,
body.eotls-063.e062-system textarea::placeholder,
body.eotls-063 .e062-white input::placeholder,
body.eotls-063 .e062-white textarea::placeholder,
body.eotls-063 .e063-admin-login-card input::placeholder {
  color: #666c6c !important;
  opacity: 1 !important;
}

body.eotls-063.e062-system input:focus,
body.eotls-063.e062-system select:focus,
body.eotls-063.e062-system textarea:focus,
body.eotls-063 .e062-white input:focus,
body.eotls-063 .e062-white select:focus,
body.eotls-063 .e062-white textarea:focus {
  border-color: var(--e063-purple) !important;
  outline: 3px solid rgba(118, 49, 160, 0.18) !important;
  outline-offset: 1px;
}

body.eotls-063.e062-system [data-form-status],
body.eotls-063 .e062-white [data-form-status] {
  color: #303535 !important;
  opacity: 1 !important;
}

/* Calm commerce/account cards: no leftover pale type. */
body.eotls-063.e062-system .card,
body.eotls-063.e062-system .card-pad,
body.eotls-063.e062-system .total-box,
body.eotls-063.e062-system .account-head,
body.eotls-063.e062-system .admin-record,
body.eotls-063.e062-system .stat-card,
body.eotls-063.e062-system .danger-zone {
  border-color: rgba(0, 0, 0, 0.2) !important;
  background: #ffffff !important;
  color: var(--e063-ink) !important;
  text-shadow: none !important;
}

body.eotls-063.e062-system .card *,
body.eotls-063.e062-system .total-box *,
body.eotls-063.e062-system .account-head *,
body.eotls-063.e062-system .admin-record *,
body.eotls-063.e062-system .stat-card * {
  text-shadow: none !important;
}

/* ============================================================
   ADMIN — 063 publisher control surface
   ============================================================ */
body.e063-admin {
  background: var(--e063-paper-deep) !important;
}

body.e063-admin main.e063-admin-main {
  min-height: 68vh;
  padding: clamp(2.5rem, 6vw, 6rem) var(--e062-pad) !important;
  background:
    linear-gradient(135deg, rgba(118, 49, 160, 0.07), transparent 36rem),
    var(--e063-paper-deep) !important;
  color: var(--e063-ink) !important;
}

.e063-admin-login-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  width: min(1120px, 100%);
  min-height: 560px;
  margin: 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #fff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.16);
}

.e063-admin-brand-panel {
  position: relative;
  display: grid;
  align-content: end;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  background:
    linear-gradient(145deg, rgba(118, 49, 160, 0.82), rgba(0, 0, 0, 0.95) 72%),
    #000;
  color: #fff;
}

.e063-admin-brand-panel::before {
  content: "";
  position: absolute;
  top: clamp(2rem, 5vw, 4rem);
  left: clamp(2rem, 5vw, 4rem);
  width: clamp(92px, 11vw, 150px);
  aspect-ratio: 1;
  background: url("../../assets/brand-061/primary-white.webp") center / contain no-repeat;
  opacity: 0.96;
}

.e063-admin-brand-panel .e063-admin-brand-copy {
  position: relative;
  z-index: 1;
}

.e063-admin-brand-panel .e062-kicker {
  color: var(--e063-yellow) !important;
}

.e063-admin-brand-panel h1 {
  max-width: 7ch;
  color: #fff !important;
  font-size: clamp(4rem, 7vw, 7rem) !important;
  text-shadow: none !important;
}

.e063-admin-brand-panel p:last-child {
  max-width: 34rem;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 0.92rem;
  line-height: 1.7;
}

body.e063-admin .e063-admin-login-card {
  align-self: center;
  display: grid;
  gap: 1rem;
  width: min(520px, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) !important;
  border: 0 !important;
  background: #fff !important;
  color: var(--e063-ink) !important;
  box-shadow: none !important;
}

body.e063-admin .e063-admin-login-card h2 {
  color: #111 !important;
  font-size: clamp(3rem, 5vw, 5.5rem) !important;
  text-shadow: none !important;
}

body.e063-admin .e063-admin-login-card .lede {
  margin: 0 0 0.65rem;
  color: #484e4e !important;
}

body.e063-admin .e063-admin-login-card .btn.primary {
  min-height: 48px;
  border: 2px solid var(--e063-purple) !important;
  border-radius: 0 !important;
  background: var(--e063-purple) !important;
  color: #fff !important;
}

/* Dashboard receives a clean, high-contrast application surface. */
body.e063-admin .admin-dashboard {
  width: min(1500px, 100%);
  margin: 0 auto;
  color: var(--e063-ink) !important;
}

body.e063-admin .admin-toolbar {
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border: 1px solid var(--e063-line);
  background: #fff;
  color: #111;
}

body.e063-admin .admin-toolbar h1,
body.e063-admin .admin-toolbar h2,
body.e063-admin .admin-toolbar h3,
body.e063-admin .admin-toolbar strong,
body.e063-admin .admin-toolbar span,
body.e063-admin .admin-toolbar p {
  color: #111 !important;
  text-shadow: none !important;
}

body.e063-admin .admin-tabs {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 0.7rem;
  border: 1px solid var(--e063-line);
  background: rgba(241, 245, 245, 0.98);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

body.e063-admin .admin-tab,
body.e063-admin .inline-admin-form button,
body.e063-admin .admin-dashboard .btn:not(.primary) {
  border: 1px solid #555 !important;
  border-radius: 0 !important;
  background: #111 !important;
  color: #fff !important;
  font-weight: 800;
  box-shadow: none !important;
  text-shadow: none !important;
}

body.e063-admin .admin-tab:hover,
body.e063-admin .inline-admin-form button:hover,
body.e063-admin .admin-dashboard .btn:not(.primary):hover {
  border-color: var(--e063-purple) !important;
  background: var(--e063-purple) !important;
  color: #fff !important;
}

body.e063-admin .admin-tab.is-active {
  border-color: var(--e063-purple) !important;
  background: var(--e063-purple) !important;
  color: #fff !important;
}

body.e063-admin .admin-panel.is-active {
  display: block;
  padding: clamp(1rem, 2.5vw, 2rem);
  border: 1px solid var(--e063-line);
  background: var(--e063-paper);
  color: var(--e063-ink) !important;
}

body.e063-admin .admin-panel h1,
body.e063-admin .admin-panel h2,
body.e063-admin .admin-panel h3,
body.e063-admin .admin-panel h4,
body.e063-admin .admin-panel p,
body.e063-admin .admin-panel li,
body.e063-admin .admin-panel label,
body.e063-admin .admin-panel span,
body.e063-admin .admin-panel small,
body.e063-admin .admin-panel summary,
body.e063-admin .admin-panel strong {
  color: #202424 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

body.e063-admin .admin-panel p,
body.e063-admin .admin-panel li,
body.e063-admin .admin-panel small,
body.e063-admin .admin-panel span {
  color: #4b5050 !important;
}

body.e063-admin .admin-panel strong,
body.e063-admin .admin-panel summary {
  color: #151515 !important;
}

body.e063-admin .admin-record,
body.e063-admin .stat-card,
body.e063-admin .danger-zone,
body.e063-admin .account-head {
  border: 1px solid #c6cccc !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #111 !important;
  box-shadow: none !important;
}

body.e063-admin .admin-record[open] {
  border-color: #8d9393 !important;
}

body.e063-admin .admin-record summary {
  padding-bottom: 0.2rem;
}

body.e063-admin .admin-edit-form input,
body.e063-admin .admin-edit-form textarea,
body.e063-admin .admin-edit-form select,
body.e063-admin .admin-edit-row input,
body.e063-admin .admin-edit-row textarea,
body.e063-admin .admin-edit-row select,
body.e063-admin .inline-admin-form input,
body.e063-admin .inline-admin-form textarea,
body.e063-admin .inline-admin-form select {
  border: 1px solid #777d7d !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #111 !important;
  box-shadow: none !important;
}

body.e063-admin .admin-edit-form input::placeholder,
body.e063-admin .admin-edit-form textarea::placeholder,
body.e063-admin .admin-edit-row input::placeholder,
body.e063-admin .admin-edit-row textarea::placeholder,
body.e063-admin .inline-admin-form input::placeholder,
body.e063-admin .inline-admin-form textarea::placeholder {
  color: #666 !important;
  opacity: 1;
}

body.e063-admin .admin-edit-form input:focus,
body.e063-admin .admin-edit-form textarea:focus,
body.e063-admin .admin-edit-form select:focus,
body.e063-admin .admin-edit-row input:focus,
body.e063-admin .admin-edit-row textarea:focus,
body.e063-admin .admin-edit-row select:focus {
  border-color: var(--e063-purple) !important;
  outline: 3px solid rgba(118, 49, 160, 0.16) !important;
  outline-offset: 1px;
}

body.e063-admin .danger-zone,
body.e063-admin .danger-rollup {
  border-color: #a34040 !important;
}

body.e063-admin .danger-zone strong,
body.e063-admin .danger-rollup strong,
body.e063-admin .danger-zone summary,
body.e063-admin .danger-rollup summary {
  color: #7e1f1f !important;
}

/* Legal/system content needs an explicit high-contrast copy floor. */
body.eotls-063.legal-page .legal-copy,
body.eotls-063.legal-page .legal-copy p,
body.eotls-063.legal-page .legal-copy li,
body.eotls-063.legal-page .legal-copy .legal-updated {
  color: #393e3e !important;
  opacity: 1 !important;
}

body.eotls-063.legal-page .legal-copy h1,
body.eotls-063.legal-page .legal-copy h2,
body.eotls-063.legal-page .legal-copy h3,
body.eotls-063.legal-page .legal-copy strong {
  color: #111 !important;
}

body.eotls-063.legal-page .legal-copy code {
  border-color: #454b4b !important;
  background: #111 !important;
  color: #fff !important;
}

@media (max-width: 900px) {
  body.eotls-063 .e062-property-nav.e063-property-sticky {
    grid-template-columns: 46px minmax(0, 1fr) !important;
    padding: 0 0.65rem !important;
  }

  body.eotls-063 .e063-property-links {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.eotls-063 .e063-property-links::-webkit-scrollbar {
    display: none;
  }

  body.eotls-063 .e062-property-nav.e063-property-sticky .e063-property-links > a {
    min-height: 54px;
    padding: 0 0.85rem;
  }

  body.eotls-063 .e063-property-spacer {
    display: none;
  }

  .e063-admin-login-shell {
    grid-template-columns: 1fr;
  }

  .e063-admin-brand-panel {
    min-height: 340px;
  }

  body.e063-admin .e063-admin-login-card {
    width: 100%;
    padding: 2rem !important;
  }
}

@media (max-width: 640px) {
  body.eotls-063 .e062-utility > span {
    display: none;
  }

  body.eotls-063 .e062-utility {
    grid-template-columns: 1fr auto;
  }

  body.eotls-063 .e062-mast {
    height: 68px;
  }

  body.eotls-063 .e062-property-nav.e063-property-sticky {
    min-height: 52px !important;
  }

  body.eotls-063 .e063-property-mark {
    width: 38px;
    height: 38px;
  }

  body.eotls-063 .e062-property-nav.e063-property-sticky .e063-property-links > a {
    min-height: 52px;
    font-size: 0.62rem;
  }

  body.e063-admin .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  body.e063-admin .admin-tab {
    flex: 0 0 auto;
  }
}
