:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-2: #f8fafb;
    --surface-3: #edf1f4;
    --text: #17202b;
    --text-2: #4c5968;
    --muted: #7c8794;
    --line: #dfe5ea;
    --line-strong: #c9d2da;
    --brand: #5151c4;
    --brand-2: #6667d4;
    --brand-soft: #ececfa;
    --accent: #c69b56;
    --danger: #b33b47;
    --danger-soft: #fae9eb;
    --warning: #9b691a;
    --warning-soft: #fff3dc;
    --success: #287453;
    --success-soft: #e5f4ed;
    --focus: #5d5fd0;
    --sidebar: #1b1c31;
    --sidebar-text: #dbe7e5;
    --shadow-sm: 0 1px 2px rgb(19 44 42 / .06), 0 4px 12px rgb(19 44 42 / .04);
    --shadow-lg: 0 24px 70px rgb(14 29 28 / .22);
    --radius: 14px;
    --radius-sm: 9px;
    --sidebar-width: 248px;
    --topbar-height: 68px;
    --ease: 180ms ease;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0f1519; --surface: #171f24; --surface-2: #1c272d; --surface-3: #263138;
        --text: #edf2f4; --text-2: #b9c3c9; --muted: #89969e; --line: #2c3940; --line-strong: #3b4a52;
        --brand: #9698ef; --brand-2: #b1b2ff; --brand-soft: #272844; --danger-soft: #3b2025;
        --warning-soft: #3a2c16; --success-soft: #19362b; --sidebar: #10111f; --shadow-sm: 0 1px 2px rgb(0 0 0 / .2); --shadow-lg: 0 24px 70px rgb(0 0 0 / .5);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1519; --surface: #171f24; --surface-2: #1c272d; --surface-3: #263138;
    --text: #edf2f4; --text-2: #b9c3c9; --muted: #89969e; --line: #2c3940; --line-strong: #3b4a52;
    --brand: #9698ef; --brand-2: #b1b2ff; --brand-soft: #272844; --danger-soft: #3b2025;
    --warning-soft: #3a2c16; --success-soft: #19362b; --sidebar: #10111f; --shadow-sm: 0 1px 2px rgb(0 0 0 / .2); --shadow-lg: 0 24px 70px rgb(0 0 0 / .5);
}

* { box-sizing: border-box; }
html { width: 100%; max-width: 100%; min-height: 100%; overflow-x: hidden; overscroll-behavior-x: none; background: var(--bg); font: 15px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); text-rendering: optimizeLegibility; }
body { width: 100%; max-width: 100%; min-height: 100vh; min-height: 100dvh; margin: 0; overflow-x: hidden; overscroll-behavior-x: none; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .45rem; font-size: clamp(1.65rem, 3vw, 2.4rem); line-height: 1.12; letter-spacing: -.035em; }
h2 { margin-bottom: .4rem; font-size: 1.1rem; line-height: 1.25; letter-spacing: -.015em; }
h3 { margin-bottom: .35rem; }
p { margin-bottom: 1rem; color: var(--text-2); }
small, .muted { color: var(--muted); }
.hidden { display: none !important; }
.lead { font-size: 1.08rem; line-height: 1.65; }
.eyebrow { margin: 0 0 .38rem; color: var(--brand-2); font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.quiet-state { margin: 1rem 0; color: var(--muted); }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; }
::selection { background: var(--brand-soft); }

.button, button.button {
    display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: .5rem; padding: .55rem .9rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-weight: 700;
    cursor: pointer; transition: border-color var(--ease), background var(--ease), color var(--ease), transform var(--ease), box-shadow var(--ease); text-decoration: none;
}
.button:hover { border-color: var(--brand-2); background: var(--surface-2); text-decoration: none; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .46; cursor: not-allowed; transform: none; }
.button-primary { border-color: var(--brand) !important; background: var(--brand) !important; color: #fff !important; box-shadow: 0 4px 13px rgb(81 81 196 / .16); }
.button-primary:hover { background: var(--brand-2) !important; }
.button-secondary { background: var(--surface-2); }
.button-ghost, .button-quiet { border-color: transparent; background: transparent; box-shadow: none; }
.button-quiet { color: var(--text-2); }
.button-success { border-color: var(--success); background: var(--success); color: #fff; }
.button-focus { border-color: color-mix(in srgb, var(--focus) 40%, var(--line)); background: color-mix(in srgb, var(--focus) 10%, var(--surface)); color: var(--focus); }
.button-danger-quiet { border-color: transparent; background: transparent; color: var(--danger); }
.button-block { width: 100%; }
.button-large { min-height: 50px; padding: .75rem 1.25rem; font-size: 1rem; }
.button.compact { min-height: 32px; padding: .3rem .55rem; font-size: .78rem; }
.icon-button { display: inline-grid !important; width: 40px; min-width: 40px; height: 40px; min-height: 40px; place-items: center; padding: 0 !important; border-color: transparent; background: transparent; }
.icon-button:hover { background: var(--surface-3); }
.icon-button.danger { color: var(--danger); }

.field { display: grid; align-content: start; gap: .36rem; }
.field > label, .field > :first-child:is(label) { color: var(--text-2); font-size: .79rem; font-weight: 750; }
input, select, textarea {
    width: 100%; min-height: 42px; padding: .58rem .68rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); transition: border-color var(--ease), box-shadow var(--ease);
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 16%, transparent); }
input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid > .field:has(textarea), .form-grid > .check-field, .field-wide { grid-column: 1 / -1; }
.more-options { grid-column: 1 / -1; padding: .25rem 0; }.more-options > summary { width: fit-content; color: var(--brand-2); font-weight: 750; cursor: pointer; }.advanced-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }.advanced-grid > .field:has(textarea) { grid-column: 1 / -1; }
.form-stack { display: grid; gap: 1rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .65rem; }
.check-field { display: flex; min-height: 42px; align-items: center; gap: .65rem; color: var(--text-2); font-weight: 650; cursor: pointer; }
.field-error { color: var(--danger); font-size: .84rem; }

.brand-mark { display: inline-grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #e5c991); color: #17302e; font-weight: 900; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .26); }
.brand-lockup { display: flex; align-items: center; gap: .75rem; color: var(--text); font-weight: 850; letter-spacing: .04em; }
.app-loading { display: grid; min-height: 100vh; min-height: 100dvh; place-content: center; text-align: center; }
.boot-mark { display: flex; align-items: center; justify-content: center; gap: .65rem; }

.app-shell { display: grid; width: 100%; max-width: 100%; min-height: 100vh; min-height: 100dvh; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); overflow-x: hidden; overflow-x: clip; }
.sidebar { position: sticky; top: 0; z-index: 20; display: flex; width: var(--sidebar-width); height: 100vh; height: 100dvh; flex-direction: column; padding: 1rem .8rem; overflow: auto; background: var(--sidebar); color: var(--sidebar-text); transition: width var(--ease); }
.sidebar-brand { display: flex; min-height: 48px; align-items: center; gap: .65rem; padding: 0 .35rem 1rem; }
.sidebar-brand strong { flex: 1; white-space: nowrap; letter-spacing: .05em; }
.sidebar .icon-button { color: var(--sidebar-text); }
.sidebar .icon-button:hover { background: rgb(255 255 255 / .09); }
.sidebar-nav { display: grid; gap: 1.25rem; padding-top: .5rem; }
.nav-group { display: grid; gap: .2rem; }
.nav-label { padding: 0 .7rem .35rem; color: rgb(219 231 229 / .53); font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-item { display: flex; min-height: 40px; align-items: center; gap: .72rem; padding: .5rem .7rem; border-radius: 9px; color: rgb(219 231 229 / .78); text-decoration: none; white-space: nowrap; }
.nav-item:hover { background: rgb(255 255 255 / .07); color: #fff; text-decoration: none; }
.nav-item.is-active { background: rgb(255 255 255 / .12); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav-count { min-width: 21px; margin-left: auto; padding: .08rem .38rem; border-radius: 20px; background: rgb(255 255 255 / .13); color: #fff; font-size: .7rem; text-align: center; }
.sidebar-user { display: flex; align-items: center; gap: .35rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid rgb(255 255 255 / .1); }
.user-link { display: flex; min-width: 0; flex: 1; align-items: center; gap: .65rem; color: inherit; text-decoration: none; }
.user-link > span:last-child { display: grid; min-width: 0; }
.user-link strong, .user-link small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .avatar { background: rgb(255 255 255 / .12); color: #fff; }
.sidebar.is-collapsed { width: 76px; }
.sidebar.is-collapsed .sidebar-brand strong, .sidebar.is-collapsed .nav-label, .sidebar.is-collapsed .nav-item span, .sidebar.is-collapsed .nav-count, .sidebar.is-collapsed .user-link > span:last-child { display: none; }
.sidebar.is-collapsed .nav-item { justify-content: center; }
.app-shell:has(.sidebar.is-collapsed) { --sidebar-width: 76px; }

.workspace { width: 100%; max-width: 100%; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; width: 100%; max-width: 100%; min-width: 0; height: var(--topbar-height); align-items: center; justify-content: space-between; padding: 0 clamp(1rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); }
.topbar-title { font-size: .92rem; }
.topbar-actions { display: flex; min-width: 0; gap: .55rem; }
.main-content { width: min(1480px, 100%); max-width: 100%; min-height: calc(100vh - var(--topbar-height)); min-height: calc(100dvh - var(--topbar-height)); margin: 0 auto; padding: clamp(1.1rem, 3vw, 2.5rem); }
.main-content:focus { outline: none; }
.page-loading { display: grid; gap: .7rem; padding: 2rem 0; }
.loading-line { display: block; width: min(600px, 90%); height: 18px; border-radius: 20px; background: linear-gradient(90deg, var(--surface-3), var(--surface), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.loading-line.short { width: 38%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.page-heading h1 { margin: 0; text-transform: none; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.section-block { margin: 1.5rem 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.section-heading p { margin: 0; }
.panel, .detail-card, .detail-sidebar, .wizard-card, .settings-section, .project-hero { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel { min-width: 0; padding: 1.15rem; }
.panel-heading { display: flex; justify-content: space-between; margin-bottom: .85rem; }
.dashboard-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 1rem; margin: 1.4rem 0; }

.metric-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.3rem; }
.metric-card { display: grid; gap: .25rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.metric-card span { color: var(--muted); font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.metric-card strong { font-size: 1.4rem; }
.capacity-pill, .status-pill, .category-pill, .entity-pill, .next-pill, .due-pill, .version-pill { display: inline-flex; align-items: center; width: fit-content; padding: .24rem .55rem; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: .69rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.due-pill { background: var(--warning-soft); color: var(--warning); }
.next-pill { background: var(--brand-soft); color: var(--brand-2); }

.big-three-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.big-card { display: flex; min-height: 230px; flex-direction: column; padding: 1.15rem; border: 1px solid var(--line); border-top: 4px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); text-align: left; }
.big-card.big-money { border-top-color: #36865e; }.big-card.big-frog { border-top-color: #a46852; }.big-card.big-system { border-top-color: #557bb0; }
.big-card-top, .detail-badges, .project-top { display: flex; align-items: center; justify-content: space-between; gap: .55rem; }
.big-card h3 { margin: 1.1rem 0 .55rem; font-size: 1.2rem; }
.big-card .next-action { flex: 1; }
.big-card footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.big-empty { align-items: flex-start; border-style: dashed; color: var(--text); cursor: pointer; }
.big-empty:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.empty-big-plus { margin: auto; color: var(--brand-2); font-size: 2.2rem; font-weight: 300; }

.company-badge { display: inline-flex; align-items: center; gap: .38rem; color: var(--text-2); font-size: .75rem; font-weight: 700; }
.company-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--company-color, #98a2b3); box-shadow: 0 0 0 2px color-mix(in srgb, var(--company-color, #98a2b3) 18%, transparent); }
.company-badge.is-personal { color: var(--muted); }
.type-badge { display: inline-flex; align-items: center; gap: .28rem; width: fit-content; padding: .2rem .45rem; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-size: .66rem; font-weight: 850; letter-spacing: .035em; white-space: nowrap; }
.type-money { background: #e5f3eb; color: #286747; }.type-frog { background: #f4e9e4; color: #87513e; }.type-system { background: #e8eef7; color: #3f628e; }
.type-quick_win { background: #fff2d8; color: #94631b; }.type-people { background: #eeeafa; color: #65519d; }.type-admin { background: var(--surface-3); color: var(--text-2); }
:root[data-theme="dark"] .type-money { background: #19382a; color: #8ed1ad; }:root[data-theme="dark"] .type-frog { background: #3b2923; color: #d8a792; }:root[data-theme="dark"] .type-system { background: #202f42; color: #93b7e5; }

.task-row, .attention-row { display: grid; width: 100%; min-height: 54px; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: .7rem; padding: .55rem .25rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.task-row:hover, .attention-row:hover { background: var(--surface-2); }
.task-row-main { display: grid; }
.task-check { width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 50%; }
.agenda-list, .compact-list, .attention-list, .summary-list { display: grid; }
.agenda-row { display: grid; grid-template-columns: 48px 8px minmax(0, 1fr); align-items: center; gap: .65rem; padding: .62rem 0; border-bottom: 1px solid var(--line); }
.agenda-row time { font-variant-numeric: tabular-nums; color: var(--muted); }
.event-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); }
.attention-row { grid-template-columns: 90px minmax(0, 1fr) minmax(100px, .7fr) auto; }
.attention-label { color: var(--warning); font-size: .72rem; font-weight: 800; text-transform: uppercase; }

.empty-state { display: grid; min-height: 180px; place-items: center; align-content: center; padding: 1.5rem; color: var(--muted); text-align: center; }
.empty-state p { max-width: 440px; margin-bottom: 1rem; }
.empty-mark { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: .7rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand-2); }
.callout { padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); }
.callout-danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); background: var(--danger-soft); color: var(--danger); }
.callout-warning { border-color: color-mix(in srgb, var(--warning) 30%, var(--line)); background: var(--warning-soft); color: var(--warning); }
.callout-success { border-color: color-mix(in srgb, var(--success) 30%, var(--line)); background: var(--success-soft); color: var(--success); }

.filter-bar { display: grid; grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(120px, .5fr)) auto; gap: .55rem; margin-bottom: 1rem; padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.filter-bar input, .filter-bar select, .filter-bar .button { min-height: 38px; }
.list-summary { display: flex; justify-content: flex-end; margin-bottom: .45rem; color: var(--muted); font-size: .8rem; }
.data-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.data-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .85rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.data-row:last-child { border-bottom: 0; }.data-row:hover { background: var(--surface-2); }
.data-main { display: grid; min-width: 0; gap: .38rem; }
.data-main p { display: -webkit-box; overflow: hidden; margin: 0; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.row-title, .row-meta, .row-tail, .row-actions { display: flex; align-items: center; gap: .55rem; }
.row-title { flex-wrap: wrap; }.row-meta { flex-wrap: wrap; color: var(--muted); font-size: .76rem; }.row-tail { justify-content: flex-end; color: var(--muted); font-size: .78rem; }
.status-completed .data-main strong { color: var(--muted); text-decoration: line-through; }

.inbox-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.inbox-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .75rem .85rem; border-bottom: 1px solid var(--line); }
.inbox-row:last-child { border-bottom: 0; }
.inbox-content { display: grid; gap: .28rem; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.processing-mode { display: grid; gap: 1rem; }
.processing-progress { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .8rem; }
.processing-progress progress { width: 100%; height: 7px; accent-color: var(--brand); }
.processing-mode blockquote { margin: .5rem 0; padding: 1.1rem; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); font-size: 1.12rem; }
.processing-targets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.processing-target { justify-content: flex-start; }
.target-trash { color: var(--danger); }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 1rem; }
.detail-card { display: grid; gap: 1.1rem; min-height: 360px; padding: 1.35rem; }
.detail-sidebar { display: grid; gap: .7rem; padding: 1rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: auto; }
.next-action-card { display: grid; gap: .2rem; padding: .9rem; border-left: 3px solid var(--brand-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--brand-soft); }
.next-action-card span { color: var(--brand-2); font-size: .68rem; font-weight: 850; letter-spacing: .06em; }
.tag-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.notes-box { padding: 1rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.notes-box p { white-space: pre-wrap; }
.history-block, .activity-log { display: grid; gap: .35rem; padding-top: .8rem; border-top: 1px solid var(--line); }.history-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .4rem 0; color: var(--text-2); font-size: .8rem; }.activity-log summary { font-weight: 750; cursor: pointer; }
.info-pair { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; }
.info-pair span { color: var(--muted); font-size: .77rem; }.info-pair strong { text-align: right; }
.danger-zone { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }

.project-grid, .idea-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.project-card, .idea-card { display: grid; min-height: 245px; gap: .65rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); text-align: left; cursor: pointer; }
.project-card:hover, .idea-card:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: 0 10px 28px rgb(19 44 42 / .08); }
.project-card h2, .idea-card h2 { margin-top: .2rem; font-size: 1.18rem; }
.project-card p, .idea-card p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.progress-line { height: 6px; margin-top: auto; overflow: hidden; border-radius: 9px; background: var(--surface-3); }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: var(--brand-2); }
.project-stats, .idea-card footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .76rem; }
.next-action-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding-top: .6rem; border-top: 1px solid var(--line); }.next-action-preview > span { display: grid; gap: .12rem; }
.next-action-preview small { font-size: .65rem; font-weight: 800; letter-spacing: .05em; }
.project-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem; padding: 1.4rem; }
.progress-ring { display: grid; width: 112px; height: 112px; place-content: center; border-radius: 50%; background: conic-gradient(var(--brand-2) var(--progress), var(--surface-3) 0); position: relative; text-align: center; }
.progress-ring::after { position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); content: ""; }
.progress-ring strong, .progress-ring small { position: relative; z-index: 1; }.progress-ring strong { font-size: 1.35rem; }
.step-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .7rem .85rem; border-bottom: 1px solid var(--line); }
.step-row:last-child { border-bottom: 0; }.step-row.is-next { background: var(--brand-soft); }
.step-main { display: grid; gap: .25rem; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }.step-main > span { display: flex; align-items: center; gap: .5rem; }

.followup-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.followup-card { display: grid; gap: 1rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.followup-card.is-due { border-top: 3px solid var(--warning); }
.followup-person { display: flex; align-items: center; gap: .65rem; }.followup-person > div { display: grid; }
.followup-task { display: grid; gap: .45rem; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }.followup-task h2 { font-size: 1.17rem; }
.followup-dates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; padding: .7rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.followup-dates .info-pair { display: grid; gap: .1rem; }.followup-dates .info-pair strong { text-align: left; }
.followup-card footer { display: flex; align-items: center; justify-content: space-between; }
.avatar { display: inline-grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-2); font-size: .73rem; font-weight: 850; }.avatar-large { width: 48px; height: 48px; }

.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.calendar-nav, .segmented { display: flex; align-items: center; gap: .35rem; }.calendar-nav strong { min-width: 150px; text-align: center; }
.segmented { padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }.segmented .button { min-height: 33px; border: 0; background: transparent; }.segmented .is-active { background: var(--brand-soft); color: var(--brand-2); }
.rotate-icon svg { transform: rotate(180deg); }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; align-items: start; gap: 1rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(118px, 1fr)); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.calendar-grid.days-1 { grid-template-columns: minmax(280px, 1fr); }
.calendar-day { min-height: 520px; border-right: 1px solid var(--line); }.calendar-day:last-child { border-right: 0; }.calendar-day.is-dragover { background: var(--brand-soft); }
.calendar-day > header { display: flex; align-items: center; justify-content: space-between; padding: .55rem .65rem; border-bottom: 1px solid var(--line); color: var(--muted); text-transform: capitalize; }.calendar-day.is-today > header { background: var(--brand); color: #fff; }
.day-events { display: grid; align-content: start; gap: .35rem; min-height: 460px; padding: .45rem; }
.calendar-event, .calendar-task-block { display: grid; gap: .12rem; padding: .48rem; border: 1px solid var(--line); border-left: 3px solid var(--brand-2); border-radius: 7px; background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; }.calendar-event time, .calendar-task-block time { color: var(--muted); font-size: .67rem; }.calendar-event strong, .calendar-task-block strong { font-size: .77rem; line-height: 1.3; }
.event-meeting { border-left-color: #8057a3; }.event-focus_block { border-left-color: var(--focus); }.event-personal { border-left-color: var(--accent); }.calendar-task-block { border-left-color: #5d7996; }
.day-empty { min-height: 52px; border: 1px dashed var(--line); border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }.day-empty:hover { border-color: var(--brand-2); color: var(--brand-2); }
.calendar-tasks { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }.draggable-task { display: grid; gap: .28rem; padding: .55rem 0; border-bottom: 1px solid var(--line); cursor: grab; }
.agenda-view { display: grid; gap: 1.3rem; }.agenda-view section { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }.agenda-view .calendar-event { grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; }

.frozen-list { display: grid; gap: .7rem; }.frozen-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.frozen-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: #e8f4f8; color: #4f8394; font-size: 1.2rem; }
.wizard-page { width: min(920px, 100%); margin: 0 auto; }.wizard-progress { display: flex; gap: .35rem; margin-bottom: 1rem; }.wizard-progress span { flex: 1; height: 5px; border-radius: 5px; background: var(--surface-3); }.wizard-progress span.is-active { background: var(--brand-2); }
.wizard-card { display: grid; gap: 1rem; min-height: 390px; align-content: start; padding: clamp(1.2rem, 3vw, 2rem); }.wizard-controls { display: flex; justify-content: space-between; margin-top: 1rem; }.capacity-hero { display: grid; gap: .2rem; padding: 1.2rem; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand-2); }.capacity-hero strong { font-size: 2.1rem; }
.choice-dialog { display: grid; gap: .75rem; }.choice-list { display: grid; gap: .45rem; }.choice-list > button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }.choice-list > button:hover, .choice-list > button.is-selected { border-color: var(--brand-2); background: var(--brand-soft); }.choice-list > button:disabled { opacity: .58; cursor: wait; }.choice-list > button span { display: grid; }
.shutdown-list { display: grid; gap: .5rem; }.shutdown-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px 155px; align-items: center; gap: .65rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }.shutdown-row > div { display: grid; }.shutdown-finish { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 1rem; border-radius: var(--radius); background: var(--brand-soft); }.shutdown-finish p { margin: 0; }
.closure-screen { display: grid; min-height: calc(100vh - 150px); place-content: center; justify-items: center; text-align: center; }.success-mark { display: grid; width: 70px; height: 70px; place-items: center; margin-bottom: 1rem; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 2rem; font-weight: 900; }
.review-page { width: min(900px, 100%); margin: 0 auto; }.review-count { color: var(--brand-2); font-size: 4rem; font-weight: 850; line-height: 1; }.review-card { justify-items: start; }

.focus-active { grid-template-columns: 1fr; }.focus-active .sidebar, .focus-active .topbar, .focus-active .mobile-nav { display: none; }.focus-active .main-content { width: 100%; min-height: 100vh; padding: 0; }
.focus-screen { display: grid; min-height: 100vh; grid-template-rows: auto 1fr; padding: clamp(1rem, 3vw, 2.5rem); background: radial-gradient(circle at 50% 35%, var(--brand-soft), var(--bg) 55%); }.focus-screen > header { display: flex; align-items: center; justify-content: space-between; }.focus-center { display: grid; place-self: center; justify-items: center; max-width: 800px; text-align: center; }.focus-center h1 { margin: 1.3rem 0 .5rem; font-size: clamp(2rem, 6vw, 4rem); }.focus-next { font-size: 1.18rem; }.focus-timer { margin: 1.5rem 0; font-size: clamp(3rem, 10vw, 7.5rem); font-weight: 250; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }.focus-actions, .focus-summary { display: flex; gap: .7rem; }.focus-summary { margin-top: 1.8rem; color: var(--muted); }

.directory-grid, .systems-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }.directory-card, .system-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .85rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }.directory-card.is-inactive, .system-card.is-inactive { opacity: .58; }.directory-card h2, .system-card h2 { margin: 0; }.company-logo, .system-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--company-color, var(--brand)) 16%, var(--surface)); color: var(--company-color, var(--brand-2)); }.system-link { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; }
.settings-form { display: grid; gap: 1rem; }.settings-section { display: grid; grid-template-columns: minmax(180px, .45fr) minmax(0, 1fr); gap: 2rem; padding: 1.2rem; }.settings-section > div:first-child p { margin: 0; }.settings-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }.settings-fields .check-field { grid-column: 1 / -1; }.settings-save { display: flex; justify-content: flex-end; margin: 1rem 0; }.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }.export-link { display: flex; align-items: center; gap: .45rem; padding: .65rem; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); }.export-link:hover { border-color: var(--brand-2); background: var(--brand-soft); text-decoration: none; }.about-card { align-items: center; }.about-card h2 { margin: 0; }

.modal-open { overflow: hidden; }.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: rgb(7 17 16 / .56); backdrop-filter: blur(4px); }.modal-card { display: grid; width: min(520px, 100%); max-height: min(88vh, 900px); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-lg); }.modal-large { width: min(760px, 100%); }.modal-search { width: min(680px, 100%); align-self: start; margin-top: 8vh; }.modal-capture { width: min(620px, 100%); }.modal-welcome { width: min(580px, 100%); }.modal-header, .modal-footer { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .85rem 1rem; }.modal-header { border-bottom: 1px solid var(--line); }.modal-header h2 { margin: 0; }.modal-body { overflow: auto; padding: 1rem; }.modal-footer { justify-content: flex-end; border-top: 1px solid var(--line); background: var(--surface-2); }
.capture-box { display: grid; gap: .45rem; }.capture-box textarea { min-height: 130px; border: 0; padding: .4rem; box-shadow: none; font-size: 1.15rem; }.command-palette { display: grid; gap: .75rem; }.command-input { display: flex; align-items: center; gap: .5rem; padding: .45rem .65rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }.command-input input { border: 0; padding: 0; box-shadow: none; }.command-results { display: grid; gap: .25rem; max-height: 55vh; overflow: auto; }.command-group-label { padding: .5rem .55rem .2rem; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }.command-result { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .65rem; padding: .6rem; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }.command-result span { display: grid; }.command-result.is-selected { background: var(--brand-soft); }.command-hint { padding: 1rem; text-align: center; }.onboarding { text-align: center; }.onboarding-mark { display: flex; justify-content: center; margin-bottom: 1rem; }.onboarding ol { display: grid; gap: .7rem; padding-left: 1.4rem; text-align: left; }.shortcut-list { display: grid; grid-template-columns: auto 1fr; gap: .65rem 1rem; }.shortcut-list dt { padding: .15rem .4rem; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); font-family: ui-monospace, monospace; }.shortcut-list dd { margin: 0; }
.toast-region { position: fixed; right: 1rem; bottom: 1rem; z-index: 150; display: grid; gap: .5rem; }.toast { display: flex; min-width: 230px; align-items: center; gap: .5rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-lg); animation: toast-in .2s ease-out; }.toast-success svg { color: var(--success); }.toast-danger svg { color: var(--danger); }.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: .18s; } @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.resource-panel { padding: 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.resource-heading { align-items: center; }.resource-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.resource-body, .resource-group { display: grid; gap: .8rem; }.resource-group + .resource-group { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }.resource-group h3 { margin: 0; }
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; }
.attachment-card { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.attachment-preview { display: grid; min-height: 145px; place-items: center; overflow: hidden; background: var(--surface-3); color: var(--text-2); text-decoration: none; }
.attachment-preview img { width: 100%; height: 170px; object-fit: cover; }.attachment-file { align-content: center; gap: .35rem; }.attachment-file strong { font-size: 1.4rem; }.attachment-file span { color: var(--muted); font-size: .78rem; }
.attachment-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .7rem; }.attachment-meta > div { display: grid; min-width: 0; gap: .18rem; }.attachment-meta strong, .resource-link small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.attachment-meta small { color: var(--muted); }
.attachment-download { padding: 0 .7rem .7rem; color: var(--brand-2); font-size: .78rem; font-weight: 750; }
.link-list { display: grid; gap: .5rem; }.resource-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .3rem .7rem; padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }.resource-link > a { display: grid; min-width: 0; }.resource-link p { grid-column: 1; margin: 0; color: var(--text-2); white-space: pre-wrap; }.resource-link .icon-button { grid-column: 2; grid-row: 1 / span 2; }

.auth-page, .install-page { display: grid; min-height: 100vh; place-items: center; padding: 1rem; background: radial-gradient(circle at 20% 10%, var(--brand-soft), var(--bg) 48%); }.auth-card { width: min(430px, 100%); padding: clamp(1.4rem, 5vw, 2.3rem); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); }.auth-heading { margin: 2.4rem 0 1.6rem; }.auth-heading p:last-child { margin: 0; }.auth-footnote { margin: 1.4rem 0 0; color: var(--muted); font-size: .76rem; text-align: center; }
.install-shell { width: min(760px, 100%); }.install-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }.step-label { color: var(--muted); font-size: .78rem; }.install-card { padding: clamp(1.3rem, 4vw, 2.2rem); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); }.check-list { display: grid; margin: 1.3rem 0; }.check-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }.check-row > div { display: grid; }.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--muted); }.status-dot.is-ok { background: var(--success); }.status-dot.is-warning { background: var(--warning); }.status-dot.is-error { background: var(--danger); }.install-success { display: grid; justify-items: center; text-align: center; }
.mobile-nav, .mobile-more { display: none; }

.company-switch { width: auto; min-width: 9.5rem; max-width: 14rem; background: var(--surface); border-color: var(--line); font-weight: 700; }
.big-card.big-must { border-top-color: #b85c55; }.big-card.big-plan { border-top-color: #557bb0; }
.type-must { background: #f7e7e5; color: #8d453f; }.type-plan { background: #e8eef7; color: #3f628e; }.type-routine { background: #e7f1ed; color: #356c59; }.type-organization { background: #eeeafa; color: #65519d; }
:root[data-theme="dark"] .type-must { background: #402523; color: #e3a19a; }:root[data-theme="dark"] .type-plan { background: #202f42; color: #93b7e5; }:root[data-theme="dark"] .type-routine { background: #1d352d; color: #8fc8b3; }:root[data-theme="dark"] .type-organization { background: #302a45; color: #bbb0e5; }
.remember-field { margin-top: -.15rem; }
.capture-box { gap: 1rem; }.capture-box textarea { min-height: 90px; border: 1px solid var(--line); padding: .7rem .8rem; box-shadow: none; font-size: 1rem; }
.capture-resources { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.inbox-content p { margin: .35rem 0; color: var(--muted); white-space: pre-wrap; }.inbox-editor { display: grid; gap: 1.25rem; }
.primary-targets { grid-template-columns: repeat(4, minmax(0, 1fr)); }.secondary-targets { margin-top: .75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.todo-filters { grid-template-columns: minmax(13rem, 2fr) repeat(3, minmax(9rem, 1fr)) auto; }
.todo-groups, .todo-group { display: grid; gap: .75rem; }.todo-groups { gap: 1.5rem; }.todo-group + .todo-group { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.count-pill { min-width: 1.8rem; height: 1.8rem; display: inline-grid; place-items: center; padding: 0 .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 800; }
.is-overdue { color: var(--danger); font-weight: 800; }.followup-tabs { width: fit-content; margin-bottom: 1rem; }.compact-filters { grid-template-columns: minmax(12rem, 18rem) auto; }
.maintenance-card { align-items: start; }.maintenance-stack { display: grid; gap: 1rem; min-width: 0; }.maintenance-stack > .button { justify-self: start; }
.upload-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: end; margin: .8rem 0; }
.backup-list { display: grid; gap: .6rem; margin-top: .8rem; }.backup-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }.backup-row > div:first-child { display: grid; gap: .2rem; }.staged-update { display: grid; gap: .8rem; }

@media (max-width: 1100px) {
    :root { --sidebar-width: 76px; }
    .sidebar { width: 76px; }.sidebar-brand strong, .nav-label, .nav-item span, .nav-count, .user-link > span:last-child { display: none; }.nav-item { justify-content: center; }
    .project-grid, .idea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-layout { grid-template-columns: minmax(0, 1fr); }.calendar-tasks { display: none; }
    .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }.filter-bar .button { grid-column: 2; }
}

@media (max-width: 760px) {
    :root { --topbar-height: 58px; }
    .button, .icon-button, input, select { min-height: 44px; }.icon-button { width: 44px; min-width: 44px; height: 44px; }
    input, select, textarea { font-size: 16px; }
    .app-shell { display: block; width: 100%; max-width: 100dvw; min-height: 100dvh; padding-bottom: calc(66px + env(safe-area-inset-bottom)); overflow-x: hidden; overflow-x: clip; }.sidebar { display: none; }
    .topbar { padding: 0 .85rem; }.topbar-title { display: none; }.topbar-actions { width: 100%; justify-content: space-between; }.search-trigger span { display: none; }.company-switch { min-width: 0; width: 7.6rem; max-width: 7.6rem; }
    .main-content { width: 100%; max-width: 100%; min-height: calc(100dvh - 124px); padding: 1rem .8rem; overflow-wrap: anywhere; }
    .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; display: grid; width: 100%; max-width: 100dvw; height: calc(62px + env(safe-area-inset-bottom)); grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; padding: 5px max(.35rem, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(.35rem, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); }
    .mobile-nav-item { display: grid; place-items: center; align-content: center; gap: .12rem; border: 0; background: transparent; color: var(--muted); font-size: .65rem; }.mobile-nav-item.is-active { color: var(--brand-2); }.mobile-nav-item.is-capture svg { width: 27px; height: 27px; padding: 5px; border-radius: 50%; background: var(--brand); color: #fff; }
    .mobile-more { position: fixed; right: .55rem; bottom: calc(68px + env(safe-area-inset-bottom)); left: .55rem; z-index: 29; display: block; padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); }.mobile-more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }.mobile-more-grid button { display: grid; place-items: center; gap: .2rem; padding: .55rem; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-size: .7rem; }
    .page-heading { align-items: flex-start; margin-bottom: 1.1rem; }.page-heading .page-actions { max-width: 55%; }.page-heading .page-actions .button span { display: none; }
    .big-three-grid, .dashboard-grid, .metric-row, .project-grid, .idea-grid, .followup-list, .directory-grid, .systems-grid { grid-template-columns: 1fr; }
    .big-card { min-height: 205px; }.metric-row { display: flex; overflow-x: auto; }.metric-card { min-width: 145px; flex: 1; }
    .task-row { grid-template-columns: auto minmax(0, 1fr) auto; }.task-row .company-badge, .task-time { display: none; }.attention-row { grid-template-columns: auto minmax(0, 1fr); }.attention-row > span:nth-last-child(-n+2), .attention-row time { display: none; }
    .filter-bar { grid-template-columns: 1fr 1fr; }.filter-bar input[type="search"] { grid-column: 1 / -1; }
    .data-row { grid-template-columns: auto minmax(0, 1fr); }.data-row .row-tail { grid-column: 2; justify-content: flex-start; }.row-tail > time, .row-tail > span { display: none; }
    .detail-layout { grid-template-columns: 1fr; }.detail-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }.detail-sidebar hr { grid-column: 1 / -1; width: 100%; border: 0; border-top: 1px solid var(--line); }
    .project-hero { grid-template-columns: 1fr; }.progress-ring { width: 92px; height: 92px; }.step-row { grid-template-columns: auto minmax(0, 1fr); }.step-row > :last-child { grid-column: 2; justify-self: start; }
    .calendar-toolbar { align-items: stretch; flex-direction: column; }.calendar-nav { justify-content: space-between; }.calendar-nav .button span { display: none; }.calendar-nav strong { min-width: 100px; }.calendar-grid { grid-template-columns: repeat(7, minmax(180px, 1fr)); }.calendar-day { min-height: 430px; }.day-events { min-height: 370px; }
    .settings-section { grid-template-columns: 1fr; gap: 1rem; }.settings-fields { grid-template-columns: 1fr; }.export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .resource-heading { align-items: stretch; flex-direction: column; }.resource-actions { justify-content: stretch; }.resource-actions .button { flex: 1; }.attachment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inbox-row { grid-template-columns: 1fr; }.inbox-row .row-actions { justify-content: flex-end; }.processing-targets, .capture-resources, .upload-row { grid-template-columns: 1fr; }.backup-row { align-items: flex-start; flex-direction: column; }
    .shutdown-row { grid-template-columns: 1fr 1fr; }.shutdown-row > div { grid-column: 1 / -1; }.shutdown-finish { align-items: stretch; flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }.form-grid > * { grid-column: 1 !important; }
    .advanced-grid { grid-template-columns: 1fr; }.advanced-grid > * { grid-column: 1 !important; }
    .modal-backdrop { align-items: end; padding: 0; }.modal-card { width: 100%; max-height: 92vh; border-radius: 17px 17px 0 0; }.modal-search { align-self: end; margin: 0; }
    .focus-screen { min-height: calc(100vh - env(safe-area-inset-bottom)); }.focus-center h1 { font-size: 2rem; }.focus-timer { font-size: 4rem; }.focus-actions { flex-direction: column; width: 100%; }.focus-actions .button { width: 100%; }.focus-summary { flex-direction: column; gap: .2rem; }
    .auth-page, .install-page { place-items: start center; padding-top: 4vh; }.install-header { align-items: flex-start; }.step-label { text-align: right; }
}

@media (max-width: 440px) {
    .page-actions .button:not(.button-primary) { display: none; }.filter-bar { grid-template-columns: 1fr; }.filter-bar > * { grid-column: 1 !important; }
    .detail-sidebar { grid-template-columns: 1fr; }.export-grid { grid-template-columns: 1fr; }.followup-dates { grid-template-columns: 1fr; }
    .resource-actions { display: grid; }.attachment-grid { grid-template-columns: 1fr; }
    .frozen-card { grid-template-columns: auto minmax(0, 1fr); }.frozen-card > .button { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media print { .sidebar, .topbar, .mobile-nav, .mobile-more, .page-actions, .button { display: none !important; }.app-shell { display: block; }.main-content { padding: 0; }.panel, .detail-card, .settings-section { box-shadow: none; } }
