/* === DESIGN TOKENS === */
:root {
    /* Color */
    --bg:              #F6F4EE;
    --surface:         #F6F4EE;
    --surface-hover:   rgba(79, 70, 229, 0.04);
    --text:            #1a1a1a;
    --text-secondary:  #6b6b6b;
    --text-micro:      #9b9693;
    --border:          #e2e0db;
    --border-focus:    #4F46E5;
    --accent:          #4F46E5;
    --accent-hover:    #4338CA;
    --accent-text:     #ffffff;

    /* Status */
    --success:         #2D9B6F;
    --warning:         #C47A1E;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;

    /* Shadow */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.09);

    /* Motion */
    --transition: 150ms ease;

    /* Shell */
    --sidebar-width: 200px;

    /* Legacy aliases — used by existing view styles and templates */
    --bg-color:         var(--bg);
    --text-color:       var(--text);
    --accent-color:     var(--accent);
    --secondary-accent: #4F46E5;
    --error-color:      #c0392b;
    --success-color:    var(--success);
    --border-color:     var(--border);
    --spacing:          1.5rem;
}

/* === BASE === */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 0.9375rem;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* === APP SHELL — MOBILE FIRST (single column) === */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

/* Mobile: compact top header */
header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 0.5rem;
}

header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.brand-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Mobile: horizontal wrapped nav */
#main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

#main-nav button {
    background: none;
    border: none;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
    font-family: inherit;
    min-height: 40px;
    line-height: 1;
    letter-spacing: -0.01em;
}

#main-nav button:hover {
    background: var(--surface-hover);
    color: var(--text);
    opacity: 1;
}

#main-nav button.active {
    background: var(--accent);
    color: var(--accent-text);
}

/* Main content area */
#content {
    flex: 1;
    padding: 1rem;
    overflow-x: hidden;
}

footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    padding: 1rem;
}

/* === DESKTOP SIDEBAR SHELL (≥ 768px) === */
@media (min-width: 768px) {
    #app {
        display: grid;
        grid-template-columns: var(--sidebar-width) 1fr;
        grid-template-rows: 1fr auto;
        grid-template-areas:
            "sidebar content"
            "sidebar footer";
        width: 100%;
        max-width: none;
        margin: 0;
        min-height: 100vh;
    }

    /* Left sidebar panel */
    header {
        grid-area: sidebar;
        border-bottom: none;
        border-right: 1px solid var(--border);
        padding: 2rem 1rem;
        display: flex;
        flex-direction: column;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }

    header h1 {
        margin: 0 0 1.5rem 0;
        font-size: 1.1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border);
    }

    /* Vertical nav stack */
    #main-nav {
        flex-direction: column;
        gap: 0.25rem;
    }

    #main-nav button {
        width: 100%;
        text-align: left;
        padding: 0.5rem 0.75rem;
        min-height: unset;
    }

    /* Right content pane — no narrow cap; views constrain themselves */
    #content {
        grid-area: content;
        padding: 2rem 2.5rem;
        width: 100%;
        max-width: 1400px;
        margin: 0 auto;
    }

    footer {
        grid-area: footer;
        text-align: left;
        padding: 0.75rem 2rem;
    }
}

/* === FORMS === */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.9375rem;
    box-sizing: border-box;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

/* === BUTTONS (global) === */
button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    border-radius: var(--radius-sm);
    letter-spacing: -0.01em;
    transition: opacity var(--transition);
}

button:hover {
    opacity: 0.88;
}

button.secondary {
    background-color: #717171;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === AUTH === */
.auth-container {
    max-width: 380px;
    margin: 2rem auto;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
}

.auth-brand {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-brand h2 {
    margin: 0 0 0.375rem 0;
    font-size: 1.35rem;
    color: var(--accent);
}

.auth-tagline {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.auth-actions {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.auth-actions button {
    width: 100%;
    text-align: center;
}

.form-hint {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.3rem;
    line-height: 1.4;
}

/* === ONBOARDING === */
.onboarding-container {
    max-width: 540px;
    margin: 0 auto;
}

.onboarding-header {
    margin-bottom: 2rem;
}

.onboarding-header h2 {
    margin: 0 0 0.5rem 0;
}

.onboarding-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.onboarding-question {
    margin-bottom: 1.5rem;
}

/* === CALENDAR / TODAY SCHEDULE === */
.calendar-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.calendar-nav-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calendar-date-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.current-date-display {
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 140px;
    text-align: center;
}

.nav-btn {
    padding: 0.4rem 0.8rem;
    font-size: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: var(--surface-hover);
    border-color: var(--text-secondary);
    opacity: 1;
}

.today-btn {
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.plan-meta-compact {
    margin-bottom: 1.5rem;
}

.today-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.today-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

#plan-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.today-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: baseline;
}

.today-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* === TODAY CALENDAR & MODAL === */
.calendar-view {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
    overflow-y: auto;
    height: clamp(520px, calc(100vh - 240px), 800px);
    box-shadow: var(--shadow-sm);
}

.calendar-layout {
    display: flex;
    position: relative;
}

.time-rail {
    width: 64px;
    flex-shrink: 0;
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.time-marker {
    height: 60px; /* 1 hour = 60px */
    font-size: 0.75rem;
    color: var(--text-micro);
    text-align: right;
    padding: 0.5rem 0.6rem 0 0;
    border-bottom: 1px dashed var(--border);
    box-sizing: border-box;
}

.schedule-blocks {
    flex: 1;
    position: relative;
    background-image: linear-gradient(var(--border) 1px, transparent 1px);
    background-size: 100% 60px;
}

.calendar-task-block {
    position: absolute;
    left: 8px;
    right: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.1s ease, box-shadow 0.1s ease, left 0.2s ease, width 0.2s ease;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    user-select: none;
    touch-action: none;
}

.calendar-task-block.dragging {
    opacity: 0.7;
    z-index: 1000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    cursor: grabbing;
    transition: none;
}

.calendar-task-block.resizing {
    opacity: 0.9;
    z-index: 1000;
    cursor: ns-resize;
    transition: none;
}

.resize-handle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
    background: transparent;
    z-index: 10;
}

.resize-handle:hover {
    background: rgba(0,0,0,0.05);
}

.calendar-task-block.completed { border-left-color: var(--success-color); opacity: 0.85; }
.calendar-task-block.skipped { border-left-color: #c5c0b8; opacity: 0.75; }

.duration-display {
    padding: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.calendar-task-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-task-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.calendar-task-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.4rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* Hide block actions if height is too small (e.g. < 60px) */
@media (min-height: 0px) {
    .calendar-task-block {
        container-type: size;
    }
}

@container (max-height: 58px) {
    .calendar-task-actions {
        display: none !important;
    }
    .calendar-task-time {
        font-size: 0.7rem;
    }
}

.calendar-task-block:hover .calendar-task-actions {
    opacity: 1;
}

/* === MODAL ACTIONS === */
.modal-status-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-status-actions button {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.5rem;
}

.btn-done {
    background-color: var(--success-color);
}

.btn-skip {
    background-color: #c5c0b8;
}

.calendar-task-actions button {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    min-height: 24px;
    min-width: 44px;
}

/* === UNSCHEDULED SECTION === */
.unscheduled-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.unscheduled-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
}

.unscheduled-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.unscheduled-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.unscheduled-task-item:hover {
    background: var(--surface-hover);
}

.unscheduled-task-info h4 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.unscheduled-task-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.unscheduled-task-actions {
    display: flex;
    gap: 0.5rem;
}

/* === MODAL === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.45);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 420px;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modal-content h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    color: var(--accent);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

@media (max-width: 767px) {
    .calendar-task-actions {
        opacity: 1;
    }
}

/* === PROGRESS DASHBOARD === */
.progress-dashboard {
    width: 100%;
}

.progress-header {
    margin-bottom: 2rem;
}

.progress-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.progress-subtitle {
    margin: 0.25rem 0 0 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.progress-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.progress-card h3 {
    margin: 0 0 1.25rem 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.progress-card--main {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .progress-card--full {
        grid-column: 1 / -1;
    }
}

.progress-stat-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.progress-stat-main {
    display: flex;
    flex-direction: column;
}

.progress-big-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
}

.progress-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.progress-stat-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-detail {
    display: flex;
    flex-direction: column;
}

.stat-detail strong {
    font-size: 1.1rem;
    font-weight: 600;
}

.stat-detail span {
    font-size: 0.75rem;
    color: var(--text-micro);
}

.progress-quote {
    margin: auto 0 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.progress-stat-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.progress-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 6px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.progress-status-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Weekly Rhythm Bars */
.daily-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 140px;
    gap: 0.5rem;
}

.daily-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.daily-label {
    font-size: 0.75rem;
    color: var(--text-micro);
}

.daily-bar-container {
    width: 100%;
    background: var(--bg);
    height: 100px;
    border-radius: 3px;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.daily-bar {
    width: 100%;
    background: var(--border);
    transition: height 0.3s ease, background 0.3s ease;
}

.daily-bar.active {
    background: var(--accent);
}

.daily-count {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Momentum Grid */
.momentum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.momentum-item {
    display: flex;
    flex-direction: column;
}

.momentum-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.momentum-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.placeholder-box {
    border: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    margin-top: 2rem;
    border-radius: var(--radius-md);
    background: #fff;
}

.placeholder-box h3 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: var(--text);
}

.placeholder-box p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.placeholder-box p:last-child {
    margin-bottom: 0;
}

/* === COACH WORKSPACE === */
.coach-workspace {
    display: flex;
    flex-direction: column;
}

.coach-sessions-sidebar {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    max-height: 160px;
    overflow-y: auto;
    flex-shrink: 0;
}

.coach-new-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    flex-shrink: 0;
    margin-bottom: 0.75rem;
    width: 100%;
    transition: background var(--transition), border-color var(--transition);
}

.coach-new-btn:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    color: var(--accent);
    opacity: 1;
}

.coach-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.coach-session-item {
    display: flex;
    flex-direction: column;
    padding: 0.45rem 0.625rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    transition: background var(--transition), border-color var(--transition);
}

.coach-session-item:hover {
    background: var(--surface-hover);
}

.coach-session-item.active {
    border-left-color: var(--accent);
    background: rgba(79, 70, 229, 0.05);
}

.coach-session-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coach-session-item.active .coach-session-title {
    color: var(--accent);
    font-weight: 600;
}

.coach-session-ts {
    font-size: 0.75rem;
    color: var(--text-micro);
    display: block;
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coach-main {
    display: flex;
    flex-direction: column;
    height: calc(100svh - 22rem);
    min-height: 280px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.coach-header {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.coach-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
}

.coach-thread {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.coach-empty {
    margin: auto;
    text-align: center;
    color: var(--text-secondary);
    padding: 1.5rem 1rem;
}

.coach-empty p {
    margin: 0 0 0.375rem;
    font-size: 0.9375rem;
}

.coach-empty p:last-child {
    margin-bottom: 0;
}

.coach-message {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 88%;
}

.coach-message-user {
    align-self: flex-end;
    align-items: flex-end;
}

.coach-message-assistant {
    align-self: flex-start;
    align-items: flex-start;
}

.coach-message-label {
    font-size: 0.75rem;
    color: var(--text-micro);
    font-weight: 500;
    padding: 0 0.2rem;
}

.coach-bubble {
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    line-height: 1.55;
    word-break: break-word;
}

.coach-message-user .coach-bubble {
    background: var(--accent);
    color: var(--accent-text);
}

.coach-message-assistant .coach-bubble {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--border);
}

.coach-composer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--surface);
}

.coach-composer #coach-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9375rem;
    background: #ffffff;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    min-height: 40px;
    box-sizing: border-box;
}

.coach-composer #coach-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.coach-composer #btn-coach-send {
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--transition);
    min-height: 40px;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
}

.coach-composer #btn-coach-send:hover {
    opacity: 0.88;
}

.coach-composer #btn-coach-send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.coach-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0.25rem 1rem 0.375rem;
    flex-shrink: 0;
    min-height: 1em;
}

/* Coach prompt chips */
.coach-chips {
    display: flex;
    gap: 0.4rem;
    padding: 0.5rem 1rem 0;
    flex-wrap: wrap;
    flex-shrink: 0;
    border-top: 1px solid var(--border);
}

.coach-chip {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}

.coach-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(79, 70, 229, 0.04);
    opacity: 1;
}

/* Coach header subtitle */
.coach-header-sub {
    margin: 0.125rem 0 0 0;
    font-size: 0.78rem;
    color: var(--text-micro);
    font-weight: 400;
}

/* Beta badge (header) */
.header-beta {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 99px;
    padding: 0.15rem 0.45rem;
    vertical-align: middle;
    margin-left: 0.3rem;
    line-height: 1.6;
}

/* Calendar empty state */
#plan-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

#plan-empty p {
    margin: 0 0 1.25rem 0;
    font-size: 1rem;
    line-height: 1.55;
}

#plan-empty button {
    font-size: 0.9375rem;
}

/* Improved calendar block hover */
.calendar-task-block:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 6;
}

/* === CONTEXT GUIDANCE TIP === */
.context-tip {
    margin-top: 0.625rem;
    padding: 0.6rem 0.875rem;
    background: rgba(79, 70, 229, 0.04);
    border: 1px solid rgba(79, 70, 229, 0.14);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.context-tip-label {
    display: inline-block;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent);
    margin-right: 0.45rem;
}


@media (min-width: 768px) {
    .coach-workspace {
        flex-direction: row;
        height: calc(100vh - 7rem);
        min-height: 460px;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

    .coach-sessions-sidebar {
        width: 200px;
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid var(--border);
        padding: 1.25rem 1rem;
        margin-bottom: 0;
        max-height: none;
        overflow-y: auto;
    }

    .coach-new-btn {
        margin-bottom: 0.875rem;
    }

    .coach-main {
        flex: 1;
        border: none;
        border-radius: 0;
        box-shadow: none;
        height: 100%;
        min-height: 0;
    }

    .coach-message {
        max-width: 72%;
    }
}

/* === NOTES WORKSPACE === */
.notes-workspace {
    display: flex;
    flex-direction: column;
}

/* Mobile: sidebar capped so editor is reachable */
.notes-sidebar {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    max-height: 200px;
    overflow-y: auto;
    flex-shrink: 0;
}

.notes-new-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    flex-shrink: 0;
    margin-bottom: 0.875rem;
    transition: background var(--transition), border-color var(--transition);
}

.notes-sidebar .notes-new-btn {
    width: 100%;
}

.notes-new-btn:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    color: var(--accent);
    opacity: 1;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.note-page-item {
    display: flex;
    flex-direction: column;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    transition: background var(--transition), border-color var(--transition);
}

.note-page-item:hover {
    background: var(--surface-hover);
}

.note-page-item.active {
    border-left-color: var(--accent);
    background: rgba(79, 70, 229, 0.05);
}

.note-page-item strong {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-page-item.active strong {
    color: var(--accent);
    font-weight: 600;
}

.page-date {
    font-size: 0.75rem;
    color: var(--text-micro);
    display: block;
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-page-item.active .page-date {
    color: var(--text-secondary);
}

/* Editor panel — flex child of workspace */
.notes-editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.notes-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.notes-empty-state p {
    margin: 0 0 0.375rem;
}

.notes-empty-state p:last-of-type {
    margin-bottom: 1rem;
}

.notes-empty-state .notes-new-btn {
    width: auto;
    margin-bottom: 0;
}

.notes-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.notes-title {
    width: 100%;
    font-size: 1.25rem;
    font-weight: 700;
    border: none;
    border-bottom: 1px solid var(--border);
    outline: none;
    padding: 0 0 0.625rem 0;
    margin: 0 0 0.875rem 0;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    line-height: 1.3;
    box-sizing: border-box;
    transition: border-color var(--transition);
    flex-shrink: 0;
}

.notes-title:focus {
    border-bottom-color: var(--border-focus);
}

.notes-title[readonly] {
    cursor: default;
}
.notes-body {
    width: 100%;
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.7;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
}

.notes-ai-toggle {
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: var(--radius-sm, 6px);
}
.notes-ai-toggle label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}
.notes-ai-hint {
    margin: 0.25rem 0 0 1.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
    font-family: inherit;
    resize: none;
    padding: 0;
    min-height: 250px;
    box-sizing: border-box;
}

.notes-body[readonly] {
    cursor: default;
}

.notes-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.notes-btn-save {
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.45rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: opacity var(--transition);
    flex-shrink: 0;
}

.notes-btn-save:hover { opacity: 0.88; }
.notes-btn-save:disabled { opacity: 0.45; cursor: not-allowed; }

.notes-btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 0.45rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition), color var(--transition);
    flex-shrink: 0;
}

.notes-btn-ghost:hover {
    background: var(--accent);
    color: var(--accent-text);
    opacity: 1;
}

.notes-btn-delete {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    font-family: inherit;
    transition: color var(--transition), border-color var(--transition);
    margin-left: auto;
    flex-shrink: 0;
}

.notes-btn-delete:hover {
    color: var(--error-color);
    border-color: var(--error-color);
    opacity: 1;
}

@media (min-width: 768px) {
    .notes-workspace {
        flex-direction: row;
        height: calc(100vh - 7rem);
        min-height: 460px;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

    .notes-sidebar {
        width: 220px;
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid var(--border);
        padding: 1.25rem 1rem;
        margin-bottom: 0;
        max-height: none;
        overflow-y: auto;
    }

    .notes-editor-panel {
        padding: 1.5rem 2rem;
        overflow-y: auto;
        min-height: 0;
    }

    .notes-editor {
        max-width: 780px;
    }

    .notes-body {
        min-height: 0;
    }

    .notes-empty-state {
        padding: 2rem 0;
    }
}

/* === MESSAGES === */
#loading {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.35rem 0.75rem;
    z-index: 9000;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    pointer-events: none;
}
#error { color: var(--error-color); padding: 1rem; border: 1px solid var(--error-color); margin-bottom: 1rem; background: #fff5f5; }
.success-notice {
    color: var(--success-color);
    padding: 1rem;
    border: 1px solid var(--success-color);
    margin-bottom: 1rem;
    background: #f5fff5;
    text-align: center;
}

/* Notes editability hint */
.notes-actions::before {
    content: "Editable anytime - changes enable Save";
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-right: auto;
    align-self: center;
}


/* === PROGRESS DASHBOARD HARDENED RENDER === */
.progress-container {
    width: 100%;
}

.progress-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.progress-page-header h2 {
    margin: 0;
}

.progress-range-label,
.progress-muted {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.45;
}

.progress-dashboard {
    display: block !important;
    width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
}

.progress-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}

.progress-card {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    min-height: 120px;
}

.progress-card h3 {
    margin: 0 0 0.9rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.progress-card-main {
    border-left: 4px solid var(--accent);
}

.progress-card-wide {
    grid-column: 1 / -1;
}

.progress-big-number {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.progress-metric-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.progress-metric-row span {
    color: var(--text-secondary);
}

.progress-metric-row strong {
    color: var(--text);
}

.progress-rhythm-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.progress-day-card {
    min-width: 0;
    text-align: center;
}

.progress-day-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.progress-day-bar {
    height: 86px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.progress-day-fill {
    width: 100%;
    min-height: 3px;
    background: var(--accent);
    border-radius: 999px;
    transition: height 0.2s ease;
}

.progress-day-count {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.progress-empty-card {
    background: var(--bg);
}

@media (max-width: 700px) {
    .progress-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .progress-rhythm-grid {
        gap: 0.45rem;
    }

    .progress-card {
        padding: 1rem;
    }
}

.profile-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.settings-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Profile selects inherit from .form-group select */

.profile-container .actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .profile-container {
        padding: 1rem;
    }
}

/* === CALENDAR ACTION ROW === */
.calendar-action-row {
    margin-bottom: 0.75rem;
}

/* === DANGER BUTTON === */
.btn-danger {
    background-color: var(--error-color) !important;
    color: #fff !important;
    font-size: 0.875rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: opacity var(--transition);
}

.btn-danger:hover {
    opacity: 0.85;
}

/* === MODAL DELETE ZONE === */
.modal-delete-zone {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-start;
}

/* === HOURS + MINUTES FIELD === */
.form-row-hm {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.form-hm-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 120px;
}

.form-hm-field input {
    width: 100%;
}

.form-sublabel {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* === LANDING PAGE v2 (lp-* prefix) === */

/* Boot: hide shell until first view is committed — prevents flash of unstyled header */
body.booting #app { visibility: hidden; }

/* Shell overrides when landing view is active */
body.landing-active #app > header { display: none !important; }
body.landing-active #app > footer { display: none !important; }
body.landing-active #app { display: block !important; }
body.landing-active #content {
    padding: 0 !important;
    max-width: none !important;
    margin: 0 !important;
}

.onboarding-note {
    background: var(--bg-secondary, #f5f5f5);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    margin-bottom: 2rem;
}
.onboarding-note h4 { margin-top: 0; margin-bottom: 0.5rem; }
body.auth-active #main-nav,
body.onboarding-active #main-nav { display: none !important; }

@media (min-width: 768px) {
    body.auth-active #app,
    body.onboarding-active #app {
        display: grid !important;
        grid-template-columns: var(--sidebar-width) 1fr !important;
        grid-template-rows: 1fr auto !important;
        grid-template-areas:
            "sidebar content"
            "sidebar footer" !important;
    }
    body.auth-active #content,
    body.onboarding-active #content {
        grid-area: content !important;
    }
}

/* Root container */
.lp-root {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
}

/* Shared container */
.lp-container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Scroll anchor offset for sticky nav */
#lp-how, #lp-pricing, #lp-contact {
    scroll-margin-top: 72px;
}

/* === NAV === */
.lp-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 244, 238, 0.93);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.lp-nav-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 60px;
}

.lp-brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.lp-brand-icon { width: 22px; height: 22px; object-fit: contain; }

.lp-brand-badge {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.18);
    border-radius: 99px;
    padding: 0.1rem 0.38rem;
    vertical-align: middle;
    margin-left: 0.15rem;
    line-height: 1.7;
}

.lp-badge-dim {
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.14);
}

.lp-nav-links {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.125rem;
    flex: 1;
}

.lp-nav-links a {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.lp-nav-links a:hover { color: var(--text); background: var(--surface-hover); }

.lp-nav-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* Buttons */
.lp-btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    letter-spacing: -0.01em;
    transition: opacity var(--transition);
    white-space: nowrap;
}

.lp-btn-primary:hover { opacity: 0.88; }
.lp-btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lp-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    letter-spacing: -0.01em;
    transition: border-color var(--transition), color var(--transition);
    white-space: nowrap;
}

.lp-btn-ghost:hover { border-color: var(--text); color: var(--text); opacity: 1; background: transparent; }
.lp-btn-ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lp-btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9375rem; }
.lp-btn-xl { padding: 0.875rem 2rem; font-size: 1rem; }

/* === HERO === */
.lp-hero { padding: 4.5rem 0 4rem; }

.lp-hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.lp-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 1.125rem 0;
}

.lp-h1 {
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: var(--text);
    margin: 0 0 1.25rem 0;
}

.lp-sub {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 2rem 0;
    max-width: 420px;
}

.lp-cta-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.375rem;
}

.lp-microtrust {
    font-size: 0.775rem;
    color: var(--text-micro);
    margin: 0;
    line-height: 1.5;
}

/* Hero mockup */
.lp-hero-visual { display: flex; justify-content: center; }

.lp-mockup {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
    width: 100%;
    max-width: 380px;
}

.lp-mockup-bar {
    background: #f3f2ef;
    border-bottom: 1px solid var(--border);
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lp-mockup-dots { display: flex; gap: 0.3rem; flex-shrink: 0; }
.lp-mockup-dots span { display: block; width: 10px; height: 10px; border-radius: 50%; background: #d0cdc8; }

.lp-mockup-title-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex: 1;
    text-align: center;
    margin-right: 1.5rem;
}

.lp-mockup-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.lp-mock-goal-area {
    background: #fdf9f5;
    border: 1px solid #ede5d8;
    border-radius: 6px;
    padding: 0.75rem 0.875rem;
}

.lp-mock-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-micro);
    margin-bottom: 0.35rem;
}

.lp-mock-goal-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
    font-style: italic;
}

.lp-mock-divider {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent);
    text-align: center;
}

.lp-mock-blocks { display: flex; flex-direction: column; gap: 0.3rem; }

.lp-mock-block {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.45rem 0.625rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
}

.lp-mock-time {
    font-size: 0.635rem;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.lp-mock-task {
    font-size: 0.775rem;
    font-weight: 500;
    color: var(--text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-mock-coach-area {
    background: rgba(79, 70, 229, 0.04);
    border: 1px solid rgba(79, 70, 229, 0.14);
    border-radius: 6px;
    padding: 0.75rem 0.875rem;
}

.lp-mock-coach-text {
    font-size: 0.8rem;
    color: var(--accent);
    margin: 0;
    line-height: 1.45;
    font-weight: 500;
}

/* === TRUST STRIP === */
.lp-trust-strip {
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.875rem 0;
}

.lp-trust-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: center;
}

.lp-trust-items span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* === SECTION BASE === */
.lp-section { padding: 4.5rem 0; }

.lp-h2 {
    font-size: clamp(1.625rem, 3.5vw, 2.375rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin: 0 0 2.5rem 0;
}

/* === PROBLEM === */
.lp-problem-section { background: var(--bg); }

.lp-problem-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.lp-problem-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.375rem;
}

.lp-problem-card strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.lp-problem-card p { margin: 0; font-size: 0.875rem; color: var(--text-secondary); line-height: 1.55; }

/* === HOW IT WORKS === */
.lp-how-section { background: #fff; }

.lp-how-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }

.lp-how-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.625rem;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.lp-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent);
    flex-shrink: 0;
}

.lp-how-visual {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 0.75rem 0.875rem;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
}

.lp-mini-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-micro);
    margin-bottom: 0.2rem;
}

.lp-mini-goal-text {
    font-size: 0.775rem;
    color: var(--text-secondary);
    line-height: 1.4;
    font-style: italic;
}

.lp-mini-sched-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: 3px;
}

.lp-mini-t {
    font-size: 0.6rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.lp-mini-k {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-mini-coach-msg {
    font-size: 0.775rem;
    color: var(--accent);
    font-weight: 500;
    line-height: 1.45;
    padding: 0.5rem 0.625rem;
    background: rgba(79, 70, 229, 0.04);
    border: 1px solid rgba(79, 70, 229, 0.14);
    border-radius: 4px;
}

.lp-how-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0; letter-spacing: -0.01em; }
.lp-how-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.55; margin: 0; }

/* === FEATURES === */
.lp-features-section { background: var(--bg); }

.lp-features-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

.lp-feat-card {
    display: flex;
    align-items: flex-start;
    gap: 1.125rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.375rem;
}

.lp-feat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(79, 70, 229, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.1);
    color: var(--accent);
    flex-shrink: 0;
}

.lp-feat-text h3 { font-size: 0.9375rem; font-weight: 700; color: var(--text); margin: 0 0 0.375rem 0; letter-spacing: -0.01em; }
.lp-feat-text p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.55; margin: 0; }

/* === AUDIENCE === */
.lp-audience-section { background: #fff; }

.lp-audience-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

.lp-aud-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.375rem;
    background: var(--bg);
}

.lp-aud-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0 0 0.5rem 0; letter-spacing: -0.01em; }
.lp-aud-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.55; margin: 0; }

/* === CONTROL === */
.lp-control-section {
    background: rgba(79, 70, 229, 0.03);
    border-top: 1px solid rgba(79, 70, 229, 0.07);
    border-bottom: 1px solid rgba(79, 70, 229, 0.07);
}

.lp-control-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.875rem;
}

.lp-control-list li {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.5;
    padding-left: 1.5rem;
    position: relative;
}

.lp-control-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* === PRICING === */
.lp-pricing-section { background: var(--bg); }

.lp-pricing-note { font-size: 0.9375rem; color: var(--text-secondary); margin: -1.75rem 0 2rem 0; line-height: 1.5; }

.lp-pricing-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; max-width: 640px; }

.lp-price-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.lp-price-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0 0 0.5rem 0; }
.lp-price-status { font-size: 0.875rem; color: var(--text-secondary); margin: 0; }
.lp-price-featured { border-color: var(--accent); }
.lp-price-dim h3 { color: var(--text-secondary); }

/* === CONTACT === */
.lp-contact-section { background: #fff; }
.lp-contact-inner { max-width: 640px; }

.lp-contact-section p { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.65; margin: 0 0 1rem 0; }

.lp-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.lp-link:hover { text-decoration: underline; }

/* === FAQ === */
.lp-faq-section { background: var(--bg); }

.lp-faq-list { max-width: 720px; }

.lp-faq-item { border-bottom: 1px solid var(--border); }
.lp-faq-item:first-child { border-top: 1px solid var(--border); }

.lp-faq-item summary {
    padding: 1.125rem 0;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    letter-spacing: -0.01em;
}

.lp-faq-item summary::-webkit-details-marker { display: none; }

.lp-faq-item summary::after {
    content: "+";
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-left: 1rem;
}

.lp-faq-item[open] summary::after { content: "−"; }

.lp-faq-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 1.125rem 0;
    padding-right: 2rem;
}

/* === FINAL CTA === */
.lp-final-section {
    background: var(--text);
    padding: 5rem 0;
}

.lp-final-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
}

.lp-final-h2 {
    font-size: clamp(1.625rem, 3.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0;
}

.lp-final-micro { font-size: 0.825rem; color: rgba(255,255,255,0.45); margin: 0; line-height: 1.5; }

/* === FOOTER === */
.lp-footer {
    background: var(--text);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 1.5rem 0;
}

.lp-footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.lp-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    letter-spacing: -0.02em;
}

.lp-footer-icon { width: 18px; height: 18px; object-fit: contain; opacity: 0.65; }

.lp-footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.lp-footer-links a {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color var(--transition);
}

.lp-footer-links a:hover { color: rgba(255,255,255,0.75); }

.lp-footer-copy { font-size: 0.775rem; color: rgba(255,255,255,0.3); margin: 0; }

/* === LANDING RESPONSIVE === */
@media (min-width: 600px) {
    .lp-problem-grid { grid-template-columns: 1fr 1fr; }
    .lp-features-grid { grid-template-columns: 1fr 1fr; }
    .lp-audience-grid { grid-template-columns: 1fr 1fr; }
    .lp-pricing-grid { grid-template-columns: repeat(3, 1fr); }
    .lp-control-list { grid-template-columns: 1fr 1fr; }
    .lp-nav-links { display: flex; }
    .lp-container { padding: 0 1.75rem; }
}

@media (min-width: 900px) {
    .lp-hero { padding: 6rem 0 5rem; }
    .lp-hero-inner { grid-template-columns: 52% 1fr; gap: 4rem; }
    .lp-how-grid { grid-template-columns: repeat(3, 1fr); }
    .lp-mockup { max-width: none; }
    .lp-container { padding: 0 2rem; }
    .lp-sub { max-width: 400px; }
}

@media (max-width: 380px) {
    .lp-nav-cta .lp-btn-ghost { display: none; }
    .lp-h1 { font-size: 2rem; }
}

/* === MOBILE OVERRIDES (≤ 480px) === */
@media (max-width: 480px) {
    .modal-content {
        padding: 1.25rem 1rem;
        width: 96%;
    }

    /* Stack modal time row */
    .modal-content .form-row {
        flex-direction: column;
        gap: 0;
    }

    .auth-container {
        margin: 1rem auto;
        padding: 2rem 1.25rem;
    }
}

/* === REQUEST BETA ACCESS === */
.rb-root {
    max-width: 640px;
    margin: 0 auto;
    padding: 2.5rem 1rem 5rem;
}

.rb-eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.rb-h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.rb-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.rb-explain {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.rb-trust-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.rb-trust-list li {
    padding: 0.2rem 0;
}

.rb-trust-list li::before {
    content: '—';
    margin-right: 0.5rem;
    color: var(--accent);
    opacity: 0.7;
}

.rb-form {
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.rb-required {
    color: var(--warning);
    margin-left: 2px;
    font-weight: 600;
}

.rb-optional {
    font-size: 0.78rem;
    color: var(--text-micro);
    margin-left: 4px;
    font-weight: 400;
}

.rb-form-error {
    padding: 0.75rem 1rem;
    background: rgba(192, 57, 43, 0.07);
    border: 1px solid rgba(192, 57, 43, 0.25);
    border-radius: var(--radius-sm);
    color: #c0392b;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.rb-submit-row {
    margin-top: 1.75rem;
}

.rb-btn-submit {
    display: block;
    width: 100%;
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    font-family: inherit;
    transition: background var(--transition);
}

.rb-btn-submit:hover:not(:disabled) {
    background: var(--accent-hover);
}

.rb-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rb-already-have {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.rb-btn-secondary {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
    padding: 0;
    font-family: inherit;
    transition: color var(--transition);
}

.rb-btn-secondary:hover {
    color: var(--text);
}

.rb-success-container {
    max-width: 480px;
    margin: 5rem auto;
    text-align: center;
    padding: 1rem;
}

.rb-success-inner {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.rb-success-inner h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.rb-success-inner p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.rb-btn-return {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
    transition: background var(--transition);
}

.rb-btn-return:hover {
    background: var(--surface-hover);
}

@media (max-width: 480px) {
    .rb-root {
        padding: 1.5rem 1rem 4rem;
    }

    .rb-h1 {
        font-size: 1.25rem;
    }
}

/* Landing page link-style CTA button */
.lp-btn-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
    padding: 0;
    font-family: inherit;
    transition: color var(--transition);
}

.lp-btn-link:hover {
    color: var(--text);
}

.back-home-row {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
}

/* Tertiary CTA line below hero buttons */
.lp-cta-tertiary {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
}

/* Secondary link below final CTA button */
.lp-final-secondary {
    margin: 1rem 0 0;
    font-size: 0.875rem;
}

/* Waitlist → beta path nudge */
.lw-beta-path {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.lw-beta-path p {
    margin-bottom: 0.4rem;
}

