/* English landing pages: /translate-django-po-files/ and /compare/.
   Reuses the site tokens from styles.css. Left-aligned, text-first. */

.lp-hero,
.lp-body,
.lp-page-head {
    --lp-text: #cbd5e1;
    --lp-muted: #94a3b8;
    --lp-rule: rgba(148, 163, 184, 0.18);
    --lp-code-bg: #0b1120;
    --lp-accent: #a5b4fc;
}

.lp-hero code,
.lp-body code,
.lp-page-head code {
    color: var(--lp-accent);
    background: rgba(99, 102, 241, 0.14);
}

/* Hero */
.lp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem);
}

.lp-hero h1,
.lp-page-head h1 {
    font-size: clamp(2.25rem, 4.6vw, 3.5rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 1.25rem;
    max-width: 18ch;
}

.lp-lede {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    line-height: 1.7;
    color: var(--lp-text);
    max-width: 58ch;
    margin-bottom: 1.75rem;
}

.lp-hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.lp-hero-links a,
.lp-body a {
    color: var(--lp-accent);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.lp-hero-links a:hover,
.lp-body a:hover {
    color: var(--text-primary);
}

/* Install command */
.lp-install {
    max-width: 34rem;
    border: 1px solid var(--lp-rule);
    border-radius: 0.75rem;
    background: var(--lp-code-bg);
    overflow: hidden;
}

.lp-install-tabs {
    display: flex;
    border-bottom: 1px solid var(--lp-rule);
}

.lp-install-tab {
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--lp-muted);
    background: none;
    border: 0;
    padding: 0.55rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.lp-install-tab[aria-selected="true"] {
    color: var(--text-primary);
    border-bottom-color: var(--accent-primary);
}

.lp-install-tab:focus-visible,
.lp-copy:focus-visible {
    outline: 2px solid var(--lp-accent);
    outline-offset: -2px;
}

.lp-install-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.85rem 0.85rem 1rem;
}

.lp-hero .lp-install-cmd,
.lp-body .lp-install-cmd {
    flex: 1;
    min-width: 0;
    background: none;
    padding: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow-x: auto;
}

.lp-install-cmd span[aria-hidden] {
    color: var(--lp-muted);
}

.lp-copy {
    flex: none;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    background: var(--lp-accent);
    border: 0;
    border-radius: 0.4rem;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    min-width: 4.75rem;
    transition: background-color 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.lp-copy:hover {
    background: #c7d2fe;
}

.lp-copy[data-state="copied"] {
    background: #86efac;
}

/* Terminal */
.lp-terminal {
    margin: 0;
    border-radius: 0.75rem;
    border: 1px solid var(--lp-rule);
    background: var(--lp-code-bg);
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.lp-terminal-bar {
    display: flex;
    gap: 0.4rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--lp-rule);
}

.lp-terminal-bar span {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: #334155;
}

.lp-terminal-body {
    margin: 0;
    padding: 1.1rem 1.2rem 1.3rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.75;
    color: var(--lp-text);
    overflow-x: auto;
}

.t-prompt { color: var(--lp-muted); }
.t-info { color: #93c5fd; }
.t-notice { color: #c4b5fd; }
.t-ok { color: #86efac; }

/* Body sections */
.lp-body {
    max-width: 46rem;
    padding-bottom: 2rem;
}

.lp-section {
    padding: clamp(2rem, 4vw, 3rem) 0;
    border-top: 1px solid var(--lp-rule);
}

.lp-section h2,
.lp-cta h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    line-height: 1.25;
    letter-spacing: -0.015em;
    margin-bottom: 1rem;
}

.lp-section p,
.lp-section li,
.lp-section dd {
    color: var(--lp-text);
    line-height: 1.75;
}

.lp-section p + p,
.lp-section p + .lp-code,
.lp-section .lp-code + p {
    margin-top: 1rem;
}

.lp-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.lp-list li {
    position: relative;
    padding-left: 1.5rem;
}

.lp-list li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.72em;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 2px;
    background: var(--accent-primary);
}

.lp-list strong {
    color: var(--text-primary);
}

.lp-code {
    margin: 1rem 0 0;
    padding: 1rem 1.2rem;
    border-radius: 0.6rem;
    border: 1px solid var(--lp-rule);
    background: var(--lp-code-bg);
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.7;
}

.lp-body .lp-code code {
    background: none;
    padding: 0;
    color: #e2e8f0;
    font-size: inherit;
}

.c-comment { color: #64748b; }
.c-string { color: #86efac; }

/* FAQ: visible text, no accordion */
.lp-faq {
    display: grid;
    gap: 0.35rem;
}

.lp-faq dt {
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1.1rem;
}

.lp-faq dt:first-child {
    margin-top: 0;
}

/* Closing CTA */
.lp-cta {
    padding: clamp(2.5rem, 5vw, 3.5rem) 0 1rem;
    border-top: 1px solid var(--lp-rule);
}

/* Compare pages */
.lp-page-head {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2rem);
    max-width: 46rem;
}

.lp-page-head .lp-lede {
    margin-bottom: 1.5rem;
}

.lp-meta {
    font-size: 0.85rem;
    color: var(--lp-muted);
    margin-top: 1rem;
}

.lp-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--lp-rule);
    border-radius: 0.75rem;
    margin-top: 0.5rem;
}

.lp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 34rem;
}

.lp-table caption {
    text-align: left;
    padding: 0.9rem 1rem 0;
    color: var(--lp-muted);
    font-size: 0.85rem;
}

.lp-table th,
.lp-table td {
    text-align: left;
    vertical-align: top;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--lp-rule);
    line-height: 1.55;
}

.lp-table tbody tr:last-child th,
.lp-table tbody tr:last-child td {
    border-bottom: 0;
}

.lp-table thead th {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--lp-muted);
    font-weight: 600;
}

.lp-table tbody th {
    font-weight: 600;
    color: var(--text-primary);
    width: 26%;
}

.lp-table td {
    color: var(--lp-text);
}

.lp-hub {
    list-style: none;
    max-width: 46rem;
    border-top: 1px solid var(--lp-rule);
}

.lp-hub li {
    border-bottom: 1px solid var(--lp-rule);
}

.lp-hub a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 1.5rem;
    padding: 1.25rem 0;
    text-decoration: none;
    color: inherit;
}

.lp-hub-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.lp-hub-summary {
    grid-column: 1;
    color: var(--lp-text);
}

.lp-hub-arrow {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    color: var(--lp-accent);
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.lp-hub a:hover .lp-hub-name,
.lp-hub a:focus-visible .lp-hub-name {
    color: var(--lp-accent);
}

.lp-hub a:hover .lp-hub-arrow {
    transform: translateX(4px);
}

.lp-related {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

@media (max-width: 900px) {
    .lp-hero {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .lp-install-row {
        flex-wrap: wrap;
    }

    .lp-copy {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-copy,
    .lp-hub-arrow {
        transition: none;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lp-section-note {
    color: var(--lp-text);
    margin-bottom: 0.25rem;
}

/* Keep flags like --dry-run on one line */
.lp-section p code,
.lp-section li code,
.lp-section dd code,
.lp-lede code {
    white-space: nowrap;
}

/* Comparison tables become stacked rows on small screens */
@media (max-width: 640px) {
    .lp-table {
        min-width: 0;
    }

    .lp-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .lp-table tr {
        display: block;
        padding: 0.9rem 1rem;
        border-bottom: 1px solid var(--lp-rule);
    }

    .lp-table tbody tr:last-child {
        border-bottom: 0;
    }

    .lp-table tbody th,
    .lp-table td {
        display: block;
        width: auto;
        padding: 0;
        border: 0;
    }

    .lp-table tbody th {
        margin-bottom: 0.5rem;
    }

    .lp-table td + td {
        margin-top: 0.5rem;
    }

    .lp-table td::before {
        display: block;
        font-size: 0.75rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--lp-muted);
        content: "TranslateBot";
    }

    .lp-table td + td::before {
        content: var(--rival);
    }
}

.lp-section .lp-list + p {
    margin-top: 1rem;
}
