/* Static, read-only "glance" at the Editor for the marketing homepage.
   Mirrors applications/editor/editor-css/page/{shell,main,tree}.css + document.css
   closely enough to read as the real thing, but stands alone (no JS, no auth). */

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}
* { box-sizing: border-box; }

.ep-header {
    justify-content: space-between;
    gap: 16px;
}
.ep-header-cta {
    flex-shrink: 0;
    font-size: 14px;
    padding: 10px 18px;
}

.ep-wrap {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 28px clamp(14px, 3vw, 32px) 64px;
}

.ep-intro {
    text-align: center;
    max-width: 640px;
    margin: 8px auto 28px;
}
.ep-intro .eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent, #a78bfa);
}
.ep-intro h1 {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    font-weight: 800;
    line-height: 1.2;
}
.ep-sub {
    margin: 0;
    color: var(--muted, #9ca3af);
    font-size: 15px;
    line-height: 1.6;
}

/* ---- the framed editor mock ---- */
.ep-frame {
    border-radius: 20px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    background: var(--alysum-ui-chrome, #141414);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    padding: 14px;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}
.ep-shell {
    display: grid;
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr) minmax(200px, 240px);
    gap: 14px;
    height: 560px;
}

/* side panels */
.ep-tree,
.ep-rail {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--alysum-ui-chrome, #141414);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-radius: 14px;
    padding: 12px 10px;
    overflow: hidden;
}
.ep-tree-head,
.ep-rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.ep-tabs { display: flex; flex: 1; gap: 4px; }
.ep-tab {
    flex: 1;
    text-align: center;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-bottom-color: transparent;
    border-radius: 8px 8px 0 0;
    padding: 7px 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted, #9ca3af);
    background: color-mix(in srgb, #000 28%, transparent);
}
.ep-tab.is-active {
    background: transparent;
    color: var(--text, #f6e9dc);
}
.ep-collapse { color: var(--muted, #9ca3af); font-size: 14px; }
.ep-rail-title,
.ep-book-name {
    font-size: 13px;
    font-weight: 800;
}
.ep-book-name {
    margin: 0 0 10px;
    padding: 0 4px;
    color: var(--text, #f6e9dc);
}

.ep-tree-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
}
.ep-item {
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--alysum-ui-panel, #111827);
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 700;
}
.ep-item--child { margin-left: 14px; }
.ep-item--folder,
.ep-item--note {
    background: transparent;
    font-weight: 700;
}
.ep-item--note { font-size: 12px; }
.ep-item-kind {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted, #9ca3af);
}
.ep-item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ep-item-words {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted, #9ca3af);
}
.ep-item.is-active {
    background: var(--accent, #6d28d9);
    border-color: var(--accent, #6d28d9);
    color: #fff;
}
.ep-item.is-active .ep-item-words { color: rgba(255, 255, 255, 0.75); }
.ep-tree-add {
    margin-top: 10px;
    padding: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted, #9ca3af);
    border: 1px dashed var(--border, rgba(255, 255, 255, 0.14));
    border-radius: 10px;
}

/* center page */
.ep-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--alysum-ui-panel, #111827) 88%, white),
        var(--alysum-ui-panel, #111827)
    );
}
.ep-main-title {
    margin: 0;
    padding: 12px 16px 2px;
    font-size: 1.3rem;
    font-weight: 800;
}
.ep-chapter-title {
    margin: 0;
    padding: 0 16px 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--muted, #9ca3af);
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.ep-toolbar {
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 4px 8px;
    background: var(--alysum-ui-raised, #2a2a2a);
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.ep-tool {
    min-width: 26px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text, #f6e9dc);
}
.ep-tool--i { font-style: italic; }
.ep-tool--u { text-decoration: underline; }
.ep-tool-sep {
    width: 1px;
    height: 16px;
    margin: 0 5px;
    background: var(--border, rgba(255, 255, 255, 0.16));
}
.ep-wordcount {
    margin-left: auto;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted, #9ca3af);
    white-space: nowrap;
}
.ep-page {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    align-self: center;
    width: 100%;
    max-width: 42rem;
    padding: 26px clamp(18px, 4vw, 48px) 40px;
    line-height: 1.75;
    font-size: 1.02rem;
    font-family: Georgia, "Times New Roman", serif;
}
.ep-page p { margin: 0 0 0.95em; text-indent: 1.5em; }
.ep-page p:first-child { text-indent: 0; }
.ep-scene-break {
    text-indent: 0 !important;
    text-align: center;
    color: var(--muted, #9ca3af);
    margin: 1.2em 0 1.4em;
    letter-spacing: 0.4em;
}
.ep-caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 1px;
    vertical-align: text-bottom;
    background: var(--accent, #a78bfa);
    animation: ep-blink 1.1s steps(1) infinite;
}
@keyframes ep-blink { 50% { opacity: 0; } }

/* right rail */
.ep-cover {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    background:
        radial-gradient(120% 80% at 20% 0%, color-mix(in srgb, var(--accent, #6d28d9) 55%, transparent), transparent 60%),
        linear-gradient(160deg, #1c2740, #0e1626);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 3px;
    padding: 14px 12px;
    margin-bottom: 12px;
}
.ep-cover-title { font-size: 15px; font-weight: 800; line-height: 1.2; }
.ep-cover-author { font-size: 11px; color: var(--muted, #9ca3af); }
.ep-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 4px;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.ep-field-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted, #9ca3af);
}
.ep-field-value { font-size: 12px; line-height: 1.5; }

/* ---- highlights + CTA ---- */
.ep-highlights {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.ep-highlights li {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-radius: 14px;
    background: var(--alysum-ui-panel, #111827);
}
.ep-highlights strong { font-size: 14px; font-weight: 800; }
.ep-highlights span { font-size: 13px; color: var(--muted, #9ca3af); line-height: 1.55; }

.ep-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

@media (max-width: 900px) {
    .ep-shell {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }
    .ep-rail { display: none; }
    .ep-tree { order: 2; }
    .ep-tree-list { max-height: 220px; }
    .ep-main { order: 1; min-height: 460px; }
    .ep-page { max-width: none; }
    .ep-highlights { grid-template-columns: minmax(0, 1fr); }
}
