@import url('site-fonts.css');
@import url('site-footer-email.css');
@import url('page-shell.css');
@import url('interactions.css');

:root
{
    --bg-deep: #0f0f0f;
    --bg-page: #141414;
    --bg-elevated: #1a1a1a;
    --bg-card: #1e1e1e;
    --border-subtle: rgba(100, 100, 100, 0.38);
    --border-mid: rgba(100, 100, 100, 0.52);
    --border-strong: rgba(100, 100, 100, 0.68);
    --text-primary: #f4f4f5;
    --text-secondary: #d4d4d8;
    --text-muted: #a1a1aa;
    --accent: #ff8c00;
    --accent-hover: #ffa033;
    --accent-muted: rgba(255, 140, 0, 0.14);
    --radius-sm: 10px;
    --radius-md: 14px;
    --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.55);
    --font: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*
{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
html
{
    overflow-x: hidden;
    color-scheme: dark;
    scroll-behavior: smooth;
}
input:focus,
button:focus,
select:focus,
textarea:focus
{
    outline: none;
}

/* Sidebar — fixed on the left so it’s always visible; main content has margin so it doesn’t cover the strip */
body
{
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    color: var(--text-primary);
    background-color: var(--bg-page);
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -30%, rgba(255, 140, 0, 0.09), transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 20%, rgba(255, 140, 0, 0.04), transparent 50%);
    overflow-x: hidden;
}
.site-sidebar
{
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    height: 100vh;
    height: 100dvh;
    background: rgba(15, 15, 15, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-right: 1px solid var(--border-subtle);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem 0;
    transition: width 0.25s ease, min-width 0.25s ease, max-width 0.25s ease;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 1000;
}
.site-sidebar:hover
{
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    align-items: stretch;
}
.sidebar-brand
{
    flex-shrink: 0;
    margin-bottom: 1.35rem;
    padding: 0 0.65rem;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.site-sidebar:hover .sidebar-brand
{
    justify-content: flex-start;
}
.sidebar-logo
{
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    opacity: 0;
    width: 0;
    min-width: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.2s ease, overflow 0.2s ease;
}
.site-sidebar:hover .sidebar-logo
{
    opacity: 1;
    width: auto;
    overflow: visible;
}
.sidebar-logo-ai
{
    color: var(--accent);
}
.sidebar-nav
{
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-height: 0;
    min-width: 0;
}
.sidebar-link
{
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.55rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 44px;
    box-sizing: border-box;
    justify-content: center;
    min-width: 0;
    width: 100%;
    font-family: var(--font);
}
.site-sidebar:hover .sidebar-link
{
    justify-content: flex-start;
    padding: 0.55rem 0.65rem;
    gap: 0.65rem;
}
.sidebar-link:hover
{
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}
.sidebar-link-active
{
    background-color: var(--accent-muted);
    color: var(--text-primary);
    box-shadow: inset 3px 0 0 0 var(--accent);
}
.sidebar-link .sidebar-icon
{
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}
.site-sidebar:hover .sidebar-link .sidebar-icon
{
    width: 24px;
    height: 24px;
}
.sidebar-link .sidebar-icon-filled
{
    display: none;
}
.sidebar-link .sidebar-icon-outline
{
    display: block;
}
.sidebar-link-active .sidebar-icon-filled
{
    display: block;
}
.sidebar-link-active .sidebar-icon-outline
{
    display: none;
}
.sidebar-profile-trigger.sidebar-link-active
{
    background-color: var(--accent-muted);
    color: var(--text-primary);
    box-shadow: inset 3px 0 0 0 var(--accent);
}
.sidebar-label
{
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    width: 0;
    min-width: 0;
    max-width: 0;
    overflow: hidden;
    pointer-events: none;
    padding: 0;
    margin: 0;
    border: 0;
    transition: opacity 0.2s ease, width 0.2s ease, max-width 0.2s ease, overflow 0.2s ease;
}
.site-sidebar:hover .sidebar-label
{
    opacity: 1;
    width: auto;
    max-width: none;
    overflow: visible;
}

/* Sidebar bottom: profile + more */
.sidebar-bottom
{
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}
.sidebar-profile-wrap
{
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}
.sidebar-profile
{
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.55rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 44px;
    box-sizing: border-box;
    justify-content: center;
    width: 100%;
    font-family: var(--font);
}
button.sidebar-profile
{
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.site-sidebar:hover .sidebar-profile
{
    justify-content: flex-start;
    padding: 0.55rem 0.65rem;
    gap: 0.65rem;
}
.sidebar-profile:hover
{
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}
.sidebar-profile .sidebar-label
{
    opacity: 0;
    width: 0;
    min-width: 0;
    overflow: hidden;
}
.site-sidebar:hover .sidebar-profile .sidebar-label
{
    opacity: 1;
    width: auto;
    overflow: visible;
}
.sidebar-profile-avatar
{
    width: 22px;
    height: 22px;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font, "DM Sans", system-ui, sans-serif);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    color: #141414;
    background: linear-gradient(145deg, var(--accent) 0%, #cc7000 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.sidebar-profile-avatar.user-avatar-initials--photo
{
    color: transparent;
    text-indent: -9999px;
}
.site-sidebar:hover .sidebar-profile-avatar
{
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
    border-radius: 8px;
}
.sidebar-link-more .sidebar-icon-outline,
.sidebar-link-more .sidebar-icon-filled
{
    display: block;
}
.sidebar-link-more .sidebar-icon-filled
{
    display: none;
}

.sidebar-link:focus-visible,
.sidebar-profile:focus-visible,
.sidebar-link-more:focus-visible
{
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


.sidebar-profile-menu
{
    /* position, top, left set by sidebar-profile-menu.js (fixed; reparented to body) */
    position: fixed;
    min-width: 11rem;
    padding: 0.4rem 0;
    background: rgba(22, 22, 24, 0.98);
    border: 1px solid var(--border-mid);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}
.sidebar-profile-menu[hidden]
{
    display: none !important;
}
.sidebar-profile-menu-item
{
    display: block;
    width: 100%;
    padding: 0.55rem 1rem;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text-primary);
    text-decoration: none;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}
.sidebar-profile-menu-item:hover,
.sidebar-profile-menu-item:focus-visible
{
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}
.sidebar-profile-menu-item--highlight
{
    color: #ffb347;
    font-weight: 700;
}
.sidebar-profile-menu-item--highlight:hover,
.sidebar-profile-menu-item--highlight:focus-visible
{
    background: rgba(255, 140, 0, 0.12);
}
.sidebar-profile-trigger[aria-expanded="true"]
{
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

/* Main content wrapper — leave space for fixed sidebar so it’s never covered */
.main-wrap
{
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 50px;
    min-width: 0;
    transition: margin-left 0.25s ease;
    position: relative;
    z-index: 0;
}
.site-sidebar:hover ~ .main-wrap
{
    margin-left: 200px;
}

/* Main content */
.home-main
{
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    flex: 1;
}

/* ---------------------------------------------------------------------------
   Dashboard layout
   --------------------------------------------------------------------------- */
.dashboard-main
{
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) clamp(2rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
.dash-header-text
{
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.dash-eyebrow
{
    color: var(--accent);
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0;
}
.dash-title
{
    color: var(--text-primary);
    font-family: var(--font);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
}
.dash-subtitle
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.95rem;
    margin: 0;
}
.dash-sport-tip
{
    margin: 0.35rem 0 0;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.5;
    border: 1px solid rgba(255, 140, 0, 0.22);
    background: rgba(255, 140, 0, 0.08);
    color: rgba(255, 255, 255, 0.88);
    max-width: 36rem;
}
.dash-sport-tip strong
{
    color: #ffb347;
}

.dash-rocky-banner
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    margin: 0.65rem 0 0;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 140, 0, 0.35);
    background: rgba(255, 140, 0, 0.1);
    max-width: 36rem;
    font-family: var(--font);
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
}

.dash-rocky-banner-text
{
    flex: 1 1 12rem;
}

.dash-rocky-banner-sub
{
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.58);
}

.dash-rocky-banner-link
{
    font-weight: 700;
    color: #ffb347;
    text-decoration: none;
    white-space: nowrap;
}

.dash-rocky-banner-link:hover
{
    color: #ffc870;
    text-decoration: underline;
}

.dash-hero
{
    margin: 0.25rem 0;
}
.dash-start-btn
{
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 140, 0, 0.35);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.22) 0%, rgba(255, 140, 0, 0.08) 100%);
    color: var(--text-primary);
    font-family: var(--font);
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 28px rgba(255, 140, 0, 0.12);
}
.dash-start-btn:hover
{
    transform: translateY(-1px);
    border-color: rgba(255, 140, 0, 0.55);
    box-shadow: 0 12px 32px rgba(255, 140, 0, 0.18);
}
.dash-start-icon
{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #141414;
    flex-shrink: 0;
}
.dash-start-text
{
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.dash-start-text strong
{
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.dash-start-hint
{
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.dash-start-btn--live
{
    border-color: rgba(255, 140, 0, 0.42);
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
}

.dash-start-btn--live .dash-start-icon
{
    background: rgba(255, 140, 0, 0.85);
}

@media (max-width: 768px)
{
    .dash-start-btn--live.dash-start-btn--wiggle
    {
        animation: dash-start-wiggle 1.8s ease-in-out infinite;
    }
}

@keyframes dash-start-wiggle
{
    0%, 100% { transform: translateY(0); }
    12% { transform: translateY(-2px); }
    24% { transform: translateY(1px); }
    36% { transform: translateY(-2px); }
    48% { transform: translateY(0); }
}

.dash-stats
{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}
.dash-stat-card
{
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.85rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.dash-stat-card--accent
{
    border-color: rgba(255, 140, 0, 0.25);
    background: rgba(255, 140, 0, 0.06);
}
.dash-stat-icon
{
    color: var(--accent);
    opacity: 0.9;
    margin-bottom: 0.15rem;
}
.dash-stat-value
{
    color: var(--text-primary);
    font-family: var(--font);
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    line-height: 1;
    margin: 0;
}
.dash-stat-label
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
}
.dash-section-head
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.dash-section-title
{
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}
.dash-section-lead
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}
.dash-section-link
{
    color: var(--accent);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}
.dash-section-link:hover
{
    text-decoration: underline;
}
.dash-roasts-list
{
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.dash-roast-card
{
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
}
.dash-roast-card--warn
{
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.08);
}
.dash-roast-card--warn .dash-roast-icon
{
    color: #fbbf24;
}
.dash-roast-card--tease .dash-roast-icon
{
    color: var(--accent);
}
.dash-roast-icon
{
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: var(--text-muted);
}
.dash-roast-text
{
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0;
}
.dash-roast-copy
{
    flex: 1;
    min-width: 0;
}
.dash-roast-link
{
    display: inline-block;
    margin-top: 0.45rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}
.dash-roast-link:hover
{
    text-decoration: underline;
}
.dash-quick-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.dash-quick-card
{
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    min-width: 0;
}
.dash-quick-card:hover
{
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-mid);
    transform: translateY(-2px);
    text-decoration: none;
}
.dash-quick-icon
{
    color: var(--accent);
}
.dash-quick-label
{
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 700;
}
.dash-quick-desc
{
    font-family: var(--font);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
}
.dash-split-picker-row
{
    margin: 0 0 0.75rem;
}

.dash-split-select
{
    width: 100%;
    max-width: 22rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-primary, #fff);
    font: inherit;
    font-size: 0.88rem;
}

.dash-section-title .split-tab-badge
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    margin-left: 0.4rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #ff8c00;
    color: #111;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}

.dash-section-title .split-tab-badge[hidden]
{
    display: none !important;
}

.dash-split-grid
{
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.dash-split-row
{
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.dash-split-row--today
{
    background: var(--accent-muted);
    color: var(--text-primary);
}
.dash-split-day
{
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.dash-split-row--today .dash-split-day
{
    color: var(--accent);
}

/* Watch-style week complication — lives inside dash-top-bar */
.dash-top-bar
{
    padding: 1rem 1.2rem;
    border-radius: var(--radius-lg, 20px);
    border: 1px solid rgba(255, 140, 0, 0.32);
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.2) 0%, rgba(255, 140, 0, 0.07) 100%);
    box-shadow: 0 10px 32px rgba(255, 140, 0, 0.12);
}

.dash-rocky-setup-alert
{
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-md, 14px);
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: rgba(127, 29, 29, 0.28);
    color: #fecaca;
}

.dash-rocky-setup-alert[hidden]
{
    display: none;
}

.dash-rocky-setup-mark
{
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(145deg, #ff8c00, #cc7000);
    color: #141414;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 800;
}

.dash-rocky-setup-title
{
    margin: 0 0 0.25rem;
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 700;
    color: #fca5a5;
}

.dash-rocky-setup-text
{
    margin: 0;
    font-family: var(--font);
    font-size: 0.85rem;
    line-height: 1.45;
    color: rgba(254, 202, 202, 0.92);
}

.dash-rocky-setup-link
{
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rocky-sport-alerts
{
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rocky-sport-alerts[hidden]
{
    display: none;
}

.rocky-sport-setup-alert
{
    margin: 0;
}

.rocky-sport-alert-actions
{
    margin-top: 0.65rem;
}

.rocky-sport-alert-ignore
{
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(254, 202, 202, 0.45);
    background: rgba(0, 0, 0, 0.2);
    color: #fecaca;
    cursor: pointer;
}

.rocky-sport-alert-ignore:hover
{
    border-color: rgba(254, 202, 202, 0.7);
    background: rgba(0, 0, 0, 0.35);
}

.dash-week-complication
{
    display: flex;
    align-items: center;
    gap: 1.15rem;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}
.dash-week-ring
{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-shrink: 0;
}
.dash-week-letter
{
    width: 1.65rem;
    height: 1.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
}
.dash-week-letter--today
{
    color: #141414;
    background: var(--accent);
    border-color: rgba(255, 140, 0, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.22);
}
.dash-week-today
{
    min-width: 0;
}
.dash-week-today-label
{
    margin: 0 0 0.15rem;
    font-family: var(--font);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.dash-week-today-name
{
    margin: 0;
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

/* Archive (Progress tab) — dashboard-aligned */
.dash-archive
{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

.dash-archive-count
{
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.dash-archive-stats
{
    margin: 0;
}

.dash-archive-toolbar
{
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dash-archive-search-form
{
    width: 100%;
}

.dash-archive-search-input
{
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
}

.dash-archive-search-input::placeholder
{
    color: var(--text-muted);
}

.dash-archive-search-input:focus-visible
{
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-muted);
}

.dash-archive-view-picker
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.dash-archive-view-label
{
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: var(--font);
    font-weight: 600;
}

.dash-archive-view-btns
{
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.dash-archive-view-btn
{
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.dash-archive-view-btn:hover
{
    border-color: var(--border-mid);
    color: var(--text-primary);
}

.dash-archive-view-btn.active
{
    background: var(--accent-muted);
    border-color: rgba(255, 140, 0, 0.45);
    color: var(--text-primary);
}

.dash-archive-results
{
    min-height: 4rem;
}

.dash-archive-empty
{
    margin: 0;
    padding: 2rem 1rem;
    text-align: center;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.dash-archive-list
{
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dash-archive-card
{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
}

.dash-archive-card-head
{
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.dash-archive-card-meta
{
    font-family: var(--font);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
}

.dash-archive-card-actions
{
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.25rem;
}

.dash-archive-blocks-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dash-archive-block-card
{
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    font-family: var(--font, "DM Sans", system-ui, sans-serif);
    min-height: 7.5rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.dash-archive-block-card:hover
{
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-mid);
    transform: translateY(-2px);
}

.dash-archive-block-pills
{
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: auto;
}

.dash-archive-pill
{
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.dash-archive-pill--accent
{
    background: var(--accent-muted);
    color: var(--accent);
}

.dash-archive-timeline
{
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dash-archive-timeline-month
{
    margin: 0.5rem 0 0.75rem;
}

.dash-archive-timeline-month-label
{
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 0.35rem;
    padding: 0.35rem 0.6rem;
}

.dash-archive-timeline-row
{
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem 0.6rem;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.88rem;
    color: var(--text-secondary);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dash-archive-timeline-row:hover
{
    background: rgba(255, 255, 255, 0.04);
}

.dash-archive-timeline-day
{
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.dash-archive-table-wrap
{
    overflow-x: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

.dash-archive-table
{
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font);
    font-size: 0.82rem;
}

.dash-archive-table th
{
    text-align: left;
    padding: 0.65rem 0.75rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
}

.dash-archive-table td
{
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

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

.dash-archive-table-row
{
    cursor: pointer;
}

.dash-archive-table-row:hover td
{
    background: var(--accent-muted);
}

.dash-archive-table-btn
{
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.28rem 0.45rem;
    border-radius: 6px;
    cursor: pointer;
}

.dash-archive-table-btn:hover
{
    border-color: var(--accent);
    color: var(--text-primary);
}

.visually-hidden
{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 720px)
{
    .dash-archive-stats
    {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.site-footer--compact
{
    padding: 1.5rem clamp(1rem, 3vw, 2rem);
    border-top: 1px solid var(--border-subtle);
}

/* In-app pages — minimal single-line footer (landing page unchanged) */
.site-footer--app
{
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.65rem clamp(1rem, 3vw, 1.5rem);
    margin-top: auto;
}

html[data-theme="light"] .site-footer--app
{
    border-top-color: rgba(0, 0, 0, 0.06);
}

.footer-app-bar
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-app-link
{
    font-family: var(--font);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.38);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0.15rem 0.2rem;
    cursor: pointer;
    transition: color 0.15s ease;
}

html[data-theme="light"] .footer-app-link
{
    color: rgba(0, 0, 0, 0.42);
}

.footer-app-link:hover
{
    color: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] .footer-app-link:hover
{
    color: rgba(0, 0, 0, 0.65);
}

.footer-app-sep
{
    color: rgba(255, 255, 255, 0.18);
    font-size: 0.72rem;
    user-select: none;
}

html[data-theme="light"] .footer-app-sep
{
    color: rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px)
{
    body .site-footer--app
    {
        padding-bottom: calc(0.65rem + 52px + 1.65rem + env(safe-area-inset-bottom, 0px));
    }
}

.footer-inner--compact
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-compact-links
{
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
}
@media (max-width: 900px)
{
    .dash-stats
    {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dash-quick-grid
    {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px)
{
    .dash-stats
    {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }
    .dash-stat-card
    {
        padding: 0.7rem 0.75rem;
    }
}

/* Shared text-style button: subtle by default, underlines on hover */
.home-btn
{
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font);
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.2s ease;
}
.home-btn:hover
{
    color: var(--text-primary);
    text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Page 1 — greeting + complication cards
   --------------------------------------------------------------------------- */
.home-page-1
{
    min-height: 100vh;
    padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.5rem);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 2.5vw, 2.25rem);
}

/* Greeting block: left-aligned, sans-serif, with a subtle action on the right */
.home-welcome
{
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.home-welcome-text
{
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}
.home-welcome-title
{
    color: var(--text-primary);
    font-family: var(--font);
    font-size: clamp(2rem, 4.4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
}
.home-welcome-quote
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: clamp(0.9rem, 1.4vw, 1rem);
    font-style: normal;
    line-height: 1.4;
    margin: 0;
    max-width: 60ch;
}
.home-log-daily-workout
{
    align-self: flex-end;
    padding: 0.55rem 1rem;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-full, 999px);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.home-log-daily-workout:hover
{
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-strong);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Complication card grid — graph is the hero (2 cols × 2 rows),
   leaderboard + log stack to the right */
.home-complications
{
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    /* Avoid 1fr rows growing without bound on tall viewports — keeps cards from looking vertically stretched */
    grid-template-rows: minmax(220px, auto) minmax(220px, auto);
    gap: clamp(1rem, 1.5vw, 1.25rem);
    flex: 1;
    align-content: start;
    min-height: 0;
}
.complication-graph
{
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}
.complication-leaderboard
{
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    min-height: 0;
}
.complication-log
{
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}
.complication-card
{
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(100, 100, 100, 0.42);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.25rem 1.1rem;
    display: flex;
    flex-direction: column;
    min-height: 240px;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.complication-card::before
{
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    pointer-events: none;
}
.complication-card:hover
{
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(100, 100, 100, 0.55);
    transform: translateY(-2px);
    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.complication-title
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 0.85rem;
}
.complication-title-link
{
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.complication-title-link:hover
{
    color: var(--text-primary);
    text-decoration: none;
}
.complication-title-leaderboard
{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 0.35rem;
}
.complication-lb-exercise-wrap
{
    display: inline-flex;
    align-items: center;
    gap: 0;
    color: var(--text-secondary);
}
.complication-leaderboard-exercise
{
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: inherit;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    min-width: 6.5rem;
    max-width: min(14rem, 42vw);
    padding: 0 0 1px;
    margin: 0;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.complication-leaderboard-exercise::placeholder
{
    color: var(--text-muted);
    opacity: 0.85;
    text-transform: none;
    letter-spacing: 0.02em;
    font-weight: 500;
}
.complication-leaderboard-exercise:hover,
.complication-leaderboard-exercise:focus
{
    color: var(--text-primary);
    border-bottom-color: rgba(255, 140, 0, 0.45);
    outline: none;
}
.complication-leaderboard-exercise::-webkit-search-cancel-button
{
    -webkit-appearance: none;
}

/* Graph card: header row with title + exercise picker, then a stack of two charts */
.complication-graph
{
    overflow: hidden;
}
.complication-graph-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}
.complication-graph-header .complication-title
{
    margin: 0;
}
.complication-graph-select
{
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f4f4f5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 1.1rem;
}
.complication-graph-stack
{
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
    min-height: 0;
}
.complication-graph-pane
{
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0.7rem 0.85rem 0.5rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.complication-graph-pane:hover
{
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-mid);
}
.graph-pane-title
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 0.35rem;
}
.complication-graph-chart
{
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.graph-svg
{
    width: 100%;
    height: auto;
    max-height: 100%;
    aspect-ratio: 260 / 140;
    color: var(--accent);
    display: block;
}
.graph-grid .graph-grid-line
{
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 0.5;
    vector-effect: non-scaling-stroke;
}
.graph-axis
{
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}
.graph-line
{
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 6px rgba(255, 140, 0, 0.35));
}
.graph-area
{
    pointer-events: none;
}
.graph-dot
{
    fill: var(--accent);
}
.graph-tick-labels-y text,
.graph-tick-labels-x text
{
    fill: var(--text-muted);
    font-family: var(--font);
    font-size: 9px;
}
.complication-graph-pane.graph-pane--empty .graph-line,
.complication-graph-pane.graph-pane--empty .graph-area
{
    opacity: 0.2;
}

/* Leaderboard */
.complication-scope-btns
{
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.scope-btn
{
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full, 999px);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.scope-btn:hover
{
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    text-decoration: none;
}
.scope-btn.active
{
    background: var(--accent-muted);
    border-color: rgba(255, 140, 0, 0.35);
    color: var(--accent);
    text-decoration: none;
}
.complication-leaderboard-table-wrap
{
    flex: 1;
    overflow: auto;
    margin: 0 -0.5rem;
}
.complication-leaderboard-table
{
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font);
    font-size: 0.82rem;
}
.complication-leaderboard-table th,
.complication-leaderboard-table td
{
    color: var(--text-secondary);
    text-align: left;
    padding: 0.4rem 0.5rem;
    border: none;
}
.complication-leaderboard-table th
{
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-subtle);
}
.complication-leaderboard-table tbody tr
{
    transition: background-color 0.15s ease;
    border-radius: 6px;
}
.complication-leaderboard-table tbody tr:hover
{
    background-color: rgba(255, 255, 255, 0.04);
}
.complication-leaderboard-table tbody tr.leaderboard-row-user
{
    background-color: var(--accent-muted);
    color: var(--text-primary);
}
.complication-leaderboard-table tbody tr.leaderboard-row-user td
{
    color: var(--text-primary);
    font-weight: 600;
}

.complication-leaderboard-table .home-lb-user-link
{
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}

.complication-leaderboard-table .home-lb-user-link:hover
{
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

/* Log workout */
.complication-datetime
{
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0 0 0.15rem;
}
.complication-date-short
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    margin: 0 0 0.85rem;
}
.complication-today-focus
{
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.85rem;
}
.complication-split-details
{
    margin-top: auto;
    padding-top: 0.5rem;
    border-radius: 8px;
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.complication-split-details[open] .complication-split-summary::after
{
    transform: rotate(180deg);
}
.complication-split-summary
{
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 6px;
    font-family: var(--font);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    user-select: none;
    transition: background-color 0.2s ease;
}
.complication-split-summary:hover
{
    background-color: rgba(255, 140, 0, 0.06);
}
.complication-split-summary::-webkit-details-marker
{
    display: none;
}
.complication-split-summary::after
{
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--accent);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    opacity: 0.7;
}
.complication-split-expanded-inner
{
    padding-top: 0.3rem;
    padding-bottom: 0.2rem;
}
.complication-split-manage
{
    display: inline-block;
    margin-top: 0;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
.complication-split-manage:hover
{
    color: var(--accent-hover);
    text-decoration: underline;
}
.complication-log.is-split-empty .complication-today-focus,
.complication-log.is-split-empty .complication-split-label,
.complication-log.is-split-empty .complication-split-grid,
.complication-log.is-split-empty .complication-split-details
{
    display: none;
}

.complication-split-label
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
}
.complication-split-grid
{
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-family: var(--font);
    font-size: 0.92rem;
    color: var(--text-secondary);
}
.split-row
{
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 0.85rem;
    align-items: center;
    padding: 0.35rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}
.split-row:hover
{
    background-color: rgba(255, 255, 255, 0.03);
}
.split-row.current-day
{
    background-color: var(--accent-muted);
}
.split-row.current-day .split-day,
.split-row.current-day .split-name
{
    color: var(--text-primary);
}
.split-day
{
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}
.split-name
{
    color: var(--text-secondary);
}

/* ---------------------------------------------------------------------------
   Page 2 — Highlighted Lifts
   --------------------------------------------------------------------------- */
.home-page-2
{
    min-height: 100vh;
    width: 100%;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255, 140, 0, 0.06), transparent 60%),
        var(--bg-deep);
    border-top: 1px solid var(--border-subtle);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 0;
}
.page-2-header
{
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem clamp(1.5rem, 3vw, 2.5rem) 1.25rem;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-subtle);
}
.page-2-title
{
    color: var(--text-primary);
    font-family: var(--font);
    font-size: clamp(1.1rem, 2.1vw, 1.45rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: none;
    margin: 0;
}
.page-2-show-all
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease;
}
.page-2-show-all:hover
{
    color: var(--text-primary);
    text-decoration: underline;
}
.page-2-cards
{
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: clamp(1rem, 1.5vw, 1.5rem);
    padding: clamp(1.5rem, 2.5vw, 2rem) clamp(1.5rem, 3vw, 2.5rem);
    min-height: 0;
}
.page-2-more-cta
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.9rem;
    text-align: center;
    padding: 1.75rem 2rem 2.25rem;
    margin: 0;
}
.page-2-explore-link
{
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}
.page-2-explore-link:hover
{
    color: var(--accent-hover);
    text-decoration: underline;
}
.highlight-card
{
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(100, 100, 100, 0.42);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.highlight-card::before
{
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    pointer-events: none;
}
.highlight-card:hover
{
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(100, 100, 100, 0.55);
    transform: translateY(-3px);
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.highlight-card-user
{
    color: var(--accent);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 0.75rem;
    padding: 0 0.15rem;
}
.highlight-card-video-wrap.highlight-video-shell
{
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
    background-color: #2a2a2a;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.highlight-media-fallback
{
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #2c2c2c 0%, #1d1d1d 100%);
    z-index: 0;
    transition: opacity 0.2s ease;
}

.highlight-video-shell.is-loaded .highlight-media-fallback
{
    opacity: 0;
    pointer-events: none;
}

.highlight-video-shell.is-error .highlight-media-fallback
{
    opacity: 1;
}

.highlight-video-shell.is-error .highlight-card-video
{
    display: none;
}

.highlight-card-video
{
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: transparent;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.highlight-video-shell.is-loaded .highlight-card-video
{
    opacity: 1;
}
.highlight-card-stats
{
    margin-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0 0.15rem;
}
.highlight-card-stat
{
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    margin: 0;
}
.highlight-card-lift-title
{
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.highlight-card--empty .highlight-card-user
{
    color: var(--text-secondary);
}
.highlight-card--empty .highlight-card-lift-title
{
    color: var(--text-secondary);
    font-weight: 500;
}
@media (max-width: 900px)
{
    .page-2-cards
    {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 600px)
{
    .page-2-cards
    {
        grid-template-columns: minmax(0, 1fr);
    }
    .home-welcome
    {
        flex-direction: column;
        align-items: flex-start;
    }
    .home-log-daily-workout
    {
        align-self: flex-start;
    }
}

/* Footer (aligned with index landing page) */
.site-footer
{
    background: linear-gradient(180deg, var(--bg-page) 0%, var(--bg-deep) 45%);
    border-top: 1px solid var(--border-subtle);
    padding: clamp(3rem, 8vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem) 2.5rem;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}
.footer-inner
{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 3rem;
    row-gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}
.footer-col
{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-col-brand
{
    max-width: 240px;
}
.footer-logo
{
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
}
.footer-logo-ai
{
    color: var(--accent);
}
.footer-tagline
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    line-height: 1.45;
    margin: 0 0 1.5rem;
}
.footer-section-title
{
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 0.35rem;
}
.footer-section-title--spaced
{
    margin-top: 1.25rem;
}
.footer-link
{
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-link:hover
{
    color: var(--text-primary);
}
.footer-link-button
{
    display: inline;
    align-self: flex-start;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s;
}
.footer-link-button:hover
{
    color: var(--accent);
}
.footer-text
{
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.85rem;
}
.footer-placeholder
{
    color: var(--text-secondary);
}
.footer-socials
{
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-top: 0.25rem;
}
.footer-socials .footer-link
{
    color: var(--text-muted);
}

@media (max-width: 900px)
{
    .home-complications
    {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .complication-graph,
    .complication-leaderboard,
    .complication-log
    {
        grid-column: 1 / -1;
        grid-row: auto;
    }
    .footer-inner
    {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}
@media (max-width: 500px)
{
    .footer-inner
    {
        grid-template-columns: 1fr;
    }
}

/* Narrow viewports: keep main content width stable (sidebar expand is hover-only on desktop) */
@media (max-width: 900px)
{
    .site-sidebar:hover ~ .main-wrap
    {
        margin-left: 50px;
    }
}

@media (max-width: 640px)
{
    .main-wrap
    {
        padding-left: max(0px, env(safe-area-inset-left, 0px));
        padding-right: max(0px, env(safe-area-inset-right, 0px));
    }

    .site-footer
    {
        padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
        padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
        padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
    }

    .home-page-1,
    .home-page-2
    {
        padding-left: max(clamp(1.5rem, 3vw, 2.5rem), env(safe-area-inset-left, 0px));
        padding-right: max(clamp(1.5rem, 3vw, 2.5rem), env(safe-area-inset-right, 0px));
    }
}
