/*
 * Shared styles for the content pages of todomode.com (/pricing/, /import/,
 * /developers/, /vim-todo-app/). Taken from index.html's inline <style>: the
 * same tokens, header, nav, buttons, founder box and footer, plus a reading
 * layout (.page, .prose) for long text, tables, code and keys.
 *
 * index.html still carries its own inline copy. A change to the header, nav,
 * buttons or footer there belongs here too (and the other way round).
 * Fonts come from /fonts/fonts.css (self-hosted); nothing here loads from
 * another origin.
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #141b2e;
    --bg-tertiary: #1e293b;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-cyan: #7dd3fc;
    --accent-purple: #a78bfa;
    --accent-green: #4ade80;
    --accent-pink: #f472b6;
    --border: rgba(125, 211, 252, 0.2);
    --glow-cyan: rgba(125, 211, 252, 0.5);
    --mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html { scroll-padding-top: 6rem; }

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* The landing's blueprint grid, standing still (these pages are for reading). */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(125, 211, 252, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* ---- Header and nav (as index.html) ---------------------------------- */

header {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 20px var(--glow-cyan);
    transition: all 0.3s ease;
}
.logo:hover { text-shadow: 0 0 30px var(--glow-cyan); transform: translateY(-2px); }
.logo::before { content: '>'; color: var(--accent-green); }

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-links a:not(.btn) {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}
.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}
.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] { color: var(--accent-cyan); }
.nav-links a:not(.btn):hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }

/* ---- Buttons --------------------------------------------------------- */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    font-family: var(--mono);
    position: relative;
}
.btn-primary {
    background: #22d3ee;
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.3);
}
.btn-primary:hover {
    background: #3fddf0;
    box-shadow: 0 8px 30px rgba(34, 211, 238, 0.5);
    transform: translateY(-2px);
}
.btn-secondary {
    background: transparent;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
}
.btn-secondary:hover {
    background: rgba(125, 211, 252, 0.1);
    box-shadow: 0 0 20px var(--glow-cyan);
    transform: translateY(-2px);
}

/* ---- Page head ------------------------------------------------------- */

.page { padding: 3.5rem 0 5rem; }

.crumbs {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.crumbs li + li::before { content: '/'; margin-right: 0.4rem; color: var(--text-muted); }
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--accent-cyan); }

.section-label {
    font-family: var(--mono);
    font-size: 0.875rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.page-head { max-width: 820px; margin-bottom: 3rem; }
.page-head h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.25rem, 6vw, 3.75rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-head .lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.7;
}
.page-head .actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* ---- Reading text ---------------------------------------------------- */

.prose { max-width: 820px; }
.prose > * + * { margin-top: 1rem; }
.prose h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-top: 3.5rem;
    color: var(--text-primary);
}
.prose h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 2.25rem;
    color: var(--text-primary);
}
.prose h2 + *, .prose h3 + * { margin-top: 0.75rem; }
.prose p, .prose li { color: var(--text-secondary); font-size: 1.05rem; }
.prose strong { color: var(--text-primary); font-weight: 700; }
.prose a { color: var(--accent-cyan); text-underline-offset: 3px; }
.prose a:hover { color: #bae6fd; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.4rem; }
.prose li::marker { color: var(--accent-cyan); }
.prose ol > li::marker { font-family: var(--mono); font-size: 0.9em; }

code, kbd, pre { font-family: var(--mono); }
.prose code {
    font-size: 0.88em;
    color: var(--text-primary);
    background: rgba(125, 211, 252, 0.08);
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
    overflow-wrap: anywhere;
}
kbd {
    display: inline-block;
    min-width: 1.6em;
    padding: 0.05rem 0.4rem;
    font-size: 0.85em;
    font-weight: 600;
    text-align: center;
    color: var(--accent-cyan);
    background: rgba(125, 211, 252, 0.09);
    border: 1px solid rgba(125, 211, 252, 0.32);
    border-bottom-width: 2px;
    border-radius: 5px;
    white-space: nowrap;
}
.prose pre {
    background: #070a1c;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.1rem;
    overflow-x: auto;
    font-size: 0.86rem;
    line-height: 1.55;
    color: #cbd5e1;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; }
.prose .pre-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1.25rem;
}
.prose .pre-label + pre { margin-top: 0.35rem; }

/* Tables: shortcut lists, prices, limits. Wide ones scroll on a phone. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.97rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.prose caption {
    caption-side: top;
    text-align: left;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-bottom: 0.5rem;
}
.prose th, .prose td {
    text-align: left;
    vertical-align: top;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid rgba(125, 211, 252, 0.1);
    color: var(--text-secondary);
}
.prose thead th {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-cyan);
    background: rgba(125, 211, 252, 0.05);
}
.prose tbody th { color: var(--text-primary); font-weight: 600; white-space: nowrap; }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose td.num, .prose th.num { white-space: nowrap; }

/* A plain boxed aside (no accent rail). */
.prose .note {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.2rem;
}
.prose .note p { font-size: 0.98rem; }

/* Two- or three-up summary boxes. */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 0 0 3rem;
}
.cards > div { background: var(--bg-secondary); padding: 1.4rem 1.5rem; }
.cards h2, .cards h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.6rem 0 0.3rem;
    color: var(--text-primary);
}
.cards p { font-size: 0.92rem; color: var(--text-secondary); }
.cards a { color: var(--accent-cyan); text-underline-offset: 2px; }
.card-key {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--accent-cyan);
    background: rgba(125, 211, 252, 0.1);
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 5px;
    padding: 0.1rem 0.42rem;
}

/* Table of contents under the page head. */
.toc {
    font-family: var(--mono);
    font-size: 0.85rem;
    margin-bottom: 2.5rem;
}
.toc ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 0; }
.toc a { color: var(--text-secondary); text-decoration: none; }
.toc a::before { content: '#'; color: var(--accent-green); margin-right: 0.25rem; }
.toc a:hover { color: var(--accent-cyan); }

/* ---- Pricing card and founder box (as index.html) --------------------- */

.price-layout {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
    margin-bottom: 2rem;
}
.price-card {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.05), rgba(125, 211, 252, 0.05)), var(--bg-secondary);
    border: 2px solid var(--accent-purple);
    border-radius: 12px;
    padding: 2.75rem 2.5rem 2.25rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(167, 139, 250, 0.3);
}
.price-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: var(--bg-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}
.price-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
.price-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 3.25rem;
    font-weight: 900;
    color: var(--accent-cyan);
    line-height: 1;
}
.price-amount span { font-size: 1.2rem; color: var(--text-secondary); font-weight: 600; }
.price-period {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.5rem;
    font-family: var(--mono);
}
.price-features { list-style: none; margin: 1.5rem 0; }
.price-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.price-features li::before {
    content: "\2713";
    color: var(--accent-green);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.3;
    flex-shrink: 0;
}
.price-card .btn { width: 100%; }
.price-trust {
    margin-top: 1.1rem;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}
.price-trust span { color: var(--accent-cyan); }
.price-demo {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.price-demo a { color: var(--accent-cyan); }

.founder-tag {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-purple);
}
.founder-cta { color: var(--accent-cyan); font-weight: 600; white-space: nowrap; }
.price-founder {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 1.25rem 0 0.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(167, 139, 250, 0.45);
    border-radius: 10px;
    background: rgba(167, 139, 250, 0.08);
    color: var(--text-secondary);
    text-decoration: none;
    text-align: center;
}
.price-founder[hidden], [data-founder-until][hidden] { display: none; }
.price-founder-amount { font-size: 1.35rem; font-weight: 700; color: var(--text-primary); }
.price-founder-amount span { font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); }
.price-founder-left { font-size: 0.85rem; }
.price-founder:hover .founder-cta,
.price-founder:focus-visible .founder-cta { text-decoration: underline; }

/* ---- Closing call to action ------------------------------------------ */

.cta {
    margin-top: 4.5rem;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(125, 211, 252, 0.05), rgba(167, 139, 250, 0.05));
    border: 1px solid var(--border);
    border-radius: 12px;
}
.cta h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.cta p { color: var(--text-secondary); font-size: 1.1rem; max-width: 640px; margin: 0 auto 2rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta p.cta-note { font-size: 0.92rem; color: var(--text-muted); margin: 1.5rem auto 0; }

/* ---- Footer (as index.html) ------------------------------------------ */

footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}
.footer-links { display: flex; gap: 1rem 2rem; flex-wrap: wrap; }
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-family: var(--mono);
}
.footer-links a:hover { color: var(--accent-cyan); }
.footer-credit {
    font-family: var(--mono);
    font-size: 0.875rem;
    margin-top: 2rem;
    text-align: center;
}
.footer-credit::before { content: '// '; color: var(--text-muted); }

/* ---- Small screens ---------------------------------------------------- */

@media (max-width: 900px) {
    .price-layout { grid-template-columns: minmax(0, 1fr); }
    .cards { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .nav-links { gap: 1rem; }
    .nav-links a:not(.btn) { display: none; }
    .page { padding: 2.5rem 0 4rem; }
    .page-head .lead { font-size: 1.1rem; }
    .prose h2 { font-size: 1.6rem; }
    .price-card { padding: 2.5rem 1.4rem 1.75rem; }
    .cta { padding: 2.5rem 1.25rem; }
    .cta h2 { font-size: 1.8rem; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
}
@media (max-width: 420px) {
    .nav-links .btn-secondary { display: none; }
    .btn { padding: 0.7rem 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
