/* ─── Electrum tool page ─── */

.el-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
}

/* ─── Meta strip (above hero) ─── */

.el-meta-strip {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.5rem 0.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.825rem;
    color: var(--color-text-muted, #94a3b8);
    border-bottom: 1px solid var(--color-border-light, #f1f5f9);
}

.el-meta-back {
    color: var(--color-text-muted, #94a3b8);
    text-decoration: none;
    transition: color 0.15s;
}

.el-meta-back:hover { color: var(--color-primary, #2563eb); }

.el-meta-repo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    padding: 0.3rem 0.6rem;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.78rem;
    color: var(--color-text-light, #64748b);
    text-decoration: none;
    background: var(--color-bg-alt, #f8fafc);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 5px;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.el-meta-repo:hover {
    color: var(--color-primary, #2563eb);
    border-color: var(--color-primary, #2563eb);
    background: white;
}

.el-meta-repo svg { flex-shrink: 0; }

.el-meta-arrow { color: var(--color-text-muted, #94a3b8); }

.el-meta-license {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.5rem;
    color: var(--color-text-light, #64748b);
    background: var(--color-bg-alt, #f8fafc);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 4px;
}

/* ─── CTA row (below hero) ─── */

.el-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: -1.25rem 0 2.75rem;
}

.el-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}

.el-btn-primary {
    background: var(--color-bg-dark, #0f172a);
    color: white;
}

.el-btn-primary:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.el-btn-secondary {
    background: white;
    color: var(--color-bg-dark, #0f172a);
    border-color: var(--color-border, #cbd5e1);
}

.el-btn-secondary:hover {
    border-color: var(--color-bg-dark, #0f172a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* ─── Sections ─── */

.el-section {
    margin-bottom: 3.5rem;
}

.el-section-h {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted, #94a3b8);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border-light, #f1f5f9);
}

.el-prose {
    max-width: 65ch;
    font-size: 1.025rem;
    line-height: 1.7;
    color: var(--color-text, #334155);
    margin: 0 0 1rem;
}

.el-section-lede {
    color: var(--color-text-light, #64748b);
    margin-bottom: 1.75rem;
}

/* ─── Phase rail (four-phase workflow) ─── */

.el-phase-rail {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    border-top: 1px solid var(--color-border-light, #f1f5f9);
}

.el-phase {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 1.25rem;
    padding: 1.25rem 0.5rem;
    border-bottom: 1px solid var(--color-border-light, #f1f5f9);
    transition: background 0.15s;
}

.el-phase:hover { background: rgba(37, 99, 235, 0.025); }

.el-phase-num {
    font-size: 2.75rem;
    font-weight: 300;
    line-height: 1;
    color: var(--color-text-muted, #cbd5e1);
    text-align: right;
    padding-right: 0.5rem;
    transition: color 0.2s;
}

.el-phase:hover .el-phase-num { color: var(--color-primary, #2563eb); }

.el-phase-body { min-width: 0; }

.el-phase-name {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text, #1e293b);
    margin-bottom: 0.4rem;
}

.el-phase-file {
    display: inline-block;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.78rem;
    color: var(--color-text-light, #475569);
    background: var(--color-bg-alt, #f8fafc);
    border: 1px solid var(--color-border-light, #f1f5f9);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.el-phase-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-light, #475569);
    margin: 0;
}

/* ─── Timing line ─── */

.el-timing {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-light, #64748b);
    margin: 0;
    padding: 0.75rem 0.5rem 0;
}

.el-timing strong {
    font-weight: 600;
    color: var(--color-text, #334155);
}

.el-timing-glyph {
    margin-right: 0.15rem;
    opacity: 0.7;
}

.el-timing-sep {
    color: var(--color-text-muted, #cbd5e1);
    margin: 0 0.15rem;
}

/* ─── Card pair (Two ways to use it) ─── */

.el-card-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 720px) {
    .el-card-pair { grid-template-columns: 1fr; }
}

.el-card {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    padding: 1.5rem 1.4rem 1.4rem;
    background: white;
    display: flex;
    flex-direction: column;
}

.el-card-primary {
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    border-color: var(--color-border, #cbd5e1);
}

.el-card-secondary {
    background: var(--color-bg-alt, #fbfcfd);
}

.el-card-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.el-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text, #1e293b);
    margin: 0;
}

.el-card-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary, #2563eb);
    background: rgba(37, 99, 235, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.el-card-meta {
    font-size: 0.78rem;
    color: var(--color-text-muted, #94a3b8);
    font-style: italic;
}

.el-card-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-light, #475569);
    margin: 0 0 1rem;
}

.el-card-desc code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: var(--color-bg-alt, #f1f5f9);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
}

.el-code {
    background: var(--color-bg-dark, #0f172a);
    color: #cbd5e1;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.65;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0 0 1rem;
}

.el-code code { font-family: inherit; background: none; padding: 0; }
.el-code-prompt { color: #60a5fa; user-select: none; }
.el-code-cmd { color: #93c5fd; font-weight: 600; }

.el-card-foot-link {
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--color-primary, #2563eb);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    align-self: flex-start;
    transition: border-color 0.15s;
}

.el-card-foot-link:hover { border-bottom-color: currentColor; }

.el-template-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.el-template-list li {
    border-top: 1px solid var(--color-border-light, #eef2f7);
}

.el-template-list li:last-child {
    border-bottom: 1px solid var(--color-border-light, #eef2f7);
}

.el-template-list a {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 0.25rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.el-template-list a:hover { background: rgba(37, 99, 235, 0.04); }

.el-template-list code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.8rem;
    color: var(--color-text, #1e293b);
    font-weight: 500;
}

.el-template-list span {
    font-size: 0.78rem;
    color: var(--color-text-light, #64748b);
}

/* ─── Worked example callout ─── */

.el-callout {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--color-bg-alt, #f8fafc);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.el-callout:hover {
    border-color: var(--color-primary, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.el-callout-glyph {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.el-callout-body { flex: 1; min-width: 0; }

.el-callout-title {
    font-weight: 600;
    color: var(--color-text, #1e293b);
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.el-callout-desc {
    font-size: 0.85rem;
    color: var(--color-text-light, #64748b);
    margin: 0;
    line-height: 1.5;
}

.el-callout-arrow {
    color: var(--color-text-muted, #94a3b8);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

.el-callout:hover .el-callout-arrow {
    color: var(--color-primary, #2563eb);
    transform: translateX(2px);
}

/* ─── Companion line (book footnote) ─── */

.el-companion {
    margin: 4rem 0;
    padding: 1.25rem 0;
    border-top: 1px solid var(--color-border-light, #f1f5f9);
    border-bottom: 1px solid var(--color-border-light, #f1f5f9);
    text-align: center;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--color-text-light, #64748b);
}

.el-companion a {
    color: var(--color-text, #334155);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border, #cbd5e1);
    transition: color 0.15s, border-color 0.15s;
}

.el-companion a:hover {
    color: var(--color-primary, #2563eb);
    border-bottom-color: currentColor;
}

/* ─── Footer ─── */

.el-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border-light, #f1f5f9);
}

.el-footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--color-text-light, #64748b);
    margin-bottom: 1rem;
}

.el-footer-row strong {
    color: var(--color-text, #334155);
    font-weight: 600;
}

.el-footer-row a {
    color: var(--color-primary, #2563eb);
    text-decoration: none;
}

.el-footer-row a:hover { text-decoration: underline; }

.el-footer-sep {
    color: var(--color-text-muted, #cbd5e1);
}

.el-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.el-tag {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.72rem;
    color: var(--color-text-light, #64748b);
    background: var(--color-bg-alt, #f8fafc);
    border: 1px solid var(--color-border-light, #eef2f7);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

/* ─── Page-load reveal (one staggered animation) ─── */

@media (prefers-reduced-motion: no-preference) {
    .tool-hero-text > * { opacity: 0; animation: el-rise 0.5s ease-out forwards; }
    .tool-hero-text > *:nth-child(1) { animation-delay: 60ms; }
    .tool-hero-text > *:nth-child(2) { animation-delay: 140ms; }
    .tool-hero-text > *:nth-child(3) { animation-delay: 220ms; }
    .tool-hero-text > *:nth-child(4) { animation-delay: 300ms; }
    .el-cta-row .el-btn { opacity: 0; animation: el-rise 0.5s ease-out forwards; animation-delay: 380ms; }
    .el-cta-row .el-btn:nth-child(2) { animation-delay: 440ms; }
}

@keyframes el-rise {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─── */

@media (max-width: 640px) {
    .el-meta-repo span:not(.el-meta-arrow) { display: none; }
    .el-meta-repo { padding: 0.3rem 0.5rem; }
    .el-meta-repo::after { content: 'GitHub'; font-family: inherit; font-size: 0.78rem; }

    .el-phase {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem 0.25rem;
    }
    .el-phase-num { text-align: left; padding-right: 0; font-size: 1.5rem; }

    .el-section-h { font-size: 0.72rem; }
}
