/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Libre+Franklin:wght@300;400;500;600;700&display=swap');

/* ─── Shared (non-color) tokens ──────────────────────────── */
:root {
    --font-header: 'Libre Baskerville', serif;
    --font-body: 'Libre Franklin', sans-serif;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ─── Light Theme ────────────────────────────────────────── */
[data-theme="light"] {
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --card-border: #e4e4e7;
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-dark: #333333;
    --text-muted: #999;
    --accent-color: #48E86B;
    --accent-hover: #39da5d;
    --link-color: #2563eb;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --tag-bg: #f4f4f5;
    --tag-text: #3f3f46;
    --surface-bg: #f9fafb;
    --surface-hover-bg: #f3f4f6;
    --border-light: #e5e7eb;
    --border-hover: #d1d5db;
    --badge-bg: #f3f4f6;
    --badge-text: #6b7280;
    --search-icon-color: #9ca3af;
    --cta-bg: rgba(73, 97, 246, 0.1);
    --cta-heading-color: #333333;
    --detail-heading-color: #1f2937;
    --icon-accent: #818cf8;
    /* Header glass */
    --header-blur-gradient: linear-gradient(135deg, rgba(137, 250, 138, 0), rgba(137, 250, 138, 0), rgba(137, 250, 138, 0), rgba(137, 250, 138, 0.4)), color-mix(in srgb, #ffffff 14%, transparent);
    --header-blur-bg: color-mix(in srgb, #ffffff 14%, transparent);
    --glass-inset-1: rgba(255, 255, 255, 0.22);
    --glass-inset-2: rgba(255, 255, 255, 0.70);
    --glass-inset-3: rgba(255, 255, 255, 0.60);
    --glass-inset-4: rgba(255, 255, 255, 0.40);
    --header-text-color: rgba(15, 23, 42, 0.9);
    --signup-btn-color: #0f172a;
    /* Footer */
    --footer-border: #eeeeee;
    --footer-text: #333333;
    --footer-muted: #999;
    --powered-by-color: #3ADA5C;
    /* Platform icon wrapper */
    --icon-wrapper-bg: #ffffff;
    --icon-wrapper-shadow: 0 2px 5px rgba(0,0,0,0.1);
    /* Tree view */
    --tree-bg: #f5f5f7;
    --tree-border: #e4e4e7;
    --dot-grid-color: rgba(0, 0, 0, 0.06);
    --prompt-bg: #ffffff;
    --prompt-border: rgba(73, 97, 246, 0.3);
    --prompt-header-bg: rgba(73, 97, 246, 0.6);
    --prompt-text: #333333;
    --prompt-summary-text: #333333;
    --arrow-color: #52525b;
    --tooltip-bg: #1f2937;
    --tooltip-text: #ffffff;
    --tooltip-desc: #d1d5db;
}

/* ─── Dark Theme ─────────────────────────────────────────── */
[data-theme="dark"] {
    --bg-color: #151515;
    --card-bg: #1F1F1F;
    --card-border: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: #c8ccd4;
    --text-dark: #ffffff;
    --text-muted: #a0a6b2;
    --accent-color: #48E86B;
    --accent-hover: #39da5d;
    --link-color: #89FA8A;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --tag-bg: #272727;
    --tag-text: #c8ccd4;
    --surface-bg: #1F1F1F;
    --surface-hover-bg: #272727;
    --border-light: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(255, 255, 255, 0.2);
    --badge-bg: rgba(255, 255, 255, 0.1);
    --badge-text: #a0a6b2;
    --search-icon-color: #a0a6b2;
    --cta-bg: rgba(73, 97, 246, 0.08);
    --cta-heading-color: #ffffff;
    --detail-heading-color: #ffffff;
    --icon-accent: #a5b4fc;
    /* Header glass */
    --header-blur-gradient: linear-gradient(135deg, rgba(137, 250, 138, 0), rgba(137, 250, 138, 0), rgba(137, 250, 138, 0), rgba(137, 250, 138, 0.15)), color-mix(in srgb, #333333 60%, transparent);
    --header-blur-bg: color-mix(in srgb, #333333 60%, transparent);
    --glass-inset-1: rgba(255, 255, 255, 0.08);
    --glass-inset-2: rgba(255, 255, 255, 0.15);
    --glass-inset-3: rgba(255, 255, 255, 0.10);
    --glass-inset-4: rgba(255, 255, 255, 0.08);
    --header-text-color: rgba(255, 255, 255, 0.9);
    --signup-btn-color: #0f172a;
    /* Footer */
    --footer-border: rgba(255, 255, 255, 0.12);
    --footer-text: #c8ccd4;
    --footer-muted: #a0a6b2;
    --powered-by-color: #89FA8A;
    /* Platform icon wrapper */
    --icon-wrapper-bg: #272727;
    --icon-wrapper-shadow: 0 2px 5px rgba(0,0,0,0.3);
    /* Tree view */
    --tree-bg: #1a1a1e;
    --tree-border: rgba(255, 255, 255, 0.08);
    --dot-grid-color: rgba(255, 255, 255, 0.08);
    --prompt-bg: #1E1E1E;
    --prompt-border: rgba(73, 97, 246, 0.3);
    --prompt-header-bg: rgba(73, 97, 246, 0.6);
    --prompt-text: #FCFCFC;
    --prompt-summary-text: rgba(252, 252, 252, 0.85);
    --arrow-color: #ffffff;
    --tooltip-bg: #333333;
    --tooltip-text: #ffffff;
    --tooltip-desc: #a0a6b2;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    padding-top: 80px;
}

h1, h2 {
    font-family: var(--font-header);
}

h3, h4, h5, h6 {
    font-family: var(--font-body);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ===== SITE HEADER STYLES ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 74px;
    z-index: 3000;
}

.site-header-inner {
    position: relative;
    height: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header-inner .logo,
.site-header-inner .auth-actions {
    position: relative;
    z-index: 1;
}

.site-header .logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-family: 'Libre Baskerville', serif;
    color: var(--text-dark);
    text-decoration: none;
}

.site-header .logo img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.header-blur {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 12px;
    right: 18px;
    border-radius: 9999px;
    background: var(--header-blur-bg);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    background: var(--header-blur-gradient);
    box-shadow:
        inset 0 0 0 1px var(--glass-inset-1),
        inset 1.8px 3px 0 -2px var(--glass-inset-2),
        inset -2px -2px 0 -2px var(--glass-inset-3),
        inset -3px -8px 1px -6px var(--glass-inset-4),
        inset -0.3px -1px 4px 0 rgba(0, 0, 0, 0.12),
        inset -1.5px 2.5px 0 -2px rgba(0, 0, 0, 0.18),
        inset 0 3px 4px -2px rgba(0, 0, 0, 0.18),
        0 6px 16px rgba(0, 0, 0, 0.08);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    filter: blur(5px);
    transition: opacity 260ms cubic-bezier(.2, .9, .2, 1), filter 260ms cubic-bezier(.2, .9, .2, 1);
    will-change: opacity, filter;
}

.header-blur[data-scrolled="true"] {
    filter: blur(0px);
    opacity: 1;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    font-family: 'Libre Franklin', sans-serif;
}

.header-plain-action {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--header-text-color);
    cursor: pointer;
    -webkit-font-smoothing: antialiased;
    transition: opacity .15s ease, color .15s ease;
    text-decoration: none;
}

.header-plain-action:hover {
    opacity: 0.9;
    text-decoration: none;
}

.signup-button-header-style {
    background:
        linear-gradient(135deg, rgba(137, 250, 138, 1), rgba(137, 250, 138, 1)),
        color-mix(in srgb, #ffffff 14%, transparent);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    border: 1px solid var(--glass-inset-1);
    border-radius: 100px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--signup-btn-color);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background .2s, box-shadow .2s, transform .15s;
    text-decoration: none;
    box-shadow:
        inset 0 0 0 1px var(--glass-inset-1),
        inset 1.8px 3px 0 -2px var(--glass-inset-2),
        inset -2px -2px 0 -2px var(--glass-inset-3),
        inset -3px -8px 1px -6px var(--glass-inset-4),
        inset -0.3px -1px 4px 0 rgba(0, 0, 0, 0.12),
        inset -1.5px 2.5px 0 -2px rgba(0, 0, 0, 0.18),
        inset 0 3px 4px -2px rgba(0, 0, 0, 0.18),
        0 6px 16px rgba(0, 0, 0, 0.08);
}

.signup-button-header-style:hover {
    background:
        linear-gradient(135deg, rgba(137, 250, 138, 0.9), rgba(137, 250, 138, 0.9)),
        color-mix(in srgb, #ffffff 14%, transparent);
    box-shadow:
        inset 0 0 0 1px var(--glass-inset-1),
        inset 1.8px 3px 0 -2px var(--glass-inset-2),
        inset -2px -2px 0 -2px var(--glass-inset-3),
        inset -3px -8px 1px -6px var(--glass-inset-4),
        inset -0.3px -1px 4px 0 rgba(0, 0, 0, 0.12),
        inset -1.5px 2.5px 0 -2px rgba(0, 0, 0, 0.18),
        inset 0 3px 4px -2px rgba(0, 0, 0, 0.18),
        0 8px 20px rgba(0, 0, 0, 0.12);
}

.signup-button-header-style:active {
    transform: translateY(1px);
}

.signup-button-header-style .arrow {
    font-size: 16px;
    line-height: 1.2;
}

/* ===== BUTTONS ===== */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 8px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    min-width: 380px;
}

.btn-primary {
    background-color: var(--accent-hover);
    color: #fff;
    font-size: 17px;
}
.btn-primary:hover {
    background-color: var(--accent-color);
}

.btn-google {
    background-color: #4285F4;
    color: #fff;
    padding: 2px;
    position: relative;
    border: none;
    border-radius: 8px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-google:hover {
    background-color: #3367D6;
}

.btn-google .google-icon-wrapper {
    background: #fff;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    flex-shrink: 0;
}

.btn-google .google-icon-wrapper img {
    width: 20px;
    height: 20px;
}

.btn-google .btn-text {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 17px;
    padding-right: 42px;
}

/* ===== BOTTOM CTA SECTION ===== */
.bottom-cta-section {
    background-color: var(--cta-bg);
    color: #ffffff;
    text-align: center;
    padding: 80px 20px;
    margin-top: 60px;
}

.bottom-cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--cta-heading-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-body);
}

.bottom-cta-section .cta-buttons {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== SITE FOOTER STYLES ===== */
.footer {
    width: 90%;
    max-width: 800px;
    font-family: 'Libre Franklin', sans-serif;
    text-align: center;
    font-weight: 300;
    font-size: 14px;
    color: var(--footer-muted);
    margin: 48px auto 32px auto;
    border-top: 1px solid var(--footer-border);
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
}

.footer-content {
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.footer-nav-extra {
    display: flex;
    gap: 30px;
}

.footer-nav-extra button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--footer-text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.footer-nav-extra button:hover {
    opacity: 0.7;
}

.footer-main-row {
    justify-content: space-between;
    gap: 40px;
}

.footer-social-and-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.footer-secondary-row {
    justify-content: space-between;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-family: 'Libre Baskerville', serif;
    color: var(--footer-text);
    text-decoration: none;
    padding-bottom: 1px;
}

.footer-logo:hover {
    opacity: 0.8;
    text-decoration: none;
}

.footer-logo img {
    width: 20px;
    height: 20px;
    margin-right: 6px;
}

.footer-nav {
    display: flex;
    gap: 30px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.footer-nav a:hover {
    opacity: 0.7;
    text-decoration: none;
}

.footer-social {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none;
}

.footer-social a:hover {
    opacity: 0.7;
}

.footer-social img {
    width: 20px;
    height: 20px;
}

.footer-copyright {
    color: var(--footer-text);
    font-size: 15px;
    text-align: center;
}

.mobile-copyright {
    display: none;
}

.powered-by-link {
    color: var(--powered-by-color);
    text-decoration: none;
}

.powered-by-link:hover {
    text-decoration: underline;
}

/* =========================================================
   PLAYBOOKS INDEX PAGE
   ========================================================= */

.index-hero {
    text-align: center;
    padding: 80px 0 60px;
}

.index-hero h1 {
    font-size: 3.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.index-hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}

.playbooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto 80px;
}

.playbook-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.playbook-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.playbook-card-icons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.playbook-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--icon-wrapper-bg);
    box-shadow: var(--icon-wrapper-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    overflow: hidden;
}

.playbook-icon-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.playbook-icon-badge .icon-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: rgba(73, 97, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.playbook-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.playbook-card-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.playbook-card-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playbook-card-arrow {
    text-align: right;
    color: var(--text-muted);
    margin-top: 12px;
    font-size: 0.9rem;
}

/* =========================================================
   PLAYBOOK DETAIL PAGE - HERO
   ========================================================= */

.playbook-hero {
    text-align: center;
    padding: 60px 20px 40px;
}

.playbook-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
    transition: opacity 0.15s;
}

.back-link:hover {
    opacity: 0.7;
}

.playbook-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--detail-heading-color);
    margin-bottom: 16px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.playbook-hero-desc {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.playbook-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 28px;
}

.playbook-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    cursor: default;
    position: relative;
}

.playbook-badge img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
}

.playbook-badge .badge-placeholder {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(73, 97, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
}

/* =========================================================
   TREE VIEW
   ========================================================= */

.tree-section {
    padding: 0 20px 60px;
    max-width: 1300px;
    margin: 0 auto;
}

.section-heading {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--detail-heading-color);
    margin-bottom: 24px;
}

.tree-wrapper {
    position: relative;
    border: 1px solid var(--tree-border);
    border-radius: var(--radius-lg);
    background: var(--tree-bg);
    overflow: hidden;
}

.tree-viewport {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    min-height: 400px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    text-align: center;
}

.tree-viewport::-webkit-scrollbar {
    display: none;
}

.tree-viewport:active {
    cursor: grabbing;
}

.tree-content {
    display: inline-flex;
    gap: 80px;
    padding: 80px 120px;
    position: relative;
    min-height: 100%;
    align-items: center;
    text-align: left;
    background-image: radial-gradient(circle, var(--dot-grid-color) 1px, transparent 1px);
    background-size: 24px 24px;
}

.tree-connections {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

.tree-level {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    flex-shrink: 0;
}

/* ===== PROMPT CARD ===== */
.prompt-card {
    width: 340px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.prompt-actions-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    padding-left: 6px;
    min-height: 48px;
    align-items: center;
    flex-wrap: wrap;
}

.prompt-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    cursor: default;
    position: relative;
    transition: border-color 0.15s;
    overflow: hidden;
}

.prompt-action-icon:hover {
    border-color: var(--border-hover);
}

.prompt-action-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 3px;
}

.prompt-action-icon .action-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background: rgba(73, 97, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
}

.prompt-body {
    background: var(--prompt-bg);
    border: 1px solid var(--prompt-border);
    border-radius: 10px;
    overflow: hidden;
}

.prompt-header {
    background: var(--prompt-header-bg);
    padding: 0 16px;
    height: 40px;
    display: flex;
    align-items: center;
}

.prompt-header-title {
    color: #FCFCFC;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prompt-summary {
    padding: 12px 16px;
    font-size: 13.5px;
    color: var(--prompt-summary-text);
    line-height: 1.55;
    height: 150px;
    overflow: hidden;
    position: relative;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* Opaque overlay to cover webkit line-clamp bug (text continues after ellipsis) */
.prompt-summary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: var(--card-bg);
    pointer-events: none;
}

.prompt-summary strong {
    font-weight: 700;
}

/* Chain link dot */
.chain-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--arrow-color);
    opacity: 0.9;
    z-index: 2;
}

/* ===== USE PLAYBOOK CTA ===== */
.use-playbook-section {
    text-align: center;
    padding: 28px 20px 42px;
}

.btn-use-playbook {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #4961F6;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-use-playbook:hover {
    background-color: #3a4fd4;
}

.btn-use-playbook .arrow {
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
}

/* ===== TOOLTIP ===== */
.tree-tooltip {
    position: fixed;
    z-index: 9999;
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
    font-size: 0.8rem;
    font-family: var(--font-body);
    padding: 10px 14px;
    border-radius: 8px;
    width: 260px;
    line-height: 1.45;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.tree-tooltip.visible {
    opacity: 1;
}

.tree-tooltip .tooltip-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--tooltip-text);
}

.tree-tooltip .tooltip-desc {
    font-weight: 400;
    color: var(--tooltip-desc);
    font-size: 0.75rem;
}

/* ===== MINIMAP ===== */
.tree-minimap {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    display: none;
}

.tree-minimap canvas {
    border-radius: 3px;
    display: block;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
    .index-hero h1 {
        font-size: 2.2rem;
    }

    .index-hero p {
        font-size: 1rem;
    }

    .playbooks-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .playbook-hero h1 {
        font-size: 2rem;
    }

    .playbook-hero-desc {
        font-size: 1rem;
    }

    .tree-content {
        padding: 60px 40px;
        gap: 60px;
    }

    .prompt-card {
        width: 280px;
    }

    .prompt-header-title {
        font-size: 13px;
    }

    .prompt-summary {
        font-size: 12px;
    }

    .tree-minimap {
        display: none;
    }

    .tree-tooltip {
        width: min(260px, calc(100vw - 24px));
    }

    .btn {
        min-width: 280px;
    }
}

@media (max-width: 700px) {
    .auth-actions .login-link {
        display: none;
    }

    .footer {
        padding: 15px 0 !important;
        width: 90% !important;
        box-sizing: border-box;
        transform: none !important;
        max-width: none !important;
        margin: 24px auto 24px auto !important;
        position: static !important;
    }

    .footer-content {
        gap: 16px !important;
        padding: 0 20px !important;
    }

    .footer-row {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: flex-start !important;
    }

    .footer-main-row {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100%;
        gap: 12px !important;
    }

    .footer-secondary-row {
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        width: 100%;
        gap: 16px !important;
    }

    .footer-social-and-nav {
        flex-direction: row !important;
        gap: 20px !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }

    .footer-left {
        gap: 12px !important;
        align-items: flex-start !important;
    }

    .footer-nav-extra {
        gap: 16px !important;
    }

    .footer-nav {
        gap: 16px !important;
        justify-content: flex-start !important;
    }

    .footer-social {
        gap: 12px !important;
    }

    .footer-nav a {
        font-size: 14px;
    }

    .desktop-copyright {
        display: none !important;
    }

    .mobile-copyright {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .mobile-copyright span {
        font-size: 14px;
        color: var(--footer-text);
    }

    .footer-secondary-row {
        align-items: center !important;
    }

    .footer-copyright {
        text-align: center !important;
    }
}
