/* ==========================================================================
   EARNINGS SUMMARY PAGE STYLES - NEOBRUTALIST
   ========================================================================== */

/* Variables - matching main site */
:root {
    --es-dark: #0a0a0a;
    --es-cream: #f8f6f1;
    --es-white: #ffffff;
    --es-green: #00c853;
    --es-green-dark: #00a344;
    --es-text: #111111;
    --es-text-muted: #666666;
    --es-border: #000000;
    --es-shadow: 6px 6px 0 #000000;
    --es-shadow-sm: 4px 4px 0 #000000;
    --es-shadow-hover: 8px 8px 0 #000000;
    --es-font-display: 'Space Grotesk', -apple-system, sans-serif;
    --es-font-body: 'IBM Plex Sans', -apple-system, sans-serif;
    --es-font-mono: 'IBM Plex Mono', monospace;
}

/* Reset for standalone page */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 0;
}

/* Base */
.es-page {
    min-height: 100vh;
    background: var(--es-cream);
    position: relative;
    overflow-x: hidden;
    font-family: var(--es-font-body);
    color: var(--es-text);
    margin: 0;
    padding: 0;
}

/* Text selection and mark highlight - use green */
.es-page ::selection {
    background: var(--es-green);
    color: var(--es-dark);
}

.es-page mark,
.es-content mark {
    background: rgba(0, 200, 83, 0.25);
    color: var(--es-dark);
    padding: 0.1em 0.2em;
}

/* Override any blue highlights - force green theme */
.es-content *::selection {
    background: var(--es-green);
    color: var(--es-dark);
}

/* Code/inline code styling */
.es-content code {
    font-family: var(--es-font-mono);
    font-size: 0.85em;
    background: rgba(0, 200, 83, 0.15);
    color: var(--es-dark);
    padding: 0.15em 0.4em;
    border-radius: 2px;
}

/* Subtle grid pattern */
.es-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.es-header {
    position: relative;
    z-index: 10;
    padding: 16px 24px;
    background: var(--es-dark);
    border-bottom: 3px solid var(--es-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.es-header-btn {
    font-family: var(--es-font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--es-dark);
    background: var(--es-green);
    padding: 8px 16px;
    border: 2px solid var(--es-border);
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: 3px 3px 0 var(--es-border);
}

.es-header-btn:hover {
    background: var(--es-green-dark);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--es-border);
}

/* Progress Bar */
.es-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--es-green);
    transition: width 0.1s ease-out;
    z-index: 11;
}

.es-logo {
    font-family: var(--es-font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--es-white);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.es-logo:hover {
    color: var(--es-green);
}

/* ==========================================================================
   MAIN LAYOUT
   ========================================================================== */
.es-container {
    position: relative;
    z-index: 1;
    display: flex;
    height: calc(100vh - 62px);
    overflow: hidden;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.es-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--es-white);
    border-right: 3px solid var(--es-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.es-sidebar-header {
    padding: 16px;
    border-bottom: 2px solid var(--es-border);
    background: var(--es-dark);
}

.es-search {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--es-font-body);
    font-size: 0.9rem;
    background: var(--es-white);
    border: 2px solid var(--es-border);
    outline: none;
    box-sizing: border-box;
}

.es-search:focus {
    border-color: var(--es-green);
}

.es-search::placeholder {
    color: var(--es-text-muted);
}

.es-company-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.es-loading-skeleton {
    padding: 16px;
    font-family: var(--es-font-mono);
    font-size: 0.8rem;
    color: var(--es-text-muted);
    text-align: center;
}

.es-company-item {
    font-family: var(--es-font-body);
    font-size: 0.85rem;
    padding: 10px 14px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
    color: var(--es-text-muted);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.es-company-item:hover {
    background: rgba(0,0,0,0.03);
    color: var(--es-text);
}

.es-company-item.active {
    background: var(--es-green);
    color: var(--es-dark);
    font-weight: 600;
    border-left-color: var(--es-dark);
}

/* New badge - pulsing green dot */
.es-new-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--es-green);
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
    animation: es-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.7);
}

.es-company-item.active .es-new-badge {
    background: var(--es-dark);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.4);
}

@keyframes es-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(0, 200, 83, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 200, 83, 0);
    }
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.es-main {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

.es-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Company Header */
.es-company-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.es-company-name {
    font-family: var(--es-font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--es-dark);
    margin: 0 0 4px 0;
    line-height: 1.1;
}

.es-call-date {
    font-family: var(--es-font-mono);
    font-size: 0.75rem;
    color: var(--es-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   MARKDOWN CONTENT
   ========================================================================== */
.es-content {
    background: transparent;
    padding: 0;
}

/* Headings */
.es-content h2 {
    font-family: var(--es-font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--es-dark);
    margin: 32px 0 16px 0;
    padding-top: 24px;
    border-top: 2px solid var(--es-border);
    scroll-margin-top: 20px;
}

.es-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.es-content h3 {
    font-family: var(--es-font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--es-dark);
    margin: 24px 0 10px 0;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.es-content h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Paragraphs and Lists */
.es-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--es-text-muted);
    margin: 0 0 16px 0;
}

.es-content ul {
    padding-left: 0;
    margin: 0 0 20px 0;
    list-style: none;
}

.es-content ul li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--es-text-muted);
    padding: 8px 0 8px 24px;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.es-content ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--es-green-dark);
    font-weight: 700;
}

.es-content ul li:last-child {
    border-bottom: none;
}

/* Q&A Section Styling - Questions and Answers with green highlights */
.es-content ul li strong:first-child {
    color: var(--es-dark);
}

/* Style for Q&A items containing Question or Answer */
.es-content ul li:has(strong:first-child) {
    background: transparent;
}

/* Strong text */
.es-content strong {
    color: var(--es-dark);
    font-weight: 600;
}

/* Tables */
.es-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.85rem;
}

.es-content th {
    background: var(--es-cream);
    color: var(--es-text);
    font-family: var(--es-font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid var(--es-border);
}

.es-content td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    color: var(--es-text);
    line-height: 1.5;
}

.es-content tr:hover td {
    background: rgba(0,0,0,0.02);
}

/* Horizontal Rules */
.es-content hr {
    border: none;
    height: 2px;
    background: var(--es-border);
    margin: 32px 0;
}

/* ==========================================================================
   SUBSCRIBE CTA
   ========================================================================== */
.es-subscribe {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 3px solid var(--es-border);
}

.es-subscribe-inner {
    background: var(--es-white);
    border: 3px solid var(--es-border);
    padding: 32px;
    box-shadow: var(--es-shadow);
}

.es-subscribe-title {
    font-family: var(--es-font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--es-dark);
    margin: 0 0 8px 0;
}

.es-subscribe-text {
    font-size: 0.95rem;
    color: var(--es-text-muted);
    margin: 0 0 20px 0;
}

.es-subscribe iframe {
    border: 2px solid var(--es-border) !important;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.es-empty-state {
    text-align: center;
    padding: 80px 40px;
}

.es-empty-icon {
    font-size: 4rem;
    margin-bottom: 24px;
}

.es-empty-title {
    font-family: var(--es-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--es-dark);
    margin: 0 0 12px 0;
}

.es-empty-text {
    font-size: 1rem;
    color: var(--es-text-muted);
    margin: 0;
}

/* ==========================================================================
   LOADING STATE
   ========================================================================== */
.es-loading {
    text-align: center;
    padding: 60px;
}

.es-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--es-border);
    border-top-color: var(--es-green);
    border-radius: 50%;
    animation: es-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.es-loading-text {
    font-family: var(--es-font-mono);
    font-size: 0.85rem;
    color: var(--es-text-muted);
}

/* ==========================================================================
   MOBILE SIDEBAR TOGGLE
   ========================================================================== */
.es-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--es-green);
    border: 3px solid var(--es-border);
    box-shadow: var(--es-shadow);
    font-family: var(--es-font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 100;
    transition: all 0.15s ease;
}

.es-mobile-toggle:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--es-shadow-hover);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
    .es-toc-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .es-header {
        padding: 16px 20px;
    }

    .es-page-title {
        display: none;
    }

    .es-container {
        flex-direction: column;
    }

    .es-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        z-index: 200;
        transition: left 0.3s ease;
        box-shadow: none;
    }

    .es-sidebar.open {
        left: 0;
        box-shadow: 20px 0 40px rgba(0, 0, 0, 0.3);
    }
    
    .es-overlay {
        z-index: 150;
    }

    /* Don't create a stacking context - allows sidebar to escape and be above overlay */
    .es-container {
        z-index: auto;
    }

    .es-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .es-main {
        padding: 20px;
    }

    .es-company-name {
        font-size: 1.8rem;
    }

    .es-content {
        padding: 24px;
    }

    .es-content h2 {
        font-size: 1.3rem;
    }

    .es-toc {
        padding: 20px;
    }

    .es-content table {
        font-size: 0.8rem;
    }

    .es-content th,
    .es-content td {
        padding: 8px 10px;
    }
}

/* Mobile overlay */
.es-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.es-overlay.active {
    display: block;
}

/* Hide overlay on desktop */
@media (min-width: 769px) {
    .es-overlay {
        display: none !important;
    }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.es-footer {
    padding: 24px 32px;
    background: var(--es-dark);
    border-top: 3px solid var(--es-border);
    text-align: center;
}

.es-footer p {
    font-family: var(--es-font-mono);
    font-size: 0.8rem;
    color: var(--es-text-muted);
    margin: 0;
}

.es-footer a {
    color: var(--es-green);
    text-decoration: none;
}

.es-footer a:hover {
    color: var(--es-green-dark);
}

/* ==========================================================================
   GROWTH TRIGGERS CTA BUTTON
   ========================================================================== */

/* Header CTA (earnings summary page) */
.gt-cta-btn {
    font-family: var(--es-font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--es-dark);
    background: var(--es-green);
    padding: 8px 18px;
    border: 2px solid var(--es-border);
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: 3px 3px 0 var(--es-border);
    white-space: nowrap;
}

.gt-cta-btn:hover {
    background: var(--es-green-dark);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--es-border);
    color: var(--es-dark);
}

.gt-cta-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--es-border);
}

/* Floating CTA (individual earnings call pages) */
.gt-cta-floating {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 50;
    font-family: var(--es-font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--es-dark);
    background: var(--es-green);
    padding: 10px 20px;
    border: 2px solid var(--es-border);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0 var(--es-border);
    white-space: nowrap;
    animation: gt-cta-entrance 0.5s ease-out;
}

.gt-cta-floating:hover {
    background: var(--es-green-dark);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--es-border);
    color: var(--es-dark);
}

.gt-cta-floating:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 var(--es-border);
}

@keyframes gt-cta-entrance {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---- Mobile responsive for CTA buttons ---- */
@media (max-width: 768px) {
    .gt-cta-btn {
        font-size: 0.7rem;
        padding: 6px 12px;
        box-shadow: 2px 2px 0 var(--es-border);
    }

    .gt-cta-floating {
        top: auto;
        bottom: 92px;
        right: 16px;
        font-size: 0.7rem;
        padding: 8px 14px;
        box-shadow: 3px 3px 0 var(--es-border);
    }
}

@media (max-width: 400px) {
    .gt-cta-btn {
        font-size: 0.65rem;
        padding: 5px 10px;
    }

    .gt-cta-floating {
        font-size: 0.65rem;
        padding: 7px 12px;
    }
}