/* ============================================================
   READ-TRACK Tutorial Pages — Shared Stylesheet
   ============================================================ */
:root {
    --rt: #0e7c6b;
    --rt-light: #14b8a6;
    --rt-dark: #065f46;
    --rt-50: #ecfdf5;
    --green: #10b981;
    --green-50: #ecfdf5;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --yellow: #f59e0b;
    --yellow-50: #fffbeb;
    --red: #ef4444;
    --red-50: #fef2f2;
    --pink: #ec4899;
    --navy: #1e293b;
    --bg: #fafbfd;
    --bg-alt: #f1f5f9;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.05);
    --shadow-md: 0 4px 20px rgba(0,0,0,.07);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.1);
    --r: 16px;
    --r-lg: 24px;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg); color: var(--text); line-height: 1.75;
    overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
section { overflow-x: hidden; word-wrap: break-word; overflow-wrap: break-word; }
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--rt); border-radius: 4px; }

/* PROGRESS BAR */
.progress-track { position: fixed; top: 0; left: 0; width: 0%; height: 3px; background: linear-gradient(90deg, var(--rt), var(--green)); z-index: 10000; transition: width .15s; }

/* HERO */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 30%, #0e7c6b 55%, #14b8a6 80%, #0d9488 100%);
}
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(59,130,246,.1) 0%, transparent 55%), radial-gradient(ellipse at 80% 20%, rgba(245,158,11,.08) 0%, transparent 45%); }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 60px 60px; }
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 700px; padding: 2rem; color: #fff; }
.hero-badge { display: inline-block; padding: 6px 18px; border-radius: 30px; background: rgba(255,255,255,.12); font-size: .75rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1.2rem; backdrop-filter: blur(10px); }
.hero-logo { width: 80px; height: 80px; border-radius: 20px; margin-bottom: 1.2rem; display: block; margin-left: auto; margin-right: auto; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 900; line-height: 1.15; margin-bottom: .8rem; }
.hero h1 .hl { background: linear-gradient(135deg, #2dd4bf, #a7f3d0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero .subtitle { font-size: .95rem; opacity: .85; max-width: 500px; margin: 0 auto .4rem; }
.hero .subtitle-fil { font-size: .82rem; opacity: .6; font-style: italic; }
.hero-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 1.5rem; padding: 12px 28px; border-radius: 14px; background: rgba(255,255,255,.15); color: #fff; text-decoration: none; font-weight: 700; font-size: .9rem; backdrop-filter: blur(8px); transition: all .2s; border: 1px solid rgba(255,255,255,.2); }
.hero-cta:hover { background: rgba(255,255,255,.25); transform: translateY(-2px); color: #fff; }
.hero-scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); animation: heroScroll 2s ease-in-out infinite; color: rgba(255,255,255,.5); font-size: 1.5rem; }
@keyframes heroScroll { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }
.glow-line { height: 3px; background: linear-gradient(90deg, var(--rt), var(--green), var(--blue), var(--rt)); background-size: 200%; animation: glowShift 4s linear infinite; }
@keyframes glowShift { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

/* STICKY NAV */
.toc-nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,.06); }
.nav-inner { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 0 20px; overflow-x: auto; }
.nav-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 12px 0; flex-shrink: 0; }
.nav-brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav-brand span { font-weight: 800; color: var(--rt); font-size: .85rem; }
.toc-links { display: flex; list-style: none; gap: 2px; flex-shrink: 0; }
.toc-links a { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-size: .78rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; transition: all .2s; }
.toc-links a:hover, .toc-links a.active { background: var(--rt-50); color: var(--rt); }
.step-badge { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 800; background: var(--bg-alt); color: var(--text-muted); }
.toc-links a.active .step-badge, .toc-links a:hover .step-badge { background: var(--rt); color: #fff; }

/* TUTORIAL SECTION */
.tutorial-section { max-width: 900px; margin: 0 auto; padding: 60px 24px; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.step-indicator { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 1rem; }
.step-number { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 900; background: linear-gradient(135deg, var(--rt), var(--rt-light)); color: #fff; box-shadow: 0 6px 20px rgba(14,124,107,.25); }
.step-label { font-size: .75rem; font-weight: 700; color: var(--rt); text-transform: uppercase; letter-spacing: 1px; }
.section-header h2 { font-size: 1.6rem; font-weight: 800; color: var(--navy); margin-bottom: .5rem; }
.section-desc { font-size: .9rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.section-desc-fil { font-size: .82rem; color: var(--text-light); font-style: italic; max-width: 600px; margin: .3rem auto 0; }

/* URL DISPLAY */
.url-display { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 12px; background: linear-gradient(135deg, var(--rt-50), #f0fdf4); border: 1px solid rgba(14,124,107,.15); font-size: .82rem; font-weight: 600; color: var(--rt-dark); margin-bottom: 2rem; text-align: center; width: fit-content; margin-left: auto; margin-right: auto; display: flex; }

/* DEVICE SHOWCASE */
.device-showcase { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 2rem; align-items: start; }
.device-desktop, .device-mobile { border-radius: var(--r); overflow: hidden; background: #fff; box-shadow: var(--shadow-md); }
.device-header { padding: 8px 14px; font-size: .7rem; font-weight: 700; color: var(--text-muted); background: var(--bg-alt); display: flex; align-items: center; gap: 6px; }

/* BROWSER BAR */
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.browser-dot { width: 8px; height: 8px; border-radius: 50%; }
.browser-dot.r { background: #ef4444; }
.browser-dot.y { background: #f59e0b; }
.browser-dot.g { background: #22c55e; }
.browser-url { margin-left: auto; font-size: .6rem; color: var(--text-light); display: flex; align-items: center; gap: 4px; }

/* MOCKUP SCREEN */
.mockup-screen { min-height: 280px; padding: 0; font-size: .75rem; }
.mockup-topbar { padding: 8px 14px; background: linear-gradient(135deg, var(--rt), var(--rt-light)); color: #fff; font-size: .7rem; display: flex; align-items: center; gap: 8px; }
.mockup-sidebar { background: var(--navy); color: rgba(255,255,255,.7); padding: 10px; font-size: .6rem; min-width: 130px; }
.mockup-sidebar-item { padding: 5px 8px; border-radius: 6px; margin-bottom: 3px; display: flex; align-items: center; gap: 6px; font-size: .55rem; }
.mockup-sidebar-item.active { background: rgba(14,124,107,.3); color: #fff; }
.mockup-content { flex: 1; padding: 12px; }
.mockup-table { width: 100%; border-collapse: collapse; font-size: .55rem; margin-top: 8px; }
.mockup-table th { background: var(--bg-alt); padding: 5px 8px; font-weight: 700; text-align: left; border-bottom: 1px solid #e2e8f0; }
.mockup-table td { padding: 5px 8px; border-bottom: 1px solid #f1f5f9; }
.mockup-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: .55rem; font-weight: 600; border: none; cursor: default; }
.mockup-btn-rt { background: var(--rt); color: #fff; }
.mockup-btn-outline { background: transparent; border: 1px solid #e2e8f0; color: var(--text-muted); }
.mockup-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .5rem; font-weight: 700; color: #fff; }
.mockup-select { padding: 4px 8px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: .55rem; background: #fff; width: 100%; }
.mockup-input { padding: 4px 8px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: .55rem; background: #f8fafc; width: 100%; }

/* CALLOUT */
.callout-overlay { position: absolute; padding: 6px 10px; border-radius: 8px; font-weight: 600; z-index: 5; line-height: 1.4; box-shadow: var(--shadow-sm); }
.callout-rt { background: var(--rt-50); color: var(--rt-dark); border: 1px solid rgba(14,124,107,.2); }
.callout-blue { background: #eff6ff; color: #1e40af; border: 1px solid rgba(59,130,246,.2); }
.callout-yellow { background: var(--yellow-50); color: #92400e; border: 1px solid rgba(245,158,11,.2); }
.callout-green { background: var(--green-50); color: var(--rt-dark); border: 1px solid rgba(16,185,129,.2); }
.callout-arrow { position: absolute; width: 8px; height: 8px; transform: rotate(45deg); }
.arrow-left { left: -4px; top: 50%; margin-top: -4px; }
.callout-rt .arrow-left { background: var(--rt-50); border-left: 1px solid rgba(14,124,107,.2); border-bottom: 1px solid rgba(14,124,107,.2); }

/* INSTRUCTION LIST */
.instruction-list { list-style: none; padding: 0; counter-reset: inst; }
.instruction-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed rgba(0,0,0,.06); align-items: flex-start; }
.instruction-list li:last-child { border-bottom: none; }
.instruction-list li::before { counter-increment: inst; content: counter(inst); width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; flex-shrink: 0; background: var(--rt-50); color: var(--rt); }
.instruction-list li .inst-content { flex: 1; }
.instruction-list li .inst-content strong { color: var(--navy); }
.instruction-list li .inst-content .fil { font-size: .8rem; color: var(--text-light); font-style: italic; display: block; margin-top: 2px; }

/* TIP BOX */
.tip-box { padding: 16px 20px; border-radius: var(--r); margin: 1.5rem 0; display: flex; gap: 12px; align-items: flex-start; font-size: .85rem; }
.tip-box-rt { background: var(--rt-50); border-left: 4px solid var(--rt); }
.tip-box-blue { background: #eff6ff; border-left: 4px solid var(--blue); }
.tip-box-yellow { background: var(--yellow-50); border-left: 4px solid var(--yellow); }
.tip-box-red { background: var(--red-50); border-left: 4px solid var(--red); }
.tip-box i { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }

/* ENCOURAGEMENT */
.encouragement { text-align: center; padding: 3rem 1.5rem; background: linear-gradient(135deg, var(--rt-50), #f0fdf4); }
.encouragement h3 { font-weight: 800; color: var(--rt-dark); margin-bottom: .5rem; }
.encouragement p { color: var(--text-muted); max-width: 500px; margin: 0 auto; font-size: .9rem; }

/* CONNECTOR */
.connector { height: 60px; display: flex; align-items: center; justify-content: center; }
.connector-line { width: 2px; height: 100%; background: linear-gradient(to bottom, var(--rt), var(--green)); border-radius: 2px; }

/* COMPLETION */
.completion-section { text-align: center; padding: 60px 24px; background: linear-gradient(135deg, #064e3b, var(--rt)); color: #fff; }
.completion-section h2 { font-weight: 900; margin-bottom: .5rem; }
.completion-section p { opacity: .8; max-width: 500px; margin: 0 auto; }
.completion-badge { width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,.15); display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 1rem; }

/* FOOTER */
.footer { background: var(--navy); color: rgba(255,255,255,.5); text-align: center; padding: 24px; font-size: .75rem; }

/* MOBILE PHONE FRAME */
.phone-frame { width: 100%; max-width: 220px; margin: 0 auto; border: 2px solid #e2e8f0; border-radius: 20px; overflow: hidden; background: #fff; }
.phone-notch { height: 18px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.phone-notch::after { content: ''; width: 40px; height: 4px; border-radius: 4px; background: #d1d5db; }
.phone-screen { min-height: 200px; }

/* FAMILY TREE MOCKUP */
.ft-node { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; font-size: .6rem; font-weight: 600; border: 2px solid; }
.ft-line { width: 2px; height: 20px; margin: 0 auto; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .device-showcase { grid-template-columns: 1fr; }
    .tutorial-section { padding: 40px 16px; }
    .hero h1 { font-size: 1.6rem; }
    .toc-nav { overflow-x: auto; }
}
