:root {
    --ink: #1f241f;
    --muted: #697064;
    --paper: #f6f7f1;
    --surface: #ffffff;
    --surface-soft: #f9faf5;
    --surface-muted: #eef4ed;
    --line: #d9ded0;
    --line-strong: #c8d0bf;
    --green: #14786a;
    --green-dark: #0b5149;
    --blue: #2e6f9d;
    --coral: #bd5b49;
    --amber: #c98918;
    --danger: #a6342f;
    --shadow: 0 18px 42px rgba(32, 35, 31, 0.12);
    --shadow-soft: 0 10px 28px rgba(32, 35, 31, 0.08);
    --page-gradient: linear-gradient(135deg, #f7f8f1 0%, #f5fbff 52%, #fff8f3 100%);
    --header-bg: rgba(246, 247, 241, 0.92);
    --sidebar-bg: linear-gradient(180deg, #ffffff 0%, #f7f9f2 100%);
    --app-main-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0) 240px);
    --task-rail-bg: rgba(255, 255, 255, 0.72);
    --brand-bg: #e9f5ef;
    --hover-bg: #eef5eb;
    --active-bg: #e4f3ed;
    --active-bg-soft: #e8f5ef;
    --quote-bg: rgba(255, 255, 255, 0.82);
    --score-item-bg: linear-gradient(180deg, rgba(249, 250, 245, 0.72), rgba(255, 255, 255, 0));
    --panel-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.86));
    --hero-panel-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 245, 0.86));
    --field-border: #cfd2c7;
    --progress-track: #e6e9df;
    --button-contrast: #ffffff;
}

[data-theme="dark"] {
    --ink: #edf3ee;
    --muted: #a9b5ad;
    --paper: #101412;
    --surface: #171d1a;
    --surface-soft: #202821;
    --surface-muted: #243129;
    --line: #2d3831;
    --line-strong: #415047;
    --green: #62d0bd;
    --green-dark: #a8eadf;
    --blue: #77b8ea;
    --coral: #ef8b76;
    --amber: #f1b95f;
    --danger: #ef7770;
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.28);
    --page-gradient: linear-gradient(135deg, #0f1412 0%, #111a1f 55%, #171316 100%);
    --header-bg: rgba(16, 20, 18, 0.92);
    --sidebar-bg: linear-gradient(180deg, #151b18 0%, #111713 100%);
    --app-main-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 240px);
    --task-rail-bg: rgba(18, 23, 21, 0.78);
    --brand-bg: #173d35;
    --hover-bg: #1f312b;
    --active-bg: #173d35;
    --active-bg-soft: #1b463d;
    --quote-bg: rgba(23, 29, 26, 0.86);
    --score-item-bg: linear-gradient(180deg, rgba(32, 40, 33, 0.72), rgba(23, 29, 26, 0));
    --panel-gradient: linear-gradient(135deg, rgba(23, 29, 26, 0.96), rgba(17, 26, 31, 0.86));
    --hero-panel-gradient: linear-gradient(135deg, rgba(23, 29, 26, 0.98), rgba(32, 40, 33, 0.86));
    --field-border: #46534b;
    --progress-track: #303a33;
    --button-contrast: #0b1512;
}

[data-theme="firewall"] {
    --ink: #2d1716;
    --muted: #75534f;
    --paper: #f8f1ef;
    --surface: #fffafa;
    --surface-soft: #fff4f1;
    --surface-muted: #fde8e3;
    --line: #e7c3bd;
    --line-strong: #d79c94;
    --green: #c81f1f;
    --green-dark: #7d1111;
    --blue: #5d5d66;
    --coral: #ef5b41;
    --amber: #d98322;
    --danger: #9f1515;
    --shadow: 0 18px 42px rgba(91, 21, 16, 0.16);
    --shadow-soft: 0 10px 28px rgba(91, 21, 16, 0.10);
    --page-gradient: linear-gradient(135deg, #f9f0ed 0%, #fff8f5 46%, #f4e4df 100%);
    --header-bg: rgba(248, 241, 239, 0.94);
    --sidebar-bg: linear-gradient(180deg, #fffafa 0%, #f9ebe7 100%);
    --app-main-bg: linear-gradient(180deg, rgba(255, 250, 250, 0.74), rgba(255, 250, 250, 0) 240px);
    --task-rail-bg: rgba(255, 250, 250, 0.76);
    --brand-bg: #ffe0da;
    --hover-bg: #ffe8e3;
    --active-bg: #ffdcd5;
    --active-bg-soft: #ffe6e1;
    --quote-bg: rgba(255, 250, 250, 0.88);
    --score-item-bg: linear-gradient(180deg, rgba(255, 244, 241, 0.82), rgba(255, 250, 250, 0));
    --panel-gradient: linear-gradient(135deg, rgba(255, 250, 250, 0.96), rgba(255, 239, 235, 0.88));
    --hero-panel-gradient: linear-gradient(135deg, rgba(255, 250, 250, 0.98), rgba(255, 244, 241, 0.88));
    --field-border: #d7aaa2;
    --progress-track: #efd4cf;
}

[data-theme="ocean"] {
    --ink: #17252d;
    --muted: #647780;
    --paper: #f1f8fb;
    --surface: #ffffff;
    --surface-soft: #f4fbfd;
    --surface-muted: #e4f4f8;
    --line: #cfe1e7;
    --line-strong: #a9c7d0;
    --green: #0f7f84;
    --green-dark: #07565b;
    --blue: #1f7fc1;
    --coral: #d16d5b;
    --amber: #c8942d;
    --shadow: 0 18px 42px rgba(20, 55, 66, 0.13);
    --shadow-soft: 0 10px 28px rgba(20, 55, 66, 0.08);
    --page-gradient: linear-gradient(135deg, #f1f8fb 0%, #effcff 48%, #f8fbf4 100%);
    --header-bg: rgba(241, 248, 251, 0.94);
    --sidebar-bg: linear-gradient(180deg, #ffffff 0%, #edf8fb 100%);
    --app-main-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0) 240px);
    --task-rail-bg: rgba(255, 255, 255, 0.74);
    --brand-bg: #dff3f4;
    --hover-bg: #e8f6f8;
    --active-bg: #d9f0f2;
    --active-bg-soft: #e4f5f7;
    --quote-bg: rgba(255, 255, 255, 0.86);
    --score-item-bg: linear-gradient(180deg, rgba(244, 251, 253, 0.82), rgba(255, 255, 255, 0));
    --panel-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 249, 252, 0.88));
    --hero-panel-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 251, 253, 0.88));
    --field-border: #bbd4dc;
    --progress-track: #d8e9ee;
}

[data-theme="forest"] {
    --ink: #202719;
    --muted: #6b735d;
    --paper: #f5f8ef;
    --surface: #ffffff;
    --surface-soft: #f7faef;
    --surface-muted: #edf3df;
    --line: #d9e0c9;
    --line-strong: #b8c69e;
    --green: #4d7c2f;
    --green-dark: #2e541b;
    --blue: #4e7d8e;
    --coral: #bd7257;
    --amber: #b78d1c;
    --shadow: 0 18px 42px rgba(48, 69, 28, 0.13);
    --shadow-soft: 0 10px 28px rgba(48, 69, 28, 0.08);
    --page-gradient: linear-gradient(135deg, #f5f8ef 0%, #fbfbf3 48%, #edf6e8 100%);
    --header-bg: rgba(245, 248, 239, 0.94);
    --sidebar-bg: linear-gradient(180deg, #ffffff 0%, #f0f6e6 100%);
    --app-main-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0) 240px);
    --task-rail-bg: rgba(255, 255, 255, 0.74);
    --brand-bg: #e8f2dc;
    --hover-bg: #edf5e5;
    --active-bg: #e2efd5;
    --active-bg-soft: #edf5e5;
    --quote-bg: rgba(255, 255, 255, 0.86);
    --score-item-bg: linear-gradient(180deg, rgba(247, 250, 239, 0.82), rgba(255, 255, 255, 0));
    --panel-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 232, 0.88));
    --hero-panel-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 239, 0.88));
    --field-border: #c3ceb3;
    --progress-track: #dde7cf;
}

[data-theme="graphite"] {
    --ink: #202326;
    --muted: #6b7075;
    --paper: #f4f5f6;
    --surface: #ffffff;
    --surface-soft: #f8f9fa;
    --surface-muted: #eceff1;
    --line: #d5dadd;
    --line-strong: #b8c0c5;
    --green: #3d6f74;
    --green-dark: #243f44;
    --blue: #586f9e;
    --coral: #b96458;
    --amber: #9f7b28;
    --shadow: 0 18px 42px rgba(28, 34, 38, 0.13);
    --shadow-soft: 0 10px 28px rgba(28, 34, 38, 0.08);
    --page-gradient: linear-gradient(135deg, #f4f5f6 0%, #ffffff 48%, #eef1f2 100%);
    --header-bg: rgba(244, 245, 246, 0.94);
    --sidebar-bg: linear-gradient(180deg, #ffffff 0%, #f0f2f3 100%);
    --app-main-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0) 240px);
    --task-rail-bg: rgba(255, 255, 255, 0.74);
    --brand-bg: #e7eef0;
    --hover-bg: #edf2f3;
    --active-bg: #e2ebed;
    --active-bg-soft: #ebf1f2;
    --quote-bg: rgba(255, 255, 255, 0.86);
    --score-item-bg: linear-gradient(180deg, rgba(248, 249, 250, 0.82), rgba(255, 255, 255, 0));
    --panel-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 243, 244, 0.88));
    --hero-panel-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.88));
    --field-border: #c6cdd1;
    --progress-track: #dfe5e7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-gradient);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
}

.app-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 146px;
    min-height: 100vh;
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: var(--sidebar-bg);
    box-shadow: 10px 0 30px rgba(32, 35, 31, 0.05);
    padding: 18px 14px;
}

.sidebar-brand {
    margin-bottom: 14px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(20, 120, 106, 0.22);
    border-radius: 8px;
    background: var(--brand-bg);
    color: var(--green-dark);
    font-size: 1rem;
    font-weight: 950;
}

.brand-subtitle {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 760;
    margin-top: 1px;
}

.sidebar-nav {
    display: grid;
    gap: 12px;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-section {
    display: grid;
    gap: 3px;
}

.sidebar-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0 10px 3px;
    text-transform: uppercase;
}

.sidebar-link,
.sidebar-utility {
    display: flex;
    min-height: 32px;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 840;
    padding: 6px 10px;
    text-align: left;
    transition: background 150ms ease, color 150ms ease, transform 150ms ease;
    width: 100%;
}

.sidebar-link:hover,
.sidebar-utility:hover {
    background: var(--hover-bg);
    color: var(--green-dark);
    transform: translateX(2px);
}

.sidebar-link.is-active,
.sidebar-utility.is-active {
    background: var(--active-bg);
    color: var(--green-dark);
    box-shadow: inset 3px 0 0 var(--green);
}

.nav-code {
    display: inline-grid;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 950;
}

.sidebar-link.is-active .nav-code,
.sidebar-link:hover .nav-code {
    border-color: rgba(20, 120, 106, 0.28);
    background: var(--surface);
    color: var(--green-dark);
}

.sidebar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border-top: 1px solid var(--line);
    margin-top: auto;
    padding-top: 12px;
}

.sidebar-actions .button {
    grid-column: 1 / -1;
    min-height: 38px;
    width: 100%;
}

.sidebar-user {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    padding: 2px 8px 6px;
}

.sidebar-user span {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.sidebar-user strong {
    overflow: hidden;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-form {
    grid-column: 1 / -1;
    display: grid;
    gap: 6px;
}

.theme-form label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0 8px;
    text-transform: uppercase;
}

.theme-select-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}

.theme-select-row select,
.theme-select-row button {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 800;
}

.theme-select-row select {
    min-width: 0;
    padding: 6px 8px;
}

.theme-select-row button {
    cursor: pointer;
    padding: 6px 9px;
}

.theme-select-row button:hover {
    border-color: var(--green);
    color: var(--green-dark);
}

.theme-form-mobile {
    border-top: 1px solid var(--line);
    margin-top: 5px;
    padding-top: 8px;
}

.theme-form-mobile label {
    padding: 0;
}

.theme-form-mobile .theme-select-row {
    grid-template-columns: 1fr;
}

.sidebar-actions .sidebar-utility {
    min-height: 32px;
    justify-content: center;
    padding: 6px 8px;
    white-space: nowrap;
}

.sidebar-actions .inline-form {
    display: block;
    min-width: 0;
}

.app-main {
    min-width: 0;
    background: var(--app-main-bg);
}

.task-rail {
    position: sticky;
    top: 0;
    height: 100vh;
    border-left: 1px solid var(--line);
    background: var(--task-rail-bg);
    padding: 18px 12px;
    backdrop-filter: blur(12px);
}

.task-rail-label {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
}

.task-rail-nav {
    display: grid;
    gap: 9px;
}

.task-rail-link {
    display: grid;
    min-height: 72px;
    justify-items: center;
    align-content: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(32, 35, 31, 0.05);
    transition: border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
}

.task-rail-link:hover {
    border-color: rgba(20, 120, 106, 0.34);
    color: var(--green-dark);
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.task-rail-link.is-active {
    border-color: rgba(20, 120, 106, 0.34);
    background: var(--active-bg);
    color: var(--green-dark);
    box-shadow: inset 0 3px 0 var(--green), var(--shadow-soft);
}

.task-rail-link .nav-code {
    width: 28px;
    height: 28px;
}

.mobile-topbar,
.mobile-actions,
.mobile-app-menu,
.mobile-task-menu {
    display: none;
}

.nav,
.tab-nav,
.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: block;
    font-size: 1.25rem;
    font-weight: 920;
    letter-spacing: 0;
    line-height: 1.08;
}

.nav-actions,
.hero-actions,
.form-actions,
.detail-actions,
.card-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link,
.nav-button,
.text-button {
    border: 0;
    background: transparent;
    color: var(--green-dark);
    cursor: pointer;
    font-weight: 700;
    padding: 8px 2px;
}

.inline-form {
    margin: 0;
}

.tab-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 12px;
}

.tab-link {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 850;
    padding: 8px 12px;
}

.tab-link.is-active {
    border-color: var(--green);
    background: var(--active-bg-soft);
    color: var(--green-dark);
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--green);
    border-radius: 8px;
    background: var(--green);
    color: var(--button-contrast);
    cursor: pointer;
    font-weight: 860;
    padding: 10px 18px;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 84, 74, 0.18);
}

.button-small {
    min-height: 38px;
    padding: 8px 13px;
}

.button-secondary {
    background: var(--surface);
    color: var(--green-dark);
}

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

.button-danger {
    border-color: var(--danger);
    background: var(--danger);
}

.button-danger:hover {
    background: #7f2724;
}

.page-shell {
    padding: 32px 0 60px;
}

.app-main .page-shell {
    width: min(1080px, calc(100% - 56px));
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.message {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 12px 14px;
    box-shadow: 0 8px 20px rgba(32, 35, 31, 0.08);
}

.hero {
    min-height: 360px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(20, 28, 24, 0.84), rgba(20, 28, 24, 0.40) 60%, rgba(20, 28, 24, 0.08)),
        url("images/dashboard-banner.png") center / cover;
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 36px;
    color: #ffffff;
}

.dashboard-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
    align-items: stretch;
    gap: 24px;
    padding: 6px 0 0;
}

.dashboard-header h1 {
    max-width: 760px;
    font-size: 2.45rem;
    line-height: 1.08;
    margin: 0;
}

.dashboard-quote {
    display: grid;
    align-content: center;
    border: 1px solid var(--line);
    border-left: 4px solid var(--amber);
    border-radius: 8px;
    background: var(--quote-bg);
    box-shadow: var(--shadow-soft);
    margin: 0;
    padding: 16px 18px;
}

.dashboard-quote p {
    color: var(--ink);
    font-size: 0.98rem;
    margin: 0 0 6px;
}

.dashboard-quote cite {
    color: var(--muted);
    font-size: 0.9rem;
}

.quote-label {
    color: var(--amber);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.hero-copy {
    max-width: 680px;
}

.eyebrow {
    display: inline-block;
    color: var(--amber);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.hero h1,
.form-intro h1,
.auth-copy h1,
.detail-header h1,
.confirm-box h1 {
    font-size: 2.35rem;
    line-height: 1.08;
    margin: 0 0 16px;
}

blockquote {
    margin: 0 0 22px;
}

blockquote p {
    font-size: 1.12rem;
    margin: 0 0 8px;
}

cite {
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    font-weight: 700;
}

.hero-stats {
    width: 270px;
    display: grid;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    padding: 16px;
    backdrop-filter: blur(14px);
}

.hero-stats div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.hero-stats strong {
    font-size: 1.55rem;
}

.hero-stats span {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.section-heading,
.detail-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 34px 0 18px;
}

.dashboard-section-heading {
    margin-top: 30px;
}

.heading-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.section-heading h2,
.panel h2,
.empty-state h2 {
    margin: 0;
    font-size: 1.4rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

.result-card {
    min-height: 118px;
    display: grid;
    align-content: space-between;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(32, 35, 31, 0.08);
    padding: 18px;
}

.result-card span {
    color: var(--muted);
    font-weight: 800;
}

.result-card strong {
    font-size: 2rem;
    line-height: 1;
}

.result-card small {
    color: var(--muted);
    font-weight: 800;
}

.dashboard-board {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
    align-items: start;
    gap: 16px;
    margin-top: 22px;
}

.score-panel,
.streak-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.score-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
}

.score-item {
    display: grid;
    gap: 8px;
    min-height: 150px;
    align-content: space-between;
    padding: 22px 20px;
    background: var(--score-item-bg);
}

.score-item + .score-item {
    border-left: 1px solid var(--line);
}

.score-item span {
    color: var(--muted);
    font-weight: 850;
}

.score-item strong {
    color: var(--ink);
    font-size: 2.55rem;
    line-height: 1;
}

.score-item small {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 820;
}

.streak-panel {
    display: grid;
    gap: 0;
    padding: 20px;
}

.streak-panel header {
    margin-bottom: 8px;
}

.streak-panel h2 {
    font-size: 1.35rem;
    margin: 0;
}

.streak-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding: 13px 0;
}

.streak-row span {
    color: var(--muted);
    font-weight: 850;
}

.streak-row strong {
    color: var(--green-dark);
    font-size: 1.08rem;
}

.today-summary {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    margin-bottom: 18px;
    padding: 18px 20px;
}

.today-summary h3 {
    font-size: 1.28rem;
    margin: 0 0 6px;
}

.today-summary p {
    color: var(--muted);
    margin: 0;
}

.task-switcher {
    display: inline-flex;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(32, 35, 31, 0.06);
    margin: 0;
    padding: 5px;
}

.task-switcher-shell {
    width: min(1120px, calc(100% - 32px));
    margin: -4px auto 12px;
}

.task-switcher-label {
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    padding: 7px 8px 7px 10px;
    text-transform: uppercase;
}

.task-switcher a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 850;
    padding: 7px 12px;
}

.task-switcher a.is-active {
    background: var(--active-bg-soft);
    color: var(--green-dark);
}

.momentum-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.momentum-card,
.focus-progress-row,
.today-page-header {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.momentum-card {
    display: grid;
    gap: 8px;
    padding: 20px;
}

.momentum-card span,
.focus-progress-row span,
.today-score span {
    color: var(--muted);
    font-weight: 800;
}

.momentum-card strong {
    color: var(--green-dark);
    font-size: 1.7rem;
    line-height: 1.1;
}

.momentum-card p {
    color: var(--muted);
    margin: 0;
}

.focus-progress-list {
    display: grid;
    gap: 11px;
}

.focus-progress-row {
    display: grid;
    grid-template-columns: minmax(170px, 0.42fr) minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    border-left: 4px solid transparent;
    padding: 16px 18px 16px 16px;
    transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.focus-progress-row:hover {
    border-left-color: var(--green);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.focus-progress-row strong {
    display: block;
    font-size: 1.05rem;
}

.focus-progress-meter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    align-items: center;
    gap: 12px;
}

.focus-progress-meter span {
    text-align: right;
}

.area-chart-card {
    display: grid;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-gradient);
    box-shadow: var(--shadow-soft);
    margin-top: 14px;
    padding: 20px;
}

.area-chart-card header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.area-chart-card h3 {
    font-size: 1.25rem;
    margin: 0;
}

.area-chart-average {
    display: grid;
    justify-items: end;
}

.area-chart-average strong {
    color: var(--green-dark);
    font-size: 1.55rem;
    line-height: 1;
}

.area-chart-average span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
}

.area-chart {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.area-chart-column {
    min-width: 0;
    display: grid;
    grid-template-rows: 150px auto auto;
    gap: 8px;
    justify-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.area-chart-column:hover {
    border-color: var(--line);
    background: var(--surface);
    transform: translateY(-1px);
}

.area-chart-bar-wrap {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, transparent 0 24%, rgba(105, 112, 100, 0.10) 24% 25%, transparent 25% 49%, rgba(105, 112, 100, 0.10) 49% 50%, transparent 50% 74%, rgba(105, 112, 100, 0.10) 74% 75%, transparent 75%),
        var(--surface-soft);
    overflow: hidden;
}

.area-chart-bar {
    width: 100%;
    height: var(--area-progress);
    border-radius: 7px 7px 0 0;
    background: linear-gradient(180deg, var(--green), var(--blue));
    box-shadow: inset 0 10px 18px rgba(255, 255, 255, 0.16);
}

.area-chart-label {
    max-width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.area-chart-column strong {
    color: var(--green-dark);
    font-size: 1rem;
}

.timeline-card {
    display: grid;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-gradient);
    box-shadow: var(--shadow-soft);
    margin-top: 14px;
    padding: 20px;
}

.timeline-card > header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.timeline-card h3 {
    font-size: 1.25rem;
    margin: 0;
}

.timeline-card > header p {
    max-width: 430px;
    color: var(--muted);
    font-weight: 760;
    margin: 0;
}

.timeline-grid {
    display: grid;
    gap: 12px;
}

.timeline-panel {
    display: grid;
    grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 16px;
}

.timeline-panel-header {
    display: grid;
    align-content: space-between;
    gap: 16px;
}

.timeline-panel-header h4 {
    font-size: 1rem;
    line-height: 1.2;
    margin: 0 0 4px;
}

.timeline-panel-header span,
.timeline-score span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 820;
}

.timeline-score {
    display: grid;
    gap: 3px;
}

.timeline-score strong {
    color: var(--green-dark);
    font-size: 1.55rem;
    line-height: 1;
}

.timeline-chart {
    display: grid;
    grid-template-columns: repeat(var(--timeline-count), minmax(10px, 1fr));
    align-items: end;
    gap: 4px;
    min-height: 150px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, transparent 0 24%, rgba(105, 112, 100, 0.10) 24% 25%, transparent 25% 49%, rgba(105, 112, 100, 0.10) 49% 50%, transparent 50% 74%, rgba(105, 112, 100, 0.10) 74% 75%, transparent 75%),
        var(--surface-soft);
    padding: 10px 8px 6px;
}

.timeline-point {
    min-width: 10px;
    height: 132px;
    display: grid;
    grid-template-rows: 108px 18px;
    align-items: end;
    gap: 6px;
}

.timeline-bar {
    display: block;
    width: 100%;
    height: var(--timeline-progress);
    border-radius: 999px 999px 3px 3px;
    background: linear-gradient(180deg, var(--green), var(--blue));
    box-shadow: inset 0 10px 18px rgba(255, 255, 255, 0.16);
}

.timeline-point.is-future .timeline-bar {
    height: 4px;
    background: var(--progress-track);
    box-shadow: none;
}

.timeline-label {
    min-height: 1em;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
    text-align: center;
}

.today-page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    background: var(--panel-gradient);
    padding: 28px;
}

.today-page-header h1 {
    font-size: 2.35rem;
    line-height: 1.08;
    margin: 0 0 10px;
}

.today-page-header p {
    color: var(--muted);
    margin: 0;
}

.today-score {
    min-width: 150px;
    display: grid;
    justify-items: end;
    border-left: 1px solid var(--line);
    padding-left: 28px;
}

.today-score strong {
    color: var(--green-dark);
    font-size: 2.25rem;
    line-height: 1;
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.focus-card {
    min-height: 230px;
    display: grid;
    align-content: space-between;
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(32, 35, 31, 0.08);
    padding: 18px;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.focus-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(32, 35, 31, 0.12);
}

.focus-code {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--green-dark);
    font-weight: 900;
}

.focus-card h3 {
    font-size: 1.24rem;
    margin: 16px 0 8px;
}

.focus-card p {
    color: var(--muted);
    margin: 0;
}

.focus-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.focus-stats span {
    color: var(--muted);
    font-weight: 800;
}

.focus-stats strong {
    font-size: 1.45rem;
}

.focus-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.46fr);
    gap: 26px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--hero-panel-gradient);
    box-shadow: var(--shadow);
    padding: 28px;
}

.focus-hero h1 {
    max-width: 760px;
    font-size: 2rem;
    line-height: 1.08;
    margin: 0 0 12px;
}

.focus-hero p {
    color: var(--muted);
    max-width: 720px;
    margin: 0;
}

.area-stats {
    display: grid;
    gap: 9px;
}

.area-stats div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 12px 13px;
}

.area-stats strong {
    font-size: 1.4rem;
}

.area-stats span {
    color: var(--muted);
    font-weight: 800;
}

.suggestion-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-row a {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--green-dark);
    font-size: 0.94rem;
    font-weight: 850;
    padding: 8px 11px;
}

.empty-suggestions {
    justify-content: center;
    margin: 16px auto 20px;
    max-width: 760px;
}

.tracker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 16px;
}

.tracker-card,
.panel,
.form-card,
.confirm-box,
.empty-state {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.tracker-card {
    min-height: 282px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.tracker-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.tracker-header h3 {
    font-size: 1.2rem;
    line-height: 1.25;
    margin: 13px 0 8px;
}

.tracker-header p,
.detail-header p,
.muted,
.help-text,
.form-note {
    color: var(--muted);
}

.tracker-header p {
    margin: 0;
}

.category-pill {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
    padding: 5px 9px;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.focus-pill {
    background: #26322d;
}

.category-health {
    background: var(--green);
}

.category-nutrition {
    background: #4f8d44;
}

.category-sleep {
    background: #5f5a96;
}

.category-mobility {
    background: #2f6f9f;
}

.category-study {
    background: var(--blue);
}

.category-finance {
    background: #2d7560;
}

.category-work {
    background: #5f5a96;
}

.category-home {
    background: var(--coral);
}

.category-personal {
    background: var(--amber);
    color: #2d2111;
}

.progress-block {
    display: grid;
    gap: 8px;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-weight: 800;
}

.progress-track {
    height: 11px;
    border-radius: 999px;
    background: var(--progress-track);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), var(--blue));
}

.streak-summary {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    margin-top: 14px;
    padding: 12px;
}

.card-stat-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
}

.card-stat-line strong {
    color: var(--green-dark);
}

.streak-summary span {
    color: var(--muted);
    font-weight: 800;
}

.streak-summary strong {
    color: var(--green-dark);
}

.tracker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.card-links a,
.form-note a {
    color: var(--green-dark);
    font-weight: 800;
}

.empty-state,
.confirm-box {
    padding: 28px;
    text-align: center;
}

.empty-state h2,
.confirm-box h1 {
    margin-bottom: 16px;
}

.form-layout,
.auth-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(280px, 1fr);
    gap: 24px;
    align-items: start;
}

.form-intro,
.auth-copy {
    padding-top: 20px;
}

.form-subhead {
    border-top: 1px solid var(--line);
    color: var(--green-dark);
    font-size: 0.9rem;
    font-weight: 900;
    margin: 20px 0 14px;
    padding-top: 16px;
}

.form-card,
.panel {
    padding: 22px;
}

.auth-card {
    max-width: 520px;
}

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
}

.field label {
    font-weight: 800;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--field-border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 11px 12px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(22, 117, 103, 0.15);
    outline: none;
}

.field ul,
.errorlist {
    color: var(--danger);
    margin: 0;
    padding-left: 20px;
}

.help-text,
.form-note {
    margin: 0;
    font-size: 0.92rem;
}

.detail-header {
    align-items: start;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
    gap: 16px;
}

.meta-list {
    display: grid;
    gap: 12px;
    margin: 22px 0 0;
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.meta-list dt {
    color: var(--muted);
    font-weight: 700;
}

.meta-list dd {
    margin: 0;
    font-weight: 800;
}

.stacked-form {
    display: grid;
    gap: 4px;
}

.undo-form {
    margin-top: 12px;
}

.log-panel {
    margin-top: 16px;
}

.log-list {
    display: grid;
    gap: 12px;
    margin: 16px 0 0;
    padding-left: 20px;
}

.log-list time {
    font-weight: 900;
}

.log-list p {
    color: var(--muted);
    margin: 4px 0 0;
}

@media (max-width: 1120px) and (min-width: 901px) {
    .app-layout {
        grid-template-columns: 226px minmax(0, 1fr) 112px;
    }

    .app-sidebar {
        padding: 18px 12px;
    }

    .app-main .page-shell {
        width: min(100% - 40px, 980px);
    }

    .task-rail {
        padding: 18px 9px;
    }

    .task-rail-link {
        min-height: 64px;
        font-size: 0.84rem;
    }

    .dashboard-header,
    .dashboard-board,
    .focus-hero {
        grid-template-columns: 1fr;
    }

    .today-page-header {
        align-items: start;
    }
}

@media (max-width: 900px) {
    .app-layout {
        display: block;
    }

    .app-sidebar {
        display: none;
    }

    .task-rail {
        display: none;
    }

    .mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 12;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        border-bottom: 1px solid var(--line);
        background: var(--header-bg);
        padding: 12px 16px;
        backdrop-filter: blur(12px);
    }

    .mobile-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-brand .brand-mark {
        width: 34px;
        height: 34px;
    }

    .mobile-app-menu,
    .mobile-task-menu {
        display: block;
        position: relative;
    }

    .mobile-app-menu summary,
    .mobile-task-menu summary {
        display: inline-flex;
        min-height: 38px;
        align-items: center;
        gap: 8px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        color: var(--green-dark);
        cursor: pointer;
        font-weight: 850;
        list-style: none;
        padding: 8px 11px;
    }

    .mobile-app-menu summary::-webkit-details-marker,
    .mobile-task-menu summary::-webkit-details-marker {
        display: none;
    }

    .hamburger-lines,
    .hamburger-lines::before,
    .hamburger-lines::after {
        display: block;
        width: 14px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        content: "";
    }

    .hamburger-lines {
        position: relative;
    }

    .hamburger-lines::before {
        position: absolute;
        top: -5px;
    }

    .hamburger-lines::after {
        position: absolute;
        top: 5px;
    }

    .mobile-nav-panel,
    .mobile-task-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 20;
        display: grid;
        gap: 5px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        box-shadow: var(--shadow);
        padding: 8px;
    }

    .mobile-nav-panel {
        right: auto;
        left: 0;
        width: min(220px, calc(100vw - 28px));
        max-height: calc(100vh - 82px);
        overflow-y: auto;
    }

    .mobile-task-panel {
        width: 176px;
    }

    .mobile-panel-section {
        display: grid;
        gap: 4px;
    }

    .mobile-panel-section + .mobile-panel-section {
        border-top: 1px solid var(--line);
        margin-top: 5px;
        padding-top: 8px;
    }

    .mobile-panel-label {
        color: var(--muted);
        font-size: 0.68rem;
        font-weight: 900;
        letter-spacing: 0.08em;
        padding: 0 8px 2px;
        text-transform: uppercase;
    }

    .mobile-nav-panel a,
    .mobile-panel-link,
    .mobile-task-panel a {
        display: flex;
        min-height: 34px;
        align-items: center;
        gap: 9px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: var(--muted);
        cursor: pointer;
        font-weight: 850;
        padding: 8px 10px;
        text-align: left;
        width: 100%;
    }

    .mobile-nav-panel a.is-active,
    .mobile-task-panel a.is-active {
        border-color: var(--green);
        background: var(--active-bg-soft);
        color: var(--green-dark);
    }

    .mobile-panel-form {
        margin: 0;
    }

    .mobile-nav-panel .theme-form-mobile {
        border-top: 0;
        margin-top: 0;
        padding-top: 0;
    }

    .mobile-new-button {
        gap: 4px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .app-main .page-shell {
        width: min(100% - 32px, 1040px);
    }

    .nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: 430px;
        padding: 24px;
    }

    .hero h1,
    .form-intro h1,
    .auth-copy h1,
    .detail-header h1,
    .confirm-box h1 {
        font-size: 2rem;
    }

    .hero-stats {
        width: 100%;
    }

    .section-heading,
    .detail-header,
    .tracker-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-layout,
    .auth-layout,
    .dashboard-header,
    .dashboard-board,
    .area-chart-card header,
    .focus-hero,
    .today-summary,
    .momentum-grid,
    .focus-progress-row,
    .today-page-header,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .today-score {
        justify-items: start;
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-left: 0;
        padding-top: 18px;
    }

    .focus-progress-meter {
        grid-template-columns: minmax(0, 1fr) 42px;
    }

    .area-chart-card header {
        display: grid;
        align-items: start;
    }

    .timeline-card > header,
    .timeline-panel {
        grid-template-columns: 1fr;
    }

    .timeline-card > header {
        display: grid;
        align-items: start;
    }

    .timeline-card > header p {
        max-width: none;
    }

    .timeline-panel {
        gap: 12px;
    }

    .timeline-panel-header {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    .timeline-score {
        justify-items: end;
        text-align: right;
    }

    .timeline-chart {
        grid-template-columns: repeat(var(--timeline-count), minmax(8px, 1fr));
        gap: 2px;
    }

    .timeline-label {
        font-size: 0.62rem;
    }

    .area-chart-average {
        justify-items: start;
    }

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

    .area-chart-column {
        grid-template-columns: 82px minmax(0, 1fr) 44px;
        grid-template-rows: auto;
        align-items: center;
        text-align: left;
    }

    .area-chart-bar-wrap {
        grid-column: 2;
        grid-row: 1;
        height: 12px;
    }

    .area-chart-bar {
        width: var(--area-progress);
        height: 100%;
        border-radius: inherit;
    }

    .area-chart-label {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .area-chart-column strong {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .detail-actions {
        width: 100%;
    }

    .task-switcher {
        display: flex;
        width: 100%;
        overflow-x: auto;
    }

    .task-switcher a {
        flex: 1 0 auto;
        justify-content: center;
    }

    .task-switcher-label {
        display: none;
    }

    .score-panel {
        grid-template-columns: 1fr;
    }

    .score-item {
        min-height: 104px;
    }

    .score-item + .score-item {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 480px) {
    .mobile-topbar {
        gap: 10px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .mobile-actions {
        gap: 6px;
    }

    .mobile-app-menu summary,
    .mobile-task-menu summary {
        padding-left: 9px;
        padding-right: 9px;
    }

    .mobile-new-button {
        min-width: 38px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .mobile-new-label {
        display: none;
    }

    .app-main .page-shell {
        width: min(100% - 28px, 1040px);
        padding-top: 24px;
    }

    .dashboard-header h1,
    .today-page-header h1 {
        font-size: 2rem;
    }

    .dashboard-quote,
    .today-page-header,
    .focus-hero,
    .tracker-card,
    .panel,
    .form-card,
    .confirm-box,
    .empty-state {
        padding: 18px;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .mobile-brand .brand {
        display: none;
    }
}
