/* ==========================================================================
   Essential Eight & ASD Essentials page (/essential-eight).
   Long-form guide layout: sticky contents rail + article. Solid fills, no
   accent stripes or tinted outlines (see the site's design rule).
   ========================================================================== */

/* Hero -------------------------------------------------------------------- */
.e8-hero { padding-block: 64px 72px; }
.e8-hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.e8-hero .hero-lead strong { font-weight: 600; color: var(--white); }
.e8-byline { margin-top: 26px; font-size: 14px; color: var(--slate-300); }
.e8-byline a { color: var(--cream); text-underline-offset: 3px; }

.e8-glance {
    padding: 26px 26px 22px;
    border-radius: 18px;
    background: var(--cream);
    color: var(--ink);
    box-shadow: 0 40px 60px -36px rgba(0, 0, 0, .6);
}
.e8-glance-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a8470f; }
.e8-glance dl { margin: 12px 0 0; display: grid; gap: 0; }
.e8-glance dl > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding-block: 12px; }
.e8-glance dl > div + div { box-shadow: 0 -1px 0 #eadfca; }
.e8-glance dt { font-weight: 700; font-size: 14px; color: var(--blue-900); }
.e8-glance dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); }

/* Layout: contents rail + article ----------------------------------------- */
.e8-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-block: 64px 24px; align-items: start; }
.e8-toc { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; }
.e8-toc-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.e8-toc ol { list-style: none; padding: 0; margin-top: 14px; display: grid; gap: 2px; counter-reset: toc; }
.e8-toc li { counter-increment: toc; }
.e8-toc a {
    display: flex; gap: 10px; padding: 7px 10px; border-radius: 8px;
    font-size: 14px; line-height: 1.35; color: var(--blue-900); text-decoration: none;
}
.e8-toc a::before { content: counter(toc, decimal-leading-zero); font-variant-numeric: tabular-nums; color: var(--slate-300); font-weight: 600; }
.e8-toc a:hover, .e8-toc a:focus-visible { background: var(--cream); }

.e8-article { min-width: 0; max-width: 860px; }
.e8-block { scroll-margin-top: calc(var(--header-h) + 16px); }
.e8-block + .e8-block { margin-top: 80px; }
.e8-kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: #a8470f; }
.e8-h2 { margin-top: 8px; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.22; font-weight: 700; color: var(--ink); letter-spacing: -.3px; }
.e8-h3 { font-size: 22px; font-weight: 700; color: var(--ink); }
.e8-lead { margin-top: 16px; font-size: 19px; line-height: 1.6; font-weight: 300; color: var(--text); }
.e8-block > p:not(.e8-kicker):not(.e8-lead) { margin-top: 18px; line-height: 1.7; color: var(--text); }
.e8-article a:not(.btn) { color: var(--blue-600); text-underline-offset: 3px; }

/* Short answer ----------------------------------------------------------- */
.e8-answer { padding: 36px 36px 34px; border-radius: 22px; background: var(--navy); color: var(--white); }
.e8-answer .e8-kicker { color: #ffb98f; }
.e8-answer .e8-h2 { color: var(--white); }
.e8-answer-list { list-style: none; padding: 0; margin-top: 24px; display: grid; gap: 16px; counter-reset: ans; }
.e8-answer-list li { counter-increment: ans; position: relative; padding-left: 46px; line-height: 1.6; color: #d6dee8; }
.e8-answer-list li::before {
    content: counter(ans); position: absolute; left: 0; top: 0;
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--orange); color: var(--white); font-weight: 700; font-size: 14px;
}
.e8-answer-list strong { color: var(--white); font-weight: 600; }

/* Eight strategies ------------------------------------------------------- */
.e8-strategies { margin-top: 32px; display: grid; gap: 26px; }
.e8-group-title { font-size: 14px; font-weight: 700; color: var(--blue-900); }
.e8-tiles { list-style: none; padding: 0; margin-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.e8-tiles li { position: relative; overflow: hidden; padding: 20px 18px 20px; border-radius: 16px; background: var(--cream); min-height: 168px; }
.e8-num {
    position: absolute; right: -4px; bottom: -22px;
    font-size: 92px; font-weight: 700; line-height: 1; letter-spacing: -4px;
    color: #f3e6cc; pointer-events: none;
}
.e8-tiles h3 { position: relative; font-size: 16px; line-height: 1.3; color: var(--ink); }
.e8-tiles p { position: relative; margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--blue-900); }
.e8-group:last-child .e8-tiles li { background: var(--navy); }
.e8-group:last-child .e8-tiles h3 { color: var(--white); }
.e8-group:last-child .e8-tiles p { color: #cbd5e1; }
.e8-group:last-child .e8-num { color: #1b2c40; }

/* Comparison ------------------------------------------------------------- */
.e8-compare { margin-top: 30px; border-radius: 18px; overflow: hidden; background: #f4f6f9; }
.e8-compare-head, .e8-compare-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.35fr); }
.e8-compare-head span { padding: 16px 20px; font-weight: 700; font-size: 15px; }
.e8-compare-head span:nth-child(2) { background: #e3e8ef; color: var(--slate); }
.e8-compare-head span:nth-child(3) { background: var(--blue-900); color: var(--white); }
.e8-compare-row span { padding: 15px 20px; font-size: 15px; line-height: 1.5; }
.e8-compare-row + .e8-compare-row span { box-shadow: 0 -1px 0 #e3e8ef; }
.e8-compare-row span:first-child { font-weight: 700; color: var(--ink); font-size: 14px; }
.e8-compare-row span:nth-child(2) { color: var(--slate); }
.e8-compare-row span:nth-child(3) { background: var(--white); color: var(--ink); }

.e8-new { margin-top: 28px; padding: 28px; border-radius: 18px; background: var(--cream); }
.e8-new h3 { font-size: 20px; color: var(--ink); }
.e8-new p { margin-top: 8px; color: var(--text); line-height: 1.6; }
.e8-chips { list-style: none; padding: 0; margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.e8-chips li { padding: 7px 14px; border-radius: 999px; background: var(--navy); color: var(--cream); font-size: 14px; font-weight: 600; }
.e8-chips li:nth-child(-n+3) { background: var(--orange); color: var(--white); }
.e8-new .e8-new-links { margin-top: 16px; }

/* Phase map -------------------------------------------------------------- */
.e8-map { margin: 30px 0 0; padding: 28px; border-radius: 22px; background: var(--navy); color: var(--white); }
.e8-phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.e8-phase { padding: 20px 18px; border-radius: 14px; background: #16293f; }
.e8-phase--1 { background: var(--orange); }
.e8-phase--2 { background: var(--blue-700); margin-top: 28px; }
.e8-phase--3 { background: #2a3d55; margin-top: 56px; }
.e8-phase--1 { margin-bottom: 56px; }
.e8-phase--2 { margin-bottom: 28px; }
.e8-phase-num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.e8-phase-why { margin-top: 4px; font-size: 13px; font-weight: 600; opacity: .85; }
.e8-phase ul { list-style: none; padding: 0; margin-top: 14px; display: grid; gap: 6px; }
.e8-phase li { padding: 8px 12px; border-radius: 9px; background: rgba(255, 255, 255, .16); font-size: 14px; font-weight: 600; line-height: 1.35; }
.e8-bands { margin-top: 14px; display: grid; gap: 10px; }
.e8-band {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 13px 18px; border-radius: 12px; background: var(--cream); color: var(--ink); font-weight: 700; font-size: 15px;
}
.e8-band span { font-weight: 400; font-size: 13px; color: var(--slate); }
.e8-band--alt { background: #e6edf5; }
.e8-map figcaption { margin-top: 16px; font-size: 13px; color: var(--slate-300); }

/* Quote ------------------------------------------------------------------ */
.e8-quote { margin-top: 26px; padding: 30px 32px; border-radius: 18px; background: var(--cream); }
.e8-quote p:first-child { font-size: 20px; line-height: 1.55; font-weight: 500; color: var(--ink); }
.e8-quote-src { margin-top: 12px; font-size: 14px; color: var(--slate); }

/* Paths ------------------------------------------------------------------ */
.e8-paths { margin-top: 30px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.e8-path { display: flex; flex-direction: column; padding: 24px 22px; border-radius: 18px; background: #f4f6f9; }
.e8-path-tag { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--blue-600); }
.e8-path h3 { margin-top: 10px; font-size: 20px; line-height: 1.3; color: var(--ink); }
.e8-path p:not(.e8-path-tag) { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--text); }
.e8-path--dark { background: var(--blue-900); transform: translateY(-10px); box-shadow: 0 30px 50px -30px rgba(4, 60, 92, .7); }
.e8-path--dark .e8-path-tag { color: #ffb98f; }
.e8-path--dark h3 { color: var(--white); }
.e8-path--dark p:not(.e8-path-tag) { color: #d6e4ee; }

/* How we help ------------------------------------------------------------ */
.e8-help { margin-top: 30px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.e8-help-card { padding: 24px 22px; border-radius: 18px; background: var(--cream); transition: transform .2s ease, box-shadow .2s ease; }
.e8-help-card:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -30px rgba(13, 27, 43, .5); }
.e8-help-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: var(--navy); color: var(--cream); }
.e8-help-card h3 { margin-top: 16px; font-size: 18px; line-height: 1.3; color: var(--ink); }
.e8-help-card p { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--blue-900); }
.e8-deliverables { margin-top: 24px; padding: 28px 30px; border-radius: 18px; background: #f4f6f9; }
.e8-deliverables h3 { font-size: 20px; color: var(--ink); }
.e8-deliverables .price-list { margin: 16px 0 0; }
.e8-not { margin-top: 18px; font-size: 15px; color: var(--slate); line-height: 1.6; }
.e8-not strong { color: var(--ink); }

/* Steps ------------------------------------------------------------------ */
.e8-steps { list-style: none; padding: 0; margin-top: 30px; display: grid; gap: 0; counter-reset: st; }
.e8-steps li { counter-increment: st; position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 18px; padding-bottom: 28px; }
.e8-steps li::before {
    content: counter(st, decimal-leading-zero);
    grid-row: span 2; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
    background: var(--navy); color: var(--cream); font-weight: 700; font-size: 18px;
}
.e8-steps li:not(:last-child)::after { content: ""; position: absolute; left: 27px; top: 64px; bottom: 6px; width: 2px; background: #e3e8ef; }
.e8-steps li:last-child::before { background: var(--orange); color: var(--white); }
.e8-steps h3 { font-size: 19px; color: var(--ink); padding-top: 4px; }
.e8-steps p { margin-top: 6px; color: var(--text); line-height: 1.6; }

/* FAQ and sources -------------------------------------------------------- */
.e8-block .faq details { border: 0; background: var(--cream); }
.e8-sources { padding: 28px 30px; border-radius: 18px; background: #f4f6f9; }
.e8-sources p { margin-top: 10px; color: var(--text); }
.e8-sources ul { margin-top: 12px; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.e8-sources .e8-disclaimer { margin-top: 16px; font-size: 14px; color: var(--slate); }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1060px) {
    .e8-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
    .e8-toc { position: static; margin-inline: calc(var(--gutter) * -1); padding: 14px var(--gutter); background: #f4f6f9; margin-bottom: 48px; }
    .e8-toc ol { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
    .e8-toc a { white-space: nowrap; background: var(--white); }
    .e8-article { max-width: none; }
    .e8-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .e8-help { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
    .e8-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .e8-paths { grid-template-columns: minmax(0, 1fr); }
    .e8-path--dark { transform: none; }
    .e8-phases { grid-template-columns: minmax(0, 1fr); }
    .e8-phase--1, .e8-phase--2, .e8-phase--3 { margin: 0; }
}
@media (max-width: 640px) {
    .e8-hero { padding-block: 44px 52px; }
    .e8-block + .e8-block { margin-top: 60px; }
    .e8-answer, .e8-map, .e8-new, .e8-deliverables, .e8-sources, .e8-quote { padding: 24px 20px; border-radius: 16px; }
    .e8-tiles { grid-template-columns: minmax(0, 1fr); }
    .e8-tiles li { min-height: 0; }
    .e8-help { grid-template-columns: minmax(0, 1fr); }
    .e8-compare-head { display: none; }
    .e8-compare-row { grid-template-columns: minmax(0, 1fr); padding: 14px 0; }
    .e8-compare-row span { padding: 4px 18px; background: transparent !important; }
    .e8-compare-row span:nth-child(2)::before { content: "Essential Eight: "; font-weight: 600; }
    .e8-compare-row span:nth-child(3)::before { content: "ASD Essentials: "; font-weight: 700; color: var(--blue-900); }
    .e8-compare-row + .e8-compare-row span { box-shadow: none; }
    .e8-compare-row + .e8-compare-row { box-shadow: 0 -1px 0 #e3e8ef; }
    .e8-glance dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .e8-quote p:first-child { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .e8-help-card { transition: none; }
    .e8-help-card:hover { transform: none; }
}
