/* Scoped editorial system. No selectors alter courses, tools or the global shell. */
body.thw-editorial {
    --ed-bg:#0a1020; --ed-panel:#111b2d; --ed-border:#293a50;
    --ed-text:#e7eef8; --ed-muted:#a9b8cc; --ed-heading:#f6f9ff;
    --ed-accent:#65d8e9; --ed-control:#0c1526;
}
body.thw-editorial #page {width:100%;max-width:1280px!important;margin-inline:auto!important;}
body.thw-editorial #content {display:block!important;max-width:none!important;width:100%!important;padding:0!important;min-width:0;}
.thw-ed-shell, .thw-ed-shell * {box-sizing:border-box;}
.thw-ed-shell {width:min(100%, 1200px);margin-inline:auto;padding:44px 28px 76px;color:var(--ed-text);overflow-wrap:anywhere;min-width:0;}
.thw-ed-shell h1,.thw-ed-shell h2,.thw-ed-shell h3,.thw-ed-shell h4 {color:var(--ed-heading)!important;letter-spacing:-.025em;font-weight:700;}
.thw-ed-shell a {color:var(--ed-accent)!important;text-decoration:none;}
.thw-ed-shell a:hover {text-decoration:underline;text-underline-offset:3px;}
.thw-ed-shell :focus-visible {outline:2px solid var(--ed-accent)!important;outline-offset:4px;}
.thw-ed-eyebrow,.thw-ed-kicker {font-size:12px;letter-spacing:.09em;font-weight:700;color:var(--ed-accent)!important;text-transform:uppercase;}
.thw-ed-archive-head {max-width:740px;margin-bottom:28px;}
.thw-ed-archive-head h1 {font-size:clamp(34px,4vw,52px)!important;line-height:1.1!important;margin:12px 0!important;}
.thw-ed-archive-head p {font-size:17px!important;line-height:1.6!important;color:var(--ed-muted)!important;margin:0 0 24px!important;}
.thw-ed-search {display:flex;gap:10px;width:min(100%,560px);align-items:stretch;}
.thw-ed-search input,.thw-ed-comments input:not([type=checkbox]):not([type=submit]):not([type=hidden]),.thw-ed-comments textarea {
    min-width:0;width:100%;background:var(--ed-control)!important;color:var(--ed-text)!important;border:1px solid var(--ed-border)!important;
    border-radius:9px!important;padding:12px 14px!important;font:inherit!important;box-shadow:none!important;
}
.thw-ed-search input {flex:1;}
.thw-ed-search input::placeholder,.thw-ed-comments textarea::placeholder {color:var(--ed-muted)!important;}
.thw-ed-search button,.thw-ed-comments input[type=submit] {background:#68d9e8!important;color:#081423!important;border:1px solid transparent!important;border-radius:9px!important;font-weight:700!important;min-height:44px;padding:10px 20px!important;cursor:pointer;box-shadow:none!important;}
.thw-ed-categories {display:flex;flex-wrap:wrap;gap:9px;margin:0 0 26px;}
.thw-ed-categories a,.thw-ed-tags a {display:inline-flex;align-items:center;min-height:36px;border:1px solid var(--ed-border);border-radius:999px;padding:6px 13px;font-size:13px;color:var(--ed-muted)!important;}
.thw-ed-categories a[aria-current=page],.thw-ed-categories a:hover,.thw-ed-tags a:hover {border-color:var(--ed-accent);color:var(--ed-accent)!important;}
.thw-ed-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;align-items:stretch;}
body.thw-editorial .thw-ed-card {display:flex;flex-direction:column;min-width:0;overflow:hidden;background:var(--ed-panel)!important;border:1px solid var(--ed-border)!important;border-radius:14px;margin:0!important;box-shadow:none!important;}
.thw-ed-card-media {display:flex;align-items:center;justify-content:center;aspect-ratio:16/10;overflow:hidden;background:#080f1d;}
body.thw-editorial .thw-ed-card-media img {display:block!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;object-position:center!important;border-radius:0!important;margin:0!important;}
.thw-ed-card-body {padding:22px;display:flex;flex-direction:column;flex:1;gap:10px;min-width:0;}
.thw-ed-card h2 {font-size:clamp(19px,1.7vw,23px)!important;line-height:1.35!important;margin:0!important;}
.thw-ed-card h2 a {color:var(--ed-heading)!important;}
.thw-ed-meta {display:flex;gap:8px;flex-wrap:wrap;align-items:center;font-size:13px!important;line-height:1.5;color:var(--ed-muted)!important;}
.thw-ed-card-body p {font-size:15px!important;color:var(--ed-muted)!important;line-height:1.65!important;margin:0 0 4px!important;}
.thw-ed-read {margin-top:auto;display:inline-flex;gap:8px;align-items:center;font-size:14px;font-weight:700;min-height:40px;}
.thw-ed-shell .navigation {margin:28px 0!important;}
.thw-ed-shell .nav-links {display:flex;flex-wrap:wrap;justify-content:center;gap:8px;}
.thw-ed-shell .page-numbers {display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:42px;padding:8px 12px;border-radius:8px;border:1px solid var(--ed-border);background:var(--ed-panel);color:var(--ed-muted)!important;}
.thw-ed-shell .page-numbers.current {color:#081423!important;background:var(--ed-accent);border-color:var(--ed-accent);}
.thw-ed-empty {padding:28px;border:1px solid var(--ed-border);border-radius:12px;background:var(--ed-panel);}
.thw-ed-single {max-width:920px;padding-top:30px;}
.thw-ed-breadcrumb {display:flex;gap:10px;font-size:13px;color:var(--ed-muted);margin-bottom:20px;}
.thw-ed-article {min-width:0;background:var(--ed-panel)!important;border:1px solid var(--ed-border)!important;border-radius:16px;padding:clamp(20px,4vw,42px);}
.thw-ed-article-head h1 {font-size:clamp(29px,4.1vw,44px)!important;line-height:1.17!important;margin:12px 0 18px!important;}
.thw-ed-article-head {margin-bottom:26px;}
.thw-ed-hero {margin:0 0 30px!important;border-radius:12px;overflow:hidden;background:#080f1d;display:flex;justify-content:center;}
body.thw-editorial .thw-ed-hero img {display:block!important;max-width:100%!important;width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;margin:0!important;border-radius:0!important;}
body.thw-editorial .thw-ed-prose {margin:0!important;color:var(--ed-text)!important;font-size:17px!important;line-height:1.82!important;min-width:0;max-width:100%!important;}
body.thw-editorial .thw-ed-prose p,body.thw-editorial .thw-ed-prose li {color:var(--ed-text)!important;font-size:inherit!important;line-height:inherit!important;}
.thw-ed-prose p {margin:0 0 1.2em!important;}
.thw-ed-prose h2 {font-size:clamp(23px,3vw,30px)!important;line-height:1.3!important;margin:1.5em 0 .55em!important;}
.thw-ed-prose h3 {font-size:clamp(20px,2.5vw,24px)!important;line-height:1.4!important;margin:1.3em 0 .55em!important;}
.thw-ed-prose h4 {font-size:19px!important;}
.thw-ed-prose a {text-decoration:underline;text-underline-offset:3px;}
.thw-ed-prose img,.thw-ed-prose video {max-width:100%!important;height:auto!important;border-radius:8px;}
.thw-ed-prose iframe {max-width:100%;}
.thw-ed-prose pre,.thw-ed-prose .wp-block-table {max-width:100%;overflow:auto;}
.thw-ed-prose pre {padding:16px;background:var(--ed-control);border:1px solid var(--ed-border);border-radius:10px;white-space:pre;}
.thw-ed-prose table {max-width:100%;display:block;overflow:auto;}
.thw-ed-prose blockquote {margin:1.4em 0;padding:12px 18px;border-left:3px solid var(--ed-accent);background:var(--ed-control);}
.thw-ed-tags {display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid var(--ed-border);margin-top:32px;padding-top:20px;}
.thw-ed-post-nav {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0;}
.thw-ed-post-nav div {min-width:0;}
.thw-ed-post-nav a {display:block;border:1px solid var(--ed-border);background:var(--ed-panel);border-radius:10px;padding:14px;font-size:14px;line-height:1.5;}
.thw-ed-comments {padding:clamp(20px,4vw,36px);margin-top:24px;background:var(--ed-panel)!important;border:1px solid var(--ed-border)!important;border-radius:16px;color:var(--ed-text)!important;min-width:0;}
.thw-ed-discussion-head {border-bottom:1px solid var(--ed-border);padding-bottom:18px;margin-bottom:24px;}
.thw-ed-discussion-head h2 {font-size:clamp(23px,3vw,29px)!important;line-height:1.3!important;margin:10px 0!important;}
.thw-ed-count {display:inline-flex;vertical-align:middle;border:1px solid var(--ed-border);background:var(--ed-control);border-radius:999px;padding:2px 10px;font-size:14px;color:var(--ed-muted);}
.thw-ed-discussion-head p,.thw-ed-comments .comment-notes,.thw-ed-comments .logged-in-as,.thw-ed-privacy-note,.thw-ed-empty-comments {color:var(--ed-muted)!important;font-size:14px!important;line-height:1.6;}
.thw-ed-comments .comment-respond {margin:0 0 26px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;}
.thw-ed-comments .comment-reply-title,.thw-ed-replies-title {font-size:20px!important;line-height:1.35!important;margin:0 0 16px!important;}
.thw-ed-comments label {display:block;color:var(--ed-text)!important;font-size:14px!important;font-weight:600;margin:0 0 6px;}
.thw-ed-comments textarea {min-height:120px;resize:vertical;}
.thw-ed-comments .comment-form p {margin:0 0 16px!important;}
.thw-ed-comments .comment-form-cookies-consent {display:flex;align-items:flex-start;gap:10px;}
.thw-ed-comments .comment-form-cookies-consent input {flex:none;margin-top:5px;}
.thw-ed-comments .comment-form-cookies-consent label {font-weight:400;line-height:1.55;}
.thw-ed-comments .comment-list,.thw-ed-comments .children {list-style:none!important;margin:0!important;padding:0!important;}
.thw-ed-comments .children {padding-inline-start:clamp(10px,3vw,28px)!important;border-inline-start:1px solid var(--ed-border);}
.thw-ed-comments .comment-body {padding:18px 0!important;margin:0!important;border:0!important;border-top:1px solid var(--ed-border)!important;background:none!important;box-shadow:none!important;}
.thw-ed-comments .comment-author {display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:var(--ed-heading)!important;font-size:15px;}
.thw-ed-comments .comment-author img {border-radius:50%;width:40px;height:40px;margin:0!important;}
.thw-ed-comments .comment-metadata,.thw-ed-comments .comment-metadata a,.thw-ed-comments .comment-awaiting-moderation {font-size:12px!important;color:var(--ed-muted)!important;}
.thw-ed-comments .comment-content {margin:12px 0;color:var(--ed-text)!important;font-size:15px;line-height:1.65;}
.thw-ed-comments .comment-content p {color:var(--ed-text)!important;}
.thw-ed-comments .reply a {font-size:13px;font-weight:700;}
@media(max-width:980px){.thw-ed-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.thw-ed-shell{padding-inline:22px;}}
@media(max-width:640px){.thw-ed-shell{padding:24px 14px 44px;}.thw-ed-grid{grid-template-columns:minmax(0,1fr);gap:16px;}.thw-ed-card-body{padding:18px;}.thw-ed-archive-head p{font-size:15px!important;}.thw-ed-search{gap:7px;}.thw-ed-search button{padding-inline:14px!important;}.thw-ed-article,.thw-ed-comments{padding:18px;}.thw-ed-article-head{margin-bottom:20px;}.thw-ed-hero{margin-bottom:22px!important;}.thw-ed-post-nav{grid-template-columns:minmax(0,1fr);}.thw-ed-comments .children{padding-inline-start:10px!important;}.thw-ed-comments input[type=submit]{width:100%;}.thw-ed-prose{font-size:16px!important;}}

/* Editorial refinement: a reading surface, not a giant nested card. */
body.thw-editorial-single .thw-ed-single {max-width:1160px;padding-top:36px;}
body.thw-editorial-single .thw-ed-article {display:grid;grid-template-columns:minmax(0,1fr) 272px;gap:48px;background:transparent!important;border:0!important;border-radius:0;padding:0!important;}
.thw-ed-reading {min-width:0;}
.thw-ed-article-head {margin-bottom:24px;}
body.thw-editorial .thw-ed-article-head h1 {font-size:clamp(28px,3.2vw,40px)!important;line-height:1.2!important;font-weight:700!important;margin:10px 0 14px!important;}
.thw-ed-article-head .thw-ed-meta {padding-bottom:18px;border-bottom:1px solid var(--ed-border);}
.thw-ed-hero {border-radius:9px;margin-bottom:24px!important;}
body.thw-editorial .thw-ed-prose {font-size:17px!important;line-height:1.8!important;}
.thw-ed-rail {min-width:0;}
.thw-ed-rail-inner {position:sticky;top:100px;background:var(--ed-panel);border:1px solid var(--ed-border);padding:20px;border-radius:12px;}
.thw-ed-rail h2 {font-size:19px!important;line-height:1.35!important;margin:10px 0 16px!important;}
.thw-ed-related {display:flex;flex-direction:column;gap:7px;border-top:1px solid var(--ed-border);padding:14px 0;font-size:14px;line-height:1.5;color:var(--ed-heading)!important;font-weight:600;}
.thw-ed-related time {font-size:12px;color:var(--ed-muted);font-weight:400;}
.thw-ed-rail-all {display:block;border-top:1px solid var(--ed-border);padding-top:14px;font-size:13px;font-weight:700;}
.thw-ed-single .thw-ed-post-nav,.thw-ed-single .thw-ed-comments {max-width:calc(100% - 320px);}
body.thw-editorial .thw-ed-comments {padding:24px!important;border-radius:12px;}
.thw-ed-discussion-head {margin-bottom:16px;padding-bottom:14px;}
.thw-ed-discussion-head h2 {font-size:25px!important;}
.thw-ed-discussion-head p {margin-bottom:0!important;}
.thw-ed-comment-policy {display:flex;flex-direction:column;gap:4px;padding:12px 14px;margin-bottom:20px;border-radius:8px;background:var(--ed-control);border:1px solid var(--ed-border);font-size:13px;color:var(--ed-muted);}
.thw-ed-comment-policy strong {color:var(--ed-accent);font-size:13px;}
body.thw-editorial .thw-ed-comments .comment-form {display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start;margin:0!important;}
.thw-ed-comments .comment-form > * {grid-column:1/-1;min-width:0;}
.thw-ed-comments .comment-form > .comment-form-author,.thw-ed-comments .comment-form > .comment-form-email {grid-column:auto;}
body.thw-editorial .thw-ed-comments .comment-form p {margin:0!important;}
body.thw-editorial .thw-ed-comments textarea {height:112px!important;min-height:112px!important;max-height:500px!important;display:block;resize:vertical;}
.thw-ed-comments label span,.thw-ed-field-help {font-size:12px;color:var(--ed-muted);font-weight:400;}
.thw-ed-field-help {display:block;margin-top:6px;}
body.thw-editorial .thw-ed-comments input[type=submit] {min-height:42px;padding:10px 18px!important;font-size:14px!important;text-transform:none!important;letter-spacing:0!important;width:auto;}
.thw-ed-comments .form-submit {margin-top:4px!important;}
.thw-ed-comments .comment-list {margin-top:12px!important;}
.thw-ed-comments .thw-ed-empty-comments {margin:12px 0 0!important;}
.thw-ed-shell .thw-ed-card {transition:border-color .18s ease;}
.thw-ed-shell .thw-ed-card:hover {border-color:#4b6a86!important;}
@media(max-width:1000px){
 body.thw-editorial-single .thw-ed-article {gap:26px;grid-template-columns:minmax(0,1fr) 230px;}
 .thw-ed-single .thw-ed-post-nav,.thw-ed-single .thw-ed-comments {max-width:calc(100% - 256px);}
}
@media(max-width:800px){
 body.thw-editorial-single .thw-ed-article {grid-template-columns:minmax(0,1fr);gap:24px;}
 .thw-ed-rail-inner {position:static;}
 .thw-ed-single .thw-ed-post-nav,.thw-ed-single .thw-ed-comments {max-width:none;}
}
@media(max-width:640px){
 body.thw-editorial-single .thw-ed-single {padding-top:24px;}
 body.thw-editorial .thw-ed-comments {padding:18px!important;}
 body.thw-editorial .thw-ed-comments .comment-form {grid-template-columns:minmax(0,1fr);}
 .thw-ed-comments .comment-form > .comment-form-author,.thw-ed-comments .comment-form > .comment-form-email {grid-column:1/-1;}
 body.thw-editorial .thw-ed-comments input[type=submit] {width:100%;}
}

body.thw-editorial .thw-ed-comments .comment-form label {display:block!important;color:var(--ed-text)!important;}
body.thw-editorial .thw-ed-comments .comment-form [hidden] {display:none!important;}

/* Reading comfort: isolate the article from the animated site backdrop.
   Keep motion visible in the margins, never competing with article text. */
body.thw-editorial-single .thw-ed-reading {
    position:relative;
    min-width:0;
    align-self:start;
    padding:clamp(18px,2.5vw,30px);
    border:1px solid #293a50;
    border-radius:14px;
    background:#101a2a!important;
    color:#eaf2fb;
}
@supports ((backdrop-filter:blur(12px)) or (-webkit-backdrop-filter:blur(12px))) {
    body.thw-editorial-single .thw-ed-reading {
        background:rgba(16,26,42,.96)!important;
        -webkit-backdrop-filter:blur(12px);
        backdrop-filter:blur(12px);
    }
}
body.thw-editorial-single .thw-ed-reading .thw-ed-prose,
body.thw-editorial-single .thw-ed-reading .thw-ed-prose p,
body.thw-editorial-single .thw-ed-reading .thw-ed-prose li {color:#eaf2fb!important;}
body.thw-editorial-single .thw-ed-reading .thw-ed-prose h2,
body.thw-editorial-single .thw-ed-reading .thw-ed-prose h3 {color:#f8faff!important;}
body.thw-editorial-single .thw-ed-reading .thw-ed-prose pre {background:#0b1423!important;margin-bottom:1.2em;}
body.thw-editorial-single .thw-ed-article {gap:36px;}
body.thw-editorial-single .thw-ed-post-nav,
body.thw-editorial-single .thw-ed-comments {max-width:calc(100% - 308px);}
@media(max-width:1000px) {
    body.thw-editorial-single .thw-ed-article {gap:26px;}
    body.thw-editorial-single .thw-ed-post-nav,
    body.thw-editorial-single .thw-ed-comments {max-width:calc(100% - 256px);}
}
@media(max-width:800px) {
    body.thw-editorial-single .thw-ed-article {gap:24px;}
    body.thw-editorial-single .thw-ed-post-nav,
    body.thw-editorial-single .thw-ed-comments {max-width:none;}
}
@media(max-width:640px) {
    body.thw-editorial-single .thw-ed-reading {
        padding:16px;
        border-radius:12px;
        background:#101a2a!important;
        -webkit-backdrop-filter:none;
        backdrop-filter:none;
    }
}
@media(prefers-reduced-motion:reduce) {
    body.thw-editorial-single .thw-ed-reading {
        background:#101a2a!important;
        -webkit-backdrop-filter:none;
        backdrop-filter:none;
    }
}

/* Contextual course discovery: no overlays, tracking scripts or forced checkout. */
body.thw-editorial-single .thw-ed-course-promo {
    box-sizing:border-box;min-width:0;padding:19px;background:#142335!important;
    border:1px solid #315365;border-radius:12px;color:#eaf2fb!important;
    overflow-wrap:anywhere;
}
body.thw-editorial-single .thw-ed-course-rail {margin-bottom:18px;}
body.thw-editorial-single .thw-ed-course-end {margin:32px 0 0;padding:clamp(18px,3vw,26px);}
.thw-ed-course-label {display:flex;gap:7px;align-items:center;color:#80e4ed;font-size:11px;letter-spacing:.09em;font-weight:700;}
body.thw-editorial-single .thw-ed-course-promo h2 {color:#f8fafc!important;font-size:19px!important;line-height:1.35!important;margin:10px 0 15px!important;}
body.thw-editorial-single .thw-ed-course-promo h3 {color:#f8fafc!important;font-size:16px!important;line-height:1.45!important;margin:0 0 8px!important;}
body.thw-editorial-single .thw-ed-course-promo p {color:#bccbda!important;font-size:14px!important;line-height:1.65!important;margin:0 0 15px!important;}
.thw-ed-course-body,.thw-ed-course-copy {min-width:0;}
.thw-ed-course-media {border-radius:8px;overflow:hidden;margin:0 0 14px;background:#0c1726;}
body.thw-editorial-single .thw-ed-course-media img {display:block!important;width:100%!important;height:auto!important;max-width:100%!important;aspect-ratio:16/9;object-fit:cover;border-radius:0!important;margin:0!important;}
body.thw-editorial-single .thw-ed-course-promo .thw-ed-course-action {
    display:flex;align-items:center;justify-content:space-between;gap:8px;
    min-height:44px;box-sizing:border-box;padding:10px 13px!important;
    background:#71dfe9!important;color:#082334!important;
    -webkit-text-fill-color:#082334!important;text-decoration:none!important;
    border-radius:8px;font-size:13px!important;font-weight:700;line-height:1.35;
}
body.thw-editorial-single .thw-ed-course-action:hover {background:#a5f3fc!important;}
.thw-ed-course-action:focus-visible,.thw-ed-course-all:focus-visible {outline:2px solid #a5f3fc;outline-offset:4px;}
body.thw-editorial-single .thw-ed-course-all {display:block;margin-top:12px;text-align:center;font-size:12px!important;color:#a8e5ee!important;}
.thw-ed-course-end .thw-ed-course-body {display:flex;align-items:center;gap:18px;}
.thw-ed-course-end .thw-ed-course-copy {flex:1;}
.thw-ed-course-end .thw-ed-course-media {flex:0 0 min(32%,180px);margin:0;}
body.thw-editorial-single .thw-ed-course-end .thw-ed-course-action {display:inline-flex;justify-content:center;gap:12px;}
/* Keep the remaining related-article list in normal flow so nothing obscures a long page. */
body.thw-editorial-single .thw-ed-rail-inner {position:static;}
@media(max-width:800px) {
    /* The article-end recommendation already provides the same destination on mobile. */
    body.thw-editorial-single .thw-ed-course-rail {display:none!important;}
}
@media(max-width:480px) {
    .thw-ed-course-end .thw-ed-course-body {display:block;}
    .thw-ed-course-end .thw-ed-course-media {margin-bottom:14px;}
    body.thw-editorial-single .thw-ed-course-end .thw-ed-course-action {display:flex;width:100%;justify-content:space-between;}
}
