
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,500,20,1;9..144,600,20,1;9..144,700,20,1&family=JetBrains+Mono:wght@400;500;600&family=Work+Sans:wght@400;500;600;700&display=swap');

/* =========================================
   PROJECT LIFT / MYLIFT DESIGN SYSTEM
   ========================================= */

:root {
    --cream: #EFE9CE;
    --cream-soft: #F8F5E9;
    --cream-deep: #E4DCB9;

    --gold: #B0975F;
    --gold-deep: #8C7548;
    --gold-line: #C9B383;

    --mint: #A0D2C0;
    --mint-deep: #5F9E88;
    --mint-pale: #DCEEE6;

    --ink: #1E231F;
    --ink-soft: #4B5049;
    --ink-faint: #7C8178;

    --lift-navy: var(--ink);
    --lift-blue: var(--mint-deep);
    --lift-gold: var(--gold);

    --bg: var(--cream-soft);
    --card-bg: #FFFDF6;
    --text: var(--ink);
    --muted: var(--ink-faint);
    --border: #DDD5BB;

    --radius: 3px;
    --content-width: 1180px;
    --shadow-soft: 0 8px 24px rgba(30, 35, 31, 0.06);
    --shadow-hover: 0 12px 28px rgba(30, 35, 31, 0.10);

    --mobile-nav-height: 76px;
    --mobile-page-gutter: 18px;
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* =========================================
   GLOBAL
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Work Sans', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ink);
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.3rem);
    margin: 0 0 12px;
}

h2 {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    margin: 0 0 12px;
}

h3 {
    font-size: 1.35rem;
    margin: 0 0 12px;
}

h4 {
    font-size: 1.05rem;
    margin: 0 0 8px;
}

h5,
h6 {
    font-size: 0.95rem;
}

p {
    margin-top: 0;
}

a {
    color: var(--gold-deep);
    text-underline-offset: 3px;
    transition: color 160ms ease;
}

a:hover {
    color: var(--mint-deep);
}

button,
input,
select,
textarea {
    font: inherit;
    touch-action: manipulation;
}

button,
.btn,
.btn-primary {
    transition:
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--mint-deep);
    outline-offset: 3px;
}

img,
video,
iframe {
    max-width: 100%;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.85rem;
}

code,
.eyebrow,
.overline,
.section-label {
    font-family: 'JetBrains Mono', monospace;
}

.eyebrow,
.overline,
.section-label {
    color: var(--gold-deep);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.5;
    text-transform: uppercase;
}

/* =========================================
   AUTHENTICATION
   ========================================= */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 28px 16px;
    background: var(--cream);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: clamp(24px, 5vw, 42px);
    background: var(--card-bg);
    border: 1px solid var(--gold-line);
    border-top: 4px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.auth-card h1 {
    margin: 0 0 10px;
    font-size: 2rem;
}

.auth-card label {
    display: block;
    margin: 18px 0 6px;
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 600;
}

.auth-card input,
.auth-card select,
.auth-card textarea {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    color: var(--ink);
    background: #FFFEFA;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(176, 151, 95, 0.16);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin-top: 22px;
    padding: 12px 18px;
    color: var(--cream-soft);
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary:hover {
    color: var(--ink);
    background: var(--mint);
    border-color: var(--mint);
}

.btn-sm {
    width: auto;
    min-height: 36px;
    margin-top: 0;
    padding: 7px 13px;
    font-size: 0.84rem;
}

.alert {
    margin: 16px 0;
    padding: 12px 15px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.alert-success {
    color: #285342;
    background: var(--mint-pale);
    border-color: #B4D8C9;
}

.alert-error {
    color: #792F2F;
    background: #F8E8E2;
    border-color: #E8C4B9;
}

/* =========================================
   DESKTOP / TABLET NAVIGATION
   ========================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 48px);
    color: var(--cream-soft);
    background: var(--ink);
    border-bottom: 2px solid var(--gold);
}

.topbar .brand {
    flex-shrink: 0;
    color: var(--cream-soft);
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.topbar nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}

.topbar nav a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 10px;
    color: #D5D6CC;
    border-bottom: 2px solid transparent;
    font-size: 0.81rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease;
}

.topbar nav a:hover,
.topbar nav a.active,
.topbar nav a[aria-current="page"] {
    color: var(--mint);
    border-bottom-color: var(--gold);
}

.topbar nav a.logout {
    color: #E7B4A7;
}

.topbar nav a.logout:hover {
    color: #FFD3C7;
}

/* Mobile dropdown is hidden on larger screens. */

.mobile-header-menu {
    display: none;
}

/* =========================================
   DASHBOARD LAYOUT
   ========================================= */

.dashboard-content {
    width: min(100% - 40px, var(--content-width));
    margin: 0 auto;
    padding: clamp(26px, 4vw, 48px) 0 64px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.greeting-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    padding: clamp(26px, 4vw, 44px);
    background: var(--cream);
    border: 1px solid var(--gold-line);
    border-left: 5px solid var(--gold);
}

.dashboard .greeting-card {
    padding: clamp(30px, 5vw, 56px);
    background:
        linear-gradient(115deg, rgba(248, 245, 233, 0.58), transparent 72%),
        var(--cream);
    border: 1px solid var(--gold-line);
    border-left: 5px solid var(--gold);
}

.greeting-card h1 {
    max-width: 850px;
    margin-bottom: 10px;
}

.dashboard .greeting-card h1 {
    max-width: 780px;
    font-size: clamp(2.25rem, 5vw, 3.8rem);
    letter-spacing: -0.045em;
}

.greeting-card p {
    margin-bottom: 0;
    color: var(--ink-soft);
    font-size: 1rem;
}

.dashboard .greeting-card .eyebrow {
    margin-bottom: 18px;
    color: var(--gold-deep);
}

.dashboard .greeting-card .muted {
    max-width: 560px;
    font-size: 1.02rem;
    line-height: 1.7;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 18px;
    margin: 24px 0;
}

.dashboard .grid {
    gap: 16px;
    margin-top: 30px;
    margin-bottom: 32px;
}

.card {
    min-width: 0;
    padding: 22px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold-line);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(30, 35, 31, 0.025);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    overflow-wrap: break-word;
}

.card:hover {
    border-top-color: var(--gold);
    box-shadow: var(--shadow-soft);
}

.card h3 {
    margin: 0 0 12px;
    font-size: 1.2rem;
}

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

.card strong {
    color: var(--ink);
}

.card > a {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.dashboard .grid > .card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 190px;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold-line);
    box-shadow: none;
}

.dashboard .grid > .card:hover {
    border-top-color: var(--mint-deep);
    box-shadow: var(--shadow-soft);
}

.dashboard .grid > .card h3 {
    margin-bottom: 18px;
    font-size: 1.18rem;
}

.dashboard .grid > .card p {
    line-height: 1.65;
}

.dashboard .grid > .card > a {
    margin-top: auto;
    padding-top: 15px;
    font-weight: 600;
    text-decoration-thickness: 1px;
}

.progress-bar {
    height: 10px;
    overflow: hidden;
    background: var(--cream-deep);
    border-radius: 1px;
}

.progress-fill {
    height: 100%;
    min-width: 0;
    background: var(--mint-deep);
    transition: width 300ms ease;
}

.dashboard .grid > .card .progress-bar {
    width: 100%;
    height: 8px;
    margin: 5px 0 12px;
    background: var(--cream-deep);
}

.dashboard .grid > .card .progress-fill {
    background: var(--mint-deep);
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0;
}

.dashboard .quick-links {
    gap: 10px;
    margin: 32px 0 40px;
}

.quick-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 15px;
    color: var(--cream-soft);
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
}

.dashboard .quick-links a {
    min-height: 46px;
    padding: 11px 17px;
    transition:
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease;
}

.quick-links a:hover {
    color: var(--ink);
    background: var(--mint);
    border-color: var(--mint);
}

.announcements {
    padding: clamp(20px, 3vw, 30px);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
}

.dashboard .announcements {
    padding: clamp(24px, 4vw, 36px);
    background: var(--cream);
    border: 1px solid var(--gold-line);
    border-top: 3px solid var(--gold);
}

.announcements h3 {
    margin-bottom: 16px;
}

.dashboard .announcements h2 {
    margin-bottom: 8px;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.dashboard .announcements > .muted {
    margin-bottom: 12px;
}

.announcement {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    overflow-wrap: break-word;
}

.dashboard .announcement {
    padding: 19px 0;
    border-bottom-color: var(--gold-line);
}

.announcement:last-child {
    border-bottom: none;
}

.announcement strong {
    color: var(--ink);
}

.dashboard .announcement strong {
    font-size: 0.98rem;
}

.dashboard .announcement .muted {
    font-size: 0.82rem;
}

.announcement p {
    margin: 8px 0 0;
    color: var(--ink-soft);
}

/* =========================================
   ANNOUNCEMENT READ CONTROLS
   ========================================= */

.announcement-status {
    display: inline-block;
    margin: 8px 0;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--mint-pale);
    color: #315E4E;
}

.announcement-status.is-read {
    background: #F0EEE7;
    color: #62665D;
}

.announcement-read-form {
    margin-top: 12px;
}

.announcement-read-button {
    border: 1px solid var(--gold);
    border-radius: 6px;
    padding: 8px 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.announcement-read-button:hover {
    background: var(--cream);
}

.announcement-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    margin-left: 8px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 700;
    vertical-align: middle;
}

.announcement-feedback {
    margin-bottom: 16px;
}

/* =========================================
   GENERAL FORM CONTROLS
   ========================================= */

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea {
    max-width: 100%;
    color: var(--ink);
    background-color: #FFFEFA;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):focus,
select:focus,
textarea:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(176, 151, 95, 0.14);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--mint-deep);
}

/* =========================================
   MOBILE APP BOTTOM NAVIGATION
   Hidden by default; shown on phones.
   ========================================= */

.mobile-app-nav {
    display: none;
}

/* =========================================
   RESPONSIVE LAYOUT
   ========================================= */

@media (max-width: 1050px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .topbar > .desktop-main-nav {
        justify-content: flex-start;
        width: 100%;
    }
}

/* =========================================
   MOBILE HEADER AND APP NAVIGATION
   Applies across pages using the shared
   topbar and mobile-header-menu classes.
   ========================================= */

@media screen and (max-width: 650px) {

    html {
        scroll-padding-top: 20px;
    }

    body {
        font-size: 14px;
    }

    /* Compact header: brand left, Menu right. */

    .topbar {
        position: relative;
        top: auto;
        z-index: 100;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 16px var(--mobile-page-gutter);
        padding-top: max(16px, env(safe-area-inset-top, 0px));
        border-bottom: 1px solid rgba(176, 151, 95, 0.35);
    }

    .topbar > .brand {
        display: inline-flex;
        align-items: center;
        flex: 0 1 auto;
        min-width: 0;
        color: var(--cream-soft);
        font-size: 1.65rem;
        line-height: 1.2;
        text-decoration: none;
    }

    /* Hide desktop navigation on mobile. */

    .topbar > .desktop-main-nav {
        display: none;
    }

    /* Hide legacy navigation inside the header when it
       hasn't yet been converted to the shared markup. */

    .topbar > nav:not(.desktop-main-nav):not(.mobile-header-menu nav) {
        display: none;
    }

    /* Compact dropdown container. */

    .topbar > .mobile-header-menu {
        position: relative;
        display: block;
        flex: 0 0 auto;
        margin-left: auto;
        color: var(--cream-soft);
    }

    .mobile-header-menu > summary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 42px;
        padding: 8px 13px;
        color: var(--cream-soft);
        background: rgba(248, 245, 233, 0.06);
        border: 1px solid rgba(201, 179, 131, 0.65);
        border-radius: 999px;
        font-family: 'Work Sans', Arial, sans-serif;
        font-size: 0.88rem;
        font-weight: 600;
        line-height: 1;
        list-style: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition:
            background 160ms ease,
            color 160ms ease,
            border-color 160ms ease;
    }

    .mobile-header-menu > summary::-webkit-details-marker {
        display: none;
    }

    .mobile-header-menu > summary::marker {
        content: "";
    }

    .mobile-header-menu__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
    }

    .mobile-header-menu__icon svg {
        display: block;
        width: 18px;
        height: 18px;
    }

    .mobile-header-menu[open] > summary {
        color: var(--ink);
        background: var(--mint);
        border-color: var(--mint);
    }

    /* Dropdown panel. */

    .topbar > .mobile-header-menu > nav {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 2px;
        width: min(270px, calc(100vw - 36px));
        max-height: min(70dvh, 520px);
        margin: 0;
        padding: 9px;
        overflow-x: hidden;
        overflow-y: auto;
        flex-wrap: nowrap;
        white-space: normal;
        overscroll-behavior: contain;
        background: var(--cream-soft);
        border: 1px solid var(--gold-line);
        border-radius: 16px;
        box-shadow: 0 14px 36px rgba(30, 35, 31, 0.22);
        -webkit-overflow-scrolling: touch;
    }

    .topbar > .mobile-header-menu > nav a {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex: 0 0 auto;
        width: 100%;
        min-height: 44px;
        margin: 0;
        padding: 11px 13px;
        color: var(--ink);
        background: transparent;
        border: 0;
        border-radius: 9px;
        font-size: 0.9rem;
        font-weight: 500;
        line-height: 1.35;
        text-align: left;
        text-decoration: none;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .topbar > .mobile-header-menu > nav a:hover,
    .topbar > .mobile-header-menu > nav a:focus-visible,
    .topbar > .mobile-header-menu > nav a.active,
    .topbar > .mobile-header-menu > nav a[aria-current="page"] {
        color: var(--ink);
        background: var(--mint-pale);
        border: 0;
    }

    .topbar > .mobile-header-menu > nav a.logout {
        margin-top: 5px;
        padding-top: 13px;
        color: #8B3C32;
        border-top: 1px solid var(--border);
        border-radius: 0 0 9px 9px;
    }

    .topbar > .mobile-header-menu > nav a.logout:hover {
        color: #792F2F;
        background: #F8E8E2;
    }

    /* Reserve space for the fixed bottom nav on app pages. */

    body.dashboard {
        overflow-x: hidden;
        padding-bottom: calc(
            var(--mobile-nav-height) + 24px + var(--mobile-safe-bottom)
        ) !important;
    }

    /* Main dashboard content. */

    body.dashboard .dashboard-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0 auto;
        padding: 18px var(--mobile-page-gutter) 30px;
        box-sizing: border-box;
    }

    /* Welcome card. */

    body.dashboard .greeting-card {
        margin-bottom: 20px;
        padding: 25px 21px;
        border-left-width: 4px;
        border-radius: 18px;
        overflow-wrap: anywhere;
    }

    body.dashboard .greeting-card .eyebrow {
        margin-bottom: 12px;
        font-size: 0.68rem;
        line-height: 1.5;
    }

    body.dashboard .greeting-card h1 {
        max-width: 100%;
        margin-bottom: 10px;
        font-size: clamp(2rem, 8.5vw, 2.65rem);
        line-height: 1.12;
        letter-spacing: -0.04em;
        overflow-wrap: anywhere;
    }

    body.dashboard .greeting-card .muted {
        max-width: 100%;
        margin-bottom: 0;
        font-size: 0.94rem;
        line-height: 1.6;
    }

    /* Overview cards. */

    body.dashboard .grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 13px;
        margin: 20px 0 26px;
    }

    body.dashboard .grid > .card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        min-width: 0;
        min-height: 0;
        padding: 20px;
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-left: 4px solid var(--gold-line);
        border-radius: 16px;
        box-shadow: 0 3px 12px rgba(30, 35, 31, 0.035);
        overflow-wrap: anywhere;
    }

    body.dashboard .grid > .card h3 {
        margin-top: 0;
        margin-bottom: 12px;
        font-size: 1.18rem;
        line-height: 1.4;
    }

    body.dashboard .grid > .card p {
        max-width: 100%;
        font-size: 0.94rem;
        line-height: 1.65;
        overflow-wrap: anywhere;
    }

    body.dashboard .grid > .card > a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        margin-top: 8px;
        padding-top: 4px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    body.dashboard .grid > .card .progress-bar {
        width: 100%;
        height: 9px;
        margin: 8px 0 12px;
        border-radius: 999px;
        overflow: hidden;
    }

    body.dashboard .grid > .card .progress-fill {
        height: 100%;
        border-radius: inherit;
    }

    /* Quick links. */

    body.dashboard .quick-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 24px 0 30px;
    }

    body.dashboard .quick-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 50px;
        padding: 12px 9px;
        border-radius: 12px;
        font-size: 0.84rem;
        line-height: 1.4;
        text-align: center;
        overflow-wrap: anywhere;
    }

    /* Announcements. */

    body.dashboard .announcements {
        min-width: 0;
        margin-top: 24px;
        padding: 22px 18px;
        background: var(--cream);
        border: 1px solid var(--gold-line);
        border-top: 3px solid var(--gold);
        border-radius: 17px;
        overflow-wrap: anywhere;
    }

    body.dashboard .announcements h2 {
        margin-bottom: 10px;
        font-size: 1.6rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    body.dashboard .announcements > .muted {
        font-size: 0.91rem;
        line-height: 1.6;
    }

    body.dashboard .announcement {
        min-width: 0;
        padding: 18px 0;
        border-bottom-color: var(--gold-line);
        overflow-wrap: anywhere;
    }

    body.dashboard .announcement strong {
        font-size: 0.96rem;
        line-height: 1.5;
    }

    body.dashboard .announcement .muted {
        font-size: 0.8rem;
    }

    body.dashboard .announcement p {
        margin-top: 10px;
        font-size: 0.93rem;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

    body.dashboard .announcement-status {
        margin-top: 10px;
    }

    body.dashboard .announcement-read-form {
        margin-top: 12px;
    }

    body.dashboard .announcement-read-button {
        min-height: 44px;
        padding: 10px 14px;
        border-radius: 10px;
    }

    body.dashboard .announcement-count {
        min-width: 25px;
        height: 25px;
    }

    body.dashboard .announcement-feedback {
        margin-bottom: 14px;
        overflow-wrap: anywhere;
    }

    /* Phone-friendly authentication controls. */

    .auth-page {
        align-items: flex-start;
        min-height: 100vh;
        min-height: 100dvh;
        padding:
            max(24px, env(safe-area-inset-top, 0px))
            16px
            max(24px, env(safe-area-inset-bottom, 0px));
    }

    .auth-card {
        margin: auto 0;
        padding: 26px 21px;
        border-radius: 14px;
    }

    .auth-card input,
    .auth-card select,
    .auth-card textarea {
        min-height: 48px;
        border-radius: 9px;
        font-size: 16px;
    }

    .btn-primary {
        min-height: 48px;
        border-radius: 10px;
    }

    /* Fixed five-item bottom navigation. */

    .mobile-app-nav {
        position: fixed !important;
        z-index: 9999;
        right: 0;
        bottom: 0;
        left: 0;

        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: center;
        gap: 2px;

        width: 100%;
        min-height: var(--mobile-nav-height);
        max-height: 100px;
        margin: 0;
        padding: 7px 10px;
        padding-bottom: max(7px, var(--mobile-safe-bottom));

        background: rgba(248, 245, 233, 0.97);
        border-top: 1px solid var(--gold-line);
        box-shadow: 0 -5px 22px rgba(30, 35, 31, 0.08);

        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
    }

    .mobile-app-nav,
    .mobile-app-nav * {
        box-sizing: border-box;
    }

    .mobile-app-nav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;

        width: 100%;
        min-width: 0;
        height: 60px;
        min-height: 54px;
        overflow: hidden;
        margin: 0;
        padding: 4px 2px;

        color: var(--ink-soft);
        background: transparent;
        border: 0;
        border-radius: 11px;
        text-decoration: none;

        -webkit-tap-highlight-color: transparent;
        transition: color 160ms ease, background 160ms ease;
    }

    .mobile-app-nav__icon {
        display: flex;
        flex: 0 0 23px;
        align-items: center;
        justify-content: center;
        width: 23px;
        height: 23px;
        overflow: hidden;
    }

    .mobile-app-nav__icon svg {
        display: block;
        width: 23px !important;
        height: 23px !important;
        max-width: 23px;
        max-height: 23px;
        fill: none !important;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-app-nav__label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        font-size: 11px;
        font-weight: 500;
        line-height: 14px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-app-nav__item.is-active {
        color: var(--ink);
        background: var(--mint-pale);
    }

    .mobile-app-nav__item.is-active .mobile-app-nav__icon {
        color: var(--gold-deep);
    }

    .mobile-app-nav__item:focus-visible {
        outline: 2px solid var(--gold);
        outline-offset: -2px;
    }

    /* Prevent hover effects from feeling awkward on touchscreens. */

    body.dashboard .grid > .card:hover {
        transform: none;
        border-left-color: var(--gold-line);
        box-shadow: 0 3px 12px rgba(30, 35, 31, 0.035);
    }

    body.dashboard .quick-links a:hover {
        transform: none;
    }
}

/* =========================================
   SMALL PHONES
   ========================================= */

@media screen and (max-width: 380px) {

    :root {
        --mobile-page-gutter: 12px;
    }

    body.dashboard .dashboard-content {
        padding-right: 12px;
        padding-left: 12px;
    }

    body.dashboard .greeting-card {
        padding: 22px 17px;
    }

    body.dashboard .grid > .card {
        padding: 17px;
    }

    body.dashboard .quick-links {
        gap: 8px;
    }

    body.dashboard .quick-links a {
        padding: 11px 7px;
        font-size: 0.81rem;
    }

    .mobile-header-menu > summary {
        gap: 6px;
        min-height: 40px;
        padding: 8px 11px;
        font-size: 0.84rem;
    }

    .mobile-app-nav {
        padding-right: 6px;
        padding-left: 6px;
    }

    .mobile-app-nav__label {
        font-size: 10px;
    }
}

/* =========================================
   REDUCED MOTION ACCESSIBILITY
   ========================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
