.layout:has(.weekly-board) { display: block; padding: 0; max-width: none; }
.layout:has(.weekly-board) > :is(.sidebar,.detail) { display: none; }
.workspace:has(.weekly-board) { padding: 0; min-height: 100vh; border: 0; border-radius: 0; }

.weekly-wipe {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  overflow: hidden;
  pointer-events: none;
}
.weekly-wipe[data-direction="exit"] { transform: scale(-1); }
.weekly-wipe > div {
  position: relative;
  overflow: hidden;
}
.weekly-wipe > div > span {
  --slant: clamp(12px, 2.3vw, 42px);
  position: absolute;
  inset: 0 -32%;
  transform: translateX(82%);
  background: var(--band-color);
  clip-path: polygon(0 0, calc(100% - var(--slant)) 0, 100% 100%, var(--slant) 100%);
}
.weekly-wipe > :nth-child(1) { --band-color: #b0dcee; }
.weekly-wipe > :nth-child(2) { --band-color: #73bfdf; }
.weekly-wipe > :nth-child(3) { --band-color: #389dcc; }
.weekly-wipe > :nth-child(4) { --band-color: #0085c9; }
.weekly-wipe > :nth-child(5) { --band-color: #197aaa; }
@media (prefers-reduced-motion: reduce) {
  .weekly-wipe { display: none; }
}

.weekly-board {
  --meeting-blue: #067db7;
  --meeting-ink: #173d55;
  display: grid; grid-template-rows: auto minmax(0,1fr);
  height: 100dvh; min-height: 600px;
  background: #f2f7fa; color: var(--meeting-ink);
}
.weekly-board:fullscreen { min-height: 0; }
.weekly-top {
  display: flex; justify-content: space-between; align-items: center; gap: 15px;
  min-height: 82px; padding: 12px 27px; background: #fff; border-bottom: 1px solid #d6e6ef;
}
.weekly-title,.weekly-top-actions {
  display: flex; align-items: center; gap: 12px;
}
.weekly-logo img { display: block; width: 102px; }
.weekly-separator { width: 1px; height: 34px; margin: 0 5px; background: #d9e6ed; }
.weekly-title h1 { margin: 0 0 2px; font-size: 24px; letter-spacing: .045em; white-space: nowrap; }
.weekly-title p { margin: 0; font-size: 12px; font-weight: 560; color: #546e80; font-variant-numeric: tabular-nums; }
.weekly-top .btn { min-height: 35px; font-weight: 610; }
.weekly-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(332px,390px); min-height: 0; }
.weekly-stage { position: relative; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; min-height: 0; background: #edf5fa; }
.weekly-viewport {
  position: relative; min-height: 0; overflow: clip; touch-action: none; cursor: grab; outline-offset: -4px;
  background-color: #edf5fa;
  background-image: radial-gradient(circle,#c1d5e4 .9px,transparent 1.15px);
  background-size: 24px 24px; background-position: var(--dot-x,0px) var(--dot-y,0px);
}
.weekly-viewport.is-dragging,.weekly-viewport.is-dragging button { cursor: grabbing; user-select: none; }
.weekly-tools,.weekly-controls { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f8fbfd; padding: 10px 18px; }
.weekly-tools { border-bottom: 1px solid #dae7ef; }
.weekly-controls { border-top: 1px solid #dbe8ef; }
.weekly-zoom { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.weekly-zoom .btn { min-height: 32px; padding: 5px 9px; border-color: transparent; background: none; color: #43657a; font-size: 12px; }
.weekly-zoom .btn:hover { background: #e7f2f9; }
.weekly-tools { z-index: 4; }
.weekly-filter { position: relative; }
.weekly-filter summary { cursor: pointer; list-style: none; }
.weekly-filter summary::-webkit-details-marker { display: none; }
.weekly-filter-count { color: #43657a; font-size: 12px; font-variant-numeric: tabular-nums; }
.weekly-filter-panel {
  position: absolute; inset: calc(100% + 8px) auto auto 0; width: min(428px,70vw);
  max-height: 62dvh; overflow: auto; padding: 14px; color: var(--meeting-ink);
  background: #fff; border: 1px solid #c5ddea; border-radius: 14px;
  box-shadow: 0 14px 38px -20px #214f6a;
}
.weekly-filter-panel fieldset { margin: 0 0 12px; padding: 0; min-width: 0; border: 0; }
.weekly-filter-panel legend { padding: 0; margin: 0 0 8px; font-size: 13px; font-weight: 640; }
.weekly-filter-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.weekly-filter-options label {
  display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 7px;
  color: #345a70; background: #f4f8fb; font-size: 12px; cursor: pointer;
}
.weekly-filter-options label:has(input:checked) { color: #175674; background: #e8f5fb; }
.weekly-filter-options input { width: auto; margin: 0; accent-color: var(--meeting-blue); }
.weekly-filter-options small { margin-left: auto; font-variant-numeric: tabular-nums; }
.weekly-filter-panel .controls { justify-content: end; }
.weekly-tools [data-board="overview"][hidden] { display: none; }
.weekly-tools .btn { min-height: 34px; font-size: 12px; }
.weekly-tally,.weekly-hint { color: #446478; font-size: 12px; white-space: nowrap; }
.weekly-hint span { margin: 0 3px; }
.weekly-scale { width: 4ch; text-align: center; font-weight: 650; font-size: 12px; font-variant-numeric: tabular-nums; }
.weekly-world { position: absolute; inset: 0 auto auto 0; transform-origin: 0 0; }
.weekly-lines { position: absolute; inset: 0 auto auto 0; overflow: visible; pointer-events: none; }
.weekly-lines path { stroke: #a4c0d1; stroke-width: 2; fill: none; }
.weekly-lines path[data-tone="discuss"] { stroke: #cdac83; }
.weekly-lines path.is-active { stroke: #238dc1; stroke-width: 2.65; }
.weekly-node { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); border-radius: 13px; }
.weekly-root {
  display: grid; align-content: center; justify-items: start; gap: 3px; padding: 13px 18px; border-radius: 16px;
  color: #fff; background: linear-gradient(145deg,#215d81,#173d56); box-shadow: 0 12px 23px -16px #16435d;
}
.weekly-root svg { color: #a3d8f3; margin-bottom: 3px; }
.weekly-root b { font-size: 20px; font-weight: 650; letter-spacing: .035em; }
.weekly-root span { font-size: 13px; color: #d3eafa; }
.weekly-project {
  color: var(--meeting-ink); border: 1px solid #cbdde9; background: #fff; box-shadow: 0 6px 15px -14px #295e7e;
}
.weekly-project.is-selected { border-color: #2594c9; background: #f9fdff; box-shadow: 0 0 0 2px #c9e8f7,0 9px 24px -20px #2c7095; }
.weekly-project strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; font-weight: 660; }
.weekly-node-top,.weekly-node-footer { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.weekly-node-type { display: flex; align-items: center; gap: 6px; color: #3d6076; font-size: 12px; white-space: nowrap; }
.weekly-node-type svg { width: 16px; height: 16px; color: #1b7faa; }
.weekly-chip { border-radius: 6px; background: #eaf2f7; color: #375b74; padding: 3px 6px; font-size: 11px; font-weight: 630; white-space: nowrap; }
.weekly-board select.weekly-status-select {
  --select-arrow-inset: 9px;
  width: auto; max-width: 100%; min-height: 29px; padding-block: 3px; padding-inline-start: 8px;
  border-color: #c7dfed; border-radius: 8px; color: #254e66; background-color: #eff7fb;
  font-size: 12px; font-weight: 640; cursor: pointer;
}
.weekly-board select.weekly-status-select:disabled { opacity: .68; cursor: wait; }
.weekly-card-status { position: absolute; top: 10px; right: 11px; max-width: 55%; }
.weekly-card-status .weekly-status-select { display: block; text-overflow: ellipsis; }
.weekly-project .weekly-node-type { max-width: 43%; overflow: hidden; }
.weekly-chip[data-tone="discuss"],.weekly-board select.weekly-status-select[data-tone="discuss"] { color: #794e24; background-color: #faefdf; }
.weekly-chip[data-tone="done"],.weekly-board select.weekly-status-select[data-tone="done"] { color: #276647; background-color: #e5f4eb; }
.weekly-node-footer { font-size: 12px; color: #4b697d; }
.weekly-node-footer b { color: #126991; font-variant-numeric: tabular-nums; }
.weekly-project progress,.weekly-detail-progress progress { display: block; width: 100%; height: 4px; overflow: hidden; border: 0; border-radius: 6px; appearance: none; background: #e4eef5; }
.weekly-project progress::-webkit-progress-bar,.weekly-detail-progress progress::-webkit-progress-bar { background: #e4eef5; }
.weekly-project progress::-webkit-progress-value,.weekly-detail-progress progress::-webkit-progress-value { background: #238cbc; }
.weekly-project progress::-moz-progress-bar,.weekly-detail-progress progress::-moz-progress-bar { background: #238cbc; }
.weekly-branch { background: #fff; border: 1px solid #cce3ef; padding: 9px 12px; }
.weekly-branch b { color: #0878ab; font-size: 13px; }
.weekly-empty { display: grid; place-items: center; width: 480px; height: 180px; }
.weekly-inspector { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; border-left: 1px solid #dae7ee; }
.weekly-detail-head { padding: 17px 18px 13px; }
.weekly-detail-type { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 630; color: #31627c; }
.weekly-detail-type svg { width: 16px; height: 16px; }
.weekly-detail-head h2 { margin: 8px 0; font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
.weekly-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.weekly-detail-meta small { font-size: 12px; }
.weekly-detail-progress { margin-top: 15px; }
.weekly-detail-progress > div { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: 12px; color: #446478; }
.weekly-detail-progress strong { font-size: 18px; color: #0873a8; }
.weekly-detail-progress progress { height: 5px; }
.weekly-detail-body { flex: 1; min-height: 0; overflow: auto; padding: 0 18px 14px; scrollbar-gutter: stable; }
.weekly-detail-section { border-top: 1px solid #e3edf4; padding-top: 12px; margin-top: 3px; }
.weekly-detail-section > header { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 8px; }
.weekly-detail-section > header h3 { font-size: 15px; }
.weekly-detail-section > header .btn { min-height: 30px; padding: 4px 7px; font-size: 12px; }
.weekly-task-list { display: grid; gap: 5px; max-height: 230px; overflow: auto; }
.weekly-task-list-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px; }
.weekly-task-list [data-inspector-task] { display: flex; align-items: center; justify-content: space-between; text-align: left; gap: 6px;
  border: 1px solid #e1ecf4; border-radius: 8px; background: #f6fafc; color: var(--ink); padding: 7px 9px; min-height: 40px; }
.weekly-task-list [data-inspector-task]:hover { background: var(--ice); }
.weekly-task-list strong { font-size: 13px; overflow-wrap: anywhere; }
.weekly-task-list .badge { flex: none; }
.weekly-task-list .btn { min-height: 32px; padding: 4px 7px; font-size: 11px; }
.weekly-task-list .btn svg { width: 13px; height: 13px; }
.weekly-task-secondary { margin-bottom: 8px; }
.weekly-task-secondary .btn { min-height: 31px; font-size: 12px; }
.weekly-note { padding: 7px 10px; border-radius: 8px; background: #f5f9fc; margin: 0 0 5px; }
.weekly-note h3 { font-size: 12px; color: #345b73; }
.weekly-note p { margin: 3px 0 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.weekly-note[data-note="blockers"],.weekly-note[data-note="decisions"] { background: #faf6ef; }
.weekly-editor { gap: 8px; margin: 0 0 10px; }
.weekly-editor textarea { min-height: 54px; font-size: 13px; }
.weekly-milestone { display: flex; align-items: start; gap: 6px; font-size: 13px; margin: 7px 0; overflow-wrap: anywhere; }
.weekly-milestone svg { width: 16px; height: 16px; color: var(--meeting-blue); }
.weekly-milestone time { margin-left: auto; flex: none; font-size: 12px; color: #496a80; }
.weekly-detail-actions { display: grid; gap: 7px; padding: 11px 18px; background: #f8fbfd; border-top: 1px solid #dce9f1; }
.weekly-detail-actions .btn { min-height: 33px; padding: 5px 9px; font-size: 12px; }
.weekly-stepper { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.weekly-detail-empty { padding: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .weekly-project { transition: background-color .17s var(--ease),border-color .17s var(--ease),box-shadow .17s var(--ease); }
  .weekly-branch { animation: weekly-branch-in .22s var(--ease) both; }
  @keyframes weekly-branch-in { from { opacity: 0; transform: translateX(-7px); } to { opacity: 1; transform: translateX(0); } }
}
@media (max-width: 1050px) {
  .weekly-body { grid-template-columns: minmax(0,1fr) 320px; }
  .weekly-top { padding-inline: 17px; }
  .weekly-hint { display: none; }
  .weekly-controls { justify-content: flex-end; }
}
@media (max-width: 720px) {
  .weekly-board { height: auto; min-height: 100dvh; }
  .weekly-top { flex-wrap: wrap; gap: 8px; min-height: auto; padding: 11px 10px; }
  .weekly-title h1 { font-size: 20px; }
  .weekly-logo img { width: 76px; }
  .weekly-title,.weekly-top-actions { gap: 5px; }
  .weekly-top .btn { font-size: 11px; min-height: 30px; padding: 4px 7px; }
  .weekly-body { grid-template-columns: minmax(0,1fr); }
  .weekly-stage { min-height: 470px; }
  .weekly-inspector { border: 0; }
  .weekly-tools,.weekly-controls { padding: 6px 9px; }
  .weekly-tools { align-items: start; flex-wrap: wrap; }
  .weekly-detail-body { overflow: visible; }
}
.weekly-board { position: relative; }
.weekly-feedback { position: absolute; right: 20px; bottom: 17px; z-index: 3; padding: 10px 15px; border-radius: 9px; background: #174d6d; color: #fff; }
.weekly-feedback.error { background: #8d3330; }

.weekly-tools { justify-content: start; }
.weekly-tally { margin-left: auto; }
.weekly-node-hit {
  display: grid; align-content: center; gap: 6px; width: 100%; height: 100%;
  padding: 9px 12px; border: 0; border-radius: inherit; background: transparent;
  text-align: left; color: inherit; min-width: 0;
}
.weekly-node-hit strong,.weekly-node-footer span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.weekly-task-node {
  border: 1px solid #bfd9e8; background: #fbfdff;
  box-shadow: 0 6px 18px -16px #295e7e;
}
.weekly-task-node.is-selected { border-color: #2594c9; box-shadow: 0 0 0 2px #c9e8f7; }
.weekly-task-node .weekly-node-hit { gap: 4px; }
.weekly-task-node .weekly-node-hit strong { font-size: 16px; }
.weekly-task-node .badge { font-size: 10px; padding: 2px 6px; }
.weekly-menu-trigger {
  position: absolute; top: -11px; right: -7px; z-index: 2; display: grid; place-items: center;
  width: 29px; height: 26px; padding: 0; border: 1px solid #bfdded;
  border-radius: 8px; color: #075d89; background: #fff; opacity: 0;
}
.weekly-menu-trigger svg { width: 17px; height: 17px; }
.weekly-node:hover .weekly-menu-trigger,.weekly-node:focus-within .weekly-menu-trigger,.weekly-node.is-selected .weekly-menu-trigger { opacity: 1; }
.weekly-menu-trigger:hover,.weekly-menu-trigger:focus-visible,.weekly-menu-trigger[aria-expanded="true"] { background: #e2f3fd; opacity: 1; }
.weekly-branch {
  text-align: left; display: grid; align-content: center; gap: 5px; color: #294e64;
  border-radius: 11px; overflow: hidden;
}
.weekly-branch[data-kind="blockers"],.weekly-branch[data-kind="decisions"] { background: #fff9ef; border-color: #ead6b8; }
.weekly-branch[data-kind="blockers"] b,.weekly-branch[data-kind="decisions"] b { color: #775326; }
.weekly-branch span {
  font-size: 12px; line-height: 1.35; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.weekly-placeholder { display: grid; place-items: center; border: 1px dashed #b8d0de; color: #44677a; background: #f4f9fc; font-size: 13px; }
.weekly-task-details .preserve { font-size: 13px; overflow-wrap: anywhere; }
.weekly-task-details > .btn { min-height: 29px; margin: 6px 0; padding: 4px 7px; font-size: 11px; }
.weekly-record-link { display: grid; grid-template-columns: 74px minmax(0,1fr) auto; align-items: start; gap: 6px; width: 100%; padding: 8px 6px;
  border: 0; border-bottom: 1px solid #e6eff5; background: #fff; color: #315267; text-align: left; }
.weekly-record-link b,.weekly-record-link span { font-size: 12px; overflow-wrap: anywhere; }
.weekly-record-link svg { width: 14px; height: 14px; }
.weekly-record { border-bottom: 1px solid #e9f1f6; padding-bottom: 4px; }
.weekly-record.is-current { background: var(--ice); border-radius: 8px; }
.weekly-record-tools { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 6px; padding: 0 6px 5px; }
.weekly-record-tools .btn { min-height: 30px; padding: 3px 7px; font-size: 12px; }
.weekly-record-tools .btn svg { width: 13px; height: 13px; }
.weekly-compose {
  position: absolute; z-index: 5; width: min(320px,calc(100% - 20px)); max-height: calc(100% - 80px); overflow: auto;
  padding: 12px; border: 1px solid #bdd8e8; border-radius: 13px; background: #fff; box-shadow: 0 10px 36px -8px #214f6a4d;
}
.weekly-compose header { display: flex; align-items: start; justify-content: space-between; gap: 6px; margin-bottom: 12px; }
.weekly-compose header h3 { font-size: 16px; }
.weekly-compose header p { margin: 4px 0 0; font-size: 12px; color: #466779; overflow-wrap: anywhere; }
.weekly-compose .btn { min-height: 32px; padding: 4px 8px; flex: none; }
.weekly-compose form,.weekly-compose [data-branch-fields] { display: grid; gap: 8px; }
.weekly-compose form label { font-size: 12px; }
.weekly-task-options summary { color: var(--blue-dark); cursor: pointer; font-size: 12px; }
.weekly-task-options[open] > :not(summary) { margin-top: 7px; }
.weekly-compose textarea { min-height: 64px; }
.weekly-compose-error { color: #87403d; font-size: 12px; margin: 0; }
@media (prefers-reduced-motion: no-preference) { .weekly-menu-trigger { transition: opacity .14s var(--ease),background-color .14s var(--ease); } }
@media (hover: none) { .weekly-menu-trigger { opacity: 1; } }

.weekly-branch b { display: flex; align-items: center; gap: 5px; }
.weekly-branch b svg { width: 14px; height: 14px; }
.weekly-branch[data-kind="detail"] { background: #edf5fb; border-color: #b7d7eb; }
.weekly-branch[data-kind="discussion"] { background: #f4f7fa; border-color: #ccdbe6; }
.weekly-branch.is-current { border-color: #2594c9; box-shadow: 0 0 0 2px #c9e8f7; }
.weekly-compose[data-mode="choose"] { width: min(224px,calc(100% - 20px)); padding: 5px; border-radius: 11px; }
.weekly-menu { display: grid; gap: 2px; }
.weekly-menu-title {
  border-bottom: 1px solid #e1edf3; margin: 0 1px 3px; padding: 6px 8px; font-size: 11px;
  font-weight: 650; color: #44677d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.weekly-menu-item {
  display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 8px;
  border: 0; border-radius: 6px; background: #fff; color: var(--ink); text-align: left; font-size: 13px;
}
.weekly-menu-item svg { width: 16px; height: 16px; color: #206e95; }
.weekly-menu-item:hover,.weekly-menu-item:focus-visible { background: #edf6fb; }
.weekly-menu-item.is-danger,.weekly-menu-item.is-danger svg { color: #923f35; }
.weekly-menu-item.is-danger:hover,.weekly-menu-item.is-danger:focus-visible { background: #fbf0ed; }
.weekly-compose[data-mode="delete"] form p { color: #644a46; font-size: 13px; line-height: 1.55; }
@media (prefers-reduced-motion: no-preference) {
  .weekly-compose[data-mode="choose"]:not([hidden]) { animation: weekly-menu-in .13s var(--ease) both; transform-origin: top left; }
  @keyframes weekly-menu-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
}
