/* Collaboration Workspace · studio workspace / glass chrome / paper content. */
:root {
  --ink: #243642;
  --muted: #70818d;
  --paper: #eff3f8;
  --white: #fff;
  --line: #e4eaee;
  --navy: #344c5e;
  --blue: #2469e8;
  --blue-hover: #1859cd;
  --blue-soft: #eaf1ff;
  --violet: #7046ce;
  --violet-hover: #5b34b3;
  --violet-soft: #f0eafa;
  --green: #267452;
  --green-soft: #eaf6ef;
  --amber: #946318;
  --amber-soft: #fff5e3;
  --red: #b83f3b;
  --shadow: 0 2px 8px #1b263106;
  --glass-shadow: 0 3px 18px #20272e05, inset 0 1px 0 #fff;
  --type-page: 32px;
  --type-section: 20px;
  --type-title: 16px;
  --type-body: 14px;
  --type-meta: 12px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse at 88% 0%, #f2eafa9e 0, #f2eafa00 46%), radial-gradient(ellipse at 12% 10%, #deedff9e 0, #deedff00 49%), radial-gradient(ellipse at 80% 95%, #fff3e76b 0, #fff3e700 42%), #eff3f8; background-attachment: fixed; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; color: inherit; }
button:disabled { opacity: .5; cursor: not-allowed; }
button, summary { touch-action: manipulation; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #1768d34d;
  outline-offset: 3px;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid #1768d324;
  outline-offset: 1px;
}
[hidden] { display: none !important; }
::selection { background: #dce8fa; color: #173b69; }
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The shell is a floating material layer; work stays on solid paper. */
.app-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: fixed; inset: 18px auto 18px 18px; width: 194px; display: flex; flex-direction: column; padding: 25px 13px 14px; border: 1px solid #ffffffef; border-radius: 24px; background: linear-gradient(155deg, #ffffffd9, #f7f9fac7); backdrop-filter: blur(22px) saturate(125%); -webkit-backdrop-filter: blur(22px) saturate(125%); box-shadow: 0 8px 32px #2b40500a, 0 1px 2px #2b405008, inset 0 1px 0 #fff; z-index: 10; }
.brand { display: flex; align-items: center; color: var(--ink); gap: 10px; }
.workspace-brand { margin: 3px 0 0 4px; gap: 10px; }
.workspace-emblem { width: 30px; height: 30px; flex: 0 0 auto; filter: brightness(0); opacity: .84; }
.workspace-name { min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.35; letter-spacing: -.025em; }
.mobile-menu-button { display: none; }
.nav-section { margin: 37px 12px 12px; color: #5c6f7e; font-size: 11px; font-weight: 550; letter-spacing: .11em; }
.nav { display: grid; gap: 7px; }
.nav button { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 10px 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #5d6a75; font-size: var(--type-body); text-align: left; transition: color 140ms ease, background-color 140ms ease, transform 100ms var(--ease-out); }
.nav button svg { width: 18px; height: 18px; }
.nav button.active { color: #1d5cc7; background: #e5efff; border-color: #ccdeff; font-weight: 650; box-shadow: inset 0 1px 0 #ffffffa6; }
.nav .nav-count { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 6px; color: #245fc5; background: #ffffffb8; font-size: 11px; font-weight: 600; text-align: center; }
.nav .assistant-entry { margin-top: 15px; border: 1px solid #e3d5f6; border-radius: 12px; background: #f0eafa; color: var(--violet); box-shadow: inset 0 1px 0 #ffffffb3; }
.nav .assistant-entry svg { color: #8354d8; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.sidebar-note { margin: 0 12px 20px; color: #6b7881; font-size: 11px; line-height: 1.9; }
.sidebar-tools { display: grid; gap: 2px; }
.sidebar-tools button, .sidebar-tools a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 10px; background: transparent; color: #65737e; font-size: 13px; text-align: left; }
.sidebar-tools svg { width: 17px; height: 17px; }
.user-pill { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding: 15px 4px 0 10px; border-top: 1px solid #dfe6eb; }
.user-pill > div { min-width: 0; }
.user-pill strong { display: block; color: #35434d; font-size: 13px; font-weight: 600; }
.user-pill small { display: block; margin-top: 5px; color: #6a7882; font-size: 11px; }
.user-pill .icon-button { margin-left: auto; color: #697783; }
.main { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 18px; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; margin: 18px 30px 0 8px; padding: 0 18px; border: 1px solid #ffffffd9; border-radius: 15px; background: #ffffffa6; backdrop-filter: blur(22px) saturate(125%); -webkit-backdrop-filter: blur(22px) saturate(125%); box-shadow: 0 4px 16px #334a5b04, inset 0 1px 0 #fff; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: #5c6f7e; font-size: 12px; }
.breadcrumb span { color: #536777; }
.breadcrumb svg { width: 12px; height: 12px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.today { color: #657683; font-size: 12px; }
.sync-status { display: flex; align-items: center; gap: 7px; white-space: nowrap; color: #63766e; font-size: 11px; }
.sync-dot { width: 5px; height: 5px; border-radius: 50%; background: #7b9c87; box-shadow: 0 0 0 3px #7b9c8710; }
.sync-status.offline { color: var(--amber); }
.offline .sync-dot { background: #b78e52; }
.content { max-width: 1660px; margin: auto; padding: 27px 30px 26px 8px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 23px; }
.eyebrow, .page-kicker { display: block; margin-bottom: 7px; color: #5c6f7e; font-size: 10px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.page-heading h1 { color: #223440; font-size: var(--type-page); font-weight: 700; line-height: 1.2; letter-spacing: -.04em; }
.page-heading p, .page-description { margin-top: 8px; color: #647580; font-size: 13px; line-height: 1.7; }
.heading-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

/* Controls share one scale, one focus treatment and immediate press feedback. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 16px; border: 1px solid #d9e2e8; border-radius: 11px; background: #ffffffc9; color: #496070; font-size: var(--type-body); font-weight: 550; line-height: 1.5; white-space: nowrap; box-shadow: 0 1px 2px #2a425103; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 100ms var(--ease-out); }
.button svg { width: 17px; height: 17px; }
.button.primary { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 4px 10px #2469e824, inset 0 1px 0 #ffffff24; }
.button.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.button.small { min-height: 44px; padding: 8px 12px; font-size: 13px; }
button:active:not(:disabled), .button:active:not(:disabled), .quick-action:active, .date-chip:active { transform: scale(.98); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; padding: 10px; border-radius: 11px; background: transparent; color: #6c7c87; transition: background-color 140ms ease, color 140ms ease, transform 100ms var(--ease-out); }
.icon-button svg { width: 18px; height: 18px; }
.text-muted { color: #6c7a84; font-size: 12px; }

/* Secondary shortcuts stay compact; the four totals form a single overview. */
.quick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 17px; padding: 0; }
.quick-action { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 11px; border-radius: 9px; background: transparent; color: #607585; text-align: left; transition: background-color 140ms ease, color 140ms ease, transform 100ms var(--ease-out); }
.quick-action:first-child { margin-left: -10px; }
.quick-action > svg { width: 16px; height: 16px; color: #6e8292; }
.quick-action strong { color: #536b7d; font-size: 13px; font-weight: 550; }
.quick-action span { color: #5c6f7e; font-size: 12px; }
.quick-actions.compact .quick-action span { display: none; }
.workspace-overview { margin-bottom: 22px; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 0 0 12px; padding: 9px; border: 1px solid #ffffffe0; border-radius: 18px; background: #ffffffc4; box-shadow: 0 3px 12px #38516303, inset 0 1px 0 #fff; }
.summary-item { --summary-accent: #235fbe; --summary-soft: #f0f5ff; --summary-icon: #dfeaff; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; min-width: 0; padding: 15px 17px; border-radius: 12px; background: var(--summary-soft); }
.summary-item[data-tone="teal"] { --summary-accent: #157567; --summary-soft: #eef8f5; --summary-icon: #d9f0e8; }
.summary-item[data-tone="amber"] { --summary-accent: #986315; --summary-soft: #fffaed; --summary-icon: #f9eac5; }
.summary-item[data-tone="violet"] { --summary-accent: #7650b4; --summary-soft: #f7f2fc; --summary-icon: #eae0f8; }
.summary-label { display: flex; align-items: center; gap: 7px; color: #52616f; font-size: 13px; font-weight: 550; line-height: 1.6; }
.summary-label svg { width: 27px; height: 27px; padding: 6px; border-radius: 8px; color: var(--summary-accent); background: var(--summary-icon); stroke-width: 1.8; }
.summary-value { grid-row: 1 / 3; grid-column: 2; color: var(--summary-accent); font-size: 36px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: -.05em; }
.summary-value span { margin-left: 5px; color: #5c6f7e; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.summary-note { margin-top: 6px; color: #5c6f7e; font-size: 11px; line-height: 1.6; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.section-head h2 { color: #2c4252; font-size: var(--type-section); font-weight: 650; line-height: 1.4; letter-spacing: -.025em; }
.section-head h2 .count { display: inline-flex; justify-content: center; min-width: 22px; margin-left: 5px; padding: 3px 7px; border-radius: 6px; color: #5c6f7e; background: #e6edf1; font-size: 11px; font-weight: 500; vertical-align: middle; }
.section-hint { color: #5c6f7e; font-size: var(--type-meta); line-height: 1.7; }
.members-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.member-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #ffffffd9; border-radius: 16px; background: #ffffffce; box-shadow: 0 3px 12px #36506404; }
.member-card.away { background: #f6f8f9c9; }
.member-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 3px; padding: 6px 7px 0 14px; }
.member-title { min-width: 0; }
.member-title h3 { margin: 0; font-size: var(--type-title); font-weight: 650; }
.member-name { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 4px 0; background: transparent; color: #29333b; font-size: var(--type-title); font-weight: 650; }
.self-label { padding: 2px 4px; border-radius: 4px; background: #eef0f2; color: #696e74; font-size: 11px; font-weight: 400; }
.member-title small { display: block; margin-top: -3px; color: #686c70; font-size: 11px; line-height: 1.6; }
.member-menu { color: #696d72; }
.member-body { flex: 1; min-width: 0; padding: 3px 14px 4px; }
.member-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.member-load { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.member-load strong { color: #34434e; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.member-load span { color: #676d72; font-size: 11px; white-space: nowrap; }
.member-status { color: #7d6b4b; font-size: 11px; white-space: nowrap; }
.member-status.confirmed { color: #577260; }
.member-status.away { color: #6b6e71; }
.member-next { display: flex; align-items: center; gap: 5px; margin-top: 11px; color: #676c71; font-size: 11px; line-height: 1.6; }
.member-next svg { width: 12px; height: 12px; color: #686b6f; }
.member-task-list { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; margin-top: 3px; }
.member-task { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 7px 0; background: transparent; color: #46545f; text-align: left; }
.member-task > span:last-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.65; }
.member-task-dot { flex: none; width: 4px; height: 4px; border-radius: 50%; background: #aab0b5; }
.member-task-dot.in_progress { background: var(--green); }
.member-task-dot.waiting { background: var(--amber); }
.member-task-dot.proposed { background: var(--violet); }
.member-empty-tasks { display: flex; align-items: center; min-height: 44px; color: #667079; font-size: var(--type-meta); line-height: 1.7; }
.member-more-tasks { min-height: 44px; padding: 6px 0; background: transparent; color: #636f78; font-size: 11px; }
.member-note, .member-capacity-note { margin-top: 7px; color: #656b71; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.member-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 3px; min-height: 44px; padding: 1px 11px 1px 14px; border-top: 1px solid #eff0f1; color: #666c71; font-size: 11px; }
.member-footer button { display: inline-flex; align-items: center; gap: 1px; min-height: 44px; padding: 5px 0 5px 5px; background: transparent; color: #616c75; font-size: 11px; }
.member-footer svg { width: 11px; height: 11px; }
.my-schedule { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 19px; margin-bottom: 22px; border: 1px solid #ffffffd9; border-radius: 16px; background: #ffffffb0; box-shadow: inset 0 1px 0 #fff; }
.my-schedule h2 { color: #35434e; font-size: var(--type-title); font-weight: 600; }
.my-schedule p { margin-top: 5px; color: #656c72; font-size: var(--type-meta); line-height: 1.7; }
.my-schedule .button { flex-shrink: 0; }
.banner { margin-bottom: 18px; padding: 13px 17px; border: 1px solid #eee2cb; border-radius: 11px; color: #816840; background: #fdf9f1; font-size: 12px; line-height: 1.8; }

/* Tasks, filters and history */
.task-panel { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(280px, .85fr); align-items: start; gap: 0 20px; min-width: 0; border: 0; border-radius: 0; background: transparent; scroll-margin-top: 88px; }
.task-panel-top { padding: 0 0 14px; }
#task-results, .task-panel-footer { grid-column: 1 / -1; min-width: 0; }
.task-panel-top .section-head { margin-bottom: 0; }
.task-scope { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid #dbe4f1; border-radius: 12px; background: #e6edf7; box-shadow: inset 0 1px 2px #354c6005; }
.task-scope button { min-height: 44px; padding: 8px 13px; border-radius: 9px; background: transparent; color: #6a7c89; font-size: 12px; transition: background-color 150ms ease, color 150ms ease, transform 100ms var(--ease-out); }
.task-scope button.active, .task-scope button[aria-pressed=true] { background: #fff; color: #245fc5; font-weight: 600; box-shadow: 0 2px 5px #354c600b, 0 1px 1px #354c6005; }
.task-list-intro { color: #667079; font-size: var(--type-meta); line-height: 1.8; }
.task-search-row { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0 17px; }
.search-box { position: relative; flex: 1; min-width: 0; }
.search-box > svg { position: absolute; left: 13px; top: 14px; width: 16px; height: 16px; color: #7f909d; pointer-events: none; }
.search-box input { width: 100%; min-height: 44px; padding: 10px 12px 10px 37px; border: 1px solid #dce5eb; border-radius: 11px; background: #ffffffb8; color: #435e72; font-size: 16px; line-height: 1.4; transition: border-color 140ms ease, background-color 140ms ease; }
.search-box input::placeholder { color: #5c6f7e; font-size: 13px; }
.task-filter-toggle { position: relative; flex: 0 0 auto; }
.task-filter-toggle > summary { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 13px; border: 1px solid #dce5eb; border-radius: 11px; color: #61798c; background: #ffffffb8; font-size: 12px; list-style: none; cursor: pointer; }
.task-filter-toggle > summary::-webkit-details-marker { display: none; }
.task-filter-toggle > summary svg { width: 16px; height: 16px; }
.task-filter-toggle[open] > summary { color: #2866ac; border-color: #cbdaf0; background: #f5f8fd; }
.filter-fields { position: absolute; right: 0; top: calc(100% + 8px); z-index: 12; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; width: 390px; padding: 19px; border: 1px solid #fffffff2; border-radius: 16px; background: #fdfefe; box-shadow: 0 12px 40px #243c521a, 0 0 0 1px #d3dfe680; transform-origin: right top; }
.filter-fields label { display: grid; gap: 7px; min-width: 0; color: #626d75; font-size: 11px; }
.filter-fields select { width: 100%; min-width: 0; min-height: 44px; padding: 9px 10px; border: 1px solid #dce5eb; border-radius: 9px; background: #f8fafc; color: #4d6577; font-size: 16px; }
.filter-fields .history-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 44px; color: #656f77; font-size: 11px; }
.history-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.filter-fields .button { justify-self: start; }
.active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 0 12px; }
.active-filters:empty { display: none; }
.active-filters > span { padding: 7px 10px; border-radius: 6px; background: #eef3f9; color: #576c87; font-size: 11px; }
.active-filters button { min-height: 44px; background: transparent; color: var(--blue); font-size: 11px; }
.tasks-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
.tasks-table th { padding: 10px 12px; border-top: 1px solid #eef0f2; border-bottom: 1px solid #eef0f2; background: #fafbfc; color: #626d76; font-size: var(--type-meta); font-weight: 500; line-height: 1.6; }
.tasks-table th:first-child { width: 29%; padding-left: 20px; }
.tasks-table th:nth-child(2) { width: 11%; }
.tasks-table th:nth-child(3) { width: 12%; }
.tasks-table th:nth-child(4) { width: 15%; }
.tasks-table th:nth-child(5) { width: 10%; }
.tasks-table th:nth-child(6) { width: 12%; }
.tasks-table th:last-child { width: 110px; }
.tasks-table td { padding: 13px 12px; border-bottom: 1px solid #eef0f2; color: #55636e; font-size: 13px; line-height: 1.7; vertical-align: middle; overflow-wrap: anywhere; }
.tasks-table td:first-child { padding-left: 20px; }
.tasks-table tr:last-child td { border-bottom: 0; }
.task-title { display: block; max-width: 100%; min-height: 44px; padding: 4px 0; background: transparent; color: #253640; font-size: var(--type-title); font-weight: 600; line-height: 1.55; text-align: left; overflow-wrap: anywhere; }
.task-project { margin-top: 3px; color: #68737b; font-size: var(--type-meta); line-height: 1.7; overflow-wrap: anywhere; }
.task-blocker { margin-top: 8px; color: #7d684a; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.owner-inline { color: #485965; font-size: 13px; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 6px; color: #647b88; background: #edf2f5; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.badge.proposed { color: #74509d; background: #f2eaf8; }
.badge.confirmed { color: #355f94; background: #eaf2fc; }
.badge.in_progress { color: var(--green); background: var(--green-soft); }
.badge.waiting { color: var(--amber); background: var(--amber-soft); }
.badge.done { color: #636c67; background: #f1f4f2; }
.badge.cancelled { color: #686b6e; background: #f3f4f5; }
.due-date { color: #405462; font-size: var(--type-body); font-weight: 600; font-variant-numeric: tabular-nums; }
.due-date.overdue, .due-note.overdue { color: var(--red); }
.due-date.soon { color: #8b6229; }
.due-note { margin-top: 4px; color: #806332; font-size: var(--type-meta); }
.coord-tag { display: inline-flex; align-items: center; gap: 4px; color: #8b6229; font-size: var(--type-meta); font-weight: 600; white-space: nowrap; }
.coord-tag svg { width: 12px; height: 12px; }
.task-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.task-row-actions .button { min-height: 44px; padding: 8px 10px; border-color: #e3e9f0; background: #f9fbfd; color: #506f91; font-size: var(--type-meta); font-weight: 500; }
.task-panel-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding: 12px 3px; border: 0; color: #5c6f7e; font-size: 11px; line-height: 1.7; }
.mobile-label { display: none; }
.empty-state { padding: 46px 24px 48px; border: 1px solid #ffffffed; border-radius: 19px; background: #ffffffba; box-shadow: 0 4px 20px #36506404; text-align: center; }
.empty-art { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: 0 auto 17px; border: 1px solid #e4ebef; border-radius: 16px; background: #f0f5f8; color: #8095a4; box-shadow: inset 0 1px 0 #fff; }
.empty-art svg { width: 23px; height: 23px; }
.empty-state h3 { color: #35444e; font-size: 18px; font-weight: 600; }
.empty-state p { max-width: 440px; margin: 10px auto 0; color: #656d73; font-size: 13px; line-height: 1.9; }
.empty-state .button { margin-top: 17px; }

/* Activity and quiet supporting text */
.bottom-grid { margin-top: 25px; }
.activity-panel { padding: 0 2px; }
.activity-panel .section-head { margin-bottom: 6px; }
.activity-panel .section-head h2 { color: #485862; font-size: var(--type-title); }
.all-activity-button { min-height: 44px; padding: 8px 0 8px 10px; background: transparent; color: #656d74; font-size: 11px; }
.activity-list { display: grid; gap: 0; }
.activity-item { display: flex; align-items: baseline; gap: 10px; min-height: 29px; padding: 5px 0; color: #656d74; font-size: var(--type-meta); line-height: 1.7; }
.activity-dot { flex-shrink: 0; width: 4px; height: 4px; margin-bottom: 2px; border-radius: 50%; background: #c2c8cd; }
.activity-text { min-width: 0; overflow-wrap: anywhere; }
.activity-text span { color: #676c70; }
.activity-time { flex-shrink: 0; margin-left: auto; padding-left: 10px; color: #696d70; font-size: 11px; white-space: nowrap; }
.activity-empty { padding: 5px 0; color: #666c71; font-size: 11px; line-height: 1.8; }
.full-activity .activity-list { gap: 7px; }
.full-activity .activity-item { font-size: 12px; }
.full-activity .activity-time { font-size: 11px; }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 25px; padding-top: 14px; border-top: 1px solid #dce5eb; color: #5c6f7e; font-size: 10px; line-height: 1.8; letter-spacing: .03em; }
.workspace-note { letter-spacing: 0; }

/* Project is the primary unit; tasks stay together beneath it. */
.members-section { border: 0; }
.members-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 7px 3px; list-style: none; cursor: pointer; color: #546d7e; font-size: 13px; font-weight: 550; }
.members-section > summary::-webkit-details-marker { display: none; }
.members-section > summary small { margin-left: 8px; color: #5c6f7e; font-size: 11px; font-weight: 400; }
.members-toggle-label { display: inline-flex; align-items: center; gap: 7px; color: #6b8393; font-size: 11px; font-weight: 400; }
.members-toggle-label svg { width: 14px; height: 14px; }
.members-section[open] .members-toggle-label svg { transform: rotate(90deg); }
.members-section .members-grid { margin: 5px 0 16px; }
.member-task .member-task-copy { display: grid; gap: 4px; min-width: 0; }
.member-task-copy strong, .member-task-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-task-copy strong { color: #364c5a; font-size: 13px; font-weight: 600; }
.member-task-copy > span { color: #67747d; font-size: 12px; }
.task-panel-top .section-head { flex-wrap: wrap; gap: 8px 12px; }
.task-panel-top .section-head h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.task-panel-top .section-head h2 .count { margin-left: 0; font-size: 12px; font-weight: 400; }
.project-groups { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 20px; min-width: 0; }
.project-group { --project-accent: #3770cc; --project-soft: #eaf2ff; --project-icon: #dbe9ff; --project-line: #dce7f8; min-width: 0; border: 1px solid #ffffffed; border-radius: 18px; background: #fff; box-shadow: 0 4px 18px #334f6608, 0 1px 3px #334f6605, inset 0 1px 0 #fff; }
.project-group-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 12px; padding: 19px 18px 16px; border-bottom: 1px solid var(--project-line); border-radius: 17px 17px 0 0; background: linear-gradient(115deg, var(--project-soft), #ffffff 108%); }
.project-identity { display: flex; flex: 1 1 210px; align-items: flex-start; gap: 11px; min-width: 0; }
.project-symbol { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; margin-top: 1px; border: 1px solid #ffffffbf; border-radius: 10px; color: var(--project-accent); background: var(--project-icon); box-shadow: 0 2px 4px #334f6605, inset 0 1px 0 #ffffff8f; }
.project-symbol svg { width: 19px; height: 19px; stroke-width: 1.5; }
.project-heading-copy { flex: 1; min-width: 0; }
.project-name { color: #233d50; font-size: 20px; font-weight: 650; line-height: 1.45; letter-spacing: -.025em; overflow-wrap: anywhere; }
.project-group-head p { margin-top: 5px; color: #5c6f7e; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.project-people { overflow-wrap: anywhere; }
.project-group .project-add { flex: 0 0 auto; min-height: 44px; margin-left: auto; padding-inline: 10px; border-color: #d9e3ef; color: #3764a2; background: #ffffffbd; font-size: 12px; font-weight: 500; }
.project-add svg { width: 15px; height: 15px; }
.project-task-list { display: grid; min-width: 0; margin: 0; padding: 0 18px; list-style: none; }
.project-task-item { min-width: 0; padding: 13px 0 15px; }
.project-task-item + .project-task-item { border-top: 1px solid #e9eef2; }
.project-task-item[hidden] { display: none !important; }
.project-task-main { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.project-task-main .task-title { flex: 1; min-width: 0; min-height: 44px; padding: 9px 0; color: #2c4558; font-size: 16px; font-weight: 600; line-height: 1.6; }
.project-task-main .badge { flex-shrink: 0; margin-top: 10px; }
.task-context-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: #5c6f7e; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.project-task-item .task-blocker { margin-top: 6px; color: #856136; font-size: 12px; }
.project-task-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 9px; }
.project-task-info { display: flex; flex: 1 1 150px; flex-wrap: wrap; align-items: baseline; gap: 5px 14px; min-width: 0; }
.project-task-item .owner-inline { min-width: 0; color: #526878; font-size: 13px; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }
.task-delivery { min-width: 0; }
.project-task-item .due-date { font-size: 13px; font-weight: 500; line-height: 1.7; overflow-wrap: anywhere; }
.project-task-item .due-date.soon, .project-task-item .due-date.overdue { font-weight: 600; }
.project-task-item .due-note { margin-top: 2px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.project-task-item .task-row-actions { flex: 0 0 auto; margin-left: auto; }
.project-task-item .task-row-actions .button { min-height: 44px; border-color: #e1e8ef; background: #fff; color: #506b80; }
.project-task-item .task-row-actions [data-action="progress"] { border-color: #dce7fa; background: #edf3ff; color: #3265b4; }
.project-card-footer { margin: 0 18px; padding: 3px 0; border-top: 1px solid #e9eef2; }
.project-expand { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 8px 0; background: transparent; color: #557287; font-size: 12px; line-height: 1.7; text-align: left; }
.project-expand svg { width: 15px; height: 15px; }
.project-expand[aria-expanded=true] svg { transform: rotate(90deg); }
/* Sign in */
.auth-page { display: grid; align-items: center; justify-items: center; min-height: 100dvh; padding: 40px 20px; background: radial-gradient(ellipse at 22% 20%, #ddeaff 0, #ddeaff00 52%), radial-gradient(ellipse at 83% 75%, #e9dff5 0, #e9dff500 51%), radial-gradient(ellipse at 55% 100%, #f9eddc99 0, #f9eddc00 52%), #f4f6fa; }
.auth-card { width: 100%; max-width: 432px; min-width: 0; padding: 41px 36px 30px; border: 1px solid #fffffff2; border-radius: 27px; background: linear-gradient(145deg, #fffffff0, #ffffffb3); backdrop-filter: blur(24px) saturate(120%); -webkit-backdrop-filter: blur(24px) saturate(120%); box-shadow: 0 28px 80px #314f6710, 0 5px 16px #314f6707, 0 0 0 1px #c5d1d940, inset 0 1px 0 #fff; }
.auth-identity { display: flex; align-items: center; gap: 17px; margin-bottom: 36px; }
.auth-emblem { display: grid; place-items: center; flex: 0 0 52px; width: 52px; height: 52px; border: 1px solid #fff; border-radius: 16px; background: linear-gradient(145deg, #fff, #e3edff); box-shadow: 0 4px 10px #334c5e08, 0 0 0 1px #d8e0e565, inset 0 1px 1px #fff; }
.auth-emblem img { display: block; width: 32px; height: 32px; opacity: .87; }
.auth-name { margin: 0; min-width: 0; color: #293e4e; font-size: 30px; font-weight: 550; line-height: 1.15; letter-spacing: -.035em; }
.auth-form { width: 100%; min-width: 0; }
.auth-form h2 { margin: 0; color: #424c55; font-size: 19px; font-weight: 600; line-height: 1.5; letter-spacing: -.02em; }
.auth-form > p { margin: 8px 0 22px; color: #686e74; font-size: 13px; line-height: 1.8; }
.auth-form .field { gap: 9px; margin-bottom: 23px; }
.auth-form .field label { margin: 0; color: #5c6369; font-size: 12px; font-weight: 550; }
.auth-form .field input { min-height: 52px; padding: 13px 15px; border: 1px solid #d9e3ea; border-radius: 12px; background: #f6f9fbba; color: #314c61; font-size: 16px; box-shadow: inset 0 1px 2px #28354103; transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease; }
.auth-form .field input::placeholder { color: #7a8288; }
.auth-form .field input:focus { outline: 2px solid #2469e833; outline-offset: 2px; border-color: #7fa6eb; background: #fff; box-shadow: 0 2px 7px #27333c04; }
.auth-form .button { width: 100%; min-height: 50px; border-radius: 12px; font-size: 14px; }
.auth-form .button.primary { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 4px 12px #2469e829, inset 0 1px 0 #ffffff24; }
.auth-form .button.primary:disabled { background: var(--blue); border-color: var(--blue); box-shadow: none; transform: none; }
.auth-form .button.primary:active:not(:disabled) { background: var(--blue-hover); box-shadow: inset 0 1px 4px #00000016; transform: scale(.98); }
.auth-footnote { margin-top: 24px; padding-top: 20px; border-top: 1px solid #dce1e388; color: #727b80; font-size: 12px; line-height: 1.8; text-align: center; }
.auth-footnote:empty { display: none; }
.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100dvh; padding: 30px; color: #636d76; font-size: 13px; }

/* Sheets, forms and feedback */
#modal { width: min(660px, calc(100% - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid #fffffff2; border-radius: 23px; background: #fff; color: var(--ink); box-shadow: 0 30px 100px #1e354b29, 0 8px 24px #1e354b0a, 0 0 0 1px #ccd9e14d; overflow: auto; scrollbar-width: thin; scrollbar-color: #c8d5de transparent; }
#modal::backdrop { background: #253c502e; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-head { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 25px 26px 20px; border-bottom: 1px solid #e7edf2; background: #f7fafbe8; backdrop-filter: blur(18px) saturate(120%); -webkit-backdrop-filter: blur(18px) saturate(120%); }
.modal-head h2 { color: #293f50; font-size: 25px; font-weight: 650; line-height: 1.35; letter-spacing: -.03em; }
.modal-head p { margin-top: 7px; color: #656d73; font-size: var(--type-meta); line-height: 1.8; overflow-wrap: anywhere; }
.modal-head .icon-button { margin: -5px -8px 0 0; background: #e9f0f5; color: #688093; }
.modal-body { min-width: 0; padding: 25px 26px 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin-bottom: 18px; }
.field label, .field-label { color: #3f505e; font-size: var(--type-body); font-weight: 600; line-height: 1.7; }
.field label .optional { margin-left: 5px; color: #646b71; font-size: 11px; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 46px; padding: 11px 12px; border: 1px solid #dbe5ed; border-radius: 11px; background: #f7f9fb; color: #344f64; font-size: 16px; line-height: 1.6; transition: border-color 140ms ease, background-color 140ms ease; }
.field input::placeholder, .field textarea::placeholder { color: #5c6f7e; opacity: 1; font-size: 14px; font-weight: 400; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #8aadd0; background: #fff; }
.field input:disabled, .field select:disabled, .field textarea:disabled { opacity: 1; background: #f4f6f8; color: #616c75; }
.field textarea { min-height: 88px; resize: vertical; }
.field small, .field-help { color: #656f75; font-size: var(--type-meta); line-height: 1.8; }
.modal-actions { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; padding: 16px 26px 20px; border-top: 1px solid #e6edf2; background: #f6f9fbe8; backdrop-filter: blur(18px) saturate(120%); -webkit-backdrop-filter: blur(18px) saturate(120%); }
.modal-actions .left { margin-right: auto; max-width: 48%; color: #656f77; font-size: 11px; line-height: 1.8; }
.modal-actions .button { flex-shrink: 0; min-width: 80px; }
.modal-actions .button.primary { min-width: 108px; }
.task-basics { min-width: 0; }
.task-basics > .field input { min-height: 50px; font-size: 17px; font-weight: 550; background: #f6f9fb; border-color: #dbe6ed; }
.task-basics > .field input:focus { background: #fff; }
.form-section-label { margin: 0 0 14px; color: #606d7a; font-size: 11px; font-weight: 550; }
.task-options { margin: 0 0 17px; border: 1px solid #e2eaf0; border-radius: 13px; background: #f9fbfc; overflow: hidden; }
.task-options > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 12px 14px; color: #5e6e7e; font-size: 12px; font-weight: 500; cursor: pointer; list-style: none; }
.task-options > summary::-webkit-details-marker { display: none; }
.task-options > summary span { color: #666d75; font-size: 11px; font-weight: 400; }
.task-options > summary svg { width: 15px; height: 15px; }
.task-options[open] > summary { margin-bottom: 17px; border-bottom: 1px solid #e8edf3; background: #f6f9fc; }
.task-options[open] > summary svg { transform: rotate(90deg); }
.task-options > :not(summary) { margin-left: 14px; margin-right: 14px; }
.task-options > .form-grid, .task-options > .task-options-body { margin-left: 0; margin-right: 0; padding: 0 14px; }
.quick-dates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1px; }
.date-chip { min-height: 44px; padding: 8px 11px; border: 1px solid #e0e7ef; border-radius: 8px; background: #f4f7fb; color: #5c6c7b; font-size: 11px; transition: background 140ms, color 140ms, transform 100ms; }
.date-chip.is-selected, .date-chip.active, .date-chip[aria-pressed=true] { background: #eaf1fc; border-color: #b6cee9; color: #3f6f9c; }
.status-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.status-options > label { position: relative; display: flex; min-width: 0; cursor: pointer; }
.status-options input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.status-option { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 9px 7px; border: 1px solid #dfe7ef; border-radius: 8px; background: #f8fafd; color: #616f7b; font-size: 11px; text-align: center; transition: background 140ms, color 140ms, border-color 140ms; }
.status-options input:checked + .status-option { border-color: #a6c3e5; background: #edf4fe; color: #3d70a5; }
.status-options input:focus-visible + .status-option { outline: 3px solid #1768d333; outline-offset: 2px; }
.status-options input:disabled + .status-option { opacity: .6; cursor: default; }
.owner-note { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin: 0 0 17px; padding: 10px 12px; border-radius: 8px; color: #606c77; background: #f3f7fc; font-size: 11px; line-height: 1.8; }
.owner-note strong { color: #5b6e81; font-weight: 600; }
.check-field { display: flex; align-items: flex-start; gap: 9px; min-height: 44px; margin: 3px 0 17px; padding: 5px 0; color: #5e6e7d; font-size: 12px; line-height: 1.8; }
.check-field input { flex-shrink: 0; width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--blue); }
.check-field small { display: block; color: #646d76; font-size: 11px; }
.form-hint { margin: 0 0 18px; padding: 12px 14px; border-radius: 9px; background: #f2f6fb; color: #5e6c78; font-size: 11px; line-height: 1.8; }
.form-error { margin: 0 0 18px; padding: 11px 14px; border: 1px solid #efdcdb; border-radius: 9px; color: #9b5b58; background: #fff6f5; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.form-error:empty { display: none; }
.conflict-panel { margin: 0 0 18px; padding: 15px; border: 1px solid #e8d4af; border-radius: 11px; color: #806a46; background: #fffaf0; font-size: 12px; line-height: 1.8; }
.conflict-panel p { margin: 7px 0; }
.conflict-auto { margin: 12px 0; padding: 12px; border: 1px solid #e9dfcd; border-radius: 9px; background: #fffefa; }
.conflict-auto ul { display: grid; gap: 9px; padding: 0; margin: 9px 0 0; list-style: none; }
.conflict-auto li { display: grid; gap: 3px; }
.conflict-auto li span { color: #506778; white-space: pre-wrap; overflow-wrap: anywhere; }
.conflict-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 15px 0; padding: 12px; border: 1px solid #dac5a2; border-radius: 10px; }
.conflict-choice legend { padding: 0 5px; color: #6a573d; font-size: 13px; font-weight: 600; }
.conflict-choice label { display: flex; align-items: flex-start; gap: 8px; min-height: 48px; padding: 11px; border: 1px solid #e5dfd4; border-radius: 9px; background: #fff; cursor: pointer; }
.conflict-choice label:has(input:checked) { border-color: #8bb0d5; background: #f0f6fd; }
.conflict-choice input { flex-shrink: 0; margin: 4px 0 0; accent-color: var(--blue); }
.conflict-choice label > span { display: grid; gap: 5px; min-width: 0; }
.conflict-choice label strong { color: #36536b; font-size: 12px; }
.conflict-choice label span span { white-space: pre-wrap; overflow-wrap: anywhere; color: #657685; }
.discard-prompt { margin: 15px 24px; padding: 13px 15px; border: 1px solid #e9d3b1; border-radius: 10px; color: #826a43; background: #fff9ef; font-size: 12px; line-height: 1.8; }
.discard-prompt p { margin-bottom: 9px; }
.discard-prompt .button { margin-top: 4px; margin-right: 5px; }
.discard-prompt button[data-action*=discard] { color: #8d5f52; border-color: #e9d5cc; background: #fff; }
.readonly-info { margin: 0 0 18px; padding: 11px 13px; border-radius: 8px; background: #f5f8fb; color: #636f79; font-size: 11px; line-height: 1.8; }
.external-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 12px; overflow-wrap: anywhere; }
.external-link svg { width: 15px; height: 15px; }
.account-list { display: grid; gap: 10px; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid #e1e7ed; border-radius: 10px; }
.account-row > div { min-width: 0; }
.account-row strong { color: #5b6e7f; font-size: 13px; }
.account-row p { margin-top: 5px; color: #636d75; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.account-row .button { flex-shrink: 0; }
.credential-result { margin: 0 0 18px; padding: 16px; border: 1px solid #cbded2; border-radius: 10px; background: #f4faf6; color: #5b7264; font-size: 12px; line-height: 1.8; }
.credential-result code { display: block; margin: 8px 0; color: #537561; font-family: ui-monospace, Consolas, monospace; font-size: 18px; overflow-wrap: anywhere; }
.save-feedback { margin: 0 0 16px; padding: 10px 13px; border-radius: 9px; background: #f0f7f2; color: #577361; font-size: 12px; line-height: 1.8; }
.save-feedback:empty { display: none; }
.quick-progress .status-options { margin-bottom: 21px; }
.task-context { display: grid; gap: 6px; padding-bottom: 17px; margin-bottom: 18px; border-bottom: 1px solid #e6ecef; }
.task-context-project { color: #293f4c; font-size: 19px; line-height: 1.45; font-weight: 650; overflow-wrap: anywhere; }
.task-context-title { color: #5a6e7b; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.task-primary-fields .owner-note { min-height: 47px; margin: 0; }
.coordination-fields .check-field { margin-bottom: 8px; color: #465c6b; font-size: 13px; }
.quick-progress .form-section-label { font-size: 14px; color: #3f505e; }
.quick-progress .status-option { font-size: 13px; }
.field .quick-dates { gap: 5px; }
.field .date-chip { font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 150; width: max-content; max-width: calc(100% - 32px); padding: 12px 19px; border: 1px solid #ffffff24; border-radius: 13px; color: #fff; background: #344e63; box-shadow: 0 8px 26px #1e354526; font-size: 13px; line-height: 1.8; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity 160ms ease, transform 180ms var(--ease-out); }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* Pointer effects apply only on devices with a real hover state. */
@media (hover: hover) and (pointer: fine) {
  .nav button:hover:not(.active), .sidebar-tools button:hover, .sidebar-tools a:hover { background: #e5edf9; color: #2b5a96; }
  .nav .assistant-entry:hover:not(.active) { background: #e9dff8; border-color: #d4c2ef; color: var(--violet-hover); }
  .button:hover:not(:disabled) { background: #f4f8fb; border-color: #cbdbe6; }
  .button.primary:hover:not(:disabled), .auth-form .button.primary:hover:not(:disabled) { background: var(--blue-hover); border-color: var(--blue-hover); }
  .assistant-compose-actions .button.primary:hover:not(:disabled) { background: var(--violet-hover); border-color: var(--violet-hover); }
  .button.ghost:hover, .icon-button:hover { background: #e7eff5; color: #4e6d83; }
  .quick-action:hover { background: #e3ebf1; }
  .task-title:hover, .member-task:hover, .member-name:hover, .member-more-tasks:hover, .member-footer button:hover { color: #2c6a9e; }
  .tasks-table tbody tr:hover { background: #f8fbfd; }
  .project-expand:hover { color: #2c6a9e; }
  .task-filter-toggle > summary:hover, .task-options > summary:hover { background: #edf4f9; }
  .date-chip:hover { background: #e5eff8; color: #4c7097; }
  .status-options label:hover .status-option { border-color: #b7cee0; }
  .members-section > summary:hover { color: #315f80; }
  .project-group .project-add:hover:not(:disabled), .project-task-item .task-row-actions .button:hover:not(:disabled) { border-color: #c4d7f4; background: #e3edff; color: #205ab6; }
  .assistant-modes button:hover:not(.selected) { background: #ffffff99; color: var(--violet); }
  .assistant-sources button:hover { border-color: #dbcaed; background: #fcfaff; }
  .assistant-draft .button:hover:not(:disabled) { border-color: #d4c1ee; background: #ece3f8; }
}

/* Layout changes keep content readable from a phone to a large studio display. */
@media (min-width: 1100px) {
  .project-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1540px) {
  .project-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1700px) {
  .app-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .sidebar { width: 214px; padding-inline: 19px; }
  .content { padding: 33px 38px 30px 16px; }
  .topbar { margin-right: 38px; margin-left: 16px; }
  .members-grid { gap: 14px; }
  .member-body { padding: 14px 18px 8px; }
  .member-top, .member-footer { padding-left: 18px; }
}
@media (max-width: 1270px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { left: 14px; width: 180px; padding-inline: 10px; }
  .workspace-name { font-size: 13px; }
  .workspace-emblem { width: 27px; height: 27px; }
  .content { padding-right: 24px; }
  .topbar { margin-right: 24px; }
  .summary-item { padding-inline: 14px; column-gap: 8px; }
  .summary-value { font-size: 32px; }
  .summary-note { font-size: 10px; }
  .member-top { padding-left: 12px; }
  .member-body { padding-inline: 12px; }
  .member-footer { padding-left: 12px; }
  .tasks-table th:nth-child(5), .tasks-table td:nth-child(5) { display: none; }
  .tasks-table th:first-child { width: 31%; }
  .tasks-table th:last-child { width: 102px; }
}
@media (max-width: 1100px) {
  .task-panel { display: block; }
  .task-panel-top { padding-bottom: 11px; }
  .task-search-row { padding-top: 0; padding-bottom: 15px; }
  .members-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .today { display: none; }
  .summary-item { grid-template-columns: auto minmax(0, 1fr); gap: 9px 8px; padding: 12px; }
  .summary-label { grid-column: 1 / -1; font-size: 12px; }
  .summary-value { grid-row: 2; grid-column: 1; font-size: 30px; }
  .summary-note { grid-row: 2; grid-column: 2; margin-top: 0; text-align: right; }
  .tasks-table th:nth-child(6), .tasks-table td:nth-child(6) { display: none; }
  .tasks-table th:first-child { width: 37%; }
  .tasks-table th:last-child { width: 99px; }
  .page-heading { flex-wrap: wrap; row-gap: 15px; }
}
@media (max-width: 760px) {
  :root { --type-page: 29px; --type-section: 19px; }
  .app-shell { display: block; }
  .sidebar { position: relative; inset: auto; width: auto; margin: 10px 10px 0; padding: 12px; border-radius: 18px; }
  .workspace-brand { max-width: calc(100% - 130px); margin: 0 0 0 3px; gap: 9px; min-height: 42px; }
  .mobile-menu-button { position: absolute; right: 12px; top: 11px; display: flex; align-items: center; gap: 7px; min-height: 44px; max-width: 130px; padding: 8px; border-radius: 10px; background: #eef4f9; color: #45647a; font-size: 12px; }
  .mobile-menu-button span { color: #718394; font-size: 11px; }
  .mobile-menu-button svg { width: 13px; height: 13px; }
  .mobile-menu-open .mobile-menu-button svg { transform: rotate(90deg); }
  .workspace-emblem { width: 27px; height: 27px; }
  .workspace-name { font-size: 13px; }
  .nav-section, .sidebar-note { display: none; }
  .nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 18px; }
  .sidebar:not(.mobile-menu-open) .nav, .sidebar:not(.mobile-menu-open) .sidebar-tools { display: none; }
  .nav button { justify-content: center; gap: 5px; min-width: 0; min-height: 44px; padding: 9px 3px; border-radius: 10px; font-size: 12px; }
  .nav button svg { width: 15px; height: 15px; }
  .nav .nav-count { min-width: 17px; margin-left: 0; padding: 1px 4px; font-size: 10px; }
  .nav .assistant-entry { margin-top: 0; padding-top: 9px; }
  .sidebar-bottom { margin: 0; padding: 0; }
  .sidebar-tools { display: flex; justify-content: flex-end; gap: 9px; margin-top: 3px; }
  .sidebar-tools button, .sidebar-tools a { min-height: 44px; gap: 5px; padding: 6px 3px; color: #667b8b; font-size: 11px; }
  .sidebar-tools svg { width: 13px; height: 13px; }
  .user-pill { display: none; }
  .user-pill strong { max-width: 80px; color: #4a6477; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .user-pill small { margin-top: 3px; font-size: 10px; }
  .user-pill .icon-button { width: 44px; min-width: 44px; margin-left: 0; }
  .topbar { position: relative; top: auto; min-height: 32px; margin: 8px 17px 0; padding: 0; gap: 6px; border: 0; border-radius: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .breadcrumb { gap: 5px; font-size: 11px; }
  .sync-status { gap: 5px; font-size: 10px; }
  .topbar-right { gap: 0; }
  .content { padding: 18px 16px 22px; }
  .page-heading { gap: 15px; margin-bottom: 20px; align-items: flex-start; }
  .page-heading h1 { font-size: var(--type-page); }
  .page-heading p { margin-top: 7px; font-size: 12px; }
  .page-heading .page-description { display: none; }
  .heading-actions { width: 100%; gap: 8px; }
  .heading-actions .button { flex: 1; padding: 10px 11px; font-size: 13px; }
  .heading-actions .button svg { width: 16px; height: 16px; }
  .workspace-overview { margin-bottom: 19px; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; padding: 8px; border-radius: 16px; }
  .summary-item { padding: 11px 12px; }
  .summary-label { font-size: 12px; }
  .summary-value { font-size: 29px; }
  .summary-value span { margin-left: 4px; font-size: 10px; }
  .summary-note { font-size: 10px; }
  .section-head { gap: 10px; margin-bottom: 11px; }
  .section-head h2 { font-size: var(--type-section); }
  .members-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .member-card { border-radius: 13px; }
  .member-top { gap: 1px; padding: 6px 4px 3px 12px; }
  .member-title h3, .member-name { font-size: 15px; }
  .member-title small { font-size: 11px; }
  .member-menu { width: 44px; min-width: 44px; padding-inline: 9px; }
  .member-body { padding: 10px 12px 5px; }
  .member-load strong { font-size: 24px; }
  .member-next { margin-top: 9px; font-size: 11px; }
  .member-footer { padding-inline: 12px 8px; gap: 2px; }
  .my-schedule { padding: 14px; gap: 10px; margin-bottom: 19px; }
  .my-schedule .button { font-size: 13px; padding-inline: 10px; }
  .banner { padding: 12px 14px; font-size: 11px; }
  .task-panel { scroll-margin-top: 12px; }
  .task-panel-top { padding: 0 0 10px; }
  .task-panel-top .section-head { gap: 10px; margin-bottom: 0; }
  .task-panel-top .section-head h2 { flex: 1 0 100%; }
  .task-scope { display: flex; width: 100%; padding: 3px; border-radius: 11px; }
  .task-scope button { flex: 1; padding: 8px; font-size: 12px; }
  .task-search-row { padding: 0 0 14px; gap: 8px; }
  .task-filter-toggle > summary { padding-inline: 11px; font-size: 12px; }
  .filter-fields { width: min(320px, calc(100vw - 32px)); grid-template-columns: 1fr; padding: 16px; gap: 12px; }
  .active-filters { padding: 0 0 12px; }
  .project-groups { gap: 12px; }
  .project-group { border-radius: 16px; }
  .project-group-head { gap: 10px; padding: 16px 15px; border-radius: 15px 15px 0 0; }
  .project-identity { gap: 10px; }
  .project-symbol { flex-basis: 33px; width: 33px; height: 33px; margin-top: 2px; border-radius: 9px; }
  .project-symbol svg { width: 17px; height: 17px; }
  .project-name { font-size: 20px; }
  .project-group .project-add { padding-inline: 9px; }
  .project-add svg { width: 14px; height: 14px; }
  .project-task-list { padding-inline: 15px; }
  .project-card-footer { margin-inline: 15px; }
  .tasks-table, .tasks-table tbody { display: block; }
  .tasks-table thead { display: none; }
  .tasks-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding: 13px 15px; border-top: 1px solid #edf1f4; }
  .tasks-table td, .tasks-table td:first-child { display: block; width: auto; padding: 0; border: 0; font-size: 13px; }
  .tasks-table td:first-child { grid-column: 1 / -1; }
  .tasks-table td:nth-child(2) { grid-row: 2; grid-column: 1; }
  .tasks-table td:nth-child(3) { grid-row: 2; grid-column: 2; justify-self: end; }
  .task-panel-footer { padding: 12px 2px; font-size: 10px; }
  .empty-state { padding: 34px 18px 38px; }
  .bottom-grid { margin-top: 20px; }
  .activity-item { gap: 7px; }
  .activity-time { font-size: 10px; padding-left: 4px; }
  .page-footer { margin-top: 22px; gap: 5px; font-size: 10px; }
  .workspace-note { width: 100%; }
  .auth-page { padding: 24px 16px; }
  .auth-card { padding: 32px 26px 26px; border-radius: 24px; }
  .auth-identity { gap: 14px; margin-bottom: 32px; }
  .auth-emblem { flex-basis: 46px; width: 46px; height: 46px; border-radius: 14px; }
  .auth-emblem img { width: 29px; height: 29px; }
  .auth-name { font-size: clamp(23px, 7vw, 28px); }
  #modal { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 20px; }
  .modal-head { padding: 20px 17px 17px; gap: 10px; }
  .modal-head h2 { font-size: 23px; }
  .modal-head p { font-size: 12px; }
  .modal-body { padding: 21px 17px 9px; }
  .modal-actions { padding: 14px 17px max(17px, env(safe-area-inset-bottom)); gap: 8px; }
  .modal-actions .left { flex-basis: 100%; max-width: none; font-size: 11px; }
  .modal-actions .button { min-width: 75px; }
  .modal-actions .button.primary { min-width: 108px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .field { margin-bottom: 18px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .status-options { gap: 7px; }
  .status-option { font-size: 12px; }
  .account-row { flex-wrap: wrap; }
  .discard-prompt { margin: 14px 17px; }
  .conflict-choice { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .content { padding-inline: 12px; }
  .sidebar { margin-inline: 8px; padding-inline: 10px; }
  .workspace-name { font-size: 12px; }
  .user-pill { right: 12px; }
  .nav button { font-size: 11px; gap: 3px; }
  .nav button svg { width: 14px; height: 14px; }
  .summary-item { padding-inline: 9px; column-gap: 6px; }
  .summary-value { font-size: 27px; }
  .summary-label { font-size: 11px; }
  .project-group-head { padding-inline: 12px; }
  .project-identity { flex-basis: 150px; }
  .project-symbol { display: none; }
  .project-task-list { padding-inline: 12px; }
  .project-card-footer { margin-inline: 12px; }
  .members-grid { grid-template-columns: minmax(0, 1fr); }
  .heading-actions .button { padding-inline: 8px; font-size: 12px; }
  .auth-card { padding-inline: 23px; }
}

/* Weekly readiness stays quiet until someone needs to complete a report field. */
#modal[data-kind="weekly-report"], #modal[data-kind="weekly-report-loading"] { width: min(1260px, calc(100% - 32px)); }
.report-loading { padding: 25px 0 35px; color: #68717a; }
.report-controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 20px; }
.report-controls .field { margin-bottom: 0; }
.report-controls input { min-height: 44px; }
.report-week-buttons { display: flex; align-items: center; gap: 5px; }
.report-week-buttons .button { min-height: 44px; }
.report-group-field { flex: 1; min-width: 160px; }
.report-group-field input { width: 100%; }
.report-preview-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 0; border-top: 1px solid #e4e7ea; }
.report-preview-heading h3 { color: #303438; font-size: 18px; }
.report-preview-heading p, .report-preview-heading > span { margin-top: 5px; color: #68717a; font-size: 11px; line-height: 1.65; }
.weekly-table-wrap { overflow: auto; border: 1px solid #dce1e5; border-radius: 10px; }
.weekly-report-table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.7; }
.weekly-report-table th { padding: 11px 9px; border-right: 1px solid #e0e4e8; background: #f2f4f6; color: #515960; font-size: 11px; text-align: left; white-space: nowrap; }
.weekly-report-table td { padding: 12px 9px; min-width: 55px; border-top: 1px solid #e0e4e8; border-right: 1px solid #e0e4e8; vertical-align: top; overflow-wrap: anywhere; }
.weekly-report-table td:nth-child(2) { min-width: 35px; }
.weekly-report-table td:nth-child(4) { min-width: 130px; }
.weekly-report-table td:nth-child(6) { min-width: 130px; width: 12%; }
.weekly-report-table td:nth-child(7) { min-width: 170px; width: 23%; }
.weekly-report-table td:nth-child(8) { min-width: 160px; width: 22%; }
.weekly-report-table th:last-child, .weekly-report-table td:last-child { border-right: 0; }
.weekly-report-table input, .weekly-report-table textarea { width: 100%; min-height: 44px; padding: 9px; border: 1px solid #d6e1e9; border-radius: 8px; background: #fff; color: #344e60; font-size: 16px; line-height: 1.65; }
.weekly-report-table textarea { min-height: 100px; resize: vertical; }
.report-plan { white-space: pre-wrap; }
.report-row-warning { margin-top: 7px; color: #926524; font-size: 11px; line-height: 1.6; }
.report-row-warning summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 12px; }
.report-row-warning ul { margin: 0 0 8px; padding-left: 16px; }
.report-warnings { margin-bottom: 15px; padding: 8px 12px; border: 1px solid #ebdfca; border-radius: 8px; background: #fcf8ef; color: #805b25; font-size: 12px; }
.report-warnings summary, .report-archives summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; }
.report-warnings ul { margin: 4px 0 8px; padding-left: 18px; line-height: 1.8; }
.report-empty { padding: 45px 20px; border: 1px dashed #d5dce2; border-radius: 10px; background: #fafbfc; text-align: center; }
.report-empty h3 { margin-bottom: 8px; font-size: 15px; }
.report-empty p { color: #68717a; font-size: 12px; line-height: 1.7; }
.report-notice { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #dce9e0; border-radius: 8px; background: #f0f7f2; color: #41654c; font-size: 12px; line-height: 1.8; }
.report-archives { margin-top: 16px; color: #68717a; font-size: 12px; }
.report-archives > div { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 7px; }
.report-archives .button { min-height: 44px; }
.report-save-help { margin: 16px 0 12px; font-size: 11px; line-height: 1.8; }
.report-retained { margin-top: 16px; padding: 12px 14px; border: 1px solid #ebdfca; border-radius: 8px; background: #fcf8ef; color: #805b25; font-size: 12px; line-height: 1.8; }
.report-retained summary { min-height: 44px; cursor: pointer; }
.report-retained > div { margin-top: 10px; padding-top: 10px; border-top: 1px solid #ebdfca; }
.report-retained p { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1050px) and (min-width: 761px) {
  .page-heading:has(.weekly-export-button) { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .page-heading:has(.weekly-export-button) { flex-wrap: wrap; align-items: flex-start; }
  .page-heading:has(.weekly-export-button) .heading-actions { width: 100%; }
  .page-heading:has(.weekly-export-button) .heading-actions .button { flex: 1; min-height: 44px; }
  #modal[data-kind="weekly-report"], #modal[data-kind="weekly-report-loading"] { width: calc(100% - 20px); }
  .report-controls { gap: 12px; }
  .report-controls > .field, .report-week-buttons { width: 100%; }
  .report-week-buttons .button { flex: 1; }
  .report-preview-heading { flex-direction: column; align-items: flex-start; gap: 4px; }
  .weekly-table-wrap { overflow: visible; border: 0; }
  .weekly-report-table, .weekly-report-table tbody { display: block; }
  .weekly-report-table thead { display: none; }
  .weekly-report-table tr { display: block; margin-bottom: 14px; padding: 9px 13px; border: 1px solid #dce1e5; border-radius: 10px; background: #fafbfc; }
  .weekly-report-table td, .weekly-report-table td:nth-child(n) { display: block; width: 100%; min-width: 0; padding: 8px 0; border: 0; }
  .weekly-report-table td::before { display: block; margin-bottom: 5px; color: #68717a; font-size: 11px; font-weight: 500; content: attr(data-label); }
  .weekly-report-table td:first-child, .weekly-report-table td:nth-child(2) { display: inline-block; width: auto; min-width: 60px; margin-right: 20px; }
  .weekly-report-table td:nth-child(4) { padding-bottom: 13px; margin-bottom: 3px; border-bottom: 1px solid #e1e5e8; }
  .weekly-report-table input, .weekly-report-table textarea { min-height: 47px; font-size: 16px; }
  .report-archives > div { display: grid; }
  .report-archives .button { justify-content: flex-start; white-space: normal; text-align: left; }
}

/* A quiet assistant drawer; the main work remains in the existing task forms. */
#assistant-panel { inset: 16px 16px 16px auto; margin: 0; width: min(496px, calc(100% - 32px)); max-width: none; height: calc(100dvh - 32px); max-height: none; padding: 0; overflow: hidden; border: 1px solid #fffffff2; border-radius: 25px; color: #3d3d55; background: #f8f6fb; box-shadow: 0 24px 80px #40335d26, 0 0 0 1px #dad1e662; }
#assistant-panel[open] { display: flex; flex-direction: column; }
#assistant-panel::backdrop { background: #24333b24; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.assistant-head { display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; gap: 12px; padding: 24px 24px 20px; border-bottom: 1px solid #e8def2; background: linear-gradient(115deg, #ede4fbc9, #ffffffc9); backdrop-filter: blur(18px) saturate(120%); -webkit-backdrop-filter: blur(18px) saturate(120%); }
.assistant-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.assistant-heading > svg { width: 24px; height: 24px; color: var(--violet); }
.assistant-head h2 { color: #3b3056; font-size: 26px; font-weight: 650; line-height: 1.35; letter-spacing: -.03em; }
.assistant-head p { margin-top: 7px; font-size: 11px; line-height: 1.7; color: #69747a; }
.assistant-head-actions { display: flex; align-items: center; flex-shrink: 0; gap: 2px; }
.assistant-head-actions .icon-button { width: 44px; height: 44px; min-height: 44px; }
.assistant-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 21px 24px 24px; scrollbar-gutter: stable; }
.assistant-status { display: flex; align-items: center; gap: 7px; color: #626f76; font-size: var(--type-meta); line-height: 1.8; }
.assistant-status-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #a9b0b4; }
.assistant-status-dot.ready { background: #718e7d; }
.assistant-status.unavailable { display: block; padding: 16px 17px; border: 1px solid #dde3e4; border-radius: 13px; background: #eef2f1; color: #66726f; }
.assistant-status strong { display: block; color: #354b42; font-size: var(--type-title); font-weight: 600; }
.assistant-status p { margin-top: 6px; }
.assistant-status button { min-height: 44px; margin: 4px 0 -5px; padding: 6px 0; color: #406458; background: transparent; font-size: var(--type-meta); }
.assistant-modes { display: flex; gap: 3px; margin: 19px 0 24px; padding: 4px; border: 1px solid #e6dfef; border-radius: 13px; background: #eee8f5; }
.assistant-modes button { flex: 1; min-width: 0; min-height: 44px; padding: 9px 8px; border: 1px solid transparent; border-radius: 9px; color: #746781; background: transparent; font-size: 13px; transition: background-color 140ms ease, color 140ms ease, transform 100ms var(--ease-out); }
.assistant-modes button.selected { border-color: #fff; background: #fff; color: var(--violet); font-weight: 600; box-shadow: 0 2px 5px #5336610b; }
.assistant-welcome { padding: 24px 8px 27px; }
.assistant-welcome-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 19px; border: 1px solid #e0d0f2; border-radius: 15px; color: #8050c6; background: #ede2fa; box-shadow: inset 0 1px 0 #ffffffbd; }
.assistant-welcome-icon svg { width: 25px; height: 25px; stroke-width: 1.4; }
.assistant-welcome h3 { color: #403351; font-size: 25px; font-weight: 600; line-height: 1.4; letter-spacing: -.03em; }
.assistant-welcome p { max-width: 330px; margin-top: 12px; color: #5c6f7e; font-size: 14px; line-height: 1.9; }
.assistant-messages { display: grid; gap: 23px; }
.assistant-draft .assistant-draft-task { margin: 6px 0 15px; color: #627d91; font-size: 14px; line-height: 1.7; }
.assistant-message { min-width: 0; color: #3c4c56; font-size: 15px; line-height: 1.85; }
.assistant-message > span { display: block; margin-bottom: 9px; color: #67757e; font-size: var(--type-meta); }
.assistant-message > p { white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-answer { display: grid; gap: 14px; }
.assistant-answer p { white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-answer-lead { color: #273d49; font-size: 18px; font-weight: 600; line-height: 1.65; }
.assistant-message.user { margin-left: 28px; padding: 13px 16px; border: 1px solid #e5dcef; border-radius: 15px 15px 5px 15px; background: #f0e9f8; }
.assistant-message.user > span { color: #5e737e; }
.assistant-draft { margin-top: 17px; padding: 19px; border: 1px solid #e2ebf2; border-radius: 16px; background: #fff; box-shadow: 0 4px 16px #334c6106; }
.assistant-draft-label { margin-bottom: 8px; color: #5c6f7e; font-size: 11px; }
.assistant-draft h3 { color: #2a455a; font-size: 20px; font-weight: 650; line-height: 1.5; letter-spacing: -.02em; overflow-wrap: anywhere; }
.assistant-draft dl { display: grid; gap: 8px; margin: 16px 0; font-size: var(--type-body); }
.assistant-draft dl > div { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 12px; }
.assistant-draft dt { color: #66757e; font-size: var(--type-meta); padding-top: 2px; }
.assistant-draft dd { margin: 0; overflow-wrap: anywhere; }
.assistant-draft > p { margin: 9px 0 14px; color: #738088; font-size: 12px; }
.assistant-draft .button { width: 100%; min-height: 44px; justify-content: space-between; border-color: #e1d4f2; color: #7547b2; background: #f3ecfb; font-size: var(--type-body); }
.assistant-draft .button svg { width: 15px; height: 15px; }
.assistant-sources { display: grid; gap: 6px; margin-top: 13px; }
.assistant-sources > small { color: #65757e; font-size: var(--type-meta); }
.assistant-sources button { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 9px 11px; border: 1px solid #e1e7e8; border-radius: 9px; background: #fff; color: #52656e; font-size: 13px; line-height: 1.65; text-align: left; overflow-wrap: anywhere; }
.assistant-sources svg { width: 14px; height: 14px; }
.assistant-more-sources > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 7px 11px; color: #637782; font-size: var(--type-meta); list-style: none; cursor: pointer; }
.assistant-more-sources > summary::-webkit-details-marker { display: none; }
.assistant-more-sources[open] > summary svg { transform: rotate(90deg); }
.assistant-more-sources > div { display: grid; gap: 6px; }
.assistant-compose { flex-shrink: 0; max-height: 55%; overflow-y: auto; padding: 18px 24px 20px; border-top: 1px solid #e8dfef; background: #ffffffc9; backdrop-filter: blur(18px) saturate(120%); -webkit-backdrop-filter: blur(18px) saturate(120%); }
.assistant-compose form { display: block; }
.assistant-compose label { display: block; margin-bottom: 10px; font-size: var(--type-body); font-weight: 600; color: #3b515f; }
.assistant-compose textarea { display: block; width: 100%; min-height: 88px; max-height: 170px; resize: vertical; padding: 12px 13px; border: 1px solid #e3d9ef; border-radius: 12px; background: #faf8fd; color: #4d3c61; font-size: 16px; line-height: 1.75; transition: border-color 140ms ease, background-color 140ms ease; }
.assistant-compose textarea::placeholder { color: #6e7a82; }
.assistant-compose textarea:focus { border-color: #b398da; background: #fff; outline: 3px solid #7046ce24; outline-offset: 1px; }
.assistant-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
.assistant-compose-actions > span { color: #687780; font-size: var(--type-meta); line-height: 1.7; }
.assistant-compose-actions .button { flex-shrink: 0; min-width: 80px; min-height: 44px; padding: 9px 15px; border-radius: 10px; font-size: var(--type-body); }
.assistant-compose-actions .button.primary { color: #fff; border-color: var(--violet); background: var(--violet); box-shadow: 0 3px 9px #7046ce20; }
.assistant-compose-actions .button.primary:disabled { border-color: var(--violet); background: var(--violet); box-shadow: none; }
.assistant-error { margin-bottom: 12px; padding: 10px 12px; border: 1px solid #eadbd3; border-radius: 9px; color: #8b5f4c; background: #fcf5ef; font-size: 12px; line-height: 1.8; }
.assistant-error:empty { display: none; }
.assistant-manual { display: flex; flex-wrap: wrap; align-items: center; column-gap: 13px; margin-top: 12px; padding-top: 9px; border-top: 1px solid #edf0f1; color: #687780; font-size: var(--type-meta); }
.assistant-manual button { min-height: 44px; padding: 5px 0; background: transparent; color: #506877; font-size: 13px; }
@media (max-width: 760px) {
  #assistant-panel { inset: 0; width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .assistant-head { padding: max(17px, env(safe-area-inset-top)) 18px 16px; }
  .assistant-head-actions .icon-button { width: 44px; height: 44px; min-height: 44px; }
  .assistant-scroll { padding: 19px 18px 23px; }
  .assistant-modes { gap: 6px; }
  .assistant-modes button { min-width: 0; min-height: 44px; padding-inline: 7px; font-size: 13px; }
  .assistant-compose { padding: 14px 18px max(14px, env(safe-area-inset-bottom)); }
  .assistant-compose textarea { min-height: 82px; font-size: 16px; }
  .assistant-compose textarea::placeholder { font-size: 15px; }
  .assistant-compose-actions .button, .assistant-draft .button, .assistant-sources button, .assistant-manual button { min-height: 44px; }
  .assistant-manual { gap: 0 13px; margin-top: 9px; padding-top: 4px; }
}

/* One weekly review replaces repeated per-task reporting fields. */
.weekly-check-strip { display: flex; align-items: center; gap: 16px; padding: 23px 25px; margin-bottom: 26px; border: 1px solid #dbe7f5; border-radius: 20px; background: linear-gradient(110deg,#f6faff,#ffffffdf); box-shadow: 0 5px 20px #405b7b05; }
.weekly-check-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; color: #316caa; background: #e8f1fd; border-radius: 13px; }
.weekly-check-icon svg { width: 22px; height: 22px; }
.weekly-check-strip h2 { margin: 0; color: #273d51; font-size: 18px; font-weight: 650; line-height: 1.6; }
.weekly-check-strip h2 small { display: inline-block; margin-left: 12px; color: #667b8b; font-size: 12px; font-weight: 400; }
.weekly-check-strip p { margin: 5px 0 0; color: #64788b; font-size: 13px; line-height: 1.7; }
.weekly-check-strip > .button { flex-shrink: 0; margin-left: auto; min-height: 44px; }
.weekly-check-strip.is-complete { border-color: #dfece7; background: linear-gradient(110deg,#f4faf6,#ffffffdf); }
.weekly-check-strip.is-complete .weekly-check-icon { background: #e7f2eb; color: #367652; }
.team-followups { margin-bottom: 26px; }
.team-followups > .section-head { margin-bottom: 13px; }
.team-followups > .section-head small { color: #64788b; font-size: 12px; }
.followup-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.followup-group { align-self: start; overflow: hidden; border: 1px solid #e1e7ee; border-radius: 16px; background: #ffffffd6; }
.followup-group[open] { grid-column: span 2; }
.followup-group > summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; min-height: 105px; padding: 16px 18px; cursor: pointer; list-style: none; }
.followup-group > summary::-webkit-details-marker { display: none; }
.followup-group > summary strong { font-size: 14px; font-weight: 600; }
.followup-label { display: flex; align-items: center; gap: 7px; grid-column: 1 / -1; color: #516b81; }
.followup-count { font-size: 27px; font-weight: 650; line-height: 1; color: #315578; }
.followup-group[data-followup="dates"] { background: #f5fbfbdc; }
.followup-group[data-followup="coordination"] { background: #fffcf6dc; }
.followup-group[data-followup="metadata"] { background: #faf7fedc; }
.followup-group summary svg { width: 16px; height: 16px; color: #7c8c9a; }
.followup-group[open] > summary > svg { transform: rotate(90deg); }
.followup-group ul { margin: 0; padding: 0 18px; list-style: none; border-top: 1px solid #e8edf2; }
.followup-group li { display: flex; align-items: center; gap: 12px; padding: 15px 0; }
.followup-group li+li { border-top: 1px solid #edf0f3; }
.followup-group li > div { display: grid; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.followup-group li strong { color: #2c4359; font-size: 15px; }
.followup-group li span { color: #64788b; font-size: 13px; }
.followup-group li small { color: #7e725c; font-size: 12px; }
.followup-group li .button { flex-shrink: 0; margin-left: auto; }
.followup-empty { margin: 0; padding: 0 18px 18px; color: #70818d; font-size: 13px; }
.task-confirmation { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; color: #716f65; font-size: 12px; }
.task-confirmation svg { width: 13px; height: 13px; }
.task-confirmation.confirmed { color: #42755b; }
.simple-task-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; padding-top: 10px; margin-top: 12px; border-top: 1px solid #edf1f5; }
.simple-task-actions .button { min-height: 40px; padding: 7px 10px; font-size: 12px; }
.simple-task-actions .task-complete { color: #397051; background: #f0f7f2; border-color: #e3eee6; }
.task-optional-fields .coordination-fields { margin: 18px 0; }
.task-optional-fields > .field:last-child { margin-bottom: 0; }
.task-management-fields { border-color: #e7e4ec; }
.task-management-fields .custom-stage { margin-top: 8px; }
.previous-plan, .confirmation-reference { padding: 9px 0 0; color: #71808c; font-size: 12px; }
.previous-plan summary, .confirmation-reference summary { cursor: pointer; min-height: 32px; }
.previous-plan p, .confirmation-reference p { margin: 5px 0 0; padding: 10px 12px; border-radius: 8px; background: #f3f5f7; white-space: pre-wrap; line-height: 1.8; }
.draft-facts { display: grid; gap: 8px; padding: 14px; border: 1px solid #e5e9ee; border-radius: 12px; color: #617588; font-size: 12px; overflow-wrap: anywhere; }
.draft-facts strong { color: #354d62; }
.draft-facts p { margin: 0; color: #70818d; }
#modal[data-kind="weekly-confirmation"] { width: min(720px,calc(100vw - 40px)); }
.confirmation-help { margin: 0 0 19px; color: #617588; font-size: 14px; line-height: 1.8; }
.confirmation-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.confirmation-row { display: flex; align-items: flex-start; gap: 15px; padding: 18px; border: 1px solid #e5ebf0; border-radius: 14px; background: #fff; }
.confirmation-row > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.confirmation-row strong { font-size: 17px; color: #294258; line-height: 1.6; }
.confirmation-row p { margin: 6px 0; color: #435d71; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.confirmation-row span { display: block; margin-top: 5px; color: #70818d; font-size: 12px; line-height: 1.7; }
.confirmation-row > small { flex-shrink: 0; color: #8c7957; font-size: 11px; line-height: 2; }
.confirmation-row > small.complete { color: #347151; }
.confirmation-row.has-change { border-color: #e2cc9e; background: #fffdf7; }
.confirmation-row .confirmation-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid #edf1f3; font-size: 12px; }
.confirmation-result:not(:empty) { margin-top: 18px; padding: 13px 15px; border-radius: 10px; background: #eef6f0; color: #3f7153; font-size: 13px; line-height: 1.8; }
@media (max-width: 760px) {
  .weekly-check-strip { flex-wrap: wrap; gap: 12px; padding: 19px; border-radius: 16px; }
  .weekly-check-strip > div { flex: 1; }
  .weekly-check-strip h2 small { display: block; margin-left: 0; font-size: 11px; }
  .weekly-check-strip > .button { width: 100%; margin: 3px 0 0; justify-content: center; }
  .followup-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .followup-group > summary { min-height: 88px; padding: 13px; gap: 8px; }
  .followup-group > summary strong { font-size: 12px; }
  .followup-count { font-size: 24px; }
  .weekly-check-strip.is-complete { flex-wrap: nowrap; gap: 9px; padding: 12px; margin-bottom: 18px; }
  .weekly-check-strip.is-complete .weekly-check-icon { width: 28px; height: 28px; border-radius: 9px; }
  .weekly-check-strip.is-complete .weekly-check-icon svg { width: 16px; height: 16px; }
  .weekly-check-strip.is-complete h2 { font-size: 14px; }
  .weekly-check-strip.is-complete p { display: none; }
  .weekly-check-strip.is-complete > .button { width: auto; min-width: 75px; margin: 0; padding: 8px; font-size: 12px; }
  .simple-task-actions .button { min-height: 44px; }
  .confirmation-row { flex-direction: column; gap: 5px; padding: 16px; }
  #modal[data-kind="weekly-confirmation"] { width: 100%; }
}

/* A separate, read-only project view with the same restrained glass surface. */
.project-readonly { display: inline-flex; align-items: center; gap: 8px; color: #61768a; font-size: 13px; }
.project-readonly svg { width: 16px; height: 16px; }
.project-overview-intro { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: -4px 0 21px; color: #63768a; font-size: 13px; line-height: 1.8; }
.project-overview-intro p { margin: 0; max-width: 780px; }
.project-overview-intro > span { flex-shrink: 0; color: #344e66; font-weight: 600; }
.project-overview-controls { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.project-overview-controls .search-box { flex: 1; max-width: 620px; margin: 0; }
.overview-health-filter { display: flex; align-items: center; gap: 10px; color: #63768a; font-size: 13px; }
.overview-health-filter select { min-height: 44px; border: 1px solid #dbe5ee; border-radius: 12px; background: #ffffffd9; color: #334d64; padding: 0 33px 0 13px; font: inherit; }
.project-overview-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,315px),1fr)); gap: 18px; align-items: stretch; }
.overview-card { display: flex; flex-direction: column; min-width: 0; padding: 23px; border: 1px solid #ffffffd9; border-radius: 23px; background: linear-gradient(150deg,#fffffff5,#ffffffc9); box-shadow: 0 8px 28px #3d597407,0 1px 3px #4c657405; }
.overview-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-coverage { color: #718293; font-size: 11px; letter-spacing: .03em; }
.project-health { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; border-radius: 8px; padding: 5px 8px; color: #44725a; background: #edf6ef; font-size: 12px; font-weight: 600; line-height: 1.5; }
.project-health svg { width: 13px; height: 13px; flex-shrink: 0; }
.project-health.attention { color: #a16138; background: #fff0e4; }
.project-health.pending { color: #82704b; background: #f6f2e7; }
.overview-card h2 { margin: 20px 0 13px; font-size: 23px; line-height: 1.45; letter-spacing: -.04em; }
.overview-card h2 button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; color: #294258; font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.overview-card h2 svg { width: 19px; height: 19px; color: #8ea2b3; flex-shrink: 0; }
.project-stage-list { display: flex; flex-wrap: wrap; gap: 6px; }
.project-stage-list > span { padding: 5px 9px; border-radius: 7px; background: #edf3fa; color: #5d7897; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.project-stage-list > .unset { background: #f3f3f0; color: #7b807b; }
.project-next-node { display: grid; gap: 7px; min-height: 96px; margin: 22px 0 18px; padding: 15px 17px; border-left: 3px solid #b6cce3; border-radius: 0 13px 13px 0; background: #f3f7fc; }
.project-next-node small { color: #6c8297; font-size: 11px; }
.project-next-node strong { color: #34526e; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.project-next-node > span { color: #708297; font-size: 12px; }
.project-card-facts { display: flex; flex-wrap: wrap; gap: 9px 16px; color: #6b7f91; font-size: 12px; }
.project-card-facts strong { margin-right: 2px; color: #3e5b73; font-size: 17px; font-weight: 600; }
.project-card-facts .attention,.project-card-facts .attention strong { color: #a7653d; }
.project-card-confirmation { margin: 11px 0 20px; color: #738496; font-size: 12px; }
.overview-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 16px; border-top: 1px solid #e9eef3; }
.overview-card footer > span { color: #7b8b9a; font-size: 11px; }
.overview-card footer .button { min-height: 40px; }
.project-stale { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 18px; }
#modal[data-kind="project-detail"],#modal[data-kind="project-editor"],#modal[data-kind="project-access"],#modal[data-kind="project-scope"] { width: min(790px,calc(100vw - 40px)); }
.project-detail-summary { padding: 21px; border-radius: 17px; background: #f4f7fa; }
.project-detail-summary > .project-stage-list { margin-top: 13px; }
.project-detail-summary dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 23px; margin: 20px 0 0; }
.project-detail-summary dl > div { min-width: 0; }
.project-detail-summary dt { margin-bottom: 4px; color: #718294; font-size: 11px; }
.project-detail-summary dd { margin: 0; color: #36516a; font-size: 14px; overflow-wrap: anywhere; }
.project-reasons { margin: 18px 0 0; padding: 12px 12px 12px 28px; border-radius: 10px; background: #fff5e9; color: #97633b; font-size: 13px; line-height: 1.8; }
.project-free-text { white-space: pre-wrap; overflow-wrap: anywhere; color: #5b7184; font-size: 13px; line-height: 1.8; }
.project-detail-tabs { display: flex; gap: 5px; margin: 23px 0 18px; padding: 5px; border-radius: 14px; background: #edf2f6; }
.project-detail-tabs button { display: flex; justify-content: center; align-items: center; gap: 8px; flex: 1; min-height: 43px; padding: 8px; border: 1px solid transparent; border-radius: 10px; color: #6b8093; font: inherit; font-size: 13px; cursor: pointer; background: transparent; }
.project-detail-tabs button.active { color: #355d82; background: #fff; border-color: #e2eaf2; box-shadow: 0 2px 6px #324a6410; }
.project-detail-tabs small { font-size: 11px; color: #8092a2; }
.project-readout-list { display: grid; gap: 11px; list-style: none; margin: 0; padding: 0; }
.project-readout-list > li { padding: 19px; border: 1px solid #e3eaf0; border-radius: 14px; background: #fff; }
.project-readout-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.project-readout-heading strong { color: #304b63; font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.project-readout-heading > span { color: #698294; font-size: 12px; flex-shrink: 0; }
.project-readout-list p { margin: 8px 0; color: #687d8f; font-size: 13px; }
.project-readout-meta { display: flex; flex-wrap: wrap; gap: 7px 22px; margin-top: 11px; color: #647d92; font-size: 12px; line-height: 1.7; }
.project-readout-list small { display: block; color: #8594a1; font-size: 11px; line-height: 1.7; margin-top: 9px; }
.project-coordination-note { display: flex; gap: 7px; margin-top: 13px; padding: 11px 13px; border-radius: 9px; background: #fff5e9; color: #9a663e; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.project-coordination-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; }
.project-detail-empty { margin: 0; padding: 25px 10px; color: #738595; font-size: 13px; line-height: 1.8; }
.project-timeline { list-style: none; padding: 0 0 0 13px; margin: 0; }
.project-timeline > li { position: relative; display: grid; gap: 7px; border-left: 1px solid #dce6ef; padding: 0 0 25px 23px; }
.project-timeline > li::before { position: absolute; content: ''; top: 3px; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: #8eabc7; box-shadow: 0 0 0 4px #f1f5f9; }
.project-timeline time,.project-timeline > li > span { color: #7e8f9f; font-size: 11px; }
.project-timeline strong { color: #3e5870; font-size: 14px; font-weight: 500; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.milestone-edit-section { margin-top: 24px; }
.milestone-edit-section .section-head h3,.project-token-list h3 { color: #36516a; font-size: 16px; margin: 0; }
.milestone-editor { margin: 20px 0 0; padding: 17px; min-width: 0; border: 1px solid #dfe8f0; border-radius: 14px; background: #f9fbfd; }
.milestone-editor legend { padding: 0 7px; font-size: 12px; color: #6c8296; }
.milestone-editor .field { margin-bottom: 12px; }
.milestone-editor > .button { margin-top: 6px; color: #856955; }
.project-access-intro { display: flex; align-items: center; gap: 20px; padding: 17px; margin-bottom: 22px; border-radius: 14px; background: #eff5fb; }
.project-access-intro p { flex: 1; margin: 0; color: #607c94; font-size: 13px; line-height: 1.8; }
.project-access-intro > .button { flex-shrink: 0; }
.project-viewer-list { display: grid; gap: 12px; }
.project-viewer-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 18px; border: 1px solid #e1e8f0; border-radius: 14px; }
.project-viewer-row > div { min-width: 0; }
.project-viewer-row h3 { margin: 0; font-size: 17px; color: #38536c; }
.project-viewer-row p,.project-token-row p { margin: 7px 0; color: #728599; font-size: 12px; line-height: 1.7; }
.project-viewer-row small { color: #6c8093; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.project-access-actions { display: grid; flex-shrink: 0; gap: 8px; }
.project-token-list { margin-top: 28px; padding-top: 21px; border-top: 1px solid #e3ebf2; }
.project-token-row { display: flex; align-items: center; justify-content: space-between; gap: 17px; padding: 15px 0; }
.project-token-row + .project-token-row { border-top: 1px solid #edf1f5; }
.project-token-row strong { color: #405c74; font-size: 14px; overflow-wrap: anywhere; }
.project-scope-options { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.project-scope-options legend { color: #39576f; font-size: 16px; font-weight: 600; }
.project-scope-options label { display: flex; align-items: center; gap: 13px; padding: 14px; margin-top: 9px; border: 1px solid #e0e8f0; border-radius: 12px; cursor: pointer; }
.project-scope-options input { width: 19px; height: 19px; flex-shrink: 0; accent-color: #507ca8; }
.project-scope-options strong { color: #36516a; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.project-scope-options small { display: block; margin-top: 4px; color: #8293a2; font-size: 11px; }
.project-secret { display: block; word-break: break-all; user-select: all; }
@media (max-width: 760px) {
  .project-workspace .page-heading { gap: 17px; }
  .project-workspace .heading-actions { flex-wrap: wrap; }
  .project-overview-intro { flex-direction: column; gap: 4px; margin-bottom: 18px; font-size: 12px; }
  .project-overview-controls { flex-wrap: wrap; gap: 10px; }
  .project-overview-controls .search-box { flex-basis: 100%; max-width: none; }
  .overview-health-filter { width: 100%; justify-content: space-between; }
  .overview-health-filter select { flex: 1; }
  .project-overview-grid { grid-template-columns: 1fr; gap: 14px; }
  .overview-card { padding: 20px; border-radius: 20px; }
  .overview-card h2 { font-size: 23px; margin-top: 17px; }
  .overview-card footer .button { min-height: 44px; }
  .project-detail-summary { padding: 16px; }
  .project-detail-summary dl { gap: 16px 12px; }
  .project-detail-tabs { gap: 1px; }
  .project-detail-tabs button { min-height: 44px; gap: 5px; font-size: 12px; }
  .project-readout-list > li { padding: 15px; }
  .project-readout-heading { align-items: flex-start; }
  .project-readout-heading strong { font-size: 16px; }
  .project-readout-meta { flex-direction: column; gap: 3px; }
  .project-viewer-row,.project-access-intro { flex-direction: column; gap: 15px; }
  .project-access-actions { display: flex; width: 100%; flex-wrap: wrap; }
  .project-access-actions .button { flex: 1; min-height: 44px; }
  .project-access-intro > .button { width: 100%; }
  .milestone-editor { padding: 12px; }
  .project-stale { flex-direction: column; align-items: flex-start; }
  #modal[data-kind="project-detail"],#modal[data-kind="project-editor"],#modal[data-kind="project-access"],#modal[data-kind="project-scope"] { width: 100%; }
}

/* Accessibility preferences are independent. */
@media (prefers-reduced-transparency: reduce) {
  .auth-card { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sidebar, .topbar { background: #fafbfc; border-color: #e1e6ec; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .modal-head, .modal-actions { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  #modal::backdrop { background: #26374566; backdrop-filter: none; -webkit-backdrop-filter: none; }
  #assistant-panel::backdrop { background: #26374544; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .assistant-head, .assistant-compose { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .assistant-head { background: #f2ecfa; }
  .project-group .project-add { background: #fff; }
  .summary-strip, .member-card, .project-group, .my-schedule, .empty-state { background: #fff; }
}
@media (prefers-contrast: more) {
  body, .auth-page { background: #eff3f8; }
  .auth-card { background: #fff; border-color: #8c979f; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .auth-form .field input { border-color: #85949f; background: #fff; }
  .auth-form .button.primary { background: #1756a1; border-color: #1756a1; }
  :root { --ink: #263743; --muted: #546779; --line: #b4c1cd; }
  .sidebar, .topbar { background: #fafcfe; border-color: #b0c0d1; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav button, .sidebar-tools button, .sidebar-tools a, .user-pill small, .page-heading p, .quick-action span, .summary-note, .summary-label, .member-title small, .member-load span, .member-next, .member-footer, .member-empty-tasks, .member-task, .task-list-intro, .task-project, .task-panel-footer, .activity-text, .activity-text span, .activity-time, .field small, .field-help, .modal-head p, .modal-actions .left, .auth-footnote, .auth-form > p, .section-hint, .page-footer, .workspace-note { color: #596f83; }
  .button, .field input, .field select, .field textarea, .status-option, .date-chip, .search-box input, .filter-fields select { border-color: #9aafc2; }
  .member-card, .project-group, .summary-strip, .my-schedule, .filter-fields { border-color: #acbfd1; background: #fff; }
  .summary-item { border: 1px solid #b4c1cd; }
  .project-group-head p, .project-expand, .project-task-item .owner-inline, .summary-note, .task-panel-footer, .task-context-meta, .page-footer { color: #4f6474; }
  .project-group-head, .project-task-item + .project-task-item, .project-card-footer { border-color: #b4c1cd; }
  .project-group-head { background: var(--project-soft); }
  .nav button.active { border-color: #6f98ca; background: #e7f0fc; color: #235b9f; }
  .nav .assistant-entry { border-color: #aa90c6; background: #f0eafa; color: #58369e; }
  .button.primary { color: #fff; background: #1756a1; border-color: #1756a1; }
  .modal-head, .modal-actions { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  #assistant-panel { border: 1px solid #7b8e98; background: #fff; }
  .assistant-status, .assistant-head p, .assistant-compose-actions > span, .assistant-draft dt, .assistant-message > span { color: #52636f; }
  .assistant-compose textarea, .assistant-modes button, .assistant-draft, .assistant-sources button { border-color: #8ea1ad; }
  .assistant-modes button.selected { border-color: #9774c1; color: #58369e; }
  .assistant-head, .assistant-compose { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .assistant-compose-actions .button.primary { color: #fff; border-color: #58369e; background: #58369e; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell *, .app-shell *::before, .app-shell *::after, .auth-page *, #modal, #modal *, #assistant-panel, #assistant-panel *, #assistant-panel *::before, #assistant-panel *::after, .toast { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  button:active:not(:disabled), .button:active, .quick-action:active, .date-chip:active { transform: none; }
  .auth-form .button.primary:active:not(:disabled) { transform: none; }
  .toast, .toast.visible { transform: translateX(-50%); }
}

/* Impeccable / Operate: refine the established layout through hierarchy and rhythm. */
:root { --radius-card: 16px; --radius-control: 10px; }
.page-heading h1 { font-weight: 650; letter-spacing: -.025em; }
.section-head h2, .project-name, .overview-card h2 { letter-spacing: -.015em; }
.section-head h2 .count { background: var(--neutral-soft); font-size: 12px; }
.team-followups { margin-bottom: 16px; }
.team-followups > .section-head h2 { font-size: 18px; }
.followup-group { border-radius: 12px; }
.followup-group > summary { min-height: 88px; gap: 8px; padding: 14px 16px; }
.followup-group > summary strong { font-size: 13px; }
.followup-count { font-size: 24px; font-variant-numeric: tabular-nums; }
.members-section { margin-bottom: 8px; }
.members-section > summary { padding-inline: 0; font-size: 14px; }
.members-section > summary small { font-size: 12px; }
.project-group, .overview-card { border-color: #dfe4e8; border-radius: var(--radius-card); box-shadow: none; }
.project-group-head { padding: 20px; border-radius: 15px 15px 0 0; background: #fafbfc; }
.project-identity { gap: 10px; }
.project-symbol { flex-basis: 28px; width: 28px; height: 30px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.project-symbol svg { width: 19px; height: 19px; }
.project-task-list { padding-inline: 20px; }
.project-task-item { padding: 12px 0 16px; }
.project-task-main .badge { margin-top: 8px; }
.badge { font-size: 12px; }
.project-card-footer { margin-inline: 20px; }
.project-expand { font-size: 13px; }
.project-expand svg, .members-toggle-label svg, .followup-group > summary > svg { transition: transform 180ms var(--ease-out); }
.simple-task-actions { gap: 8px; }
.button { border-radius: var(--radius-control); }
.field input, .field select, .field textarea { border-radius: var(--radius-control); caret-color: var(--ink); }
.auth-card { box-shadow: 0 20px 60px #26323e12; }
.auth-form .field input { background: #f8fafb; }
.project-next-node { border-left-width: 1px; }
.assistant-compose textarea:focus { outline-color: var(--focus-ring); }
@media (hover: hover) and (pointer: fine) {
  .task-title:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
}
@media (max-width: 760px) {
  .team-followups { margin-bottom: 16px; }
  .team-followups > .section-head h2 { font-size: 17px; }
  .followup-group > summary { min-height: 76px; padding: 12px; }
  .followup-group > summary strong { font-size: 12px; }
  .project-group-head { padding: 16px; }
  .project-task-list { padding-inline: 16px; }
  .project-card-footer { margin-inline: 16px; }
  .project-group .project-add { width: 44px; height: 44px; padding: 0; }
  .project-add svg { width: 18px; height: 18px; }
  .project-add-label { display: none; }
}

/* Color expresses a work state. Layout and glass surfaces stay on the public baseline. */
:root {
  --paper: #f3f4f5;
  --action: #363c43;
  --action-hover: #23282e;
  --focus-ring: #53616e;
  --neutral: #626a73;
  --neutral-soft: #f0f2f4;
  --neutral-line: #dce0e4;
  --state-active: #2866b3;
  --state-active-soft: #edf4fd;
  --state-success: #27704d;
  --state-success-soft: #edf6f0;
  --state-attention: #946018;
  --state-attention-soft: #fff5e5;
  --state-danger: #b13c37;
  --state-danger-soft: #fff0ef;
  /* Legacy control tokens remain neutral; semantic states use dedicated tokens. */
  --blue: var(--action);
  --blue-hover: var(--action-hover);
  --blue-soft: var(--neutral-soft);
  --violet: var(--action);
  --violet-hover: var(--action-hover);
  --violet-soft: var(--neutral-soft);
  --green: var(--state-success);
  --green-soft: var(--state-success-soft);
  --amber: var(--state-attention);
  --amber-soft: var(--state-attention-soft);
  --red: var(--state-danger);
}

/* Surfaces and controls do not imply progress or urgency. */
body, .auth-page { background: radial-gradient(ellipse at 15% 0%, #fff9, #fff0 65%), var(--paper); }
.auth-emblem { background: linear-gradient(145deg, #fff, #eef0f2); }
.nav button.active { color: #303740; background: #e9edf0; border-color: #d8dde2; }
.nav .nav-count { color: var(--state-attention); }
.nav .assistant-entry { color: var(--action); background: #f4f5f6; border-color: var(--neutral-line); }
.nav .assistant-entry svg { color: inherit; }
.button.primary, .auth-form .button.primary, .assistant-compose-actions .button.primary {
  background: var(--action); border-color: var(--action); color: #fff; box-shadow: 0 3px 9px #242a3018;
}
.project-group { --project-accent: #67717b; --project-soft: #f7f8f9; --project-icon: #edf0f3; --project-line: #e4e7eb; }
.project-group .project-add, .project-task-item .task-row-actions .button { color: #53616e; border-color: var(--neutral-line); background: #fff; }
.project-task-item .task-row-actions [data-action="progress"] { color: #39444f; border-color: var(--neutral-line); background: var(--neutral-soft); }
.task-scope { background: #e9edf0; }
.task-scope button.active, .task-scope button[aria-pressed=true] { color: #303740; }
.active-filters > span, .date-chip.is-selected, .date-chip.active, .date-chip[aria-pressed=true] { color: #434d57; background: var(--neutral-soft); border-color: #b4bcc4; }
.summary-item, .summary-item[data-tone] { --summary-accent: #434d57; --summary-soft: #f7f8f9; --summary-icon: #edf0f2; }
.followup-group[data-followup] { background: #ffffffd6; }
.followup-count { color: #46515c; }
.followup-group.has-items .followup-count { color: var(--state-attention); }
.project-stage-list > span, .project-stage-list > .unset { color: var(--neutral); background: var(--neutral-soft); }
.project-next-node { background: #f7f8f9; border-left-color: #c7cdd3; }
.project-detail-tabs { background: var(--neutral-soft); }
.project-detail-tabs button.active { color: #39444f; border-color: var(--neutral-line); }
.project-timeline > li::before { background: #a7b0b9; box-shadow: 0 0 0 4px #f1f3f5; }
.report-notice { color: #53616e; border-color: var(--neutral-line); background: #f7f8f9; }

/* Use the same mapping on cards, member schedules and the status picker. */
.badge.proposed, .badge.confirmed, .badge.cancelled { color: var(--neutral); background: var(--neutral-soft); }
.badge.in_progress { color: var(--state-active); background: var(--state-active-soft); }
.badge.waiting { color: var(--state-attention); background: var(--state-attention-soft); }
.badge.done { color: var(--state-success); background: var(--state-success-soft); }
.member-task-dot.proposed, .member-task-dot.confirmed, .member-task-dot.cancelled { background: #929ba4; }
.member-task-dot.in_progress { background: var(--state-active); }
.member-task-dot.waiting { background: var(--state-attention); }
.member-task-dot.done { background: var(--state-success); }
.member-status { color: var(--neutral); }
.member-status.confirmed, .task-confirmation.confirmed, .confirmation-row > small.complete { color: var(--state-success); }
.task-confirmation:not(.confirmed), .confirmation-row > small { color: var(--neutral); }
.status-options input:checked + .status-option { color: var(--neutral); background: var(--neutral-soft); border-color: #8d969f; }
.status-options input[value="in_progress"]:checked + .status-option { color: var(--state-active); background: var(--state-active-soft); border-color: var(--state-active); }
.status-options input[value="waiting"]:checked + .status-option { color: var(--state-attention); background: var(--state-attention-soft); border-color: var(--state-attention); }
.status-options input[value="done"]:checked + .status-option { color: var(--state-success); background: var(--state-success-soft); border-color: var(--state-success); }
.due-date.soon, .due-note, .coord-tag, .project-task-item .task-blocker { color: var(--state-attention); }
.due-date.overdue, .due-note.overdue { color: var(--state-danger); }
.project-health, .project-health.normal, .project-health.pending { color: var(--neutral); background: var(--neutral-soft); }
.project-health.attention, .project-coordination-note, .project-reasons { color: var(--state-attention); background: var(--state-attention-soft); }
.project-card-facts .attention, .project-card-facts .attention strong { color: var(--state-attention); }
.weekly-check-strip { background: #ffffffdf; border-color: var(--neutral-line); }
.weekly-check-icon { color: var(--neutral); background: var(--neutral-soft); }
.weekly-check-strip.is-complete { background: #ffffffdf; border-color: #d6e6dc; }
.weekly-check-strip.is-complete .weekly-check-icon { color: var(--state-success); background: var(--state-success-soft); }
.confirmation-result:not(:empty) { color: var(--state-success); background: var(--state-success-soft); }
.sync-dot, .assistant-status-dot.ready { background: var(--state-success); }
.offline .sync-dot { background: var(--state-attention); }
.form-error, .assistant-error { color: var(--state-danger); border-color: #edcfcc; background: var(--state-danger-soft); }

/* The assistant is an ordinary tool, not a separate purple category. */
#assistant-panel { color: #3d4650; background: #f8f9fa; box-shadow: 0 24px 80px #242a3026, 0 0 0 1px #d9dde162; }
.assistant-head { border-color: var(--neutral-line); background: linear-gradient(115deg, #f0f2f4e0, #ffffffe0); }
.assistant-head h2, .assistant-welcome h3 { color: #343e48; }
.assistant-modes { border-color: var(--neutral-line); background: var(--neutral-soft); }
.assistant-modes button { color: var(--neutral); }
.assistant-modes button.selected { color: var(--action); box-shadow: 0 2px 5px #30363c0b; }
.assistant-welcome-icon { border-color: var(--neutral-line); color: #56636e; background: #edf0f3; }
.assistant-message.user { border-color: var(--neutral-line); background: #eef1f4; }
.assistant-draft .button { color: #434d57; border-color: var(--neutral-line); background: var(--neutral-soft); }
.assistant-compose { border-color: var(--neutral-line); }
.assistant-compose textarea { color: #39434d; border-color: var(--neutral-line); background: #fafbfc; }
.assistant-compose textarea:focus { border-color: #87929d; outline-color: var(--focus-ring); }
.assistant-status.unavailable { color: var(--neutral); background: var(--neutral-soft); }
.assistant-status strong, .assistant-status button { color: #434d57; }

button:focus-visible, a:focus-visible, summary:focus-visible { outline-color: var(--focus-ring); }
input:focus, select:focus, textarea:focus, .status-options input:focus-visible + .status-option { outline-color: var(--focus-ring); }
.field input:focus, .field select:focus, .field textarea:focus, .auth-form .field input:focus { border-color: #87929d; outline-color: var(--focus-ring); }
::selection { color: #26323e; background: #dce2e8; }
@media (hover: hover) and (pointer: fine) {
  .nav button:hover:not(.active), .sidebar-tools button:hover, .sidebar-tools a:hover, .nav .assistant-entry:hover:not(.active) { color: #343e48; border-color: var(--neutral-line); background: #e9edf0; }
  .button.primary:hover:not(:disabled), .auth-form .button.primary:hover:not(:disabled), .assistant-compose-actions .button.primary:hover:not(:disabled) { color: #fff; border-color: var(--action-hover); background: var(--action-hover); }
  .project-group .project-add:hover:not(:disabled), .project-task-item .task-row-actions .button:hover:not(:disabled), .assistant-draft .button:hover:not(:disabled) { color: #303b46; border-color: #bcc5ce; background: #edf0f3; }
  .assistant-modes button:hover:not(.selected), .task-title:hover, .project-expand:hover, .member-task:hover, .member-name:hover, .member-more-tasks:hover, .member-footer button:hover, .members-section > summary:hover { color: #303b46; }
  .assistant-sources button:hover { border-color: #bcc5ce; background: #fafbfc; }
}
@media (prefers-reduced-transparency: reduce) {
  body, .auth-page { background: var(--paper); }
  .followup-group[data-followup], .weekly-check-strip, .weekly-check-strip.is-complete, .assistant-head { background: #fff; }
}
@media (prefers-contrast: more) {
  :root { --neutral: #414a54; --state-active: #174f95; --state-success: #185c3c; --state-attention: #774900; --state-danger: #992823; }
  body, .auth-page { background: #f3f4f5; }
  .nav button.active, .nav .assistant-entry, .project-group .project-add, .project-task-item .task-row-actions .button { border-color: #8d969f; }
  .followup-group[data-followup], .weekly-check-strip, .weekly-check-strip.is-complete, .assistant-head { background: #fff; }
  .assistant-modes button.selected { border-color: #8d969f; }
  .assistant-compose textarea, .assistant-draft .button { border-color: #8d969f; }
  .project-group, .overview-card { border-color: #8d969f; }
}

/* Hallmark · shape: app screen · genre: modern-minimal · theme: Coral (deal 1/3)
 * redesign: restyle · nav: kept · signature: project cards with visible tasks
 * source: Nutlope/hallmark, coral.md 5332c4d49f1bfac7e62025bab8bbafd11078ce4f
 * adaptations: system CJK sans; existing semantic states; no marketing texture or scene
 * verification: local browser and existing UI regression tests, recorded in DESIGN.md */
/* Hallmark · pre-emit critique: keep project/task hierarchy, replace cold glass with warm paper. */
:root {
  /* Coral's original material tokens, generated from the official app scaffold. */
  --color-paper: oklch(97% 0.006 55);
  --color-paper-2: oklch(94.5% 0.007 55);
  --color-paper-3: oklch(91.5% 0.009 55);
  --color-ink: oklch(21% 0.012 38);
  --color-ink-2: oklch(29% 0.013 40);
  --color-muted: oklch(47% 0.013 45);
  --color-rule: oklch(87% 0.009 55);
  --color-rule-2: oklch(81% 0.011 55);
  --color-cotton: oklch(98.8% 0.0045 80);
  --color-desk: oklch(94.3% 0.008 64);
  --color-print: oklch(23% 0.012 38);
  --color-board: oklch(22% 0.011 40);
  --color-board-type: oklch(96.5% 0.006 70);
  --color-accent: oklch(74% 0.125 30);
  --color-accent-ink: var(--color-ink);
  --color-accent-2: oklch(54% 0.165 29);
  --color-focus: var(--color-ink-2);
  --color-scrim: oklch(21% 0.012 38 / .22);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: var(--font-body);
  --radius-card: 8px;
  --radius-control: 8px;
  --radius-input: 6px;
  --shadow-card: 0 1px 2px oklch(20% 0.01 35 / .05);
  --edge-stock: inset 0 1px 0 oklch(100% 0.005 80 / .9), inset 0 -1px 0 oklch(32% 0.03 50 / .07);
  --cast-stock: 3px 3px 8px -5px oklch(32% 0.03 50 / .3);
  --cast-stock-lift: 4px 5px 10px -6px oklch(32% 0.03 50 / .3);
  --shadow-dialog: 0 24px 80px oklch(21% 0.012 38 / .15);
  --ink: var(--color-ink);
  --muted: var(--color-muted);
  --paper: var(--color-paper);
  --white: var(--color-cotton);
  --line: var(--color-rule);
  --navy: var(--color-ink-2);
  --action: var(--color-board);
  --action-hover: var(--color-ink-2);
  --neutral: var(--color-muted);
  --neutral-soft: var(--color-paper-2);
  --neutral-line: var(--color-rule);
  --focus-ring: var(--color-focus);
  --shadow: var(--shadow-card);
  --glass-shadow: var(--shadow-card);
  font-family: var(--font-body);
}
html, body { overflow-x: clip; scrollbar-color: var(--color-rule-2) var(--color-paper); }
body, .auth-page { color: var(--ink); background: var(--color-paper); }
body:has(dialog[open]) { overflow-x: clip; overflow-y: hidden; }
h1, h2, h3 { font-family: var(--font-display); min-width: 0; overflow-wrap: break-word; }
h1, h2, h3, .page-heading h1, .section-head h2, .project-name,
.auth-name, .auth-form h2, .modal-head h2, .assistant-head h2, .assistant-welcome h3,
.assistant-draft h3, .overview-card h2 button { color: var(--ink); }
.page-heading h1 { font-weight: 650; letter-spacing: -.025em; }
.section-head h2, .project-name { font-weight: 600; }
.project-meta, .project-group-head p, .page-heading p, .page-description, .section-hint, .text-muted,
.section-head h2 .count, .project-symbol, .breadcrumb, .breadcrumb span, .today,
.nav-label, .sidebar-note, .user-pill small, .member-title small, .member-next,
.member-load span, .member-task, .members-section > summary, .members-section > summary small,
.task-stage, .task-owner, .project-task-item .owner-inline, .followup-label, .project-card-footer, .project-expand, .activity-list, .footer-note,
.field small, .field-help, .field label .optional, .modal-head p, .modal-actions .left,
.auth-form > p, .auth-footnote, .assistant-head p, .assistant-welcome p,
.assistant-message > span, .assistant-draft dt, .assistant-draft > p, .assistant-sources > small,
.assistant-compose-actions > span, .project-detail-summary dt, .project-detail-tabs small,
.project-next-node small, .project-next-node > span, .overview-card footer > span,
.project-detail-empty { color: var(--muted); }
.task-title, .project-task-main .task-title, .member-name, .member-title h3, .member-load strong, .my-schedule h2,
.user-pill strong, .brand, .field label, .field-label, .assistant-message,
.assistant-answer-lead, .assistant-compose label, .project-next-node strong,
.project-detail-summary dd { color: var(--color-ink-2); }

/* The existing shell stays in place; Coral supplies its surfaces and controls. */
.sidebar {
  border-color: var(--color-rule); border-radius: var(--radius-card);
  background: var(--color-paper-2); box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.topbar {
  color: var(--muted); border-color: var(--color-rule); border-radius: var(--radius-card);
  background: var(--color-cotton); box-shadow: var(--shadow-card);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.nav button, .sidebar-tools button, .sidebar-tools a, .nav .assistant-entry {
  color: var(--muted); border-radius: var(--radius-control); box-shadow: none;
}
.nav button.active {
  color: var(--ink); border-color: var(--color-rule);
  background: var(--color-cotton); box-shadow: var(--edge-stock), var(--cast-stock);
}
.nav .assistant-entry { color: var(--color-ink-2); border-color: var(--color-rule); background: transparent; }
.nav .assistant-entry svg, .assistant-heading > svg { color: currentColor; }
.nav .nav-count { background: var(--color-cotton); }
.user-pill, .member-footer { border-color: var(--color-rule); }
.section-head h2 .count, .self-label { color: var(--muted); background: var(--color-paper-2); }
.followup-group[data-followup] {
  border-color: var(--color-rule); border-radius: var(--radius-card);
  background: var(--color-cotton); box-shadow: var(--shadow-card);
}
.followup-group > summary, .followup-group > summary svg { color: var(--muted); }
.followup-items { border-color: var(--color-rule); }
.project-group, .overview-card, .member-card, .my-schedule,
.confirmation-row, .account-row, .project-viewer-row {
  border-color: var(--color-rule); border-radius: var(--radius-card);
  background: var(--color-cotton); box-shadow: var(--shadow-card);
}
.project-group { --project-line: var(--color-rule); }
.project-group-head {
  background: var(--color-cotton); border-color: var(--color-rule);
  border-radius: calc(var(--radius-card) - 1px) calc(var(--radius-card) - 1px) 0 0;
}
.project-symbol { background: transparent; }
.project-task-item, .project-task-item .task-row-actions, .project-card-footer,
.overview-card footer { border-color: var(--color-rule); }
.member-card.away, .project-detail-summary, .project-next-node, .draft-facts,
.project-access-intro, .project-scope-options, .owner-note, .report-empty {
  background: var(--color-paper-2); border-color: var(--color-rule); border-radius: var(--radius-card);
}
.project-next-node { border-left-color: var(--color-rule-2); }
.project-detail-tabs, .task-scope, .assistant-modes {
  background: var(--color-paper-2); border-color: var(--color-rule);
  border-radius: var(--radius-card); box-shadow: var(--edge-stock);
}
.project-detail-tabs button, .task-scope button, .assistant-modes button {
  color: var(--muted); border-radius: var(--radius-input);
}
.project-detail-tabs button.active, .task-scope button.active, .task-scope button[aria-pressed=true], .assistant-modes button.selected {
  color: var(--ink); border-color: var(--color-rule); background: var(--color-cotton);
  box-shadow: var(--edge-stock), var(--cast-stock);
}

/* Paper controls: ink primary, quiet secondary, immediate focus and press feedback. */
.button, .button.small, .auth-form .button, .project-group .project-add,
.project-task-item .task-row-actions .button, .assistant-draft .button,
.assistant-compose-actions .button, .date-chip {
  color: var(--color-ink-2); border-color: var(--color-rule);
  border-radius: var(--radius-control); background: var(--color-cotton);
  box-shadow: var(--edge-stock), var(--cast-stock);
}
.button.primary, .auth-form .button.primary, .auth-form .button.primary:disabled,
.assistant-compose-actions .button.primary, .assistant-compose-actions .button.primary:disabled {
  color: var(--color-board-type); border-color: var(--color-board);
  background: var(--color-board); box-shadow: var(--cast-stock);
}
.button.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.button.danger { color: var(--state-danger); border-color: var(--state-danger); background: var(--color-cotton); }
.icon-button { color: var(--muted); border-radius: var(--radius-control); }
.field input, .field select, .field textarea, .auth-form .field input, .task-basics > .field input,
.assistant-compose textarea, .weekly-report-table input, .weekly-report-table textarea,
.overview-health-filter select, .search-box input, .filter-fields select {
  color: var(--color-ink-2); background: var(--color-cotton);
  border-color: var(--color-rule-2); border-radius: var(--radius-input); box-shadow: none;
  caret-color: var(--ink);
}
.field input::placeholder, .field textarea::placeholder, .auth-form .field input::placeholder,
.assistant-compose textarea::placeholder, .search-box input::placeholder { color: var(--muted); }
.field input:disabled, .field select:disabled, .field textarea:disabled {
  color: var(--muted); background: var(--color-paper-2);
}
.field input:focus, .field select:focus, .field textarea:focus, .auth-form .field input:focus, .task-basics > .field input:focus,
.assistant-compose textarea:focus {
  border-color: var(--color-muted); outline-color: var(--focus-ring);
  background: var(--color-cotton); box-shadow: none;
}
button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus-ring); outline-offset: 3px;
}
.status-options input:focus-visible + .status-option { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.status-option { color: var(--muted); background: var(--color-paper); border-color: var(--color-rule); }
.task-options { background: var(--color-paper); border-color: var(--color-rule); border-radius: var(--radius-card); }
.task-options > summary, .task-options > summary span { color: var(--muted); }
.task-options[open] > summary { background: var(--color-paper-2); border-color: var(--color-rule); }

/* Login, dialogs, reporting and assistant share the same material. */
.auth-card, #modal, #assistant-panel {
  color: var(--ink); border-color: var(--color-rule); border-radius: 12px;
  background: var(--color-cotton); box-shadow: var(--shadow-dialog);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.auth-emblem {
  background: var(--color-paper-2); border-color: var(--color-rule);
  border-radius: var(--radius-card); box-shadow: var(--edge-stock);
}
.auth-form .field label { color: var(--muted); }
.auth-footnote { border-color: var(--color-rule); }
#modal::backdrop, #assistant-panel::backdrop { background: var(--color-scrim); }
.modal-head, .modal-actions, .assistant-head, .assistant-compose {
  color: var(--ink); border-color: var(--color-rule); background: var(--color-cotton);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.modal-head .icon-button, .assistant-welcome-icon {
  color: var(--muted); background: var(--color-paper-2);
  border-color: var(--color-rule); border-radius: var(--radius-card); box-shadow: none;
}
.assistant-message.user {
  color: var(--color-ink-2); background: var(--color-paper-2);
  border-color: var(--color-rule); border-radius: var(--radius-card);
}
.assistant-draft, .assistant-sources button {
  color: var(--color-ink-2); background: var(--color-cotton);
  border-color: var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
}
.assistant-manual, .assistant-manual button, .assistant-draft .assistant-draft-task,
.assistant-message.user > span { color: var(--muted); border-color: var(--color-rule); }
.weekly-report-table th { color: var(--color-ink-2); background: var(--color-paper-2); border-color: var(--color-rule); }
.weekly-report-table td { color: var(--color-ink-2); border-color: var(--color-rule); }
.project-readout-list > li, .project-timeline > li { border-color: var(--color-rule); }
::selection { color: var(--ink); background: var(--color-paper-3); }

@media (hover: hover) and (pointer: fine) {
  .button:hover:not(:disabled), .project-group .project-add:hover:not(:disabled),
  .project-task-item .task-row-actions .button:hover:not(:disabled), .assistant-draft .button:hover:not(:disabled) {
    color: var(--color-ink); border-color: var(--color-rule-2);
    background: var(--color-paper); box-shadow: var(--edge-stock), var(--cast-stock-lift);
    transform: translateY(-1px);
  }
  .button.primary:hover:not(:disabled), .auth-form .button.primary:hover:not(:disabled),
  .assistant-compose-actions .button.primary:hover:not(:disabled) {
    color: var(--color-board-type); border-color: var(--action-hover); background: var(--action-hover);
    box-shadow: var(--cast-stock-lift);
  }
  .button.ghost:hover:not(:disabled) { background: var(--color-paper-2); box-shadow: none; }
  .nav button:hover:not(.active), .sidebar-tools button:hover, .sidebar-tools a:hover,
  .nav .assistant-entry:hover:not(.active), .assistant-sources button:hover {
    color: var(--ink); border-color: var(--color-rule); background: var(--color-paper);
  }
  .task-title:hover, .project-expand:hover, .member-task:hover, .member-name:hover,
  .member-more-tasks:hover, .member-footer button:hover, .members-section > summary:hover { color: var(--ink); }
  .button.danger:hover:not(:disabled) { color: var(--state-danger); background: var(--state-danger-soft); border-color: var(--state-danger); }
}
.button:active:not(:disabled), .auth-form .button.primary:active:not(:disabled),
.project-group .project-add:active:not(:disabled),
.project-task-item .task-row-actions .button:active:not(:disabled), .assistant-draft .button:active:not(:disabled) {
  transform: translateY(1px); box-shadow: var(--edge-stock);
}
.auth-form .button.primary:active:not(:disabled) { color: var(--color-board-type); background: var(--action-hover); }
@media (prefers-contrast: more) {
  :root { --color-muted: var(--color-ink-2); --color-rule: oklch(63% 0.009 55); --color-rule-2: oklch(55% 0.009 55); }
  .project-group, .overview-card, .followup-group[data-followup], .sidebar, .topbar,
  .nav button.active, .nav .assistant-entry, .project-group .project-add, .project-task-item .task-row-actions .button,
  .assistant-modes button.selected, .assistant-compose textarea, .assistant-draft .button { border-color: var(--color-rule); }
}
@media (prefers-reduced-transparency: reduce) {
  body, .auth-page { background: var(--color-paper); }
  .sidebar { background: var(--color-paper-2); }
  .topbar, .followup-group[data-followup], .assistant-head { background: var(--color-cotton); }
}
@media (prefers-reduced-motion: reduce) {
  .button, .button:hover:not(:disabled), .button:active:not(:disabled),
  .auth-form .button.primary:active:not(:disabled) { transition: none; transform: none !important; }
}
.task-filter-toggle > summary, .task-filter-toggle[open] > summary {
  color: var(--color-ink-2); background: var(--color-cotton);
  border-color: var(--color-rule); border-radius: var(--radius-control);
}
.filter-fields {
  color: var(--ink); background: var(--color-cotton); border-color: var(--color-rule);
  border-radius: var(--radius-card); box-shadow: var(--shadow-dialog);
}
.filter-fields label, .filter-fields .history-toggle, .search-box > svg { color: var(--muted); }
.mobile-menu-button {
  color: var(--color-ink-2); background: var(--color-cotton);
  border-radius: var(--radius-control); box-shadow: var(--shadow-card);
}
.mobile-menu-button span { color: var(--muted); }
.weekly-check-strip {
  background: var(--color-cotton); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
}
.weekly-check-strip h2 { color: var(--ink); }
.weekly-check-strip h2 small, .weekly-check-strip p { color: var(--muted); }
.previous-plan p, .confirmation-reference p { color: var(--muted); background: var(--color-paper-2); }
.draft-facts strong, .confirmation-row strong { color: var(--color-ink-2); }
.draft-facts p, .confirmation-help, .confirmation-row p, .confirmation-row span { color: var(--muted); }
/* End Hallmark Coral preset adaptation. */

/* Hallmark / Refract: water/pool — official material, adapted to an operational app.
 * White plaster; unblurred clear panels; one down-right daylight shadow.
 * Moving caustics stay outside the reading area. Selected controls carry clear accents.
 * Load after base.css + surfaces.css. No production behavior changes. */
/* Hallmark · waive 24b · compact task UI retains 44px touch controls and 22px Refract panels · Preserve the existing optical spacing around CJK labels and inline actions to protect first-project visibility within the opening viewport without shrinking touch targets. */
:root {
  color-scheme: light;
  --color-paper: oklch(98.2% 0.006 95);
  --color-paper-2: oklch(96.4% 0.006 95);
  --color-paper-3: oklch(93.6% 0.008 95);
  --color-ink: oklch(23% 0.035 245);
  --color-ink-2: oklch(36% 0.035 245);
  --color-muted: oklch(50% 0.025 240);
  --color-rule: oklch(89.5% 0.008 230);
  --color-rule-2: oklch(82% 0.012 230);
  --color-light: oklch(99.7% 0.004 95);
  --color-white: oklch(99.8% 0.006 95);
  --color-clear: oklch(100% 0 0 / .86);
  --color-clear-rail: oklch(100% 0 0 / .78);
  --color-clear-button: oklch(100% 0 0 / .8);
  --color-shade: oklch(91% 0.025 212);
  --color-shade-2: oklch(78% 0.035 220);
  --color-slot: var(--color-shade);
  --color-cotton: var(--color-clear);
  --color-desk: var(--color-paper-2);
  --color-print: var(--color-ink);
  --color-board: oklch(27% 0.012 245);
  --color-board-type: var(--color-light);
  --color-accent: var(--color-board);
  --color-accent-hi: oklch(20% 0.012 245);
  --color-accent-ink: var(--color-light);
  --color-accent-soft: var(--color-paper-2);
  --color-accent-2: var(--color-accent-hi);
  --color-focus: var(--color-ink-2);
  --color-scrim: oklch(29% 0.025 245 / .22);
  --color-selection: oklch(88% 0.018 220);
  --edge-light: inset 0 1px 0 oklch(100% 0 0 / .9), inset 0 0 0 1px oklch(100% 0 0 / .55);
  --shadow-card: 18px 28px 48px -26px oklch(52% 0.07 220 / .28), 2px 3px 6px -2px oklch(40% 0.04 230 / .09);
  --shadow-cast: 28px 40px 70px -30px oklch(60% 0.07 212 / .34);
  --shadow-dialog: var(--edge-light), var(--shadow-cast);
  --shadow-control: 3px 5px 10px -7px oklch(48% 0.05 220 / .3);
  --shadow-hover: 20px 30px 48px -26px oklch(52% 0.07 220 / .33), 2px 3px 6px -2px oklch(40% 0.04 230 / .1);
  --edge-stock: var(--edge-light);
  --cast-stock: var(--shadow-control);
  --cast-stock-lift: var(--shadow-control);
  --font-display: "Funnel Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Funnel Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius-card: 22px;
  --radius-inner: 12px;
  --radius-input: 12px;
  --radius-pill: 999px;
  --radius-control: 999px;
  --rule-hair: 1px;
  --tracking-display: -.032em;
  --display-weight: 400;
  --ink: var(--color-ink);
  --muted: var(--color-muted);
  --paper: var(--color-paper);
  --white: var(--color-white);
  --line: var(--color-rule);
  --navy: var(--color-ink-2);
  --action: var(--color-board);
  --action-hover: var(--color-accent-hi);
  --neutral: var(--color-muted);
  --neutral-soft: var(--color-paper-2);
  --neutral-line: var(--color-rule);
  --focus-ring: var(--color-focus);
  --shadow: var(--shadow-card);
  --glass-shadow: var(--shadow-card);
  --refract-light-enabled: 1;
  --refract-light-shade: oklch(88% 0.026 212 / .68);
  --refract-light-seam: oklch(100% 0 0 / .9);
  --refract-light-edge: oklch(79% 0.028 212 / .18);
}

/* Water is a quiet material at the outer edge, never a field behind task text. */
html, body { background: var(--color-paper); scrollbar-color: var(--color-rule-2) var(--color-paper); }
body { color: var(--color-ink-2); font-family: var(--font-body); }
#app { position: relative; z-index: 1; }
.refract-light {
  position: fixed; inset: 0 0 auto auto; width: 460px; height: 540px;
  z-index: 0; pointer-events: none; user-select: none; opacity: .76;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 84% 100%, 84% 3%, 0 3%);
}
.auth-page { background: transparent; }
.app-shell { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar {
  inset: 18px auto 18px 18px; width: 188px; padding: 27px 12px 18px;
  border: 1px solid var(--color-white); border-radius: 28px;
  background: var(--color-clear-rail); box-shadow: var(--edge-light), var(--shadow-card);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.workspace-brand { margin-left: 6px; gap: 9px; }
.workspace-emblem { width: 27px; height: 27px; opacity: .8; }
.workspace-name { font-weight: 500; line-height: 1.35; font-size: 13px; }
.nav-section { margin: 29px 12px 10px; letter-spacing: 0; }
.nav { gap: 7px; }
.nav button { min-height: 44px; padding: 10px 12px; font-weight: 400; }
.nav button.active {
  color: var(--color-ink); background: var(--color-white); border-color: var(--color-rule);
  box-shadow: var(--edge-light), var(--shadow-control); font-weight: 500;
}
.nav .assistant-entry { margin-top: 15px; background: transparent; border-color: var(--color-rule); }
.nav .nav-count { color: var(--state-attention); background: var(--color-white); border-radius: var(--radius-pill); }
.sidebar-tools button, .sidebar-tools a { font-size: 12px; min-height: 44px; }
.user-pill { padding-inline: 8px; }
.topbar {
  position: relative; top: auto; min-height: 44px; margin: 18px 84px 0 18px; padding: 0 18px;
  border: 1px solid var(--color-white); border-radius: var(--radius-pill);
  background: var(--color-clear-rail); box-shadow: var(--edge-light), var(--shadow-control);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.content { max-width: 1550px; padding: 25px 84px 32px 18px; }
.page-heading { margin-bottom: 21px; gap: 18px; }
.page-heading h1 { font-size: 34px; font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.2; }
.page-heading p { margin-top: 8px; font-size: 13px; }
h1, h2, h3, .project-name, .auth-name { font-family: var(--font-display); text-wrap: balance; }
.section-head h2, .project-name, .overview-card h2, .modal-head h2,
.assistant-head h2, .assistant-welcome h3, .auth-name, .auth-form h2 {
  font-weight: var(--display-weight); letter-spacing: var(--tracking-display);
}
.section-head h2 { font-size: 20px; }
.heading-actions .button { min-height: 46px; }
.team-followups { margin-bottom: 13px; }
.team-followups > .section-head { margin-bottom: 9px; }
.team-followups > .section-head h2 { font-size: 17px; }
.followup-grid { gap: 12px; }
.followup-group[data-followup] {
  border-color: var(--color-white); border-radius: 18px; background: var(--color-clear);
  box-shadow: var(--edge-light), var(--shadow-control);
}
.followup-group > summary { min-height: 77px; padding: 12px 16px; gap: 5px 10px; }
.followup-group > summary strong { font-size: 12px; font-weight: 400; }
.followup-count { font-family: var(--font-display); font-size: 25px; font-weight: 500; color: var(--color-ink-2); font-variant-numeric: tabular-nums; }
.followup-label { color: var(--color-ink-2); }
.followup-group.has-items .followup-count { color: var(--state-attention); }
.members-section { margin-bottom: 5px; }
.members-section > summary { min-height: 44px; padding-block: 5px; font-size: 13px; }
.task-panel { gap: 0 16px; }
.task-panel-top { padding-bottom: 12px; }
.task-search-row { padding-bottom: 12px; padding-top: 3px; }
.project-groups { gap: 20px; align-items: start; }
.project-group, .overview-card {
  border: 1px solid var(--color-white); border-radius: var(--radius-card);
  background: var(--color-clear); box-shadow: var(--edge-light), var(--shadow-card);
}
.project-group { --project-line: var(--color-rule); }
.project-group-head {
  padding: 21px 22px 18px; background: transparent; border-color: var(--color-rule);
  border-radius: 21px 21px 0 0;
}
.project-identity { gap: 9px; }
.project-symbol { background: transparent; color: var(--color-muted); }
.project-name { font-size: 23px; line-height: 1.4; }
.project-group-head p { margin-top: 7px; font-size: 12px; line-height: 1.7; }
.project-task-list { padding-inline: 22px; }
.project-task-item:not([hidden]) {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px; padding: 12px 0 14px;
}
.project-task-item + .project-task-item { border-top-color: var(--color-rule); }
.project-task-main { grid-column: 1 / -1; grid-row: 1; }
.project-task-main .task-title { min-height: 44px; padding-block: 8px; font-size: 16px; font-weight: 500; line-height: 1.5; }
.task-context-meta { grid-column: 1; grid-row: 2; align-self: center; font-size: 11px; line-height: 1.5; }
.project-task-item .task-confirmation { grid-column: 2; grid-row: 2; align-self: center; justify-self: end; margin: 0; font-size: 11px; line-height: 1.5; }
.project-task-bottom { grid-column: 1; grid-row: 3; align-self: center; margin: 0; }
.project-task-info { gap: 2px 8px; }
.project-task-item .owner-inline, .project-task-item .due-date { font-size: 12px; line-height: 1.55; }
.project-task-item .due-note { margin-top: 1px; font-size: 11px; line-height: 1.5; }
.project-task-item .simple-task-actions {
  grid-column: 2; grid-row: 3; align-self: center; gap: 4px;
  padding: 0; margin: 0; border: 0; flex-wrap: nowrap;
}
.project-task-item .task-row-actions .button { min-height: 44px; padding: 8px; font-size: 11px; }
.project-task-item .task-row-actions .button svg { width: 13px; height: 13px; }
.project-task-item .task-blocker { grid-column: 1 / -1; grid-row: 4; margin: 3px 0 0; font-size: 12px; }
.project-card-footer { margin-inline: 22px; }
.project-expand { font-size: 12px; }
.member-card, .my-schedule, .confirmation-row, .account-row, .project-viewer-row {
  background: var(--color-clear); border-color: var(--color-rule); box-shadow: var(--edge-light), var(--shadow-control);
  border-radius: 18px;
}
.member-card.away { background: var(--color-paper-2); }
.member-title h3, .member-name { font-weight: 500; }
.member-load strong { font-weight: 400; }
.member-footer { border-color: var(--color-rule); }
.weekly-check-strip, .weekly-check-strip.is-complete {
  background: var(--color-clear); border-color: var(--color-rule); border-radius: var(--radius-card);
  box-shadow: var(--edge-light), var(--shadow-card);
}
.weekly-check-strip h2 { font-weight: 500; }
.overview-card { padding: 23px; }
.overview-card h2 { font-size: 24px; }
.overview-card h2 button { font-weight: 400; }
.project-next-node, .project-detail-summary, .draft-facts,
.project-access-intro, .owner-note, .report-empty { background: var(--color-paper-2); border-radius: var(--radius-inner); }
.project-stage-list > span { border-radius: var(--radius-pill); }
.project-readout-list > li { background: var(--color-white); border-color: var(--color-rule); border-radius: var(--radius-inner); }
.project-health, .badge { border-radius: var(--radius-pill); padding-inline: 9px; }
.task-scope, .assistant-modes, .project-detail-tabs {
  background: var(--color-paper-2); border-color: var(--color-rule); border-radius: var(--radius-pill); box-shadow: none;
}
.task-scope button, .assistant-modes button, .project-detail-tabs button { border-radius: var(--radius-pill); min-height: 44px; }
.task-scope button.active, .task-scope button[aria-pressed=true], .assistant-modes button.selected,
.project-detail-tabs button.active { background: var(--color-white); box-shadow: var(--edge-light), var(--shadow-control); }

/* White wells and neutral pills carry interaction, without adding a state color. */
.button, .button.small, .auth-form .button, .project-group .project-add,
.project-task-item .task-row-actions .button, .assistant-draft .button, .date-chip {
  min-height: 44px; color: var(--color-ink-2); background: var(--color-clear-button);
  border: 1px solid var(--color-rule); border-radius: var(--radius-pill);
  box-shadow: var(--edge-light), var(--shadow-control); font-weight: 500;
}
.button.primary, .auth-form .button.primary, .auth-form .button.primary:disabled,
.assistant-compose-actions .button.primary, .assistant-compose-actions .button.primary:disabled {
  color: var(--color-light); border-color: var(--color-board); background: var(--color-board);
  box-shadow: var(--shadow-control);
}
.project-task-item .task-row-actions [data-action="progress"] { background: var(--color-white); color: var(--color-ink); border-color: var(--color-rule); }
.button.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.button.danger { color: var(--state-danger); border-color: var(--state-danger); }
.field input, .field select, .field textarea, .task-basics > .field input,
.auth-form .field input, .assistant-compose textarea, .weekly-report-table input,
.weekly-report-table textarea, .filter-fields select, .overview-health-filter select {
  background: var(--color-white); color: var(--color-ink-2); border-color: var(--color-rule);
  border-radius: var(--radius-inner); box-shadow: var(--edge-light);
}
.search-box input { background: var(--color-white); border-color: var(--color-rule); border-radius: var(--radius-pill); }
.task-filter-toggle > summary, .task-filter-toggle[open] > summary {
  background: var(--color-clear-button); border-color: var(--color-rule); border-radius: var(--radius-pill);
  box-shadow: var(--edge-light), var(--shadow-control);
}
.filter-fields { background: var(--color-white); border-color: var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.field input:focus, .field select:focus, .field textarea:focus, .task-basics > .field input:focus,
.auth-form .field input:focus, .assistant-compose textarea:focus {
  background: var(--color-white); border-color: var(--color-rule);
  outline: 2px solid var(--color-focus); outline-offset: 3px;
}
.status-option { border-radius: var(--radius-pill); }
.date-chip.is-selected, .date-chip.active, .date-chip[aria-pressed=true] { color: var(--color-ink); background: var(--color-paper-2); border-color: var(--color-muted); }
.task-options, .task-options[open] > summary { background: var(--color-paper-2); border-color: var(--color-rule); }
.task-options { border-radius: var(--radius-inner); }
.icon-button { border-radius: var(--radius-pill); }

/* Keep the same clear material in login, reporting, the assistant, and all dialogs. */
.auth-card, #modal, #assistant-panel {
  background: var(--color-clear); border: 1px solid var(--color-white); border-radius: var(--radius-card);
  box-shadow: var(--edge-light), var(--shadow-cast); backdrop-filter: none; -webkit-backdrop-filter: none;
}
.auth-card { padding: 38px; }
.auth-emblem { background: var(--color-white); border-color: var(--color-white); border-radius: 18px; box-shadow: var(--edge-light), var(--shadow-card); }
.auth-form h2 { font-size: 25px; }
.auth-form .button.primary { min-height: 48px; }
.modal-head, .modal-actions, .assistant-head, .assistant-compose {
  background: var(--color-white); border-color: var(--color-rule);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
#modal::backdrop, #assistant-panel::backdrop { background: var(--color-scrim); backdrop-filter: none; -webkit-backdrop-filter: none; }
.modal-head h2, .assistant-head h2 { font-size: 27px; }
.modal-head .icon-button, .assistant-welcome-icon { border-radius: var(--radius-pill); background: var(--color-paper-2); }
.assistant-message.user { background: var(--color-white); border-color: var(--color-rule); border-radius: 20px 20px 6px 20px; box-shadow: var(--shadow-control); }
.assistant-draft { background: var(--color-white); border-color: var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--edge-light), var(--shadow-card); }
.assistant-draft h3 { font-weight: 500; }
.assistant-sources button { background: var(--color-white); border-color: var(--color-rule); border-radius: var(--radius-inner); box-shadow: none; }
.assistant-compose-actions .button { border-radius: var(--radius-pill); }
.weekly-report-table th { background: var(--color-paper-2); }
.weekly-report-table td, .weekly-report-table th, .weekly-table-wrap { border-color: var(--color-rule); }
.weekly-report-table { background: var(--color-white); }
.weekly-table-wrap { border-radius: var(--radius-inner); }
.toast { background: var(--color-board); color: var(--color-light); border-color: var(--color-board); border-radius: var(--radius-pill); box-shadow: var(--shadow-card); }
::selection { background: var(--color-selection); color: var(--color-ink); }

/* Control motion. Refract's ambient water and lift refinements follow below. */
.button, .nav button, .icon-button { transition: color 150ms ease-out, background-color 150ms ease-out, border-color 150ms ease-out; }
@media (hover: hover) and (pointer: fine) {
  .button:hover:not(:disabled), .project-group .project-add:hover:not(:disabled),
  .project-task-item .task-row-actions .button:hover:not(:disabled), .assistant-draft .button:hover:not(:disabled) {
    background: var(--color-white); color: var(--color-ink); border-color: var(--color-rule-2);
    box-shadow: var(--edge-light), var(--shadow-control); transform: none;
  }
  .button.primary:hover:not(:disabled), .auth-form .button.primary:hover:not(:disabled),
  .assistant-compose-actions .button.primary:hover:not(:disabled) {
    color: var(--color-light); background: var(--color-accent-hi); border-color: var(--color-accent-hi); box-shadow: var(--shadow-control);
  }
  .button.danger:hover:not(:disabled) { color: var(--state-danger); background: var(--state-danger-soft); border-color: var(--state-danger); }
  .nav button:hover:not(.active), .nav .assistant-entry:hover:not(.active),
  .sidebar-tools button:hover, .sidebar-tools a:hover { background: var(--color-white); color: var(--color-ink); border-color: var(--color-rule); }
}
.button:active:not(:disabled), .auth-form .button.primary:active:not(:disabled),
.project-group .project-add:active:not(:disabled), .project-task-item .task-row-actions .button:active:not(:disabled),
.assistant-draft .button:active:not(:disabled) { transform: none; box-shadow: var(--edge-light), var(--shadow-control); }
@media (min-width: 1100px) { .project-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1750px) { .project-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1099px) and (min-width: 761px) {
  .app-shell { grid-template-columns: 204px minmax(0, 1fr); }
  .sidebar { left: 12px; width: 176px; padding-inline: 9px; }
  .content { padding-left: 12px; padding-right: 28px; }
  .topbar { margin-left: 12px; margin-right: 28px; }
  .refract-light { clip-path: polygon(0 0, 100% 0, 100% 100%, 96% 100%, 96% 3%, 0 3%); }
  .project-groups { grid-template-columns: minmax(0, 1fr); }
  .followup-grid { gap: 7px; }
  .followup-group > summary { padding-inline: 11px; }
}
@media (max-width: 760px) {
  .refract-light { display: none; }
  .app-shell { display: block; }
  .sidebar { position: relative; inset: auto; width: auto; margin: 10px 12px 0; padding: 12px; border-radius: 22px; }
  .workspace-brand { margin: 0 0 0 2px; }
  .mobile-menu-button { top: 11px; right: 12px; border-radius: var(--radius-pill); background: var(--color-white); }
  .nav button { font-size: 12px; }
  .nav .assistant-entry { margin-top: 0; }
  .topbar { margin: 8px 16px 0; padding: 0; min-height: 32px; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .content { padding: 18px 16px 28px; }
  .page-heading h1 { font-size: 29px; }
  .page-heading { margin-bottom: 19px; }
  .heading-actions .button { min-height: 44px; }
  .followup-grid { gap: 9px; }
  .followup-group > summary { min-height: 72px; padding: 11px 13px; }
  .project-groups, .project-overview-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .project-group-head { padding: 18px 16px 16px; }
  .project-name { font-size: 21px; }
  .project-task-list { padding-inline: 16px; }
  .project-task-bottom { grid-column: 1 / -1; }
  .project-task-item .simple-task-actions { grid-column: 1 / -1; grid-row: 4; justify-self: end; flex-wrap: wrap; }
  .project-task-item .task-blocker { grid-row: 5; }
  .project-card-footer { margin-inline: 16px; }
  .project-group .project-add { width: 44px; height: 44px; padding: 0; }
  .project-task-item .task-row-actions .button { padding-inline: 11px; }
  .member-card, .weekly-check-strip, .overview-card { border-radius: 18px; }
  .weekly-report-table tr { background: var(--color-white); border-color: var(--color-rule); border-radius: var(--radius-inner); }
  .auth-card { padding: 28px; }
  #assistant-panel { border-radius: 0; }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .topbar, .auth-card, #modal, #assistant-panel, .followup-group[data-followup],
  .project-group, .overview-card, .member-card, .weekly-check-strip, .weekly-check-strip.is-complete { background: var(--color-white); }
  .refract-light { display: none; }
}
@media (prefers-contrast: more) {
  :root { --color-rule: oklch(65% 0.008 230); --color-rule-2: oklch(55% 0.008 230); --color-muted: oklch(38% 0.025 240); }
  .refract-light { display: none; }
}
@media (prefers-reduced-motion: reduce) { .button, .nav button, .icon-button { transition: none; } }

/* Refract: secondary screens use the same legible, neutral controls. */
#modal,
#assistant-panel { background: var(--color-white); }
.project-readout-list small,
.project-timeline time,
.project-timeline > li > span,
.project-scope-options small,
.project-card-confirmation { color: var(--muted); }
.previous-plan summary,
.confirmation-reference summary { min-height: 44px; padding-block: 10px; }
.conflict-choice label:has(input:checked) {
  color: var(--color-ink);
  border-color: var(--color-rule-2);
  background: var(--color-paper-2);
}
.conflict-choice input,
.project-scope-options input { accent-color: var(--color-ink); }
@media (max-width: 760px) {
  .mobile-menu-button { max-width: 150px; white-space: nowrap; gap: 5px; }
  .mobile-menu-button span,
  .mobile-menu-button svg { flex-shrink: 0; }
}
@media (max-width: 380px) {
  .workspace-name { font-size: 11px; }
  .workspace-emblem { width: 22px; height: 22px; }
  .mobile-menu-button { font-size: 11px; gap: 4px; }
}

/* Refract motion: slowly changing daylight, plus small physical feedback. */
:root {
  --refract-light-shade: oklch(86% 0.045 212 / .8);
  --refract-light-edge: oklch(75% 0.045 212 / .22);
  --refract-lift-duration: 180ms;
  --refract-press-duration: 110ms;
}
.refract-light {
  --refract-gutter: 74px;
  --refract-top: 16px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, calc(100% - var(--refract-gutter)) 100%, calc(100% - var(--refract-gutter)) var(--refract-top), 0 var(--refract-top));
}
@media (max-width: 1099px) and (min-width: 761px) {
  .refract-light { --refract-gutter: 18px; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .project-group, .overview-card {
    transition: transform var(--refract-lift-duration) var(--ease-out), box-shadow var(--refract-lift-duration) var(--ease-out);
  }
  .project-group:hover, .overview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--edge-light), var(--shadow-hover);
  }
  .project-group:has(:focus-visible), .overview-card:has(:focus-visible) {
    transform: none;
    transition: none;
  }
  .button {
    transition: transform var(--refract-press-duration) var(--ease-out), color 150ms ease-out, background-color 150ms ease-out, border-color 150ms ease-out, box-shadow var(--refract-lift-duration) var(--ease-out);
  }
  .button:active:not(:disabled), .auth-form .button.primary:active:not(:disabled),
  .project-group .project-add:active:not(:disabled), .project-task-item .task-row-actions .button:active:not(:disabled),
  .assistant-draft .button:active:not(:disabled) { transform: translateY(1px); }
  .button:focus-visible { transition: none; }
}

/* Refract control hierarchy: 22px panels, 12px inner controls, 48px primary pills.
 * Selection follows the reference: blue outlines for rows, ink-filled choice pills. */
:root {
  --color-accent: oklch(50% 0.12 234);
  --color-accent-hi: oklch(44% 0.12 236);
  --color-accent-ink: oklch(99% 0.003 95);
  --color-accent-soft: oklch(94% 0.025 220);
  --color-focus: oklch(50% 0.12 234);
  --refract-selected: var(--color-ink);
  --refract-selected-text: var(--color-light);
  --refract-action-shadow: 8px 12px 22px -12px oklch(47% 0.08 220 / .42);
}
.sidebar { border-radius: var(--radius-card); }
.topbar { min-height: 48px; }
.nav button, .nav .assistant-entry { border-radius: var(--radius-inner); }
.nav button.active {
  color: var(--color-accent); background: var(--color-white);
  border-color: var(--color-accent); box-shadow: inset 0 0 0 .5px var(--color-accent);
  font-weight: 500;
}
.button { border-radius: var(--radius-inner); box-shadow: none; font-weight: 500; }
.button.primary, .auth-form .button.primary, .assistant-compose-actions .button.primary {
  color: var(--color-accent-ink); background: var(--color-accent); border-color: var(--color-accent);
  min-height: 48px; padding-inline: 22px; border-radius: var(--radius-pill);
  box-shadow: var(--refract-action-shadow);
}
.heading-actions > .button { min-height: 48px; padding-inline: 20px; border-radius: var(--radius-pill); }
.project-group .project-add {
  min-height: 44px; padding: 8px 14px; border-radius: var(--radius-inner);
  font-size: 12px; background: transparent; border-color: var(--color-rule); box-shadow: none;
}
.project-task-item .task-row-actions .button {
  min-width: 56px; min-height: 44px; padding: 8px 10px;
  border-radius: 10px; font-size: 12px; box-shadow: none;
}
.project-task-item .simple-task-actions { gap: 6px; }
.project-task-bottom { grid-column: 1 / -1; }
.project-task-item .simple-task-actions { grid-column: 1 / -1; grid-row: 4; justify-self: end; }
.project-task-item .task-blocker { grid-row: 5; }
.project-group-head { padding: 22px; }
.project-name { font-size: 22px; line-height: 1.4; }
.project-group-head p { margin-top: 6px; }
.followup-group[data-followup] {
  border-radius: var(--radius-inner); border-color: var(--color-rule);
  box-shadow: var(--edge-light); background: var(--color-white);
}
.task-scope { gap: 6px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.task-scope button {
  min-height: 44px; min-width: 88px; padding: 10px 17px; border: 1px solid var(--color-rule);
  border-radius: var(--radius-pill); background: transparent; color: var(--color-ink-2); box-shadow: none;
}
.task-scope button[aria-pressed="true"], .task-scope button.active {
  background: var(--refract-selected); color: var(--refract-selected-text);
  border-color: var(--refract-selected); box-shadow: var(--refract-action-shadow); font-weight: 500;
}
.assistant-modes { gap: 8px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.assistant-modes button {
  border-radius: var(--radius-inner); border-color: var(--color-rule);
  color: var(--color-ink-2); background: transparent; box-shadow: none;
}
.assistant-modes button.selected, .assistant-modes button[aria-pressed="true"] {
  color: var(--refract-selected-text); background: var(--refract-selected);
  border-color: var(--refract-selected); box-shadow: none;
}
.project-detail-tabs { gap: 6px; padding: 0; background: transparent; }
.project-detail-tabs button {
  min-height: 44px; border-radius: var(--radius-inner); border-color: var(--color-rule);
  color: var(--color-ink-2); background: transparent; box-shadow: none;
}
.project-detail-tabs button.active, .project-detail-tabs button[aria-selected="true"] {
  color: var(--color-accent); border-color: var(--color-accent); background: var(--color-white);
  box-shadow: none;
}
.project-detail-tabs button.active small { color: inherit; }
.date-chip { border-radius: var(--radius-pill); min-height: 44px; padding-inline: 15px; }
.date-chip.is-selected, .date-chip.active, .date-chip[aria-pressed="true"] {
  color: var(--refract-selected-text); background: var(--refract-selected);
  border-color: var(--refract-selected); box-shadow: var(--refract-action-shadow);
}
.field input, .field select, .field textarea, .auth-form .field input,
.task-basics > .field input, .assistant-compose textarea { border-radius: var(--radius-inner); }
.status-option { border-radius: var(--radius-inner); }
.conflict-choice label:has(input:checked),
.project-scope-options label:has(input:checked) {
  color: var(--color-ink); border-color: var(--color-accent); background: var(--color-white);
  box-shadow: inset 0 0 0 .5px var(--color-accent);
}
.conflict-choice input, .project-scope-options input,
.check-field input, .history-toggle input { accent-color: var(--color-accent); }
.confirmation-row, .project-viewer-row, .account-row, .draft-facts { border-radius: var(--radius-inner); box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .button:hover:not(:disabled), .project-group .project-add:hover:not(:disabled),
  .project-task-item .task-row-actions .button:hover:not(:disabled) {
    color: var(--color-accent); border-color: var(--color-accent); box-shadow: none;
  }
  .button.primary:hover:not(:disabled), .auth-form .button.primary:hover:not(:disabled),
  .assistant-compose-actions .button.primary:hover:not(:disabled) {
    color: var(--color-accent-ink); background: var(--color-accent-hi); border-color: var(--color-accent-hi);
    box-shadow: var(--refract-action-shadow);
  }
  .button.danger:hover:not(:disabled) { color: var(--state-danger); border-color: var(--state-danger); }
}
@media (max-width: 760px) {
  .project-group-head { padding: 18px 16px; }
  .project-group .project-add { padding: 0; min-width: 44px; }
  .project-name { font-size: 21px; }
  .topbar { min-height: 32px; }
  .task-scope button { flex: 1; }
}

/* Refract project edges: indicate the project being explored without resizing it. */
:root {
  --project-edge-ring: oklch(55% .12 234 / .9);
  --project-edge-halo: 0 0 0 3px oklch(62% .1 228 / .09), 0 5px 22px -9px oklch(52% .12 234 / .3);
}
.project-group, .overview-card, .project-detail-tabs button { position: relative; }
.project-group::after, .overview-card::after, .project-detail-tabs button::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1.5px solid var(--project-edge-ring);
  border-radius: inherit;
  box-shadow: var(--project-edge-halo), inset 0 0 0 1px oklch(100% 0 0 / .7);
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .project-group:hover::after, .overview-card:hover::after { opacity: 1; }
}
.project-group:has(:focus-visible)::after, .overview-card:has(:focus-visible)::after {
  opacity: 1;
  transition: none;
}
.project-detail-tabs button[aria-selected="true"]::after { opacity: 1; }
.project-detail-tabs button::after { border: 0; box-shadow: var(--project-edge-halo); }
.project-detail-tabs button:focus-visible::after { opacity: 0; animation: none; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .project-group::after, .overview-card::after, .project-detail-tabs button::after {
    transition: none;
    animation: none;
  }
}
@media (prefers-contrast: more) {
  .project-group::after, .overview-card::after, .project-detail-tabs button::after {
    border-color: var(--color-accent);
    border-width: 2px;
    box-shadow: none;
  }
}
@media (forced-colors: active) {
  .project-group::after, .overview-card::after, .project-detail-tabs button::after {
    border-color: Highlight;
    box-shadow: none;
  }
}

/* One boundary per control; keep the assistant's conversation visually continuous. */
#modal[data-kind="project-detail"][open] {
  display: flex; flex-direction: column;
  height: min(820px, calc(100dvh - 40px)); overflow: hidden;
}
#modal[data-kind="project-detail"] > .modal-head,
#modal[data-kind="project-detail"] > .modal-actions { flex-shrink: 0; }
#modal[data-kind="project-detail"] > .modal-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  overflow-anchor: none; scrollbar-gutter: stable;
}
#project-detail-panel { min-height: clamp(240px, 40dvh, 360px); }
.project-detail-tabs button:focus-visible { outline-offset: -1px; }
.field input:focus, .field select:focus, .field textarea:focus,
.task-basics > .field input:focus, .auth-form .field input:focus,
.search-box input:focus, .filter-fields select:focus, .overview-health-filter select:focus,
.weekly-report-table input:focus, .weekly-report-table textarea:focus {
  border-color: var(--color-focus);
  outline: 2px solid var(--color-focus);
  outline-offset: -1px;
  box-shadow: none;
}
.assistant-head { padding: 17px 24px 15px; }
.assistant-head h2 { font-size: 24px; }
.assistant-scroll { padding: 18px 24px 22px; }
.assistant-status.unavailable {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 3px;
  padding: 12px 14px; border: 0; border-radius: 12px; background: var(--color-paper-2);
}
.assistant-status.unavailable strong { font-size: 14px; line-height: 1.6; font-weight: 500; }
.assistant-status.unavailable p { grid-column: 1; margin: 0; font-size: 12px; line-height: 1.7; }
.assistant-status.unavailable button {
  grid-column: 2; grid-row: 1 / 3; align-self: center;
  margin: 0; padding: 8px 0; font-size: 12px; color: var(--color-accent);
}
.assistant-modes { margin: 18px 0 20px; }
.assistant-modes button { font-weight: 500; }
.assistant-welcome { padding: 12px 0 18px; }
.assistant-welcome-icon { width: 40px; height: 40px; margin-bottom: 14px; border: 0; box-shadow: none; }
.assistant-welcome-icon svg { width: 22px; height: 22px; }
.assistant-welcome h3 { font-size: 23px; font-weight: 500; }
.assistant-welcome p { margin-top: 10px; line-height: 1.8; }
.assistant-compose { padding: 12px 24px 16px; border-top: 0; background: var(--color-white); }
.assistant-compose form {
  padding: 13px 14px 12px; border: 1px solid var(--color-rule); border-radius: 16px;
  background: var(--color-white); box-shadow: none;
}
.assistant-compose form:has(textarea:focus) { outline: 2px solid var(--color-focus); outline-offset: -1px; }
.assistant-compose label { margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.assistant-compose textarea, .assistant-compose textarea:focus {
  min-height: 78px; padding: 0; border: 0; border-radius: 0;
  outline: none; box-shadow: none; background: transparent; line-height: 1.65;
}
.assistant-compose-actions { margin-top: 8px; }
.assistant-compose-actions .button.primary { min-height: 44px; box-shadow: none; }
.assistant-manual { margin-top: 8px; padding-top: 0; border-top: 0; column-gap: 14px; }
.assistant-message.user { background: var(--color-paper-2); border-color: transparent; box-shadow: none; }
.assistant-draft { border-radius: 16px; box-shadow: none; }
.assistant-draft .button { border-radius: 12px; box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .assistant-modes button, .project-detail-tabs button, .date-chip, .task-scope button {
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 110ms var(--ease-out);
  }
  .icon-button { transition: color 150ms ease, background-color 150ms ease, transform 110ms var(--ease-out); }
  .assistant-modes button:active:not(:disabled), .project-detail-tabs button:active:not(:disabled),
  .date-chip:active:not(:disabled), .task-scope button:active:not(:disabled), .icon-button:active:not(:disabled) { transform: scale(.98); }
}
.assistant-modes button:focus-visible, .project-detail-tabs button:focus-visible,
.date-chip:focus-visible, .task-scope button:focus-visible, .icon-button:focus-visible { transition: none; transform: none; }
@media (max-width: 760px) {
  #modal[data-kind="project-detail"][open] {
    width: calc(100% - 24px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px);
  }
  .assistant-head { padding: max(14px, env(safe-area-inset-top)) 18px 12px; }
  .assistant-scroll { padding: 16px 18px 18px; }
  .assistant-compose { padding: 10px 18px max(12px, env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .assistant-status.unavailable { column-gap: 8px; padding-inline: 11px; }
  .assistant-modes { gap: 5px; }
  .assistant-modes button { font-size: 12px; padding-inline: 4px; }
  .assistant-compose-actions > span { font-size: 10px; }
}
@media (prefers-contrast: more) {
  .assistant-status.unavailable { border: 1px solid var(--color-rule); }
  .assistant-message.user { border-color: var(--color-rule); }
}
@media (forced-colors: active) {
  .assistant-compose form:has(textarea:focus) { outline-color: Highlight; }
}

/* Optional task details share one gutter; reveal only what needs attention. */
.task-options.task-optional-fields,
.task-options.task-management-fields {
  margin: 0; border: 0; border-top: 1px solid var(--color-rule);
  border-radius: 0; background: transparent; overflow: visible;
}
.task-options.task-optional-fields > summary,
.task-options.task-management-fields > summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; gap: 12px;
  min-height: 54px; padding: 14px 0; color: var(--color-ink); font-size: 13px;
}
.task-options.task-optional-fields[open] > summary,
.task-options.task-management-fields[open] > summary {
  margin-bottom: 0; border-bottom: 0; background: transparent;
}
.task-options.task-optional-fields > .optional-fields-body {
  display: grid; gap: 18px; margin: 0; padding: 4px 0 20px;
}
.optional-fields-body .field { margin: 0; gap: 9px; }
.optional-fields-body .field > label { font-size: 13px; font-weight: 500; }
.optional-date-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.optional-date-controls input[type="date"] {
  flex: 1 1 160px; width: auto; min-width: 0; max-width: 205px; min-height: 44px;
  padding: 9px 12px; font-size: 14px;
}
.optional-date-controls .quick-dates { margin: 0; gap: 6px; }
.optional-date-controls .date-chip { padding: 8px 12px; box-shadow: none; white-space: nowrap; }
.optional-fields-body .coordination-fields { margin: 0; }
.optional-fields-body .check-field {
  align-items: center; min-height: 44px; margin: 0; padding: 0;
  color: var(--color-ink); font-size: 13px; cursor: pointer;
}
.optional-fields-body .check-field input { margin: 0; }
.optional-fields-body textarea { min-height: 76px; padding: 11px 13px; font-size: 14px; }
.optional-fields-body .field-label-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.weekly-note { border-top: 1px solid var(--color-rule); }
.weekly-note > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 10px 0; list-style: none; cursor: pointer;
  color: var(--color-muted); font-size: 13px;
}
.weekly-note > summary::-webkit-details-marker { display: none; }
.weekly-note > summary svg { width: 15px; height: 15px; }
.weekly-note[open] > summary { color: var(--color-ink); }
.weekly-note[open] > summary svg { transform: rotate(90deg); }
.weekly-note > summary:focus-visible { outline-offset: 2px; border-radius: 4px; }
.weekly-note > summary:focus-visible svg { transition: none; }
.task-options.task-management-fields > .form-grid { margin: 0; padding: 4px 0 0; }
.task-options.task-management-fields > .field-help { margin: 0 0 18px; }
@media (hover: hover) {
  .task-options.task-optional-fields > summary:hover,
  .task-options.task-management-fields > summary:hover,
  .weekly-note > summary:hover { color: var(--color-accent); background: transparent; }
}
@media (prefers-reduced-motion: no-preference) {
  .weekly-note > summary svg { transition: transform 160ms var(--ease-out); }
}
@media (max-width: 540px) {
  .optional-date-controls { gap: 8px; }
  .optional-date-controls input[type="date"] { flex-basis: 100%; max-width: none; }
  .optional-date-controls .quick-dates { width: 100%; }
  .optional-date-controls .date-chip { flex: 1 1 auto; padding-inline: 7px; }
}

/* Refract schedule proportions: date, work, state; a single selected edge. */
.project-journey {
  border: 1px solid #e2eef0; border-radius: 22px; padding: 24px;
  background: linear-gradient(145deg, #fbfefe, #f3fafb);
  box-shadow: 0 10px 24px -18px rgb(10 86 108 / 30%);
}
.journey-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 20px; }
.journey-head h3 { margin: 0; color: var(--color-ink); font-size: 25px; font-weight: 500; letter-spacing: -.6px; }
.journey-head p { margin: 7px 0 0; font-size: 12px; color: var(--color-muted); line-height: 1.6; }
.journey-counts { display: flex; flex-shrink: 0; gap: 7px; }
.journey-counts > div { min-width: 67px; padding: 10px 12px; border-radius: 12px; background: #e2f2f6; text-align: center; }
.journey-counts span { display: block; font-size: 11px; color: #526a76; }
.journey-counts strong { display: block; margin-top: 3px; font-size: 22px; line-height: 1.2; font-weight: 500; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.journey-list { margin: 0; padding: 0; list-style: none; }
.journey-list > li { border-top: 1px solid #d5e3e7; }
.journey-row {
  position: relative; display: grid; grid-template-columns: 67px minmax(0, 1fr) auto 14px;
  align-items: center; gap: 13px; width: calc(100% + 20px); min-height: 88px;
  margin: -1px -10px 0; padding: 13px 10px; border: 1.5px solid transparent;
  border-radius: 12px; background: transparent; color: var(--color-ink); text-align: left;
  box-shadow: none; cursor: pointer;
}
.journey-row.is-selected {
  z-index: 1; border-color: var(--color-accent); background: #fcffff;
  box-shadow: 0 6px 12px -8px rgb(0 113 148 / 42%);
}
.journey-row:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -1px; box-shadow: none; }
.journey-row > svg { width: 14px; height: 14px; color: var(--color-muted); }
.journey-row.is-selected > svg { color: var(--color-accent); }
.journey-date { align-self: center; font-variant-numeric: tabular-nums; }
.journey-date time { display: block; font-size: 20px; line-height: 1.3; letter-spacing: -.4px; }
.journey-date small { display: block; margin-top: 3px; font-size: 10px; line-height: 1.5; color: var(--color-muted); letter-spacing: 0; }
.journey-date time small { margin: 0 0 2px; }
.journey-date > span { font-size: 14px; }
.journey-main { min-width: 0; }
.journey-main strong { display: block; font-size: 14px; line-height: 1.6; font-weight: 500; overflow-wrap: anywhere; }
.journey-main small { display: block; margin-top: 4px; color: var(--color-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.journey-state { font-size: 12px; line-height: 1.6; white-space: nowrap; }
.journey-state.neutral { color: var(--color-muted); }
.journey-state.active { color: var(--color-accent); }
.journey-state.complete { color: var(--state-success); }
.journey-state.attention { color: var(--state-attention); }
.journey-detail { min-height: 124px; margin-top: 16px; padding-top: 18px; border-top: 1px solid #d5e3e7; }
.journey-detail-heading > span { display: block; color: var(--color-muted); font-size: 11px; }
.journey-detail-heading strong { display: block; margin-top: 5px; font-size: 15px; font-weight: 500; line-height: 1.65; overflow-wrap: anywhere; }
.journey-detail-facts { display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 8px; color: var(--color-muted); font-size: 12px; line-height: 1.7; }
.journey-detail p { margin: 10px 0 0; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.journey-detail p.journey-coordination { color: var(--state-attention); }
.project-journey > footer { margin-top: 20px; color: var(--color-muted); font-size: 11px; }
.project-changes-caption { margin: 0 0 18px; color: var(--color-muted); font-size: 12px; }
@media (hover: hover) and (pointer: fine) {
  .journey-row:hover { background: #fcffff; border-color: #a3ccd8; }
  .journey-row.is-selected:hover { border-color: var(--color-accent); }
}
@media (prefers-reduced-motion: no-preference) {
  .journey-row { transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
  .journey-row:focus-visible { transition: none; }
}
@media (max-width: 540px) {
  .project-journey { padding: 18px 14px; border-radius: 18px; }
  .journey-head { align-items: flex-start; flex-wrap: wrap; gap: 14px; padding-bottom: 18px; }
  .journey-head h3 { font-size: 23px; }
  .journey-counts > div { min-width: 64px; padding: 8px 10px; }
  .journey-row { grid-template-columns: 53px minmax(0, 1fr) 12px; gap: 3px 10px; min-height: 90px; }
  .journey-date { grid-column: 1; grid-row: 1 / 3; }
  .journey-date time { font-size: 18px; }
  .journey-main { grid-column: 2; grid-row: 1; }
  .journey-main strong { font-size: 13px; }
  .journey-main small { font-size: 11px; }
  .journey-state { grid-column: 2; grid-row: 2; font-size: 11px; }
  .journey-row > svg { grid-column: 3; grid-row: 1 / 3; }
  .journey-detail { min-height: 148px; }
}
@media (forced-colors: active) {
  .project-journey, .journey-detail, .journey-list > li { border-color: CanvasText; }
  .journey-row.is-selected { border-color: Highlight; box-shadow: none; }
}

/* Public registration stays in document flow, clear of task controls and dialogs. */
.workspace-page #app > :is(.app-shell, .auth-page, .loading-screen) {
  min-height: calc(100dvh - 56px);
}
.site-registration {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 20px;
  min-height: 56px;
  padding: 6px 20px max(6px, env(safe-area-inset-bottom));
  color: var(--color-muted);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}
.site-registration a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.site-registration a:hover { color: var(--color-ink); text-decoration: underline; }
.site-registration a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }
@media (min-width: 1100px) {
  #app:has(.app-shell) + .site-registration { margin-left: 224px; }
}
@media (min-width: 761px) and (max-width: 1099px) {
  #app:has(.app-shell) + .site-registration { margin-left: 204px; }
}
@media (max-width: 540px) {
  .site-registration { flex-direction: column; gap: 0; }
  .workspace-page #app > :is(.app-shell, .auth-page, .loading-screen) {
    min-height: calc(100dvh - 100px);
  }
}
