/* O-08 isolated preview: blog In this article TOC + computed reading time.
   Article: /blog/ac-running-not-cooling-florida/
   TOC = preexisting article h2[id] anchors only. Reading time = ceil(words/200).
   Simple-premium slim rail. Not deployed. */

/* ---- Shared calm TOC typography ---- */
html body.blog-page #article.o8-on .toc,
html body.blog-page #article.o8-on .toc-m {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

html body.blog-page #article.o8-on .toc-k,
html body.blog-page #article.o8-on .toc-m > summary {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: var(--blue, #00468C) !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
}

html body.blog-page #article.o8-on .toc ol,
html body.blog-page #article.o8-on .toc-m ol {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  counter-reset: none !important;
}

html body.blog-page #article.o8-on .toc li,
html body.blog-page #article.o8-on .toc-m li {
  border: 0 !important;
  counter-increment: none !important;
  margin: 0 !important;
}

html body.blog-page #article.o8-on .toc a,
html body.blog-page #article.o8-on .toc-m a {
  display: block !important;
  padding: 8px 0 8px 14px !important;
  margin: 0 !important;
  border-left: 2px solid rgba(0, 5, 62, 0.10) !important;
  color: var(--ink, #00053E) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
  text-wrap: pretty !important;
}

html body.blog-page #article.o8-on .toc a::before,
html body.blog-page #article.o8-on .toc-m a::before {
  content: none !important;
  display: none !important;
}

html body.blog-page #article.o8-on .toc a.is-active,
html body.blog-page #article.o8-on .toc a[aria-current="location"],
html body.blog-page #article.o8-on .toc-m a.is-active {
  border-left-color: var(--y, #FED14D) !important;
  color: var(--ink, #00053E) !important;
  font-weight: 800 !important;
}

html body.blog-page #article.o8-on .o8-read {
  display: block !important;
  margin: 0 0 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: rgba(0, 5, 62, 0.62) !important;
  letter-spacing: 0.01em !important;
}

/* ---- Desktop / Tesla (≥1180): slim sticky left rail beside article ---- */
@media (min-width: 1180px) {
  html body.blog-page #article.o8-on .art-wrap.o8-wrap {
    display: grid !important;
    grid-template-columns: 220px minmax(0, 1fr) !important;
    column-gap: 48px !important;
    row-gap: 0 !important;
    max-width: 1080px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: start !important;
  }

  html body.blog-page #article.o8-on .o8-rail {
    grid-column: 1 !important;
    grid-row: 1 / span 20 !important;
    position: sticky !important;
    top: 96px !important;
    align-self: start !important;
    width: 220px !important;
    max-width: 220px !important;
    padding-top: 4px !important;
    z-index: 2 !important;
  }

  html body.blog-page #article.o8-on .o8-rail .toc {
    display: block !important;
    position: static !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body.blog-page #article.o8-on .toc-m {
    display: none !important;
  }

  html body.blog-page #article.o8-on .o8-main {
    grid-column: 2 !important;
    min-width: 0 !important;
  }

  html body.blog-page #article.o8-on .o8-main > .byline {
    margin-bottom: 18px !important;
  }
}

/* ---- Tablet / narrow desktop (<1180, >699): inline calm box, not sidebar ---- */
@media (max-width: 1179px) and (min-width: 700px) {
  html body.blog-page #article.o8-on .art-wrap.o8-wrap {
    display: flex !important;
    flex-direction: column !important;
    max-width: 760px !important;
  }
  html body.blog-page #article.o8-on .o8-main {
    display: contents !important;
  }
  html body.blog-page #article.o8-on .o8-main > .byline { order: 1 !important; }
  html body.blog-page #article.o8-on .o8-rail { order: 2 !important; }
  html body.blog-page #article.o8-on .o8-main > .qa-call { order: 3 !important; }
  html body.blog-page #article.o8-on .o8-main > article.prose { order: 4 !important; }
  html body.blog-page #article.o8-on .o8-main > * { order: 5 !important; }

  html body.blog-page #article.o8-on .o8-rail {
    position: static !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 0 22px !important;
    padding: 18px 0 8px !important;
    border-top: 1px solid rgba(0, 5, 62, 0.10) !important;
    border-bottom: 1px solid rgba(0, 5, 62, 0.10) !important;
  }

  html body.blog-page #article.o8-on .o8-rail .toc {
    display: block !important;
    position: static !important;
  }

  html body.blog-page #article.o8-on .toc-m {
    display: none !important;
  }
}

/* ---- Phone: no sticky; static TOC after byline ---- */
@media (max-width: 699px) {
  html body.blog-page #article.o8-on .art-wrap.o8-wrap {
    display: flex !important;
    flex-direction: column !important;
  }
  html body.blog-page #article.o8-on .o8-main {
    display: contents !important;
  }
  html body.blog-page #article.o8-on .o8-main > .byline { order: 1 !important; }
  html body.blog-page #article.o8-on .toc-m { order: 2 !important; }
  html body.blog-page #article.o8-on .o8-main > .qa-call { order: 3 !important; }
  html body.blog-page #article.o8-on .o8-main > article.prose { order: 4 !important; }
  html body.blog-page #article.o8-on .o8-rail { order: 99 !important; }

  html body.blog-page #article.o8-on .o8-rail .toc {
    display: none !important;
  }

  html body.blog-page #article.o8-on .toc-m {
    display: block !important;
    position: static !important;
    margin: 0 0 20px !important;
    padding: 16px 0 8px !important;
    border-top: 1px solid rgba(0, 5, 62, 0.10) !important;
    border-bottom: 1px solid rgba(0, 5, 62, 0.10) !important;
    background: transparent !important;
  }

  html body.blog-page #article.o8-on .toc-m > summary {
    pointer-events: none !important;
    cursor: default !important;
  }
  html body.blog-page #article.o8-on .toc-m > summary::after {
    display: none !important;
    content: none !important;
  }
  html body.blog-page #article.o8-on .toc-m > ol {
    display: block !important;
    padding: 0 !important;
  }
}
/* o8all1: TOC jumps land below the sticky header (article h2 only) */
html body.blog-page #article.o8-on article.prose h2[id]{scroll-margin-top:calc(var(--o8-hdr,120px) + 16px)}
