@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --ink: #17201d;
    --muted: #68736e;
    --line: rgba(27, 49, 41, .12);
    --paper: #f6f7f1;
    --card: #fffffb;
    --moss: #174c3c;
    --leaf: #b8f06b;
    --coral: #ff775f;
    --sun: #ffd66d;
    --lavender: #d9ceff;
    --radius: 24px;
    --shadow: 0 18px 45px rgba(18, 42, 32, .10);
}

* { box-sizing: border-box; }
body {
    min-height: 100vh;
    color: var(--ink);
    background: var(--paper);
    font-family: 'Manrope', Inter, sans-serif;
    letter-spacing: -.01em;
}
body::before {
    content: '';
    position: fixed;
    z-index: -1;
    width: 42rem;
    height: 42rem;
    right: -18rem;
    top: -20rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184, 240, 107, .40), rgba(184, 240, 107, 0) 66%);
    pointer-events: none;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* The assessment becomes a premium, editorial intake rather than a long form. */
body.assessment-page { background: #f7f7f2; }
.assessment-page .container { max-width: 1080px; padding: 28px 24px 72px; }
.assessment-page .header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    text-align: left;
    color: var(--ink);
    margin: 0 0 36px;
}
.assessment-page .header h1 {
    color: var(--moss);
    font-size: clamp(2rem, 5vw, 3.45rem);
    letter-spacing: -.07em;
    line-height: .95;
    margin: 0 0 10px;
}
.assessment-page .header h1::before {
    content: 'FIT / 40';
    display: block;
    font: 500 .67rem/1 'DM Mono', monospace;
    letter-spacing: .12em;
    color: #5b8071;
    margin-bottom: 12px;
}
.assessment-page .header p { color: var(--muted); font-size: 1rem; max-width: 560px; }
.assessment-page .auth-btn {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--card);
    color: var(--moss);
    font-size: .82rem;
    font-weight: 800;
    box-shadow: none;
}
.assessment-page .card {
    padding: clamp(22px, 4vw, 46px);
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 255, 251, .92);
    box-shadow: var(--shadow);
}
.assessment-page .card::before {
    content: 'THE 12-MINUTE RESET  ·  NO PERFECTION REQUIRED';
    display: block;
    padding-bottom: 19px;
    border-bottom: 1px solid var(--line);
    color: #638072;
    font: 500 .68rem/1 'DM Mono', monospace;
    letter-spacing: .10em;
}
.assessment-page .pillar-section { margin: 38px 0; }
.assessment-page .pillar-header { border: 0; margin-bottom: 18px; padding: 0; }
.assessment-page .pillar-icon {
    width: 48px; height: 48px; margin-right: 14px;
    border-radius: 15px; background: var(--leaf); font-size: 21px;
}
.assessment-page .pillar-icon.kinship { background: var(--lavender); }
.assessment-page .pillar-icon.prosperity { background: var(--sun); }
.assessment-page .pillar-icon.spirit { background: #ffc4b8; }
.assessment-page .pillar-title { color: var(--ink); font-size: 1.35rem; letter-spacing: -.04em; }
.assessment-page .pillar-subtitle { color: var(--muted); }
.assessment-page .question-group {
    position: relative;
    margin: 10px 0;
    padding: 17px 84px 15px 18px;
    border: 1px solid rgba(27, 49, 41, .09);
    border-radius: 16px;
    background: #fbfcf8;
}
.assessment-page .question-label { color: var(--ink); font-size: .92rem; font-weight: 800; }
.assessment-page .question-text { margin: 4px 0 14px; color: var(--muted); font-size: .8rem; font-style: normal; line-height: 1.45; }
.assessment-page .score-display {
    position: absolute; right: 17px; top: 17px;
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 50%; background: var(--moss); color: white;
    font: 500 .95rem 'DM Mono', monospace;
}
.assessment-page .slider { height: 6px; background: #dfe8dd; }
.assessment-page .slider::-webkit-slider-thumb { width: 19px; height: 19px; background: var(--coral); box-shadow: 0 2px 7px rgba(255,119,95,.4); }
.assessment-page .slider-labels { color: #8b948f; font-size: .68rem; }
.assessment-page select { border: 1px solid var(--line); background: var(--card); border-radius: 12px; color: var(--ink); }
.assessment-page .btn, .app-shell .btn, .connection-page .btn {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 99px; border: 0;
    background: var(--moss); color: white;
    padding: 14px 23px; font-size: .88rem; font-weight: 800;
    box-shadow: none; transition: transform .18s ease, box-shadow .18s ease;
}
.assessment-page .btn:hover, .app-shell .btn:hover, .connection-page .btn:hover { transform: translateY(-2px); box-shadow: 0 9px 18px rgba(23,76,60,.18); }
.assessment-page .btn-secondary { background: #e6ebe4; color: var(--moss); }
.assessment-page .results-section h2 { color: var(--moss); font-size: 2.1rem; letter-spacing: -.06em; }
.assessment-page .insights, .assessment-page .ai-insights { border: 1px solid var(--line); background: #f6f8f0; }
.assessment-page .ai-insights { border-color: rgba(184,240,107,.75); }
.assessment-page .ai-insights h3 { color: var(--moss); }
.assessment-page .journey-cta { background: var(--moss); border-radius: 18px; }

/* Shared authenticated product shell */
.app-shell, .connection-page { background: var(--paper); padding-bottom: 108px; }
.app-shell .header, .connection-page .header {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    padding: 37px 24px 29px;
    text-align: left;
    color: var(--ink);
    background: transparent;
}
.app-shell .header h1, .connection-page .header h1 { color: var(--moss); font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -.065em; }
.app-shell .header h1::before, .connection-page .header h1::before {
    content: 'FITBY40 / WHOLE-LIFE TRAINING'; display: block;
    margin-bottom: 10px; color: #668577; font: 500 .65rem/1 'DM Mono', monospace; letter-spacing: .11em;
}
.app-shell .header p, .connection-page .header p { margin-top: 8px; color: var(--muted); font-size: .94rem; }
.app-shell .page, .connection-page .container { max-width: 1120px; margin: 0 auto; }
.app-shell .card, .connection-page .card {
    margin: 15px 24px; padding: 22px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--card); box-shadow: 0 9px 24px rgba(25,42,34,.055);
}
.app-shell .card-title, .connection-page .card h2 { color: var(--ink); font-size: 1.03rem; font-weight: 800; letter-spacing: -.03em; }
.app-shell .cohort-badge {
    max-width: 1072px; margin: 0 auto 15px; padding: 27px 24px;
    border-radius: 0; text-align: left; color: var(--ink);
    background: linear-gradient(105deg, var(--leaf), #d8fa9c);
}
.app-shell .cohort-badge h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.06em; }
.app-shell .cohort-badge p { color: #3a604e; }
.app-shell .sprint-card { max-width: 1072px; margin: 15px auto; padding: 24px; border-radius: var(--radius); background: var(--moss); box-shadow: var(--shadow); }
.app-shell .progress-bar { background: rgba(255,255,255,.18); height: 7px; }
.app-shell .progress-fill { background: var(--leaf); }
.app-shell .chart-container { max-width: 330px; }
.app-shell .tabs { border: 1px solid var(--line); background: var(--card); box-shadow: none; }
.app-shell .tab { color: var(--muted); }
.app-shell .tab.active { background: var(--moss); color: white; }
.app-shell .post, .app-shell .wearable-card, .app-shell .log-item, .app-shell .exercise-item { border: 1px solid var(--line); box-shadow: none; background: var(--card); }
.app-shell .post { margin: 15px 24px; border-radius: var(--radius); }
.app-shell .post-avatar { background: var(--moss); }
.app-shell .post-pillar { background: #e8f6d0; color: var(--moss); }
.app-shell .quick-log { gap: 12px; }
.app-shell .log-item { border-radius: 15px; }
.app-shell .log-item:hover { background: #edf8dc; }
.app-shell .nav {
    z-index: 20; bottom: 16px; left: 50%; right: auto; width: min(650px, calc(100% - 28px));
    transform: translateX(-50%); padding: 7px 10px; border: 1px solid rgba(27,49,41,.12); border-radius: 22px;
    background: rgba(255,255,251,.92); box-shadow: 0 12px 28px rgba(22,44,35,.16); backdrop-filter: blur(16px);
}
.app-shell .nav-item { padding: 7px 13px; border-radius: 14px; color: #78837d; }
.app-shell .nav-item.active { color: var(--moss); background: #e8f6d0; }
.app-shell .nav-item span { font-size: 20px; }
.app-shell .nav-item small { font-size: 10px; }
.app-shell .modal-content { border: 1px solid var(--line); border-radius: var(--radius); }
.app-shell .checkin-prompt { border-color: var(--coral); background: #fff1ed; }

/* Connections gets the same home, but retains its long-form desktop layout. */
.connection-page .container { max-width: 1120px; padding: 0 0 60px; }
.connection-page .nav { justify-content: flex-start; max-width: 1072px; margin: 0 auto 28px; padding: 0 24px; }
.connection-page .nav a { border-color: var(--line); color: var(--moss); background: var(--card); }
.connection-page .nav a.active, .connection-page .nav a:hover { background: var(--moss); border-color: var(--moss); color: white; }
.connection-page .intro { background: #eff9dc; border-radius: 17px; }
.connection-page .intro h3, .connection-page .intro p { color: var(--moss); }
.connection-page .relationship-btn { border-color: var(--line); background: #fbfcf8; }
.connection-page .relationship-btn:hover, .connection-page .relationship-btn.selected { border-color: var(--moss); background: var(--moss); }
.connection-page .pillar-tab.active { border-color: var(--moss); background: var(--moss); }
.connection-page .prompt-card { background: #fff8e5; border-color: #f3d888; }
.connection-page .prompt-card .question, .connection-page .schedule-section h3 { color: var(--moss); }

@media (min-width: 760px) {
    .assessment-page .pillar-section { display: grid; grid-template-columns: 210px 1fr; gap: 20px 30px; }
    .assessment-page .pillar-header { grid-row: 1 / span 3; align-self: start; padding-top: 6px; }
    .assessment-page .question-group { margin: 0; }
    .app-shell .page.active { display: grid; grid-template-columns: repeat(12, 1fr); align-items: start; }
    .app-shell .page.active > .header { grid-column: 1 / -1; width: 100%; }
    .app-shell #dashboard .cohort-badge { grid-column: 1 / -1; width: 100%; }
    .app-shell #dashboard .sprint-card { grid-column: 1 / span 5; width: calc(100% - 15px); margin-left: 24px; }
    .app-shell #dashboard .card { grid-column: 6 / -1; }
    .app-shell #feed > .card, .app-shell #feed > #posts-container { grid-column: 3 / span 8; }
    .app-shell #cohort > .card, .app-shell #profile > .card { grid-column: 3 / span 8; }
}

@media (max-width: 560px) {
    .assessment-page .container { padding: 22px 15px 48px; }
    .assessment-page .header { grid-template-columns: 1fr; gap: 15px; margin-bottom: 24px; }
    .assessment-page .auth-btn { justify-self: start; }
    .assessment-page .card { padding: 19px 14px; border-radius: 22px; }
    .assessment-page .question-group { padding-left: 14px; }
    .app-shell .header, .connection-page .header { padding: 28px 18px 23px; }
    .app-shell .card, .connection-page .card { margin-left: 15px; margin-right: 15px; padding: 18px; }
    .app-shell .cohort-badge { padding-left: 18px; padding-right: 18px; }
    .app-shell .sprint-card { margin-left: 15px; margin-right: 15px; }
    .app-shell .nav-item { padding: 6px 7px; }
    .app-shell .nav-item span { font-size: 17px; }
    .app-shell .nav-item small { font-size: 8px; }
    .connection-page .nav { overflow-x: auto; flex-wrap: nowrap; padding-left: 15px; padding-right: 15px; justify-content: flex-start; }
    .connection-page .nav a { white-space: nowrap; }
}

/* Account management keeps irreversible actions visually distinct and readable. */
.account-page { min-height: 100vh; background: var(--paper, #f7f8f3); color: var(--ink, #1b3129); font-family: 'Inter', sans-serif; }
.account-container { width: min(720px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 72px; }
.account-back { color: var(--moss, #174c3c); font-size: .9rem; font-weight: 700; text-decoration: none; }
.account-heading { margin: 34px 0 24px; }
.account-kicker { margin: 0 0 9px; color: #668577; font: 500 .68rem/1 'DM Mono', monospace; letter-spacing: .11em; }
.account-heading h1 { margin: 0; color: var(--moss, #174c3c); font-size: clamp(2rem, 7vw, 3.2rem); letter-spacing: -.06em; }
.account-heading p:not(.account-kicker) { color: var(--muted, #65736c); line-height: 1.55; }
.account-card { margin-top: 18px; padding: 25px; border: 1px solid var(--line, #d9e1d7); border-radius: 20px; background: var(--card, #fff); box-shadow: 0 9px 24px rgba(25, 42, 34, .055); }
.account-card h2 { margin: 0; font-size: 1.2rem; }
.account-card p { color: var(--muted, #65736c); line-height: 1.55; }
.account-card .btn { margin-top: 6px; }
.account-danger { border-color: #f2bbb5; background: #fff9f8; }
.account-danger h2 { color: #9e2d25; }
.account-danger label { display: block; margin-top: 18px; font-size: .9rem; }
.account-danger input { width: 100%; margin-top: 8px; padding: 13px; border: 1px solid #dca39e; border-radius: 10px; background: #fff; font: inherit; }
.account-danger input:focus { outline: 2px solid #c95148; outline-offset: 2px; }
.account-help { margin: 8px 0 0; font-size: .85rem; }
.account-delete-button { background: #b7342c !important; }
.account-delete-button:disabled { cursor: not-allowed; opacity: .48; transform: none !important; box-shadow: none !important; }
.account-status { min-height: 0; margin: 0; border-radius: 12px; font-size: .92rem; font-weight: 600; }
.account-status:empty { display: none; }
.account-status-success, .account-status-error { padding: 13px 15px; }
.account-status-success { color: #235a3a; background: #e9f7eb; }
.account-status-error { color: #8f2821; background: #fff0ef; }
