@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,700;1,9..144,400&family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ==========================================================================
   BASE & CSS VARIABLES ACROSS THE 4 SCHOOL-GRID STYLES
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   STYLE 1: Classic Maths Exercise Book (Default)
   Warm cream grid paper, navy fountain-pen ink, red margin line accents
   -------------------------------------------------------------------------- */
body.style-1 {
    --bg-color: #fbfaf5;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-alt: #f4f1e6;
    --text-main: #1d2a3a;
    --text-muted: #526071;
    --primary: #1e3a5f;
    --primary-hover: #142844;
    --accent: #d64045;
    --accent-soft: #fdeaea;
    --secondary: #2b6cb0;
    --secondary-soft: #e6f0fa;
    --border-color: #d8d4c5;
    --border-strong: #b8b29e;
    --shadow-sm: 0 2px 8px rgba(30, 58, 95, 0.06);
    --shadow-md: 0 8px 24px rgba(30, 58, 95, 0.10);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --font-heading: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    background-color: var(--bg-color);
    background-image: url("pad-texture.png");
    background-repeat: repeat;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.65;
}

/* Red vertical exercise-book margin line on large screens for Style 1 */
body.style-1::before {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: max(24px, calc((100vw - 1180px) / 2 - 28px));
    width: 2px;
    background: rgba(214, 64, 69, 0.28);
    pointer-events: none;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   STYLE 2: Modern Graph Binder (Interactive Tabbed Workbook)
   Crisp school grid paper, vibrant cobalt & emerald, ring-binder folder tabs
   -------------------------------------------------------------------------- */
body.style-2 {
    --bg-color: #f6f9fc;
    --surface: #ffffff;
    --surface-alt: #edf2f7;
    --text-main: #0f172a;
    --text-muted: #475569;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --accent: #059669;
    --accent-soft: #d1fae5;
    --secondary: #7c3aed;
    --secondary-soft: #ede9fe;
    --border-color: #cbd5e1;
    --border-strong: #94a3b8;
    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(37, 99, 235, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    background-color: var(--bg-color);
    background-image:
        linear-gradient(to right, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        url("pad-texture.png");
    background-size: 25px 25px, 25px 25px, auto;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.65;
}

/* --------------------------------------------------------------------------
   STYLE 3: Mathematical Blueprint (Dark Coordinate Grid)
   Deep architectural slate-navy with luminous cyan/slate grid & gold accents
   -------------------------------------------------------------------------- */
body.style-3 {
    --bg-color: #0b1324;
    --surface: rgba(17, 28, 53, 0.92);
    --surface-alt: #162444;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --secondary: #a855f7;
    --secondary-soft: rgba(168, 85, 247, 0.18);
    --border-color: rgba(56, 189, 248, 0.22);
    --border-strong: rgba(56, 189, 248, 0.45);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    background-color: var(--bg-color);
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.09) 1px, transparent 1px),
        linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px),
        url("pad-texture.png");
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px, auto;
    background-blend-mode: normal, normal, normal, normal, soft-light;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.65;
}

/* --------------------------------------------------------------------------
   STYLE 4: Oxford / Textbook Editorial
   Classic academic textbook typography, forest green & crimson over grid paper
   -------------------------------------------------------------------------- */
body.style-4 {
    --bg-color: #f8f6f0;
    --surface: #ffffff;
    --surface-alt: #f0ece1;
    --text-main: #1b1b18;
    --text-muted: #57534e;
    --primary: #1b4332;
    --primary-hover: #081c15;
    --accent: #8c1d40;
    --accent-soft: #f9e8ed;
    --secondary: #2d6a4f;
    --secondary-soft: #d8f3dc;
    --border-color: #d6d1c4;
    --border-strong: #1b4332;
    --shadow-sm: 2px 2px 0px rgba(27, 67, 50, 0.12);
    --shadow-md: 5px 5px 0px rgba(27, 67, 50, 0.18);
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    background-color: var(--bg-color);
    background-image: url("pad-texture.png");
    background-repeat: repeat;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.7;
}

/* ==========================================================================
   STYLE SWITCHER BAR (Optional preview bar at top)
   ========================================================================== */
.style-switcher-bar {
    background: #111827;
    color: #e5e7eb;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    border-bottom: 1px solid #374151;
    position: relative;
    z-index: 1100;
}

.style-switcher-label {
    color: #9ca3af;
    font-weight: 500;
}

.style-switcher-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.style-pill {
    color: #d1d5db;
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #374151;
    background: #1f2937;
    transition: all 0.15s ease;
    font-size: 0.75rem;
}

.style-pill:hover {
    background: #374151;
    color: #ffffff;
}

.style-pill.active {
    background: #3b82f6;
    border-color: #60a5fa;
    color: #ffffff;
    font-weight: 600;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--surface);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

body.style-4 .site-header {
    border-bottom: 3px double var(--primary);
}

.header-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary);
}

body.style-3 .brand-title {
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    border-left: 2px solid var(--border-color);
    padding-left: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-body);
}

.nav-link:hover,
.nav-link.active {
    background: var(--surface-alt);
    color: var(--primary);
}

.nav-link.nav-cta {
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    margin-left: 4px;
}

body.style-3 .nav-link.nav-cta {
    color: #0b1324;
}

.nav-link.nav-cta:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

/* Style 2 Folder-Tab Bar */
body.style-2 .header-inner {
    padding-bottom: 0;
}

body.style-2 .main-nav {
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    gap: 8px;
}

body.style-2 .nav-link {
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: var(--surface-alt);
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    position: relative;
    bottom: -2px;
}

body.style-2 .nav-link.active {
    background: var(--surface);
    color: var(--primary);
    border-color: var(--primary);
    border-top-width: 3px;
    z-index: 2;
}

body.style-2 .nav-link.nav-cta {
    margin-left: auto;
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

body.style-2 .nav-link.nav-cta.active {
    background: var(--primary-hover);
    color: #ffffff;
}

/* ==========================================================================
   MAIN CONTAINER & SECTIONS
   ========================================================================== */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 36px 24px 72px;
    position: relative;
    z-index: 2;
}

.page-section {
    margin-bottom: 56px;
    scroll-margin-top: 90px;
}

/* In Style 2 (Tabbed Binder Mode), sections act as switchable tab panels */
body.style-2.js-tabs-ready .page-section.tab-panel {
    display: none;
    animation: fadeInTab 0.25s ease;
}

body.style-2.js-tabs-ready .page-section.tab-panel.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Headers */
.section-header {
    margin-bottom: 28px;
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-main);
    line-height: 1.25;
}

body.style-4 .section-title {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

.section-lead {
    color: var(--text-muted);
    font-size: 1.06rem;
    max-width: 720px;
    margin-top: 8px;
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.hero-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    box-shadow: var(--shadow-md);
    margin-bottom: 44px;
    position: relative;
    overflow: hidden;
}

body.style-1 .hero-card {
    border-left: 5px solid var(--accent);
}

body.style-3 .hero-card {
    border: 1px solid var(--border-strong);
    background: linear-gradient(135deg, rgba(17, 28, 53, 0.96), rgba(15, 23, 42, 0.92));
}

body.style-4 .hero-card {
    border: 2px solid var(--primary);
    background: #ffffff;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.95fr;
    gap: 32px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.45rem;
    line-height: 1.18;
    color: var(--text-main);
    margin-bottom: 14px;
}

.hero-description {
    font-size: 1.08rem;
    color: var(--text-muted);
    margin-bottom: 22px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

body.style-3 .btn-primary {
    color: #0b1324;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-outline {
    background: var(--surface-alt);
    color: var(--text-main);
    border-color: var(--border-strong);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Quick Summary Matrix inside Hero */
.hero-summary-box {
    background: var(--surface-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
}

.hero-summary-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.quick-tier {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.quick-tier:last-child {
    margin-bottom: 0;
}

.quick-tier-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
}

.quick-tier-levels {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.quick-tier-price {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    white-space: nowrap;
}

.quick-tier-price span {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* ==========================================================================
   LEVEL FILTER BAR (Interactive Subject Selector)
   ========================================================================== */
.level-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.filter-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    background: var(--surface-alt);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-body);
}

.filter-btn:hover {
    border-color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

body.style-3 .filter-btn.active {
    color: #0b1324;
}

/* ==========================================================================
   TUTOR CARDS (PAUL & MONTY)
   ========================================================================== */
.tutors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    align-items: stretch;
}

.tutor-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, opacity 0.25s ease, border-color 0.2s ease;
    position: relative;
}

body.style-4 .tutor-card {
    border: 2px solid var(--primary);
}

.tutor-card.dimmed {
    opacity: 0.38;
    transform: scale(0.985);
}

.tutor-card.highlighted {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2), var(--shadow-md);
}

.tutor-card-top {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 22px;
    padding: 26px 26px 20px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.tutor-photo-wrap {
    width: 160px;
    height: 160px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-strong);
    background: #e2e8f0;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.tutor-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tutor-identity {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tutor-role-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-weight: 600;
}

.tutor-name {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    color: var(--text-main);
    line-height: 1.15;
}

.tutor-price-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    width: fit-content;
    margin-top: 2px;
}

.price-amount {
    font-family: var(--font-mono);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--primary);
}

.price-unit {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Subject Level Pills on Tutor Card */
.tutor-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 26px 0;
}

.level-pill {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.level-pill.covered {
    background: var(--secondary-soft);
    color: var(--secondary);
    border: 1px solid currentColor;
}

body.style-1 .level-pill.covered {
    background: #e6f0fa;
    color: #1e3a5f;
}

.level-pill.not-covered {
    background: transparent;
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
    text-decoration: line-through;
    opacity: 0.7;
}

.tutor-body {
    padding: 20px 26px 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tutor-bio-intro {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 14px;
}

.credential-list {
    list-style: none;
    margin-bottom: 22px;
}

.credential-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.96rem;
}

.credential-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: 700;
    font-family: var(--font-mono);
}

.credential-list a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tutor-card-footer {
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tutor-footer-note {
    font-size: 0.84rem;
    color: var(--text-muted);
}

/* ==========================================================================
   COMPARISON MATRIX TABLE
   ========================================================================== */
.comparison-card {
    margin-top: 28px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--surface-alt);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.badge-yes {
    color: #059669;
    font-weight: 700;
    font-family: var(--font-mono);
}

body.style-3 .badge-yes {
    color: #34d399;
}

.badge-no {
    color: var(--text-muted);
    opacity: 0.55;
    font-family: var(--font-mono);
}

/* ==========================================================================
   WHAT WE OFFER: IN-PERSON PHILOSOPHY & REVISION APP VIDEO
   ========================================================================== */
.what-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 28px;
    align-items: start;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

body.style-4 .feature-card {
    border: 2px solid var(--primary);
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    margin-bottom: 14px;
    color: var(--text-main);
}

.feature-card p {
    color: var(--text-muted);
    margin-bottom: 14px;
    font-size: 0.98rem;
}

.feature-card p:last-child {
    margin-bottom: 0;
}

.highlight-callout {
    background: var(--surface-alt);
    border-left: 4px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 18px 0;
    font-size: 0.94rem;
    color: var(--text-main);
}

.perks-list {
    list-style: none;
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.perks-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.perks-list li span.perk-icon {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent);
}

/* ==========================================================================
   PARALLEL HTML5 FLOWCHARTS (SESSION FLOW + HOMEWORK FLOW WITH LOOP & BRACKET)
   Styled across all 4 themes (style-1, style-2, style-3, style-4)
   ========================================================================== */
.flowcharts-showcase {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    margin-top: 28px;
}

body.style-1 .flowcharts-showcase {
    border-left: 5px solid var(--primary);
}

body.style-3 .flowcharts-showcase {
    border: 1px solid var(--border-strong);
    background: linear-gradient(180deg, rgba(17, 28, 53, 0.96), rgba(11, 19, 36, 0.95));
}

body.style-4 .flowcharts-showcase {
    border: 2px solid var(--primary);
}

.flowcharts-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.app-stat-pill {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--surface-alt);
    border: 1px solid var(--border-strong);
    padding: 8px 16px;
    border-radius: 999px;
}

/* Two parallel columns on desktop */
.parallel-flowcharts-grid {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 28px;
    align-items: stretch;
}

.flowchart-column {
    background: var(--surface-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
}

body.style-1 .flowchart-column {
    background: rgba(251, 250, 245, 0.85);
    border: 1px solid var(--border-strong);
}

body.style-2 .flowchart-column {
    background: #f8fafc;
    border-top: 4px solid var(--primary);
}

body.style-3 .flowchart-column {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--border-color);
}

body.style-4 .flowchart-column {
    background: #faf8f2;
    border: 1px solid var(--primary);
}

.flowchart-col-header {
    text-align: center;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border-strong);
}

.flowchart-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--secondary-soft);
    color: var(--secondary);
    margin-bottom: 6px;
}

.flowchart-badge.flowchart-badge-accent {
    background: var(--accent-soft);
    color: var(--accent);
}

.flowchart-col-title {
    font-family: var(--font-heading);
    font-size: 1.32rem;
    color: var(--text-main);
    line-height: 1.25;
}

.flowchart-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Individual Flowchart Node */
.flow-node {
    width: 100%;
    background: var(--surface);
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.flow-node:hover {
    border-color: var(--primary);
}

body.style-1 .flow-node {
    border-color: var(--primary);
    background: #ffffff;
}

body.style-2 .flow-node {
    border-color: #93c5fd;
    border-left: 4px solid var(--primary);
}

body.style-3 .flow-node {
    background: #111c35;
    border: 1px solid var(--primary);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.08);
}

body.style-4 .flow-node {
    border: 1.5px solid var(--primary);
    background: #ffffff;
}

/* Final / Mastery Node Highlight */
.flow-node.flow-node-success {
    border-color: #059669;
    background: rgba(5, 150, 105, 0.06);
}

body.style-3 .flow-node.flow-node-success {
    border-color: #34d399;
    background: rgba(52, 211, 153, 0.10);
}

.flow-node.flow-node-shadow {
    border-color: var(--primary);
    background: var(--secondary-soft);
}

body.style-1 .flow-node.flow-node-shadow {
    background: #eef5fc;
}

.flow-node-title {
    font-weight: 700;
    font-size: 0.96rem;
    color: var(--text-main);
    line-height: 1.35;
}

body.style-4 .flow-node-title {
    font-family: var(--font-heading);
    font-size: 0.94rem;
}

.flow-node-sub {
    font-size: 0.81rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.35;
}

/* SVG Arrow Connectors between nodes */
.flow-connector {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    padding: 2px 0;
}

.flow-connector svg {
    display: block;
}

/* ==========================================================================
   HOMEWORK FLOWCHART: "FOR EACH QUESTION" BOX & FEEDBACK LOOP
   ========================================================================== */
.for-each-question-box {
    width: 100%;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 18px 14px 16px;
    position: relative;
}

body.style-1 .for-each-question-box {
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--primary);
}

body.style-2 .for-each-question-box {
    background: #ffffff;
    border: 2px dashed var(--primary);
}

body.style-3 .for-each-question-box {
    background: rgba(11, 19, 36, 0.65);
    border: 1.5px dashed var(--primary);
}

body.style-4 .for-each-question-box {
    background: #ffffff;
    border: 2px solid var(--accent);
}

.for-each-label {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 12px;
}

/* Loop region holds the 3 nodes on the left and the upward return arrow on the right */
.flow-loop-region {
    display: grid;
    grid-template-columns: 1fr 78px;
    align-items: stretch;
    width: 100%;
}

.flow-loop-nodes {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Right-hand Return Loop Path: starts at AI feedback (bottom) and points back into Attempts question (top) */
.flow-loop-return {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0 26px;
}

.loop-return-rail {
    width: 100%;
    height: 100%;
    border-top: 2.5px solid var(--primary);
    border-right: 2.5px solid var(--primary);
    border-bottom: 2.5px solid var(--primary);
    border-radius: 0 10px 10px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

/* SVG Arrowhead pointing left into "Attempts question" matching the other flowchart arrows */
.loop-arrow-svg {
    position: absolute;
    top: -8.25px;
    left: -1px;
    display: block;
    color: var(--primary);
    pointer-events: none;
}

.loop-return-badge {
    background: var(--surface);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    padding: 5px 6px;
    border-radius: 6px;
    text-align: center;
    max-width: 68px;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

body.style-3 .loop-return-badge {
    background: #111c35;
}

/* ==========================================================================
   OVERALL PROGRESS BRACKET (Tutor and parents can see progress)
   ========================================================================== */
.hw-bracket-layout {
    display: grid;
    grid-template-columns: 1fr 142px;
    gap: 12px;
    align-items: stretch;
    width: 100%;
}

.hw-track-main {
    width: 100%;
}

.hw-overall-bracket {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.bracket-graphic {
    width: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 8px 0;
}

.bracket-arm-top {
    height: 14px;
    border-top: 3px solid var(--primary);
    border-right: 3px solid var(--primary);
    border-top-right-radius: 8px;
}

.bracket-spine {
    flex: 1;
    border-right: 3px solid var(--primary);
    position: relative;
}

/* Midpoint tick on the bracket pointing right to the label card */
.bracket-spine::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -8px;
    width: 8px;
    height: 3px;
    background: var(--primary);
    transform: translateY(-50%);
}

.bracket-arm-bottom {
    height: 14px;
    border-bottom: 3px solid var(--primary);
    border-right: 3px solid var(--primary);
    border-bottom-right-radius: 8px;
}

.bracket-label-card {
    flex: 1;
    align-self: center;
    background: var(--surface);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

body.style-3 .bracket-label-card {
    background: #111c35;
}

.bracket-eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 4px;
}

.bracket-title {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 6px;
}

.bracket-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* ==========================================================================
   WHERE SECTION (MAPS & LOCATION)
   ========================================================================== */
.where-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.where-info-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.map-images-link {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    text-decoration: none;
}

.map-image-box {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
    background: var(--surface-alt);
}

.map-image-box:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.map-image-box img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.map-caption {
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   PRICING & CONTACT FORM SECTION
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 28px;
    align-items: start;
}

.pricing-summary-card,
.contact-form-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

body.style-4 .pricing-summary-card,
body.style-4 .contact-form-card {
    border: 2px solid var(--primary);
}

.rate-box {
    border: 1px solid var(--border-color);
    background: var(--surface-alt);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 16px;
}

.rate-box-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.rate-box-tutor {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.rate-box-price {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.rate-box-subjects {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Form Controls */
.form-group {
    margin-bottom: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.96rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.sent-banner {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    color: var(--text-main);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
}

.sent-banner h3 {
    font-family: var(--font-heading);
    margin-bottom: 8px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border-color);
    background: var(--surface);
    padding: 24px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 920px) {
    .hero-grid,
    .tutors-grid,
    .what-grid,
    .parallel-flowcharts-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    body.style-1::before {
        display: none;
    }
}

@media (max-width: 640px) {
    .style-switcher-bar {
        padding: 6px 10px;
        gap: 6px;
    }

    .style-switcher-label {
        width: 100%;
        text-align: center;
        font-size: 0.72rem;
    }

    .style-switcher-links {
        justify-content: center;
        width: 100%;
    }

    .style-pill {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .header-inner {
        padding: 10px 14px;
        gap: 8px;
    }

    body.style-2 .header-inner {
        padding-bottom: 0;
    }

    .brand-title {
        font-size: 1.45rem;
    }

    .brand-subtitle {
        display: none;
    }

    .main-nav {
        width: 100%;
        justify-content: space-between;
        gap: 4px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .nav-link {
        font-size: 0.82rem;
        padding: 7px 10px;
        white-space: nowrap;
        flex: 1;
        text-align: center;
    }

    body.style-2 .main-nav {
        padding-top: 6px;
        padding-bottom: 0;
        gap: 4px;
    }

    body.style-2 .nav-link {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .container {
        padding: 18px 14px 48px;
    }

    .page-section {
        margin-bottom: 40px;
        scroll-margin-top: 110px;
    }

    .section-title {
        font-size: 1.55rem;
    }

    .section-lead {
        font-size: 0.96rem;
    }

    .hero-card {
        padding: 22px 18px;
        margin-bottom: 32px;
    }

    .hero-title {
        font-size: 1.65rem;
    }

    .hero-description {
        font-size: 0.96rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-summary-box {
        padding: 16px;
    }

    .quick-tier {
        padding: 12px;
    }

    .level-filter-bar {
        padding: 12px 14px;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .filter-btn {
        text-align: center;
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .tutor-card-top {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        padding: 20px 18px 16px;
        gap: 14px;
    }

    .tutor-photo-wrap {
        width: 136px;
        height: 136px;
    }

    .tutor-identity {
        align-items: center;
    }

    .tutor-levels {
        padding: 14px 18px 0;
        justify-content: center;
    }

    .tutor-body {
        padding: 16px 18px 20px;
    }

    .tutor-card-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .tutor-card-footer .btn {
        width: 100%;
    }

    .comparison-card {
        padding: 14px 12px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 10px 8px;
        font-size: 0.84rem;
    }

    .feature-card,
    .flowcharts-showcase,
    .where-card,
    .pricing-summary-card,
    .contact-form-card {
        padding: 20px 14px;
    }

    .flowchart-column {
        padding: 18px 12px;
    }

    .for-each-question-box {
        padding: 14px 10px;
    }

    .flow-node {
        padding: 11px 12px;
    }

    .flow-node-title {
        font-size: 0.9rem;
    }

    .flow-node-sub {
        font-size: 0.76rem;
    }

    .flow-loop-region {
        grid-template-columns: 1fr 64px;
    }

    .loop-return-badge {
        font-size: 0.63rem;
        padding: 4px 4px;
        max-width: 56px;
    }

    /* On mobile phones, turn the side overall bracket into a full-width horizontal bracket bar at the bottom of the homework flowchart */
    .hw-bracket-layout {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .hw-overall-bracket {
        flex-direction: column;
        gap: 6px;
    }

    .bracket-graphic {
        width: 100%;
        height: 16px;
        flex-direction: row;
        margin: 0;
    }

    .bracket-arm-top {
        width: 14px;
        height: 100%;
        border-top: none;
        border-right: none;
        border-left: 3px solid var(--primary);
        border-bottom: 3px solid var(--primary);
        border-radius: 0 0 0 8px;
    }

    .bracket-spine {
        height: 100%;
        border-right: none;
        border-bottom: 3px solid var(--primary);
    }

    .bracket-spine::after {
        top: auto;
        bottom: -8px;
        left: 50%;
        right: auto;
        width: 3px;
        height: 8px;
        transform: translateX(-50%);
    }

    .bracket-arm-bottom {
        width: 14px;
        height: 100%;
        border-bottom: 3px solid var(--primary);
        border-right: 3px solid var(--primary);
        border-radius: 0 0 8px 0;
    }

    .bracket-label-card {
        width: 100%;
        padding: 12px 14px;
    }

    .map-images-link,
    .form-row {
        grid-template-columns: 1fr;
    }

    .map-image-box img {
        height: 200px;
    }

    /* Prevent iOS zoom on input focus by keeping font-size >= 16px */
    .form-control {
        font-size: 16px;
    }
}
