/* Design tokens (--bg, --accent, --mono, etc.) live in static/css/tokens.css
   and are loaded before this file by every shell that imports it. */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

body {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 96px 96px;
    background-position: -1px -1px;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 20% 0%, rgba(255, 122, 26, 0.06), transparent 60%),
                radial-gradient(ellipse at 80% 100%, rgba(123, 166, 90, 0.04), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0;
    color: var(--text);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 120ms ease, background 120ms ease;
}

a:hover {
    color: #ffa260;
}

p {
    margin: 0 0 1em 0;
}

/* ===== Layout scaffolding ===== */
.edl-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ===== Top bar / nav ===== */
.edl-topbar {
    border-bottom: 1px solid var(--border);
    background: rgba(10, 13, 16, 0.85);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.edl-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* padding-top/bottom only — leave horizontal padding to .edl-shell
       (this element carries both classes; `padding: 14px 0` would zero
       out the shell's horizontal padding and push content to the edges
       on mobile). */
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 24px;
}

.edl-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    font-family: var(--display);
    text-transform: uppercase;
}

.edl-brand-mark {
    width: 36px;
    height: 41px;
    display: block;
    flex-shrink: 0;
}

.edl-brand-name {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.08em;
}

.edl-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.edl-nav a {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    /* Keep the "> " ::before prefix glued to the label. Without nowrap,
       a slightly cramped topbar (just above the 768px hamburger break)
       wraps the label onto a new line and leaves the "> " hanging. */
    white-space: nowrap;
}

.edl-nav a:hover { color: var(--text); }

.edl-nav a::before {
    content: '> ';
    color: var(--accent);
    opacity: 0.6;
}

.edl-nav a.active {
    color: var(--text);
}

.edl-nav a.active::before {
    opacity: 1;
}

/* Higher specificity than `.edl-nav a` so we win the cascade. */
.edl-nav a.edl-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    border: 1px solid var(--border-bright);
    padding: 6px 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.edl-nav a.edl-nav-btn:hover {
    border-color: var(--accent);
    background: rgba(255, 122, 26, 0.08);
    color: #ffa260;
}

/* Suppress the "> " prefix the regular nav links use. */
.edl-nav a.edl-nav-btn::before {
    content: none;
}

.edl-nav-btn-icon {
    display: block;
    flex-shrink: 0;
}

.edl-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--signal);
    border: 1px solid var(--border-bright);
    padding: 4px 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.edl-status-chip .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--signal);
    box-shadow: 0 0 8px var(--signal);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ===== Section framing ===== */
.edl-section {
    padding: 72px 0;
    position: relative;
}

.edl-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.edl-section-label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.edl-section-title {
    font-size: 34px;
    line-height: 1;
}

.edl-section-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ===== Hero ===== */
.edl-hero {
    padding: 56px 0 80px;
    position: relative;
    overflow: hidden;
}

.edl-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent 0,
        transparent 22px,
        rgba(255, 122, 26, 0.025) 22px,
        rgba(255, 122, 26, 0.025) 23px
    );
    pointer-events: none;
}

.edl-hero-preamble {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.edl-hero-preamble .tick {
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.edl-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 342px);
    gap: 48px;
    align-items: start;
}

.edl-hero h1 {
    font-size: clamp(48px, 7.4vw, 96px);
    line-height: 0.95;
    letter-spacing: 0.01em;
    max-width: 15ch;
}

.edl-hero h1 .accent {
    color: var(--accent);
}

.edl-hero h1 .nowrap {
    white-space: nowrap;
}

.edl-hero-lede {
    margin-top: 28px;
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 62ch;
}

.edl-hero-lede strong {
    color: var(--text);
    font-weight: 500;
}

.edl-hero-cta {
    margin-top: 40px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Equal-width hero CTAs. flex: 1 1 240px gives each button a 240px
   basis that grows to share the row evenly when both fit — so on
   desktop they end up identical width regardless of label length.
   max-width keeps a wide viewport from sprawling them out comically.
   The mobile breakpoint below promotes them to full-width stacked
   buttons for a more tappable, polished phone layout. */
.edl-hero-cta .edl-btn {
    flex: 1 1 240px;
    max-width: 320px;
    justify-content: center;
}

.edl-latest-callout {
    margin-top: 38px;
    padding: 22px;
    border: 1px solid rgba(255, 122, 26, 0.34);
    background: linear-gradient(180deg, rgba(255, 122, 26, 0.08), transparent 68%), var(--bg-panel);
    position: relative;
}

.edl-latest-callout::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 16px;
    height: 16px;
    border-top: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
}

.edl-latest-callout-link {
    display: block;
    color: var(--text);
    text-decoration: none;
}

.edl-latest-callout h2 {
    margin: 10px 0 12px;
    font-size: 24px;
    line-height: 1.08;
}

.edl-latest-callout p {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
}

.edl-latest-callout-read {
    display: inline-flex;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ===== Buttons ===== */
.edl-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid var(--border-bright);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.edl-btn::before {
    content: '[';
    color: var(--text-dim);
}
.edl-btn::after {
    content: ']';
    color: var(--text-dim);
}

.edl-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.edl-btn.primary {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 122, 26, 0.06);
}

.edl-btn.primary:hover {
    background: rgba(255, 122, 26, 0.14);
    color: #ffa260;
}

.edl-btn.danger {
    border-color: var(--danger-bright);
    color: var(--danger-bright);
    background: rgba(192, 57, 43, 0.08);
}

.edl-btn.danger:hover {
    color: #ff7468;
    background: rgba(192, 57, 43, 0.14);
}

/* ===== Hero stat strip ===== */
.edl-stat-strip {
    margin-top: 48px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border);
    background: var(--bg-panel);
}

.edl-stat {
    padding: 18px 22px;
    border-right: 1px solid var(--border);
}

.edl-stat:last-child { border-right: none; }

.edl-stat-label {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.edl-stat-value {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ===== Project grid ===== */
.edl-project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.edl-project {
    display: block;
    padding: 24px;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    position: relative;
    color: var(--text);
    transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.edl-project::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 14px;
    height: 14px;
    border-top: 1px solid var(--accent);
    border-left: 1px solid var(--accent);
}
.edl-project::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 14px;
    height: 14px;
    border-bottom: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
}

.edl-project:hover {
    border-color: var(--border-bright);
    background: #151b20;
    transform: translateY(-2px);
    color: var(--text);
}

.edl-project-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.edl-designator {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.edl-project-status {
    font-family: var(--mono);
    font-size: 10px;
    padding: 2px 8px;
    border: 1px solid var(--border-bright);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.edl-project-status.active {
    color: var(--signal);
    border-color: rgba(123, 166, 90, 0.5);
}

.edl-project-status.dev {
    color: var(--warn);
    border-color: rgba(212, 160, 23, 0.5);
}

.edl-project-status.planned {
    color: var(--text-muted);
}

.edl-project h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.edl-project-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 18px 0;
}

.edl-project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.edl-tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 3px 8px;
}

/* ===== Comms / Learning series ===== */
.edl-comms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.edl-home-grid {
    display: grid;
    gap: 18px;
    align-items: stretch;
}

.edl-home-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edl-home-grid .edl-track-card,
.edl-home-grid .edl-blog-card,
.edl-home-grid .edl-blog-card-link {
    height: 100%;
}

.edl-home-grid .edl-track-card,
.edl-home-grid .edl-blog-card-link {
    display: flex;
    flex-direction: column;
}

.edl-home-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 5 / 3;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0b1014;
    margin-bottom: 18px;
}

.edl-home-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.edl-home-grid .edl-kvp,
.edl-home-grid .edl-project-tags {
    margin-top: auto;
}

.edl-panel {
    padding: 28px;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    position: relative;
    color: var(--text);
    text-decoration: none;
    display: block;
    transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.edl-panel:hover {
    border-color: var(--border-bright);
    transform: translateY(-2px);
}

/* Small 16:7 image sits between the panel label and the title. */
.edl-panel-image {
    display: block;
    width: 240px;
    max-width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0b1014;
    margin: 8px 0 16px;
}

.edl-panel-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edl-panel-label {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--accent);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.edl-panel h3 {
    font-size: 26px;
    margin-bottom: 14px;
}

.edl-panel p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}

.edl-feature-series {
    background: linear-gradient(180deg, rgba(255, 122, 26, 0.08), transparent 60%), var(--bg-panel);
    border-color: rgba(255, 122, 26, 0.35);
}

.edl-kvp {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 18px;
    margin-top: 18px;
    font-family: var(--mono);
    font-size: 12px;
}

.edl-kvp dt {
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.edl-kvp dd {
    margin: 0;
    color: var(--text);
}

/* ===== Mission / about ===== */
.edl-mission-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 48px;
    align-items: start;
}

.edl-mission-aside {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-left: 2px solid var(--accent);
    padding-left: 14px;
    line-height: 1.8;
}

.edl-mission-body {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    max-width: 68ch;
}

.edl-mission-body p + p { margin-top: 1em; }

.edl-mission-body .muted { color: var(--text-muted); }

/* ===== Footer ===== */
.edl-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0 40px;
    margin-top: 48px;
}

.edl-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.edl-footer a { color: var(--text-muted); }
.edl-footer a:hover { color: var(--accent); }

/* ===== Mobile nav (hamburger) ===========================================
   Hidden on desktop; shown below 768px. Clicking the toggle flips
   aria-expanded on the button and the .is-open class on .edl-nav (set by
   nav.js). Bars animate into an X on open. The nav itself becomes a
   drop-down panel anchored to the topbar's bottom edge. */

.edl-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-bright);
    color: var(--text);
    width: 42px;
    height: 42px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: border-color 120ms ease, background 120ms ease;
}
.edl-nav-toggle:hover { border-color: var(--accent); }
.edl-nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    transition: transform 220ms ease, opacity 180ms ease;
    transform-origin: center;
}
.edl-nav-toggle[aria-expanded="true"] {
    border-color: var(--accent);
    color: var(--accent);
}
.edl-nav-toggle[aria-expanded="true"] .edl-nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.edl-nav-toggle[aria-expanded="true"] .edl-nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.edl-nav-toggle[aria-expanded="true"] .edl-nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .edl-shell { padding: 0 20px; }
    .edl-nav { gap: 18px; }
    .edl-hero-grid,
    .edl-project-grid,
    .edl-comms-grid,
    .edl-home-grid--three { grid-template-columns: 1fr; }
    .edl-stat-strip { grid-template-columns: repeat(2, 1fr); }
    .edl-stat:nth-child(2) { border-right: none; }
    .edl-stat:nth-child(1), .edl-stat:nth-child(2) { border-bottom: 1px solid var(--border); }
    .edl-mission-grid { grid-template-columns: 1fr; gap: 20px; }
    .edl-section-head { flex-direction: column; align-items: flex-start; }
    .edl-latest-callout { margin-top: 0; }
}

/* Hamburger / drawer kicks in below 768px — gives roomy phones + small
   tablets the full nav, but anything narrower flips to the drawer. */
@media (max-width: 768px) {
    .edl-topbar { position: relative; }
    .edl-nav-toggle { display: flex; }

    /* Roomier inset on the topbar so the logo + hamburger don't kiss
       the screen edges. Shell's 20px wasn't enough breathing room on
       phones; bumping just the topbar (rather than the whole shell)
       keeps body sections at their tighter inset. */
    .edl-topbar-inner {
        padding-left: 24px;
        padding-right: 24px;
    }

    /* Tighter hero top so the preamble sits close under the topbar
       instead of marooned in dead space. */
    .edl-hero { padding-top: 32px; }

    .edl-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        /* Solid panel so the drawer is readable. The topbar above uses
           rgba/blur for that floating-glass look; the drawer can't —
           text behind it would bleed through. */
        background: var(--bg);
        border-bottom: 1px solid var(--border-bright);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.45);
        padding: 6px 20px 16px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 240ms ease, opacity 200ms ease, visibility 240ms;
        z-index: 50;
    }
    .edl-nav.is-open {
        max-height: calc(100vh - 70px);
        opacity: 1;
        visibility: visible;
        overflow-y: auto;
    }
    .edl-nav a {
        padding: 14px 4px;
        border-bottom: 1px solid var(--border);
        font-size: 14px;
    }
    .edl-nav a.edl-nav-btn {
        margin-top: 10px;
        justify-content: flex-start;
        padding: 12px 14px;
        border-bottom: 1px solid var(--border-bright);  /* keep the bordered button feel */
    }
    .edl-nav .edl-status-chip {
        align-self: flex-start;
        margin-top: 14px;
    }

    /* Hero CTAs become a full-width stacked-button group on mobile —
       same width by definition, easier tap targets, more polished
       than two centered pill buttons of mismatched widths.
       The `flex: none` reset is critical: the desktop rule above sets
       flex-basis: 240px, which is the *main-axis* size; once the
       container flips to flex-direction: column that 240px would
       become a 240px height floor and the buttons go ~100px+ tall. */
    .edl-hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    .edl-hero-cta .edl-btn {
        flex: none;
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 560px) {
    .edl-nav .nav-label-full { display: none; }
    /* Keep the tightened top from the 768px rule — only pull the bottom
       padding in for the smallest screens. (Was setting 64px top here,
       which clobbered the tighter 32px we want post-topbar.) */
    .edl-hero { padding-bottom: 48px; }
    .edl-section { padding: 56px 0; }
}

/* Focus outline for h1 (Wagtail's FocusOnNavigate friendly) */
h1:focus { outline: none; }

/* =============================================================================
   Theme refresh - public shell, home page, auth, and shared app chrome
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body.edl-body,
body.edl-app-body {
    color: var(--c-text);
    background: var(--c-bg);
}

body.edl-body::before,
body.edl-app-body::before {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255, 122, 26, 0.08), transparent 60%),
        radial-gradient(ellipse at 82% 100%, rgba(122, 122, 170, 0.08), transparent 55%);
}

.edl-accent {
    color: var(--c-orange);
}

.edl-main {
    min-height: 70vh;
}

.edl-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-border);
}

[data-theme="light"] .edl-header {
    background: rgba(245, 245, 247, 0.92);
}

.edl-header .edl-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.edl-nav__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--c-text-bright);
    text-decoration: none;
}

.edl-nav__logo::before {
    content: none;
}

.edl-header .edl-nav a.edl-nav__logo::before {
    content: none;
}

.edl-nav__logo img {
    width: 34px;
    height: auto;
    flex: 0 0 auto;
}

.edl-nav__logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-text-bright);
    white-space: nowrap;
}

.edl-nav__menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.edl-nav__link,
.edl-nav__menu .edl-nav__link {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.edl-nav__link::before {
    content: none;
}

.edl-nav__link:hover,
.edl-nav__link--active {
    color: var(--c-orange);
}

.edl-nav__link--active::before {
    content: '> ';
}

.edl-nav__link--cta,
a.edl-nav__link--cta {
    background: var(--c-orange);
    color: var(--c-btn-primary-text);
    padding: 8px 18px;
    border-radius: var(--radius);
    font-weight: 700;
}

.edl-header .edl-nav__menu a.edl-nav__link--cta {
    color: #000;
}

.edl-header .edl-nav__menu a.edl-nav__link--cta::before,
.edl-header .edl-nav__menu a.edl-nav__link--cta::after,
.edl-header .edl-nav__menu a.edl-nav__link--cta svg,
.edl-header .edl-nav__menu a.edl-nav__link--cta .edl-nav-btn-icon {
    color: #000;
    opacity: 1;
    fill: currentColor;
}

.edl-nav__link--cta:hover,
a.edl-nav__link--cta:hover {
    background: var(--c-orange-dim);
    color: var(--c-btn-primary-text);
}

.edl-header .edl-nav__menu a.edl-nav__link--cta:hover {
    color: #000;
}

.edl-header .edl-nav__menu a.edl-nav__link--cta:hover::before,
.edl-header .edl-nav__menu a.edl-nav__link--cta:hover::after,
.edl-header .edl-nav__menu a.edl-nav__link--cta:hover svg,
.edl-header .edl-nav__menu a.edl-nav__link--cta:hover .edl-nav-btn-icon {
    color: #000;
    opacity: 1;
    fill: currentColor;
}

.edl-theme-toggle {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--c-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.edl-theme-toggle:hover {
    color: var(--c-orange);
    border-color: var(--c-orange);
    background: var(--c-orange-glow);
}

.edl-theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.edl-theme-toggle__icon--dark,
[data-theme="dark"] .edl-theme-toggle__icon--light {
    display: none;
}

[data-theme="dark"] .edl-theme-toggle__icon--dark,
[data-theme="light"] .edl-theme-toggle__icon--light {
    display: block;
}

[data-theme="light"] .edl-theme-toggle__icon--dark {
    display: none;
}

.edl-header .edl-nav__toggle {
    display: none;
    width: 34px;
    height: 28px;
    padding: 3px;
    background: transparent;
    border: 0;
    color: var(--c-text);
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}

.edl-header .edl-nav__toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 200ms ease, opacity 160ms ease;
}

.edl-header .edl-nav__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.edl-header .edl-nav__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.edl-header .edl-nav__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.edl-btn--primary,
.edl-btn.primary.edl-btn--primary {
    border-color: var(--c-orange);
    background: var(--c-orange);
    color: var(--c-btn-primary-text);
}

.edl-btn--primary::before,
.edl-btn--primary::after,
.edl-btn.primary.edl-btn--primary::before,
.edl-btn.primary.edl-btn--primary::after,
.edl-nav__link--cta::before,
.edl-nav__link--cta::after,
.edl-tool-card__badge::before,
.edl-tool-card__badge::after,
.edl-how__number::before,
.edl-how__number::after {
    color: #000;
}

.edl-btn--primary:hover,
.edl-btn.primary.edl-btn--primary:hover {
    border-color: var(--c-orange-dim);
    background: var(--c-orange-dim);
    color: var(--c-btn-primary-text);
}

.edl-btn--ghost {
    border-color: var(--c-border-light);
    color: var(--c-text-bright);
}

.edl-btn--large {
    padding: 14px 30px;
}

.edl-hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 72px 24px 0;
    overflow: visible;
}

.edl-hero::after {
    content: none;
}

.edl-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 60px;
    align-items: center;
}

.edl-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--c-orange-glow);
    border: 1px solid rgba(255, 122, 26, 0.25);
    border-radius: var(--radius-lg);
    padding: 6px 16px;
    margin-bottom: 20px;
}

.edl-hero__badge-icon {
    color: var(--c-orange);
    font-weight: 700;
}

.edl-hero__badge-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-orange);
}

.edl-hero__title {
    font-size: clamp(48px, 7vw, 88px);
    line-height: 1.05;
    letter-spacing: 0;
    color: var(--c-text-bright);
    margin-bottom: 24px;
}

.edl-hero__accent {
    color: var(--c-orange);
}

.edl-hero__sub {
    max-width: 560px;
    color: var(--c-text);
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 36px;
}

.edl-hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.edl-hero__visual {
    display: flex;
    justify-content: flex-end;
}

.edl-hero__featured {
    display: block;
    max-width: 380px;
    width: 100%;
    overflow: hidden;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 60px rgba(255, 122, 26, 0.06);
    text-decoration: none;
    color: var(--c-text-bright);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.edl-hero__featured:hover {
    border-color: var(--c-border-light);
    box-shadow: 0 0 60px rgba(255, 122, 26, 0.12);
    transform: translateY(-2px);
    color: var(--c-text-bright);
}

.edl-hero__featured-image {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.edl-hero__featured-image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-bg-elevated);
    color: var(--c-text-dim);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.12em;
}

.edl-hero__featured-bar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 16px;
    background: var(--c-bg-elevated);
    border-bottom: 1px solid var(--c-border);
}

.edl-hero__featured-label,
.edl-hero__featured-date {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.edl-hero__featured-label {
    color: var(--c-orange);
    font-family: var(--font-display);
    font-weight: 700;
}

.edl-hero__featured-date {
    color: var(--c-text-dim);
}

.edl-hero__featured-body {
    padding: 20px 16px;
}

.edl-hero__featured-title {
    font-size: 20px;
    line-height: 1.25;
    color: var(--c-text-bright);
    margin-bottom: 12px;
}

.edl-hero__featured-intro {
    color: var(--c-text-muted);
    font-size: 13px;
    line-height: 1.65;
    margin-bottom: 16px;
}

.edl-hero__featured-link,
.edl-card__link {
    color: var(--c-orange);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.edl-trust {
    margin-top: 80px;
    padding: 40px 24px;
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
}

.edl-trust__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: center;
    text-align: center;
}

.edl-trust__number {
    display: block;
    color: var(--c-orange);
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.edl-trust__label {
    display: block;
    margin-top: 8px;
    color: var(--c-text-muted);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.12em;
    line-height: 1.35;
    text-transform: uppercase;
}

.edl-trust__divider {
    width: 1px;
    height: 42px;
    background: var(--c-border);
    margin: 0 auto;
}

.edl-section__header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 36px;
}

.edl-section__label {
    display: block;
    margin-bottom: 12px;
    color: var(--c-orange);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.edl-section__title {
    font-size: clamp(32px, 4vw, 42px);
    line-height: 1.15;
    color: var(--c-text-bright);
    margin-bottom: 16px;
}

.edl-section__desc {
    color: var(--c-text);
    font-size: 15px;
    line-height: 1.7;
}

.edl-latest,
.edl-tools,
.edl-philosophy,
.edl-cta {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 64px 24px;
}

.edl-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.edl-card-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edl-card,
.edl-tool-card,
.edl-quote {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    color: var(--c-text);
}

.edl-card {
    overflow: hidden;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.edl-card:hover,
.edl-tool-card:hover {
    border-color: var(--c-border-light);
    background: var(--c-bg-card-hover);
}

.edl-card__image-link,
.edl-card__image {
    display: block;
}

.edl-card__image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.edl-card__body {
    padding: 24px;
}

.edl-card__date,
.edl-card__tag {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--c-text-dim);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.edl-card__tag {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 3px 10px;
}

.edl-card__title {
    font-size: 20px;
    line-height: 1.25;
    margin-bottom: 10px;
}

.edl-card__title a {
    color: var(--c-text-bright);
}

.edl-card__title a:hover {
    color: var(--c-orange);
}

.edl-card__desc {
    color: var(--c-text-muted);
    font-size: 13px;
    line-height: 1.65;
    margin-bottom: 16px;
}

.edl-latest__more {
    margin-top: 24px;
    text-align: center;
}

.edl-tools__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.edl-tool-card {
    position: relative;
    padding: 36px 32px;
    transition: border-color 180ms ease, background 180ms ease;
}

.edl-tool-card--featured {
    grid-column: 1 / -1;
    border-color: var(--c-orange);
    background: linear-gradient(135deg, var(--c-bg-card) 0%, rgba(255, 122, 26, 0.05) 100%);
}

.edl-tool-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    border-radius: var(--radius);
    background: var(--c-orange);
    color: var(--c-btn-primary-text);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.edl-tool-card__icon {
    color: var(--c-orange);
    margin-bottom: 20px;
}

.edl-tool-card__title {
    font-size: 24px;
    color: var(--c-text-bright);
    margin-bottom: 12px;
}

.edl-tool-card--featured .edl-tool-card__title {
    font-size: 28px;
}

.edl-tool-card__desc {
    color: var(--c-text);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 22px;
}

.edl-tool-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.edl-tool-card__features li {
    color: var(--c-text);
    font-size: 13px;
    line-height: 1.9;
}

.edl-tool-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.edl-tool-card__tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-text-muted);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

a.edl-tool-card__tag:hover {
    color: var(--c-orange);
    border-color: var(--c-orange);
}

.edl-how {
    padding: 64px 24px;
    background: var(--c-bg-elevated);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
}

.edl-how__steps {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    position: relative;
}

.edl-how__steps::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 64px;
    right: 64px;
    height: 2px;
    background: linear-gradient(to right, var(--c-orange), var(--c-border));
}

.edl-how__step {
    position: relative;
    z-index: 1;
    text-align: center;
}

.edl-how__number {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--c-orange);
    color: var(--c-btn-primary-text);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
}

.edl-how__title {
    color: var(--c-text-bright);
    font-size: 16px;
    margin-bottom: 10px;
}

.edl-how__desc {
    color: var(--c-text-muted);
    font-size: 13px;
    line-height: 1.65;
}

.edl-philosophy__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 60px;
    align-items: center;
}

.edl-philosophy__title {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.2;
    margin-bottom: 28px;
}

.edl-philosophy__text {
    color: var(--c-text);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.edl-quote {
    border-left: 3px solid var(--c-orange);
    padding: 32px;
}

.edl-quote__text {
    color: var(--c-text-bright);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.55;
}

.edl-quote__attr {
    color: var(--c-text-muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.edl-cta {
    max-width: none;
    background: linear-gradient(180deg, var(--c-bg) 0%, rgba(255, 122, 26, 0.07) 50%, var(--c-bg) 100%);
}

.edl-cta__inner {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.edl-cta__title {
    font-size: clamp(34px, 4vw, 44px);
    margin-bottom: 16px;
}

.edl-cta__desc {
    color: var(--c-text);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 36px;
}

.edl-cta__actions {
    display: flex;
    justify-content: center;
}

.edl-footer {
    max-width: none;
    margin-top: 0;
    padding: 48px 0 0;
    border-top: 1px solid var(--c-border);
}

.edl-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr);
    gap: 60px;
    padding: 0 24px 48px;
}

.edl-footer__brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.edl-footer__logo {
    height: 30px;
    width: auto;
}

.edl-footer__brand-text,
.edl-footer__heading {
    color: var(--c-text-bright);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.edl-footer__brand-text {
    font-size: 16px;
}

.edl-footer__tagline {
    color: var(--c-text-muted);
    font-size: 13px;
    line-height: 1.7;
    max-width: 420px;
}

.edl-footer__links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.edl-footer__heading {
    font-size: 12px;
    margin-bottom: 16px;
}

.edl-footer__link {
    display: block;
    color: var(--c-text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.edl-footer__link:hover {
    color: var(--c-orange);
}

.edl-footer__bar {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 20px 24px;
    border-top: 1px solid var(--c-border);
    color: var(--c-text-dim);
    font-size: 12px;
    text-align: center;
}

.edl-login {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 24px;
}

.edl-login__card.edl-auth-card {
    max-width: 430px;
    padding: 40px 36px;
    border-radius: var(--radius-lg);
    background: var(--c-bg-card);
}

.edl-login__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.edl-login__logo {
    height: 40px;
    width: auto;
}

.edl-login__brand {
    color: var(--c-text-bright);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.edl-login__title.edl-auth-title {
    font-size: 28px;
    margin-bottom: 22px;
}

.edl-auth-form input[type="text"],
.edl-auth-form input[type="email"],
.edl-auth-form input[type="password"],
.edl-auth-form input[type="number"],
.edl-auth-form textarea,
.edl-auth-form select,
.edl-form-field input[type="text"],
.edl-form-field input[type="email"],
.edl-form-field input[type="password"],
.edl-form-field input[type="file"],
.edl-form-field textarea,
.edl-form-field select {
    background: var(--c-bg-elevated);
    border-color: var(--c-border);
    border-radius: var(--radius);
    color: var(--c-text-bright);
}

.edl-auth-card::before,
.edl-auth-card::after {
    content: none;
}

.edl-app-header {
    background: rgba(18, 18, 26, 0.92);
    backdrop-filter: blur(10px);
}

[data-theme="light"] .edl-app-header {
    background: rgba(234, 234, 238, 0.92);
}

.edl-app-sidebar,
.edl-app-sidebar-search,
.edl-app-header,
.edl-app-panel,
.edl-app-card,
.edl-app-stat,
.edl-panel,
.edl-search-form {
    border-color: var(--c-border);
}

.edl-app-sidebar {
    background: var(--c-bg);
}

.edl-app-main {
    background: transparent;
}

[data-theme="light"] .edl-app-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
[data-theme="light"] .edl-app-content textarea,
[data-theme="light"] .edl-app-content select,
[data-theme="light"] .edl-app-content .edl-model-combobox-input,
[data-theme="light"] .edl-app-content .edl-pricing-input,
[data-theme="light"] .edl-app-content .edl-quiz-input,
[data-theme="light"] .edl-app-content .edl-sop-select-wrap select {
    background: var(--surface-sunken);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="light"] .edl-app-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
[data-theme="light"] .edl-app-content textarea:focus,
[data-theme="light"] .edl-app-content select:focus,
[data-theme="light"] .edl-app-content .edl-model-combobox-input:focus,
[data-theme="light"] .edl-app-content .edl-pricing-input:focus,
[data-theme="light"] .edl-app-content .edl-quiz-input:focus,
[data-theme="light"] .edl-app-content .edl-sop-select-wrap select:focus {
    background: #ffffff;
    border-color: var(--accent);
    color: var(--text);
}

[data-theme="light"] .edl-app-content input::placeholder,
[data-theme="light"] .edl-app-content textarea::placeholder {
    color: var(--text-placeholder);
}

.edl-theme-toggle--app {
    flex: 0 0 auto;
}

@media (max-width: 980px) {
    .edl-card-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .edl-tools__grid,
    .edl-hero__grid,
    .edl-philosophy__inner {
        grid-template-columns: 1fr;
    }

    .edl-hero__visual {
        justify-content: flex-start;
    }
}

@media (max-width: 860px) {
    .edl-how__steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .edl-how__steps::before {
        content: none;
    }

    .edl-trust__inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .edl-trust__divider {
        display: none;
    }

    .edl-footer__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .edl-header .edl-nav__toggle {
        display: flex;
    }

    .edl-nav__menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 24px 22px;
        background: var(--c-bg-elevated);
        border-bottom: 1px solid var(--c-border);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
    }

    .edl-nav__menu.is-open,
    .edl-nav__menu.edl-nav__menu--open {
        display: flex;
    }

    .edl-nav__link,
    .edl-nav__menu .edl-nav__link {
        padding: 8px 0;
    }

    .edl-theme-toggle {
        align-self: flex-start;
    }

    .edl-hero {
        padding-top: 48px;
    }

    .edl-hero__title {
        font-size: 44px;
    }

    .edl-card-grid,
    .edl-card-grid--3,
    .edl-tools__grid,
    .edl-how__steps,
    .edl-footer__links,
    .edl-trust__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .edl-hero,
    .edl-latest,
    .edl-tools,
    .edl-how,
    .edl-philosophy,
    .edl-cta {
        padding-left: 20px;
        padding-right: 20px;
    }

    .edl-footer__inner,
    .edl-footer__bar {
        padding-left: 20px;
        padding-right: 20px;
    }

    .edl-nav__logo-text {
        font-size: 16px;
    }

    .edl-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .edl-hero__actions .edl-btn {
        justify-content: center;
    }
}

/* =============================================================================
   Blog index + post detail
   ========================================================================== */

.edl-blog-hero {
    padding-top: 48px;
    padding-bottom: 40px;
}

.edl-blog-title {
    font-family: var(--display);
    font-size: clamp(40px, 5.4vw, 68px);
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin-top: 18px;
}

.edl-blog-intro {
    margin-top: 18px;
    font-family: var(--mono);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 62ch;
}

.edl-blog-tags-bar {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.edl-tag--chip {
    cursor: pointer;
    text-decoration: none;
    transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}

.edl-tag--chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.edl-tag--active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 122, 26, 0.08);
}

.edl-blog-list-section { padding-top: 0; }

.edl-blog-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.edl-blog-list.edl-home-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edl-blog-card {
    border: 1px solid var(--border);
    background: var(--bg-panel);
    position: relative;
    transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.edl-blog-card::before,
.edl-blog-card::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
}
.edl-blog-card::before {
    top: -1px; left: -1px;
    border-top: 1px solid var(--accent);
    border-left: 1px solid var(--accent);
}
.edl-blog-card::after {
    bottom: -1px; right: -1px;
    border-bottom: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
}

.edl-blog-card:hover {
    border-color: var(--border-bright);
    background: var(--c-bg-card-hover);
    transform: translateY(-2px);
}

.edl-blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px;
    color: var(--text);
    text-decoration: none;
}

.edl-blog-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.edl-blog-card-read {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.edl-blog-card-title {
    font-family: var(--display);
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 10px 0;
    color: var(--text);
}

.edl-blog-card-intro {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 14px 0;
}

.edl-blog-empty {
    border: 1px dashed var(--border);
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

/* --- Post detail --------------------------------------------------------- */

.edl-post-shell {
    max-width: 940px;
}

.edl-post-media-shell {
    max-width: 1120px;
    display: flex;
    justify-content: center;
}

.edl-post-head {
    padding-top: 18px;
    padding-bottom: 22px;
}

.edl-post-head--no-image {
    padding-top: 48px;
}

.edl-post-preamble {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.edl-post-back { color: var(--text-muted); text-decoration: none; }
.edl-post-back:hover { color: var(--accent); }

.edl-post-meta { display: inline-flex; gap: 10px; align-items: center; }

.edl-post-title {
    font-family: var(--display);
    font-size: clamp(24px, 3.1vw, 36px);
    line-height: 1.12;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0;
}

.edl-post-intro {
    margin-top: 18px;
    font-family: var(--mono);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-muted);
}

.edl-post-hero-image { padding: 42px 0 0; }

.edl-post-hero-img {
    display: block;
    width: min(100%, 1080px);
    height: auto;
    border: 1px solid var(--border);
}

.edl-post-body-section { padding-top: 4px; }

.edl-post-body {
    font-family: var(--mono);
    font-size: 16px;
    line-height: 1.75;
    color: var(--text);
}

.edl-post-body > * + * { margin-top: 1em; }

.edl-post-body p {
    margin: 0 0 1em 0;
}

.edl-post-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.edl-post-body a:hover { color: #ffa260; }

.edl-post-body strong { color: var(--text); }
.edl-post-body em { color: var(--text); }

.edl-post-body ol,
.edl-post-body ul {
    padding-left: 22px;
    margin: 1em 0;
}

.edl-post-body li + li { margin-top: 0.4em; }

.edl-post-body :is(code, kbd, samp) {
    font-family: var(--mono);
    font-size: 0.92em;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 1px 6px;
}

.edl-post-foot { padding-top: 32px; padding-bottom: 56px; }

.edl-post-foot-row {
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--border);
    padding-top: 28px;
    flex-wrap: wrap;
}

.edl-related-posts {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.edl-related-post-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.edl-related-post {
    border: 1px solid var(--border);
    background: var(--bg-panel);
}

.edl-related-post-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text);
    text-decoration: none;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.edl-related-post-link:hover {
    background: var(--c-bg-card-hover);
    color: var(--accent);
}

.edl-related-post-title {
    min-width: 0;
    font-family: var(--display);
    font-size: 18px;
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
}

.edl-related-post-link:hover .edl-related-post-title {
    color: var(--accent);
}

.edl-related-post-read {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

/* --- Body block: heading ------------------------------------------------- */

.edl-body-heading {
    font-family: var(--display);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text);
    margin-top: 1.6em;
}

.edl-body-heading--h2 { font-size: 28px; }
.edl-body-heading--h3 { font-size: 22px; }
.edl-body-heading--h4 { font-size: 18px; }

/* --- Body block: callout ------------------------------------------------- */

.edl-callout {
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    background: var(--bg-panel);
    padding: 18px 20px;
}

.edl-callout-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.edl-callout-body p:last-child { margin-bottom: 0; }

.edl-callout--warning { border-left-color: var(--warn); }
.edl-callout--warning .edl-callout-label { color: var(--warn); }

.edl-callout--danger { border-left-color: var(--danger); }
.edl-callout--danger .edl-callout-label { color: var(--danger); }

.edl-callout--note { border-left-color: var(--signal); }
.edl-callout--note .edl-callout-label { color: var(--signal); }

/* --- Body block: code ---------------------------------------------------- */

.edl-code {
    margin: 1.4em 0;
    border: 1px solid var(--border);
    background: #0b1014;
}

.edl-code-caption {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
}

.edl-code-pre {
    margin: 0;
    padding: 16px 18px;
    overflow-x: auto;
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.55;
}

/* --- Body block: quote --------------------------------------------------- */

.edl-quote {
    margin: 1.6em 0;
    padding: 8px 0 8px 20px;
    border-left: 2px solid var(--accent);
}

.edl-quote-body {
    font-family: var(--display);
    font-size: 22px;
    line-height: 1.3;
    color: var(--text);
    margin: 0;
}

.edl-quote-attr {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 10px;
}

/* --- Body block: image --------------------------------------------------- */

.edl-figure { margin: 1.6em 0; }

.edl-figure-img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
}

.edl-figure-caption {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    margin-top: 8px;
}

.edl-figure--center {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* --- Body block: divider ------------------------------------------------- */

.edl-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2em 0;
}

.edl-divider-tick {
    width: 8px;
    height: 1px;
    background: var(--accent);
}

.edl-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* =============================================================================
   Training center — index / track / episode / phase / episode cards
   ========================================================================== */

.edl-training-hero { padding-top: 48px; padding-bottom: 32px; }

.edl-training-title {
    font-family: var(--display);
    font-size: clamp(40px, 5.4vw, 68px);
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin-top: 18px;
}

.edl-training-intro {
    margin-top: 18px;
    font-family: var(--mono);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-muted);
}

.edl-track-group + .edl-track-group { margin-top: 64px; }

.edl-track-group-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.edl-track-group-title {
    font-family: var(--display);
    font-size: 32px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 6px 0 0 0;
}

.edl-track-group-desc {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    max-width: 44ch;
    margin: 0;
    text-align: right;
}

.edl-track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.edl-track-card {
    display: block;
    padding: 24px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    position: relative;
    transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.edl-track-card::before,
.edl-track-card::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
}
.edl-track-card::before {
    top: -1px; left: -1px;
    border-top: 1px solid var(--accent);
    border-left: 1px solid var(--accent);
}
.edl-track-card::after {
    bottom: -1px; right: -1px;
    border-bottom: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
}

.edl-track-card:hover {
    border-color: var(--border-bright);
    background: #151b20;
    transform: translateY(-2px);
}

.edl-track-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.edl-track-card-count {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.edl-track-card-title {
    font-family: var(--display);
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 10px 0;
}

.edl-track-card-tagline {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 14px 0;
}

/* --- Track page (detail) ------------------------------------------------- */

.edl-track-hero { padding-top: 48px; padding-bottom: 24px; }

.edl-track-title {
    font-family: var(--display);
    font-size: clamp(36px, 4.8vw, 60px);
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin: 12px 0 0 0;
}

.edl-track-tagline {
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-muted);
}

.edl-track-kvp {
    margin-top: 22px;
    grid-template-columns: 120px 1fr;
    gap: 8px 18px;
    font-size: 14px;
}

.edl-track-description {
    margin-top: 26px;
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

.edl-track-hero-image { padding: 20px 0 24px; }

.edl-track-body { padding-top: 12px; }

.edl-phase + .edl-phase { margin-top: 48px; }

.edl-phase-head {
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 1px dashed var(--border);
}

.edl-phase-title {
    font-family: var(--display);
    font-size: 26px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 4px 0 6px 0;
}

.edl-phase-desc {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.edl-episode-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.edl-episode-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    transition: border-color 140ms ease, background 140ms ease;
}

.edl-episode-card:hover {
    border-color: var(--border-bright);
    background: #151b20;
}

.edl-episode-link {
    display: block;
    padding: 18px;
    text-decoration: none;
    color: var(--text);
}

.edl-episode-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.edl-episode-length {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.edl-episode-title {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0 0 8px 0;
}

.edl-episode-hook {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
}

.edl-episode-hook p { margin: 0; }

/* --- Episode detail ------------------------------------------------------ */

.edl-episode-brief { padding-top: 0; padding-bottom: 0; }

.edl-episode-brief-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin: 8px 0 24px 0;
}

.edl-episode-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.edl-episode-nav-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    text-decoration: none;
    color: var(--text);
    transition: border-color 140ms ease, background 140ms ease;
}

.edl-episode-nav-item:hover {
    border-color: var(--accent);
    background: #151b20;
}

.edl-episode-nav-item--next { align-items: flex-end; text-align: right; }

.edl-episode-nav-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
}

.edl-episode-nav-title {
    font-family: var(--display);
    font-size: 15px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* =============================================================================
   Accounts — auth pages, profile, dashboard, progress UI
   ========================================================================== */

.edl-auth-section { padding-top: 56px; padding-bottom: 56px; }

.edl-auth-card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 40px 40px 32px;
    position: relative;
}

.edl-auth-card::before,
.edl-auth-card::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
}
.edl-auth-card::before { top: -1px; left: -1px; border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.edl-auth-card::after { bottom: -1px; right: -1px; border-bottom: 1px solid var(--accent); border-right: 1px solid var(--accent); }

.edl-auth-preamble {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.edl-auth-title {
    font-family: var(--display);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
    margin: 0 0 22px 0;
}

.edl-auth-prose {
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0 0 20px 0;
}

.edl-auth-form .edl-form-field {
    margin-bottom: 16px;
}

.edl-auth-form label,
.edl-form-field label {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.edl-auth-form input[type="text"],
.edl-auth-form input[type="email"],
.edl-auth-form input[type="password"],
.edl-auth-form input[type="number"],
.edl-auth-form textarea,
.edl-auth-form select,
.edl-form-field input[type="text"],
.edl-form-field input[type="email"],
.edl-form-field input[type="password"],
.edl-form-field input[type="file"],
.edl-form-field textarea,
.edl-form-field select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
    box-sizing: border-box;
}

.edl-auth-form input:focus,
.edl-auth-form textarea:focus,
.edl-auth-form select:focus,
.edl-form-field input:focus,
.edl-form-field textarea:focus,
.edl-form-field select:focus {
    border-color: var(--accent);
    outline: none;
}

.edl-form-help {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

.edl-form-help ul { margin: 4px 0 0 18px; padding: 0; }

/* Account-area search box. Mirrors the CMS sidebar search form:
   icon-button on the left + absolute-positioned input. The form's own
   chrome (background + 1px border) gives it a visible field surface
   that matches CMS form fields. */
.edl-search-form {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 42px;
    box-sizing: border-box;
    background: var(--bg-elev);
    border: 1px solid var(--border);
}

.edl-search-form:focus-within {
    border-color: var(--accent);
}

.edl-search-icon-btn {
    position: relative;
    z-index: 10;
    height: 35px;
    padding: 0 0 0 23px;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.edl-search-icon-btn:hover,
.edl-search-icon-btn:focus { color: var(--text); }

.edl-search-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 13px 0 13px 55px;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: textfield;
    outline: none;
    -webkit-font-smoothing: subpixel-antialiased;
}

.edl-search-input:focus { color: var(--text); }
.edl-search-input::placeholder { color: var(--text-muted); }

/* Visually hidden label, keeps screen-reader access. */
.edl-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.edl-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.errorlist {
    list-style: none;
    padding: 0;
    margin: 0 0 14px 0;
    font-family: var(--mono);
    font-size: 12px;
    color: #e04a3a;
}

.errorlist li {
    padding: 8px 12px;
    background: rgba(224, 74, 58, 0.08);
    border-left: 2px solid #e04a3a;
    margin-bottom: 6px;
}

.edl-auth-submit {
    width: 100%;
    padding: 14px 22px;
    margin-top: 4px;
    justify-content: center;
}

.edl-auth-footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    flex-wrap: wrap;
}

.edl-auth-footer a { color: var(--text-muted); text-decoration: none; }
.edl-auth-footer a:hover { color: var(--accent); }

.edl-auth-messages {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
    font-family: var(--mono);
    font-size: 12px;
}

.edl-auth-msg {
    padding: 10px 12px;
    margin-bottom: 6px;
    border-left: 2px solid var(--accent);
    background: rgba(255, 122, 26, 0.06);
}

.edl-auth-msg--success {
    border-left-color: var(--signal);
    background: rgba(123, 166, 90, 0.08);
}

.edl-auth-msg--error {
    border-left-color: #e04a3a;
    background: rgba(224, 74, 58, 0.08);
}

/* --- Account app shell (profile + my training) ---------------------------
   Mirrors the Wagtail CMS layout: persistent left sidebar with a brand
   header at top, grouped nav in the middle, and a pinned user footer at
   the bottom. Main area has a sticky page header with breadcrumbs +
   title + actions, then panels underneath. No public topbar, no public
   footer — the account area is its own application.
*/

.edl-app-body {
    background: var(--bg);
    margin: 0;
    min-height: 100vh;
}

.edl-app-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
}

/* --- Sidebar ------------------------------------------------------------- */

.edl-app-sidebar {
    /* Match the Wagtail CMS sidebar surface (--w-color-surface-menus). */
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    transition: width 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar search — embedded form between brand and menu. Plain flex
   row: icon-button on the left, typeable text input filling the rest.
   Transparent throughout so it sits flush on the sidebar surface.
   Submits to /account/search/. */
.edl-app-sidebar-search {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 42px;
    flex: 0 0 42px;
    position: relative;
    padding: 0;
    box-sizing: border-box;
    background: var(--bg-elev);
    border: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.edl-app-sidebar-search-btn {
    flex: 0 0 auto;
    width: 100%;
    height: 35px;
    padding: 0;
    padding-left: 23px;
    padding-right: 18px;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}

.edl-app-sidebar-search-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 0.75px;
}

.edl-app-sidebar-search-btn:hover,
.edl-app-sidebar-search-btn:focus {
    color: var(--text);
}

.edl-app-sidebar-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 13px 0 13px 55px;
    position: absolute;
    inset: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.edl-app-sidebar-search-input::placeholder { color: var(--text-muted); }

.edl-app-sidebar--collapsed .edl-app-sidebar-search-input { display: none; }

.edl-app-sidebar--collapsed .edl-app-sidebar-search-btn {
    justify-content: flex-start;
}

/* Toolstrip above the brand — matches the Wagtail CMS layout where
   the collapse toggle sits in its own 35px tall row at the very top. */
.edl-app-sidebar-toolstrip {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    height: 35px;
    margin-top: 0.5rem;
    flex: 0 0 35px;
    box-sizing: border-box;
}

/* Collapse toggle — circular, subtle. Mirrors Wagtail's own collapse
   button at 35x35 (.sidebar__collapse-toggle). */
.edl-app-sidebar-collapse {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    cursor: pointer;
    transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.edl-app-sidebar-collapse:hover {
    color: var(--accent);
    background: rgba(255, 122, 26, 0.08);
    border-color: var(--accent);
}

.edl-app-sidebar-collapse svg {
    width: 15px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 0.5px;
    transition: transform 150ms ease;
    /* The Wagtail icon-expand-right points right; we want it pointing left
       by default (collapse cue). The collapsed state below resets it. */
    transform: rotate(180deg);
}

/* Collapsed state: 60px narrow sidebar, icons only. */
.edl-app-shell--collapsed {
    grid-template-columns: 60px minmax(0, 1fr);
}

.edl-app-sidebar--collapsed {
    width: 60px;
}

.edl-app-sidebar--collapsed .edl-app-sidebar-toolstrip {
    justify-content: center;
    padding: 4px;
}

.edl-app-sidebar--collapsed .edl-app-sidebar-collapse {
    margin-right: 0;
}

.edl-app-sidebar--collapsed .edl-app-sidebar-collapse svg {
    transform: rotate(0deg);
}

.edl-app-sidebar--collapsed .edl-app-brand {
    width: 40px;
    height: 110px;
    min-height: 110px;
    padding: 0;
    flex: 0 0 110px;
    margin: 0.5rem auto 2.875rem;
}

.edl-app-sidebar--collapsed .edl-app-brand-mark {
    max-width: 40px;
    max-height: 40px;
}

.edl-app-sidebar--collapsed .edl-app-sidebar-item {
    justify-content: center;
    padding: 10px 0;
    border-left-width: 0;
    border-right: 2px solid transparent;
}

.edl-app-sidebar--collapsed .edl-app-sidebar-item.active {
    border-left-width: 0;
    border-right-color: var(--accent);
}

.edl-app-sidebar--collapsed .edl-app-sidebar-item > span,
.edl-app-sidebar--collapsed .edl-app-sidebar-caret,
.edl-app-sidebar--collapsed .edl-app-sidebar-subnav,
.edl-app-sidebar--collapsed .edl-app-sidebar-ext,
.edl-app-sidebar--collapsed .edl-user-chip-text,
.edl-app-sidebar--collapsed .edl-app-sidebar-label {
    display: none;
}

.edl-app-sidebar--collapsed .edl-user-chip {
    justify-content: center;
    padding: 10px 6px;
    flex-wrap: wrap;
    gap: 6px;
}

.edl-app-sidebar--collapsed .edl-user-logout-form {
    margin: 0;
}

.edl-app-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Mirror Wagtail's .sidebar-wagtail-branding: 110x110 square, centered
       horizontally in the sidebar (matches Wagtail's `margin: 0 auto`),
       8px padding, 2.75rem of clear space below before menu items. */
    padding: 8px;
    margin: 0.5rem auto 2.75rem;
    text-decoration: none;
    color: var(--text);
    width: 110px;
    height: 110px;
    box-sizing: border-box;
    flex: 0 0 110px;
    position: relative;
}

.edl-app-brand-icon-wrapper {
    /* Mirrors Wagtail's .sidebar-wagtail-branding__icon-wrapper — 100%
       of the brand's content box, flex-centered for the logo. */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Big centered hexagon — matches Wagtail CMS sidebar branding
   (.sidebar-wagtail-branding__icon max-width/height 96px). */
.edl-app-brand-mark {
    display: block;
    width: auto;
    height: auto;
    max-width: 96px;
    max-height: 96px;
}

/* Wordmark retired — brand presents as logo only, like CMS. Keep the
   class in case a page wants to reintroduce text; just hide by default. */
.edl-app-brand-wordmark { display: none; }

.edl-app-sidebar-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0;
}

.edl-app-sidebar-group {
    padding: 8px 0;
}

.edl-app-sidebar-group:first-child {
    padding-top: 0;
}

.edl-app-sidebar-group + .edl-app-sidebar-group {
    border-top: 1px solid var(--border);
}

.edl-app-sidebar-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 6px 20px 8px;
}

.edl-app-sidebar-item {
    /* Match the CMS sidebar item exactly: 13px JetBrains Mono, uppercase
       w/ 0.06em letter-spacing, dim --text-muted for the default state
       (= --w-color-text-label-menus-default). Active state brightens to
       --text (= --w-color-text-label-menus-active) — see .active rule. */
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px 13px 20px;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.edl-app-sidebar-item:hover {
    color: var(--text);
    background: var(--bg-panel);
}

.edl-app-sidebar-item.active {
    color: var(--text);
    background: #16202a;
    border-left-color: var(--accent);
}

.edl-app-sidebar-menu {
    margin: 0;
}

.edl-app-sidebar-menu > summary {
    list-style: none;
    cursor: pointer;
}

.edl-app-sidebar-menu > summary::-webkit-details-marker {
    display: none;
}

.edl-app-sidebar-submenu {
    margin: 0;
}

.edl-app-sidebar-submenu > summary {
    list-style: none;
    cursor: pointer;
}

.edl-app-sidebar-submenu > summary::-webkit-details-marker {
    display: none;
}

.edl-app-sidebar-caret {
    margin-left: auto;
    flex: 0 0 12px;
    opacity: 0.55;
    transition: transform 120ms ease, opacity 120ms ease;
}

.edl-app-sidebar-menu[open] > summary .edl-app-sidebar-caret {
    transform: rotate(180deg);
    opacity: 0.9;
}

.edl-app-sidebar-submenu[open] > summary .edl-app-sidebar-caret--sub {
    transform: rotate(180deg);
    opacity: 0.9;
}

.edl-app-sidebar-subnav {
    display: grid;
    padding: 4px 0 6px 52px;
    gap: 2px;
}

.edl-app-sidebar-subnav--nested {
    padding: 0 0 4px 18px;
}

.edl-app-sidebar-subitem {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px 8px 0;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
}

.edl-app-sidebar-subitem--parent {
    width: 100%;
}

.edl-app-sidebar-subitem--parent span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edl-app-sidebar-subitem--nested {
    font-size: 11px;
    color: var(--text-dim);
}

.edl-app-sidebar-subitem::before {
    content: "";
    width: 10px;
    height: 1px;
    flex: 0 0 10px;
    background: currentColor;
    opacity: 0.48;
}

.edl-app-sidebar-subitem:hover,
.edl-app-sidebar-subitem.active {
    color: var(--text);
}

.edl-app-sidebar-subitem.active::before {
    height: 2px;
    background: var(--accent);
    opacity: 1;
}

.edl-app-sidebar-item--muted { color: var(--text-dim); }

/* Wagtail's `.menuitem-label` sets line-height 1.25 on the span itself
   (not inherited from the link's line-height: 1). Match that so the
   text rhythm reads identically. */
.edl-app-sidebar-item > span {
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edl-app-sidebar-icon {
    /* Match Wagtail's `.icon--menuitem`: 1rem (16px) square. */
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    opacity: 0.85;
}
.edl-app-sidebar-item.active .edl-app-sidebar-icon { opacity: 1; }
.edl-app-sidebar-ext { margin-left: auto; opacity: 0.5; }

.edl-app-sidebar-footer {
    border-top: 1px solid var(--border);
    flex: 0 0 auto;
}

/* .edl-user-chip and its children are styled in static/css/tokens.css —
   shared with the CMS admin sidebar footer (relocated by cms-sidebar.js).
   Only chip styles that depend on the account-shell's collapsed-sidebar
   context live in this file (see .edl-app-sidebar--collapsed rules above). */

/* --- Main area ----------------------------------------------------------- */

.edl-app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Mirrors the CMS `idl-header`: eyebrow + title on the left, optional
   actions on the right, with a horizontal hairline below. The outer
   wrapper carries the 32px horizontal gutter so its inner box (and the
   border-bottom) align flush with the content cards' visible edges
   instead of extending past them. */
.edl-app-header {
    width: 100%;
    box-sizing: border-box;
    padding: 0 60px;
    margin: 60px 0 24px;
    background: transparent;
}

.edl-app-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.edl-app-header-title-block {
    flex: 1 1 auto;
    min-width: 0;
}

.edl-app-header-preamble {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.edl-app-header-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 33px;
    letter-spacing: 0.02em;
    margin: 4px 0 0;
    color: var(--text);
    line-height: 1.1;
}

.edl-app-header-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.edl-app-messages {
    padding: 16px 60px 0;
}

.edl-app-content {
    padding: 0 60px 48px;
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
}

/* --- Panels (CMS dashboard-panel equivalent) ----------------------------- */

.edl-app-panel {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    padding: 24px 28px;
}

.edl-app-panel + .edl-app-panel { margin-top: 20px; }

.edl-app-panel-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.edl-app-panel-title {
    font-family: var(--display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0;
    color: var(--accent);
    line-height: 1.35;
}

.edl-restricted-panel {
    width: 100%;
}

.edl-restricted-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0 0;
}

.edl-restricted-stats div {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    background: rgba(10, 14, 17, 0.62);
}

.edl-restricted-stats dt {
    margin: 0 0 6px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.edl-restricted-stats dd {
    margin: 0;
    color: var(--text);
    font-family: var(--mono);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.edl-restricted-stats--auth {
    grid-template-columns: 1fr;
    margin-bottom: 18px;
}

.edl-sop-filter,
.edl-sop-inline-form {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.edl-sop-filter + [data-sop-filter-results] {
    transition: opacity 160ms ease;
}

[data-sop-filter-results].is-loading {
    opacity: 0.54;
    cursor: progress;
}

.edl-sop-inline-form.is-loading {
    opacity: 0.88;
}

.edl-sop-inline-form button:disabled,
.edl-sop-inline-form select:disabled {
    cursor: progress;
    opacity: 0.62;
}

.edl-sop-filter .edl-form-field,
.edl-sop-inline-form .edl-form-field {
    flex: 1 1 220px;
    margin-bottom: 0;
}

.edl-sop-artifact-field {
    max-width: 380px;
}

.edl-sop-select-wrap {
    position: relative;
}

.edl-sop-select-wrap select {
    height: 40px;
    min-height: 40px;
    padding: 0 44px 0 14px;
    appearance: none;
    background: linear-gradient(180deg, rgba(20, 28, 34, 0.94), rgba(10, 14, 17, 0.96));
    border-color: var(--border-bright);
    color: var(--text);
    color-scheme: dark;
    font-size: 12px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.edl-sop-select-wrap select option {
    background: var(--bg);
    color: var(--text);
}

.edl-sop-select-wrap select option:checked {
    background: var(--accent);
    color: #0a0d10;
}

.edl-sop-select-wrap select:hover,
.edl-sop-select-wrap select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(255, 122, 26, 0.28);
}

.edl-sop-select-caret {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    pointer-events: none;
}

.edl-sop-inline-status {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 20px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.edl-sop-inline-status[hidden] {
    display: none;
}

.edl-sop-inline-status--loading::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255, 122, 26, 0.24);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: edl-spin 780ms linear infinite;
}

.edl-sop-inline-status--success {
    color: var(--signal);
}

.edl-sop-inline-status--error {
    color: #ff8a55;
}

@keyframes edl-spin {
    to { transform: rotate(360deg); }
}

.edl-sop-list,
.edl-sop-file-list {
    display: grid;
    gap: 10px;
}

.edl-sop-artifact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.edl-sop-artifact-grid .edl-track-card {
    min-width: 0;
}

.edl-sop-artifact-grid .edl-track-card-title {
    font-size: 20px;
    line-height: 1.05;
}

.edl-sop-row,
.edl-sop-file-card,
.edl-sop-revision {
    display: flex;
    align-items: center;        /* vertical-center inner text against the Delete button */
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    background: rgba(15, 20, 24, 0.7);
    color: var(--text);
    text-decoration: none;
}

.edl-sop-row h3,
.edl-sop-revision h3 {
    margin: 4px 0;
    font-family: var(--display);
    font-size: 22px;
    text-transform: uppercase;
}

/* File row was previously a single anchor; now it wraps an anchor +
   a delete form. Make the link own the row click target and keep the
   delete button compact on the right. */
.edl-sop-file-card-link {
    flex: 1 1 auto;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: var(--text);
    text-decoration: none;
    min-width: 0;
}
.edl-sop-file-card-link:hover { color: var(--accent); }
.edl-sop-file-card-delete { margin: 0; flex: 0 0 auto; }
.edl-btn.edl-btn-icon {
    padding: 6px 10px;
    font-size: 14px;
    line-height: 1;
    color: var(--text-muted);
}
.edl-btn.edl-btn-icon:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* Inline spinner shown next to the Regenerate button while the AI call
   is in flight. Pure CSS so we don't need an SVG round-trip.
   Important: explicit display: inline-block overrides the UA's
   `[hidden] { display: none }` rule, so we have to add an explicit
   [hidden] selector to win the cascade — otherwise the spinner shows
   on every page load with the `hidden` attribute set. */
.edl-sop-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid var(--border-bright);
    border-top-color: var(--accent);
    border-radius: 50%;
    vertical-align: middle;
    animation: edl-spin 700ms linear infinite;
}
.edl-sop-spinner[hidden] { display: none; }
@keyframes edl-spin { to { transform: rotate(360deg); } }

.edl-sop-row p,
.edl-sop-revision p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.edl-sop-row-meta {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
}

.edl-sop-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.edl-sop-form-field--wide {
    grid-column: 1 / -1;
}

.edl-form-error {
    color: #ff8a55;
}

.edl-sop-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.edl-sop-quality {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 122, 24, 0.08);
}

.edl-sop-quality strong {
    display: block;
    font-family: var(--display);
    font-size: 34px;
    color: var(--accent);
    line-height: 1;
}

.edl-sop-quality p {
    margin: 0;
    color: var(--text-muted);
}

.edl-sop-markdown {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0 0 18px;
    padding: 18px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.65;
}

.edl-sop-section-stack {
    display: grid;
    gap: 12px;
}

.edl-sop-section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -6px 0 16px;
    flex-wrap: wrap;
}

.edl-sop-section-toolbar form {
    margin: 0;
}

.edl-sop-section-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.edl-sop-collapse-section {
    border: 1px solid var(--border);
    background: rgba(10, 14, 17, 0.72);
}

.edl-sop-collapse-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    color: var(--accent);
    cursor: pointer;
    font-family: var(--display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.35;
    list-style: none;
    text-transform: uppercase;
}

.edl-sop-collapse-section summary::-webkit-details-marker {
    display: none;
}

.edl-sop-collapse-section summary::after {
    content: "+";
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 18px;
    line-height: 1;
}

.edl-sop-collapse-section[open] summary {
    border-bottom: 1px solid var(--border);
}

.edl-sop-collapse-section[open] summary::after {
    content: "-";
    color: var(--text);
}

.edl-sop-collapse-section summary:hover {
    color: #ffa260;
}

.edl-sop-markdown--section {
    margin: 0;
    border: 0;
    background: transparent;
}

.edl-sop-artifact-actions,
.edl-sop-delete-form {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.edl-sop-artifact-actions {
    align-items: center;
    flex-wrap: wrap;
    margin-top: 22px;
}

.edl-sop-delete-form {
    margin-top: 12px;
}

.edl-sop-history-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.edl-sop-history-actions form {
    margin: 0;
}

.edl-avatar-preview {
    display: block;
    margin-top: 8px;
    border: 1px solid var(--border);
}

.edl-avatar-field input[type="file"] {
    cursor: pointer;
}

.edl-avatar-field input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 12px;
    border: 1px solid var(--border-bright);
    background: var(--bg-panel);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

.edl-avatar-field input[type="file"]::file-selector-button:hover {
    border-color: var(--accent);
    background: rgba(255, 122, 26, 0.08);
}

.edl-avatar-current {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--bg-panel);
}

.edl-avatar-current .edl-avatar-preview {
    margin-top: 0;
    width: 96px;
    height: 96px;
    object-fit: cover;
    flex: 0 0 96px;
}

.edl-auth-form .edl-avatar-clear,
.edl-form-field .edl-avatar-clear {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--text);
    letter-spacing: 0.08em;
    cursor: pointer;
}

.edl-avatar-clear input {
    accent-color: var(--accent);
}

.edl-avatar-cropper {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}

.edl-avatar-cropper[hidden] {
    display: none;
}

.edl-avatar-canvas-frame {
    width: min(260px, 100%);
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border-bright);
    background: var(--bg);
    overflow: hidden;
}

.edl-avatar-canvas-frame canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
}

.edl-avatar-canvas-frame canvas:active {
    cursor: grabbing;
}

.edl-avatar-crop-controls {
    width: min(260px, 100%);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
}

.edl-auth-form .edl-avatar-crop-controls label,
.edl-form-field .edl-avatar-crop-controls label {
    margin: 0;
}

.edl-avatar-crop-controls input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

/* --- Account access management ------------------------------------------ */

.edl-access-list {
    display: grid;
    gap: 10px;
}

.edl-access-list.is-loading {
    opacity: 0.55;
}

.edl-access-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.edl-access-row:hover {
    border-color: var(--border-bright);
}

.edl-access-main {
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}

.edl-access-main:hover strong {
    color: var(--accent);
}

.edl-access-row-side {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.edl-access-row strong,
.edl-access-row small {
    display: block;
}

.edl-access-row strong {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.edl-access-row small {
    margin-top: 3px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
}

.edl-access-flags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.edl-access-flags em {
    border: 1px solid var(--border);
    padding: 4px 7px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 10px;
    font-style: normal;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.edl-access-flags em.warn {
    color: var(--warn);
}

.edl-access-flags em.danger {
    color: var(--danger-bright);
}

.edl-access-action {
    border: 1px solid var(--border);
    background: rgba(255, 122, 26, 0.06);
    color: var(--accent);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    padding: 6px 10px;
    text-transform: uppercase;
}

.edl-access-action:hover {
    border-color: var(--accent);
    color: #ffa260;
}

.edl-access-action--danger {
    background: rgba(192, 57, 43, 0.08);
    color: var(--danger-bright);
}

.edl-access-action--danger:hover {
    border-color: var(--danger-bright);
    color: #ff7468;
}

.edl-access-form-grid,
.edl-access-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.edl-access-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 8px 0 22px;
}

.edl-access-checks label,
.edl-access-checklist label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text);
    letter-spacing: 0;
    text-transform: none;
}

.edl-access-checklist {
    max-height: 220px;
    overflow: auto;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
}

.edl-access-checklist--tall {
    max-height: 360px;
}

.edl-access-checklist ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.edl-access-checklist li + li {
    margin-top: 8px;
}

/* --- Shared model pricing settings -------------------------------------- */

.edl-pricing-table-wrap {
    overflow-x: auto;
}

.edl-pricing-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    font-family: var(--mono);
    font-size: 12px;
}

.edl-pricing-table th,
.edl-pricing-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.edl-pricing-table th {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
}

.edl-pricing-input,
.edl-pricing-notes {
    width: 100%;
    min-width: 96px;
    padding: 8px 9px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 12px;
}

.edl-pricing-input:focus,
.edl-pricing-notes:focus {
    border-color: var(--accent);
    outline: none;
}

.edl-pricing-input-model {
    min-width: 180px;
}

.edl-pricing-input-rate {
    min-width: 82px;
}

.edl-pricing-notes {
    min-width: 180px;
    min-height: 36px;
    resize: vertical;
}

.edl-pricing-create {
    margin-top: 18px;
}

.edl-pricing-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

/* --- Progress bar + episode-action buttons ------------------------------- */

.edl-episode-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.edl-inline-form {
    display: inline-flex;
    margin: 0;
}

.edl-btn--completed {
    border-color: var(--signal);
    color: var(--signal);
    background: rgba(123, 166, 90, 0.06);
}

.edl-btn--completed:hover {
    border-color: var(--signal);
    color: #a0c67f;
    background: rgba(123, 166, 90, 0.12);
}

.edl-episode-actions--guest { opacity: 0.75; }

.edl-track-progress {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.edl-progress-meta {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.edl-progress-bar {
    height: 6px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.edl-progress-bar-fill {
    display: block;
    height: 100%;
    background: var(--accent);
    transition: width 300ms ease;
}

/* Completed episode card — subtle signal-green tint */
.edl-episode-card--done {
    border-color: rgba(123, 166, 90, 0.4);
}

.edl-episode-card--done .edl-designator {
    color: var(--signal);
}

/* =============================================================================
   Quiz / Checkpoint block
   ========================================================================== */

.edl-quiz {
    margin: 2em 0;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    position: relative;
    padding: 0;
}

.edl-quiz::before,
.edl-quiz::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
}
.edl-quiz::before { top: -1px; left: -1px; border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.edl-quiz::after { bottom: -1px; right: -1px; border-bottom: 1px solid var(--accent); border-right: 1px solid var(--accent); }

.edl-quiz-head {
    padding: 20px 24px 14px;
    border-bottom: 1px dashed var(--border);
}

.edl-quiz-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.edl-quiz-title {
    font-family: var(--display);
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0;
}

.edl-quiz-intro {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.edl-quiz-guest {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
}

/* --- Quiz form ------------------------------------------------------------ */

.edl-quiz-form { padding: 20px 24px 24px; }

.edl-quiz-questions {
    list-style: none;
    padding: 0;
    margin: 0;
}

.edl-quiz-question {
    padding: 18px 0;
    border-bottom: 1px dashed var(--border);
}

.edl-quiz-question:last-child { border-bottom: 0; padding-bottom: 8px; }

.edl-quiz-question-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.edl-quiz-question-points {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.edl-quiz-question-body {
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 14px;
}

.edl-quiz-question-body p { margin: 0 0 0.5em 0; }

.edl-quiz-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edl-quiz-choice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 14px;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 120ms ease, background 120ms ease;
}

.edl-quiz-choice:hover { border-color: var(--border-bright); }

.edl-quiz-choice input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--accent);
}

.edl-quiz-choice:has(input[type="radio"]:checked) {
    border-color: var(--accent);
    background: rgba(255, 122, 26, 0.06);
}

.edl-quiz-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
    box-sizing: border-box;
}

.edl-quiz-input:focus {
    border-color: var(--accent);
    outline: none;
}

.edl-quiz-textarea { resize: vertical; min-height: 110px; }

.edl-quiz-submit-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.edl-quiz-submit-note {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* --- Quiz results --------------------------------------------------------- */

.edl-quiz-results { padding: 20px 24px 24px; }

.edl-quiz-score {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 18px;
}

.edl-quiz-score-num {
    font-family: var(--display);
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    color: var(--accent);
}

.edl-quiz-results--passed .edl-quiz-score-num { color: var(--signal); }
.edl-quiz-results--error .edl-quiz-score-num { color: var(--warn); }
.edl-quiz-results--failed .edl-quiz-score-num { color: var(--danger); }

.edl-quiz-score-sub {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.edl-quiz-grader-err {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--warn);
    padding: 10px 14px;
    background: rgba(212, 160, 23, 0.08);
    border-left: 2px solid var(--warn);
    margin-bottom: 18px;
}

.edl-quiz-answers {
    list-style: none;
    padding: 0;
    margin: 0;
}

.edl-quiz-answer {
    padding: 14px 16px;
    border: 1px solid var(--border);
    background: var(--bg);
    margin-bottom: 10px;
}

.edl-quiz-answer--correct {
    border-left: 2px solid var(--signal);
}

.edl-quiz-answer--incorrect {
    border-left: 2px solid var(--danger);
}

.edl-quiz-answer-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.edl-quiz-answer--correct .edl-designator { color: var(--signal); }
.edl-quiz-answer--incorrect .edl-designator { color: var(--danger); }

.edl-quiz-answer-points {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.edl-quiz-answer-question {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text);
    margin-bottom: 6px;
}

.edl-quiz-answer-user {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.edl-quiz-answer-feedback {
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.55;
    color: var(--text);
    padding: 10px 12px;
    background: var(--bg-panel);
    border-left: 2px solid var(--accent);
    margin-top: 6px;
}

.edl-quiz-retake-form {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

/* --- Responsive tweaks --------------------------------------------------- */

@media (max-width: 860px) {
    .edl-blog-list { grid-template-columns: 1fr; }
    .edl-blog-list.edl-home-grid--three { grid-template-columns: 1fr; }
    .edl-related-post-link { grid-template-columns: 1fr; gap: 6px; }
    .edl-track-group-head { flex-direction: column; align-items: flex-start; }
    .edl-track-group-desc { text-align: left; }
    .edl-episode-nav { grid-template-columns: 1fr; }
    .edl-episode-nav-item--next { align-items: flex-start; text-align: left; }
    .edl-quiz-submit-row { flex-direction: column; align-items: stretch; }

    /* Account app shell: sidebar collapses to a horizontal strip on top,
       brand header + user chip stack above/below the scroll strip. */
    .edl-app-shell {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    .edl-app-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        overflow: visible;
    }
    .edl-app-brand { padding: 12px 16px; border-bottom: 1px solid var(--border); }
    .edl-app-brand-wordmark br { display: none; }
    .edl-app-sidebar-scroll {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
    }
    .edl-app-sidebar-group { padding: 0; flex: 0 0 auto; display: flex; }
    .edl-app-sidebar-group + .edl-app-sidebar-group {
        border-top: 0;
        border-left: 1px solid var(--border);
    }
    .edl-app-sidebar-label { display: none; }
    .edl-app-sidebar-item {
        padding: 12px 14px;
        border-left: 0;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
    }
    .edl-app-sidebar-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent);
    }
    .edl-app-sidebar-menu {
        flex: 0 0 auto;
    }
    .edl-app-sidebar-subnav {
        display: flex;
        padding: 0;
    }
    .edl-app-sidebar-subitem {
        padding: 12px 14px;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
    }
    .edl-app-sidebar-subitem.active {
        border-bottom-color: var(--accent);
    }
    .edl-app-sidebar-ext { margin-left: 6px; }
    .edl-app-sidebar-footer { display: flex; align-items: stretch; }
    .edl-app-sidebar-footer .edl-app-sidebar-item { flex: 1 1 auto; }
    .edl-user-chip { flex: 1 1 auto; border-top: 0; }

    .edl-app-header-inner { padding: 16px 20px 18px; }
    .edl-app-content { padding: 18px 20px 32px; }
    .edl-app-panel { padding: 18px 20px; }
    .edl-restricted-stats { grid-template-columns: 1fr; }
    .edl-sop-artifact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .edl-access-row { align-items: flex-start; flex-direction: column; }
    .edl-access-row-side { justify-content: flex-start; }
    .edl-access-flags { justify-content: flex-start; }
    .edl-access-form-grid,
    .edl-access-columns,
    .edl-pricing-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .edl-sop-artifact-grid { grid-template-columns: 1fr; }
}

/* ===== Site-wide confirmation modal (<dialog data-edl-modal>) =========
   Used by static/js/edl-modal.js. Replaces native window.confirm/alert
   so destructive actions get proper EDL chrome. See docs/ui-rules.md. */

.edl-modal {
    border: none;
    padding: 0;
    background: transparent;
    color: var(--text);
    max-width: min(92vw, 460px);
    width: 100%;
    margin: auto;
}
.edl-modal::backdrop {
    background: rgba(5, 8, 11, 0.72);
    backdrop-filter: blur(3px);
}
.edl-modal-box {
    background: var(--bg-elev);
    border: 1px solid var(--border-bright);
    padding: 24px 24px 20px;
    position: relative;
}
/* Orange L-bracket corners to match the auth card aesthetic. */
.edl-modal-box::before,
.edl-modal-box::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
}
.edl-modal-box::before {
    top: -1px; left: -1px;
    border-top: 1px solid var(--accent);
    border-left: 1px solid var(--accent);
}
.edl-modal-box::after {
    bottom: -1px; right: -1px;
    border-bottom: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
}
.edl-modal-title {
    font-family: var(--display);
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 12px;
    color: var(--text);
}
.edl-modal-message {
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0 0 20px;
}
.edl-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* Final cascade locks for the 2026 theme refresh. These sit after legacy
   feature styles so the new shells keep their shape while old page-specific
   functionality remains intact. */
.edl-login__card.edl-auth-card {
    max-width: 430px;
    padding: 40px 36px;
    border-radius: var(--radius-lg);
    background: var(--c-bg-card);
}

.edl-auth-card::before,
.edl-auth-card::after {
    content: none;
}

.edl-app-header {
    background: rgba(18, 18, 26, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--c-border);
    margin: 0 0 24px;
    padding: 24px 60px 0;
}

.edl-app-header-inner {
    border-bottom: 0;
}

[data-theme="light"] .edl-app-header {
    background: rgba(234, 234, 238, 0.92);
}

.edl-app-sidebar,
.edl-app-sidebar-search,
.edl-app-panel,
.edl-app-card,
.edl-app-stat,
.edl-panel,
.edl-search-form {
    border-color: var(--c-border);
}

.edl-app-sidebar {
    background: var(--c-bg);
}

.edl-app-main {
    background: transparent;
}

[data-theme="light"] .edl-app-sidebar-item:hover {
    color: var(--accent);
    background: rgba(255, 122, 26, 0.12);
}

[data-theme="light"] .edl-app-sidebar-item.active {
    color: #111118;
    background: rgba(255, 122, 26, 0.2);
    border-left-color: var(--accent);
}

[data-theme="light"] .edl-app-sidebar-subitem:hover,
[data-theme="light"] .edl-app-sidebar-subitem.active {
    color: var(--accent-dim);
}

[data-theme="light"] .edl-app-sidebar-subitem.active::before {
    background: var(--accent);
}

[data-theme="light"] .edl-app-sidebar-search-btn:hover,
[data-theme="light"] .edl-app-sidebar-search-btn:focus,
[data-theme="light"] .edl-app-sidebar-collapse:hover,
[data-theme="light"] .edl-user-logout-btn:hover {
    color: var(--accent-dim);
}

[data-theme="light"] .edl-app-header a:hover,
[data-theme="light"] .edl-app-content a:hover,
[data-theme="light"] .edl-app-panel a:hover {
    color: var(--accent-dim);
}

[data-theme="light"] .edl-app-content .edl-track-card:hover {
    color: var(--text);
    background: rgba(255, 122, 26, 0.1);
    border-color: var(--accent);
}

[data-theme="light"] .edl-app-content .edl-track-card:hover .edl-track-card-title {
    color: var(--text);
}

[data-theme="light"] .edl-app-content .edl-track-card:hover .edl-track-card-tagline,
[data-theme="light"] .edl-app-content .edl-track-card:hover .edl-track-card-count {
    color: var(--text-muted);
}

/* Shared account session/listing rows. Mirrors the Ideation Lab sessions
   surface for tools that list reusable user work. */
.edl-session-filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.edl-session-filters .edl-form-field {
    flex: 1 1 220px;
    margin-bottom: 0;
}

.edl-session-list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.edl-session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.edl-session-row:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text);
}

.edl-session-row-main {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.edl-session-title,
.edl-sop-row .edl-session-title {
    display: block;
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-family: var(--display);
    font-size: 18px;
    line-height: 1.1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
}

.edl-session-title:hover,
.edl-session-row:hover .edl-session-title {
    color: var(--accent-dim);
}

.edl-session-meta,
.edl-sop-row .edl-session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.45;
}

.edl-session-row-actions,
.edl-sop-row-meta.edl-session-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    min-width: max-content;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
}

.edl-session-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-sunken);
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 11px;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.edl-philosophy .edl-quote {
    box-sizing: border-box;
    margin: 0;
    padding: 32px;
    border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-orange);
    border-radius: var(--radius-lg);
    background: var(--c-bg-card);
}

.edl-philosophy .edl-quote__text {
    margin: 0 0 14px;
}

.edl-philosophy .edl-quote__attr {
    display: block;
}

/* SOP detail and artifact pages share the refreshed account surface tokens. */
.edl-app-content .edl-sop-quality,
.edl-app-content .edl-sop-collapse-section,
.edl-app-content .edl-sop-file-card,
.edl-app-content .edl-sop-revision,
.edl-app-content .edl-sop-artifact-grid .edl-track-card {
    border-color: var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
}

.edl-app-content .edl-sop-quality {
    background: var(--accent-soft);
}

.edl-app-content .edl-sop-markdown {
    border-color: var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-sunken);
    color: var(--text);
}

.edl-app-content .edl-sop-collapse-section .edl-sop-markdown {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.edl-app-content .edl-sop-markdown--section {
    background: var(--surface-sunken);
}

.edl-app-content .edl-sop-collapse-section summary {
    color: var(--accent-dim);
}

.edl-app-content .edl-sop-collapse-section summary:hover {
    background: var(--accent-soft);
    color: var(--accent-dim);
}

.edl-app-content .edl-sop-artifact-grid .edl-track-card:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text);
    transform: none;
}

@media (max-width: 860px) {
    .edl-app-header {
        padding: 0;
        margin: 0;
    }

    .edl-app-header-inner {
        padding: 18px 20px;
    }

    [data-theme="light"] .edl-app-sidebar-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent);
    }
}

@media (max-width: 720px) {
    .edl-session-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .edl-session-row-actions {
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
    }

    .edl-philosophy .edl-quote {
        padding: 24px;
    }
}
