:root {
  --navy-950: #071522;
  --navy-900: #0b1d2d;
  --navy-850: #10263a;
  --navy-800: #18354d;
  --ink: #142333;
  --muted: #65727f;
  --paper: #f4f1eb;
  --paper-2: #fbfaf7;
  --line: #d9d4ca;
  --gold: #b98b31;
  --gold-dark: #8b651f;
  --red: #c94545;
  --red-soft: #fff0ee;
  --orange: #bf6d15;
  --orange-soft: #fff6e8;
  --blue: #275d96;
  --blue-soft: #edf4fb;
  --green: #297046;
  --green-soft: #eef7ef;
  --shadow: 0 12px 32px rgba(11, 29, 45, .12);
  --radius: 10px;
  --sidebar: 238px;
  --topbar: 70px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
input, select, textarea {
  width: 100%;
  border: 1px solid #c8c4bc;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: .68rem .76rem;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(185,139,49,.13); }
textarea { resize: vertical; }
label { display: grid; gap: .38rem; color: #374553; font-size: .86rem; font-weight: 650; }
code { background: #ece8df; padding: .12rem .3rem; border-radius: 4px; }
[hidden] { display: none !important; }

.noscript { padding: 1rem; background: #fee; color: #711; text-align: center; }
.eyebrow, .panel-kicker { letter-spacing: .12em; text-transform: uppercase; font-weight: 800; font-size: .69rem; }
.eyebrow { color: var(--gold-dark); margin: 0 0 .45rem; }
.panel-kicker { color: #c99e4c; }
.muted { color: var(--muted); }

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 78% 20%, rgba(88,138,177,.22), transparent 26%),
    linear-gradient(135deg, #071522, #112c43 58%, #0d2132);
}
.login-card {
  width: min(440px, 100%);
  background: var(--paper-2);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0,0,0,.35);
  padding: 2.25rem;
}
.login-mark {
  width: 58px; height: 58px; border: 1px solid var(--gold); color: var(--gold);
  display: grid; place-items: center; font-family: Georgia, serif; font-size: 1.15rem;
  margin-bottom: 1.4rem;
}
.login-card h1 { font-family: Georgia, serif; font-size: 2.4rem; margin: 0; }
.login-copy { color: var(--muted); line-height: 1.55; margin: .7rem 0 1.5rem; }
.login-help { color: var(--muted); font-size: .8rem; line-height: 1.5; margin: 1.25rem 0 0; }
.stack-form { display: grid; gap: 1rem; }
.form-message { min-height: 1.2rem; color: var(--red); font-size: .86rem; }

.app-shell { min-height: 100vh; }
.topbar {
  position: fixed; z-index: 40; inset: 0 0 auto 0; height: var(--topbar);
  display: grid; grid-template-columns: var(--sidebar) auto 1fr auto;
  align-items: center; gap: 1.3rem;
  padding: 0 1.2rem 0 1.35rem;
  background: var(--navy-950); color: white;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-block { min-width: 0; }
.brand-title { font-family: Georgia, serif; font-size: 1.5rem; line-height: 1; }
.brand-subtitle { margin-top: .3rem; color: #b6c2cb; font-size: .72rem; }
.topbar-date { font-weight: 650; white-space: nowrap; }
.top-tabs { justify-self: center; display: flex; border: 1px solid #2b4357; border-radius: 7px; overflow: hidden; }
.top-tab { color: #dce5ec; border: 0; border-right: 1px solid #2b4357; padding: .6rem 1rem; background: transparent; }
.top-tab:last-child { border-right: 0; }
.top-tab:hover, .top-tab.active { background: #f7f4ee; color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: .35rem; justify-self: end; }
.icon-button, .text-button, .small-button {
  border: 0; background: transparent; color: inherit; border-radius: 6px;
}
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; font-size: 1.2rem; }
.icon-button:hover { background: rgba(255,255,255,.09); }
.icon-button.bordered { color: var(--ink); border: 1px solid var(--line); background: white; }
.text-button { color: inherit; padding: .55rem .7rem; }
.text-button:hover { text-decoration: underline; }
.small-button { padding: .42rem .7rem; border: 1px solid var(--line); color: var(--ink); background: #fff; }
.mobile-only { display: none; }

.sidebar {
  position: fixed; z-index: 30; left: 0; top: var(--topbar); bottom: 0; width: var(--sidebar);
  overflow-y: auto; background: var(--navy-900); color: #dce5ec; padding: 1rem .8rem;
  display: flex; flex-direction: column;
}
.new-task-button {
  border: 1px solid #bd9344; background: linear-gradient(#c49a4a, #a87b28); color: white;
  border-radius: 7px; padding: .83rem; font-weight: 750; box-shadow: inset 0 1px rgba(255,255,255,.2);
}
.new-task-button:hover { filter: brightness(1.06); }
.side-nav { display: grid; gap: .24rem; margin: 1rem 0; }
.side-link {
  width: 100%; display: grid; grid-template-columns: 24px 1fr auto; align-items: center;
  color: #dfe7ed; background: transparent; border: 0; border-radius: 7px; padding: .66rem .7rem; text-align: left;
}
.side-link:hover, .side-link.active { background: #2a3f52; }
.side-link b { font-size: .75rem; color: #c6d0d8; }
.sidebar-section { border-top: 1px solid #294052; margin-top: .4rem; padding-top: 1rem; }
.sidebar-heading { color: #aab7c1; text-transform: uppercase; font-weight: 800; letter-spacing: .1em; font-size: .65rem; margin: 0 .7rem .55rem; }
.project-list { display: grid; gap: .15rem; }
.project-link { color: #dfe7ed; border: 0; background: transparent; border-radius: 6px; padding: .52rem .7rem; display: flex; justify-content: space-between; text-align: left; }
.project-link:hover { background: #253b4e; }
.sidebar-footer { margin-top: auto; border-top: 1px solid #294052; padding: 1rem .7rem .2rem; }
.sidebar-user { font-weight: 700; }
.version { color: #8fa0ad; font-size: .7rem; margin-top: .25rem; }

.main-content { margin-left: var(--sidebar); padding: calc(var(--topbar) + 14px) 14px 28px; min-height: 100vh; }
.view { display: none; }
.active-view { display: block; }
.past-view-banner { margin-bottom: .7rem; border: 1px solid #d8c28c; background: #fff7dd; color: #624d20; padding: .7rem 1rem; border-radius: 7px; }

.current-panel {
  min-height: 190px; border-radius: 9px; color: white; background:
    linear-gradient(115deg, #10283c, #163a58 65%, #10283c);
  display: grid; grid-template-columns: 105px minmax(280px, 1fr) 210px 250px;
  align-items: stretch; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px;
}
.current-rank { display: grid; place-items: center; font-family: Georgia, serif; font-size: 3.5rem; color: #e9d7b0; border-right: 1px solid rgba(255,255,255,.12); }
.current-copy { padding: 1.55rem 1.25rem; align-self: center; }
.current-copy h2 { font-family: Georgia, serif; font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2rem); margin: .5rem 0 .65rem; }
.current-meta { color: #d5dde4; display: flex; gap: .5rem; flex-wrap: wrap; line-height: 1.5; }
.focus-block { border-left: 1px solid rgba(185,139,49,.8); padding: 1.55rem 1.2rem; display: grid; align-content: center; text-align: center; }
.focus-time { font-family: Georgia, serif; font-size: 2rem; margin: .35rem 0; }
.focus-started { color: #d1dae0; font-size: .8rem; }
.current-actions { display: grid; align-content: center; gap: .7rem; padding: 1.2rem; }

.primary-button, .secondary-button, .link-button {
  min-height: 40px; border-radius: 7px; padding: .62rem .9rem; font-weight: 720; text-align: center; text-decoration: none;
}
.primary-button { border: 1px solid #c9993c; color: white; background: linear-gradient(#c99a3c, #a77720); }
.primary-button:hover { filter: brightness(1.05); }
.secondary-button { border: 1px solid #c8c3b9; color: var(--ink); background: #fff; }
.secondary-button:hover { background: #f3f1ed; }
.wide { width: 100%; }
.link-button { display: inline-flex; align-items: center; justify-content: center; }
.button-row { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.matrix-panel { position: relative; background: var(--paper-2); border: 1px solid var(--line); border-radius: 9px; padding: 2.2rem 1.1rem 1.1rem 2.9rem; min-width: 0; }
.axis-top { position: absolute; top: .55rem; left: 3rem; right: 1.2rem; display: grid; grid-template-columns: 1fr 1fr; text-align: center; font-weight: 850; font-size: .75rem; letter-spacing: .06em; }
.axis-top span:first-child { color: var(--red); }
.matrix-axis-y { position: absolute; left: .6rem; top: 3rem; bottom: 1.2rem; display: flex; flex-direction: column; justify-content: space-around; writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 850; font-size: .72rem; letter-spacing: .06em; }
.matrix-axis-y span:first-child { color: var(--red); }
.matrix-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quadrant { min-height: 310px; border: 1px solid; border-radius: 8px; padding: .75rem; display: flex; flex-direction: column; }
.quadrant header { display: flex; align-items: start; justify-content: space-between; gap: .6rem; padding: .15rem .1rem .7rem; }
.quadrant header > div { display: flex; align-items: center; gap: .45rem; }
.quadrant h3 { text-transform: uppercase; letter-spacing: .025em; margin: 0; font-size: .92rem; }
.quadrant-sub { color: var(--muted); font-size: .7rem; text-align: right; }
.quadrant-icon { font-size: 1rem; }
.q-do { background: var(--red-soft); border-color: #efbbb5; }
.q-do h3, .q-do .quadrant-icon { color: #9c2e2e; }
.q-delegate { background: var(--orange-soft); border-color: #edd0a1; }
.q-delegate h3, .q-delegate .quadrant-icon { color: #9a5410; }
.q-schedule { background: var(--blue-soft); border-color: #c5d8eb; }
.q-schedule h3, .q-schedule .quadrant-icon { color: #244f7f; }
.q-backlog { background: var(--green-soft); border-color: #c8ddc9; }
.q-backlog h3, .q-backlog .quadrant-icon { color: #285d3b; }
.task-card-list { flex: 1; display: grid; align-content: start; gap: .45rem; min-height: 120px; border-radius: 6px; }
.task-card-list.drag-over { outline: 2px dashed var(--gold); outline-offset: 3px; }
.task-card {
  background: rgba(255,255,255,.93); border: 1px solid rgba(46,61,73,.18); border-radius: 7px; padding: .68rem .75rem;
  box-shadow: 0 2px 7px rgba(21,35,48,.06); cursor: grab;
}
.task-card:active { cursor: grabbing; }
.task-card.selected { outline: 2px solid var(--gold); }
.task-card.waiting { border-left: 4px solid var(--orange); }
.task-card.overdue { box-shadow: inset 3px 0 var(--red), 0 2px 7px rgba(21,35,48,.06); }
.task-card-title-row { display: flex; justify-content: space-between; gap: .5rem; align-items: start; }
.task-card-title { font-weight: 760; line-height: 1.3; }
.ivy-rank-bubble { min-width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: #235681; color: white; font-weight: 800; font-size: .72rem; }
.task-card-meta { margin-top: .35rem; display: flex; flex-wrap: wrap; gap: .38rem; color: #64717c; font-size: .72rem; }
.task-card-meta .danger { color: var(--red); font-weight: 760; }
.quadrant-add { margin-top: .45rem; border: 0; background: transparent; text-align: left; color: currentColor; padding: .4rem .25rem; font-weight: 700; }
.quadrant-add:hover { text-decoration: underline; }
.empty-quadrant { color: #82909b; font-size: .78rem; text-align: center; padding: 2rem .5rem; border: 1px dashed rgba(80,93,103,.25); border-radius: 6px; }

.execution-rail { display: grid; gap: 14px; }
.rail-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 5px 18px rgba(18,33,45,.07); padding: 1rem; }
.rail-heading-row { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.rail-card h3 { margin: .3rem 0 .5rem; font-family: Georgia, serif; font-size: 1.25rem; }
.rail-help { margin: .2rem 0 .9rem; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.ivy-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .35rem; }
.ivy-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: .55rem; padding: .56rem .35rem; border-bottom: 1px solid #e4dfd6; background: transparent; }
.ivy-item.dragging { opacity: .45; }
.ivy-item.current { background: #fff6dd; border-radius: 6px; border-bottom-color: transparent; }
.ivy-item.completed { opacity: .62; }
.ivy-item.completed .ivy-title { text-decoration: line-through; }
.ivy-number { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 7px; background: #f0ece4; font-weight: 850; }
.ivy-title { font-weight: 720; line-height: 1.25; }
.ivy-meta { color: var(--muted); font-size: .7rem; margin-top: .15rem; }
.ivy-controls { display: flex; gap: .12rem; }
.ivy-controls button { border: 0; background: transparent; border-radius: 4px; width: 25px; height: 25px; color: #53616c; }
.ivy-controls button:hover { background: #e9e5dc; }
.detail-empty { color: var(--muted); padding: 1.1rem 0; }
.detail-project { color: #3f5e78; font-size: .85rem; margin: -.15rem 0 .55rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: .35rem; margin: .45rem 0 .8rem; }
.badge { display: inline-flex; padding: .22rem .45rem; border-radius: 999px; font-size: .69rem; font-weight: 800; background: #e8e5df; }
.badge.red { background: #ffe1de; color: #a42d2d; }
.badge.orange { background: #ffedd5; color: #99520c; }
.badge.blue { background: #dfebf8; color: #29567f; }
.badge.green { background: #dff0e2; color: #285f3a; }
.detail-fields { display: grid; grid-template-columns: 105px 1fr; gap: .45rem .7rem; font-size: .8rem; }
.detail-fields dt { color: var(--muted); }
.detail-fields dd { margin: 0; word-break: break-word; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }

.overdue-section { background: #fffaf7; border: 1px solid #e4d7cd; border-radius: 9px; margin-top: 14px; padding: .9rem; }
.section-heading-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.overdue-title { color: var(--red); font-weight: 850; font-size: .78rem; }
.overdue-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .6rem; margin-top: .7rem; }
.overdue-item { background: white; border: 1px solid #eaded5; border-radius: 7px; padding: .65rem; }
.overdue-item strong { display: block; }
.overdue-item span { color: var(--red); font-size: .72rem; }

.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin: .8rem .25rem 1.1rem; }
.page-heading h1 { font-family: Georgia, serif; font-size: 2.2rem; margin: 0; }
.calendar-controls, .history-controls { display: flex; gap: .5rem; align-items: center; }
.calendar-title { margin: 0 0 .8rem; font-family: Georgia, serif; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.calendar-weekdays { background: var(--navy-850); color: #e5edf3; border-radius: 8px 8px 0 0; }
.calendar-weekdays span { padding: .65rem; text-align: center; font-size: .76rem; font-weight: 800; }
.calendar-grid { border-left: 1px solid var(--line); border-top: 1px solid var(--line); background: white; }
.calendar-day { min-height: 130px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .45rem; background: #fff; }
.calendar-day.outside { background: #f1eee8; }
.calendar-day.today { box-shadow: inset 0 0 0 2px var(--gold); }
.calendar-day-button { width: 100%; height: 100%; min-height: 118px; border: 0; background: transparent; text-align: left; padding: 0; color: inherit; }
.calendar-number { font-weight: 850; font-size: .82rem; }
.calendar-pills { display: grid; gap: .25rem; margin-top: .45rem; }
.calendar-pill { border-radius: 4px; padding: .23rem .3rem; font-size: .65rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-pill.due { background: #ffe4e1; color: #9d2d2d; }
.calendar-pill.scheduled { background: #e3eef9; color: #275a87; }
.calendar-pill.completed { background: #e3f1e5; color: #2a6540; }
.calendar-pill.ivy { background: #fff1ca; color: #74561a; font-weight: 800; }

.filter-bar { display: grid; grid-template-columns: minmax(240px,1fr) 180px 190px 180px auto; gap: .55rem; margin-bottom: .8rem; }
.table-wrap { overflow: auto; background: white; border: 1px solid var(--line); border-radius: 9px; }
.task-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.task-table th { text-align: left; padding: .72rem; background: #ece8df; color: #45535e; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.task-table td { padding: .75rem; border-top: 1px solid #e5e0d7; vertical-align: top; font-size: .82rem; }
.task-table tbody tr:hover { background: #fbf8f2; }
.table-task-button { border: 0; background: transparent; padding: 0; text-align: left; font-weight: 780; color: var(--ink); }
.table-task-button:hover { text-decoration: underline; }
.status-pill { display: inline-flex; align-items: center; padding: .22rem .45rem; border-radius: 999px; font-size: .69rem; font-weight: 800; background: #e9e5de; }
.status-pill.active { background: #e1edf8; color: #27567f; }
.status-pill.waiting { background: #ffecd2; color: #94510f; }
.status-pill.completed { background: #dff0e2; color: #275f3b; }
.status-pill.cancelled, .status-pill.archived { color: #666; }

.history-layout { display: grid; grid-template-columns: minmax(300px,.7fr) minmax(420px,1.3fr); gap: 1rem; }
.history-card, .settings-card { background: white; border: 1px solid var(--line); border-radius: 9px; padding: 1.1rem; }
.history-card h2, .settings-card h2 { margin: 0 0 1rem; font-family: Georgia, serif; }
.history-ivy-list { display: grid; gap: .5rem; padding-left: 2rem; }
.history-ivy-list li { padding: .45rem; border-bottom: 1px solid #e5e0d7; }
.timeline { display: grid; gap: .8rem; }
.timeline-item { position: relative; padding-left: 1rem; border-left: 2px solid #d7c7a0; }
.timeline-item time { color: var(--muted); font-size: .7rem; }
.timeline-item strong { display: block; margin: .2rem 0; }
.timeline-item p { margin: 0; color: #51606c; font-size: .8rem; line-height: 1.5; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(280px,1fr)); gap: 1rem; }
.settings-card p { color: var(--muted); line-height: 1.55; }
.notice { padding: .7rem; border: 1px solid #e0b25b; background: #fff6dc; border-radius: 6px; color: #60491d !important; }
.file-button { position: relative; overflow: hidden; display: inline-flex; align-items: center; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.inline-form { display: grid; grid-template-columns: repeat(4,minmax(150px,1fr)) auto auto; gap: .7rem; align-items: end; }
.check-label { grid-template-columns: auto 1fr; align-items: center; align-self: center; }
.check-label input { width: auto; }

.modal {
  width: min(920px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto;
  border: 0; border-radius: 11px; padding: 0; background: var(--paper-2); color: var(--ink); box-shadow: 0 30px 90px rgba(0,0,0,.4);
}
.modal::backdrop { background: rgba(5,17,27,.66); backdrop-filter: blur(2px); }
.small-modal { width: min(560px, calc(100vw - 2rem)); padding: 1rem; }
.task-modal form { padding: 1rem; }
.modal-header { display: flex; justify-content: space-between; align-items: start; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .85rem; margin-bottom: 1rem; }
.modal-header h2 { font-family: Georgia, serif; margin: 0; }
.modal-close { color: var(--ink); }
.task-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.task-form-grid .full { grid-column: 1 / -1; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.modal-danger-actions { display: flex; gap: .5rem; }
.picker-list { margin-top: .8rem; display: grid; gap: .4rem; max-height: 55vh; overflow: auto; }
.picker-item { border: 1px solid var(--line); border-radius: 7px; background: white; padding: .7rem; display: flex; justify-content: space-between; gap: .8rem; align-items: center; }
.picker-item strong { display: block; }
.picker-item span { color: var(--muted); font-size: .74rem; }

.toast-region { position: fixed; z-index: 100; right: 1rem; bottom: 1rem; display: grid; gap: .55rem; }
.toast { min-width: 260px; max-width: 420px; color: white; background: #18354d; border-left: 4px solid var(--gold); border-radius: 7px; padding: .8rem 1rem; box-shadow: var(--shadow); animation: toast-in .18s ease-out; }
.toast.error { border-left-color: var(--red); background: #4a2020; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

@media (max-width: 1250px) {
  .current-panel { grid-template-columns: 90px minmax(260px,1fr) 190px; }
  .current-actions { grid-column: 2 / 4; grid-template-columns: 160px 1fr; padding-top: 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .execution-rail { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  :root { --sidebar: 224px; }
  .topbar { grid-template-columns: auto auto 1fr auto; }
  .topbar-date { display: none; }
  .top-tabs { justify-self: start; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .history-layout, .settings-grid { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr 1fr; }
  .overdue-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --topbar: 62px; }
  .mobile-only { display: inline-grid; }
  .topbar { grid-template-columns: auto 1fr auto; gap: .5rem; padding: 0 .6rem; }
  .brand-subtitle, .top-tabs, .top-actions .icon-button { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding-left: 8px; padding-right: 8px; }
  .current-panel { grid-template-columns: 65px 1fr; min-height: auto; }
  .current-rank { font-size: 2.5rem; }
  .focus-block { grid-column: 1 / 2; border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
  .current-actions { grid-column: 2 / 3; display: flex; flex-direction: column; }
  .matrix-panel { padding-left: 1rem; padding-top: 1rem; }
  .axis-top, .matrix-axis-y { display: none; }
  .matrix-grid { grid-template-columns: 1fr; }
  .quadrant { min-height: 230px; }
  .execution-rail { grid-template-columns: 1fr; }
  .overdue-list { grid-template-columns: 1fr; }
  .page-heading { align-items: start; flex-direction: column; }
  .calendar-weekdays span { font-size: .62rem; padding: .45rem .2rem; }
  .calendar-day { min-height: 90px; padding: .25rem; }
  .calendar-day-button { min-height: 82px; }
  .calendar-pill { font-size: .58rem; }
  .filter-bar { grid-template-columns: 1fr; }
  .task-form-grid { grid-template-columns: 1fr; }
  .task-form-grid .full { grid-column: auto; }
  .modal-footer { align-items: stretch; flex-direction: column; }
  .modal-footer .button-row, .modal-danger-actions { width: 100%; }
  .modal-footer button { flex: 1; }
  .inline-form { grid-template-columns: 1fr; }
}
