:root {
  --ink: #18231f;
  --ink-soft: #4c5d55;
  --muted: #788880;
  --line: #d9e2dd;
  --line-strong: #c2d0c8;
  --paper: #ffffff;
  --canvas: #f4f7f5;
  --forest: #176b4b;
  --forest-dark: #0d5037;
  --forest-pale: #e7f3ec;
  --blue: #285f9d;
  --blue-pale: #eaf1fa;
  --amber: #9a6410;
  --amber-pale: #fbf1dc;
  --coral: #b64d43;
  --coral-pale: #faece9;
  --violet: #62528d;
  --violet-pale: #f0ecfa;
  --shadow: 0 12px 32px rgb(24 35 31 / 8%);
  --header-height: 64px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--forest-dark); }
svg { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.8; }
code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .92em; font-variant-numeric: tabular-nums; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 28px; line-height: 1.18; font-weight: 760; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 17px; line-height: 1.3; font-weight: 730; }
h3 { margin-bottom: 9px; font-size: 17px; line-height: 1.35; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 999; top: 8px; left: 8px; transform: translateY(-160%); padding: 8px 12px; background: var(--ink); color: #fff; border-radius: 4px; }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 40; top: 0; height: var(--header-height); border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 96%); backdrop-filter: blur(12px); }
.header-inner { width: min(1440px, 100%); height: 100%; margin: 0 auto; padding: 0 30px; display: flex; align-items: center; gap: 28px; }
.brand { min-width: 170px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand > span:last-child { display: grid; line-height: 1.15; }
.brand strong { font-size: 14px; font-weight: 760; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid #a9c8b8; border-radius: 7px; background: var(--forest-pale); color: var(--forest); }
.brand-mark-large { width: 48px; height: 48px; }
.brand-mark-large svg { width: 23px; height: 23px; }
.primary-nav { align-self: stretch; display: flex; gap: 2px; }
.primary-nav a { position: relative; min-width: 78px; height: 100%; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--ink-soft); font-size: 13px; }
.primary-nav a::after { content: ""; position: absolute; right: 14px; bottom: 0; left: 14px; height: 2px; background: transparent; }
.primary-nav a:hover, .primary-nav a.is-active { color: var(--forest); }
.primary-nav a.is-active::after { background: var(--forest); }
.user-controls { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-controls form { margin: 0; }
.user-avatar { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.user-name { max-width: 140px; overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.page-shell { width: min(1440px, 100%); margin: 0 auto; padding: 34px 30px 68px; }
.page-header, .detail-header { min-height: 72px; margin-bottom: 26px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-header p, .detail-header p { margin-bottom: 0; color: var(--muted); }
.title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.count-badge { min-width: 28px; height: 22px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--paper); color: var(--ink-soft); font-size: 11px; font-variant-numeric: tabular-nums; }
.eyebrow { margin: 0 0 6px; color: var(--forest); font-size: 10px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.breadcrumb { margin-bottom: 19px; }
.breadcrumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 12px; }
.breadcrumb svg { width: 15px; height: 15px; }

.button, .icon-button { border: 0; cursor: pointer; text-decoration: none; }
.button { min-height: 40px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 5px; font-size: 13px; font-weight: 680; white-space: nowrap; }
.button-primary { background: var(--forest); color: #fff; }
.button-primary:hover { background: var(--forest-dark); color: #fff; }
.button-secondary { border-color: var(--line-strong); background: var(--paper); color: var(--ink); }
.button-secondary:hover { border-color: #9eaea5; background: #f9fbfa; color: var(--ink); }
.button-danger { border-color: #e4b9b3; background: var(--coral-pale); color: #8d3f36; }
.button-danger:hover { background: #f5dfdc; color: #74312b; }
.button-quiet { background: transparent; color: var(--ink-soft); }
.button-quiet:hover { background: #edf2ef; color: var(--ink); }
.icon-button { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--ink-soft); }
.icon-button:hover { border-color: var(--line); background: #f3f6f4; color: var(--ink); }
.icon-button:disabled { cursor: wait; opacity: .55; }
.icon-button:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgb(39 99 163 / 20%); outline-offset: 2px; }

.toolbar { margin-bottom: 16px; }
.filter-form { display: flex; align-items: center; gap: 8px; }
.search-box { position: relative; flex: 1; max-width: 620px; }
.search-box svg { position: absolute; top: 11px; left: 12px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search-box input { padding-left: 38px; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); color: var(--ink); }
textarea { min-height: 90px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #9aa8a1; }
select { appearance: auto; }
.filter-form > select { width: 165px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--coral); }

.board-body .page-shell { width: 100%; margin: 0; padding: 0 0 68px; }
.board-topbar { position: sticky; z-index: 32; top: var(--header-height); border-bottom: 1px solid var(--line-strong); background: rgb(255 255 255 / 97%); backdrop-filter: blur(12px); }
.board-topbar-inner { width: min(1440px, 100%); min-height: 56px; margin: 0 auto; padding: 6px 30px; display: grid; grid-template-columns: auto minmax(330px, 1fr) auto; align-items: center; gap: 12px; }
.board-topbar-summary, .board-primary-tools, .compact-metrics { min-width: 0; display: flex; align-items: center; }
.board-topbar-summary { gap: 10px; }
.board-topbar-summary h1 { margin: 0; font-size: 17px; line-height: 1.1; white-space: nowrap; }
.compact-metrics { height: 30px; }
.compact-metrics > span { height: 22px; padding: 0 6px; display: inline-flex; align-items: center; gap: 4px; border-left: 1px solid var(--line); white-space: nowrap; }
.compact-metrics small { color: var(--muted); font-size: 9px; }
.compact-metrics strong { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.compact-metrics .is-alert strong { color: var(--coral); }
.board-primary-tools { flex: 0 0 auto; gap: 6px; }
.board-add-compact { min-height: 36px; padding: 0 12px; font-size: 12px; }
.segmented-control { min-height: 34px; padding: 2px; display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 5px; background: #f4f7f5; }
.segment-button { width: 30px; min-height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 3px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.segment-button svg { width: 14px; height: 14px; }
.segment-button:hover { color: var(--ink); }
.segment-button.is-active { background: var(--paper); color: var(--forest); box-shadow: 0 1px 3px rgb(24 35 31 / 10%); }
.board-grid-toggle { min-height: 32px; padding: 0 6px; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: 10px; cursor: pointer; }
.board-grid-toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--forest); }
.board-command-filter { min-width: 0; }
.board-command-filter .filter-form { justify-content: flex-end; }
.board-command-filter .search-box { min-width: 130px; max-width: none; }
.board-command-filter .filter-form > select { width: 96px; }
.board-command-filter .filter-form > select:nth-of-type(2) { width: 110px; }
.board-command-filter input, .board-command-filter select { min-height: 36px; }
.board-command-filter .search-box svg { top: 9px; }
.board-filter-submit { border-color: var(--line-strong); background: var(--paper); color: var(--ink); }
.board-workspace { width: min(1440px, 100%); margin: 0 auto; padding: 14px 30px 0; }
.board-surface.is-grid-hidden { background-image: none; }

.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.task-card { min-width: 0; min-height: 228px; padding: 18px 18px 14px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); box-shadow: 0 2px 0 rgb(24 35 31 / 2%); }
.task-card:hover { border-color: #b8cbc0; box-shadow: var(--shadow); }
.task-card.is-overdue { border-top: 3px solid var(--coral); padding-top: 16px; }
.task-card-header { min-height: 26px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.task-card h2 { margin: 14px 0 8px; overflow-wrap: anywhere; }
.task-card h2 a { color: var(--ink); }
.task-card h2 a:hover { color: var(--forest); }
.task-excerpt { min-height: 66px; margin: 0; color: var(--ink-soft); line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.task-card-footer { min-height: 34px; margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 10px; border-top: 1px solid #edf1ee; color: var(--muted); font-size: 10px; }
.task-card-footer span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.task-card-footer span:first-child svg { width: 14px; height: 14px; color: var(--blue); }
.task-card-footer span:nth-child(2) { margin-left: auto; }
.task-card-footer .icon-button { width: 28px; height: 28px; margin-left: 1px; }

.status { min-height: 24px; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 4px; background: #eef2f0; color: var(--ink-soft); font-size: 11px; font-weight: 680; white-space: nowrap; }
.status > span { width: 6px; height: 6px; border-radius: 50%; background: #84918b; }
.status-open { background: var(--forest-pale); color: var(--forest-dark); }
.status-open > span { background: var(--forest); }
.status-completed { background: var(--blue-pale); color: #29517c; }
.status-completed > span { background: var(--blue); }
.status-archived { background: #edf0ef; color: #58645f; }
.status-archived > span { background: #77837d; }
.status-cancelled { background: var(--coral-pale); color: #8e3d34; }
.status-cancelled > span { background: var(--coral); }
.deadline { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.deadline svg { width: 14px; height: 14px; }
.deadline-soon { color: var(--amber); }
.deadline-overdue { color: var(--coral); font-weight: 700; }
.muted-value { color: var(--muted); }

.pagination { min-height: 52px; padding: 8px 8px 8px 16px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.pagination div { display: flex; }
.empty-state { min-height: 320px; padding: 50px 20px; display: grid; place-items: center; align-content: center; gap: 11px; border: 1px dashed var(--line-strong); border-radius: 7px; background: var(--paper); text-align: center; }
.empty-state h2 { font-size: 17px; }
.empty-state p { margin: 0 0 4px; color: var(--muted); }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-pale); color: var(--blue); }

.board-section { margin-top: 0; }
.board-section-heading { min-height: 40px; margin-bottom: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.board-section-heading h2 { font-size: 18px; }
.board-save-status { min-height: 18px; color: var(--forest); font-size: 11px; }
.board-viewport { height: clamp(500px, calc(100dvh - var(--header-height) - 112px), 900px); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line-strong); border-radius: 8px; background: #e9efeb; box-shadow: 0 5px 18px rgb(24 35 31 / 5%); }
.board-surface { position: relative; background-color: #f8fbf9; background-image: radial-gradient(circle, rgb(117 145 130 / 21%) 1px, transparent 1px); background-size: 24px 24px; }
.board-surface::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgb(255 255 255 / 42%), transparent 28%, transparent 72%, rgb(255 255 255 / 32%)); }
.board-origin-mark { position: absolute; z-index: 1; top: 22px; left: 26px; color: #a3b2a9; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; }
.board-card-wrap { position: absolute; z-index: 2; width: 300px; min-height: 190px; touch-action: none; }
.board-card-wrap.is-overdue .board-card { border-top: 3px solid var(--coral); }
.board-card-wrap.is-dragging { z-index: 9; }
.board-card-wrap.is-dragging .board-card { transform: rotate(1deg) scale(1.015); box-shadow: 0 18px 36px rgb(24 35 31 / 18%); }
.board-card { min-height: 190px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: 0 3px 0 rgb(24 35 31 / 3%), 0 10px 24px rgb(24 35 31 / 5%); cursor: pointer; transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease; }
.board-card:hover { border-color: #a9c4b4; box-shadow: 0 12px 28px rgb(24 35 31 / 10%); }
.board-card-drag-zone { flex: 1; border-radius: 8px 8px 0 0; cursor: grab; user-select: none; }
.board-card-drag-zone:hover { background: #fbfdfc; }
.board-card-drag-zone:active, .board-card-wrap.is-dragging .board-card-drag-zone { cursor: grabbing; }
.board-card-header { min-height: 44px; padding: 9px 10px 0; display: flex; align-items: center; gap: 7px; }
.board-drag-indicator { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 5px; color: #91a299; }
.board-card-drag-zone:hover .board-drag-indicator { background: #f2f6f3; color: var(--ink-soft); }
.board-drag-indicator svg { width: 16px; height: 16px; }
.board-card-header .icon-button { width: 30px; height: 30px; margin-left: auto; }
.board-card-body { min-height: 122px; padding: 13px 17px 10px; }
.board-card-title { margin: 0 0 9px; color: var(--ink); font-size: 17px; font-weight: 740; line-height: 1.35; overflow-wrap: anywhere; }
.board-card-body p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--ink-soft); font-size: 12px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.board-card-footer { min-height: 39px; margin-top: auto; padding: 8px 14px 10px; display: flex; align-items: center; gap: 8px; border-top: 1px solid #edf1ee; color: var(--muted); font-size: 10px; }
.board-card-footer > span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.board-card-footer > span:first-child svg { width: 14px; height: 14px; color: var(--blue); }
.board-card-footer .deadline { margin-left: auto; }
.board-update-stack { position: relative; width: calc(100% - 22px); margin: 16px 0 0 22px; padding: 0 0 0 18px; list-style: none; touch-action: pan-x pan-y; }
.board-update-stack::before { content: ""; position: absolute; top: -16px; bottom: 39px; left: 0; width: 1px; background: #adc4b7; }
.board-linked-update { position: relative; margin-bottom: 10px; }
.board-linked-update:last-child { margin-bottom: 0; }
.board-linked-update::before { content: ""; position: absolute; top: 28px; left: -18px; width: 18px; height: 1px; background: #adc4b7; }
.board-linked-update::after { content: ""; position: absolute; top: 24px; left: -22px; width: 7px; height: 7px; border: 2px solid #f8fbf9; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px #9ab6a6; }
.board-linked-card { position: relative; width: 100%; min-height: 78px; padding: 11px 38px 11px 13px; display: block; overflow: hidden; border: 1px solid #cbd8d1; border-radius: 6px; background: #fbfdfc; color: var(--ink); text-align: left; box-shadow: 0 3px 10px rgb(24 35 31 / 5%); cursor: pointer; touch-action: manipulation; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.board-linked-card:hover { border-color: #9cb9a8; box-shadow: 0 7px 18px rgb(24 35 31 / 9%); transform: translateY(-1px); }
.board-linked-card:focus-visible { outline: 3px solid rgb(39 99 163 / 20%); outline-offset: 2px; }
.board-linked-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.board-linked-kind { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-size: 10px; font-weight: 740; }
.board-linked-kind svg { width: 13px; height: 13px; }
.board-linked-copy { display: -webkit-box; margin-top: 7px; overflow: hidden; color: var(--ink-soft); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.board-linked-open { position: absolute; top: 50%; right: 12px; display: grid; color: #87978e; transform: translateY(-50%); }
.board-linked-open svg { width: 15px; height: 15px; }
.board-linked-completed::after { background: var(--forest); }
.board-linked-completed .board-linked-card { border-color: #b8d2c4; background: #f7fcf9; }
.board-linked-completed .board-linked-kind { color: var(--forest); }
.board-linked-archived::after { background: #77837d; }
.board-linked-archived .board-linked-card { background: #f5f7f6; }
.board-linked-archived .board-linked-kind { color: #5f6c65; }
.board-linked-cancelled::after { background: var(--coral); }
.board-linked-cancelled .board-linked-card { border-color: #e4c5c0; background: #fff9f8; }
.board-linked-cancelled .board-linked-kind { color: #8d3f36; }
.board-empty { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; pointer-events: none; text-align: center; }
.board-empty h2 { margin-bottom: 0; font-size: 19px; }
.board-empty p { margin: 0 0 4px; color: var(--muted); }
.board-empty .button { pointer-events: auto; }
.task-create-dialog { width: min(470px, calc(100vw - 30px)); max-height: calc(100vh - 30px); padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); box-shadow: 0 28px 70px rgb(24 35 31 / 25%); color: var(--ink); }
.task-create-dialog::backdrop { background: rgb(24 35 31 / 35%); backdrop-filter: blur(2px); }
.board-create-form { padding: 25px; }
.dialog-header { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dialog-header h2 { font-size: 21px; }
.dialog-fields { display: grid; gap: 16px; }
.dialog-fields textarea { min-height: 116px; }
.dialog-actions { margin-top: 23px; padding-top: 15px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }

.task-drawer-dialog { position: fixed; inset: 0 0 0 auto; width: min(620px, 100vw); height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; border-left: 1px solid var(--line-strong); border-radius: 0; background: var(--paper); box-shadow: -20px 0 50px rgb(24 35 31 / 18%); color: var(--ink); }
.task-drawer-dialog::backdrop { background: rgb(24 35 31 / 28%); backdrop-filter: blur(2px); }
.task-drawer-shell { height: 100%; display: flex; flex-direction: column; }
.task-drawer-header { min-height: 104px; padding: 24px 26px 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.task-drawer-identity { min-width: 0; }
.task-drawer-header h2 { max-width: 500px; margin-bottom: 8px; font-size: 23px; line-height: 1.25; overflow-wrap: anywhere; }
.drawer-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.task-drawer-body { flex: 1; min-height: 0; padding: 0 26px 40px; overflow: auto; overscroll-behavior: contain; }
.drawer-section { padding: 23px 0; border-bottom: 1px solid var(--line); }
.drawer-last-section { border-bottom: 0; }
.drawer-section-heading { margin-bottom: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drawer-section-heading h3 { margin: 0; font-size: 17px; }
.drawer-section-heading > span, .drawer-section-heading > svg { color: var(--muted); font-size: 10px; }
.drawer-section-heading > svg { width: 18px; height: 18px; }
.drawer-copy { color: var(--ink-soft); line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
.drawer-author { display: block; margin-top: 12px; color: var(--muted); font-size: 10px; }
.drawer-stream { display: grid; gap: 9px; }
.drawer-update { padding: 13px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fbfdfc; }
.drawer-update-origin { border-color: #b7d3c3; background: #f8fcfa; }
.drawer-update-status { background: #fffdf8; }
.drawer-update-meta { min-height: 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.drawer-update-meta time { white-space: nowrap; }
.drawer-update-kind { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-weight: 760; }
.drawer-update-origin .drawer-update-kind { color: var(--forest); }
.drawer-update-status .drawer-update-kind { color: var(--amber); }
.drawer-update-kind svg { width: 14px; height: 14px; }
.drawer-update-kind strong { margin-left: 2px; font-size: 10px; }
.drawer-update > strong { display: block; margin: 11px 0 5px; font-size: 14px; overflow-wrap: anywhere; }
.drawer-update-copy { color: var(--ink-soft); line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.drawer-update.is-highlighted { border-color: #78a88d; box-shadow: 0 0 0 3px rgb(24 112 75 / 10%); }
.drawer-empty, .drawer-muted { margin: 0; color: var(--muted); font-size: 12px; }
.drawer-form { display: grid; gap: 9px; }
.drawer-form label { color: var(--ink-soft); font-size: 11px; font-weight: 720; }
.drawer-form textarea { min-height: 88px; }
.drawer-form .button { justify-self: start; }
.drawer-edit-form { gap: 10px; }
.drawer-edit-form textarea { min-height: 112px; }
.drawer-meta { margin: 0; padding: 0 0 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.drawer-meta dt { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.drawer-meta dd { margin: 0; color: var(--ink-soft); font-size: 12px; overflow-wrap: anywhere; }
.drawer-danger-zone { min-height: 70px; padding: 18px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #efd8d4; }
.drawer-danger-zone .eyebrow { margin-bottom: 3px; color: #8d3f36; }
.drawer-danger-zone p:last-child { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.drawer-danger-zone .button { flex: 0 0 auto; }
.task-delete-dialog { width: min(430px, calc(100vw - 30px)); padding: 0; overflow: hidden; border: 1px solid #ddb5af; border-radius: 8px; background: var(--paper); box-shadow: 0 28px 70px rgb(24 35 31 / 25%); color: var(--ink); }
.task-delete-dialog::backdrop { background: rgb(24 35 31 / 42%); backdrop-filter: blur(2px); }
.task-delete-form { padding: 25px; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 15px; }
.delete-symbol { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #e4b9b3; border-radius: 6px; background: var(--coral-pale); color: #8d3f36; }
.delete-symbol svg { width: 20px; height: 20px; }
.task-delete-copy { min-width: 0; }
.task-delete-copy .eyebrow { color: #8d3f36; }
.task-delete-copy h2 { margin-bottom: 8px; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.task-delete-copy > p:last-child { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.delete-dialog-actions { grid-column: 1 / -1; margin-top: 5px; padding-top: 16px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }

.detail-identity { min-width: 0; display: flex; align-items: flex-start; gap: 13px; }
.detail-identity h1 { max-width: 760px; overflow-wrap: anywhere; }
.detail-identity p { margin-top: 7px; }
.task-symbol { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #c9bfe5; border-radius: 7px; background: var(--violet-pale); color: var(--violet); }
.task-symbol svg { width: 23px; height: 23px; }
.detail-columns { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 36px; align-items: start; }
.stream-panel { min-width: 0; }
.section-heading { margin-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-heading > svg { color: var(--muted); }
.stream-count { color: var(--muted); font-size: 10px; }
.task-stream { position: relative; display: grid; gap: 12px; }
.task-stream::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 15px; width: 1px; background: var(--line-strong); }
.stream-card { position: relative; min-width: 0; padding: 17px 19px 16px 45px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); box-shadow: 0 2px 0 rgb(24 35 31 / 2%); }
.stream-card::before { content: ""; position: absolute; top: 20px; left: 9px; width: 13px; height: 13px; border: 3px solid var(--canvas); border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px var(--line-strong); }
.stream-origin { border-color: #b7d3c3; background: #fbfefc; }
.stream-origin::before { background: var(--forest); }
.stream-status::before { background: var(--amber); }
.stream-card-meta { min-height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stream-card-meta time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.stream-kind { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-size: 10px; font-weight: 760; }
.stream-kind svg { width: 14px; height: 14px; }
.kind-origin { color: var(--forest); }
.kind-status { color: var(--amber); }
.stream-kind strong { margin-left: 3px; font-size: 10px; }
.stream-card h3 { margin-top: 14px; overflow-wrap: anywhere; }
.stream-copy { color: var(--ink-soft); line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
.stream-card small { display: block; margin-top: 13px; color: var(--muted); font-size: 10px; }
.detail-side { min-width: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.side-section { padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.side-section .section-heading { margin-bottom: 16px; }
.side-muted { margin: 0; color: var(--muted); font-size: 12px; }
.stack-form { display: grid; gap: 13px; }
.stack-form .button { justify-self: start; }
.field-group label:not(.check-control) { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 11px; font-weight: 720; }
.field-group label > span { color: var(--coral); }
.optional-label { margin-left: 5px; color: var(--muted) !important; font-weight: 500; }
.field-hint { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.field-error { margin: 5px 0 0; color: var(--coral); font-size: 11px; }
.status-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.status-actions .button { min-height: 36px; padding: 0 11px; font-size: 11px; }
.task-meta dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.task-meta dt { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.task-meta dd { color: var(--ink-soft); font-size: 12px; overflow-wrap: anywhere; }

.record-form { border-top: 1px solid var(--line); }
.narrow-form { max-width: 620px; padding-top: 24px; display: grid; gap: 18px; }
.form-section { padding: 29px 0; display: grid; grid-template-columns: minmax(180px, .65fr) minmax(0, 1.65fr); gap: 44px; border-bottom: 1px solid var(--line); }
.form-section-heading { display: flex; align-items: flex-start; gap: 12px; }
.form-section-heading > span { width: 28px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); font-size: 9px; font-weight: 760; }
.form-section-heading p { max-width: 270px; margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field-span-2 { grid-column: 1 / -1; }
.primary-field input { height: 48px; border-color: #8caf9d; background: #fbfdfc; font-size: 16px; }
.sticky-form-actions { position: sticky; z-index: 20; bottom: 0; min-height: 66px; margin: 0 -30px; padding: 12px 30px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: rgb(255 255 255 / 96%); backdrop-filter: blur(10px); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.form-alert { margin-bottom: 18px; padding: 11px 13px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid #e6b8b1; border-radius: 5px; background: var(--coral-pale); color: #85362e; }
.form-alert p { margin: 0; }

.messages { position: fixed; z-index: 100; top: 76px; right: 18px; width: min(390px, calc(100vw - 36px)); }
.message { margin-bottom: 8px; padding: 10px 9px 10px 12px; display: flex; align-items: center; gap: 9px; border: 1px solid #b9d0c4; border-radius: 5px; background: var(--paper); box-shadow: var(--shadow); color: var(--forest-dark); }
.message-error { border-color: #e1b4ae; color: #893b32; }
.message-info { border-color: #c7d5e7; color: #31577e; }
.message span { flex: 1; }

.login-body { background: #edf3f0; }
.login-shell { min-height: 100vh; padding: 24px; display: grid; place-items: center; }
.login-panel { width: min(410px, 100%); padding: 31px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.login-brand { margin-bottom: 43px; display: flex; align-items: center; gap: 11px; }
.login-brand > div { display: grid; }
.login-brand strong { font-size: 15px; }
.login-brand small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.login-panel header { margin-bottom: 22px; }
.login-panel h1 { font-size: 25px; }
.login-form { display: grid; gap: 18px; }
.login-submit { width: 100%; margin-top: 4px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px; }
.password-wrap .icon-button { position: absolute; top: 2px; right: 2px; }

@media (max-width: 920px) {
  .board-topbar-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; }
  .board-command-filter { grid-column: 1 / -1; grid-row: 2; }
  .board-command-filter .filter-form { justify-content: stretch; }
  .board-command-filter .search-box { max-width: none; }
  .board-primary-tools { grid-column: 2; grid-row: 1; }
}
@media (max-width: 1040px) {
  .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-columns { grid-template-columns: minmax(0, 1.3fr) minmax(280px, .8fr); gap: 28px; }
}
@media (max-width: 820px) {
  .header-inner { padding: 0 18px; }
  .page-shell { padding: 27px 18px 58px; }
  .board-topbar-inner { padding-right: 18px; padding-left: 18px; }
  .board-workspace { padding-right: 18px; padding-left: 18px; }
  .detail-columns { grid-template-columns: 1fr; }
  .detail-side { border-top: 0; }
  .side-section { padding: 22px 0; }
  .form-section { grid-template-columns: 1fr; gap: 20px; }
  .sticky-form-actions { margin: 0 -18px; padding: 11px 18px; }
}
@media (max-width: 680px) {
  :root { --header-height: 58px; }
  .header-inner { gap: 12px; }
  .brand { min-width: 0; }
  .brand small, .user-name { display: none; }
  .primary-nav a { min-width: 53px; padding: 0 8px; }
  .user-avatar { display: none; }
  .page-header, .detail-header { flex-direction: column; align-items: stretch; }
  .page-header > .button, .detail-header > .button { width: 100%; }
  h1 { font-size: 23px; }
  .filter-form { flex-wrap: wrap; }
  .search-box { flex-basis: 100%; max-width: none; }
  .filter-form > select { flex: 1; width: auto; min-width: 0; }
  .board-topbar { position: relative; top: auto; }
  .board-topbar-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
  .board-topbar-summary { gap: 6px; }
  .board-topbar-summary h1 { font-size: 17px; }
  .compact-metrics > span { padding: 0 6px; }
  .compact-metrics > span:not(:first-child) { display: none; }
  .compact-metrics small { display: none; }
  .board-primary-tools { flex-wrap: nowrap; }
  .board-primary-tools > .button, .segmented-control, .segment-button { flex: 0 0 auto; }
  .segmented-control { min-height: 40px; }
  .segment-button { width: 34px; min-height: 34px; }
  .board-add-compact { width: 40px; min-height: 40px; padding: 0; font-size: 0; }
  .board-grid-toggle { min-height: 40px; }
  .board-grid-toggle span { display: none; }
  .board-command-filter .filter-form { justify-content: flex-start; }
  .board-command-filter input, .board-command-filter select, .board-filter-submit { min-height: 40px; }
  .board-topbar-summary .board-save-status { display: none; }
  .board-workspace { padding-top: 10px; }
  .task-grid { grid-template-columns: 1fr; }
  .task-card { min-height: 210px; }
  .board-section-heading { align-items: flex-start; }
  .board-viewport { height: 68vh; min-height: 440px; }
  .board-card-wrap { width: 280px; }
  .detail-identity { align-items: flex-start; }
  .detail-identity h1 { font-size: 22px; }
  .task-drawer-header { padding: 20px 20px 17px; }
  .task-drawer-header h2 { font-size: 21px; }
  .task-drawer-body { padding: 0 20px 30px; }
  .drawer-danger-zone { align-items: stretch; flex-direction: column; }
  .drawer-danger-zone .button { width: 100%; }
}
@media (max-width: 470px) {
  .brand > span:last-child, .primary-nav span { display: none; }
  .board-command-filter .filter-form > select { width: auto; min-width: 0; flex: 1; }
  .form-grid, .task-meta dl { grid-template-columns: 1fr; }
  .field-span-2 { grid-column: auto; }
  .sticky-form-actions { position: static; display: grid; grid-template-columns: 1fr 1.3fr; }
  .sticky-form-actions .button { width: 100%; }
  .login-shell { padding: 14px; }
  .login-panel { padding: 25px 20px; }
  .stream-card { padding-left: 39px; }
  .stream-card-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
  .board-create-form { padding: 21px 18px; }
  .drawer-meta { grid-template-columns: 1fr; }
  .task-delete-form { padding: 21px 18px; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
  .delete-symbol { width: 36px; height: 36px; }
  .delete-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .delete-dialog-actions .button { min-width: 0; padding-right: 10px; padding-left: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
