:root {
  color-scheme: dark;
  --bg: #071018;
  --bg-2: #0a151f;
  --panel: #0d1b26;
  --panel-2: #112331;
  --line: #1e3544;
  --line-soft: #162b39;
  --text: #edf7fb;
  --muted: #8da7b7;
  --cyan: #67e8f9;
  --cyan-strong: #22d3ee;
  --blue: #38bdf8;
  --warning: #fbbf24;
  --danger: #fb7185;
  --success: #4ade80;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select, input[type="checkbox"], input[type="radio"] { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(103, 232, 249, .5); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; left: 12px; top: -80px; padding: 10px 16px; color: #001018; background: var(--cyan); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); background: radial-gradient(circle at 80% -10%, rgba(34, 211, 238, .07), transparent 30%), var(--bg); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; display: flex; flex-direction: column; padding: 26px 18px 20px; border-right: 1px solid var(--line-soft); background: rgba(7, 16, 24, .94); backdrop-filter: blur(12px); z-index: 20; }
.brand, .auth-brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #001018; background: var(--cyan); font-size: 13px; font-weight: 900; letter-spacing: -.04em; box-shadow: 0 0 28px rgba(103, 232, 249, .18); }
.brand strong, .auth-brand strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.brand small, .auth-brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.main-nav { display: grid; gap: 6px; margin-top: 42px; }
.main-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 12px; color: var(--muted); border: 1px solid transparent; border-radius: 12px; font-weight: 650; }
.main-nav a span { width: 24px; color: #648394; font-size: 20px; text-align: center; }
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .025); }
.main-nav a.active { color: var(--text); background: rgba(103, 232, 249, .08); border-color: rgba(103, 232, 249, .18); }
.main-nav a.active span { color: var(--cyan); }
.sidebar-bottom { margin-top: auto; display: grid; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 12px 8px; border-top: 1px solid var(--line-soft); }
.user-chip span:last-child { min-width: 0; }
.user-chip strong, .user-chip small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-chip strong { font-size: 14px; }
.user-chip small { color: var(--muted); font-size: 11px; }
.avatar { --avatar: #38bdf8; flex: 0 0 auto; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #061019; background: var(--avatar); font-style: normal; font-size: 12px; font-weight: 900; }
.avatar.small { width: 34px; height: 34px; font-size: 10px; }
.avatar.muted { color: var(--muted); background: var(--line); }
.text-button { border: 0; padding: 4px 8px; color: var(--muted); background: transparent; }
.text-button:hover { color: var(--text); }

.page-wrap { grid-column: 2; min-width: 0; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; justify-content: space-between; align-items: center; min-height: 76px; padding: 12px clamp(22px, 4vw, 52px); border-bottom: 1px solid var(--line-soft); background: rgba(7, 16, 24, .84); backdrop-filter: blur(18px); }
.topbar div small, .topbar div strong { display: block; }
.topbar div small { color: #557587; font-size: 10px; letter-spacing: .14em; }
.topbar div strong { font-size: 15px; }
.content { width: min(1500px, 100%); margin: 0 auto; padding: 42px clamp(22px, 4vw, 52px) 90px; }
.mobile-nav { display: none; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px; border: 1px solid transparent; border-radius: 11px; font-weight: 800; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #001018; background: var(--cyan); }
.button.primary:hover { background: #a5f3fc; }
.button.ghost { color: var(--text); background: transparent; border-color: var(--line); }
.button.ghost:hover { border-color: #35566a; background: rgba(255,255,255,.025); }
.button.compact { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.button.wide { width: 100%; }
.text-link, .section-head a { color: var(--cyan); font-size: 13px; font-weight: 750; }
.danger-text { color: var(--danger) !important; }
.eyebrow { color: var(--cyan); font-size: 11px; font-weight: 850; letter-spacing: .16em; }

.flash { position: relative; z-index: 14; margin: 16px clamp(22px, 4vw, 52px) -8px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 11px; font-weight: 650; }
.flash.success { color: #bbf7d0; background: rgba(74, 222, 128, .08); border-color: rgba(74, 222, 128, .25); }
.flash.error { color: #fecdd3; background: rgba(251, 113, 133, .08); border-color: rgba(251, 113, 133, .3); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .9fr); gap: 18px; }
.hero-card, .panel, .editor-panel, .roadmap-card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(17, 35, 49, .86), rgba(11, 25, 35, .82)); box-shadow: var(--shadow); }
.hero-card { padding: clamp(26px, 5vw, 52px); overflow: hidden; position: relative; }
.hero-card::after { content: ""; position: absolute; width: 240px; height: 240px; right: -100px; top: -120px; border-radius: 50%; border: 1px solid rgba(103, 232, 249, .15); box-shadow: 0 0 90px rgba(34, 211, 238, .05) inset; }
.hero-card h1, .page-heading h1, .auth-intro h1 { margin: 10px 0 12px; font-size: clamp(32px, 4.4vw, 58px); line-height: .98; letter-spacing: -.055em; }
.hero-card h1 span { color: var(--cyan); }
.hero-card > p { max-width: 700px; margin: 0; color: #a9beca; font-size: clamp(15px, 1.5vw, 18px); }
.progress-head { display: flex; align-items: baseline; gap: 12px; margin-top: 36px; }
.progress-head strong { font-size: 27px; }
.progress-head span { color: var(--muted); font-size: 13px; }
.progress { position: relative; height: 6px; overflow: hidden; border-radius: 999px; background: #18303f; }
.progress.large { height: 9px; margin-top: 9px; overflow: visible; }
.progress > span, .progress > i { display: block; height: 100%; border-radius: inherit; background: var(--cyan); box-shadow: 0 0 16px rgba(103, 232, 249, .3); }
.progress.large > i { position: absolute; top: -5px; width: 2px; height: 19px; border-radius: 0; background: #fff; box-shadow: none; opacity: .55; }
.hero-actions { display: flex; gap: 10px; margin-top: 28px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric { display: flex; flex-direction: column; justify-content: center; min-height: 150px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.metric span { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric strong { margin: 4px 0 0; font-size: 38px; letter-spacing: -.05em; }
.metric small { color: #577587; font-size: 11px; }
.metric.warn strong { color: var(--warning); }
.metric.danger strong { color: var(--danger); }

.dashboard-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.panel { padding: 24px; box-shadow: none; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-head small { color: #567588; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.section-head h2 { margin: 3px 0 0; font-size: 20px; letter-spacing: -.03em; }
.compact-list { display: grid; }
.compact-task { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 64px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.compact-task > i { width: 4px; height: 34px; border-radius: 4px; background: var(--phase); }
.compact-task strong, .compact-task small { display: block; }
.compact-task strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.compact-task small { color: var(--muted); font-size: 11px; }
.badge { padding: 4px 7px; border-radius: 7px; color: var(--muted); background: #142a38; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge.blocked { color: #fde68a; background: rgba(251, 191, 36, .1); }
.badge.overdue { color: #fecdd3; background: rgba(251, 113, 133, .1); }
.empty { color: var(--muted); }
.empty.small { font-size: 13px; }
.section-block { margin-top: 40px; }
.phase-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.phase-mini { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.phase-mini > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 750; }
.phase-mini > strong { color: var(--phase); font-size: 13px; }
.phase-mini .progress, .phase-mini small { grid-column: 1 / -1; }
.phase-mini .progress i { background: var(--phase); }
.phase-mini small { color: var(--muted); font-size: 10px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.page-heading h1 { margin-bottom: 7px; }
.page-heading p { max-width: 700px; margin: 0; color: var(--muted); }
.view-switch { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.view-switch a { min-width: 80px; padding: 8px 12px; border-radius: 8px; color: var(--muted); text-align: center; font-size: 12px; font-weight: 800; }
.view-switch a.active { color: #001018; background: var(--cyan); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.filter-bar input, .filter-bar select { min-height: 42px; }
.search-field { flex: 1 1 250px; }
.filter-bar .text-link { padding: 8px; }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--text); border: 1px solid #294353; border-radius: 10px; background: #091720; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #536e7e; }
select { padding-right: 34px; }
.quick-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 2px 20px; }
.quick-filters a { padding: 6px 10px; color: #a9c2cf; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 750; }
.quick-filters span { margin-left: auto; color: var(--muted); font-size: 11px; }

.task-list { display: grid; gap: 9px; }
.task-card { position: relative; display: grid; grid-template-columns: minmax(280px, 1.7fr) minmax(150px, .65fr) 120px 155px 52px; align-items: center; gap: 18px; min-height: 104px; padding: 16px 14px 16px 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgba(13, 27, 38, .86); }
.task-card:hover { border-color: #2b4b5e; }
.task-card.is-blocked { border-color: rgba(251, 191, 36, .25); }
.task-card.is-overdue { border-color: rgba(251, 113, 133, .28); }
.task-accent { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--phase); }
.star-form { position: absolute; right: 8px; top: 6px; }
.star { width: 34px; height: 34px; border: 0; color: #385262; background: transparent; font-size: 18px; }
.star.active { color: var(--warning); }
.task-main { min-width: 0; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #658596; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.task-title { display: block; max-width: calc(100% - 28px); margin-top: 6px; font-size: 15px; font-weight: 800; line-height: 1.25; }
.task-title:hover { color: var(--cyan); }
.task-main > p { display: -webkit-box; max-width: 760px; margin: 6px 0 9px; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; color: #7894a4; background: #0a1922; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.importance-critical { color: #fda4af; border-color: rgba(251, 113, 133, .25); }
.importance-key { color: #fde68a; border-color: rgba(251, 191, 36, .2); }
.lane-now { color: #a5f3fc; }
.task-owner { display: flex; align-items: center; gap: 9px; min-width: 0; }
.task-owner span:last-child { min-width: 0; }
.task-owner small, .task-owner strong, .task-due small, .task-due strong { display: block; }
.task-owner small, .task-due small { color: #607f90; font-size: 9px; text-transform: uppercase; }
.task-owner strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.task-due strong { font-size: 12px; }
.overdue-text { color: var(--danger); }
.status-select { min-height: 40px; padding: 7px 9px; border-radius: 9px; font-size: 11px; font-weight: 800; }
.status-in_progress { color: #a5f3fc; border-color: rgba(34, 211, 238, .28); }
.status-review { color: #ddd6fe; border-color: rgba(167, 139, 250, .3); }
.status-done { color: #bbf7d0; border-color: rgba(74, 222, 128, .28); }
.edit-link { color: var(--cyan); font-size: 11px; font-weight: 800; }
.empty-state { padding: 80px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); font-size: 20px; }

.kanban { display: grid; grid-template-columns: repeat(5, minmax(260px, 1fr)); gap: 11px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.kanban-column { min-width: 260px; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: rgba(10, 22, 31, .7); scroll-snap-align: start; }
.kanban-column > header { display: flex; justify-content: space-between; padding: 8px 6px 14px; color: #a9c0cc; font-size: 12px; font-weight: 850; }
.kanban-column > header b { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 999px; background: var(--line); }
.kanban-column > div { display: grid; gap: 8px; }
.kanban .task-card { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
.kanban .task-owner, .kanban .task-due { display: none; }
.kanban .status-form { width: 100%; }
.kanban .edit-link { position: absolute; right: 14px; bottom: 26px; }

.editor-panel { margin-bottom: 28px; padding: 24px; border-color: rgba(103, 232, 249, .25); }
.editor-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.editor-head small { color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.editor-head h2 { margin: 2px 0 0; font-size: 24px; }
.close-link { color: var(--muted); font-size: 13px; }
.task-editor-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.task-editor-form label, .stack-form label, .inline-form label { display: grid; gap: 6px; color: #a9c0cc; font-size: 11px; font-weight: 750; }
.span-2 { grid-column: span 2; }
.check-row { display: flex !important; align-items: center; gap: 9px !important; min-height: 46px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.check-row input { width: 20px; min-height: 20px; accent-color: var(--cyan); }
.editor-actions { display: flex; gap: 10px; margin-top: 8px; }
.archive-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); text-align: right; }

.roadmap-list { display: grid; gap: 14px; }
.roadmap-card { --phase: #67e8f9; display: grid; grid-template-columns: 66px minmax(0, 1fr); overflow: hidden; box-shadow: none; }
.roadmap-index { display: grid; place-items: center; color: #061018; background: var(--phase); font-size: 24px; font-weight: 900; }
.roadmap-main { padding: 24px; }
.roadmap-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.roadmap-title small { color: var(--phase); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.roadmap-title h2 { margin: 2px 0 0; font-size: 22px; }
.roadmap-title > strong { color: var(--phase); font-size: 22px; }
.roadmap-main > p { margin: 8px 0 18px; color: var(--muted); }
.roadmap-main .progress i { background: var(--phase); }
.roadmap-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; color: #6f8c9c; font-size: 10px; font-weight: 800; }
.roadmap-tasks { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; margin: 18px 0; }
.roadmap-tasks a { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #b9cbd4; font-size: 12px; }
.roadmap-tasks b { margin-left: auto; color: var(--warning); font-size: 9px; }
.status-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #405968; }
.status-dot.status-in_progress { background: var(--cyan); }
.status-dot.status-review { background: #a78bfa; }

.activity-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.activity-list article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 72px; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.activity-list article:first-child { border-top: 0; }
.activity-list p { margin: 0; color: #b5c9d3; font-size: 13px; }
.activity-list p a { color: var(--cyan); }
.activity-list small { color: var(--muted); }
.activity-list time { color: #577586; font-size: 10px; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-grid .span-2 { grid-column: span 2; }
.team-list { display: grid; }
.team-list article { display: flex; align-items: center; gap: 12px; min-height: 70px; border-top: 1px solid var(--line-soft); }
.team-list article > span:nth-child(2) { flex: 1; }
.team-list strong, .team-list small { display: block; }
.team-list small { color: var(--muted); font-size: 11px; }
.team-list b { color: var(--cyan); font-size: 10px; }
.stack-form { display: grid; gap: 12px; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; align-items: end; gap: 12px; }

.auth-page { display: grid; place-items: center; padding: 38px 18px 70px; background: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, .09), transparent 36%), var(--bg); }
.auth-card { width: min(680px, 100%); padding: clamp(24px, 5vw, 48px); border: 1px solid var(--line); border-radius: 24px; background: rgba(13, 27, 38, .9); box-shadow: var(--shadow); }
.auth-brand { padding-bottom: 26px; border-bottom: 1px solid var(--line-soft); }
.auth-intro { margin: 32px 0 26px; }
.auth-intro h1 { font-size: clamp(32px, 7vw, 50px); }
.auth-intro p { margin: 0; color: var(--muted); }
.login-form, .setup-form { display: grid; gap: 18px; }
.profile-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.profile-picker input { position: absolute; opacity: 0; pointer-events: none; }
.profile-picker label > span { display: flex; flex-direction: column; align-items: center; min-height: 150px; padding: 18px 10px; border: 1px solid var(--line); border-radius: 15px; background: #091720; text-align: center; }
.profile-picker label > input:checked + span { border-color: var(--cyan); background: rgba(103, 232, 249, .06); box-shadow: 0 0 0 1px rgba(103, 232, 249, .16) inset; }
.profile-picker strong { margin-top: 11px; font-size: 13px; }
.profile-picker small { color: var(--muted); font-size: 9px; }
.pin-field, .token-field, .setup-form fieldset label { display: grid; gap: 6px; color: #aec1cb; font-size: 11px; font-weight: 800; }
.pin-field input { height: 60px; font-size: 26px; letter-spacing: .35em; text-align: center; }
.security-note { display: block; color: #668494; font-size: 10px; text-align: center; }
.auth-footer { position: fixed; bottom: 18px; color: #496777; font-size: 10px; }
.setup-form fieldset { display: grid; grid-template-columns: 1fr 180px; gap: 12px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.setup-form legend { padding: 0 6px; font-weight: 850; }
.setup-form fieldset p { grid-column: span 2; margin: 0; color: var(--muted); font-size: 11px; }
.token-field small { color: var(--muted); font-weight: 500; }
.config-errors { display: grid; gap: 8px; padding: 0; list-style: none; }
.config-errors li { padding: 12px; color: #fde68a; border: 1px solid rgba(251, 191, 36, .25); border-radius: 10px; background: rgba(251, 191, 36, .06); }

@media (max-width: 1180px) {
  .task-card { grid-template-columns: minmax(280px, 1.5fr) 150px 130px 52px; }
  .task-due { display: none; }
  .phase-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .page-wrap { min-height: 100vh; }
  .topbar { min-height: 66px; padding: 10px 18px; }
  .content { padding: 28px 16px 100px; }
  .flash { margin: 12px 16px 0; }
  .mobile-nav { position: fixed; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); inset: auto 10px 10px; min-height: 66px; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: rgba(9, 21, 30, .96); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
  .mobile-nav a { display: grid; place-items: center; align-content: center; gap: 1px; min-width: 0; color: #6f8d9e; border-radius: 13px; font-size: 19px; }
  .mobile-nav a.active { color: var(--cyan); background: rgba(103, 232, 249, .08); }
  .mobile-nav small { font-size: 9px; }
  .hero-grid, .dashboard-columns { grid-template-columns: 1fr; }
  .hero-card { padding: 28px 22px; }
  .metric { min-height: 118px; }
  .task-card { grid-template-columns: minmax(0, 1fr) auto; gap: 13px; padding: 18px 14px 16px 19px; }
  .task-main { grid-column: 1 / -1; }
  .task-owner { grid-column: 1; }
  .status-form { grid-column: 2; }
  .edit-link { position: absolute; right: 48px; top: 13px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .view-switch { align-self: stretch; }
  .view-switch a { flex: 1; }
  .filter-bar > label:not(.search-field) { flex: 1 1 150px; }
  .roadmap-tasks { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid .span-2 { grid-column: 1; }
  .kanban { grid-template-columns: repeat(5, minmax(82vw, 1fr)); }
}

@media (max-width: 600px) {
  .topbar .button { font-size: 0; width: 44px; padding: 0; }
  .topbar .button::after { content: "+"; font-size: 22px; }
  .hero-card h1, .page-heading h1 { font-size: 38px; }
  .metric-grid { gap: 8px; }
  .metric { min-height: 106px; padding: 16px; }
  .metric strong { font-size: 31px; }
  .dashboard-columns { gap: 12px; }
  .panel { padding: 18px; }
  .phase-strip { grid-template-columns: 1fr; }
  .task-editor-form { grid-template-columns: 1fr; }
  .task-editor-form .span-2 { grid-column: 1; }
  .editor-actions { flex-direction: column; }
  .roadmap-card { grid-template-columns: 10px minmax(0, 1fr); }
  .roadmap-index { font-size: 0; }
  .roadmap-main { padding: 20px 16px; }
  .activity-list article { grid-template-columns: auto minmax(0, 1fr); }
  .activity-list time { grid-column: 2; }
  .inline-form { grid-template-columns: 1fr; }
  .profile-picker { grid-template-columns: 1fr; }
  .profile-picker label > span { flex-direction: row; min-height: 76px; gap: 12px; text-align: left; }
  .profile-picker strong { margin: 0; }
  .setup-form fieldset { grid-template-columns: 1fr; }
  .setup-form fieldset p { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

