/* ─── RowSplit Design System ─────────────────────────────────────── */

:root {
    --color-bg: #f5f6f8;
    --color-white: #ffffff;
    --color-text: #1a1a2e;
    --color-text-light: #6b7280;
    --color-text-muted: #9ca3af;
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-primary-light: #dbeafe;
    --color-strava: #fc4c02;
    --color-strava-dark: #e04400;
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-border: #e5e7eb;
    --color-row-alt: #f9fafb;
    --color-speed: #0891b2;
    --color-hr: #ef4444;
    --color-shark: #1e3a5f;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --transition: 0.2s ease;
    --max-width: 860px;
}

/* ─── Reset & Base ──────────────────────────────────────────────── */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ─── Header ────────────────────────────────────────────────────── */

.header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-user {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.nav-link {
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color var(--transition);
}

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

/* ─── Main ──────────────────────────────────────────────────────── */

.main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
    width: 100%;
    flex: 1;
}

/* ─── Hero ──────────────────────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 40px 0 16px;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--color-text-light);
    max-width: 500px;
    margin: 0 auto;
}

/* ─── Stats Banner ──────────────────────────────────────────────── */

.stats-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0 16px;
}

.stats-banner-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.stats-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stats-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.stats-dot {
    color: var(--color-text-muted);
    font-size: 1.2rem;
}

.stats-chart-card {
    padding: 16px 20px;
    margin-bottom: 20px;
}

/* ─── Cards ─────────────────────────────────────────────────────── */

.card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Connect Card ──────────────────────────────────────────────── */

.connect-card {
    text-align: center;
    padding: 48px 28px;
}

.connect-content h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.connect-content p {
    color: var(--color-text-light);
    margin-bottom: 24px;
}

/* ─── Buttons ───────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-strava {
    background: var(--color-strava);
    color: white;
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-strava:hover {
    background: var(--color-strava-dark);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--color-white);
    color: var(--color-error);
    border: 1px solid var(--color-error);
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-danger:hover {
    background: #fef2f2;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition);
}

.btn-icon:hover {
    color: var(--color-error);
    background: #fef2f2;
}

.btn-row {
    display: flex;
    gap: 12px;
}

.btn-row .btn-primary {
    flex: 1;
}

.btn-shark {
    background: var(--color-shark);
    color: white;
    padding: 14px 20px;
    font-size: 1rem;
    white-space: nowrap;
}

.btn-shark:hover {
    background: #152d4a;
    box-shadow: var(--shadow-md);
}

.btn-great {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: 50px;
    width: auto;
    margin: 0 auto;
    display: block;
    transition: all 0.3s ease;
}

.btn-great:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ─── Forms ─────────────────────────────────────────────────────── */

.form-card {
    padding: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--color-white);
    color: var(--color-text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-group textarea {
    resize: vertical;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.8rem;
}

.form-row {
    display: flex;
    gap: 16px;
}

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

.toggle-group {
    display: flex;
    gap: 0;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.toggle-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.toggle-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-option span {
    display: block;
    padding: 10px 16px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-light);
    transition: all var(--transition);
    border-right: 1px solid var(--color-border);
}

.toggle-option:last-child span {
    border-right: none;
}

.toggle-option input:checked+span {
    background: var(--color-primary);
    color: white;
}

.hidden {
    display: none !important;
}

.inline-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.input-sm {
    padding: 8px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: inherit;
    width: 180px;
}

.input-inline {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
}

.create-group-form {
    display: flex;
    gap: 12px;
}

/* ─── Spinner ───────────────────────────────────────────────────── */

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Features ──────────────────────────────────────────────────── */

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 32px 0;
}

.feature {
    text-align: center;
    padding: 24px 16px;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.feature h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* ─── Flash Messages ────────────────────────────────────────────── */

.flash-messages {
    margin-bottom: 16px;
}

.flash {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 8px;
    animation: fadeInUp 0.3s ease;
}

.flash-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ─── Results Page ──────────────────────────────────────────────── */

.results-header {
    margin-bottom: 24px;
}

.back-link {
    font-size: 0.875rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 8px;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--color-primary-dark);
}

.activity-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.activity-meta {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-top: 4px;
}

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

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

/* ─── Action Bar ────────────────────────────────────────────────── */

.action-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.save-group-dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    z-index: 50;
    margin-top: 4px;
    overflow: hidden;
}

.dropdown-form {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--transition);
}

.dropdown-item:hover {
    background: var(--color-bg);
}

.dropdown-item-new {
    color: var(--color-primary);
    font-weight: 500;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 0;
}

.dropdown-input {
    width: calc(100% - 24px);
    margin: 8px 12px 4px;
    padding: 8px 10px;
    border: 1.5px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
}

.dropdown-form-new {
    padding-bottom: 4px;
}

/* ─── Summary Card ──────────────────────────────────────────────── */

.summary-card {
    padding: 32px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.overall-avg {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-value small {
    font-size: 0.65em;
    font-weight: 400;
    color: var(--color-text-light);
    margin-left: 2px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

/* ─── Data Tables ───────────────────────────────────────────────── */

.table-wrap {
    overflow-x: auto;
    margin: 0 -8px;
    padding: 0 8px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--color-border);
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
}

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

.data-table tbody tr:hover {
    background: var(--color-row-alt);
}

.data-table-compact {
    font-size: 0.85rem;
}

.data-table-compact td,
.data-table-compact th {
    padding: 8px 12px;
}

.speed-cell {
    font-weight: 600;
    color: var(--color-speed);
    font-variant-numeric: tabular-nums;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.85rem;
}

.rank-badge-sm {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
}

.clickable-row {
    cursor: pointer;
}

/* ─── Split Sections ────────────────────────────────────────────── */

.split-section {
    border-bottom: 1px solid var(--color-border);
}

.split-section:last-child {
    border-bottom: none;
}

.split-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: color var(--transition);
}

.split-toggle:hover {
    color: var(--color-primary);
}

.split-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.split-summary {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

.split-toggle-icon {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    transition: transform var(--transition);
}

.split-section.open .split-toggle-icon {
    transform: rotate(180deg);
}

.split-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.split-section.open .split-content {
    max-height: 800px;
    padding-bottom: 16px;
}

/* ─── Charts ────────────────────────────────────────────────────── */

.chart-container {
    margin-bottom: 24px;
}

.chart-container:last-child {
    margin-bottom: 0;
}

.chart-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.chart-container canvas {
    max-height: 200px;
}

/* ─── Did I Do Great ────────────────────────────────────────────── */

.did-great-card {
    text-align: center;
    padding: 32px;
    overflow: hidden;
}

.great-result {
    animation: greatReveal 0.6s ease forwards;
}

@keyframes greatReveal {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.great-message {
    padding: 24px;
}

.great-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 12px;
    animation: bounce 0.6s ease infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-10px);
    }
}

.great-message h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.great-message p {
    color: var(--color-text-light);
    font-size: 1rem;
}

/* ─── Modal ─────────────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-body {
    padding: 24px;
}

.modal-desc {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.badge-experimental {
    background: var(--color-warning);
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-shark {
    font-size: 0.85rem;
}

.shark-instructions {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.shark-steps-list {
    padding-left: 20px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.shark-steps-list li {
    margin-bottom: 4px;
}

.shark-steps-list kbd {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.8rem;
}

.shark-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    color: #991b1b;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

/* Shark Method Sections */

.shark-method {
    margin-bottom: 16px;
}

.shark-method-primary {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    padding: 16px;
}

.shark-method-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.shark-method-desc {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.bookmarklet-container {
    text-align: center;
    margin-bottom: 12px;
}

.btn-bookmarklet {
    cursor: grab;
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-bookmarklet:active {
    cursor: grabbing;
}

.bookmarklet-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 6px;
}

.shark-divider {
    text-align: center;
    position: relative;
    margin: 16px 0;
}

.shark-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--color-border);
}

.shark-divider span {
    background: var(--color-white);
    padding: 0 12px;
    position: relative;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.shark-help {
    margin-bottom: 12px;
}

.shark-help summary {
    font-size: 0.85rem;
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 8px;
}

.shark-help summary:hover {
    text-decoration: underline;
}

/* Privacy Page */

.privacy-content h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 24px 0 12px;
}

.privacy-content h2:first-child {
    margin-top: 0;
}

.privacy-content p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.privacy-list {
    list-style: none;
    padding: 0;
}

.privacy-list li {
    font-size: 0.9rem;
    padding: 4px 0;
    color: var(--color-text-light);
}

/* ─── Groups ────────────────────────────────────────────────────── */

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.group-card {
    text-decoration: none;
    color: inherit;
    transition: box-shadow var(--transition), transform var(--transition);
    cursor: pointer;
}

.group-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.group-name {
    font-size: 1.05rem;
    font-weight: 600;
}

.group-count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.group-latest {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 8px;
}

.group-actions {
    margin-top: 8px;
}

/* ─── Empty State ───────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-light);
}

.empty-state p:first-child {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

/* ─── Reanalyze & Footer ────────────────────────────────────────── */

.reanalyze-card {
    text-align: center;
    padding: 20px;
}

.footer {
    text-align: center;
    padding: 24px;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--color-text-light);
    text-decoration: underline;
}

/* ─── Recent Sessions ───────────────────────────────────────────── */

.recent-card {
    padding: 20px 24px;
}

.recent-card .section-title {
    margin-bottom: 12px;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background var(--transition);
    width: 100%;
}

.recent-item:hover {
    background: var(--color-bg);
}

.recent-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.recent-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.recent-arrow {
    font-size: 1rem;
    color: var(--color-text-muted);
    transition: transform var(--transition), color var(--transition);
    flex-shrink: 0;
    margin-left: 12px;
}

.recent-item:hover .recent-arrow {
    transform: translateX(3px);
    color: var(--color-primary);
}

.muted {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* ─── Wind Card ─────────────────────────────────────────────────── */

.wind-card {
    padding: 16px 24px;
}

.wind-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wind-icon {
    font-size: 1.5rem;
}

.wind-details {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.wind-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.wind-direction {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.wind-disclaimer {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.wind-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.8rem;
    color: var(--color-text-light);
    white-space: nowrap;
}

.wind-note {
    margin-top: 12px;
    text-align: right;
    font-size: 0.75rem;
    font-style: italic;
}

/* ─── Strava Map Embed ──────────────────────────────────────────── */

.strava-embed-container {
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-height: 200px;
}

.strava-embed-container iframe {
    border: none;
    width: 100%;
}

/* ─── Share toast ───────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    z-index: 300;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2s forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ─── Responsive ────────────────────────────────────────────────── */

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

    .hero-sub {
        font-size: 0.95rem;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .card {
        padding: 20px;
    }

    .data-table {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .btn-row {
        flex-direction: column;
    }

    .btn-shark {
        width: 100%;
    }

    .action-bar {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0 16px;
    }

    .main {
        padding: 16px;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav {
        gap: 10px;
    }

    .nav-link,
    .nav-user {
        font-size: 0.8rem;
    }
}