.hidden { display: none !important; }
.capture-scope-note { margin: 4px 0 0; color: var(--muted, #9aa7a0); font-size: .68rem; font-weight: 600; letter-spacing: .02em; line-height: 1.35; }
.details-section-num-label .capture-scope-note { display: inline-block; margin: 0 0 0 8px; font-weight: 500; text-transform: none; }

/* Connections */
.connections-page { width: 100%; max-width: 1480px; justify-self: stretch; margin: 0 auto; padding: 18px 14px 28px; color: var(--text); font-family: inherit; }
.connections-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 14px; }
.connections-tabs { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; }
.connections-tabs .sidebar-tab-toggle { position: static; right: auto; top: auto; transform: none; flex-direction: row; align-items: center; gap: 6px; width: auto; height: auto; min-height: 0; padding: 9px 16px; border: 1px solid var(--surface-border); border-radius: 8px; background: var(--surface-1); color: white; box-shadow: none; }
.connections-tabs .sidebar-tab-toggle:hover, .connections-tabs .sidebar-tab-toggle.is-active { background: var(--surface-1); }
.connections-tabs .sidebar-tab-toggle .toggle-label { writing-mode: horizontal-tb; text-orientation: mixed; transform: none; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.connections-tabs .sidebar-tab-toggle:hover, .connections-tabs .sidebar-tab-toggle.is-active { border-color: rgba(138, 245, 167, .55); }
.connections-dashboard { min-width: 0; }
.connections-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.connections-panel .connections-card { grid-column: span 1; }
.connections-panel .calm-key-card, .connections-panel .network-card { grid-column: span 2; }
.connections-panel .incoming-card, .connections-panel .outgoing-card { grid-column: span 2; }
.connections-panel[data-connections-panel="logs"] { grid-template-columns: minmax(0, 1fr); }
.connections-panel[data-connections-panel="logs"] .connections-card { grid-column: auto; }
.connections-header { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(260px, 360px) auto; align-items: center; gap: 16px; margin-bottom: 18px; }
.connections-header h1 { margin: 0; color: #f3f7ff; font-size: clamp(2rem, 2vw + 1rem, 3rem); letter-spacing: 0; }
.connections-search { width: 100%; min-width: 0; }
.connections-scope-filter { width: 100%; min-width: 0; min-height: 38px; padding: 0 34px 0 12px; border: 1px solid var(--surface-border); border-radius: 6px; background: rgba(9,23,42,.8); color: var(--text); font: inherit; font-size: .72rem; }
.connections-scope-filter:focus { border-color: var(--accent); outline: 1px solid rgba(138,245,167,.35); }
.calm-key-workspace-row { display: grid; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--surface-border); }
.calm-key-value--workspace { justify-content: space-between; gap: 10px; font-size: .82rem; }
.calm-key-value--workspace .connections-text-button { flex: 0 0 auto; padding: 4px 8px; }
.connections-search[hidden], .incoming-row[hidden], .outgoing-list > div[hidden] { display: none; }
.connections-connect-button { min-height: 40px; padding: 0 18px; white-space: nowrap; }
.connections-header-actions { display: flex; gap: 8px; justify-content: flex-end; }
.connections-request-banner { display: grid; gap: 10px; margin: 0 0 14px; }
.connections-request-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid rgba(138, 245, 167, .22); border-left: 3px solid rgba(138, 245, 167, .55); border-radius: 7px; background: linear-gradient(145deg, rgba(9, 23, 42, .98), rgba(5, 15, 29, .94)); box-shadow: 0 14px 30px rgba(0, 0, 0, .17); }
.connections-request-avatar { flex-shrink: 0; border-color: rgba(138, 245, 167, .6); background: #0b3b35; color: var(--accent); font-weight: 600; }
.connections-request-copy { display: grid; gap: 3px; min-width: 0; margin: 0; margin-right: auto; }
.connections-request-copy strong { color: var(--accent); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.connections-request-copy span { color: #dce6f6; font-size: .88rem; overflow-wrap: anywhere; }
.connections-request-actions { display: flex; flex-shrink: 0; gap: 8px; }
.connections-request-actions .small-accept, .connections-request-actions .small-reject { padding: 7px 16px; border-radius: 7px; font-size: .74rem; font-weight: 600; }
.connections-dashboard { min-width: 0; }
.connections-dashboard > .people-card { display: none; }
.calm-key-card, .network-card, .activity-card { grid-column: span 2; }
.incoming-card, .outgoing-card { grid-column: span 3; }
.connections-card { min-width: 0; padding: 17px 18px; border: 1px solid var(--surface-border); border-radius: 16px; background: linear-gradient(145deg, rgba(9, 23, 42, .98), rgba(5, 15, 29, .94)); box-shadow: 0 14px 30px rgba(0,0,0,.17); }
.connections-card h2 { margin: 0; color: #dce6f6; font-size: .95rem; font-weight: 600; }
.connections-label { margin: 0; color: #dce6f6; font-size: .84rem; font-weight: 600; }
.connections-muted, .connections-card-foot { margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.calm-key-card { grid-row: span 1; min-height: 285px; }
.calm-key-value { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding: 10px 12px; border: 1px solid rgba(138,245,167,.7); border-radius: 5px; color: var(--accent); font-size: 1rem; letter-spacing: .08em; }
.calm-key-value button { padding: 0; border: 0; background: none; color: var(--muted); font-size: 1rem; }
.calm-key-actions { display: grid; gap: 12px; margin-top: 18px; }
.connections-text-button, .connections-link-button { padding: 0; border: 0; background: transparent; color: var(--accent); font-size: .78rem; text-align: left; }
.connections-feedback { min-height: 16px; margin: 13px 0 0; color: var(--accent); font-size: .75rem; }
.connections-card-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.connections-clear-button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid var(--surface-border); border-radius: 7px; background: transparent; color: var(--muted); flex: none; }
.connections-clear-button svg { width: 13px; height: 13px; }
.connections-clear-button:hover { border-color: rgba(229,111,115,.45); background: rgba(229,111,115,.1); color: #f28d91; }
.connections-clear-button:disabled { opacity: .4; pointer-events: none; }
.network-card { min-height: 285px; }
.person-avatar { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #8d6fe0; border-radius: 50%; background: #26364d; color: white; font-size: .8rem; font-style: normal; }.person-avatar i { width: 7px; height: 7px; margin: -12px -30px 0 0; border: 1px solid #0a1a2d; border-radius: 50%; background: var(--accent); }
.avatar-james { border-color: #9c72c9; }.avatar-matt { border-color: #5bc781; }.avatar-alex { border-color: #d5a52e; }.avatar-priya { border-color: #e66e5f; }.avatar-sarah { border-color: #ba78e5; }
.connections-list-view { display: grid; gap: 3px; max-height: 192px; overflow: auto; }.connections-list-view p { margin: 0 0 2px; color: var(--muted); font-size: .65rem; }.connections-list-view button { display: flex; justify-content: space-between; padding: 7px; border: 0; border-bottom: 1px solid var(--surface-border); background: transparent; color: var(--text); font-size: .7rem; text-align: left; }.connections-list-view span { color: var(--muted); font-size: .6rem; }
.activity-card { min-height: 285px; }.activity-row { display: grid; grid-template-columns: 29px 1fr auto; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid rgba(145,168,204,.1); }.activity-row p, .incoming-row p, .outgoing-list p, .people-list p { min-width: 0; margin: 0; }.activity-row strong, .activity-row span, .incoming-row strong, .incoming-row span, .incoming-row small, .outgoing-list strong, .outgoing-list span, .outgoing-list small, .people-list strong, .people-list span { display: block; }.activity-row strong { color: #dce6f6; font-size: .68rem; font-weight: 500; }.activity-row span, .activity-row time { color: var(--muted); font-size: .6rem; }.activity-icon { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid currentColor; border-radius: 50%; font-size: .9rem; font-weight: 400; }.activity-blue { color: #58a7ff; }.activity-green { color: var(--accent); }.activity-purple { color: #bc82ed; }.activity-orange { color: #f27840; }
.incoming-card, .outgoing-card, .people-card { min-height: 320px; }.incoming-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid rgba(145,168,204,.1); }.person-avatar { width: 31px; height: 31px; font-size: .68rem; }.incoming-row small, .incoming-row span, .outgoing-list span, .outgoing-list small, .people-list span { color: var(--muted); font-size: .59rem; }.incoming-row strong { margin: 2px 0; color: #dce6f6; font-size: .67rem; font-weight: 500; }.incoming-row > div { display: grid; gap: 4px; }.small-accept, .small-reject { padding: 4px 9px; border-radius: 7px; font-size: .6rem; }.small-accept { border: 1px solid rgba(57,208,139,.4); background: rgba(57,208,139,.1); color: var(--accent); }.small-reject { border: 1px solid var(--surface-border); background: transparent; color: var(--muted); }.incoming-row.is-responded { opacity: .35; }.connections-foot-button { display: flex; justify-content: space-between; width: 100%; margin-top: 15px; border: 0; background: transparent; text-align: left; }
.incoming-tooltip-trigger { position: relative; }
.connection-work-title { cursor: pointer; }
.incoming-tooltip-trigger::after { position: absolute; z-index: 5; left: 0; bottom: calc(100% + 8px); width: min(320px, 72vw); padding: 10px 12px; border: 1px solid rgba(138, 245, 167, .35); border-radius: 7px; background: #0b1829; box-shadow: 0 12px 24px rgba(0, 0, 0, .3); color: var(--text); content: attr(data-message); font-size: .78rem; font-weight: 400; line-height: 1.45; opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity 140ms ease, transform 140ms ease; white-space: pre-wrap; }
.incoming-tooltip-trigger:hover::after, .incoming-tooltip-trigger:focus-visible::after { opacity: 1; transform: translateY(0); }
.incoming-follow-up-msg { color: var(--accent) !important; font-style: italic; }
.incoming-reply-button { width: fit-content; padding: 4px 10px; border: 1px solid rgba(138,245,167,.35); border-radius: 7px; background: transparent; color: var(--accent); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; }
.connections-page .incoming-reply-button { font-size: .65rem; }
.incoming-reply-button:hover { background: rgba(138,245,167,.12); }
.outgoing-list > div, .people-list > div { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid rgba(145,168,204,.1); }.outgoing-list strong { color: #dce6f6; font-size: .68rem; font-weight: 500; }.outgoing-list time { color: var(--muted); font-size: .58rem; }.outgoing-list b { padding: 4px 6px; border-radius: 8px; font-size: .55rem; font-weight: 500; white-space: nowrap; }.status-progress { background: rgba(44,135,255,.16); color: #64acff; }.status-accepted { background: rgba(39,176,125,.16); color: var(--accent); }.status-rejected { background: rgba(229,111,115,.16); color: #f28d91; }.status-completed { background: rgba(39,176,125,.16); color: var(--accent); }.people-list > div { grid-template-columns: 34px 1fr auto auto; }.people-list button { padding: 5px; border: 0; background: transparent; color: var(--muted); letter-spacing: .14em; }.people-list .connection-menu-action { padding: 4px 6px; border: 1px solid var(--surface-border); border-radius: 6px; font-size: .55rem; letter-spacing: 0; }.people-list strong { color: #dce6f6; font-size: .68rem; font-weight: 500; }.connections-privacy { margin-top: 12px; padding: 9px 15px; border: 1px solid var(--surface-border); border-radius: 6px; color: var(--muted); font-size: .65rem; text-align: center; }.connections-privacy span { margin-right: 5px; color: var(--accent); }
.outgoing-list > div { grid-template-columns: 34px minmax(0, 1fr) auto auto auto; }
.outgoing-list b::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.outgoing-list time { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.outgoing-list time svg { width: 11px; height: 11px; flex: none; }
.outgoing-list .outgoing-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.outgoing-list .incoming-follow-up-msg { grid-column: 1 / -1; font-size: .6rem; }
@media (max-width: 900px) { .connections-header { grid-template-columns: 1fr auto; }.connections-search { grid-column: 1 / -1; grid-row: 2; }.connections-dashboard { grid-template-columns: 1fr 1fr; }.network-card { grid-column: span 2; }.calm-key-card { grid-column: span 1; min-height: 250px; }.activity-card, .incoming-card, .outgoing-card { grid-column: span 1; } }
@media (max-width: 620px) { .connections-page { padding: 12px 8px 24px; }.connections-request-row { flex-wrap: wrap; }.connections-request-copy { flex: 1 1 200px; }.connections-request-actions { width: 100%; justify-content: flex-end; }.connections-header { grid-template-columns: 1fr; }.connections-header-actions { justify-content: flex-start; flex-wrap: wrap; }.connections-connect-button { justify-self: start; }.connections-search { grid-column: auto; grid-row: auto; }.connections-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }.connections-tabs { flex-wrap: wrap; }.connections-panel { grid-template-columns: 1fr; }.connections-panel .connections-card { grid-column: auto; }.network-card { grid-column: auto; }.connections-card { padding: 15px; }.outgoing-list > div { grid-template-columns: 34px minmax(0, 1fr) auto; }.outgoing-list time, .outgoing-list b { display: none; }.connections-privacy { line-height: 1.5; } }

.connections-page .connections-list-view p { font-size: .78rem; }
.connections-page .connections-list-view button { font-size: .84rem; }
.connections-page .connections-list-view span { font-size: .72rem; }
.connections-page .incoming-row small,
.connections-page .incoming-row span,
.connections-page .outgoing-list span,
.connections-page .outgoing-list small,
.connections-page .people-list span { font-size: .72rem; }
.connections-page .incoming-row strong,
.connections-page .outgoing-list strong,
.connections-page .people-list strong { font-size: .84rem; }
.connections-page .activity-row strong { font-size: .84rem; }
.connections-page .activity-row span,
.connections-page .activity-row time { font-size: .72rem; }
.connections-page .small-accept,
.connections-page .small-reject { font-size: .72rem; }

.connections-how { display: block; margin-top: 14px; }
.connections-how summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.connections-how summary::-webkit-details-marker { display: none; }
.connections-how-title { color: #dce6f6; font-size: .95rem; font-weight: 600; }
.connections-how-hook { color: var(--muted); font-size: .74rem; }
.connections-how-chevron { display: grid; place-items: center; width: 22px; height: 22px; margin-left: auto; flex: none; color: var(--muted); transition: transform 160ms ease; }
.connections-how-chevron svg { width: 14px; height: 14px; }
.connections-how[open] .connections-how-chevron { transform: rotate(180deg); }
.connections-how-body { margin-top: 12px; padding-top: 14px; border-top: 1px solid rgba(145, 168, 204, .1); }
.connections-how-intro { margin: 0 0 14px; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.connections-how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.connections-how-card { padding: 13px 14px; border: 1px solid rgba(145, 168, 204, .12); border-radius: 7px; background: rgba(11, 27, 43, .55); }
.connections-how-card h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; color: var(--accent); font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.connections-how-card p { margin: 0 0 8px; color: var(--muted); font-size: .74rem; line-height: 1.5; }
.connections-how-card p:last-child { margin-bottom: 0; }
.connections-how-card strong { color: #dce6f6; font-weight: 600; }
.connections-how-icon { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(138, 245, 167, .35); border-radius: 6px; color: var(--accent); flex: none; }
.connections-how-icon svg { width: 12px; height: 12px; }
.connections-how-why { margin-top: 12px; padding: 12px 16px 13px; border: 1px solid rgba(138, 245, 167, .22); border-left: 3px solid rgba(138, 245, 167, .55); border-radius: 7px; background: rgba(9, 23, 42, .98); }
.connections-how-why > strong { display: block; margin-bottom: 7px; color: var(--accent); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.connections-how-why ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.connections-how-why li { color: var(--muted); font-size: .74rem; line-height: 1.5; }
.connections-how-why li strong { color: #dce6f6; font-weight: 600; }
.connections-how-closing { margin: 10px 0 0; color: var(--accent); font-size: .8rem; font-weight: 600; }
@media (max-width: 900px) { .connections-how-grid { grid-template-columns: 1fr; } .connections-how-hook { display: none; } }
@media (prefers-reduced-motion: reduce) { .connections-how-chevron { transition: none; } }

.philosophy-shell {
  display: flex;
  gap: 0;
  min-height: 600px;
}
.philosophy-sidebar {
  min-width: 270px;
  max-width: 320px;
  background: var(--panel-strong);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  border: 1px solid var(--surface-border);
  box-shadow: 0 8px 32px rgba(58, 78, 116, 0.08);
  padding: 32px 0 32px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.philosophy-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0;
  width: 100%;
}
.philosophy-sidebar li {
  margin: 0;
  width: 100%;
}
.philo-tab {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 28px;
  border-radius: 0 22px 22px 0;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  margin-bottom: 2px;
}
.philo-tab.active, .philo-tab:focus {
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline: none;
}
.philosophy-content {
  flex: 1 1 auto;
  max-width: 820px;
  margin: 0 auto 44px auto;
  padding: 44px 32px 44px 44px;
}
.philosophy-content section {
  margin-bottom: 38px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--surface-border);
}
.philosophy-content h2 {
  font-size: 1.5rem;
  margin-top: 0;
  color: var(--accent-strong);
}
.philosophy-content h3 {
  font-size: 1.1rem;
  margin-top: 18px;
  color: var(--accent);
}
.philosophy-content ul {
  margin: 10px 0 10px 24px;
  padding: 0;
}
.philosophy-content li {
  margin-bottom: 6px;
  line-height: 1.6;
}
.today-focus-card {
  background: linear-gradient(160deg, #e6f9f0 80%, #d2f4e6 100%) !important;
  border: 2px solid #2ec492 !important;
  box-shadow: none !important;
}

/* Editorial philosophy page */
.philosophy-page {
  --philosophy-bg: #06151d;
  --philosophy-text: #d8dedb;
  --philosophy-muted: #9aa9a7;
  --philosophy-line: rgba(143, 171, 165, 0.22);
  --philosophy-green: #9cca4f;
  background: transparent;
  color: var(--philosophy-text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow: visible;
}
.main-panel:has(.philosophy-page) { min-height: 0; overflow-y: auto; }
.philosophy-page > .topbar,
.philosophy-page > .philosophy-shell { display: none; }
.philosophy-redesign { max-width: 1200px; margin: 0 auto; }
.philosophy-hero {
  min-height: 430px;
  display: flex;
  align-items: center;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(4, 17, 25, .98) 0%, rgba(4, 17, 25, .88) 35%, rgba(4, 17, 25, .18) 75%), url('/assets/philosophy%20header%20image.webp') center / cover;
  border-bottom: 1px solid var(--philosophy-line);
}
.philosophy-hero-copy { width: min(510px, 52%); padding: 46px 30px 46px 34px; }
.philosophy-eyebrow { color: var(--philosophy-green); font-size: .72rem; letter-spacing: .08em; margin: 0 0 18px; }
.philosophy-hero h1 { color: #eef0e9; font: 400 clamp(2rem, 2vw + 1rem, 3rem)/1.1 'Inter', system-ui, sans-serif; letter-spacing: -0.04em; margin: 0 0 20px; }
.philosophy-hero h1 span { color: var(--philosophy-green); }
.philosophy-hero p, .philosophy-card p { color: var(--philosophy-muted); font-size: .9rem; line-height: 1.55; margin: 0 0 12px; }
.philosophy-lead, .philosophy-highlight, .philosophy-strong { color: #e8eee8 !important; font-weight: 600; }
.philosophy-highlight { color: var(--philosophy-green) !important; }
.philosophy-grid { display: grid; grid-template-columns: 1fr 1fr; }
.philosophy-card { min-width: 0; padding: 30px 32px 34px; background: transparent; border-right: 1px solid var(--philosophy-line); border-bottom: 1px solid var(--philosophy-line); }
.philosophy-card:nth-child(even) { border-right: 0; }
.philosophy-card h2 { color: #e6e9e3; font: 400 1.15rem/1.15 'Inter', system-ui, sans-serif; margin: 0 0 20px; }
.philosophy-card h3 { color: var(--philosophy-green); font-size: 1.1rem; margin: 0 0 3px; }
.philosophy-icon { display: inline-grid; place-items: center; width: 27px; height: 27px; margin-right: 9px; border: 1px solid #709c36; border-radius: 50%; color: var(--philosophy-green); font-size: 1.05rem; vertical-align: -5px; }
.belief { margin: 0 0 14px 36px; }
.belief p { margin-bottom: 0; }
.philosophy-card--productivity { display: grid; grid-template-columns: 1fr 1.2fr; column-gap: 22px; }
.philosophy-card--productivity h2, .philosophy-card--productivity > p, .more-better { grid-column: 1 / -1; }
.more-better { font-size: 1rem !important; letter-spacing: .04em; margin: 8px 0 12px !important; }
.cross-list { list-style: none; padding: 0; margin: 0; border-right: 1px solid var(--philosophy-line); }
.cross-list li { color: var(--philosophy-muted); font-size: .9rem; padding: 7px 0; }
.cross-list li::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 9px; background-color: #d26865; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat; }
.productivity-copy { padding-left: 0; }
.distance-step { display: flex; gap: 12px; margin: 15px 0; }
.distance-step > span { flex: 0 0 29px; display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #709c36; border-radius: 50%; color: var(--philosophy-green); }
.distance-step h3 { margin-top: 2px; }
.distance-step p { margin-bottom: 0; }
.distance-footer { margin: 25px 0 0 42px !important; }
.resilience-flow { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--philosophy-green); margin: 3px 0 32px; text-align: center; font-size: .72rem; }
.resilience-flow b { font-size: 1.1rem; font-weight: 400; }
.process-line { color: var(--philosophy-green) !important; font-size: .9rem !important; font-weight: 600; }
.closing-line { color: var(--philosophy-green) !important; font: 400 1.5rem/1.1 'Inter', system-ui, sans-serif !important; margin-top: 28px !important; }
.philosophy-card--together { grid-column: 1 / -1; border-right: 0; }

@media (max-width: 700px) {
  .philosophy-hero { min-height: 470px; align-items: flex-end; background-position: 62% center; }
  .philosophy-hero-copy { width: 100%; padding: 30px 20px; background: linear-gradient(0deg, rgba(4, 17, 25, .98), rgba(4, 17, 25, .1)); }
  .philosophy-grid { grid-template-columns: 1fr; }
  .philosophy-card, .philosophy-card:nth-child(even) { border-right: 0; padding: 27px 20px 30px; }
  .philosophy-card--productivity { display: block; }
  .cross-list { border-right: 0; margin-bottom: 20px; }
  .philosophy-card--together { grid-column: auto; }
}

:root[data-theme='dark'] .today-focus-card {
  background: linear-gradient(160deg, #183c2a 80%, #1e4d38 100%) !important;
  border: 2px solid #2ec492 !important;
  box-shadow: none !important;
}
:root {
  color-scheme: light;
  --window-controls-overlay-height: 0px;
  --bg: #f3f6fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --panel-border: rgba(95, 122, 163, 0.18);
  --text: #132033;
  --muted: #6f7b91;
  --accent: #4d74ff;
  --accent-soft: rgba(77, 116, 255, 0.12);
  --accent-strong: #2f5cf0;
  --success: #27b07d;
  --warning: #f1a94b;
  --danger: #e56f73;
  --surface-1: rgba(255, 255, 255, 0.92);
  --surface-2: rgba(247, 250, 255, 0.94);
  --surface-3: rgba(243, 247, 252, 0.94);
  --surface-border: rgba(95, 122, 163, 0.12);
  --surface-elevated: rgba(255, 255, 255, 0.98);
  --shadow: 0 16px 48px rgba(58, 78, 116, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --text-primary: var(--text);
  --text-secondary: var(--muted);
  --text-muted: var(--muted);
  --surface-hover: var(--surface-3);
  --surface-card: var(--surface-1);
  --fg: var(--text);
  --border: var(--surface-border);
  --control-height: 44px;
  --control-radius: 12px;
  --control-padding: 10px 12px;
  --card-radius: var(--radius-md);
  --card-padding: 20px;
  --wb-card-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
  --wb-card-border: rgba(95, 122, 163, 0.14);
  --wb-card-shadow: 0 16px 34px rgba(15, 23, 42, 0.11);
  --wb-card-shadow-selected: 0 18px 38px rgba(59, 130, 246, 0.16), 0 16px 34px rgba(15, 23, 42, 0.08);
  --wb-card-status-bg: color-mix(in srgb, var(--accent) 14%, white);
  --wb-card-status-fg: color-mix(in srgb, var(--accent) 72%, black);
  --wb-card-menu-bg: #ffffff;
  --wb-card-menu-border: var(--surface-border);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0f1523;
  --panel: rgba(17, 24, 39, 0.88);
  --panel-strong: #1a2436;
  --panel-border: rgba(132, 156, 194, 0.22);
  --text: #edf3ff;
  --muted: #a4b3cd;
  --accent: #7ea4ff;
  --accent-soft: rgba(126, 164, 255, 0.2);
  --accent-strong: #9cbaff;
  --success: #37c08c;
  --warning: #f2bb60;
  --danger: #ec8f98;
  --surface-1: rgba(23, 32, 50, 0.96);
  --surface-2: rgba(21, 30, 47, 0.95);
  --surface-3: rgba(27, 38, 58, 0.95);
  --surface-border: rgba(130, 155, 196, 0.22);
  --surface-elevated: rgba(30, 42, 64, 0.98);
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.36);
  --wb-card-surface: linear-gradient(180deg, rgba(29, 41, 63, 0.98), rgba(21, 31, 49, 0.98));
  --wb-card-border: rgba(163, 182, 214, 0.18);
  --wb-card-shadow: 0 18px 40px rgba(0, 0, 0, 0.30);
  --wb-card-shadow-selected: 0 20px 42px rgba(126, 164, 255, 0.20), 0 18px 40px rgba(0, 0, 0, 0.28);
  --wb-card-status-bg: color-mix(in srgb, var(--accent) 18%, var(--surface-elevated));
  --wb-card-status-fg: color-mix(in srgb, var(--accent) 80%, white);
  --wb-card-menu-bg: #1b263a;
  --wb-card-menu-border: rgba(163, 182, 214, 0.18);
}

/* ============================================================
   CE THEME — Navy + Clarity Green
   ============================================================ */
:root[data-theme='ce'] {
  color-scheme: dark;
  --bg:              #040B16;
  --panel:           rgba(7, 17, 31, 0.95);
  --panel-strong:    #0A1528;
  --panel-border:    rgba(138, 245, 167, 0.10);
  --text:            #c1c5ce;
  --muted:           #6F7D95;
  --accent:          #8AF5A7;
  --accent-soft:     rgba(138, 245, 167, 0.12);
  --accent-strong:   #6BEA8A;
  --success:         #8AF5A7;
  --warning:         #f2bb60;
  --danger:          #ec8f98;
  --surface-1:       rgba(10, 21, 40, 0.97);
  --surface-2:       rgba(16, 29, 53, 0.96);
  --surface-3:       rgba(22, 37, 67, 0.96);
  --surface-border:  rgba(138, 245, 167, 0.08);
  --surface-elevated: rgba(22, 37, 67, 0.99);
  --shadow:          0 22px 54px rgba(0, 0, 0, 0.55);
  --wb-card-surface: linear-gradient(180deg, rgba(10, 21, 40, 0.98), rgba(16, 29, 53, 0.98));
  --wb-card-border: rgba(138, 245, 167, 0.12);
  --wb-card-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  --wb-card-shadow-selected: 0 20px 42px rgba(138, 245, 167, 0.18), 0 18px 42px rgba(0, 0, 0, 0.38);
  --wb-card-status-bg: rgba(138, 245, 167, 0.10);
  --wb-card-status-fg: #8AF5A7;
  --wb-card-menu-bg: #0A1528;
  --wb-card-menu-border: rgba(138, 245, 167, 0.12);
}

:root[data-theme='ce'] body {
  background: #040B16;
}

:root[data-theme='ce'] .quick-capture-row textarea,
:root[data-theme='ce'] #dumpInput {
  background: #0A1528 !important;
}

@media (display-mode: window-controls-overlay) {
  :root {
    --window-controls-overlay-height: env(titlebar-area-height, 0px);
  }

  body {
    padding-top: calc(22px + var(--window-controls-overlay-height));
  }
}

/* --- Nav sidebar --- */
:root[data-theme='ce'] .sidebar {
  background: #07111e;
  border-color: rgba(138, 245, 167, 0.08);
  backdrop-filter: none;
}

:root[data-theme='ce'] .main-panel:not(.today-layout-active) {
  background: #07111F;
  border-color: rgba(138, 245, 167, 0.08);
  backdrop-filter: none;
}

/* --- Nav active item --- */
:root[data-theme='ce'] .nav-item:hover {
  background: #101D35;
  box-shadow: none;
  transform: none;
}

:root[data-theme='ce'] .nav-item {
  border-left: 2px solid transparent;
}

:root[data-theme='ce'] .nav-item.active {
  background: #101D35;
  box-shadow: none;
  transform: none;
}

:root[data-theme='ce'] .nav-icon {
  background: rgba(138, 245, 167, 0.10);
  color: #8AF5A7;
}

/* --- Brand mark --- */
:root[data-theme='ce'] .brand-mark {
  background: transparent;
  border: 1px solid rgba(138, 245, 167, 0.30);
  color: #8AF5A7;
  filter: drop-shadow(0 0 10px rgba(138, 245, 167, 0.45));
  box-shadow: none;
}

/* --- Right Now / Focus card --- */
:root[data-theme='ce'] .today-focus-card {
  background: linear-gradient(145deg, #173238 0%, #13282E 60%, #102329 100%) !important;
  border: 1px solid #1C3940 !important;
  box-shadow: none !important;
}

:root[data-theme='ce'] .today-focus-card::before {
  background: transparent !important;
}

:root[data-theme='ce'] .today-focus-card::after {
  display: none;
}

:root[data-theme='ce'] .today-focus-card .muted-pill {
  background: rgba(138, 245, 167, 0.12);
  color: #8AF5A7;
}

/* --- AI Chat launcher --- */
:root[data-theme='ce'] .ai-chat-launcher {
  background: #101D35;
  border: 1px solid #24385F;
  color: #8AF5A7;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(138, 245, 167, 0.1);
}

:root[data-theme='ce'] .ai-chat-launcher:hover {
  box-shadow: 0 0 20px rgba(138, 245, 167, 0.15);
}

/* --- Cards / panels use Level 2 --- */
:root[data-theme='ce'] .card,
:root[data-theme='ce'] .today-card,
:root[data-theme='ce'] .board-column,
:root[data-theme='ce'] .recovery-panel,
:root[data-theme='ce'] .wb-modal-card {
  background: #0A1528;
  border-color: rgba(138, 245, 167, 0.08);
}

/* --- Inputs / buttons use Level 4 --- */
:root[data-theme='ce'] input,
:root[data-theme='ce'] select,
:root[data-theme='ce'] textarea,
:root[data-theme='ce'] .settings-select,
:root[data-theme='ce'] .settings-input {
  background: #162543;
  border-color: rgba(138, 245, 167, 0.15);
  color: #F5F7FB;
}

/* --- Primary buttons use accent green --- */
:root[data-theme='ce'] .primary-button {
  background: #1D4E34;
  border: 1px solid #8AF5A7;
  color: #8AF5A7;
}

:root[data-theme='ce'] .primary-button:hover {
  background: #235D40;
  box-shadow: 0 0 16px rgba(138, 245, 167, 0.18);
}

/* --- Quick capture selected chip matches the Right Now card --- */
:root[data-theme='ce'] .quick-capture-chips .chip-button.quick-capture-chip-active {
  background: #1D4E34;
  color: #8AF5A7;
  border-color: rgba(138, 245, 167, 0.35);
  box-shadow: 0 10px 22px rgba(138, 245, 167, 0.12);
}

/* --- Whiteboard canvas background --- */
:root[data-theme='ce'] #wbGridBg {
  fill: #040B16;
}

:root[data-theme='ce'] .wb-canvas-container,
:root[data-theme='ce'] .wb-svg {
  background: #040B16;
}

/* --- Recovery complete green accent --- */
:root[data-theme='ce'] .recovery-complete,
:root[data-theme='ce'] .recovery-step--done {
  border-color: #8AF5A7;
  color: #8AF5A7;
}

:root[data-theme='ce'] .dump-board {
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.98), rgba(10, 21, 40, 0.98));
  border-color: rgba(138, 245, 167, 0.10);
}

:root[data-theme='ce'] .dump-item {
  background: linear-gradient(180deg, rgba(11, 24, 44, 0.98) 0%, rgba(10, 21, 40, 0.99) 100%);
  border-color: rgba(138, 245, 167, 0.12);
}

:root[data-theme='ce'] .dump-item:nth-child(4n + 1) {
  background: linear-gradient(180deg, rgba(14, 34, 42, 0.98) 0%, rgba(10, 21, 40, 0.99) 100%);
}

:root[data-theme='ce'] .dump-item:nth-child(4n + 2) {
  background: linear-gradient(180deg, rgba(12, 27, 50, 0.98) 0%, rgba(10, 21, 40, 0.99) 100%);
}

:root[data-theme='ce'] .dump-item:nth-child(4n + 3) {
  background: linear-gradient(180deg, rgba(15, 30, 54, 0.98) 0%, rgba(10, 21, 40, 0.99) 100%);
}

:root[data-theme='ce'] .dump-item:nth-child(4n + 4) {
  background: linear-gradient(180deg, rgba(14, 39, 34, 0.98) 0%, rgba(10, 21, 40, 0.99) 100%);
}

/* ============================================================
   END CE THEME
   ============================================================ */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100vh;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(79, 119, 255, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(39, 176, 125, 0.12), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
}

:root[data-theme='dark'] body {
  background:
    radial-gradient(circle at top left, rgba(87, 120, 191, 0.26), transparent 34%),
    radial-gradient(circle at bottom right, rgba(37, 109, 90, 0.2), transparent 30%),
    linear-gradient(180deg, #0f1626 0%, #0a111c 100%);
}

body {
  padding: 22px;
  box-sizing: border-box;
  overflow: hidden;
}

button,
textarea {
  font: inherit;
}

button,
textarea,
a,
input,
select,
[role='button'] {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

body.ce-loading {
  overflow: hidden;
}

body.ce-loading .app-shell,
body.ce-loading #mobileSidebarToggle,
body.ce-loading .mobile-menu-controls,
body.ce-loading #mobileNavBackdrop,
body.ce-loading #mobileBottomFade,
body.ce-loading .ai-chat-launcher {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.app-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(59, 201, 139, 0.18), transparent 36%),
    radial-gradient(circle at 20% 80%, rgba(78, 212, 154, 0.12), transparent 28%),
    linear-gradient(160deg, rgba(6, 12, 20, 0.98) 0%, rgba(9, 18, 30, 0.98) 100%);
  color: #eaf7f1;
}

.app-loading-screen.is-dismissed {
  display: none;
}

.app-loading-card {
  width: min(420px, 100%);
  display: grid;
  justify-items: center;
  gap: 24px;
  padding: 36px 30px 32px;
  border: 1px solid rgba(96, 216, 168, 0.22);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(18, 27, 41, 0.82) 0%, rgba(10, 18, 30, 0.9) 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.app-loading-mark {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
}

.app-loading-symbol {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  object-fit: contain;
  animation: app-loading-symbol-pulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(96, 216, 168, 0.42));
}

.app-loading-ring,
.app-loading-ring-secondary {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(96, 216, 168, 0.34);
  box-shadow: 0 0 0 1px rgba(96, 216, 168, 0.06) inset;
  animation: app-loading-ring 2.8s linear infinite;
}

.app-loading-ring-secondary {
  inset: 14px;
  border-color: rgba(124, 238, 195, 0.2);
  animation-direction: reverse;
}

.app-loading-spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  border-radius: 50%;
  background: #70f0b8;
  box-shadow: 0 0 10px rgba(112, 240, 184, 0.92);
  animation: app-loading-spark 1.7s ease-in-out infinite;
}

.app-loading-spark-a { --spark-x: 0px; --spark-y: -52px; animation-delay: 0s; }
.app-loading-spark-b { --spark-x: 45px; --spark-y: 0px; animation-delay: 0.2s; }
.app-loading-spark-c { --spark-x: 0px; --spark-y: 52px; animation-delay: 0.4s; }
.app-loading-spark-d { --spark-x: -45px; --spark-y: 0px; animation-delay: 0.6s; }

.app-loading-copy {
  display: grid;
  gap: 8px;
  text-align: center;
}

.app-loading-copy p {
  margin: 0;
  color: rgba(173, 236, 210, 0.84);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.app-loading-copy h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.app-loading-copy span {
  color: rgba(215, 235, 228, 0.78);
  font-size: 0.95rem;
  line-height: 1.5;
}

@keyframes app-loading-symbol-pulse {
  0%, 100% { transform: scale(0.96); }
  50% { transform: scale(1.04); }
}

@keyframes app-loading-ring {
  0% {
    transform: scale(0.9) rotate(0deg);
    opacity: 0.45;
  }
  50% {
    opacity: 0.95;
  }
  100% {
    transform: scale(1.08) rotate(360deg);
    opacity: 0.45;
  }
}

@keyframes app-loading-spark {
  0%, 100% {
    transform: translate(var(--spark-x, 0), var(--spark-y, 0)) scale(0.7);
    opacity: 0.35;
  }
  50% {
    transform: translate(var(--spark-x, 0), var(--spark-y, 0)) scale(1.25);
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .app-loading-card {
    padding: 30px 24px 28px;
  }

  .app-loading-mark {
    width: 96px;
    height: 96px;
  }

  .app-loading-symbol {
    width: 48px;
    height: 48px;
  }

  #brainDumpView #dumpForm button[type="reset"] {
    display: none;
  }
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 260px;
  gap: 22px;
  height: calc(100vh - 44px - var(--window-controls-overlay-height));
  transition: grid-template-columns 0.25s ease;
}

/* ---- Collapsed sidebar ---- */
.app-shell.sidebar-collapsed {
  grid-template-columns: 68px minmax(0, 1fr) 260px;
}

/* ---- Collapsed right panel ---- */
.app-shell.right-panel-collapsed {
  grid-template-columns: 260px minmax(0, 1fr) 44px;
}

.app-shell.sidebar-collapsed.right-panel-collapsed {
  grid-template-columns: 68px minmax(0, 1fr) 44px;
}

.sidebar {
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  transition: padding 0.25s ease;
  height: 100%;
  max-height: calc(100vh - 44px - var(--window-controls-overlay-height));
  position: sticky;
  top: 0;
  align-self: start;
  box-sizing: border-box;
}

.sidebar-auth-wrap {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  flex-shrink: 0;
}

.sidebar-mountain {
  margin-top: auto;
  margin-left: -20px;
  margin-right: -20px;
  margin-bottom: -20px;
  line-height: 0;
  flex-shrink: 0;
}

.sidebar-mountain-img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
  opacity: 0.3;
}

.sidebar-collapsed .sidebar-mountain {
  display: none;
}

.sidebar-collapsed .sidebar {
  padding: 14px 10px;
  align-items: center;
}

.sidebar-toggle {
  margin-left: auto;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--surface-border);
  background: var(--surface-2);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.sidebar-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.sidebar-auth-button {
  flex-shrink: 0;
  min-width: 52px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.sidebar-auth-button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.sidebar-collapsed .sidebar-auth-button {
  width: 26px;
  padding: 0;
  overflow: hidden;
  font-size: 0;
}

.sidebar-collapsed .sidebar-auth-button::before {
  content: '\21B2';
  font-size: 14px;
}

.sidebar-collapsed .sidebar-auth-wrap {
  right: 10px;
  bottom: 14px;
}

.sidebar-collapsed .sidebar-toggle {
  margin-left: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 6px 14px;
  border-bottom: 1px solid rgba(95, 122, 163, 0.12);
  width: 100%;
  transition: padding 0.25s ease;
}

.sidebar-collapsed .brand {
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 10px;
  justify-content: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: opacity 0.15s, max-width 0.25s;
}

.sidebar-collapsed .brand-text {
  display: none;
}

.sidebar-collapsed .sidebar-toggle {
  font-size: 18px;
}

.sidebar,
.main-panel {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

/* Collapsed nav items — icon only */
.sidebar-collapsed .navigation {
  width: 100%;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 11px 0;
  width: 100%;
}

.sidebar-collapsed .nav-content {
  display: none;
}

.sidebar-collapsed .nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--accent) 0%, #79a7ff 100%);
  box-shadow: 0 14px 28px rgba(77, 116, 255, 0.25);
}

.brand-logo {
  height: 42px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-symbol {
  display: none;
  height: 30px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  animation: ai-symbol-pulse 3s ease-in-out infinite;
}

.sidebar-collapsed .brand-logo {
  display: none;
}

.sidebar-collapsed .brand-symbol {
  display: block;
}

.ai-launcher-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
}

.brand-tag {
  color: var(--muted);
  font-size: 0.82rem;
}

.workspace-switcher {
  position: relative;
  flex: 0 0 auto;
  z-index: 4;
}

.workspace-switcher-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.workspace-switcher-button:hover,
.workspace-switcher-button[aria-expanded='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.workspace-switcher-icon,
.workspace-list-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #102019;
  font-size: 0.92rem;
  font-weight: 800;
}

.workspace-switcher-copy,
.workspace-list-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.workspace-switcher-eyebrow {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-switcher-copy strong,
.workspace-list-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
}

.workspace-switcher-chevron {
  color: var(--muted);
  font-size: 1.1rem;
}

.workspace-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 238px;
  padding: 8px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 36px rgba(5, 12, 24, 0.28);
}

.workspace-switcher-menu[hidden] {
  display: none;
}

.workspace-switcher-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-create-button,
.workspace-rename-button {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
}

.workspace-create-button:hover,
.workspace-rename-button:hover {
  color: var(--text);
}

.workspace-list {
  display: grid;
  gap: 3px;
  max-height: 260px;
  overflow-y: auto;
}

.workspace-list-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.workspace-list-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 auto;
  padding: 7px 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.workspace-list-item:hover {
  background: var(--accent-soft);
}

.workspace-list-icon {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  font-size: 0.76rem;
}

.workspace-list-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-list-check {
  width: 16px;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.workspace-rename-button {
  padding: 7px 4px;
  color: var(--muted);
  font-size: 0.62rem;
}

.workspace-invitations {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--surface-border);
}
.workspace-invitations-heading { color: var(--accent); font-size: .61rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.workspace-invitation-row { display: grid; gap: 7px; padding: 8px; border: 1px solid rgba(138,245,167,.18); border-radius: 8px; background: rgba(138,245,167,.05); }
.workspace-invitation-row p, .workspace-member-row p { min-width: 0; margin: 0; }
.workspace-invitation-row p { display: grid; gap: 2px; }
.workspace-invitation-row strong, .workspace-invitation-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-invitation-row small, .workspace-members-empty { color: var(--muted); font-size: .65rem; }
.workspace-invitation-row > div { display: flex; gap: 5px; }
.workspace-invitation-row button { flex: 1; padding: 5px 6px; border: 1px solid var(--surface-border); border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: .62rem; cursor: pointer; }
.workspace-invitation-row button:first-child { border-color: rgba(138,245,167,.4); color: var(--accent); }

.sidebar-collapsed .workspace-switcher-copy,
.sidebar-collapsed .workspace-switcher-chevron {
  display: none;
}

.sidebar-collapsed .workspace-switcher-button {
  justify-content: center;
  padding: 7px;
}

.sidebar-collapsed .workspace-switcher-icon {
  width: 34px;
  height: 34px;
}

.sidebar-collapsed .workspace-switcher-menu {
  left: calc(100% + 8px);
  right: auto;
  top: 0;
}

.navigation {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1 1 0;
  min-height: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  text-align: left;
  background: transparent;
  color: var(--text);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  background: var(--panel-strong);
  box-shadow: 0 8px 26px rgba(48, 74, 116, 0.09);
  transform: translateY(-1px);
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  display: block;
}

.nav-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-label {
  font-weight: 600;
  line-height: 1.2;
}

.ai-chat-launcher {
  z-index: 70;
}

/* Mobile fade placeholder (moved to dedicated element) */
.main-panel::after {
  content: none;
}

@media (max-width: 720px) {
  .mobile-bottom-fade {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    pointer-events: none;
    background: linear-gradient(to top, rgba(6,10,18,0.5) 0%, rgba(6,10,18,0) 70%);
    z-index: 70;
  }

  .ai-chat-launcher {
    z-index: 90;
  }
}

.state-label {
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 700;
}

.state-metrics {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.state-metrics div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.state-metrics dt,
.state-metrics dd {
  margin: 0;
  font-size: 0.92rem;
}

.state-metrics dt {
  color: var(--muted);
}

.main-panel {
  border-radius: var(--radius-md);
  padding: 28px;
  display: grid;
  gap: 22px;
  align-content: start;
  overflow-y: auto;
  height: 100%;
  max-height: calc(100vh - 44px - var(--window-controls-overlay-height));
  box-sizing: border-box;
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 150px), transparent 100%);
  mask-image: linear-gradient(to bottom, black calc(100% - 150px), transparent 100%);
}

.main-panel.today-layout-active {
  border: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  gap: 24px;
  min-height: 0;
}

@media (min-width: 1181px) {
  /* Let the Right Now card's outer emphasis shadow paint into the panel gutter. */
  .main-panel.today-layout-active {
    position: relative;
    z-index: 1;
    overflow: visible !important;
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* #todayView owns the scrolling at this width, so the bottom fade lives there. */
  .main-panel.today-layout-active #todayView {
    -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 150px), transparent 100%);
    mask-image: linear-gradient(to bottom, black calc(100% - 150px), transparent 100%);
  }
}

/* Philosophy Page Styles */
.philosophy-nav {
  margin: 0 0 28px 0;
  padding: 0;
}
.philosophy-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.philosophy-nav a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  transition: background 0.15s, color 0.15s;
}
.philosophy-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.philosophy-content {
  max-width: 820px;
  margin: 0 auto 44px auto;
  padding: 0 8px 44px 8px;
}
.philosophy-content section {
  margin-bottom: 38px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--surface-border);
}
.philosophy-content h2 {
  font-size: 1.5rem;
  margin-top: 0;
  color: var(--accent-strong);
}
.philosophy-content h3 {
  font-size: 1.1rem;
  margin-top: 18px;
  color: var(--accent);
}
.philosophy-content ul {
  margin: 10px 0 10px 24px;
  padding: 0;
}
.philosophy-content ol {
  margin: 10px 0 10px 24px;
  padding: 0;
}
.philosophy-content li {
  margin-bottom: 6px;
  line-height: 1.6;
}
.philosophy-content pre {
  background: var(--panel-strong);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 14px 0;
}
.philosophy-content code {
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  font-size: 0.875rem;
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 5px;
}
.philosophy-content pre code {
  background: none;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

.main-panel.today-layout-active #todayView {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(320px, 560px);
}

.settings-card {
  display: grid;
  gap: 16px;
}

.settings-copy {
  color: var(--muted);
}

.settings-control-row {
  display: grid;
  gap: 8px;
}

.settings-toggle-stack {
  display: grid;
  gap: 8px;
}

.settings-label {
  font-weight: 600;
}

.settings-select {
  border: 1px solid var(--panel-border);
  border-radius: var(--control-radius);
  background: var(--panel-strong);
  color: var(--text);
  padding: var(--control-padding);
  min-height: var(--control-height);
  font: inherit;
}

.settings-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.settings-divider {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--surface-border);
  margin: 4px 0;
}

.settings-input {
  border: 1px solid var(--panel-border);
  border-radius: var(--control-radius);
  background: var(--panel-strong);
  color: var(--text);
  padding: var(--control-padding);
  min-height: var(--control-height);
  font: inherit;
}

.settings-select:focus,
.settings-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.settings-day-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, max-content));
  gap: 8px 14px;
}

.settings-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.94rem;
}

.settings-inline-check {
  margin-top: 4px;
}

.settings-status {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── AI Facts (Settings > AI Profile) ─────────────────────────── */
.ai-facts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.ai-fact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  font-size: 0.83rem;
}

.ai-fact-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.ai-fact-badge--pinned { background: rgba(138, 245, 167, 0.18); color: var(--accent); }
.ai-fact-badge--core   { background: rgba(77,116,255,0.14); color: #7fa8ff; }
.ai-fact-badge--recent { background: var(--surface-2); color: var(--muted); }

.ai-fact-text {
  flex: 1;
  color: var(--text);
  line-height: 1.4;
}

.ai-fact-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.ai-fact-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
  color: var(--text);
}

.ai-fact-btn:hover { opacity: 1; }
.ai-fact-btn--delete { font-size: 1.1rem; line-height: 1; }

/* ── Reminders (Settings > Reminders) ─────────────────────────── */
.settings-reminders-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.settings-reminder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  font-size: 0.83rem;
}

.settings-inline-selects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-inline-selects .settings-select {
  flex: 1;
  min-width: 0;
}

.settings-reminder-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  background: rgba(77,116,255,0.14);
  color: #7fa8ff;
}

.settings-reminder-text {
  flex: 1;
  color: var(--text);
  line-height: 1.4;
}

.settings-reminder-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.settings-reminder-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
  color: var(--text);
}

.settings-reminder-btn:hover { opacity: 1; }

/* Settings tabbed layout overrides */
.settings-shell {
  margin-top: 4px;
  display: block;
  min-height: 0;
}

.account-billing {
  display: grid;
  gap: 14px;
}

.billing-plans,
.billing-subscription,
.billing-invoices {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  background: var(--surface-2);
}

.billing-plan-toggle {
  display: inline-flex;
  width: fit-content;
  padding: 3px;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  background: var(--surface-1);
}

.billing-plan-option {
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
}

.billing-plan-option.is-selected {
  background: var(--accent);
  color: var(--bg);
}

.billing-plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.billing-plan-card p {
  margin: 5px 0 0;
}

.billing-plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--accent-strong);
  white-space: nowrap;
}

.billing-plan-price strong {
  font-size: 1.7rem;
}

.billing-plan-price span,
.billing-detail-grid span,
.billing-invoice-status {
  color: var(--muted);
  font-size: 0.78rem;
}

.billing-plan-savings {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.billing-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.billing-detail-grid div {
  display: grid;
  gap: 4px;
}

.billing-detail-grid strong {
  color: var(--text);
  text-transform: capitalize;
}

.billing-payment-method {
  margin: 0;
}

.billing-invoices h4 {
  margin: 0;
  font-size: 0.9rem;
}

.billing-invoice-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding-top: 9px;
  border-top: 1px solid var(--surface-border);
  font-size: 0.8rem;
}

.billing-invoice-row a {
  color: var(--accent-strong);
  font-weight: 700;
}

.billing-success { color: var(--success); }
.billing-warning { color: var(--warning); }

@media (max-width: 620px) {
  .billing-plan-card,
  .billing-detail-grid,
  .billing-invoice-row {
    grid-template-columns: 1fr;
  }

  .billing-plan-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
.settings-content {
  max-width: 680px;
}
.settings-panel {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}
.settings-integrations-tab-hidden,
.settings-integrations-panel-hidden {
  display: none !important;
}
.settings-content h2 {
  font-size: 1.35rem;
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--accent-strong);
}
.settings-content h3 {
  font-size: 1.05rem;
  margin: 24px 0 6px;
  color: var(--accent);
}

:root[data-theme='dark'] .state-card,
:root[data-theme='dark'] .today-focus-card,
:root[data-theme='dark'] .today-wins-card,
:root[data-theme='dark'] .today-in-progress-card,
:root[data-theme='dark'] .today-grounding-card,
:root[data-theme='dark'] .today-state-card,
:root[data-theme='dark'] .today-done-card,
:root[data-theme='dark'] .today-recovery-card,
:root[data-theme='dark'] .today-stress-card,
:root[data-theme='dark'] .today-focus-timer-card,
:root[data-theme='dark'] .today-quick-capture-card,
:root[data-theme='dark'] .today-admin-bits-card,
:root[data-theme='dark'] .board-column,
:root[data-theme='dark'] .task-card,
:root[data-theme='dark'] .capture-card,
:root[data-theme='dark'] .dump-board,
:root[data-theme='dark'] .side-card,
:root[data-theme='dark'] .thought-board-column-shell,
:root[data-theme='dark'] .thought-board-intro,
:root[data-theme='dark'] .dump-item,
:root[data-theme='dark'] .details-modal-dialog {
  background: linear-gradient(180deg, rgba(26, 36, 54, 0.95), rgba(18, 27, 42, 0.95));
  border-color: rgba(130, 155, 196, 0.24);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

:root[data-theme='dark'] .chip-button,
:root[data-theme='dark'] .ghost-button,
:root[data-theme='dark'] .task-menu,
:root[data-theme='dark'] .muted-pill,
:root[data-theme='dark'] .today-subtask-form input,
:root[data-theme='dark'] textarea,
:root[data-theme='dark'] input {
  background: rgba(27, 38, 58, 0.9);
  color: var(--text);
  border-color: rgba(130, 155, 196, 0.28);
}

:root[data-theme='dark'] .board-dot.gray { background: #9bb0cd; }

:root[data-theme='dark'] .dump-board {
  background: linear-gradient(180deg, rgba(16, 24, 38, 0.96), rgba(11, 18, 30, 0.96));
}

:root[data-theme='dark'] .dump-item {
  background: linear-gradient(180deg, rgba(24, 34, 52, 0.96) 0%, rgba(16, 24, 38, 0.98) 100%);
}

:root[data-theme='dark'] .dump-item:nth-child(4n + 1) {
  background: linear-gradient(180deg, rgba(30, 42, 62, 0.98) 0%, rgba(16, 24, 38, 0.98) 100%);
}

:root[data-theme='dark'] .dump-item:nth-child(4n + 2) {
  background: linear-gradient(180deg, rgba(22, 36, 56, 0.98) 0%, rgba(16, 24, 38, 0.98) 100%);
}

:root[data-theme='dark'] .dump-item:nth-child(4n + 3) {
  background: linear-gradient(180deg, rgba(28, 33, 58, 0.98) 0%, rgba(16, 24, 38, 0.98) 100%);
}

:root[data-theme='dark'] .dump-item:nth-child(4n + 4) {
  background: linear-gradient(180deg, rgba(20, 40, 48, 0.98) 0%, rgba(16, 24, 38, 0.98) 100%);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.page-header {
  margin-bottom: 18px;
}

.board-header-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.shared-board-workspace-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid var(--surface-border);
}

.shared-board-workspace-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #102019;
  font-size: 0.92rem;
  font-weight: 800;
}

.shared-board-workspace-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.shared-board-workspace-copy strong {
  max-width: 220px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-board-workspace-copy small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.shared-ai-chat-workspace-identity {
  margin-left: 4px;
}

.board-header-title h1 {
  white-space: nowrap;
}

.page-header-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.page-header-title h1 {
  white-space: nowrap;
}

.page-search {
  position: relative;
  display: flex;
  width: min(280px, 100%);
  flex: 0 1 280px;
  align-items: center;
  color: var(--muted);
}

.page-search-icon {
  position: absolute;
  left: 12px;
  z-index: 1;
  font-size: 1.15rem;
  line-height: 1;
  pointer-events: none;
}

.page-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--surface-border);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.page-search input::placeholder {
  color: var(--muted);
}

.page-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 2vw + 1rem, 3rem);
  letter-spacing: -0.04em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lede,
.section-copy,
.tool-helper,
.tips-list,
.after-list,
.dump-time,
.muted-pill {
  color: var(--muted);
}

.lede {
  margin-top: 8px;
  font-size: 0.98rem;
}

.section-kicker,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.empty-state-line {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
  text-align: center;
}

.topbar-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-button,
.secondary-button,
.primary-button,
.chip-button,
.link-button {
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.ghost-button,
.secondary-button,
.chip-button,
.link-button {
  background: var(--surface-1);
  color: var(--text);
  border: 1px solid var(--surface-border);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
  box-shadow: 0 14px 28px rgba(77, 116, 255, 0.25);
}

.ghost-button:hover,
.secondary-button:hover,
.primary-button:hover,
.chip-button:hover,
.link-button:hover {
  transform: translateY(-1px);
}

#quickCaptureHelpButton {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1;
}

.hero-grid,
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.brain-dump-stack {
  display: grid;
  gap: 20px;
}

.brain-dump-capture-section {
  margin-bottom: 18px;
}

.capture-card,
.dump-board,
.side-card {
  border-radius: var(--card-radius);
  background: var(--panel-strong);
  border: 1px solid rgba(95, 122, 163, 0.12);
  box-shadow: 0 10px 30px rgba(55, 77, 120, 0.06);
}

.capture-card,
.dump-board,
.side-card {
  padding: var(--card-padding);
}

#brainDumpView .capture-card,
#brainDumpView .dump-board {
  background: transparent;
  border: none;
  box-shadow: none;
}

#thoughtBoardView .thought-board-intro,
#thoughtBoardView .thought-board-column {
  background: transparent;
  border: none;
  box-shadow: none;
}

#brainDumpView .dump-item,
#thoughtBoardView .thought-board-list .dump-item,
#brainDumpView .dump-item:nth-child(4n + 1),
#brainDumpView .dump-item:nth-child(4n + 2),
#brainDumpView .dump-item:nth-child(4n + 3),
#brainDumpView .dump-item:nth-child(4n + 4),
#thoughtBoardView .thought-board-list .dump-item:nth-child(4n + 1),
#thoughtBoardView .thought-board-list .dump-item:nth-child(4n + 2),
#thoughtBoardView .thought-board-list .dump-item:nth-child(4n + 3),
#thoughtBoardView .thought-board-list .dump-item:nth-child(4n + 4) {
  background: linear-gradient(145deg, #173238 0%, #13282E 50%, #102329 100%);
  border: 1px solid #1C3940;
  border-radius: 16px;
  --card-corner-line: rgba(28, 57, 64, 0.5);
  transition: background 180ms ease;
}

#brainDumpView .dump-item:hover,
#thoughtBoardView .thought-board-list .dump-item:hover {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025)),
    linear-gradient(145deg, #173238 0%, #13282E 50%, #102329 100%);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.section-heading.compact {
  align-items: start;
}

.section-heading h2 {
  margin-top: 6px;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.dump-form {
  display: grid;
  gap: 16px;
}

.dump-input-wrap {
  position: relative;
}

textarea {
  width: 100%;
  min-height: 270px;
  resize: vertical;
  border-radius: 22px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, var(--surface-elevated) 0%, var(--surface-2) 100%);
  padding: 18px;
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#dumpInput {
  min-height: 160px;
  background: #0A1528;
  padding-bottom: 76px;
}

.dump-form-actions {
  position: absolute;
  right: 14px;
  bottom: 14px;
  justify-content: flex-end;
  z-index: 1;
}

#brainDumpView .dump-form-actions .primary-button,
#brainDumpView .dump-form-actions .primary-button:hover {
  box-shadow: none;
}

textarea:focus {
  border-color: rgba(77, 116, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(77, 116, 255, 0.12);
}

textarea::placeholder {
  color: #99a4b7;
}

.form-spacer {
  flex: 1 1 auto;
}

.tools-column,
.assistant-column {
  display: grid;
  gap: 20px;
}

.tool-list,
.dump-list,
.suggestions-list {
  display: grid;
  gap: 12px;
}

.tool-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-3));
  border: 1px solid var(--surface-border);
}

.tool-icon {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
}

.tips-list,
.after-list {
  padding-left: 20px;
  margin: 0;
  display: grid;
  gap: 12px;
}

.dump-list {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.dump-item {
  position: relative;
  padding: 16px;
  min-height: 138px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-elevated) 100%);
  border: 1px solid var(--surface-border);
  box-shadow: 0 10px 24px rgba(53, 73, 115, 0.05);
}

/* Shared card corner treatment. The button owns the only visible circle. */
.dump-item::after,
.task-card::after,
.wb-task-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: 46px;
  height: 46px;
  background: linear-gradient(
    45deg,
    transparent 48.5%,
    var(--card-corner-line, var(--surface-border)) 49.25%,
    var(--card-corner-line, var(--surface-border)) 50.75%,
    transparent 51.5%
  );
  pointer-events: none;
}

.wb-task-card {
  --card-corner-line: var(--wb-card-border);
}

.dump-item:nth-child(4n + 1) {
  background: linear-gradient(180deg, rgba(255, 249, 229, 0.92) 0%, var(--surface-elevated) 100%);
}

.dump-item:nth-child(4n + 2) {
  background: linear-gradient(180deg, rgba(240, 247, 255, 0.92) 0%, var(--surface-elevated) 100%);
}

.dump-item:nth-child(4n + 3) {
  background: linear-gradient(180deg, rgba(244, 242, 255, 0.92) 0%, var(--surface-elevated) 100%);
}

.dump-item:nth-child(4n + 4) {
  background: linear-gradient(180deg, rgba(240, 255, 247, 0.92) 0%, var(--surface-elevated) 100%);
}

.card-corner-menu {
  position: absolute;
  top: 0;
  right: 0;
  width: 52px;
  height: 52px;
  padding: 0;
  font-size: 0;
  background: radial-gradient(
    circle at calc(100% - 14px) 14px,
    transparent 0 3px,
    #3b6646 3px 5px,
    transparent 5.5px
  );
  border: 0;
  border-radius: 0;
  z-index: 2;
  cursor: pointer;
  appearance: none;
}

.card-corner-menu:focus-visible,
.details-subtask-menu-button:focus-visible {
  outline: 2px solid rgba(138, 245, 167, 0.72);
  outline-offset: 2px;
}

.dump-item .card-corner-menu {
  background: radial-gradient(
    circle at calc(100% - 14px) 14px,
    transparent 0 3px,
    rgba(59, 102, 70, 0.5) 3px 5px,
    transparent 5.5px
  );
}

.dump-text {
  font-weight: 600;
  line-height: 1.45;
  padding-right: 42px;
  white-space: pre-wrap;
}

.dump-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  align-items: center;
}

.dump-category {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2a61b6;
  background: rgba(77, 116, 255, 0.12);
}

.dump-card-menu-wrap {
  position: absolute;
  top: 48px;
  right: 12px;
  z-index: 10;
}

.dump-card-menu,
.dump-card-submenu {
  display: grid;
  gap: 6px;
  min-width: 170px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: var(--surface-elevated);
  box-shadow: 0 14px 28px rgba(28, 40, 64, 0.14);
}

.dump-card-menu[hidden],
.dump-card-submenu[hidden] {
  display: none;
}

.dump-card-submenu {
  margin: 4px 0;
  padding: 6px;
  background: var(--surface-2);
}

.dump-card-menu-item {
  width: 100%;
  text-align: left;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 8px 10px;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
}

.dump-card-menu-item:hover {
  background: var(--surface-2);
}

.dump-card-menu-item.danger {
  color: var(--danger);
}

/* ── Brain Dump card editor popup ─────────────────────────────────────────
   Opens when a Brain Dump card is clicked. The dialog reuses .dump-item so
   it renders as a larger version of the card, with editable text inside. */

#brainDumpView .dump-item {
  cursor: pointer;
}

.dump-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.dump-edit-modal.hidden {
  display: none;
}

.dump-edit-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(77, 116, 255, 0.18), rgba(77, 116, 255, 0) 34%),
    radial-gradient(circle at 82% 80%, rgba(39, 176, 125, 0.16), rgba(39, 176, 125, 0) 38%),
    rgba(15, 22, 40, 0.56);
  backdrop-filter: blur(8px);
}

.dump-edit-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 24px;
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 240px;
  box-shadow: 0 26px 60px rgba(19, 32, 51, 0.28);
  animation: dump-edit-modal-in 200ms var(--dump-calm-ease, ease-out);
}

.dump-edit-modal-dialog h2 {
  margin: 0;
  font-size: 1.25rem;
}

.dump-edit-modal-input {
  width: 100%;
  min-height: 190px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  line-height: 1.45;
  resize: vertical;
  white-space: pre-wrap;
}

.dump-edit-modal-input:focus-visible {
  outline: 2px solid rgba(77, 116, 255, 0.5);
  outline-offset: 1px;
}

@keyframes dump-edit-modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .dump-edit-modal-dialog {
    animation: none;
  }
}

.drop-zone {
  margin-top: 18px;
  border-radius: 22px;
  border: 1.5px dashed rgba(77, 116, 255, 0.3);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-elevated));
  min-height: 148px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  color: var(--muted);
}

.drop-zone-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 1.4rem;
  font-weight: 600;
}

.suggestions-card {
  position: sticky;
  top: 22px;
}

.suggestion-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-3));
  border: 1px solid var(--surface-border);
}

.suggestion-count {
  font-weight: 700;
  color: var(--accent-strong);
}

.full-width {
  width: 100%;
}

.after-dump-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface-elevated));
}

/* ── Brain Dump entrance: release → drift → settle ───────────────────────
   A new card condenses out of a wisp of mist: fog clears (blur → 0),
   the card settles into place (translateY/scale), then its pastel tint
   blooms in last while a soft clarity-green halo breathes once and fades. */

:root {
  --dump-calm-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dump-halo-color: 138, 245, 167;
}

.dump-item-await {
  opacity: 0;
  pointer-events: none;
}

.dump-item-settling {
  animation: dump-settle-in 950ms var(--dump-calm-ease) both;
}

@keyframes dump-settle-in {
  0% {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
    filter: blur(8px);
  }
  40% {
    opacity: 1;
  }
  60% {
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.dump-item-veil {
  position: absolute;
  inset: 1px;
  z-index: 2;
  border-radius: 19px;
  background: var(--surface-elevated);
  opacity: 0.94;
  pointer-events: none;
  animation: dump-veil-clear 950ms var(--dump-calm-ease) both;
}

@keyframes dump-veil-clear {
  0%, 45% {
    opacity: 0.94;
  }
  78%, 100% {
    opacity: 0;
  }
}

.dump-item-halo {
  position: absolute;
  inset: -3px;
  z-index: 3;
  border-radius: 23px;
  box-shadow:
    0 0 0 1px rgba(var(--dump-halo-color), 0.5),
    0 0 30px 8px rgba(var(--dump-halo-color), 0.28);
  opacity: 0;
  pointer-events: none;
  animation: dump-halo-bloom 950ms var(--dump-calm-ease) both;
}

@keyframes dump-halo-bloom {
  0%, 38% {
    opacity: 0;
  }
  62% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
  }
}

.dump-release-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.dump-release-dust {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(102, 128, 170, 0.75));
  opacity: 0;
  animation: dump-release-rise var(--duration, 900ms) var(--dump-calm-ease) var(--delay, 0ms) forwards;
}

@keyframes dump-release-rise {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
    filter: blur(0.5px);
  }
  18% {
    opacity: var(--peak-opacity, 0.9);
  }
  100% {
    opacity: 0;
    transform: translate(var(--drift-x, 0px), var(--rise-y, -70px)) scale(1.15);
    filter: blur(2px);
  }
}

.dump-wisp {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 35%,
    rgba(255, 255, 255, 0.98),
    rgba(var(--dump-halo-color), 0.55) 55%,
    rgba(var(--dump-halo-color), 0) 75%
  );
  filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .dump-item-settling {
    animation: dump-settle-fade 200ms ease both;
  }

  .dump-item-veil,
  .dump-item-halo,
  .dump-release-layer,
  .dump-wisp {
    display: none !important;
  }
}

@keyframes dump-settle-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.note-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  color: #324159;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
}

.link-button {
  padding-inline: 0;
  background: transparent;
  color: var(--accent-strong);
  border: 0;
}

.muted-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(77, 116, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
}

.view.hidden {
  display: none;
}

.board-topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.board-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.board-filter-bar {
  --filter-pill-bg: var(--surface-1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: -8px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: var(--surface-2);
}

.board-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.board-filter-active {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--surface-border);
}

.board-filter-active[hidden] {
  display: none;
}

.board-filter-active-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.board-filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.board-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px 5px 10px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.board-filter-chip-remove {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.board-filter-chip-remove:hover,
.board-filter-chip-remove:focus-visible {
  background: var(--accent-soft);
  color: var(--danger);
  outline: none;
}

.board-filter-clear-all {
  margin-left: auto;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--success);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.board-filter-clear-all:hover,
.board-filter-clear-all:focus-visible {
  color: var(--accent-strong);
  outline: none;
}

.board-filter-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.board-filter-dropdown {
  position: relative;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
}

.board-filter-dropdown summary {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: var(--filter-pill-bg);
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 140ms ease;
}

.board-filter-dropdown summary:hover {
  border-color: var(--accent);
}

.board-filter-dropdown summary::-webkit-details-marker {
  display: none;
}

.board-filter-dropdown summary::after {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: '';
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease;
}

.board-filter-dropdown[open] summary {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.board-filter-dropdown[open] summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.board-filter-options {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 100%;
  max-height: 260px;
  gap: 3px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background: var(--surface-elevated);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.board-filter-options label {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 9px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.board-filter-options label:hover {
  background: var(--accent-soft);
}

.board-filter-options input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent-strong);
}

.board-filter-dropdown summary:focus-visible,
.board-filter-options input:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.board-task-type-filter {
  min-height: 36px;
  padding: 7px 28px 7px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: var(--filter-pill-bg, var(--surface-1));
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
}

.board-layout-section {
  display: grid;
  gap: 5px;
  justify-items: center;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 6px;
}

.board-layout-section-title {
  display: block;
}

.board-layout-controls {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--surface-border);
  border-radius: 11px;
  background: var(--surface-2);
}

.board-layout-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.board-layout-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.board-layout-button:hover,
.board-layout-button:focus-visible,
.board-layout-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline: none;
}

.board-filter-empty {
  padding: 18px 10px;
  border: 1px dashed var(--surface-border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.board-date-stack {
  display: grid;
  gap: 2px;
  text-align: right;
  color: var(--muted);
  font-size: 0.82rem;
}

.board-date-stack strong {
  color: var(--text);
  font-size: 0.9rem;
}

.board-time {
  font-size: clamp(2.1rem, 3vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

/* Focus Board Sidebar Layout */
.board-layout-with-sidebar {
  display: flex !important;
  gap: 0;
  height: 100%;
  position: relative;
  overflow: visible;
  margin-top: 10px;
  margin-left: -20px; /* Offset the main panel padding */
  padding-left: 28px;
}

.board-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: rgba(10, 15, 25, 0.4);
  border-right: 1px solid var(--surface-border);
  position: relative;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.board-sidebar.collapsed {
  width: 0;
  border-right: none;
  margin-left: -16px; /* Offset to hug the main sidebar edge more closely */
}

.sidebar-content {
  width: 300px;
  padding: 16px;
  overflow-y: auto;
  height: 100%;
  opacity: 1;
  transition: opacity 0.2s;
}

.board-sidebar.collapsed .sidebar-content {
  opacity: 0;
  pointer-events: none;
}

/* Darker theme for Brain Dump Sidebar items */
.board-sidebar .board-column {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(95, 122, 163, 0.2) !important;
  box-shadow: none;
  min-height: auto;
  height: 100%;
}

:root[data-theme='dark'] .board-sidebar .board-column {
  background: rgba(8, 12, 21, 0.8) !important;
}

.sidebar-tab-toggle {
  position: absolute;
  right: 0;
  top: 140px;
  transform: translateY(-50%);
  background: var(--accent-strong);
  color: white;
  border: none;
  padding: 12px 6px;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 11;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, right 0.3s, left 0.3s, border-radius 0.3s, transform 0.3s;
}

#brainDumpSidebarToggle {
  background: var(--surface-1);
}

.board-sidebar.collapsed .sidebar-tab-toggle {
  right: auto;
  left: -22px; /* Pull it into the gap between main panel and sidebar */
  border-radius: 0 8px 8px 0;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-50%);
}

.sidebar-tab-toggle:hover {
  background: var(--accent-strong);
}

#brainDumpSidebarToggle:hover {
  background: var(--surface-1);
}

.sidebar-tab-toggle .toggle-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-tab-toggle .toggle-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.board-sidebar.collapsed .toggle-icon {
  transform: scaleX(-1);
}

.board-columns-shell {
  flex: 1;
  min-width: 0;
  padding: 16px;
  overflow-y: auto;
  display: grid;
  gap: 18px;
}

/* Restricted move feedback */
.board-column.drop-blocked {
  background: rgba(220, 38, 38, 0.1) !important;
  border: 2px dashed #dc2626 !important;
  position: relative;
}

.board-column.drop-blocked::after {
  content: 'Restricted Move';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #dc2626;
  font-weight: 700;
  font-size: 1.1rem;
  background: rgba(220, 38, 38, 0.05);
  pointer-events: none;
  z-index: 5;
}

.board-right-rail,
.board-columns-shell {
  display: grid;
  gap: 18px;
}

.board-columns-shell {
  position: relative;
}

.board-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
}

.board-column {
  min-height: 390px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  box-shadow: 0 10px 24px rgba(55, 77, 120, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-content: start;
  justify-content: flex-start;
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.board-grid-focused .board-right-rail {
  opacity: 0.18;
  filter: blur(0.6px) saturate(0.7);
  pointer-events: none;
}

.board-columns-focused .board-column {
  opacity: 0.26;
  filter: blur(0.3px) saturate(0.7);
  transform: scale(0.985);
}

.board-columns-focused .board-column-focused {
  opacity: 1;
  filter: none;
  transform: scale(1.02);
  box-shadow: 0 24px 56px rgba(8, 14, 28, 0.34);
  z-index: 7;
}

.board-grid-focused .board-columns-shell::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 28px;
  background: rgba(6, 10, 18, 0.18);
  pointer-events: none;
}

.board-grid-focused .board-columns-focused {
  position: relative;
}

.board-column-head,
.done-row,
.recovery-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.board-column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

#boardView .board-column {
  background: linear-gradient(180deg, rgba(20, 40, 45, 0.96) 0%, rgba(20, 40, 45, 0.58) 90px, rgba(20, 40, 45, 0) 220px) !important;
  border: none;
  box-shadow: none;
}

#boardView .board-column-footer {
  display: none;
}

.board-column-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.board-column-add-button {
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.board-column-add-button:hover {
  border-color: var(--accent-strong);
  background: rgba(77, 116, 255, 0.16);
}

.board-column-add-button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.board-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #8c99ad;
}

.board-dot.green { background: #36b37e; }
.board-dot.blue { background: #4d74ff; }
.board-dot.orange { background: #f2a23a; }
.board-dot.gray { background: #95a1b8; }
.board-dot.purple { background: #8a6cff; }

.board-count,
.small-count {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.task-list {
  display: grid;
  gap: 12px;
  flex: 1 1 auto;
  align-content: start;
}

.board-task-list-compact {
  grid-auto-rows: 78px;
}

.board-task-list-compact .task-card {
  height: 78px;
  max-height: 78px;
  overflow: hidden;
}

.board-task-list-compact .task-card.task-card-menu-open,
.board-task-list-grid .task-card.task-card-menu-open {
  overflow: visible;
}

.board-task-list-compact .task-title-button,
.board-task-list-two-up .task-title-button,
.board-task-list-grid .task-title-button {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
}

.board-task-list-compact .task-title-button {
  -webkit-line-clamp: 2;
}

.board-task-list-two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.board-task-list-two-up .task-title-button {
  -webkit-line-clamp: 3;
}

.board-task-list-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.board-task-list-grid .task-card {
  box-sizing: border-box;
  aspect-ratio: 1;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.board-task-list-grid .task-title-button {
  -webkit-line-clamp: 4;
}

.board-task-list .task-card-header {
  min-width: 0;
}

.board-task-list .task-title-button {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .board-layout-section {
    justify-self: end;
  }

  .board-task-list-two-up {
    grid-template-columns: 1fr;
  }

  .board-task-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.board-wins-selection-prompt {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(77, 116, 255, 0.24);
  background: linear-gradient(180deg, rgba(77, 116, 255, 0.1), rgba(77, 116, 255, 0.06));
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.86rem;
}

/* Larger top-bar prompt for Today Wins flow (appears to right of page title) */
.board-wins-top-prompt {
  margin-left: auto;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 1rem;
  align-self: center;
}

@media (max-width: 900px) {
  .board-wins-top-prompt { display: none; }
}

.board-wins-selection-prompt.hidden {
  display: none;
}

.task-card {
  position: relative;
  max-height: 176px;
  overflow: visible;
  cursor: grab;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  box-shadow: 0 8px 18px rgba(53, 73, 115, 0.05);
}

.task-card.task-card-menu-open {
  z-index: 40;
}

.task-card.task-card-win-selectable {
  cursor: pointer;
}

.task-card.task-card-win-selected {
  border-color: rgba(244, 188, 78, 0.55);
  background: linear-gradient(180deg, #14282d 0%, #14282d 100%);
  box-shadow: none;
}

#boardView .board-columns .task-card:not(.task-card-win-selected):not(.task-card-right-now) {
  background: linear-gradient(145deg, #173238 0%, #13282E 50%, #102329 100%);
  border: 1px solid #1C3940;
  border-radius: 16px;
  --card-corner-line: rgba(28, 57, 64, 0.5);
  transition: background 180ms ease;
}

#boardView .board-columns .task-card:not(.task-card-win-selected):not(.task-card-right-now):hover {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025)),
    linear-gradient(145deg, #173238 0%, #13282E 50%, #102329 100%);
}

/* Brain Dump cards inside the Focus Board sidebar */
#brainDumpSidebar .task-card {
  background: linear-gradient(145deg, #173238 0%, #13282E 50%, #102329 100%);
  border: 1px solid #1C3940;
  border-radius: 16px;
  --card-corner-line: rgba(28, 57, 64, 0.5);
  transition: background 180ms ease;
}

#brainDumpSidebar .task-card:hover {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025)),
    linear-gradient(145deg, #173238 0%, #13282E 50%, #102329 100%);
}

#boardView .task-card .card-corner-menu {
  background: radial-gradient(
    circle at calc(100% - 14px) 14px,
    transparent 0 3px,
    rgba(59, 102, 70, 0.5) 3px 5px,
    transparent 5.5px
  );
}

.board-columns.board-columns-fog-mode .task-card.task-card-fog-dim {
  opacity: 0.22;
  filter: grayscale(0.95) saturate(0.22);
  box-shadow: none;
  pointer-events: none;
}

.board-columns.board-columns-fog-mode .task-card.task-card-win-selected {
  opacity: 1;
  filter: none;
}

:root[data-theme='dark'] .board-wins-selection-prompt {
  border-color: rgba(244, 188, 78, 0.44);
  background: linear-gradient(180deg, rgba(244, 188, 78, 0.18), rgba(244, 188, 78, 0.08));
  color: #ffd685;
}

:root[data-theme='dark'] .task-card.task-card-win-selected {
  border-color: rgba(255, 211, 112, 0.72);
  background: linear-gradient(180deg, rgba(26, 36, 54, 0.95), rgba(18, 27, 42, 0.95));
  box-shadow: none;
}

:root[data-theme='dark'] .board-columns.board-columns-fog-mode .task-card.task-card-fog-dim {
  opacity: 0.18;
  filter: grayscale(1) saturate(0.12) brightness(0.76);
}

.task-card-right-now {
  background: var(--surface-elevated);
  border-color: rgba(77, 116, 255, 0.28);
  box-shadow: 0 12px 28px rgba(77, 116, 255, 0.12);
}

.task-right-now-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.task-right-now-star {
  font-size: 0.86rem;
  color: #f4bc4e;
}

.task-card.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.task-title-button {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  text-align: left;
  font-size: 0.96rem;
  line-height: 1.4;
  font-weight: 700;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 0;
  cursor: pointer;
}

.task-title-button:hover {
  color: var(--accent-strong);
}

.task-title-button:focus-visible {
  outline: 2px solid rgba(77, 116, 255, 0.45);
  outline-offset: 2px;
  border-radius: 8px;
}

.task-menu-wrap {
  position: relative;
  flex: 0 0 auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 42%;
}

.task-project-label {
  display: block;
  position: absolute;
  right: 14px;
  bottom: 10px;
  max-width: calc(100% - 28px);
  overflow: hidden;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-tags-label {
  margin-top: 2px;
}

.task-card > .task-menu {
  top: 52px;
}

.task-menu {
  position: absolute;
  right: 0;
  top: 34px;
  z-index: 25;
  min-width: 160px;
  padding: 8px;
  border-radius: 16px;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  box-shadow: 0 18px 34px rgba(58, 78, 116, 0.16);
  display: grid;
  gap: 6px;
}

.task-menu[hidden] {
  display: none !important;
}

.task-menu-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px 2px;
}

.task-menu-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
}

.task-menu-item:hover {
  background: rgba(77, 116, 255, 0.08);
}

.task-menu-item.danger {
  color: var(--danger);
}

.board-column.drop-target {
  opacity: 1 !important;
  filter: none !important;
  transform: none;
  outline: none;
  border-color: rgba(77, 116, 255, 0.46);
}

:root[data-theme='dark'] .board-column.drop-target {
  border-color: rgba(156, 186, 255, 0.64);
}

.task-card strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.4;
}

.task-card small,
.task-card .task-meta {
  display: block;
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.8rem;
}

.task-focus-summary {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.task-tag {
  display: none;
}

.task-card .task-meta {
  display: none;
}

.task-card::-webkit-scrollbar {
  width: 8px;
}

.task-card::-webkit-scrollbar-thumb {
  background: rgba(95, 122, 163, 0.24);
  border-radius: 999px;
}

.progress-track {
  margin-top: 12px;
  height: 6px;
  border-radius: 999px;
  background: rgba(77, 116, 255, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%);
}

.board-column-footer,
.view-more-link {
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 0.86rem;
}

.board-column-footer {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.board-sidebar .side-card,
.board-right-rail .side-card,
.panic-card {
  border-radius: var(--radius-md);
}

.today-grid,
.today-supplement-grid {
  display: grid;
  gap: 18px;
}

.today-dashboard {
  display: grid;
  gap: 24px;
}

.today-feature-grid,
.today-duo-grid,
.today-utility-grid {
  display: grid;
  gap: 20px;
}

.today-feature-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.today-duo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.today-utility-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shared-today-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.shared-today-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 255, 0.96));
  border-color: rgba(92, 104, 160, 0.18);
}

:root[data-theme='ce'] .shared-today-panel {
  background: linear-gradient(145deg, #102329 0%, #0A1528 100%);
  border-color: rgba(138, 245, 167, 0.12);
  box-shadow: none;
}

:root[data-theme='ce'] .shared-today-panel .section-kicker {
  color: rgba(138, 245, 167, 0.72);
}

:root[data-theme='ce'] .shared-today-panel .muted-pill {
  background: rgba(138, 245, 167, 0.10);
  border-color: rgba(138, 245, 167, 0.16);
  color: #8AF5A7;
}

:root[data-theme='dark'] .shared-today-panel {
  background: linear-gradient(180deg, rgba(26, 36, 54, 0.95), rgba(18, 27, 42, 0.95));
  border-color: rgba(130, 155, 196, 0.24);
}

.shared-today-panel .section-heading {
  min-width: 0;
}

.shared-today-panel .section-heading h2 {
  overflow-wrap: anywhere;
}

.shared-today-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.shared-today-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.shared-today-task {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.shared-today-task:hover,
.shared-today-task:focus-visible {
  border-color: rgba(77, 116, 255, 0.42);
  background: rgba(239, 244, 255, 0.96);
}

.shared-today-task:focus-visible {
  outline: 2px solid rgba(77, 116, 255, 0.5);
  outline-offset: 2px;
}

:root[data-theme='dark'] .shared-today-task:hover,
:root[data-theme='dark'] .shared-today-task:focus-visible {
  background: rgba(42, 55, 79, 0.96);
}

:root[data-theme='ce'] .shared-today-task {
  background: #0A1528;
  border-color: rgba(138, 245, 167, 0.10);
}

:root[data-theme='ce'] .shared-today-task:hover,
:root[data-theme='ce'] .shared-today-task:focus-visible {
  background: #162543;
  border-color: rgba(138, 245, 167, 0.28);
}

.shared-today-task:hover {
  transform: translateY(-1px);
}

.shared-today-task strong {
  overflow: hidden;
  font-size: 0.88rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-today-task span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-today-workload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  align-items: center;
  min-width: 0;
}

.shared-today-workload-row strong {
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-today-workload-row > span:not(.shared-today-workload-bar) {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.shared-today-workload-bar {
  grid-column: 1 / -1;
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-border);
}

.shared-today-workload-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4d74ff, #55b8a0);
  transition: width 220ms ease;
}

:root[data-theme='ce'] .shared-today-workload-bar {
  background: rgba(138, 245, 167, 0.10);
}

:root[data-theme='ce'] .shared-today-workload-bar span {
  background: #8AF5A7;
}

.today-topbar {
  align-items: stretch;
}

.today-card-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.today-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.today-card-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.today-card-icon-blue {
  background: rgba(77, 116, 255, 0.12);
  color: #2f5cf0;
}

.today-card-icon-gold {
  background: rgba(242, 162, 58, 0.14);
  color: #cc8a13;
}

.today-card-icon-green {
  background: rgba(39, 176, 125, 0.14);
  color: #1f9a69;
}

.today-card-icon-violet {
  background: rgba(138, 108, 255, 0.14);
  color: #7452eb;
}

.today-card-icon-rose {
  background: rgba(229, 111, 115, 0.14);
  color: #d25761;
}

.today-card-icon-amber {
  background: rgba(241, 169, 75, 0.14);
  color: #cf8e23;
}

.today-card-icon-slate {
  background: rgba(95, 122, 163, 0.12);
  color: #4a628c;
}

.today-status-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  gap: 8px;
  justify-content: end;
}

.today-context-msg {
  margin-top: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  max-width: 520px;
  text-align: left;
}

.today-context-msg:empty {
  display: none;
}

.shared-workspace-topbar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.shared-workspace-topbar strong {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.25;
}

.shared-workspace-topbar span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.today-context-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.today-context-actions.hidden {
  display: none;
}

.today-ask-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 5px 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.today-ask-ai-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.today-ask-ai-symbol {
  height: 13px;
  width: auto;
  opacity: 0.7;
}

.today-topbar {
  display: grid;
  gap: 20px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, var(--surface-elevated), var(--surface-2));
  margin-bottom: 24px;
}

/* ---- Today page: topbar + secondary cards use sidebar/panel colour ---- */
.today-topbar,
.today-grounding-card,
.today-quick-capture-card,
.today-admin-bits-card {
  background: var(--panel) !important;
  border: none !important;
  box-shadow: none !important;
}

.today-topbar.shared-workspace-topbar-active {
  background: linear-gradient(115deg, var(--panel) 0%, rgba(178, 103, 255, .9) 100%) !important;
}

.brand-symbol-mobile {
  height: 34px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* Mobile layout for Today header: logo, generated text, then status pills (3 per row) */
@media (max-width: 720px) {
  .mobile-brand {
    display: flex !important;
    align-items: flex-start;
    margin-bottom: 0;
  }

  .today-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .today-topbar-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  .today-topbar-side {
    grid-column: 1 / -1;
    order: initial;
  }

  .today-topbar-left {
    order: initial;
    width: auto;
    margin-bottom: 0;
  }

  .today-status-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .status-pill {
    justify-content: center;
  }
}

/* Page background behind the cards is the app background */
#todayView {
  background: var(--bg);
}

#todayView .today-dashboard {
  background: transparent;
}

.today-topbar-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.today-topbar-left {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.today-topbar-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  margin-left: 0;
  justify-self: end;
  align-items: flex-end;
}

.status-pill {
  min-width: 0;
  min-height: 0;
  padding: 5px 8px 6px;
  border-radius: 8px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-pill span {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--muted);
}

.status-meter {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-border);
  overflow: hidden;
}

.status-meter-fill {
  height: 100%;
  border-radius: 2px;
  width: 50%;
  transition: width 0.4s ease, background 0.4s ease;
}

@media (max-width: 900px) {
  .today-topbar-main {
    justify-content: stretch;
  }

  .today-topbar-left {
    width: 100%;
    align-items: flex-start;
    margin-bottom: 8px;
  }

  .today-topbar-side {
    width: 100%;
    align-items: stretch;
  }

  .today-status-row {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    justify-content: stretch;
  }

  .today-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.today-focus-card,
.today-wins-card,
.today-grounding-card,
.today-in-progress-card,
.today-state-card,
.today-panic-card,
.today-done-card,
.today-recovery-card,
.today-stress-card,
.today-focus-timer-card,
.today-quick-capture-card,
.today-admin-bits-card {
  height: 100%;
}

.today-focus-card {
  display: grid;
  gap: 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(238, 244, 255, 0.96) 0%, rgba(247, 251, 255, 0.98) 68%, rgba(241, 248, 255, 0.98) 100%);
  border-color: rgba(77, 116, 255, 0.24);
  box-shadow: 0 12px 30px rgba(55, 77, 120, 0.08), inset 0 0 0 1px rgba(77, 116, 255, 0.08);
}

.today-focus-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(77, 116, 255, 0.06) 0%, rgba(77, 116, 255, 0.025) 40%, rgba(39, 176, 125, 0.03) 100%);
  pointer-events: none;
}

.today-focus-card > * {
  position: relative;
  z-index: 1;
}

.today-focus-card::after {
  content: '';
  position: absolute;
  top: -32px;
  right: -18px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(130, 165, 255, 0.28) 0%, rgba(130, 165, 255, 0) 70%);
  pointer-events: none;
}

.today-focus-card .muted-pill {
  background: rgba(77, 116, 255, 0.14);
  border: 1px solid rgba(77, 116, 255, 0.2);
  color: #355ee8;
}

:root[data-theme='dark'] .today-focus-card {
  background: linear-gradient(160deg, rgba(30, 44, 72, 0.95) 0%, rgba(23, 35, 56, 0.96) 100%);
  border-color: rgba(126, 164, 255, 0.38);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(126, 164, 255, 0.14);
}

:root[data-theme='dark'] .today-focus-card::before {
  background: linear-gradient(150deg, rgba(126, 164, 255, 0.16) 0%, rgba(126, 164, 255, 0.04) 46%, rgba(39, 176, 125, 0.08) 100%);
}

:root[data-theme='dark'] .today-focus-card .muted-pill {
  background: rgba(126, 164, 255, 0.2);
  border-color: rgba(126, 164, 255, 0.28);
  color: #d8e5ff;
}

.today-focus-body {
  display: grid;
  gap: 18px;
}

.today-focus-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.today-focus-music-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.today-focus-music-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.today-focus-music-select {
  min-width: min(100%, 320px);
  flex: 1 1 240px;
}

.today-focus-title-button {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  text-align: left;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  cursor: pointer;
}

.today-focus-title-button:disabled {
  cursor: default;
  opacity: 0.88;
}

.today-focus-title-button:not(:disabled):hover {
  color: var(--accent-strong);
}

.today-focus-title-button-empty {
  font-size: 2.2rem;
  line-height: 1.15;
  color: var(--accent-strong);
}

.today-focus-title-button-empty:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.today-focus-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Icon-only rounded square buttons used on Right Now card and subtasks */
.icon-square-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(77, 116, 255, 0.2);
  background: rgba(77, 116, 255, 0.16);
  color: #2f59d1;
  font-weight: 700;
  cursor: pointer;
}

.icon-square-button .icon,
.icon-square-button .timer-icon {
  font-size: 1rem;
  line-height: 1;
}

.icon-square-button .icon svg,
.icon-square-button .timer-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-square-button:hover:not(:disabled) {
  background: rgba(77, 116, 255, 0.22);
  transform: translateY(-1px);
}

.icon-square-button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Accent variant used for Right Now actions (green) */
.icon-square-button.accent-right-now,
.icon-square-button.right-now-complete-button {
  /* match the circled button: solid green tint with light white border and white icon */
  background: rgba(39, 176, 125, 0.22);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(39, 176, 125, 0.06), inset 0 0 0 1px rgba(255,255,255,0.02);
}

.icon-square-button.accent-right-now:hover:not(:disabled),
.icon-square-button.right-now-complete-button:hover:not(:disabled) {
  background: rgba(39, 176, 125, 0.28);
  transform: translateY(-1px);
}

.icon-square-button.accent-right-now:focus-visible,
.icon-square-button.right-now-complete-button:focus-visible {
  outline: 2px solid rgba(255,255,255,0.16);
  outline-offset: 3px;
}

:root[data-theme='dark'] .icon-square-button.accent-right-now,
:root[data-theme='dark'] .icon-square-button.right-now-complete-button {
  background: rgba(39, 176, 125, 0.18);
  border-color: rgba(255,255,255,0.08);
  color: #eaf8ef;
  box-shadow: 0 8px 20px rgba(7, 40, 22, 0.24), inset 0 0 0 1px rgba(255,255,255,0.02);
}

:root[data-theme='dark'] .icon-square-button.accent-right-now:hover:not(:disabled),
:root[data-theme='dark'] .icon-square-button.right-now-complete-button:hover:not(:disabled) {
  background: rgba(39, 176, 125, 0.26);
}

.today-subtask-item-empty {
  border-radius: 12px;
  padding: 10px 12px;
}

.today-subtask-item-cta,
.today-subtask-item-cta:hover {
  cursor: pointer;
}

.today-focus-card {
  position: relative;
}

.right-now-complete-button {
  /* keep a specific accent for complete, but use icon-square defaults */
  border-color: rgba(39, 176, 125, 0.36);
  background: rgba(39, 176, 125, 0.14);
  color: #1d8a60;
  font-weight: 700;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}

.right-now-complete-button:hover:not(:disabled) {
  background: rgba(39, 176, 125, 0.2);
  transform: translateY(-1px);
}

.right-now-complete-button:disabled {
  opacity: 0.7;
}

.right-now-complete-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}

.floating-complete-burst {
  position: fixed;
  inset: auto;
  width: 176px;
  height: 124px;
  overflow: visible;
  z-index: 1200;
}

.burst-star {
  position: absolute;
  left: 50%;
  top: 46%;
  opacity: 0;
  color: #f4c542;
  font-size: 1rem;
  transform: translate(-50%, -50%) scale(0.2);
}

.right-now-complete-burst.active .burst-star {
  animation: right-now-star-burst 720ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes right-now-star-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(1.05) rotate(var(--rotate, 0deg));
  }
}

:root[data-theme='dark'] .right-now-complete-button {
  border-color: rgba(78, 212, 154, 0.4);
  background: rgba(78, 212, 154, 0.16);
  color: #89e6bf;
}

.today-focus-actions {
  display: flex;
  justify-content: flex-start;
}

.today-focus-body h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.today-focus-meta,
.today-card-footnote,
.today-focus-next-step p {
  color: var(--muted);
}

.today-focus-next-step {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(77, 116, 255, 0.08), rgba(39, 176, 125, 0.07));
  border: 1px solid var(--surface-border);
}

.today-focus-subtasks {
  display: grid;
  gap: 12px;
}

.today-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.today-checklist li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(95, 122, 163, 0.12);
}

.today-checklist li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.checkmark {
  color: var(--accent-strong);
  font-weight: 700;
  line-height: 1;
}

.checkmark svg {
  width: 15px;
  height: 15px;
  display: block;
  margin-top: 2px;
}

.today-subtask-copy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.today-subtask-focus-button {
  padding: 0;
}

.today-subtask-form {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.today-subtask-form input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
  border-radius: 16px;
  padding: 12px 14px;
  min-height: 44px;
}

.focus-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.focus-modal.hidden {
  display: none;
}

.focus-modal-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(148, 123, 255, 0.2), rgba(148, 123, 255, 0) 36%),
    radial-gradient(circle at 80% 82%, rgba(111, 87, 218, 0.18), rgba(111, 87, 218, 0) 42%),
    rgba(15, 22, 40, 0.6);
  backdrop-filter: blur(8px);
  opacity: 1;
  transition: opacity 1800ms cubic-bezier(0.22, 1, 0.36, 1) 1400ms, backdrop-filter 1800ms cubic-bezier(0.22, 1, 0.36, 1) 1400ms;
}

.focus-modal-backdrop::before,
.focus-modal-backdrop::after {
  content: '';
  position: absolute;
  left: -20%;
  right: -20%;
  border-radius: 48% 52% 46% 54% / 54% 44% 56% 46%;
  pointer-events: none;
}

.focus-modal-backdrop::before {
  top: 12%;
  height: 40%;
  background: radial-gradient(circle at 50% 50%, rgba(168, 143, 255, 0.24) 0%, rgba(168, 143, 255, 0.04) 55%, rgba(168, 143, 255, 0) 75%);
  animation: calmWaveDriftA 9s ease-in-out infinite alternate;
  opacity: 1;
  transition: opacity 1800ms cubic-bezier(0.22, 1, 0.36, 1) 1400ms;
}

.focus-modal-backdrop::after {
  top: 50%;
  height: 36%;
  background: radial-gradient(circle at 50% 50%, rgba(126, 102, 236, 0.22) 0%, rgba(126, 102, 236, 0.05) 56%, rgba(126, 102, 236, 0) 76%);
  animation: calmWaveDriftB 12s ease-in-out infinite alternate;
  opacity: 1;
  transition: opacity 1800ms cubic-bezier(0.22, 1, 0.36, 1) 1400ms;
}

.focus-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--surface-elevated) 0%, var(--surface-2) 100%);
  border: 1px solid var(--surface-border);
  box-shadow: 0 26px 60px rgba(19, 32, 51, 0.24);
  display: grid;
  gap: 16px;
}

@keyframes calmWaveDriftA {
  0% {
    transform: translate3d(-3%, 0, 0) scale(1);
    opacity: 0.82;
  }
  100% {
    transform: translate3d(4%, 14px, 0) scale(1.08);
    opacity: 1;
  }
}

@keyframes calmWaveDriftB {
  0% {
    transform: translate3d(4%, 0, 0) scale(1);
    opacity: 0.74;
  }
  100% {
    transform: translate3d(-5%, -18px, 0) scale(1.1);
    opacity: 0.96;
  }
}

.focus-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}

.focus-modal-detail {
  color: var(--muted);
  line-height: 1.6;
}

.focus-modal-task-details-link {
  justify-self: start;
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.focus-modal-task-details-link:hover {
  color: #c7d3ff;
}

.focus-modal-music-row {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.focus-modal-music-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.focus-modal-music-select {
  width: 100%;
}

.focus-modal-volume-row {
  display: grid;
  gap: 8px;
}

.focus-modal-volume-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.focus-modal-volume-value {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.focus-modal-volume-slider {
  width: 100%;
  accent-color: #14282d;
}

.focus-duration-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.focus-duration-options .chip-button {
  min-height: 34px;
  padding: 6px 12px;
}

.focus-modal-timer-shell {
  display: grid;
  gap: 10px;
  place-items: center;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-elevated) 100%);
  border: 1px solid rgba(77, 116, 255, 0.16);
}

.focus-modal-timer {
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  color: #2f5cf0;
}

.focus-modal-status {
  color: var(--muted);
  font-weight: 600;
}

.focus-modal-notify-row {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-weight: 500;
}

.focus-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.focus-session-stage {
  display: grid;
  margin-top: 4px;
}

.focus-session-panel,
.focus-session-end-card {
  grid-area: 1 / 1;
}

.focus-session-panel {
  display: grid;
  gap: 18px;
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 1;
  transform: translateY(0);
}

.focus-session-stage[data-phase='ending'] .focus-session-panel,
.focus-session-stage[data-phase='completed'] .focus-session-panel,
.focus-session-stage[data-phase='closing'] .focus-session-panel {
  opacity: 0;
  transform: translateY(-10px) scale(0.985);
  filter: blur(1px);
  pointer-events: none;
}

.focus-session-warning {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 28, 49, 0.92) 0%, rgba(10, 18, 32, 0.96) 100%);
  border: 1px solid rgba(126, 164, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(126, 164, 255, 0.08), 0 10px 22px rgba(3, 8, 20, 0.18);
  backdrop-filter: blur(10px);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1), transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.focus-session-warning.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.focus-session-warning-copy {
  grid-area: 1 / 1;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #dbe8ff;
  transition: opacity 520ms ease, transform 520ms ease;
}

.focus-session-warning-copy--close {
  opacity: 0;
  transform: translateY(6px);
  color: #92f0bf;
}

.focus-session-warning.is-closing .focus-session-warning-copy--calm {
  opacity: 0;
  transform: translateY(-6px);
}

.focus-session-warning.is-closing .focus-session-warning-copy--close {
  opacity: 1;
  transform: translateY(0);
}

.focus-session-end-card {
  display: grid;
  align-items: center;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.focus-session-stage[data-phase='ending'] .focus-session-end-card,
.focus-session-stage[data-phase='completed'] .focus-session-end-card,
.focus-session-stage[data-phase='closing'] .focus-session-end-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.focus-session-end-card-inner {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(24, 36, 60, 0.96) 0%, rgba(14, 22, 41, 0.98) 100%);
  border: 1px solid rgba(126, 164, 255, 0.18);
  box-shadow: 0 18px 36px rgba(2, 7, 18, 0.28), inset 0 0 0 1px rgba(126, 164, 255, 0.08);
}

.focus-session-end-card-inner h3 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
  color: #f2f6ff;
}

.focus-session-end-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.focus-session-end-stat {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(126, 164, 255, 0.14);
}

.focus-session-end-stat-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(216, 229, 255, 0.72);
}

.focus-session-end-stat-value {
  font-size: 1.18rem;
  font-weight: 800;
  color: #f5f8ff;
}

.focus-session-end-motivation {
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(126, 164, 255, 0.12) 0%, rgba(126, 164, 255, 0.06) 100%);
  border: 1px solid rgba(126, 164, 255, 0.14);
  color: #dce8ff;
  font-size: 1rem;
  line-height: 1.55;
}

.focus-session-end-actions {
  display: flex;
  justify-content: flex-end;
}

.focus-modal.focus-modal--soft-closing .focus-modal-dialog {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.focus-modal.focus-modal--soft-closing .focus-modal-backdrop {
  opacity: 0;
  backdrop-filter: blur(0px);
}

.focus-modal.focus-modal--soft-closing .focus-modal-backdrop::before,
.focus-modal.focus-modal--soft-closing .focus-modal-backdrop::after {
  opacity: 0;
}

@media (max-width: 720px) {
  .focus-session-end-stats {
    grid-template-columns: 1fr;
  }
}

.focus-modal.with-task-details .focus-modal-dialog {
  position: absolute;
  top: 50%;
  left: max(12px, calc(50% - 582px));
  transform: translateY(-50%);
  width: min(300px, calc(100vw - 24px));
  max-height: min(88vh, 860px);
}

.details-modal.focus-session-mode .details-modal-backdrop {
  background: rgba(8, 11, 22, 0.34);
  backdrop-filter: blur(4px);
}

@media (min-width: 760px) {
  .details-modal.focus-session-mode .details-modal-dialog {
    position: absolute;
    top: 50%;
    left: max(12px, calc(50% - 258px));
    transform: translateY(-50%);
    width: min(840px, calc(100vw - 24px));
    height: min(88vh, 860px);
    grid-template-columns: 1fr 260px;
  }

  .details-modal.focus-session-mode .details-modal-sidebar {
    border-left: none;
    border-top: 1px solid var(--surface-border);
  }
}

@media (max-width: 759px) {
  .details-modal.focus-session-mode .details-modal-dialog {
    grid-template-columns: 1fr;
    width: min(100vw - 16px, 600px);
    max-height: 94vh;
  }

  .details-modal.focus-session-mode .details-modal-sidebar {
    border-left: none;
    border-top: 1px solid var(--surface-border);
  }

  .details-modal.focus-session-mode .details-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .details-modal.focus-session-mode .details-footer-left,
  .details-modal.focus-session-mode .details-footer-right {
    flex-wrap: wrap;
  }
}

.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.notice-modal.hidden {
  display: none;
}

.notice-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(77, 116, 255, 0.18), rgba(77, 116, 255, 0) 34%),
    radial-gradient(circle at 82% 80%, rgba(39, 176, 125, 0.16), rgba(39, 176, 125, 0) 38%),
    rgba(15, 22, 40, 0.56);
  backdrop-filter: blur(8px);
}

.notice-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--surface-elevated) 0%, var(--surface-2) 100%);
  border: 1px solid var(--surface-border);
  box-shadow: 0 26px 60px rgba(19, 32, 51, 0.24);
  display: grid;
  gap: 16px;
}

.notice-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}

.notice-modal-detail {
  color: var(--muted);
  line-height: 1.6;
}

.notice-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.app-inline-notice {
  margin-bottom: 12px;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--surface-1);
  color: var(--text);
  font-size: 0.9rem;
}

.app-inline-notice.hidden {
  display: none;
}

.app-inline-notice[data-kind='success'] {
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
}

.app-inline-notice[data-kind='error'] {
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}

.prompt-modal-choices {
  display: grid;
  gap: 8px;
}

.prompt-modal-choices.hidden {
  display: none;
}

.prompt-modal-choice {
  width: 100%;
  text-align: left;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: var(--surface-1);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 600;
}

.prompt-modal-input-wrap {
  display: block;
  width: 100%;
}

.prompt-modal-input-wrap .settings-input {
  width: 100%;
  box-sizing: border-box;
}

.prompt-modal-input-wrap.hidden {
  display: none;
}

.toast-region {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 240;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 28px));
}

.toast-item {
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background: var(--surface-elevated);
  box-shadow: 0 10px 22px rgba(19, 32, 51, 0.2);
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.toast-message {
  margin: 0;
  color: var(--text);
  font-size: 0.87rem;
}

.toast-item[data-kind='error'] {
  border-color: color-mix(in srgb, var(--danger) 50%, transparent);
}

.toast-item[data-kind='success'] {
  border-color: color-mix(in srgb, var(--success) 45%, transparent);
}

.toast-action {
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--text);
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.morning-checkin-modal {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: grid;
  place-items: center;
  padding: 24px;
}

.morning-checkin-modal.hidden {
  display: none;
}

.morning-checkin-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(77, 116, 255, 0.16), rgba(77, 116, 255, 0) 34%),
    radial-gradient(circle at 82% 82%, rgba(39, 176, 125, 0.13), rgba(39, 176, 125, 0) 38%),
    rgba(12, 19, 34, 0.58);
  backdrop-filter: blur(8px);
}

.morning-checkin-dialog {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  scrollbar-width: none;
  border-radius: 28px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(175deg, var(--surface-elevated) 0%, var(--surface-2) 100%);
  box-shadow: 0 26px 62px rgba(8, 13, 26, 0.34);
  padding: 30px;
  display: grid;
  gap: 18px;
}

.morning-checkin-modal--onboarding .morning-checkin-backdrop {
  background: transparent;
  backdrop-filter: none;
}

.morning-checkin-modal--onboarding .morning-checkin-dialog {
  animation: morning-checkin-onboarding-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes morning-checkin-onboarding-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.morning-checkin-dialog::-webkit-scrollbar {
  display: none;
}

.morning-checkin-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}

.morning-checkin-copy {
  margin: 0;
  color: var(--muted);
  max-width: 64ch;
}

.morning-checkin-form {
  display: grid;
  gap: 14px;
}

.morning-checkin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.morning-field {
  display: grid;
  gap: 8px;
}

.morning-field > span {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.morning-scale-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.morning-scale-row input[type='range'] {
  width: 100%;
  accent-color: var(--accent-strong);
}

.morning-scale-row output {
  min-width: 32px;
  text-align: center;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
  font-weight: 700;
}

.morning-field-full {
  grid-column: 1 / -1;
}

.morning-field select,
.morning-field input {
  min-height: var(--control-height);
  border-radius: var(--control-radius);
  border: 1px solid var(--surface-border);
  background: var(--surface-elevated);
  color: var(--text);
  padding: var(--control-padding);
  font: inherit;
}

.morning-checkin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.morning-checkin-outcome {
  display: grid;
  gap: 12px;
}

.morning-checkin-outcome.hidden {
  display: none;
}

.morning-outcome-card {
  border-radius: 18px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-elevated));
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}

.morning-outcome-card p {
  margin: 0;
}

.morning-build-actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.insights-chart-card,
.insights-toggle-card {
  height: 100%;
}

.insights-chart-shell {
  border-radius: 18px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-elevated));
  padding: 10px;
}

.insights-chart {
  width: 100%;
  height: auto;
  display: block;
}

.insights-hover-details {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.insights-toggles {
  display: grid;
  gap: 10px;
}

.insights-toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
  padding: 10px 12px;
  font-weight: 600;
}

.insights-completed-card {
  grid-column: 1 / -1;
}

.insights-completed-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.insights-filter-button {
  min-height: 36px;
  padding: 6px 12px;
}

.insights-filter-button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid rgba(77, 116, 255, 0.28);
}

.insights-completed-list {
  max-height: 320px;
  overflow: auto;
  padding-right: 6px;
}

:root[data-theme='dark'] .morning-checkin-dialog {
  background: linear-gradient(170deg, rgba(21, 31, 49, 0.98) 0%, rgba(15, 24, 40, 0.98) 100%);
  border-color: rgba(130, 155, 196, 0.28);
}

:root[data-theme='dark'] .morning-field select,
:root[data-theme='dark'] .morning-field input {
  background: rgba(27, 38, 58, 0.92);
  border-color: rgba(130, 155, 196, 0.38);
}

:root[data-theme='dark'] .morning-outcome-card {
  background: linear-gradient(180deg, rgba(27, 38, 58, 0.92), rgba(20, 31, 49, 0.92));
}

:root[data-theme='dark'] .insights-chart-shell {
  background: linear-gradient(180deg, rgba(27, 38, 58, 0.92), rgba(20, 31, 49, 0.92));
}

:root[data-theme='dark'] .insights-toggle-item,
:root[data-theme='dark'] .morning-scale-row output {
  background: rgba(27, 38, 58, 0.92);
  border-color: rgba(130, 155, 196, 0.32);
}

/* ── Details Modal (redesigned) ──────────────────────────────────────────── */
.details-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
}
.details-modal.hidden { display: none; }

.details-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 22, 0.7);
  backdrop-filter: blur(6px);
}

.details-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100vw - 24px));
  height: min(92vh, 880px);
  display: grid;
  grid-template-columns: 1fr 260px;
  border-radius: 22px;
  border: 1px solid var(--surface-border);
  background: var(--surface-elevated);
  box-shadow: 0 28px 72px rgba(4, 10, 24, 0.5);
  overflow: hidden;
}

/* Left main column */
.details-modal-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  min-height: 0;
  padding: 28px 24px 0;
  border-right: 1px solid var(--surface-border);
  scrollbar-width: none;
}
.details-modal-main::-webkit-scrollbar { display: none; }

.details-modal-header {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(95, 122, 163, 0.12);
  margin-bottom: 4px;
}

.details-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 8px;
  text-transform: uppercase;
}

.details-modal-title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--text);
}

/* Description */
.details-desc-block {
  position: relative;
  margin-bottom: 14px;
}

.details-desc-text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  padding-right: 26px;
  min-height: 20px;
}
.details-desc-text--placeholder { font-style: italic; opacity: 0.55; }

.details-desc-edit-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0.6;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.details-desc-edit-btn:hover { opacity: 1; color: var(--accent); }

.details-desc-input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: rgba(20, 31, 52, 0.86);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 8px 12px;
  resize: vertical;
  font-family: inherit;
}
.details-desc-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* Status pills */
.details-pills-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.details-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid rgba(95, 122, 163, 0.25);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}
.details-pill-column { background: rgba(77, 116, 255, 0.12); color: #a5b8ff; border-color: rgba(77,116,255,0.25); }
.details-pill-focus  { background: rgba(138, 245, 167, 0.12); color: var(--accent); border-color: rgba(138,245,167,0.28); }
.details-pill-due    { background: rgba(255, 178, 77, 0.12); color: #ffd180; border-color: rgba(255,178,77,0.28); }

/* Numbered sections */
.details-numbered-section {
  padding: 18px 0;
  border-bottom: 1px solid rgba(95, 122, 163, 0.1);
}
.details-numbered-section:last-of-type { border-bottom: none; }

.details-section-num-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.details-section-num-label > span:first-child { display: flex; align-items: center; gap: 8px; }

.details-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(95, 122, 163, 0.18);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Next step */
.details-next-step-content {
  display: grid;
  gap: 10px;
}

.details-next-step-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(138, 245, 167, 0.2);
  background: rgba(138, 245, 167, 0.06);
}

.details-next-step-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  flex: 1 1 auto;
}

.details-no-subtasks-msg {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.details-ai-help-link {
  background: none;
  border: 1px solid rgba(138,245,167,0.3);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  cursor: pointer;
}

/* Progress (subtasks) */
.details-subtask-input-row {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px;
  align-items: center;
}
.details-numbered-section.has-ring .details-subtask-input-row {
  /* Align Add button with the right edge of the subtask list
     (ring width 68px + progress row gap 14px). */
  margin-right: calc(68px + 14px);
}
.details-subtask-input-row input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 6px 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* Match the Add button height to the input */
.details-subtask-input-row .ghost-button {
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.details-progress-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.details-subtask-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: rgba(255,255,255,0.025);
}
.details-subtask-item > span { color: var(--text); font-weight: 500; font-size: 0.88rem; flex: 1; }

/* Notes */
.details-notes-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 72px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 2px 8px;
}
.details-note-message {
  width: min(78%, 430px);
  padding: 9px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
}
.details-note-message.is-mine {
  align-self: flex-end;
  border-color: color-mix(in srgb, var(--accent) 38%, var(--surface-border));
  border-bottom-right-radius: 4px;
  background: var(--accent-soft);
}
.details-note-message.is-other {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.details-note-author { display: block; color: var(--accent-strong); font-size: .72rem; margin-bottom: 3px; }
.details-note-text { margin: 0; color: var(--text); font-size: .84rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.details-note-time { display: block; margin-top: 5px; color: var(--muted); font-size: .62rem; }
.details-notes-empty { margin: 10px 0; color: var(--muted); font-size: .78rem; }
.details-notes-composer { display: flex; align-items: flex-end; gap: 8px; margin-top: 4px; }
.details-notes-composer .details-notes-input { flex: 1; }
.details-notes-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.details-add-note-button {
  flex: 0 0 auto;
  /* Same size as the Complete button in the details modal footer */
  padding: 9.6px 14.4px;
  font-size: 0.8em;
}
.details-notes-input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: rgba(20,31,52,0.5);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.55;
  padding: 12px;
  resize: vertical;
  min-height: 80px;
  max-height: 200px;
  font-family: inherit;
}
.details-notes-input:focus { border-color: var(--accent); outline: none; }

/* Focus history */
.details-focus-history-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: grid;
  gap: 6px;
}
.details-focus-history-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid rgba(95,122,163,0.08);
}

.details-focus-totals-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  color: var(--muted);
}
.details-focus-totals-row strong { color: var(--text); }
.details-focus-sep { opacity: 0.4; }
.details-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Footer */
.details-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  margin: auto -24px 0;
  border-top: 1px solid rgba(95,122,163,0.15);
  background: var(--surface-elevated);
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.details-footer-left { display: flex; gap: 8px; flex-wrap: wrap; }
.details-footer-right { display: flex; gap: 8px; }
.details-modal-footer .ghost-button,
.details-modal-footer .primary-button {
  padding: 9.6px 14.4px;
  font-size: 0.8em;
}
.details-share-btn { border-color: rgba(138,245,167,.45); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

.details-share-btn > span[aria-hidden] { display: inline-flex; align-items: center; }

.details-share-btn svg { width: 14px; height: 14px; display: block; }
.details-focus-personal-btn { display: inline-flex; align-items: center; gap: 6px; }
.details-focus-personal-btn[hidden] { display: none; }
.details-focus-personal-btn svg { width: 14px; height: 14px; }
.incoming-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.incoming-column-select { min-width: 126px; padding: 5px 7px; border: 1px solid rgba(138,245,167,.35); border-radius: 7px; background: var(--surface-2); color: var(--text); font: inherit; font-size: .7rem; }
.incoming-column-select:focus { outline: 1px solid var(--accent); }
.incoming-work-status { color: var(--accent); font-size: .6rem; white-space: nowrap; }
.board-task-type-filter { min-height: 30px; padding: 5px 9px; border: 1px solid var(--surface-border); border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; font-size: .72rem; }
.task-card-connection { position: relative; }
.task-card-connection::after { content: ''; position: absolute; top: 0; right: 0; width: 42px; height: 42px; background: linear-gradient(135deg, rgba(178, 103, 255, .9), rgba(91, 55, 190, .42)); clip-path: polygon(100% 0, 100% 100%, 0 0); border-top-right-radius: var(--radius-md, 16px); pointer-events: none; }

.share-task-modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; }
.workspace-members-modal { position: fixed; inset: 0; z-index: 155; display: grid; place-items: center; padding: 16px; }
.workspace-members-modal.hidden { display: none; }
.workspace-members-backdrop { position: absolute; inset: 0; background: rgba(2,8,17,.8); backdrop-filter: blur(8px); }
.workspace-members-dialog { position: relative; z-index: 1; width: min(100%, 460px); max-height: min(760px, calc(94vh - 32px)); overflow-y: auto; padding: 18px 16px 14px; border: 1px solid rgba(138,245,167,.14); border-radius: 9px; background: linear-gradient(160deg, #071523, #030b16); box-shadow: 0 28px 80px rgba(0,0,0,.6); color: var(--text); box-sizing: border-box; }
.workspace-members-header { display: flex; justify-content: space-between; gap: 12px; }
.workspace-members-header-actions { display: flex; align-items: flex-start; gap: 6px; }
.workspace-members-header h2 { margin: 5px 0 3px; color: #f3f7ff; font-size: 1.1rem; }
.workspace-members-header p:last-child { max-width: 330px; margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.workspace-members-list { display: grid; gap: 6px; margin: 18px 0; }
.workspace-member-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border: 1px solid var(--surface-border); border-radius: 7px; background: rgba(9,23,42,.65); }
.workspace-member-avatar { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: rgba(138,245,167,.12); color: var(--accent); font-size: .7rem; font-weight: 700; }
.workspace-member-row p { display: grid; flex: 1 1 auto; gap: 2px; }
.workspace-member-row p small { overflow: hidden; color: var(--muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.workspace-member-role { color: var(--accent); font-size: .62rem; text-transform: capitalize; }
.workspace-member-role-select { max-width: 112px; padding: 5px 7px; border: 1px solid var(--surface-border); border-radius: 6px; background: var(--surface-2); color: var(--accent); font: inherit; font-size: .62rem; }
.workspace-member-row .connection-menu-action { flex: 0 0 auto; }
.workspace-invite-form { display: grid; gap: 12px; padding-top: 13px; border-top: 1px solid var(--surface-border); }
.workspace-connection-picker { gap: 7px; }
.workspace-invite-selected { display: flex; flex-wrap: wrap; gap: 5px; min-height: 0; }
.workspace-invite-selected:empty { display: none; }
.workspace-invite-pill { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 6px 4px 9px; border: 1px solid rgba(138,245,167,.35); border-radius: 999px; background: rgba(138,245,167,.1); color: var(--accent); font-size: .66rem; }
.workspace-invite-pill > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-invite-pill-remove { display: grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--accent); cursor: pointer; font-size: .9rem; line-height: 1; }
.workspace-invite-pill-remove:hover, .workspace-invite-pill-remove:focus-visible { background: rgba(138,245,167,.18); outline: none; }
.workspace-invite-search-label { display: block; }
#workspaceInviteConnectionSearch { width: 100%; box-sizing: border-box; border: 1px solid var(--surface-border); border-radius: 6px; background: rgba(9,23,42,.8); color: var(--text); padding: 9px 10px; font: inherit; font-size: .72rem; }
#workspaceInviteConnectionSearch:focus { border-color: var(--accent); outline: 1px solid rgba(138,245,167,.35); }
.workspace-invite-options { display: grid; max-height: 156px; overflow-y: auto; border: 1px solid var(--surface-border); border-radius: 6px; background: rgba(9,23,42,.55); }
.workspace-invite-options[hidden] { display: none; }
.workspace-invite-option { display: flex; width: 100%; padding: 8px 10px; border: 0; border-bottom: 1px solid rgba(95,122,163,.12); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.workspace-invite-option:last-child { border-bottom: 0; }
.workspace-invite-option:hover, .workspace-invite-option:focus-visible { background: rgba(138,245,167,.1); outline: none; }
.workspace-invite-option span { display: grid; gap: 2px; min-width: 0; }
.workspace-invite-option strong { overflow: hidden; color: var(--text); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.workspace-invite-option small { overflow: hidden; color: var(--muted); font-size: .6rem; text-overflow: ellipsis; white-space: nowrap; }
.workspace-invite-options-empty { margin: 0; padding: 10px; color: var(--muted); font-size: .65rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.workspace-members-actions { display: flex; justify-content: space-between; gap: 8px; }
#shareTaskConnectionPanel, #shareTaskEmailPanel { display: grid; gap: 15px; }
.share-task-modal.hidden { display: none; }
.share-task-modal-backdrop { position: absolute; inset: 0; background: rgba(2,8,17,.8); backdrop-filter: blur(8px); }
.share-task-dialog { position: relative; z-index: 1; width: min(100%, 430px); height: min(760px, calc(94vh - 32px)); max-height: min(94vh, 760px); overflow-y: auto; padding: 18px 16px 12px; border: 1px solid rgba(138,245,167,.14); border-radius: 9px; background: linear-gradient(160deg, #071523, #030b16); box-shadow: 0 28px 80px rgba(0,0,0,.6); color: var(--text); box-sizing: border-box; }
#shareTaskEmailPanel { align-content: start; }
#shareTaskEmailPanel .share-task-field { align-content: start; }
#shareTaskEmailPanel .share-task-field:first-child { gap: 5px; }
#shareTaskEmailPanel .share-task-field:nth-child(2) { gap: 5px; }
#shareTaskEmailBody { height: 480px; min-height: 0; }
#shareTaskMessage { height: 240px; min-height: 0; }
.share-task-header { display: flex; justify-content: space-between; gap: 12px; }.share-task-kicker { color: var(--accent); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }.share-task-header h2 { margin: 5px 0 3px; color: #f3f7ff; font-size: 1.1rem; }.share-task-header p:last-child { color: var(--muted); font-size: .7rem; }.share-task-close { width: 28px; height: 28px; border: 0; background: transparent; color: var(--muted); font-size: 1.25rem; }.share-task-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0; border: 1px solid var(--surface-border); border-radius: 6px; overflow: hidden; }.share-task-tabs button { min-height: 34px; border: 0; background: transparent; color: var(--muted); font-size: .68rem; }.share-task-tabs button.is-active { background: rgba(138,245,167,.1); color: var(--accent); box-shadow: inset 0 -1px var(--accent); }.share-task-form { display: grid; gap: 15px; }.share-task-field { display: grid; gap: 7px; border: 0; padding: 0; margin: 0; }.share-task-field > span, .share-task-field legend { color: #e0e8f4; font-size: .68rem; font-weight: 600; }.share-task-field em { float: right; color: var(--accent); font-size: .58rem; font-style: normal; font-weight: 400; }.share-task-field small { color: var(--muted); font-size: .6rem; }.share-task-field select, .share-task-field input, .share-task-field textarea { width: 100%; border: 1px solid var(--surface-border); border-radius: 6px; background: rgba(9,23,42,.8); color: var(--text); padding: 9px 10px; font: inherit; font-size: .72rem; }.share-task-field textarea { resize: vertical; line-height: 1.5; }.share-task-choice { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: .7rem; }.share-task-choice input { width: 14px; accent-color: var(--accent); }.share-task-choice small { margin-left: -2px; }.share-task-choice select { flex: 1; margin-left: 8px; }.share-task-context { padding: 10px; border-radius: 6px; background: rgba(16,34,58,.55); color: var(--muted); font-size: .63rem; }.share-task-note { margin: 0; padding: 9px; border-radius: 6px; background: rgba(35,63,99,.28); color: var(--muted); font-size: .61rem; }.share-task-actions { display: flex; justify-content: space-between; gap: 8px; padding-top: 2px; }.share-task-actions button { min-height: 34px; padding: 7px 13px; font-size: .7rem; }.share-task-feedback { min-height: 14px; margin: 0; color: var(--danger); font-size: .65rem; }

/* Right sidebar */
.details-modal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  min-height: 0;
  background: rgba(5,11,22,0.72);
  scrollbar-width: none;
  padding-bottom: 16px;
  position: relative;
}
.details-modal-sidebar::-webkit-scrollbar { display: none; }

.details-modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: rgba(14,22,42,0.5);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: grid;
  place-items: center;
}

.details-sidebar-section {
  padding: 16px;
  border-bottom: 1px solid rgba(95,122,163,0.1);
}
.details-sidebar-section:first-of-type { padding-top: 52px; } /* space for close button */

.details-sidebar-section-heading {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* Settings rows */
.details-settings-body { display: grid; gap: 10px; }

.details-setting-row {
  display: grid;
  grid-template-columns: 18px auto 1fr;
  gap: 6px 8px;
  align-items: center;
}
.details-setting-row-readonly { opacity: 0.7; }

.details-setting-label {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.details-setting-select,
.details-setting-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(20,31,52,0.7);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.8rem;
  padding: 5px 8px;
  font-family: inherit;
}
.details-setting-select:focus,
.details-setting-input:focus { border-color: var(--accent); outline: none; }

.details-setting-value {
  font-size: 0.8rem;
  color: var(--text);
}

/* Why this matters */
.details-why-body { display: grid; gap: 8px; }
.details-why-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.details-unlocks-container {
  display: grid;
  gap: 6px;
}
.details-unlock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
}
.details-unlock-row input {
  flex: 1;
  min-width: 0;
  background: rgba(20,31,52,0.7);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.8rem;
  padding: 5px 8px;
}
.details-unlock-remove-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(198,66,69,0.3);
  background: none;
  color: var(--danger, #e06c75);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 0;
}

.details-add-item-btn {
  background: none;
  border: 1px dashed rgba(138,245,167,0.25);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  width: 100%;
}
.details-add-item-btn:hover { border-color: var(--accent); background: rgba(138,245,167,0.04); }

.details-impact-row { margin-top: 4px; }

/* Need help */
.details-help-links { display: grid; gap: 6px; }
.details-help-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: rgba(255,255,255,0.025);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.details-help-link:hover { background: rgba(138,245,167,0.06); border-color: rgba(138,245,167,0.2); }
.details-help-text { flex: 1; min-width: 0; }
.details-help-title { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.details-help-sub { font-size: 0.73rem; color: var(--muted); }
.details-help-arrow { color: var(--muted); font-size: 1rem; }

/* Archive */
.details-archive-btn {
  margin: 12px 16px 0;
  width: calc(100% - 32px);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(198,66,69,0.25);
  background: none;
  color: var(--danger, #e06c75);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.details-archive-btn:hover { background: rgba(198,66,69,0.08); }

/* Old compat stubs (keep referenced IDs working) */
.details-subtask-actions { display: inline-flex; align-items: center; gap: 6px; }
.details-subtask-order {
  width: 28px; height: 28px; border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: rgba(255,255,255,0.03); color: var(--text); cursor: pointer;
}
.details-subtask-order:disabled { opacity: 0.4; cursor: not-allowed; }
.details-subtask-menu-wrap { position: relative; }
.details-subtask-menu-button {
  width: 28px; height: 28px; border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: rgba(255,255,255,0.03); color: var(--muted); cursor: pointer;
}
.details-subtask-menu {
  position: absolute; right: 0; top: 32px; min-width: 140px;
  padding: 6px; border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: var(--surface-elevated);
  box-shadow: 0 14px 28px rgba(4,10,24,0.3);
}
.details-subtask-menu[hidden] { display: none !important; }

.details-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.details-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.details-modal-actions-secondary {
  justify-content: flex-start;
}

.details-modal-actions-primary {
  justify-content: flex-end;
}

.details-modal-actions .danger {
  color: var(--danger);
  border-color: rgba(198, 66, 69, 0.28);
}

@media (max-width: 680px) {
  .morning-checkin-modal {
    padding: 10px;
  }

  .morning-checkin-dialog {
    width: 100%;
    border-radius: 22px;
    padding: 22px 16px;
  }

  .morning-checkin-grid {
    grid-template-columns: 1fr;
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }

  .details-modal {
    align-items: end;
    padding: 6px;
  }

  .details-modal-dialog {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    grid-template-rows: none;
    width: min(100vw - 12px, 640px);
    height: min(100dvh - 12px, 960px);
    max-height: none;
    border-radius: 22px 22px 16px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .details-modal-main {
    flex: 1 1 auto;
    overflow: visible;
    padding: 18px 14px 12px;
    border-right: none;
    border-bottom: 1px solid var(--surface-border);
  }

  .details-modal-sidebar {
    display: none;
  }

  .details-modal-header {
    padding-bottom: 16px;
    margin-bottom: 0;
  }

  .details-header-topbar {
    margin-bottom: 10px;
  }

  .details-header-left {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .details-section-num-label {
    flex-direction: column;
    align-items: flex-start;
  }

  .details-subtask-input-row {
    width: 100%;
    margin-right: 0;
  }

  .details-progress-row {
    flex-direction: column;
    gap: 12px;
  }

  .details-modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    margin: 6px -14px 0;
  }

  .details-footer-left,
  .details-footer-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .details-footer-left > *,
  .details-footer-right > * {
    width: 100%;
  }

  .details-modal-footer .ghost-button,
  .details-modal-footer .primary-button,
  .details-modal-footer .details-move-to-btn {
    min-height: 27.2px;
    padding: 5.6px 8px;
    border-radius: 12px;
    font-size: 0.64rem;
    line-height: 1.1;
  }

  .details-modal-footer .primary-button {
    font-size: 0.66rem;
  }

  .details-move-to-wrap,
  .details-footer-left > .ghost-button,
  .details-footer-right > .ghost-button,
  .details-footer-right > .primary-button {
    grid-column: 1 / -1;
  }

  .details-move-to-dropdown {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .details-sidebar-section {
    padding: 12px 14px;
  }

  .details-sidebar-section:first-of-type {
    padding-top: 42px;
  }

  .details-setting-row {
    grid-template-columns: 16px auto 1fr;
    gap: 5px 7px;
  }

  .details-setting-label,
  .details-setting-value,
  .details-setting-display,
  .details-why-label,
  .details-help-title,
  .details-help-sub {
    font-size: 0.76rem;
  }

  .details-help-icon {
    width: 26px;
    height: 26px;
  }

  .details-help-link {
    padding: 10px 11px;
  }

  .details-archive-btn {
    margin: 12px 16px 0;
    width: calc(100% - 32px);
  }
}

.dump-details-button {
  border: 0;
  background: none;
  color: rgba(50, 68, 110, 0.9);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.dump-details-button:hover {
  color: rgba(21, 40, 84, 1);
}

#todayView .today-wins-card {
  display: grid;
  gap: 18px;
  align-content: start;
  overflow: hidden;
  background: linear-gradient(145deg, #173238 0%, #13282E 50%, #102329 100%);
}

.today-wins-select-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  flex: 0 0 36px;
}

.today-wins-select-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.today-wins-select-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ── Wins inspiration strip ───────────────────────────────────────────────── */
.wins-inspiration-strip {
  position: relative;
  min-height: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  margin: 8px -14px -14px;
  padding: 16px 14px 20px;
}

.wins-inspiration-msg {
  display: block;
  width: 100%;
  text-align: center;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  color: rgba(138, 245, 167, 0.85);
  font-style: italic;
  font-weight: 500;
  opacity: 0;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.wins-inspiration-thinking {
  width: 100%;
  min-height: 36px;
  padding: 6px 4px;
  color: transparent;
  pointer-events: none;
}

.today-awareness-message {
  min-height: 92px;
  padding: 16px 14px 20px;
  text-align: center;
}

.today-awareness-message--amber {
  --today-message-accent: #b89452;
  --today-message-border: rgba(184, 148, 82, 0.18);
  --today-message-background: rgba(184, 148, 82, 0.06);
}

.today-awareness-message--blue {
  --today-message-accent: #7eb5ff;
  --today-message-border: rgba(126, 181, 255, 0.2);
  --today-message-background: rgba(126, 181, 255, 0.08);
}

.today-awareness-message--purple {
  --today-message-accent: #b59aff;
  --today-message-border: rgba(181, 154, 255, 0.2);
  --today-message-background: rgba(181, 154, 255, 0.08);
}

.today-awareness-message--green {
  --today-message-accent: #8af5a7;
  --today-message-border: rgba(138, 245, 167, 0.16);
  --today-message-background: rgba(138, 245, 167, 0.06);
}

.today-awareness-message--reminder {
  --today-message-accent: #ffd98a;
  --today-message-border: rgba(255, 217, 138, 0.22);
  --today-message-background: rgba(255, 217, 138, 0.07);
}

.today-awareness-copy {
  max-width: 720px;
  width: 100%;
  min-height: 56px;
  padding-bottom: 18px;
  align-self: stretch;
  color: var(--today-message-accent);
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
}

.today-awareness-action {
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--today-message-accent) 42%, transparent);
  border-radius: 8px;
  background: transparent;
  color: var(--today-message-accent);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  font-style: normal;
}

.today-awareness-actions {
  position: absolute;
  right: 14px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
}

.today-awareness-dismiss {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--today-message-accent) 42%, transparent);
  border-radius: 8px;
  background: transparent;
  color: var(--today-message-accent);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
}

.today-awareness-dismiss:hover {
  background: color-mix(in srgb, var(--today-message-accent) 12%, transparent);
}

.today-awareness-action:hover {
  background: color-mix(in srgb, var(--today-message-accent) 12%, transparent);
}

.wins-fly-diamond {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
}

.today-wins-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.today-wins-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #14282d, #14282d);
  border: 1px solid var(--surface-border);
}

.win-rank {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.win-body {
  display: grid;
  gap: 6px;
}

.win-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.win-title-row strong {
  min-width: 0;
}

.win-title-button {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.win-title-button:not(:disabled):hover strong {
  color: var(--accent-strong);
}

.win-title-button:disabled {
  cursor: default;
}

.win-do-now-button {
  border: 1px solid rgba(77, 116, 255, 0.28);
  background: rgba(77, 116, 255, 0.1);
  color: var(--accent-strong);
  border-radius: 999px;
  min-height: 30px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.win-do-now-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.today-card-footnote {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 8px;
  font-size: 0.88rem;
}

.today-progress-list {
  display: grid;
  gap: 10px;
}

.today-progress-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface-border);
}

.today-progress-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.today-progress-body {
  display: grid;
  gap: 6px;
}

.progress-ring-badge {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(77, 116, 255, 0.12), var(--surface-elevated));
  border: 1px solid rgba(77, 116, 255, 0.18);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
}

.progress-row-arrow {
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
}

.thought-board-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.thought-board-intro-top {
  margin-bottom: 18px;
}

.thought-board-column-shell {
  display: grid;
  gap: 18px;
}

.thought-board-columns-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.thought-board-column {
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, rgba(15, 32, 62, 0.06), rgba(15, 32, 62, 0.01));
  padding: 14px;
}

.thought-board-column-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.thought-board-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-height: 140px;
  max-height: 62vh;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.thought-board-list::-webkit-scrollbar {
  display: none;
}

.thought-board-list .dump-item {
  min-height: 116px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-elevated) 100%);
  border-color: rgba(95, 122, 163, 0.22);
  box-shadow: 0 8px 20px rgba(10, 26, 50, 0.12);
}

.thought-board-list .dump-item:nth-child(4n + 1),
.thought-board-list .dump-item:nth-child(4n + 2),
.thought-board-list .dump-item:nth-child(4n + 3),
.thought-board-list .dump-item:nth-child(4n + 4) {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-elevated) 100%);
}

.thought-board-list .dump-text {
  font-size: 1.02rem;
  line-height: 1.4;
}

.thought-board-list .dump-footer {
  margin-top: 14px;
  align-items: center;
}

.thought-board-list .dump-time {
  display: none;
}

.thought-card-menu-wrap {
  position: absolute;
  top: 36px;
  right: 10px;
  z-index: 25;
}

.today-weekly-completed-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(95, 122, 163, 0.12);
  display: grid;
  gap: 10px;
}

.thought-board-intro {
  display: grid;
  align-content: start;
  gap: 16px;
}

.thought-board-copy {
  color: var(--muted);
  line-height: 1.6;
}

.thought-board-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(77, 116, 255, 0.08), rgba(39, 176, 125, 0.08));
}

.thought-board-stat #addThoughtButton {
  margin-left: auto;
}

.thought-board-stat strong {
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.calendar-main-card {
  display: grid;
  gap: 14px;
}

.calendar-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-view-buttons,
.calendar-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.calendar-toolbar-actions {
  gap: 8px;
}

.calendar-month-picker {
  width: 132px;
  min-height: 42px;
  padding: 9px 10px;
}

.calendar-view-button,
.calendar-filter-chip {
  border-radius: 12px;
  padding: 3px 10px;
  min-height: 30px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.calendar-filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
}

.calendar-filter-chip {
  background: transparent;
  border-color: transparent;
}

.calendar-view-button.active,
.calendar-filter-chip.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
  color: #fff;
}

.calendar-grid-shell {
  border-radius: 18px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-elevated));
  padding: 10px;
  min-height: 560px;
  height: 560px;
  overflow: hidden;
}

.calendar-grid {
  display: grid;
  gap: 8px;
  height: 100%;
}

.calendar-grid.month {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto repeat(6, minmax(0, 1fr));
}

.calendar-grid.week {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1fr);
}

.calendar-grid.day {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.calendar-grid.month .calendar-day-cell {
  height: auto;
  min-height: 0;
}

.calendar-weekday {
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  padding: 0 6px;
}

.calendar-day-cell {
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  height: 96px;
  background: var(--surface-1);
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: hidden;
}

.calendar-grid.week .calendar-day-cell,
.calendar-grid.day .calendar-day-cell {
  height: auto;
  min-height: 0;
}

.calendar-day-cell.is-other-month {
  opacity: 0.55;
}

.calendar-day-cell.is-today {
  border-color: rgba(77, 116, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(77, 116, 255, 0.3);
}

.calendar-day-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
}

.calendar-event-list {
  display: grid;
  gap: 6px;
  align-content: start;
}

.calendar-grid.month .calendar-event-list {
  max-height: 58px;
  overflow: auto;
}

.calendar-grid.week .calendar-event-list,
.calendar-grid.day .calendar-event-list {
  max-height: none;
  overflow: auto;
}

.calendar-event-chip {
  width: 100%;
  text-align: left;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 6px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(77, 116, 255, 0.14);
  color: var(--text);
}

.calendar-grid.month .calendar-event-chip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-grid.week .calendar-event-chip,
.calendar-grid.day .calendar-event-chip {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}

.calendar-event-chip.type-task { background: rgba(77, 116, 255, 0.18); }
.calendar-event-chip.type-note { background: rgba(62, 153, 118, 0.2); }
.calendar-event-chip.type-reminder { background: rgba(236, 178, 74, 0.24); }
.calendar-event-chip.type-event { background: rgba(157, 116, 255, 0.2); }
.calendar-event-chip.type-general { background: rgba(124, 136, 158, 0.22); }

.calendar-event-chip.overdue {
  border-color: rgba(229, 111, 115, 0.7);
}

.calendar-event-chip.is-due-date {
  border-color: rgba(77, 116, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(77, 116, 255, 0.2);
}

.calendar-grid-shell,
.calendar-event-list,
.calendar-filter-chips,
.calendar-editor-dialog {
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 145, 182, 0.55) transparent;
}

.calendar-grid-shell::-webkit-scrollbar,
.calendar-event-list::-webkit-scrollbar,
.calendar-filter-chips::-webkit-scrollbar,
.calendar-editor-dialog::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.calendar-grid-shell::-webkit-scrollbar-track,
.calendar-event-list::-webkit-scrollbar-track,
.calendar-filter-chips::-webkit-scrollbar-track,
.calendar-editor-dialog::-webkit-scrollbar-track {
  background: transparent;
}

.calendar-grid-shell::-webkit-scrollbar-thumb,
.calendar-event-list::-webkit-scrollbar-thumb,
.calendar-filter-chips::-webkit-scrollbar-thumb,
.calendar-editor-dialog::-webkit-scrollbar-thumb {
  background: rgba(122, 145, 182, 0.55);
  border-radius: 999px;
}

.calendar-due-switch {
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  user-select: none;
}

.calendar-due-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.calendar-due-switch-track {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  position: relative;
  background: rgba(124, 136, 158, 0.35);
  border: 1px solid var(--surface-border);
  transition: background 120ms ease;
}

.calendar-due-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  transition: transform 120ms ease;
}

.calendar-due-switch input:checked + .calendar-due-switch-track {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.calendar-due-switch input:checked + .calendar-due-switch-track::after {
  transform: translateX(16px);
}

.calendar-due-switch input:checked ~ .calendar-due-switch-label {
  color: var(--text);
}

.calendar-side-rail {
  display: grid;
  gap: 18px;
  align-content: start;
}

.calendar-summary-card,
.calendar-form-card {
  display: grid;
  gap: 12px;
}

.calendar-summary-block {
  display: grid;
  gap: 6px;
}

.calendar-summary-block h3 {
  margin: 0;
  font-size: 0.95rem;
}

.calendar-summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.calendar-summary-list li {
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface-1);
  font-size: 0.82rem;
}

.calendar-form-grid {
  display: grid;
  gap: 10px;
}

.calendar-form-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--muted);
}

.calendar-form-grid textarea.settings-input {
  resize: vertical;
}

.calendar-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.calendar-editor-modal.hidden {
  display: none;
}

.calendar-editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 30, 0.62);
  backdrop-filter: blur(6px);
}

.calendar-editor-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}

#calendarFormStatus[data-kind='error'] {
  color: var(--danger);
}

#calendarFormStatus[data-kind='success'] {
  color: var(--success);
}

.facts-list,
.done-list,
.recovery-list,
.state-notes {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts-list li,
.state-notes li,
.done-item,
.recovery-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(95, 122, 163, 0.12);
}

.facts-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.fact-marker,
.done-marker {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(39, 176, 125, 0.12);
  color: #1f9a69;
  font-size: 0.75rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.facts-list li:last-child,
.state-notes li:last-child,
.done-item:last-child,
.recovery-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.state-notes li span {
  color: var(--muted);
  margin-right: 8px;
}

.panic-card {
  padding: 18px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-elevated));
  border: 1px solid var(--surface-border);
  box-shadow: 0 10px 24px rgba(55, 77, 120, 0.05);
}

.panic-card h2 {
  margin: 10px 0 8px;
}

.panic-card p {
  color: var(--muted);
}

.done-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.done-item strong {
  font-size: 0.94rem;
}

.done-body {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.insights-completed-list .done-body {
  display: grid;
  gap: 6px;
  align-items: start;
}

.insights-completed-list .done-actions {
  display: flex;
  justify-content: flex-start;
}

.insights-completed-list .done-restore-button {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
}

.insights-completed-list .done-restore-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.recovery-item {
  display: grid;
  gap: 10px;
}

.recovery-item .recovery-question {
  font-weight: 600;
}

.choice-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.choice-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.choice-chip-positive {
  background: rgba(39, 176, 125, 0.12);
  color: #1f9a69;
  border-color: rgba(39, 176, 125, 0.18);
}

.choice-chip-negative {
  background: rgba(229, 111, 115, 0.12);
  color: #d25761;
  border-color: rgba(229, 111, 115, 0.18);
}

.choice-chip-warning {
  background: rgba(241, 169, 75, 0.14);
  color: #c5861e;
  border-color: rgba(241, 169, 75, 0.18);
}

.choice-chip-calm {
  background: rgba(77, 116, 255, 0.1);
  color: #2f5cf0;
  border-color: rgba(77, 116, 255, 0.18);
}

.today-done-card,
.today-recovery-card,
.today-grounding-card,
.today-in-progress-card {
  position: relative;
  overflow: hidden;
}

.today-done-card::after {
  content: '';
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 110px;
  height: 70px;
  background: linear-gradient(135deg, rgba(77, 116, 255, 0.08), rgba(77, 116, 255, 0));
  clip-path: polygon(0 100%, 26% 60%, 40% 78%, 61% 35%, 79% 68%, 100% 18%, 100% 100%);
  opacity: 0.9;
  pointer-events: none;
}

.today-recovery-card::before {
  content: '';
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(138, 108, 255, 0.12) 0%, rgba(138, 108, 255, 0) 70%);
  pointer-events: none;
}

.board-footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1fr;
  gap: 18px;
}

.stress-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stress-value strong {
  font-size: 2.2rem;
  letter-spacing: -0.04em;
}

.stress-chart {
  display: grid;
  grid-auto-flow: column;
  gap: 10px;
  align-items: end;
  min-height: 108px;
  margin: 10px 0 12px;
}

.stress-bar {
  width: 100%;
  border-radius: 999px 999px 10px 10px;
  background: linear-gradient(180deg, #6fd0a1 0%, #39b97f 100%);
}

.stress-caption {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.focus-card {
  display: grid;
  gap: 16px;
  place-content: center;
  text-align: center;
}

.focus-timer-ring {
  background: linear-gradient(180deg, var(--surface-elevated) 0%, var(--surface-2) 100%);
  border: 1px solid var(--surface-border);
  height: 172px;
  margin: 0 auto;
  border-radius: 999px;
  display: grid;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-3) 100%);
  background:
    radial-gradient(circle at center, var(--surface-elevated) 58%, transparent 59%),
    conic-gradient(from 180deg, #31b87d 0deg, #bce8d7 230deg, #eef4fb 230deg 360deg);
  box-shadow: inset 0 0 0 1px var(--surface-border);
}

.focus-duration {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.focus-timer-ring span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.quick-capture-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.quick-capture-card {
  position: relative;
  overflow: hidden;
}

.mobile-quick-capture-launcher,
.mobile-quick-capture-backdrop {
  display: none;
}

.mobile-quick-capture-launcher svg {
  width: 24px;
  height: 24px;
  display: block;
}

.quick-capture-row input,
.quick-capture-row textarea {
  flex: 1 1 auto;
  border: 1px solid var(--surface-border);
  background: #0A1528;
  border-radius: 16px;
  min-height: 120px;
  padding: 14px 16px;
  line-height: 1.35;
  min-width: 0;
  resize: none;
  font: inherit;
}

.quick-capture-chips {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  margin-top: 12px;
}

.quick-capture-chips .chip-button {
  flex: 1 1 0;
  min-width: 0;
  padding: 4px 2px 4px 2px;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.15;
  white-space: nowrap;
  text-align: center;
  justify-content: flex-start;
}

.quick-capture-feedback {
  min-height: 1.25rem;
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(19, 32, 51, 0.45);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.quick-capture-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.quick-capture-feedback.is-task {
  color: #ffffff;
}

.quick-capture-feedback.is-thought {
  color: #ffffff;
}

.quick-capture-chips .chip-button.quick-capture-chip-active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(77, 116, 255, 0.26);
}

.quick-capture-dust-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.quick-capture-ghost-text {
  position: absolute;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  filter: blur(0);
  animation: quick-capture-ghost-dissolve 760ms ease forwards;
}

.quick-capture-dust {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(102, 128, 170, 0.75));
  opacity: 0;
  animation: quick-capture-dust-fall var(--duration, 900ms) ease-out var(--delay, 0ms) forwards;
}

.recovery-modal {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.recovery-modal.hidden {
  display: none;
}

.recovery-modal-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(148, 123, 255, 0.2), rgba(148, 123, 255, 0) 36%),
    radial-gradient(circle at 80% 82%, rgba(111, 87, 218, 0.18), rgba(111, 87, 218, 0) 42%),
    rgba(15, 22, 40, 0.6);
  backdrop-filter: blur(8px);
}

.recovery-modal-backdrop::before,
.recovery-modal-backdrop::after {
  content: '';
  position: absolute;
  left: -20%;
  right: -20%;
  border-radius: 48% 52% 46% 54% / 54% 44% 56% 46%;
  pointer-events: none;
}

.recovery-modal-backdrop::before {
  top: 12%;
  height: 40%;
  background: radial-gradient(circle at 50% 50%, rgba(168, 143, 255, 0.24) 0%, rgba(168, 143, 255, 0.04) 55%, rgba(168, 143, 255, 0) 75%);
  animation: calmWaveDriftA 9s ease-in-out infinite alternate;
}

.recovery-modal-backdrop::after {
  top: 50%;
  height: 36%;
  background: radial-gradient(circle at 50% 50%, rgba(126, 102, 236, 0.22) 0%, rgba(126, 102, 236, 0.05) 56%, rgba(126, 102, 236, 0) 76%);
  animation: calmWaveDriftB 12s ease-in-out infinite alternate;
}

.recovery-music-select-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.recovery-modal-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  align-items: start;
}

.board-grid-bucket-filtered .board-sidebar {
  display: none;
}

.board-grid-bucket-filtered .board-columns-shell {
  width: 100%;
}

.board-columns.board-columns-bucket-filtered:not(.board-columns-bucket-multi) {
  grid-template-columns: minmax(0, 1fr);
}

.board-columns.board-columns-bucket-multi {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.board-columns.board-columns-bucket-multi .board-task-list-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recovery-modal-heading-copy {
  min-width: 0;
}

.recovery-music-controls {
  display: grid;
  gap: 10px;
  margin-right: 28px;
  padding: 10px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background: var(--surface-1);
}

.recovery-music-controls .recovery-music-row {
  margin-top: 0;
}

.recovery-music-play-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: var(--surface-1);
  color: var(--accent-strong);
  font-size: 0.78rem;
  line-height: 1;
}

.recovery-music-play-button:hover:not(:disabled) {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
}

.recovery-music-play-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 640px) {
  .recovery-modal-heading-row {
    grid-template-columns: 1fr;
  }

  .recovery-music-controls {
    margin-right: 0;
  }
}

.recovery-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(780px, calc(100vw - 28px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(170deg, var(--surface-elevated) 0%, var(--surface-2) 100%);
  box-shadow: 0 28px 72px rgba(11, 22, 42, 0.34);
  padding: 24px 24px 18px;
  display: grid;
  gap: 14px;
}

.recovery-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
  color: var(--muted);
  font-size: 1.2rem;
}

.recovery-modal-copy {
  margin: 0;
  color: var(--muted);
}

.recovery-progress-shell {
  display: grid;
  gap: 7px;
}

.recovery-step-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recovery-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(103, 124, 156, 0.2);
  overflow: hidden;
}

.recovery-progress-fill {
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #4d74ff 0%, #37c08c 100%);
  transition: width 200ms ease;
}

.recovery-step-panel {
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--surface-1);
  display: grid;
  gap: 12px;
}

.recovery-step-panel.hidden {
  display: none;
}

.recovery-step-panel h3 {
  margin: 0;
  font-size: 1.1rem;
}

.recovery-step-panel p {
  margin: 0;
  color: var(--muted);
}

.recovery-textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--surface-border);
  border-radius: var(--control-radius);
  background: var(--surface-elevated);
  color: var(--text);
  padding: var(--control-padding);
  font: inherit;
}

.recovery-field-meta {
  display: flex;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.8rem;
}

.recovery-breathing-presets {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.recovery-music-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
}

.recovery-music-toggle input {
  width: 16px;
  height: 16px;
}

.recovery-breathing-status {
  display: grid;
  gap: 6px;
  justify-items: center;
  border: 1px dashed var(--surface-border);
  border-radius: 16px;
  padding: 18px 14px;
  background: linear-gradient(165deg, rgba(77, 116, 255, 0.08) 0%, rgba(55, 192, 140, 0.08) 100%);
}

.recovery-breathing-status strong {
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.recovery-ground-columns {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recovery-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recovery-grounding-choice {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
}

.recovery-grounding-choice .recovery-choice-chip {
  padding-right: 28px;
}

.recovery-grounding-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--surface-border);
  border-radius: 50%;
  background: var(--surface-elevated);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1;
}

.recovery-grounding-remove:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.recovery-grounding-add {
  margin-top: 10px;
}

.recovery-choice-chip {
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
}

.recovery-choice-chip.is-selected {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(77, 116, 255, 0.22);
}

.recovery-step-hint {
  font-size: 0.85rem;
}

.recovery-action-list {
  display: grid;
  gap: 9px;
}

.recovery-action-group {
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background: var(--surface-1);
  overflow: hidden;
}

.recovery-action-group-header {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--surface-border);
  background: linear-gradient(180deg, rgba(77, 116, 255, 0.08), rgba(77, 116, 255, 0.02));
  color: var(--text);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.recovery-action-group-header span {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.8rem;
}

.recovery-action-group-chevron {
  color: var(--muted);
  font-size: 0.9rem;
}

.recovery-action-group-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.recovery-action-group-body[hidden] {
  display: none;
}

.recovery-action-option {
  width: 100%;
  text-align: left;
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
  border-radius: 14px;
  padding: 11px 12px;
  display: grid;
  gap: 4px;
}

.recovery-action-option strong {
  font-size: 0.92rem;
}

.recovery-action-option span {
  color: var(--muted);
  font-size: 0.78rem;
}

.recovery-action-option.is-selected {
  border-color: rgba(61, 128, 236, 0.58);
  box-shadow: 0 0 0 3px rgba(77, 116, 255, 0.14);
}

.recovery-fact-summary {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.recovery-fact-summary li {
  color: var(--text);
}

.recovery-action-summary {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.recovery-modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

@keyframes quick-capture-ghost-dissolve {
  0% {
    opacity: 0.95;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }

  55% {
    opacity: 0.6;
    transform: translate3d(0, 10px, 0) scale(0.98);
    filter: blur(0.9px);
  }

  100% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.95);
    filter: blur(2.3px);
  }
}

@keyframes quick-capture-dust-fall {
  0% {
    opacity: 0.8;
    transform: translate3d(0, 0, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--drift-x, 0px), var(--fall-y, 66px), 0) scale(0.5);
  }
}

.today-admin-bits-card {
  display: grid;
  gap: 14px;
}

@media (min-width: 1501px) {
  .today-duo-grid > .side-card {
    align-content: start;
  }

  .today-admin-bits-card {
    gap: 0;
  }

  .today-admin-bits-card .section-heading.compact {
    position: relative;
  }

  .today-admin-bits-card .today-admin-bits-head-actions {
    position: absolute;
    top: 0;
    right: 0;
  }
}

.today-admin-bits-list {
  display: grid;
  gap: 6px;
}

.today-admin-bits-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.today-admin-bit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
}

.today-admin-bit-row.dragging {
  opacity: 0.65;
}

.today-admin-bit-handle {
  color: var(--muted);
  font-weight: 700;
  cursor: grab;
  user-select: none;
}

.today-admin-bit-text {
  font-weight: 500;
  flex: 1 1 auto;
  font-size: 0.82rem;
}

.today-admin-bit-actions {
  display: flex;
  gap: 4px;
}

.today-admin-bit-actions .ghost-button {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.today-admin-bit-actions .ghost-button svg {
  width: 12px;
  height: 12px;
  display: block;
}

#todayAdminBitsViewAllButton {
  font-size: 0.72rem;
  padding: 3px 8px;
}

.today-admin-bits-view-all-button {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 6px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
}

.today-admin-bits-view-all-button svg {
  width: 17px;
  height: 17px;
}

.admin-bits-modal-dialog {
  width: min(780px, calc(100vw - 32px));
}

.admin-bits-modal-list {
  max-height: 58vh;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.admin-bits-modal-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
}

.admin-bits-modal-row.is-done {
  opacity: 0.75;
}

.admin-bits-modal-row.dragging {
  opacity: 0.6;
}

.admin-bits-drag-handle {
  color: var(--muted);
  font-weight: 800;
  cursor: grab;
  user-select: none;
}

.admin-bits-modal-text {
  font-weight: 500;
}

.admin-bits-modal-row.is-done .admin-bits-modal-text {
  text-decoration: line-through;
}

.admin-bits-modal-actions .ghost-button {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-bits-modal-actions .ghost-button svg {
  width: 12px;
  height: 12px;
  display: block;
}

.admin-bits-modal-actions {
  display: flex;
  gap: 8px;
}

.quick-capture-help-content {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.quick-capture-help-item {
  display: grid;
  gap: 6px;
}

.quick-capture-help-item strong {
  color: var(--accent-strong);
  font-weight: 700;
}

.quick-capture-help-item p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.board-quote {
  margin-top: 4px;
  padding: 18px 22px;
  border-radius: 20px;
  background: linear-gradient(90deg, #304567 0%, #1e314f 100%);
  color: white;
  box-shadow: 0 16px 34px rgba(29, 43, 71, 0.18);
}

.board-quote span {
  display: block;
  text-align: center;
  opacity: 0.96;
}

/* Backdrop — reuse the focus-session atmosphere behind AI chat. */
.ai-chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 59;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(148, 123, 255, 0.2), rgba(148, 123, 255, 0) 36%),
    radial-gradient(circle at 80% 82%, rgba(111, 87, 218, 0.18), rgba(111, 87, 218, 0) 42%),
    rgba(15, 22, 40, 0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 1800ms cubic-bezier(0.22, 1, 0.36, 1), backdrop-filter 1800ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.ai-chat-backdrop::before,
.ai-chat-backdrop::after {
  content: '';
  position: absolute;
  left: -20%;
  right: -20%;
  border-radius: 48% 52% 46% 54% / 54% 44% 56% 46%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-backdrop::before {
  top: 12%;
  height: 40%;
  background: radial-gradient(circle at 50% 50%, rgba(168, 143, 255, 0.24) 0%, rgba(168, 143, 255, 0.04) 55%, rgba(168, 143, 255, 0) 75%);
  animation: calmWaveDriftA 9s ease-in-out infinite alternate;
}

.ai-chat-backdrop::after {
  top: 50%;
  height: 36%;
  background: radial-gradient(circle at 50% 50%, rgba(126, 102, 236, 0.22) 0%, rgba(126, 102, 236, 0.05) 56%, rgba(126, 102, 236, 0) 76%);
  animation: calmWaveDriftB 12s ease-in-out infinite alternate;
}

.ai-chat-backdrop--visible {
  opacity: 1;
  pointer-events: all;
}

.ai-chat-backdrop--visible::before,
.ai-chat-backdrop--visible::after {
  opacity: 1;
}

.ai-chat-backdrop.hidden {
  display: none;
}

.ai-chat-launcher {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  z-index: 60;
  border-radius: 999px;
  padding: 11px 18px;
  border: 1px solid rgba(95, 122, 163, 0.35);
  color: #f4f8ff;
  background: linear-gradient(135deg, #2f5ac0 0%, #3d7be2 100%);
  box-shadow: 0 8px 32px rgba(24, 42, 88, 0.55), 0 2px 8px rgba(0,0,0,0.3);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  white-space: nowrap;
}

/* Notification dot — shown when AI has initiated a message */
.ai-chat-panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 76px;
  z-index: 61;
  width: min(620px, calc(100vw - 24px));
  max-height: min(82vh, 860px);
  border-radius: 18px;
  border: 1px solid var(--surface-border);
  background: var(--surface-elevated);
  box-shadow: 0 24px 48px rgba(24, 39, 68, 0.25);
  padding: 14px;
  display: grid;
  grid-template-rows: auto minmax(160px, 1fr) auto auto;
  gap: 10px;
  animation: panel-slide-up 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ai-chat-panel.is-busy .ai-chat-messages {
  cursor: progress;
}

.ai-chat-panel.is-busy .ai-chat-messages button,
.ai-chat-panel.is-busy .ai-chat-messages [role='button'] {
  pointer-events: none;
  cursor: progress;
}

.ai-chat-panel.is-busy .ai-chat-form {
  opacity: 0.94;
}

/* Workflow rail: the compact mark stays on the chat's left edge and expands
   outward so the conversation never loses horizontal space. */
.ai-chat-workflow-rail {
  position: absolute;
  top: 96px;
  right: 100%;
  z-index: 3;
  width: 34px;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(180deg, rgba(20, 31, 52, 0.98), rgba(10, 21, 40, 0.99));
  box-shadow: -10px 12px 26px rgba(4, 10, 24, 0.24);
  transition: width 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-workflow-rail:hover,
.ai-chat-workflow-rail:focus-within,
.ai-chat-workflow-rail.is-open {
  width: 274px;
  height: auto;
}

.ai-chat-workflow-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.ai-chat-workflow-toggle svg {
  width: 20px;
  height: 20px;
}

.ai-chat-workflow-list {
  display: grid;
  gap: 2px;
  box-sizing: border-box;
  width: 274px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 10px 42px 10px 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition: opacity 140ms ease, transform 180ms ease;
}

.ai-chat-workflow-rail:hover .ai-chat-workflow-list,
.ai-chat-workflow-rail:focus-within .ai-chat-workflow-list,
.ai-chat-workflow-rail.is-open .ai-chat-workflow-list {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.ai-chat-workflow-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.ai-chat-workflow-item:hover,
.ai-chat-workflow-item:focus-visible {
  border-color: rgba(138, 245, 167, 0.2);
  background: rgba(138, 245, 167, 0.1);
  outline: none;
}

.ai-chat-workflow-item strong {
  font-size: 0.82rem;
  font-weight: 700;
}

.ai-chat-workflow-item span {
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.3;
}

.ai-chat-workflow-item:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.ai-chat-panel.onboarding-gated .ai-chat-form {
  display: none;
}

.ai-chat-panel.morning-overview-pending .ai-chat-status {
  display: none;
}

.ai-chat-panel.onboarding-gated {
  bottom: 104px;
}

@media (max-width: 720px) {
  .ai-chat-panel.onboarding-gated {
    bottom: 72px;
  }
}

.ai-chat-task-tabs {
  position: absolute;
  left: calc(100% - 1px);
  right: auto;
  top: 96px;
  z-index: 2;
  display: grid;
  gap: 8px;
  max-height: calc((122px * 4) + (8px * 3));
  overflow-y: auto;
  overflow-x: visible;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
}

.ai-chat-task-tabs.hidden {
  display: none;
}

.ai-chat-task-tabs::-webkit-scrollbar {
  display: none;
}

.ai-chat-task-tabs.is-scrollable {
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 18px, black calc(100% - 18px), transparent);
  mask-image: linear-gradient(to bottom, transparent, black 18px, black calc(100% - 18px), transparent);
}

.ai-chat-task-tab {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  justify-content: flex-start;
  width: 30px;
  height: 122px;
  min-height: 122px;
  padding: 10px 6px;
  border-radius: 0 12px 12px 0;
  border: 1px solid var(--surface-border);
  border-left: none;
  background: linear-gradient(180deg, rgba(20, 31, 52, 0.96), rgba(14, 22, 42, 0.98));
  color: var(--text);
  box-shadow: 10px 12px 26px rgba(4, 10, 24, 0.24);
  cursor: pointer;
  letter-spacing: 0.08em;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  overflow: hidden;
  transition:
    width 180ms cubic-bezier(0.22, 1, 0.36, 1),
    min-height 180ms cubic-bezier(0.22, 1, 0.36, 1),
    padding 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-task-tabs .ai-chat-task-tab {
  position: relative;
}

.ai-chat-task-tab-snippet {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  margin-left: 8px;
  line-height: 1.15;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.ai-chat-task-tab-popout {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 0;
  color: var(--text);
  opacity: 0;
  transition:
    opacity 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
  display: grid;
  gap: 6px;
  text-align: left;
  z-index: 4;
  transform: translateX(-10px);
}

.ai-chat-task-tab-full-title {
  font-size: 0.88rem;
  line-height: 1.2;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}

.ai-chat-task-tab-description {
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  line-clamp: 4;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-chat-task-tab:hover,
.ai-chat-task-tab:focus-visible {
  width: 280px;
  height: 122px;
  min-height: 122px;
  padding: 10px 12px 10px 10px;
  justify-content: flex-start;
  border-color: rgba(138, 245, 167, 0.45);
  box-shadow: 0 0 0 1px rgba(138, 245, 167, 0.12), 10px 12px 26px rgba(4, 10, 24, 0.24);
  outline: none;
}

.ai-chat-task-tab:hover .ai-chat-task-tab-popout,
.ai-chat-task-tab:focus-visible .ai-chat-task-tab-popout {
  opacity: 1;
  transform: translateX(0);
}

.ai-chat-task-tab:hover,
.ai-chat-task-tab:focus-visible {
  z-index: 5;
}

.ai-chat-task-tab.is-active {
  background: linear-gradient(180deg, rgba(138, 245, 167, 0.18), rgba(20, 31, 52, 0.98));
  color: var(--accent);
}

.ai-chat-task-tab.hidden {
  display: none;
}

@keyframes panel-slide-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(72px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes panel-slide-up-mobile {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-chat-panel.hidden {
  display: none;
}

/* ─── Side-by-side: task details modal + AI chat ─── */
.details-modal.with-ai-chat .details-modal-backdrop {
  background: rgba(8, 11, 22, 0.5);
  backdrop-filter: blur(3px);
}

/*
  Pair layout: modal (900px) + 12px gap + chat (440px) = 1352px combined.
  Center both as a unit: modal left = 50vw - 676px, chat left = 50vw + 236px.
*/
@media (min-width: 1380px) {
  /* Shift modal slightly left of center so the pair is centered */
  .details-modal.with-ai-chat .details-modal-dialog {
    position: absolute;
    top: 50%;
    left: calc(50% - 676px);
    right: auto;
    transform: translateY(-50%);
    /* width and height unchanged from normal */
  }

  /* AI chat sits immediately to the right of the modal */
  .ai-chat-panel.task-assist-mode {
    position: fixed;
    left: calc(50vw + 236px);
    right: auto !important;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    z-index: 150;
    width: 440px;
    height: min(92vh, 880px);
    max-height: min(92vh, 880px);
    animation: panel-task-slide-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

/* Smaller screens: AI chat floats on top with higher z-index */
@media (max-width: 1379px) {
  .ai-chat-panel.task-assist-mode {
    z-index: 150;
  }
}

@keyframes panel-task-slide-in {
  from { opacity: 0; transform: translateY(calc(-50% + 56px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}

/* CE debris diamonds that burst out when chat panel opens */
.ce-debris {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  will-change: transform, opacity;
}

.ai-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.ai-chat-header-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ai-chat-header-symbol {
  height: 22px;
  width: auto;
  animation: ai-symbol-pulse 3s ease-in-out infinite;
}

@keyframes ai-symbol-pulse {
  0%, 100% { filter: drop-shadow(0 0 3px var(--accent)) brightness(1); }
  50%       { filter: drop-shadow(0 0 9px var(--accent)) brightness(1.25); }
}

.ai-chat-header-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.ai-chat-header-actions {
  display: flex;
  gap: 8px;
}

.ai-chat-header-actions .ghost-button {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.ai-chat-messages {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  padding: 12px;
  display: grid;
  gap: 10px;
  align-items: start;
  align-content: start;
}

.ai-chat-task-tab.is-onboarding-new {
  border-color: rgba(138, 245, 167, 0.95);
  color: var(--text);
  box-shadow:
    0 0 0 1px rgba(138, 245, 167, 0.32),
    0 0 16px rgba(138, 245, 167, 0.72),
    0 0 34px rgba(138, 245, 167, 0.34);
  animation: ai-chat-new-task-glow 1.8s ease-in-out infinite;
}

@keyframes ai-chat-new-task-glow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(138, 245, 167, 0.28),
      0 0 12px rgba(138, 245, 167, 0.54),
      0 0 24px rgba(138, 245, 167, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(138, 245, 167, 0.65),
      0 0 22px rgba(138, 245, 167, 0.92),
      0 0 42px rgba(138, 245, 167, 0.42);
  }
}

.ai-chat-onboarding {
  height: 620px;
  box-sizing: border-box;
  min-height: 100%;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  padding: 34px 24px 40px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 12%, rgba(138, 245, 167, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(10, 27, 39, 0.72), rgba(10, 21, 40, 0.96));
  border-radius: 12px;
}

.ai-chat-onboarding-symbol {
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 12px rgba(138, 245, 167, 0.55)) drop-shadow(0 0 34px rgba(138, 245, 167, 0.28));
  animation: ai-onboarding-symbol-pulse 3s ease-in-out infinite;
}

.ai-chat-onboarding h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.8rem, 5vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.ai-chat-onboarding-logo {
  width: min(260px, 72%);
  height: auto;
  object-fit: contain;
  margin: -10px 0 0;
  filter: drop-shadow(0 0 12px rgba(138, 245, 167, 0.35)) drop-shadow(0 0 30px rgba(138, 245, 167, 0.18));
}

.ai-chat-onboarding p {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.ai-chat-onboarding p:last-of-type {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.ai-chat-onboarding-name-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.ai-chat-onboarding-name-input {
  width: min(280px, 84%);
  box-sizing: border-box;
  padding: 10px 13px;
  border: 1px solid rgba(138, 245, 167, 0.32);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(8, 22, 34, 0.74);
  text-align: center;
  font: inherit;
}

.ai-chat-onboarding-name-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138, 245, 167, 0.12);
}

.ai-chat-onboarding-start {
  min-width: 132px;
  margin-top: 10px;
  text-transform: lowercase;
}

.ai-chat-onboarding-thinking {
  min-height: 620px;
  align-content: center;
}

@media (max-width: 720px) {
  .ai-chat-onboarding {
    height: min(620px, calc(100vh - 250px));
    min-height: 360px;
  }

  .ai-chat-onboarding-thinking {
    min-height: 360px;
  }
}

.ai-chat-onboarding-thinking p {
  max-width: 34ch;
  color: var(--text);
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  line-height: 1.45;
}

.ai-chat-thinking-wave {
  position: relative;
  width: min(280px, 72vw);
  height: 34px;
  overflow: hidden;
  filter: drop-shadow(0 0 9px rgba(138, 245, 167, 0.54));
}

.ai-chat-thinking-wave::before,
.ai-chat-thinking-wave::after {
  content: '';
  position: absolute;
  left: -12%;
  width: 124%;
  height: 18px;
  top: 8px;
  background: linear-gradient(90deg, transparent, rgba(138, 245, 167, 0.95) 50%, transparent);
  clip-path: polygon(0 52%, 10% 48%, 20% 58%, 30% 42%, 40% 55%, 50% 34%, 60% 55%, 70% 43%, 80% 58%, 90% 47%, 100% 52%, 100% 61%, 90% 56%, 80% 67%, 70% 53%, 60% 64%, 50% 46%, 40% 64%, 30% 53%, 20% 68%, 10% 57%, 0 62%);
  animation: ai-chat-wave 2.8s ease-in-out infinite alternate;
}

.ai-chat-onboarding-follow-up {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

.ai-chat-onboarding-follow-up .primary-button {
  min-width: 168px;
}

.ai-chat-thinking-wave::after {
  height: 9px;
  top: 13px;
  opacity: 0.42;
  filter: blur(7px);
  animation-direction: alternate-reverse;
}

@keyframes ai-onboarding-symbol-pulse {
  0%, 100% { transform: scale(0.96); }
  50% { transform: scale(1.04); }
}

.ai-chat-message {
  max-width: 96%;
  border-radius: 12px;
  padding: 9px 10px;
  line-height: 1.45;
  white-space: normal;
}

.ai-chat-message p,
.ai-chat-message h1,
.ai-chat-message h2,
.ai-chat-message h3,
.ai-chat-message h4,
.ai-chat-message h5,
.ai-chat-message h6,
.ai-chat-message ul,
.ai-chat-message ol {
  margin: 0;
}

.ai-chat-message p + p,
.ai-chat-message p + ul,
.ai-chat-message p + ol,
.ai-chat-message ul + p,
.ai-chat-message ol + p,
.ai-chat-message ul + ul,
.ai-chat-message ol + ol,
.ai-chat-message ul + ol,
.ai-chat-message ol + ul {
  margin-top: 12px;
}

.ai-chat-message h1,
.ai-chat-message h2,
.ai-chat-message h3,
.ai-chat-message h4,
.ai-chat-message h5,
.ai-chat-message h6 {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}

.ai-chat-message h1 + *,
.ai-chat-message h2 + *,
.ai-chat-message h3 + *,
.ai-chat-message h4 + *,
.ai-chat-message h5 + *,
.ai-chat-message h6 + * {
  margin-top: 8px;
}

.ai-chat-message ul,
.ai-chat-message ol {
  padding-left: 22px;
}

.ai-chat-message li + li {
  margin-top: 4px;
}

.ai-chat-message code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(138, 245, 167, 0.1);
  color: var(--accent);
  font-size: 0.92em;
}

.ai-chat-message-user {
  margin-left: auto;
  background: rgba(77, 116, 255, 0.14);
  border: 1px solid rgba(77, 116, 255, 0.24);
}

.ai-chat-message-assistant {
  margin-right: auto;
  background: rgba(57, 86, 128, 0.12);
  border: 1px solid rgba(95, 122, 163, 0.2);
}

.ai-chat-workflow-prompts {
  display: grid;
  gap: 10px;
  padding: 8px 2px 2px;
}

.ai-chat-workflow-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-chat-workflow-card {
  padding: 14px 14px 18px;
  border-radius: 10px;
}

.ai-chat-workflow-card strong { font-size: 0.85rem; }

.ai-chat-workflow-card > span:not(.support-card-icon) { margin-top: 6px; font-size: 0.73rem; }

.ai-chat-workflow-card-grid .ai-chat-workflow-card > * { pointer-events: none; }

/* Rail menu cards keep the compact fixed height; chat step cards size to content */
.ai-chat-workflow-card-grid .ai-chat-workflow-card {
  min-height: 148px;
}

@media (max-width: 480px) {
  .ai-chat-workflow-card-grid { grid-template-columns: 1fr; }
  .ai-chat-workflow-card-grid .ai-chat-workflow-card { min-height: 0; }
}

/* Workflow step cards */
.ai-chat-date-picker-row {
  position: fixed;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(138, 245, 167, 0.28);
  border-radius: 10px;
  background: #0b1829;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.ai-chat-date-picker-row input[type='date'] {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #e8ffee);
  padding: 6px 8px;
  font-size: 0.82rem;
  color-scheme: dark;
}

.ai-chat-date-picker-row input[type='date']::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1);
}

.ai-chat-workflow-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.ai-chat-workflow-card-content {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 4px;
}

.ai-chat-status {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 4px;
  background: transparent;
  color: rgba(232, 255, 238, 0.86);
  font-size: 0.86rem;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: 0.01em;
  overflow: visible;
  isolation: isolate;
}

.ai-chat-status::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: calc(100% + 28px);
  height: 18px;
  background: linear-gradient(90deg, transparent 0%, rgba(138, 245, 167, 0.05) 18%, rgba(138, 245, 167, 0.42) 50%, rgba(138, 245, 167, 0.05) 82%, transparent 100%);
  clip-path: polygon(0 54%, 10% 48%, 20% 56%, 30% 44%, 40% 52%, 50% 38%, 60% 52%, 70% 44%, 80% 56%, 90% 48%, 100% 54%, 100% 64%, 90% 58%, 80% 66%, 70% 54%, 60% 62%, 50% 48%, 40% 62%, 30% 54%, 20% 66%, 10% 58%, 0 64%);
  filter: blur(1.5px);
  opacity: 0.72;
  transform: translateX(-8%);
  animation: ai-chat-wave 3.2s ease-in-out infinite alternate;
  pointer-events: none;
}

.ai-chat-status::after {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: calc(100% + 28px);
  height: 10px;
  border-radius: 50%;
  background: rgba(138, 245, 167, 0.16);
  filter: blur(8px);
  opacity: 0.6;
  transform: translateX(8%);
  animation: ai-chat-wave 3.2s ease-in-out infinite alternate-reverse;
  pointer-events: none;
}

.ai-chat-status[data-mode='thinking'] {
  text-shadow: 0 0 10px rgba(138, 245, 167, 0.08);
}

.ai-chat-status[data-mode='thinking']::before {
  animation-duration: 2.6s;
}

.ai-chat-status[data-mode='thinking']::after {
  animation-duration: 2.6s;
}

.ai-chat-status[hidden] {
  display: none;
}

@keyframes ai-chat-wave {
  from {
    transform: translateX(-8%);
  }
  to {
    transform: translateX(8%);
  }
}

.ai-chat-action-inline {
  display: grid;
  gap: 8px;
}

.ai-chat-action-inline-summary {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.84rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.ai-chat-action-inline-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-primary);
  font-size: 0.82rem;
  line-height: 1.35;
}

.ai-chat-inline-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 10px;
}

.ai-chat-action-inline-lead-in {
  margin: 0 0 8px;
}

/* Workflow step option buttons: small, subtle, no default green fill */
.ai-chat-inline-actions .primary-button,
.ai-chat-inline-actions .ghost-button {
  min-width: 0;
  padding: 4px 10px;
  font-size: 0.76rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  box-shadow: none;
  border: 1px solid rgba(255,255,255,0.1);
}

.ai-chat-inline-actions .primary-button:hover,
.ai-chat-inline-actions .ghost-button:hover {
  background: var(--accent);
  color: #061410;
  border-color: var(--accent);
  transform: none;
}

/* Brain dump sorter: item buttons wrap, clamp to two lines of the window width */
.ai-chat-workflow-card--dump-actions .ai-chat-inline-actions {
  flex-wrap: wrap;
  justify-content: stretch;
}

.ai-chat-workflow-card--dump-actions .ai-chat-inline-actions .primary-button,
.ai-chat-workflow-card--dump-actions .ai-chat-inline-actions .ghost-button {
  flex: 1 1 46%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  max-height: 3.4em;
  padding: 6px 10px;
  text-align: left;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

/* Brain dump sorter: per-item include/skip toggles */
.ai-chat-workflow-item-toggle {
  padding: 2px 8px;
  font-size: 0.68rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.ai-chat-workflow-item-toggle.included {
  border-color: var(--accent);
  color: var(--accent);
}

.ai-chat-workflow-item-toggle.excluded {
  opacity: 0.6;
  border-style: dashed;
}

.ai-chat-workflow-card-list-item.item-excluded span {
  opacity: 0.45;
  text-decoration: line-through;
}

.ai-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.ai-chat-input {
  min-height: 86px;
  border-radius: 12px;
  padding: 10px 12px;
}

.ai-chat-form .primary-button {
  justify-self: end;
  min-width: 100px;
}

.ai-chat-send-icon {
  display: none;
  width: 19px;
  height: 19px;
}

.ai-chat-form.is-busy {
  cursor: progress;
}

.ai-chat-form.is-busy .primary-button,
.ai-chat-form.is-busy .ai-chat-input {
  cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
  .ai-chat-status::before,
  .ai-chat-status::after {
    animation: none;
  }

  .ai-chat-panel,
  .ai-chat-task-tab,
  .ai-chat-task-tab-popout {
    transition-duration: 0.01ms;
  }
}

@media (max-width: 1500px) {
  .board-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .board-columns {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .board-footer-grid,
  .today-supplement-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-feature-grid,
  .today-duo-grid,
  .shared-today-sections,
  .today-utility-grid,
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .thought-board-columns-grid {
    grid-template-columns: 1fr;
  }
}

.board-column .task-list {
  margin-top: 2px;
}

@media (max-width: 1180px) {
  .app-shell,
  .app-shell.sidebar-collapsed,
  .app-shell.right-panel-collapsed,
  .app-shell.sidebar-collapsed.right-panel-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .main-panel {
    order: 1;
  }

  .hero-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .board-grid,
  .board-footer-grid,
  .board-right-rail,
  .today-grid,
  .today-supplement-grid,
  .today-feature-grid,
  .today-duo-grid,
  .shared-today-sections,
  .today-utility-grid,
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-grid.month,
  .calendar-grid.week {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-columns {
    grid-template-columns: 1fr;
  }

  .suggestions-card {
    position: static;
  }
}

/* At tablet widths, keep the content layout intact while treating the side
   menus like the mobile navigation drawer. */
@media (min-width: 721px) and (max-width: 1180px) {
  .app-shell .sidebar,
  .app-shell .right-panel {
    position: fixed;
    top: 10px;
    bottom: 10px;
    height: calc(100dvh - 20px);
    min-height: 0;
    max-height: none;
    width: min(84vw, 320px);
    max-width: 320px;
    display: flex;
    flex-direction: column;
  }

  .app-shell .sidebar {
    border-radius: var(--radius-md);
    z-index: 60;
    overflow: hidden;
    transition: transform 220ms ease;
  }

  .app-shell .right-panel {
    right: 10px;
    z-index: 60;
    transform: translateX(110%);
    transition: transform 220ms ease;
  }

  .app-shell.mobile-right-nav-open .right-panel {
    position: fixed;
    top: 10px;
    right: 10px;
    bottom: 10px;
    left: auto;
    width: min(84vw, 320px);
    max-width: 320px;
    height: calc(100vh - 20px);
    min-height: 0;
    max-height: none;
    transform: translateX(0);
    align-items: stretch;
    padding: 0;
    background: var(--panel);
    border-color: var(--panel-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
  }

  .sidebar {
    left: 10px;
    transform: translateX(-110%);
  }

  .app-shell.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.sidebar-collapsed .sidebar {
    padding: 16px;
    align-items: stretch;
  }

  /* Tablet drawers always show the full navigation, regardless of the
     desktop collapse preference saved in local storage. */
  .app-shell.sidebar-collapsed .brand {
    flex-direction: row;
    gap: 14px;
    padding: 8px 6px 14px;
    justify-content: flex-start;
  }

  .app-shell.sidebar-collapsed .brand-logo {
    display: block;
  }

  .app-shell.sidebar-collapsed .brand-symbol {
    display: none;
  }

  .app-shell.sidebar-collapsed .brand-text {
    display: flex;
  }

  .app-shell.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .app-shell.sidebar-collapsed .nav-content {
    display: flex;
  }

  .app-shell.sidebar-collapsed .sidebar-auth-button {
    width: auto;
    padding: 0 9px;
    overflow: visible;
    font-size: 0.72rem;
  }

  .app-shell.sidebar-collapsed .sidebar-auth-button::before {
    content: none;
  }

  .app-shell.sidebar-collapsed .workspace-switcher-copy,
  .app-shell.sidebar-collapsed .workspace-switcher-chevron {
    display: flex;
  }

  .app-shell.sidebar-collapsed .workspace-switcher-button {
    justify-content: flex-start;
    padding: 9px 10px;
  }

  .app-shell.sidebar-collapsed .workspace-switcher-icon {
    width: 30px;
    height: 30px;
  }

  .app-shell.sidebar-collapsed .workspace-switcher-menu {
    left: 0;
    right: 0;
    top: calc(100% + 8px);
  }

  /* Desktop collapse state must not turn the tablet drawer into an inline panel. */
  .app-shell.right-panel-collapsed .right-panel {
    align-items: stretch;
    padding: 0;
    background: var(--panel);
    border-color: var(--panel-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transform: translateX(110%);
  }

  .app-shell.sidebar-collapsed .navigation,
  .app-shell.right-panel-collapsed .right-panel-body {
    display: flex;
  }

  .app-shell.right-panel-collapsed .right-panel-header {
    flex-direction: row;
    gap: 10px;
    padding: 18px 16px 14px;
    border-bottom: 1px solid rgba(95, 122, 163, 0.12);
    width: auto;
    justify-content: flex-start;
    align-items: center;
  }

  .app-shell.right-panel-collapsed .right-panel-title,
  .app-shell.right-panel-collapsed .right-panel-body {
    display: flex;
  }

  .app-shell.right-panel-collapsed .right-panel-toggle {
    display: grid;
  }

  .app-shell.right-panel-collapsed .right-panel-collapsed-trigger {
    display: none;
  }

  .app-shell.mobile-nav-open .sidebar::after,
  .app-shell.mobile-right-nav-open .right-panel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    pointer-events: none;
    background: linear-gradient(to top, rgba(6, 10, 18, 0.5) 0%, rgba(6, 10, 18, 0) 70%);
    z-index: 2;
  }

  .app-shell.sidebar-collapsed .brand-logo,
  .app-shell.sidebar-collapsed .brand-text,
  .app-shell.sidebar-collapsed .brand-symbol,
  .app-shell.sidebar-collapsed .nav-content,
  .app-shell.sidebar-collapsed .sidebar-mountain {
    display: block;
  }

  .app-shell.sidebar-collapsed .navigation {
    width: 100%;
  }

  .app-shell.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .sidebar-mountain,
  .right-panel-mountain {
    display: none;
  }

  .sidebar .sidebar-toggle {
    display: none;
  }

  .mobile-menu-controls {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left));
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 70;
    display: flex;
    gap: 8px;
  }

  .mobile-sidebar-toggle {
    position: fixed;
    position: relative;
    left: auto;
    bottom: auto;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid !important;
    place-items: center;
    border: 1px solid rgba(138, 245, 167, 0.22);
    background: rgba(7, 17, 31, 0.96);
    color: var(--accent);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    font-size: 1.2rem;
    line-height: 1;
  }

  .mobile-menu-lines {
    display: grid;
    gap: 4px;
    width: 18px;
  }

  .mobile-menu-lines span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .mobile-menu-lines-vertical {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 18px;
    height: 18px;
  }

  .mobile-menu-lines-vertical span {
    width: 2px;
    height: 100%;
  }

  .mobile-sidebar-toggle.is-open .mobile-menu-lines {
    transform: rotate(45deg);
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(2px);
  }
}

@media (max-width: 720px) {
  :root {
    --mobile-action-size: 44px;
  }

  body {
    padding: 12px;
  }

  .main-panel {
    padding: 18px;
  }

  .main-panel.today-layout-active {
    padding: 0;
  }

  .sidebar {
    padding: 16px;
  }

  .topbar,
  .board-topbar,
  .section-heading,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #thoughtBoardView .topbar {
    margin-bottom: 18px;
  }

  .today-card-footnote {
    flex-direction: column;
    align-items: stretch;
  }

  .today-status-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .today-topbar {
    gap: 16px;
    padding: 14px;
    margin-bottom: 20px;
  }

  .today-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .today-actions .ghost-button,
  .today-actions .primary-button {
    width: 100%;
  }

  .today-focus-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .today-focus-action-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .today-subtask-form {
    flex-direction: column;
  }

  .board-topbar-actions {
    justify-content: flex-start;
  }

  .page-search {
    width: 100%;
    flex-basis: auto;
  }

  .board-filter-bar {
    margin-top: -4px;
  }

  .board-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
  }

  .board-filter-row-main .board-filter-dropdown,
  .board-filter-row-main .board-task-type-filter {
    width: 100%;
  }

  .board-filter-bar.is-compact {
    min-height: 44px;
    padding: 8px 12px;
  }

  .board-filter-bar.is-compact .board-filter-dropdown,
  .board-filter-bar.is-compact .board-task-type-filter,
  .board-filter-bar.is-compact .board-filter-active {
    display: none;
  }

  .board-filter-bar.is-compact .board-filter-search {
    flex: 1 1 auto;
    min-width: 0;
  }

  .board-date-stack,
  .board-time {
    display: none;
  }

  .form-spacer {
    display: none;
  }

  .nav-content {
    align-items: flex-start;
  }

  .recovery-modal {
    padding: 10px;
  }

  .recovery-modal-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 16px);
    padding: 18px 14px 14px;
  }

  .recovery-ground-columns {
    grid-template-columns: 1fr;
  }

  .recovery-modal-actions {
    flex-direction: column;
  }

  .ai-chat-launcher {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 12px;
    height: var(--mobile-action-size);
    padding-top: 0;
    padding-bottom: 0;
  }

  .ai-chat-panel {
    left: 50%;
    right: auto;
    width: min(420px, calc(100vw - 20px));
    width: auto;
    bottom: 66px;
    transform: translateX(-50%);
    margin: 0;
  }

  .ai-chat-panel.task-assist-mode {
    left: 50%;
    right: auto !important;
    top: auto;
    bottom: 66px;
    width: min(420px, calc(100vw - 20px));
    max-height: 76vh;
    transform: translateX(-50%);
    margin: 0;
    animation: panel-slide-up 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
    max-height: 78vh;
  }

  .ai-chat-task-tabs {
    display: none;
  }

  .ai-chat-workflow-rail {
    display: none;
  }

  .ai-chat-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .ai-chat-form .primary-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
  }

  .ai-chat-send-label {
    display: none;
  }

  .ai-chat-send-icon {
    display: block;
  }
}

@media (max-width: 900px) {
  /* Keep desktop zoom preferences from changing the mobile layout. */
  .main-panel,
  .sidebar,
  .right-panel {
    zoom: 1 !important;
  }

  .today-topbar-main {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .today-topbar-left,
  .today-topbar-side {
    width: 100% !important;
  }

  .today-topbar-side {
    grid-column: 1 / -1;
    align-items: stretch;
  }

  .navigation .nav-item[data-id="whiteboard"] {
    display: none;
  }

  body {
    padding: calc(10px + env(safe-area-inset-top, 0px) + var(--window-controls-overlay-height)) 10px 10px;
    overflow: auto;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: calc(100dvh - 20px);
    position: relative;
  }

  .main-panel,
  .right-panel {
    width: 100%;
    height: auto;
    max-height: none;
    position: static;
    align-self: stretch;
  }

  .main-panel {
    padding: 16px;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .main-panel.today-layout-active {
    padding: 0;
  }

  .board-grid,
  .board-layout-with-sidebar,
  .board-footer-grid,
  .board-right-rail,
  .today-grid,
  .today-supplement-grid,
  .today-feature-grid,
  .today-duo-grid,
  .today-utility-grid,
  .calendar-layout,
  .thought-board-columns-grid,
  .hero-grid,
  .content-grid,
  .settings-grid,
  .recovery-ground-columns {
    grid-template-columns: 1fr;
  }

  .board-sidebar {
    position: fixed;
    top: 10px;
    left: 10px;
    bottom: 10px;
    width: min(84vw, 320px);
    max-width: 320px;
    height: auto;
    border-right: none;
    border-radius: var(--radius-xl);
    background: rgba(10, 15, 25, 0.94);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
    transform: translateX(-110%);
    transition: transform 220ms ease;
    z-index: 60;
    overflow: hidden;
  }

  .app-shell.sidebar-collapsed .board-sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    padding: 16px;
    align-items: stretch;
  }

  .app-shell.sidebar-collapsed .brand-logo,
  .app-shell.sidebar-collapsed .brand-text,
  .app-shell.sidebar-collapsed .brand-symbol,
  .app-shell.sidebar-collapsed .nav-content,
  .app-shell.sidebar-collapsed .sidebar-mountain {
    display: block;
  }

  .app-shell.sidebar-collapsed .navigation {
    width: 100%;
  }

  .app-shell.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .board-sidebar.collapsed {
    width: min(84vw, 320px);
    margin-left: 0;
  }

  .app-shell.mobile-nav-open .board-sidebar {
    transform: translateX(-110%);
    pointer-events: none;
  }

  .sidebar-content {
    width: 100%;
    padding: 14px;
    height: 100%;
    overflow-y: auto;
  }

  .board-sidebar.collapsed .sidebar-content {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-tab-toggle {
    display: none;
  }

  .connections-tabs .sidebar-tab-toggle {
    display: flex;
  }

  .connections-tabs .sidebar-tab-toggle .toggle-label {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    transform: none;
  }

  .sidebar .sidebar-toggle {
    display: none;
  }

  .board-sidebar.collapsed .sidebar-tab-toggle {
    display: none;
  }

  .sidebar-tab-toggle .toggle-label {
    writing-mode: horizontal-tb;
  }

  .sidebar-tab-toggle .toggle-icon {
    transform: none;
  }

  .board-columns {
    grid-template-columns: 1fr;
  }

  .board-column {
    min-height: auto;
    padding: 14px;
  }

  .board-column:not(.board-column-expanded) > .task-list,
  .board-column:not(.board-column-expanded) > .board-column-footer {
    display: none;
  }

  .board-column:not(.board-column-expanded) {
    cursor: pointer;
  }

  .board-column-expanded {
    cursor: default;
  }

  /* Mobile columns expand in place instead of entering desktop focus mode. */
  .board-columns-focused .board-column,
  .board-columns-focused .board-column-focused,
  .board-columns-focused .board-column-dimmed {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    box-shadow: none !important;
    z-index: auto !important;
  }

  .board-grid-focused .board-right-rail,
  .board-grid-focused .board-right-rail-dimmed {
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
  }

  .today-topbar {
    padding: 14px;
    margin-bottom: 18px;
    gap: 14px;
  }

  .today-topbar-main {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .today-topbar-side {
    display: grid;
    gap: 12px;
  }

  .today-status-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .status-pill {
    padding: 10px;
  }

  .today-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .today-actions .ghost-button,
  .today-actions .primary-button,
  .today-ask-ai-btn,
  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .today-feature-grid,
  .today-duo-grid,
  .today-utility-grid,
  .thought-board-columns-grid {
    gap: 14px;
  }

  #thoughtBoardView .thought-board-column .section-heading {
    align-items: center;
    flex-direction: row;
  }

  #thoughtBoardView .thought-board-column:not(.thought-board-column-expanded) .thought-board-list {
    display: none;
  }

  #thoughtBoardView .thought-board-column-toggle {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  #thoughtBoardView .thought-board-column {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
  }

  #thoughtBoardView .thought-board-column-toggle:focus,
  #thoughtBoardView .thought-board-column-toggle:focus-visible,
  #thoughtBoardView .thought-board-column-toggle:active {
    outline: none;
    background: transparent;
    box-shadow: none;
  }

  #thoughtBoardView .thought-board-copy {
    display: none;
  }

  .today-focus-title-row,
  .today-card-footnote,
  .form-actions,
  .topbar,
  .board-topbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  #brainDumpView .dump-form-actions {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
  }

  #brainDumpView #dumpForm button[type="reset"] {
    display: inline-flex;
  }

  .today-focus-action-buttons,
  .board-topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .today-focus-title-button,
  .today-focus-meta,
  .today-context-msg,
  .today-focus-next-step,
  .lede,
  .thought-board-copy,
  .recovery-analysis-card-body,
  .settings-copy {
    max-width: 100%;
  }

  .today-focus-subtasks,
  .today-subtask-form {
    width: 100%;
    flex-direction: column;
  }

  .today-focus-card {
    gap: 14px;
  }

  .today-focus-card .section-heading.compact {
    gap: 10px;
  }

  .today-focus-card .today-card-heading h2,
  .today-wins-card .today-card-heading h2,
  .today-quick-capture-card .today-card-heading h2 {
    font-size: 1rem;
    line-height: 1.15;
  }

  .today-focus-title-row {
    gap: 10px;
  }

  .today-focus-title-button {
    font-size: 1.85rem;
    line-height: 1.05;
  }

  .today-focus-title-button-empty {
    font-size: 1.5rem;
  }

  .today-focus-action-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  /* Header-specific: keep the action buttons inline inside the card header */
  .section-heading .today-focus-action-buttons {
    display: flex;
    width: auto;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
  }

  /* Hide Right Now header action buttons on small/mobile view */
  @media (max-width: 720px) {
    .section-heading .today-focus-action-buttons {
      display: none;
    }
  }

  .today-focus-action-buttons .ghost-button,
  .today-focus-action-buttons .primary-button {
    min-width: 0;
    padding: 9px 8px;
    border-radius: 14px;
    font-size: 0.82rem;
  }

  .today-focus-action-buttons .primary-button {
    grid-column: 1 / -1;
  }

  .today-focus-action-buttons .timer-icon {
    font-size: 0.95rem;
  }

  .today-focus-subtasks {
    gap: 8px;
  }

  /* Ensure icon-square buttons keep square sizing inside the action buttons area */
  .today-focus-action-buttons .icon-square-button {
    grid-column: auto;
    min-width: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    justify-self: end;
  }

  .today-focus-action-buttons .primary-button.icon-square-button {
    grid-column: auto;
  }

  .today-focus-subtasks .section-kicker {
    font-size: 0.64rem;
  }

  .today-checklist {
    gap: 6px;
  }

  .today-checklist li {
    padding: 8px 0;
    gap: 8px;
    align-items: flex-start;
  }

  .today-checklist .checkmark {
    margin-top: 3px;
  }

  .today-checklist li .task-title,
  .today-checklist li .today-subtask-copy,
  .today-checklist li .today-subtask-copy * {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .today-wins-card {
    gap: 12px;
  }

  .today-wins-card .section-heading.compact {
    gap: 10px;
  }

  .today-wins-select-button {
    padding: 0;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    min-height: 36px;
    display: grid;
    place-items: center;
    position: absolute;
    top: 0;
    right: 0;
  }

  .today-wins-select-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
  }

  .today-wins-card .section-heading.compact {
    position: relative;
    padding-right: 44px;
  }

  .today-grounding-card .section-heading.compact,
  .today-admin-bits-card .section-heading.compact {
    position: relative;
    padding-right: 92px;
  }

  .today-grounding-card .section-heading.compact {
    padding-right: 44px;
  }

  .today-grounding-card .section-heading.compact > .muted-pill {
    position: absolute;
    top: 0;
    right: 0;
  }

  .today-admin-bits-card .today-admin-bits-head-actions {
    position: absolute;
    top: 0;
    right: 0;
    margin-left: 0;
  }

  .today-wins-list {
    gap: 8px;
  }

  .today-wins-list li {
    padding: 8px 10px;
    border-radius: 14px;
  }

  .today-wins-list .today-wins-title {
    font-size: 0.92rem;
    line-height: 1.2;
  }

  .wins-inspiration-strip {
    padding: 10px 12px;
    min-height: 54px;
  }

  .wins-inspiration-msg {
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .admin-bits-modal-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 20px 14px 14px;
    border-radius: 22px;
    gap: 12px;
  }

  .admin-bits-modal-dialog .notice-modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }

  .admin-bits-modal-dialog .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .admin-bits-modal-dialog h2 {
    font-size: 1.25rem;
    line-height: 1.1;
  }

  .admin-bits-modal-dialog .notice-modal-detail {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .admin-bits-modal-list {
    max-height: calc(100dvh - 228px);
    gap: 8px;
  }

  .admin-bits-modal-row {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 10px;
  }

  .admin-bits-modal-text {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .admin-bits-modal-actions {
    justify-content: stretch;
  }

  .admin-bits-modal-actions .primary-button {
    width: 100%;
  }

  .admin-bits-modal-actions .ghost-button {
    width: 22px;
    height: 22px;
    min-width: 22px;
    padding: 0;
    border-radius: 999px;
  }

  .admin-bits-modal-actions .ghost-button svg {
    width: 11px;
    height: 11px;
    display: block;
  }

  .today-quick-capture-card .section-heading.compact {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .today-quick-capture-card .today-card-heading {
    flex: 1 1 auto;
    min-width: 0;
  }

  .today-quick-capture-card .today-card-heading h2 {
    margin-top: 2px;
  }

  .today-quick-capture-card #quickCaptureHelpButton {
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    border-radius: 10px;
    align-self: flex-start;
    font-size: 0.85rem;
    line-height: 1;
  }

  .quick-capture-row input {
    min-height: 64px;
    padding: 4px 14px 22px;
    line-height: 1.35;
    border-radius: 14px;
    font-size: 0.96rem;
  }

  .quick-capture-row textarea {
    min-height: clamp(150px, 26dvh, 220px);
    padding: 14px 14px 12px;
    border-radius: 16px;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .quick-capture-chips {
    gap: 6px;
    margin-top: 10px;
  }

  .quick-capture-chips .chip-button {
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
  }

  .sidebar {
    position: fixed;
    top: 10px;
    left: 10px;
    bottom: 10px;
    width: min(84vw, 320px);
    max-width: 320px;
    display: flex;
    flex-direction: column;
    transform: translateX(-110%);
    transition: transform 220ms ease;
    z-index: 60;
  }

  .app-shell.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .right-panel {
    display: flex;
    position: fixed;
    top: 10px;
    right: 10px;
    bottom: 10px;
    left: auto;
    width: min(84vw, 320px);
    max-width: 320px;
    height: calc(100dvh - 20px);
    min-height: 0;
    max-height: none;
    z-index: 60;
    transform: translateX(110%);
    transition: transform 220ms ease;
  }

  .app-shell.mobile-right-nav-open .right-panel {
    position: fixed;
    top: 10px;
    right: 10px;
    bottom: 10px;
    left: auto;
    width: min(84vw, 320px);
    max-width: 320px;
    height: calc(100dvh - 20px);
    min-height: 0;
    max-height: none;
    z-index: 80;
    transform: translateX(0);
    align-items: stretch;
    padding: 0;
    background: var(--panel);
    border-color: var(--panel-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
  }

  .app-shell.mobile-right-nav-open .right-panel-collapsed-trigger,
  .app-shell.mobile-right-nav-open .right-panel-toggle {
    display: none;
  }

  .app-shell.mobile-right-nav-open .right-panel-header {
    flex-direction: row;
    gap: 10px;
    padding: 18px 16px 14px;
    border-bottom: 1px solid rgba(95, 122, 163, 0.12);
    width: auto;
    justify-content: flex-start;
    align-items: center;
  }

  .app-shell.mobile-right-nav-open .right-panel-title,
  .app-shell.mobile-right-nav-open .right-panel-body {
    display: flex;
  }

  .app-shell.mobile-right-nav-open .right-panel-mountain {
    display: none;
  }

  .sidebar-mountain,
  .right-panel-mountain {
    display: none;
  }

  .mobile-sidebar-toggle {
    position: relative;
    left: calc(12px + env(safe-area-inset-left));
    left: auto;
    bottom: auto;
    z-index: 70;
    width: var(--mobile-action-size);
    height: var(--mobile-action-size);
    border-radius: 16px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(138, 245, 167, 0.22);
    background: rgba(7, 17, 31, 0.96);
    color: var(--accent);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    font-size: 1.2rem;
    line-height: 1;
  }

  .mobile-menu-controls {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left));
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 70;
    display: flex;
    gap: 8px;
  }

  .mobile-menu-lines {
    display: grid;
    gap: 4px;
    width: 18px;
  }

  .mobile-menu-lines span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .mobile-menu-lines-vertical {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 18px;
    height: 18px;
  }

  .mobile-menu-lines-vertical span {
    width: 2px;
    height: 100%;
  }

  .mobile-sidebar-toggle.is-open .mobile-menu-lines {
    transform: rotate(45deg);
  }

  .mobile-sidebar-toggle.hidden {
    display: grid !important;
  }

  body.ai-chat-open .mobile-sidebar-toggle,
  body.ai-chat-open .ai-chat-launcher,
  body.ai-chat-open .mobile-quick-capture-launcher {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(2px);
  }

  .ai-chat-launcher {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 12px;
  }

  .ai-chat-panel {
    left: 50%;
    right: auto;
    width: min(420px, calc(100vw - 20px));
    bottom: 66px;
    max-height: 76vh;
    transform: translateX(-50%);
    margin: 0;
  }

  body.ai-chat-open .ai-chat-panel {
    top: var(--ai-chat-viewport-offset-top, 0px);
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: var(--ai-chat-viewport-height, 100dvh);
    max-height: none;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    border: 0;
    border-radius: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 0;
    transform: none;
    animation: panel-slide-up-mobile 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  body.ai-chat-open .ai-chat-header {
    padding: 10px 14px;
  }

  body.ai-chat-open .ai-chat-messages {
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 12px 14px;
  }

  body.ai-chat-open .ai-chat-message-user,
  body.ai-chat-open .ai-chat-message-assistant {
    border: 0;
  }

  body.ai-chat-open .ai-chat-form {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    background: var(--surface-elevated);
  }

  body.ai-chat-open .ai-chat-input {
    min-height: 48px;
    max-height: 96px;
    padding: 8px 10px;
  }

  /* Mobile-only bottom fade above the Ask Calmai button */
  .main-panel::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 260px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(6,10,18,1) 100%);
    z-index: 60;
  }

  /* Keep the AI launcher on top of the fade */
  .ai-chat-launcher {
    z-index: 70;
  }

  .mobile-quick-capture-launcher {
    position: fixed;
    right: 14px;
    bottom: 10px;
    z-index: 92;
    width: var(--mobile-action-size);
    height: var(--mobile-action-size);
    display: grid;
    place-items: center;
    border-radius: 18px;
    border: 1px solid rgba(138, 245, 167, 0.22);
    background: rgba(7, 17, 31, 0.96);
    color: var(--accent);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28), 0 0 18px rgba(138, 245, 167, 0.08);
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .mobile-quick-capture-launcher:hover,
  .mobile-quick-capture-launcher:active {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32), 0 0 22px rgba(138, 245, 167, 0.14);
  }

  .mobile-quick-capture-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: block;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
  }

  .mobile-quick-capture-backdrop.hidden {
    display: none;
  }

  .today-quick-capture-card {
    display: none;
  }

  .today-quick-capture-card--mobile-open {
    display: grid !important;
    position: fixed;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    width: min(560px, calc(100vw - 20px));
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    z-index: 91;
    margin: 0;
    padding: 16px 14px 14px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    gap: 12px;
    align-content: start;
  }

  .today-quick-capture-card--mobile-open .quick-capture-row textarea {
    min-height: clamp(168px, 34dvh, 260px);
    padding: 16px 14px 14px;
    font-size: 1rem;
    line-height: 1.45;
  }

  .today-quick-capture-card--mobile-open .quick-capture-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
  }

  .today-quick-capture-card--mobile-open .quick-capture-chips .chip-button {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    white-space: normal;
  }

  body.mobile-quick-capture-open {
    overflow: hidden;
  }

  .board-layout-with-sidebar {
    display: block !important;
    margin-left: 0;
    padding-left: 0;
    overflow: visible;
    height: auto;
  }

  .app-shell:not(.mobile-right-nav-open) .right-panel {
    pointer-events: none;
  }

  .board-columns-shell {
    padding: 0;
  }

  .recovery-modal {
    padding: 8px;
  }

  .recovery-modal-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 14px);
    padding: 16px 12px 12px;
  }

  .board-sidebar,
  .right-panel,
  .sidebar-toggle {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Keep the Today context message beside the compact mark on phones. */
@media (max-width: 720px) {
  #todayView {
    padding-top: 0;
  }

  .today-topbar-main {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  .today-context-msg {
    font-size: 0.58rem;
  }

  .today-topbar-side {
    grid-column: 1 / -1;
  }

  .today-status-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* ── Hide scrollbars on main scroll areas ──────────────────────────────────── */
.navigation,
.main-panel,
.right-panel-body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.navigation::-webkit-scrollbar,
.main-panel::-webkit-scrollbar,
.right-panel-body::-webkit-scrollbar {
  display: none;
}

/* Keep every scroll area usable without displaying a scrollbar indicator. */
*,
*::before,
*::after {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar,
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-thumb {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* ── Status Checks Page ────────────────────────────────────────────────────── */

.recovery-shell {
  margin-top: 4px;
  display: block;
  min-height: 0;
}

.recovery-tabs,
.page-tabs {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 0;
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.recovery-tabs ul,
.page-tabs ul {
  display: flex;
  gap: 8px;
  width: 100%;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--surface-border);
}

.recovery-tabs li,
.page-tabs li {
  width: auto;
  flex: 1 1 0;
}

.recovery-tabs .philo-tab,
.page-tabs .philo-tab {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.recovery-tabs .philo-tab:hover,
.page-tabs .philo-tab:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.recovery-tabs .philo-tab.active,
.recovery-tabs .philo-tab:focus,
.page-tabs .philo-tab.active,
.page-tabs .philo-tab:focus {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--surface-border));
  color: var(--accent-strong);
  outline: none;
}

.recovery-tab-label--mobile {
  display: none;
}

@media (max-width: 720px) {
  .recovery-tab-label--desktop {
    display: none;
  }

  .recovery-tab-label--mobile {
    display: inline;
  }

}

.recovery-tabs + .recovery-content,
.page-tabs + .settings-content {
  width: 100%;
  max-width: none;
  padding: 32px 0 44px;
}

.page-tabs-select-label,
.page-tabs-select {
  display: none;
}

@media (max-width: 720px) {
  .page-tabs ul {
    display: none;
  }

  .page-tabs-select-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .page-tabs-select {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
  }
}

.recovery-content {
  width: 100%;
  max-width: none;
}

.recovery-panel {
  width: 100%;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

#recovery-overview,
#recovery-pss {
  background: transparent;
}

#recovery-overview h2 {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--accent-strong);
}

.recovery-overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.42fr);
  gap: 28px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-2) 88%, transparent), color-mix(in srgb, var(--surface-1, #081525) 94%, transparent));
}

.recovery-overview-hero-main {
  min-width: 0;
}

.recovery-overview-hero .settings-copy {
  margin-bottom: 0;
  max-width: 620px;
}

.recovery-featured-insight {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  padding: 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-3, #142238) 78%, transparent);
}

.recovery-featured-insight[hidden] {
  display: none;
}

.recovery-featured-insight-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 700;
}

.recovery-featured-insight-label {
  margin: 2px 0 8px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recovery-featured-insight-text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.recovery-featured-insight-button {
  margin-top: 14px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent-strong);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
}

.recovery-featured-insight-button:hover {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

@media (max-width: 720px) {
  .recovery-overview-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px;
  }

  .recovery-featured-insight {
    padding: 14px;
  }

  .recovery-analysis-card {
    padding: 18px;
  }
}

/* 7-day trend strip & PSS history shared styles */
.recovery-trend-strip,
.pss-history-chart {
  margin: 16px 0;
}

.recovery-trend-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 0 0 8px;
}

.recovery-trend-empty {
  padding: 12px 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  text-align: center;
}

.recovery-trend-bars,
.pss-history-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
}

.recovery-trend-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  max-width: 40px;
}

.recovery-trend-bar-wrap {
  height: 52px;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.recovery-trend-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
  min-height: 6px;
}

.recovery-trend-bar--good,
.pss-bar--low {
  background: var(--success);
}

.recovery-trend-bar--mid {
  background: var(--warning);
}

.recovery-trend-bar--low,
.pss-bar--high {
  background: var(--danger);
}

.pss-bar--moderate {
  background: var(--warning);
}

.recovery-trend-day {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

/* Recovery path actions */
.recovery-path-actions,
.recovery-tab-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.recovery-overview-band {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-left: auto;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  color: var(--danger);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.recovery-overview-band[hidden] {
  display: none;
}

.recovery-overview-band--low {
  border-color: color-mix(in srgb, var(--success) 55%, transparent);
  background: color-mix(in srgb, var(--success) 8%, transparent);
  color: var(--success);
}

.recovery-overview-band--moderate {
  border-color: color-mix(in srgb, var(--warning) 55%, transparent);
  background: color-mix(in srgb, var(--warning) 8%, transparent);
  color: var(--warning);
}

/* PSS-10 overdue reminder */
.recovery-pss-reminder {
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
  border-radius: var(--control-radius);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--fg, inherit);
  margin-bottom: 14px;
}
.recovery-pss-reminder.hidden { display: none; }

/* Next-steps specific */
.recovery-state-read {
  font-size: 1rem;
  font-style: italic;
  color: var(--fg, inherit);
  margin: 0 0 16px;
  line-height: 1.6;
}
.recovery-steps-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin: 0 0 10px;
}
.recovery-next-steps-list {
  margin: 0 0 16px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.recovery-next-step {
  line-height: 1.5;
}
.recovery-next-step strong {
  font-size: 0.9rem;
  color: var(--fg, inherit);
}
.recovery-step-maps {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
}
.recovery-step-reason {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 3px 0 0;
}

/* Band badge */
.recovery-band-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.recovery-band-badge--low {
  background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
}

.recovery-band-badge--moderate {
  background: color-mix(in srgb, var(--warning) 15%, transparent);
  color: var(--warning);
  border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent);
}

.recovery-band-badge--elevated,
.recovery-band-badge--high {
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

/* Analysis section cards */
.recovery-tab-content[data-period='overview'] {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.recovery-tab-content {
  position: relative;
}

.recovery-tab-content.is-refreshing {
  pointer-events: none;
}

.recovery-analysis-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-1, rgba(255, 255, 255, 0.92)) 62%, transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: recovery-loading-fade 0.25s ease;
}

.recovery-analysis-loading-line {
  position: sticky;
  top: 42vh;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

.recovery-analysis-thinking {
  width: min(280px, 72vw);
  min-height: 36px;
  color: transparent;
  pointer-events: none;
  transform: scale(2.5);
  transform-origin: center;
}

@keyframes recovery-loading-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.recovery-analysis-sections {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.recovery-analysis-card {
  background: var(--surface-2, rgba(0,0,0,0.04));
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 18px;
  padding: 20px 24px;
}

.recovery-analysis-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.recovery-analysis-card-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-strong);
  font-size: 1.25rem;
}

:root[data-theme='dark'] .recovery-analysis-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

.recovery-analysis-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  margin: 0 0 8px;
}

.recovery-analysis-card-body {
  font-size: 0.83rem;
  color: var(--fg, inherit);
  line-height: 1.6;
  margin: 0 0 0 52px;
}

.recovery-report-headline {
  margin: 18px 0 14px;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--text);
}

.recovery-report-detail {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.recovery-next-step-card {
  margin-top: 0;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2, transparent));
}

.recovery-next-step-card strong {
  display: block;
  margin: 2px 0 8px;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
}

.recovery-report-data-note,
.recovery-report-empty {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.recovery-analysis-items {
  margin: 0 0 0 52px;
  padding-left: 20px;
  list-style: disc;
}

.recovery-analysis-items li {
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--fg, inherit);
  margin-bottom: 4px;
}

.recovery-analysis-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 4px 0 0;
  text-align: right;
}

/* PSS last taken label */
.pss-last-taken {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--surface-2, rgba(0,0,0,0.04));
  border: 1px solid var(--border, rgba(0,0,0,0.08));
}

.pss-last-taken--low { color: var(--success); }
.pss-last-taken--moderate { color: var(--warning); }
.pss-last-taken--high { color: var(--danger); }

/* PSS question form */
.pss-questions {
  margin: 16px 0;
}

.pss-question-intro {
  font-size: 0.9rem;
  color: var(--fg, inherit);
  margin: 0 0 12px;
}

.pss-option-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 0.75rem;
  color: var(--muted);
}

.pss-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.pss-legend-item strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(0,0,0,0.15));
  font-size: 0.75rem;
  color: var(--fg, inherit);
}

.pss-question {
  padding: 12px 0;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.07));
}

.pss-question:last-child {
  border-bottom: none;
}

.pss-q-text-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.pss-q-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  min-width: 22px;
  padding-top: 1px;
}

.pss-q-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--fg, inherit);
}

.pss-options {
  display: flex;
  gap: 8px;
  padding-left: 30px;
  flex-wrap: wrap;
}

.pss-option-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border, rgba(0,0,0,0.15));
  background: transparent;
  color: var(--fg, inherit);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pss-option-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pss-option-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pss-submit-row {
  margin-top: 20px;
}

/* PSS result card */
.pss-result {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--surface-2, rgba(0,0,0,0.04));
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: var(--radius-md);
}

.pss-result.hidden {
  display: none;
}

:root[data-theme='dark'] .pss-result {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

.pss-result-score-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.pss-result-score {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-strong, var(--accent));
}

.pss-result-max {
  font-size: 1.1rem;
  color: var(--muted);
}

.pss-result-band {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 12px;
}

.pss-result-band--low {
  background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success);
}

.pss-result-band--moderate {
  background: color-mix(in srgb, var(--warning) 15%, transparent);
  color: var(--warning);
}

.pss-result-band--high {
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  color: var(--danger);
}

.pss-result-interpretation {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--fg, inherit);
  margin: 0 0 12px;
}

.pss-result-cta {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}

.pss-result-cta-icon {
  flex-shrink: 0;
}

/* ============================================================
   WHITEBOARD
   ============================================================ */

body.wb-active {
  overflow: hidden;
}

body.wb-active .app-shell {
  height: calc(100vh - 44px - var(--window-controls-overlay-height));
  overflow: hidden;
  min-height: unset;
}

body.wb-active .main-panel {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  border-radius: var(--radius-md);
}

#whiteboardView {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0;
  overflow: hidden;
  min-height: 0;
}

#whiteboardView.hidden {
  display: none;
}

.wb-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--surface-border);
  flex-shrink: 0;
  flex-wrap: wrap;
  user-select: none;
}

.wb-tool-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.wb-group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  margin-right: 4px;
  white-space: nowrap;
}

.wb-divider {
  width: 1px;
  height: 24px;
  background: var(--surface-border);
  margin: 0 6px;
}

.wb-divider--soft {
  height: 18px;
  opacity: 0.6;
}

.wb-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.wb-tool:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.wb-tool.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.wb-tool-danger:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.wb-color-group {
  gap: 4px;
}

.wb-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.12s, transform 0.1s;
}

.wb-color-swatch:hover {
  transform: scale(1.15);
}

.wb-color-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--surface-1), 0 0 0 4px var(--accent);
}

.wb-zoom-label {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 38px;
  text-align: center;
}

.wb-tool-hint {
  font-size: 0.8rem;
  color: var(--text-muted, var(--text-secondary));
  opacity: 0.6;
  font-style: italic;
  white-space: nowrap;
}

.wb-tool-hint.wb-hint--named {
  font-style: normal;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  opacity: 1;
}

.wb-toolbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wb-saveload-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px !important;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface-2, rgba(128,128,128,0.12)) !important;
  color: var(--text-primary) !important;
  border-radius: 7px;
  border: 1px solid var(--surface-border) !important;
  cursor: pointer;
  opacity: 1 !important;
}

.wb-saveload-btn:hover {
  background: var(--surface-hover) !important;
}

.wb-quicksave-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  opacity: 1 !important;
  flex-shrink: 0;
}

.wb-quicksave-btn:hover {
  opacity: 0.85 !important;
}

.wb-current-save-name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-save-submit--update {
  background: var(--success) !important;
}

.wb-save-submit--update:hover {
  opacity: 0.88;
}

.wb-unsaved-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

.wb-save-item--current {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.wb-save-item-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 5px;
  padding: 3px 7px;
  flex-shrink: 0;
}

/* ---- Whiteboard Save/Load Modal ---- */
.wb-modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 60px;
  backdrop-filter: blur(2px);
}

.wb-modal-card {
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  width: 440px;
  max-width: calc(100vw - 32px);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--surface-border);
  flex-shrink: 0;
}

.wb-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.wb-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
}

.wb-modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.wb-modal-section {
  padding: 16px 18px;
  flex-shrink: 0;
}

.wb-modal-section--list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.wb-modal-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 10px;
}

.wb-modal-divider {
  height: 1px;
  background: var(--surface-border);
  flex-shrink: 0;
}

.wb-save-row {
  display: flex;
  gap: 8px;
}

.wb-save-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.wb-save-input:focus {
  border-color: var(--accent);
}

.wb-save-submit {
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.wb-save-submit:hover {
  opacity: 0.88;
}

.wb-saves-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wb-saves-empty {
  padding: 12px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.wb-save-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 9px;
  background: var(--surface-2);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.wb-save-item:hover {
  background: var(--surface-3);
  border-color: var(--accent);
}

.wb-save-item-info {
  flex: 1;
  min-width: 0;
}

.wb-save-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-save-item-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.wb-save-item-load {
  padding: 5px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.wb-save-item-load:hover {
  opacity: 0.85;
}

.wb-confirm-card {
  width: 340px;
  padding: 24px 22px 18px;
  gap: 0;
}

.wb-confirm-msg {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}

.wb-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.wb-modal-btn {
  padding: 7px 18px;
  border-radius: 8px;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.wb-modal-btn:hover { opacity: 0.85; }

.wb-modal-btn--primary {
  background: var(--accent);
  color: #fff;
}

.wb-modal-btn--secondary {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--surface-border);
}

.wb-save-item-delete {
  padding: 5px 8px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--surface-border);
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  flex-shrink: 0;
}

.wb-save-item-delete:hover {
  background: rgba(220,38,38,0.12);
  color: var(--danger);
  border-color: var(--danger);
}

.wb-canvas-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: var(--surface-1);
}

.wb-svg {
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
}

.wb-svg.wb-tool-crosshair {
  cursor: crosshair;
}

.wb-svg.wb-tool-pan {
  cursor: grab;
}

.wb-svg.wb-tool-panning {
  cursor: grabbing;
}

.wb-svg.wb-tool-pan {
  cursor: grab;
}

/* Element styles */
.wb-el {
  cursor: move;
}

.wb-el.wb-selecting {
  cursor: pointer;
}

.wb-arrow-group {
  cursor: move;
}

.wb-task-card-menu-layer {
  position: absolute;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}

.wb-task-card {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  border-radius: 20px;
  border: 1px solid var(--wb-card-border);
  background: var(--wb-card-surface);
  box-shadow: var(--wb-card-shadow);
  overflow: hidden;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  isolation: isolate;
}

.wb-task-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--wb-task-card-accent, #4d74ff);
}

.wb-task-card.is-selected {
  box-shadow: var(--wb-card-shadow-selected);
}

.wb-task-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.wb-task-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--wb-task-card-accent, #4d74ff) 14%, var(--wb-card-status-bg));
  color: color-mix(in srgb, var(--wb-task-card-accent, #4d74ff) 72%, var(--wb-card-status-fg));
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wb-task-card-title {
  position: relative;
  z-index: 1;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 800;
  cursor: pointer;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.wb-task-card-title:hover {
  color: var(--accent-strong);
}

.wb-task-card-title:focus-visible {
  outline: 2px solid rgba(77, 116, 255, 0.45);
  outline-offset: 2px;
  border-radius: 8px;
}

.wb-task-card-description {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.wb-zone-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

.wb-zone-name,
.wb-zone-select {
  height: 28px;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  outline: none;
}

.wb-zone-name {
  flex: 1 1 120px;
  padding: 4px 8px;
}

.wb-zone-select {
  flex: 0 0 auto;
  padding: 4px 6px;
  max-width: 150px;
}

.wb-zone-select--target {
  max-width: 160px;
}

.wb-zone-name:focus,
.wb-zone-select:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.wb-zone-summary {
  margin-left: auto;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(37, 99, 235, 0.82);
  white-space: nowrap;
}

.wb-task-card-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--wb-task-card-accent, #4d74ff) 68%, var(--muted));
}

.wb-task-card-menu {
  position: absolute;
  min-width: 184px;
  max-width: 220px;
  top: auto;
  bottom: auto;
  background: var(--wb-card-menu-bg) !important;
  border: 1px solid var(--wb-card-menu-border) !important;
  opacity: 1;
  backdrop-filter: none;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
  z-index: 30;
  pointer-events: auto;
}

/* Floating edit overlay.
   Sits directly on the edited shape, so it must stay immune to the global
   input/textarea skin (min-height, gradient background, CE theme colours). */
.wb-edit-overlay,
:root textarea.wb-edit-overlay,
:root[data-theme='ce'] textarea.wb-edit-overlay {
  position: absolute;
  z-index: 100;
  min-height: 0;
  background: transparent;
  border: none;
  border-radius: 4px;
  box-shadow: none;
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
  resize: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #1e293b;
  padding: 4px 6px;
  box-sizing: border-box;
  line-height: 1.45;
  overflow: hidden;
  pointer-events: all;
}

.wb-edit-overlay:focus,
:root textarea.wb-edit-overlay:focus,
:root[data-theme='ce'] textarea.wb-edit-overlay:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
  border: none;
  box-shadow: none;
}

/* ---- Edit toolbar ---- */
.wb-edit-toolbar {
  position: absolute;
  z-index: 101;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--surface-card, #ffffff);
  border: 1px solid var(--surface-border, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
  white-space: nowrap;
  pointer-events: all;
  user-select: none;
}

.wb-et-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.wb-et-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #9ca3af);
}

.wb-et-divider {
  width: 1px;
  height: 20px;
  background: var(--surface-border, #e5e7eb);
}

.wb-et-colors {
  display: flex;
  align-items: center;
  gap: 3px;
}

.wb-et-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.1s, border-color 0.1s;
}

.wb-et-swatch:hover {
  transform: scale(1.2);
}

.wb-et-swatch.active {
  border-color: #3b82f6;
  transform: scale(1.15);
}

.wb-et-color-custom {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--surface-border, #e5e7eb);
  cursor: pointer;
  padding: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}

.wb-et-color-custom::-webkit-color-swatch-wrapper { padding: 0; border-radius: 50%; }
.wb-et-color-custom::-webkit-color-swatch { border: none; border-radius: 50%; }

.wb-et-select {
  font-size: 0.78rem;
  font-family: inherit;
  padding: 2px 4px;
  border: 1px solid var(--surface-border, #e5e7eb);
  border-radius: 5px;
  background: var(--surface-1, #f9fafb);
  color: var(--text-primary, #111827);
  cursor: pointer;
  outline: none;
  height: 26px;
}

/* Arrow endpoint handles */
.wb-arrow-handle {
  cursor: crosshair;
}

/* Snap highlight ring */
.wb-snap-ring {
  pointer-events: none;
}

.wb-snap-target {
  pointer-events: none;
  fill: rgba(77, 116, 255, 0.95);
  stroke: #ffffff;
  stroke-width: 1;
  opacity: 0.9;
  transition: fill 0.12s ease, stroke 0.12s ease, opacity 0.12s ease;
}

.wb-snap-target.is-start {
  fill: rgba(77, 116, 255, 0.95);
  stroke: #3b82f6;
  opacity: 1;
}

.wb-resize-handle {
  cursor: nwse-resize;
}
.wb-resize-handle[data-dir="n"],
.wb-resize-handle[data-dir="s"] { cursor: ns-resize; }
.wb-resize-handle[data-dir="e"],
.wb-resize-handle[data-dir="w"] { cursor: ew-resize; }
.wb-resize-handle[data-dir="nw"],
.wb-resize-handle[data-dir="se"] { cursor: nwse-resize; }
.wb-resize-handle[data-dir="ne"],
.wb-resize-handle[data-dir="sw"] { cursor: nesw-resize; }

/* ============================================================
   RIGHT PANEL
   ============================================================ */

.right-panel {
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: padding 0.25s ease;
  min-width: 0;
  height: 100%;
  max-height: calc(100vh - 44px - var(--window-controls-overlay-height));
  position: sticky;
  top: 0;
  align-self: start;
  box-sizing: border-box;
}

.right-panel-mountain {
  margin-top: auto;
  line-height: 0;
  flex-shrink: 0;
}

.right-panel-mountain-img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
  opacity: 0.3;
}

.right-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(95, 122, 163, 0.12);
  flex-shrink: 0;
}

.right-panel-toggle {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--surface-border);
  background: var(--surface-2);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.right-panel-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.right-panel-collapsed-trigger {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  min-height: 100%;
  padding: 18px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.right-panel-collapsed-trigger:hover,
.right-panel-collapsed-trigger:focus-visible {
  background: var(--accent-soft);
}

.right-panel-collapsed-wave {
  position: relative;
  display: block;
  width: 24px;
  height: min(280px, 58vh);
  filter: drop-shadow(0 0 8px rgba(138, 245, 167, 0.5));
  opacity: 0.9;
}

.right-panel-collapsed-wave::before,
.right-panel-collapsed-wave::after {
  content: '';
  position: absolute;
  top: -12%;
  left: 7px;
  width: 10px;
  height: 124%;
  background: linear-gradient(180deg, transparent 0%, rgba(138, 245, 167, 0.08) 16%, rgba(138, 245, 167, 0.72) 50%, rgba(138, 245, 167, 0.08) 84%, transparent 100%);
  clip-path: polygon(48% 0, 64% 10%, 43% 20%, 67% 30%, 42% 40%, 62% 50%, 39% 60%, 67% 70%, 43% 80%, 62% 90%, 48% 100%, 34% 90%, 57% 80%, 33% 70%, 58% 60%, 36% 50%, 58% 40%, 33% 30%, 57% 20%, 36% 10%);
  animation: right-panel-vertical-wave 2.6s ease-in-out infinite alternate;
  pointer-events: none;
}

.right-panel-collapsed-wave::after {
  width: 6px;
  left: 9px;
  opacity: 0.42;
  filter: blur(5px);
  animation-direction: alternate-reverse;
}

.right-panel-collapsed-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes right-panel-vertical-wave {
  from { transform: translateY(-4%); }
  to { transform: translateY(4%); }
}

.right-panel-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.15s;
}

.right-panel-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Non-whiteboard pages inject rp-section divs directly — give them padding */
.right-panel-body > .rp-section {
  padding: 12px 12px 0;
}

.right-panel-body > .rp-section:last-child {
  padding-bottom: 12px;
}

.rp-music-section {
  gap: 8px;
  padding-bottom: 12px !important;
  border-bottom: 1px solid var(--surface-border);
}

.rp-zoom-section {
  gap: 8px;
  padding-bottom: 12px !important;
  border-bottom: 1px solid var(--surface-border);
}

.rp-zoom-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(44px, auto) 28px auto;
  gap: 6px;
  align-items: center;
}

.rp-zoom-label {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rp-zoom-button,
.rp-zoom-reset {
  height: 28px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text-primary);
  cursor: pointer;
}

.rp-zoom-button {
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
}

.rp-zoom-button:hover:not(:disabled),
.rp-zoom-reset:hover {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.rp-zoom-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.rp-zoom-value {
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.rp-zoom-reset {
  padding: 0 8px;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.rp-music-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.rp-music-select {
  min-height: 28px;
  height: 28px;
  padding-top: 0;
  padding-bottom: 0;
}

.rp-music-play-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--surface-border);
  border-radius: 9px;
  background: var(--surface-1);
  color: var(--accent-strong);
  font-size: 0.72rem;
  line-height: 1;
}

.rp-music-play-button:hover:not(:disabled) {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
}

.rp-music-play-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.rp-music-volume-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.rp-music-volume-row label {
  color: var(--muted);
  font-size: 0.78rem;
}

.rp-music-volume-value {
  font-weight: 700;
  font-size: 0.78rem;
  text-align: right;
}

.rp-music-volume-slider {
  width: 100%;
  accent-color: #14282d;
}

/* Collapsed state */
.right-panel-collapsed .right-panel {
  align-items: center;
  padding: 14px 0;
  position: relative;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.right-panel-collapsed .right-panel-header {
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 10px;
  border-bottom: none;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.right-panel-collapsed .right-panel-title,
.right-panel-collapsed .right-panel-body {
  display: none;
}

.right-panel-collapsed .right-panel-toggle {
  display: none;
}

.right-panel-collapsed .right-panel-collapsed-trigger {
  display: flex;
}

.right-panel-collapsed .right-panel-mountain {
  display: none;
}

@media (min-width: 1181px) {
  .app-shell.right-panel-collapsed .right-panel-collapsed-trigger:hover {
    background: transparent;
  }
}

/* Panel section */
.rp-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rp-section-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.2;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--surface-border);
}

.rp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
}

.rp-label {
  color: var(--text-secondary);
  font-size: 0.83rem;
  line-height: 1.5;
}

.rp-value {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.rp-reminders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rp-reminder-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.83rem;
}

.rp-reminder-date {
  flex-shrink: 0;
  min-width: 74px;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.75rem;
}

.rp-reminder-text {
  color: var(--text-primary);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.rp-button {
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--control-radius);
  border: 1px solid var(--surface-border);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: 0.83rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rp-button:hover {
  background: var(--surface-3);
  border-color: var(--accent);
}

.rp-button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  border-color: transparent;
  justify-content: center;
  text-align: center;
}

.rp-button-primary:hover {
  background: var(--accent-strong);
  border-color: transparent;
}

.rp-shortcut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.rp-shortcut {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--surface-border);
  background: var(--surface-1);
  font-size: 0.78rem;
}

.rp-shortcut kbd {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.rp-shortcut span {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

/* Whiteboard right panel inside wb-active */
body.wb-active .right-panel {
  overflow-y: auto;
}

/* ---- WB panel item groups ---- */
.rp-wb-hint {
  padding: 12px 12px 8px;
  flex-shrink: 0;
}

.rp-drag-hint {
  padding: 4px 12px 4px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-style: italic;
}

.rp-search-wrap {
  padding: 6px 10px 8px;
  flex-shrink: 0;
}

.rp-search-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.rp-search-input::placeholder {
  color: var(--muted);
}

.rp-search-input:focus {
  border-color: var(--accent);
}

.rp-group {
  border-bottom: 1px solid var(--surface-border, #e5e7eb);
}

.rp-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: background 0.12s;
}

.rp-group-header:hover {
  background: var(--surface-hover);
}

.rp-group-chevron {
  font-size: 0.72rem;
  color: var(--text-secondary);
  transition: transform 0.15s;
  display: inline-block;
  width: 12px;
  text-align: center;
}

.rp-group-collapsed .rp-group-chevron {
  transform: rotate(-90deg);
}

.rp-group-label {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

.rp-group-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-2, rgba(128,128,128,0.15));
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.rp-group-add-all {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.rp-group-add-all:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.rp-group-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rp-group-collapsed .rp-group-body {
  display: none;
}

.rp-group-empty {
  padding: 6px 12px 8px 30px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rp-drag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 12px;
  cursor: grab;
  border-radius: 0;
  transition: background 0.1s;
}

.rp-drag-item:hover {
  background: var(--surface-hover);
}

.rp-drag-item:active,
.rp-drag-item--dragging {
  cursor: grabbing;
  opacity: 0.6;
}

.rp-drag-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  display: inline-block;
}

.rp-drag-label {
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.3;
  word-break: break-word;
}

/* ─── Details modal v2 redesign ─── */

.details-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(138, 245, 167, 0.08);
  border: 1px solid rgba(138, 245, 167, 0.2);
  border-radius: 999px;
  padding: 4px 12px 4px 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}
.details-eyebrow-symbol {
  height: 14px;
  width: auto;
  animation: ai-symbol-pulse 3s ease-in-out infinite;
}
.details-section-symbol {
  height: 11px;
  width: auto;
  animation: ai-symbol-pulse 3s ease-in-out infinite;
  vertical-align: middle;
  margin-right: 2px;
}
.details-header-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.details-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.details-header-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--surface-border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  line-height: 1;
}
.details-header-action-btn:hover { background: rgba(138,245,167,0.08); color: var(--accent); border-color: rgba(138,245,167,0.2); }
.details-header-action-btn.active { background: rgba(138,245,167,0.12); color: var(--accent); border-color: rgba(138,245,167,0.3); }
.details-edit-save-btn { color: var(--accent); border-color: rgba(138,245,167,0.3); background: rgba(138,245,167,0.08); font-weight: 700; }
.details-edit-save-btn:hover { background: rgba(138,245,167,0.16); }

.details-title-input {
  width: 100%;
  box-sizing: border-box;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.15;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: rgba(20, 31, 52, 0.86);
  color: var(--text);
  padding: 8px 12px;
  font-family: inherit;
  margin-bottom: 10px;
}
.details-title-input:focus { outline: none; }

.details-pill-icon {
  font-size: 0.72rem;
  margin-right: 3px;
  opacity: 0.8;
}

/* Start Focus button – solid green */
.details-start-focus-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #061410;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
  font-family: inherit;
}
.details-start-focus-btn:hover { opacity: 0.88; }

.details-start-focus-btn.is-onboarding-focus-target {
  animation: onboarding-focus-button-glow 1.7s ease-in-out infinite;
  border-color: rgba(138, 245, 167, 0.95);
  box-shadow: 0 0 0 1px rgba(138, 245, 167, 0.35), 0 0 20px rgba(138, 245, 167, 0.7);
}

@keyframes onboarding-focus-button-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(138, 245, 167, 0.28), 0 0 12px rgba(138, 245, 167, 0.5); }
  50% { box-shadow: 0 0 0 1px rgba(138, 245, 167, 0.72), 0 0 28px rgba(138, 245, 167, 0.95); }
}

/* Progress ring */
.details-progress-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.details-progress-row .details-progress-list { flex: 1 1 auto; min-width: 0; }
.details-progress-ring-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 2px;
}
.details-ring-inner {
  position: relative;
  width: 68px;
  height: 68px;
}
.details-ring-svg {
  width: 68px;
  height: 68px;
  transform: rotate(-90deg);
}
.details-ring-bg {
  fill: none;
  stroke: rgba(95,122,163,0.18);
  stroke-width: 3;
}
.details-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.4s ease;
}
.details-ring-text-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text);
  pointer-events: none;
}
.details-ring-label {
  font-size: 0.64rem;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Setting field wrap (holds display span + input/select, toggled by edit mode) */
.details-field-wrap { display: block; }

.details-field-wrap--with-reminder {
  display: flex;
  align-items: center;
  gap: 8px;
}

.details-due-reminder-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border: 1px solid var(--surface-border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.details-due-reminder-btn svg {
  width: 13px;
  height: 13px;
  display: block;
}

.details-due-reminder-btn:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.details-setting-display {
  display: block;
  font-size: 0.8rem;
  color: var(--text);
  padding: 5px 0;
  line-height: 1.4;
  min-height: 22px;
}
.details-setting-display--empty {
  color: var(--muted);
  opacity: 0.4;
}

/* Unlock items in view mode */
.details-unlock-view-item {
  font-size: 0.82rem;
  color: var(--text);
  padding: 3px 0 3px 14px;
  position: relative;
  line-height: 1.45;
}
.details-unlock-view-item::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.7;
}

/* Setting icon */
.details-setting-icon {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  opacity: 0.55;
  flex-shrink: 0;
}

/* Tags pills */
.details-tags-field { display: flex; flex-direction: column; gap: 4px; }
.details-setting-row-tags { align-items: start; }
.details-setting-row-tags .details-setting-icon,
.details-setting-row-tags .details-setting-label { padding-top: 6px; }
.details-tags-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 22px;
}
.details-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(77,116,255,0.12);
  color: #a5b8ff;
  border: 1px solid rgba(77,116,255,0.25);
}

/* Impact badge */
.details-impact-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  cursor: default;
}
.details-impact-badge.high { background: rgba(138,245,167,0.12); color: var(--accent); border: 1px solid rgba(138,245,167,0.28); }
.details-impact-badge.medium { background: rgba(255,178,77,0.12); color: #ffd180; border: 1px solid rgba(255,178,77,0.28); }
.details-impact-badge.low { background: rgba(95,122,163,0.1); color: var(--muted); border: 1px solid rgba(95,122,163,0.2); }

/* Help link icons */
.details-help-icon {
  font-size: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(138,245,167,0.07);
  border: 1px solid rgba(138,245,167,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Move to dropdown */
.details-move-to-wrap { position: relative; }
.details-move-to-btn { display: inline-flex; align-items: center; gap: 5px; }
.details-move-to-caret { font-size: 0.68rem; opacity: 0.6; }
.details-move-to-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  min-width: 168px;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(4,10,24,0.38);
  padding: 6px;
  z-index: 10;
}
.details-move-to-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.details-move-to-option:hover { background: rgba(138,245,167,0.08); color: var(--accent); }

/* Notes readonly */
.details-notes-readonly {
  opacity: 0.75;
  background: rgba(20,31,52,0.2) !important;
  border-color: rgba(95,122,163,0.1) !important;
  cursor: default;
  resize: none;
}

@media (max-width: 560px) {
  .details-note-message { width: 88%; }
  .details-notes-composer { align-items: stretch; flex-direction: column; }
  .details-add-note-button { align-self: flex-end; }
}

/* Subtask check button */
.details-subtask-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(95,122,163,0.4);
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  padding: 0;
}
.details-subtask-check:hover { border-color: var(--accent); }
.details-subtask-check.is-done {
  border-color: var(--accent);
  background: rgba(138,245,167,0.18);
  color: var(--accent);
}
.details-subtask-check.is-done::after {
  content: '\2713';
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}
.details-subtask-item.is-done > span {
  text-decoration: line-through;
  opacity: 0.45;
}

/* Guided tours */
.support-legacy-content {
  display: none !important;
}

.support-landing-header,
.support-landing-content {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.support-landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 136px;
  padding: 24px 2px 18px;
}

.support-eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.support-landing-header h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 2.65rem);
  letter-spacing: -0.045em;
}

.support-landing-header p:not(.support-eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.support-tour-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(230px, 0.8fr);
  gap: 22px;
  align-items: center;
  padding: 25px 24px;
  border: 1px solid rgba(138, 245, 167, 0.14);
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, rgba(9, 34, 33, 0.62), rgba(7, 17, 31, 0.78));
}

.support-tour-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(138, 245, 167, 0.22);
  border-radius: 50%;
  color: var(--accent);
  font-size: 2.35rem;
  transform: rotate(-25deg);
}

.support-tour-copy h2,
.support-section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.15rem;
}

.support-tour-copy h2 { color: var(--accent); }

.support-tour-copy p,
.support-tour-reason p,
.support-section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.48;
}

.support-tour-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-width: 150px;
  margin-top: 14px;
  padding: 9px 14px;
  border: 1px solid rgba(138, 245, 167, 0.58);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
}

.support-tour-button:hover { background: var(--accent-soft); }
.support-tour-button span { margin-left: 18px; font-size: 1.2rem; }

.support-tour-reason {
  align-self: stretch;
  padding: 12px 0 12px 26px;
  border-left: 1px solid var(--surface-border);
}

.support-tour-reason strong { color: var(--accent); font-size: 0.8rem; }
.support-tour-reason strong span { margin-right: 8px; }

.support-destinations,
.support-shortcuts,
.support-faq { margin-top: 26px; }
.support-section-heading { padding: 0 2px 12px; }
.support-destination-grid,
.support-faq-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

.support-destination-card {
  position: relative;
  display: flex;
  min-height: 166px;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 16px 30px;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(10, 24, 39, 0.94), rgba(6, 17, 29, 0.82));
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.support-destination-card:hover { border-color: rgba(138, 245, 167, 0.38); background: var(--surface-2); transform: translateY(-2px); }
.support-card-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 13px; border-radius: 50%; background: rgba(138, 245, 167, 0.08); color: var(--accent); font-size: 1.45rem; }
.support-destination-card strong { font-size: 0.9rem; }
.support-destination-card > span:not(.support-card-icon) { margin-top: 7px; color: var(--muted); font-size: 0.77rem; line-height: 1.45; }
.support-destination-card i { position: absolute; right: 15px; bottom: 10px; color: var(--accent); font-size: 1.3rem; font-style: normal; }

.support-faq { margin-bottom: 40px; padding: 18px 10px 16px; border: 1px solid var(--surface-border); border-radius: var(--radius-lg); background: rgba(7, 17, 31, 0.42); }
.support-faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.support-faq details { border: 1px solid var(--surface-border); border-radius: 8px; background: rgba(11, 27, 43, 0.8); }
.support-faq summary { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; color: var(--text); cursor: pointer; font-size: 0.78rem; list-style: none; }
.support-faq summary::-webkit-details-marker { display: none; }
.support-faq summary::after {
  color: var(--muted);
  content: '';
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  background-color: currentColor;
  transition: transform 0.2s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.support-faq[open] summary::after { transform: rotate(180deg); }
.support-faq details[open] summary::after { transform: rotate(180deg); }
.support-faq details p { margin: 0; padding: 0 13px 13px; color: var(--muted); font-size: 0.76rem; line-height: 1.5; }

.support-shortcuts { margin-bottom: 40px; padding: 18px 10px 16px; border: 1px solid var(--surface-border); border-radius: var(--radius-lg); background: rgba(7, 17, 31, 0.42); }

/* ── Help Knowledge Base (Support & Help page) ── */
.support-help-center { margin-bottom: 40px; padding: 18px 10px 16px; border: 1px solid var(--surface-border); border-radius: var(--radius-lg); background: rgba(7, 17, 31, 0.42); }
.support-help-center[hidden] { display: none; }
.support-help-area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.support-help-loading { margin: 4px 2px; color: var(--muted); font-size: 0.78rem; }
.support-help-area-card { padding: 15px 14px; border: 1px solid var(--surface-border); border-radius: 8px; background: rgba(11, 27, 43, 0.8); }
.support-help-area-card h3 { margin: 0 0 10px; color: var(--accent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.support-help-topic-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.support-help-topic-link {
  display: flex; flex-direction: column; gap: 3px; width: 100%;
  padding: 10px 12px; border: 1px solid var(--surface-border); border-radius: 8px;
  background: linear-gradient(145deg, rgba(10, 24, 39, 0.94), rgba(6, 17, 29, 0.82));
  color: var(--text); text-align: left; cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.support-help-topic-link:hover { border-color: rgba(138, 245, 167, 0.38); background: var(--surface-2); transform: translateY(-1px); }
.support-help-topic-link strong { font-size: 0.8rem; font-weight: 600; }
.support-help-topic-link span { color: var(--muted); font-size: 0.72rem; line-height: 1.45; }

.help-topic-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(2, 8, 17, 0.72); backdrop-filter: blur(6px);
}
.help-topic-modal {
  display: flex; flex-direction: column;
  width: min(100%, 680px); max-height: min(84vh, 760px);
  border: 1px solid rgba(138, 245, 167, 0.18); border-radius: 14px;
  background: linear-gradient(160deg, #0b1c30, #071322);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.help-topic-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 20px 22px 14px; border-bottom: 1px solid var(--surface-border);
}
.help-topic-modal-header h2 { margin: 4px 0 0; color: var(--text); font-size: 1.25rem; letter-spacing: -0.02em; }
.help-topic-close {
  flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid var(--surface-border); border-radius: 8px;
  background: rgba(11, 27, 43, 0.8); color: var(--muted); font-size: 1.15rem; line-height: 1; cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}
.help-topic-close:hover { border-color: rgba(138, 245, 167, 0.4); color: var(--text); }
.help-topic-modal-body { padding: 18px 22px 22px; overflow-y: auto; color: var(--text); }
.help-topic-modal-body h2 { font-size: 1.05rem; margin: 4px 0 8px; }
.help-topic-modal-body h3 { font-size: 0.9rem; margin: 18px 0 6px; color: var(--accent-strong); }
.help-topic-modal-body h4 { font-size: 0.84rem; margin: 14px 0 6px; color: var(--text); }
.help-topic-modal-body p { margin: 0 0 10px; color: var(--muted); font-size: 0.84rem; line-height: 1.6; }
.help-topic-modal-body ul { margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: 0.84rem; line-height: 1.65; }
.help-topic-modal-body li::marker { color: var(--accent); }
.help-topic-modal-body > h2:first-child { display: none; }
.help-topic-related { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--surface-border); }
.help-topic-related h3 { margin: 0 0 10px; color: var(--text); font-size: 0.8rem; font-weight: 600; }
.help-topic-related-list { display: flex; flex-wrap: wrap; gap: 8px; }
.help-topic-chip {
  padding: 7px 13px; border: 1px solid rgba(138, 245, 167, 0.24); border-radius: 999px;
  background: rgba(138, 245, 167, 0.07); color: var(--accent); font-size: 0.74rem; font-weight: 600; cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.help-topic-chip:hover { border-color: rgba(138, 245, 167, 0.5); background: rgba(138, 245, 167, 0.13); }

@media (max-width: 820px) {
  .support-help-area-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .help-topic-overlay { padding: 12px; }
  .help-topic-modal-header, .help-topic-modal-body { padding-left: 16px; padding-right: 16px; }
}
.support-shortcuts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.support-shortcut-card { padding: 15px 14px; border: 1px solid var(--surface-border); border-radius: 8px; background: rgba(11, 27, 43, 0.8); }
.support-shortcut-card h3 { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--text); font-size: 0.85rem; font-weight: 600; }
.support-shortcut-card h3 code { font-size: 0.78rem; }
.support-shortcut-card p { margin: 8px 0 0; color: var(--muted); font-size: 0.76rem; line-height: 1.55; }
.support-shortcut-card ul { margin: 9px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.76rem; line-height: 1.75; }
.support-shortcut-card li::marker { color: var(--accent); }
.support-shortcut-card code {
  padding: 2px 6px;
  border: 1px solid rgba(138, 245, 167, 0.24);
  border-radius: 6px;
  background: rgba(138, 245, 167, 0.07);
  color: var(--accent);
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  font-size: 0.72rem;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .support-destination-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .support-landing-header { min-height: 130px; padding-top: 18px; }
  .support-landing-header h1 { font-size: 2rem; }
  .support-landing-header p:not(.support-eyebrow) { font-size: 0.83rem; }
  .support-tour-card { grid-template-columns: 58px minmax(0, 1fr); gap: 14px; padding: 18px; }
  .support-tour-icon { width: 58px; height: 58px; font-size: 1.7rem; }
  .support-tour-reason { grid-column: 1 / -1; padding: 14px 0 0; border-top: 1px solid var(--surface-border); border-left: 0; }
  .support-destination-grid,
  .support-faq-grid,
  .support-shortcuts-grid { grid-template-columns: 1fr; }
  .support-destination-card { min-height: 138px; }
}

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  isolation: isolate;
}
.tour-overlay-blocker {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}
.tour-overlay-blocker > div {
  display: none;
  position: absolute;
  background: rgba(2, 7, 16, 0.58);
  backdrop-filter: blur(1px);
  pointer-events: auto;
}
.tour-overlay-blocker-top {
  inset: 0 0 auto;
  height: var(--tour-hole-top, 0px);
}
.tour-overlay-blocker-right {
  top: var(--tour-hole-top, 0px);
  right: 0;
  bottom: var(--tour-hole-bottom, 0px);
  left: calc(100% - var(--tour-hole-right, 0px));
}
.tour-overlay-blocker-bottom {
  inset: auto 0 0;
  height: var(--tour-hole-bottom, 0px);
}
.tour-overlay-blocker-left {
  top: var(--tour-hole-top, 0px);
  bottom: var(--tour-hole-bottom, 0px);
  left: 0;
  width: var(--tour-hole-left, 0px);
}
.tour-overlay:not(.has-target) .tour-overlay-blocker {
  background: rgba(2, 7, 16, 0.58);
  backdrop-filter: blur(1px);
}
.tour-overlay.has-target .tour-overlay-blocker > div { display: block; }
.tour-spotlight {
  position: fixed;
  z-index: 1;
  border: 1px solid rgba(138, 245, 167, 0.9);
  border-radius: 18px;
  box-shadow: 0 0 0 5px rgba(138, 245, 167, 0.08), 0 0 0 100vmax rgba(2, 7, 16, 0.01), 0 0 32px rgba(138, 245, 167, 0.3);
  pointer-events: none;
  transition: top 260ms ease, left 260ms ease, width 260ms ease, height 260ms ease;
}
.tour-connector {
  position: fixed;
  z-index: 2;
  height: 2px;
  width: 0;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(138, 245, 167, 0.35), var(--accent));
  pointer-events: none;
  transition: width 260ms ease, transform 260ms ease, left 260ms ease, top 260ms ease;
}
.tour-connector span {
  position: absolute;
  right: -1px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(50%, -50%);
  box-shadow: 0 0 12px rgba(138, 245, 167, 0.8);
}
.tour-card {
  position: fixed;
  z-index: 3;
  width: min(390px, calc(100vw - 32px));
  padding: 22px 24px 20px;
  border: 1px solid rgba(138, 245, 167, 0.3);
  border-radius: 18px;
  background: rgba(10, 21, 40, 0.98);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 30px rgba(138, 245, 167, 0.08);
  transition: top 260ms ease, left 260ms ease;
}
.tour-card-topline, .tour-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-step-label, .tour-progress { color: var(--accent); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tour-close-button { border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.tour-close-button:hover { color: var(--text); }
.tour-card h2 { margin: 18px 0 8px; color: #f5f7fb; font-size: 1.35rem; }
.tour-card p { margin: 0 0 22px; color: #b5bfd1; line-height: 1.65; font-size: 0.94rem; }
.tour-card-actions { justify-content: flex-end; }
.tour-progress { margin-right: auto; color: var(--muted); letter-spacing: 0.02em; text-transform: none; font-weight: 500; }
body.tour-open { overflow: hidden; }
@media (max-width: 720px) {
  .tour-card { padding: 18px 20px; }
  .tour-card h2 { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-spotlight, .tour-connector, .tour-card { transition: none; }
}

/* Keep the options drawer rendered off-screen so it can animate like the sidebar. */
@media (max-width: 1180px) {
  .app-shell .right-panel {
    position: fixed;
    top: 10px;
    right: 10px;
    bottom: 10px;
    left: auto;
    width: min(84vw, 320px);
    max-width: 320px;
    height: auto;
    max-height: none;
    z-index: 60;
    transform: translateX(110%);
    transition: transform 220ms ease;
    pointer-events: none;
  }

  .app-shell.mobile-right-nav-open .right-panel {
    height: calc(100dvh - 20px);
    z-index: 60;
    transform: translateX(0);
    pointer-events: auto;
  }

  .app-shell.mobile-right-nav-open .right-panel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    pointer-events: none;
    background: linear-gradient(to top, rgba(6, 10, 18, 0.5) 0%, rgba(6, 10, 18, 0) 70%);
    z-index: 2;
  }
}

/* Keep the compact mobile controls stable across the phone/tablet breakpoint. */
@media (max-width: 900px) {
  :root {
    --mobile-action-size: 44px;
  }

  .app-shell .sidebar,
  .app-shell .right-panel {
    height: calc(100dvh - 20px);
    min-height: 0;
    max-height: none;
  }

  .app-shell .sidebar {
    position: fixed;
    top: 10px;
    left: 10px;
    bottom: 10px;
    width: min(84vw, 320px);
    max-width: 320px;
    display: flex;
    flex-direction: column;
    transform: translateX(-110%);
    transition: transform 220ms ease;
    z-index: 60;
  }

  .app-shell.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .mobile-menu-controls {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left));
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 70;
    display: flex;
    gap: 8px;
  }

  .mobile-sidebar-toggle {
    position: relative;
    left: auto;
    bottom: auto;
    width: var(--mobile-action-size);
    height: var(--mobile-action-size);
    flex: 0 0 var(--mobile-action-size);
    display: grid !important;
    place-items: center;
  }

  .mobile-bottom-fade {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    pointer-events: none;
    background: linear-gradient(to top, rgba(6, 10, 18, 0.5) 0%, rgba(6, 10, 18, 0) 70%);
    z-index: 70;
  }

  .mobile-quick-capture-launcher {
    position: fixed;
    right: 14px;
    bottom: 10px;
    z-index: 92;
    width: var(--mobile-action-size);
    height: var(--mobile-action-size);
    display: grid;
    place-items: center;
    border-radius: 18px;
    border: 1px solid rgba(138, 245, 167, 0.22);
    background: rgba(7, 17, 31, 0.96);
    color: var(--accent);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28), 0 0 18px rgba(138, 245, 167, 0.08);
    font-size: 1.4rem;
    line-height: 1;
  }

  .mobile-quick-capture-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: block;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
  }

  .mobile-quick-capture-backdrop.hidden {
    display: none;
  }

  .today-quick-capture-card {
    display: none;
  }

  .today-quick-capture-card--mobile-open {
    display: grid !important;
    position: fixed;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    width: min(560px, calc(100vw - 20px));
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    z-index: 91;
    margin: 0;
    padding: 16px 14px 14px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    gap: 12px;
    align-content: start;
  }
}

/* Account avatar picker */
.avatar-picker { display: grid; gap: 10px; }
.avatar-picker-layout { display: grid; gap: 16px; }
.avatar-picker-top { display: flex; align-items: center; gap: 14px; }
.avatar-preview, .connections-self-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--surface-border);
  border-radius: 50%;
  background: #0A1528;
  color: #8AF5A7;
  flex-shrink: 0;
}
.avatar-preview svg, .connections-self-avatar svg {
  width: 34px;
  height: 34px;
  display: block;
}
.connections-self-avatar { width: 44px; height: 44px; }
.connections-self-avatar svg { width: 26px; height: 26px; }
.connections-header h1 { display: flex; align-items: center; gap: 12px; }
.avatar-group-label { margin: 0 0 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.avatar-icon-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-icon-option {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.avatar-icon-option:hover { border-color: var(--accent); }
.avatar-icon-option svg { width: 20px; height: 20px; }
.avatar-icon-option.is-selected {
  border-color: var(--accent);
  background: rgba(138, 245, 167, .12);
  box-shadow: 0 0 0 1px var(--accent);
}
.avatar-swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--surface-border);
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
}
.avatar-swatch.is-selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar-save-status { font-size: .75rem; color: var(--success); min-height: 1em; display: inline-block; }
.person-avatar svg { width: 18px; height: 18px; display: block; }
span.person-avatar { display: grid; place-items: center; position: relative; }
span.person-avatar > i { position: absolute; top: -1px; right: -1px; margin: 0; }

/* --- Task link autocomplete + [[taskId]] link chips --- */
.task-link-caret-mirror {
  position: absolute;
  top: -99999px;
  left: -99999px;
  z-index: -1;
  visibility: hidden;
  box-sizing: content-box;
  pointer-events: none;
}
.task-link-popup {
  position: fixed;
  display: none;
  z-index: 9500;
  min-width: 230px;
  max-width: min(360px, calc(100vw - 24px));
  max-height: 262px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  background: var(--panel-strong, #101f33);
  border: 1px solid var(--surface-border, rgba(145, 168, 204, .25));
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(3, 10, 20, .35);
}
.task-link-popup-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text, #eaf0fa);
  font-family: inherit;
  font-size: .82rem;
  text-align: left;
  cursor: pointer;
}
.task-link-popup-row.is-active { background: var(--accent-soft, rgba(138, 245, 167, .14)); }
.task-link-popup-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.task-link-popup-meta {
  flex-shrink: 1;
  min-width: 0;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted, #91a8cc);
  font-size: .62rem;
}
.task-link-chip {
  display: inline-flex;
  align-items: center;
  margin: 1px 2px;
  padding: 1px 8px;
  border: 1px solid rgba(138, 245, 167, .45);
  border-radius: 999px;
  background: rgba(138, 245, 167, .1);
  color: var(--accent-strong, var(--accent));
  font-family: inherit;
  font-size: .82em;
  font-weight: 600;
  line-height: 1.6;
  vertical-align: baseline;
  cursor: pointer;
}
.task-link-chip:hover { background: rgba(138, 245, 167, .22); }
.task-link-chip.is-broken {
  border-style: dashed;
  border-color: var(--surface-border);
  background: transparent;
  color: var(--muted);
  cursor: default;
}

.task-link-popup-icon { flex-shrink: 0; min-width: 1.1em; text-align: center; color: var(--accent); font-size: .9em; }

.task-link-popup-icon svg {
  width: 14px;
  height: 14px;
  display: block;
  margin: 0 auto;
}

.task-action-pill {
  display: inline-flex;
  align-items: center;
  margin: 1px 2px;
  padding: 1px 9px;
  border: 1px solid rgba(188, 130, 237, .5);
  border-radius: 999px;
  background: rgba(188, 130, 237, .12);
  color: #c99bf2;
  font-family: inherit;
  font-size: .82em;
  font-weight: 600;
  line-height: 1.6;
  vertical-align: baseline;
  cursor: pointer;
}
.task-action-pill:hover { background: rgba(188, 130, 237, .24); }
.task-action-pill.is-busy { opacity: .6; cursor: wait; }
.task-action-pill.is-done {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  cursor: default;
}

/* -- Inline SVG icon sizing (converted from text glyphs) ------------------ */
.calm-key-value button svg,
.connections-text-button svg,
.connections-connect-button svg,
.calm-key-value svg,
.connections-label svg { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.connections-text-button svg,
.connections-connect-button svg { width: 13px; height: 13px; }
.sidebar-tab-toggle .toggle-icon svg { width: 15px; height: 15px; display: block; margin: 0 auto; }
.activity-icon svg { width: 14px; height: 14px; display: block; }
.support-tour-icon svg { width: 55%; height: 55%; display: block; }
.support-card-icon svg { width: 21px; height: 21px; display: block; }
.support-destination-card i svg,
.support-tour-button svg { width: 13px; height: 13px; display: inline-block; vertical-align: -1.5px; }
.support-tour-reason strong svg { width: 13px; height: 13px; display: inline-block; vertical-align: -1.5px; margin-right: 3px; }
.philosophy-icon svg { width: 15px; height: 15px; display: block; }
.distance-step > span svg { width: 16px; height: 16px; display: block; }
.details-header-action-btn svg,
.details-desc-edit-btn svg { width: 16px; height: 16px; display: block; }
.details-modal-close svg { width: 16px; height: 16px; display: block; }
.details-pill-icon svg { width: 11px; height: 11px; display: inline-block; vertical-align: -1.5px; }
.details-impact-icon svg { width: 11px; height: 11px; display: inline-block; vertical-align: -1px; margin-right: 2px; }
.details-setting-icon svg { width: 14px; height: 14px; display: block; }
.details-sidebar-section-heading svg { width: 12px; height: 12px; display: inline-block; vertical-align: -1.5px; margin-right: 5px; }
.details-help-icon svg { width: 15px; height: 15px; display: block; }
.details-help-arrow svg { width: 12px; height: 12px; display: block; }
.details-move-to-btn > svg:first-child { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.details-move-to-caret svg { width: 10px; height: 10px; display: inline-block; vertical-align: -1px; }
.details-move-to-option svg { width: 13px; height: 13px; display: inline-block; vertical-align: -1.5px; margin-right: 7px; }
.details-archive-btn svg { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; margin-right: 2px; }
.details-next-step-icon svg { width: 100%; height: 100%; display: block; }
.share-task-tabs button svg { width: 12px; height: 12px; display: inline-block; vertical-align: -1.5px; }
.share-task-actions svg { width: 12px; height: 12px; display: inline-block; vertical-align: -1.5px; }
.details-subtask-order svg,
.details-subtask-menu-button svg { width: 14px; height: 14px; display: block; margin: 0 auto; }
.done-marker svg,
.fact-marker svg { width: 13px; height: 13px; display: block; }
.progress-row-arrow svg { width: 13px; height: 13px; display: block; }
.task-right-now-star svg { width: 12px; height: 12px; display: block; }
.today-admin-bit-handle svg,
.admin-bits-drag-handle svg { width: 13px; height: 13px; display: block; }
.ghost-button svg { width: 13px; height: 13px; display: inline-block; vertical-align: -1.5px; }
.ai-fact-btn svg { width: 14px; height: 14px; display: block; margin: 0 auto; }
.recovery-grounding-remove svg,
.board-filter-chip-remove svg { width: 11px; height: 11px; display: block; margin: 0 auto; }
.burst-star svg { width: 100%; height: 100%; display: block; }
.recovery-analysis-card-icon svg { width: 15px; height: 15px; display: block; }
.tool-icon svg { width: 16px; height: 16px; display: block; }
.wb-save-item-delete svg { width: 12px; height: 12px; display: block; margin: 0 auto; }
.wb-modal-close svg { width: 14px; height: 14px; display: block; margin: 0 auto; }
.connections-card-toolbar h2 svg { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; margin-left: 3px; }

/* ───────────────────────────────────────────────────────────────────────────
  Status Checks — Support & Docs look and feel
   Mirrors the support landing components (tour card, tour button, tour
   reason aside, destination cards) so both pages share one visual language.
   ─────────────────────────────────────────────────────────────────────────── */

.recovery-tabs ul {
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 0;
}

.recovery-tabs .philo-tab {
  padding: 13px 18px;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(10, 24, 39, 0.94), rgba(6, 17, 29, 0.82));
  color: var(--muted);
  font-weight: 600;
}

.recovery-tabs .philo-tab:hover {
  background: var(--surface-2);
  border-color: rgba(138, 245, 167, 0.38);
  color: var(--text);
}

.recovery-tabs .philo-tab.active,
.recovery-tabs .philo-tab:focus {
  background: linear-gradient(145deg, rgba(9, 34, 33, 0.62), rgba(7, 17, 31, 0.78));
  border-color: rgba(138, 245, 167, 0.58);
  color: var(--accent);
}

.recovery-overview-hero {
  gap: 22px;
  padding: 25px 24px;
  border: 1px solid rgba(138, 245, 167, 0.14);
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, rgba(9, 34, 33, 0.62), rgba(7, 17, 31, 0.78));
}

#recovery-overview h2 {
  color: var(--accent);
  font-size: 1.15rem;
}

.recovery-overview-hero .settings-copy {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.48;
}

.recovery-run-btn,
.recovery-refresh-btn,
:root[data-theme='ce'] .recovery-run-btn,
:root[data-theme='ce'] .recovery-refresh-btn,
:root[data-theme='dark'] .recovery-run-btn,
:root[data-theme='dark'] .recovery-refresh-btn {
  padding: 9px 14px;
  border: 1px solid rgba(138, 245, 167, 0.58);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: none;
}

.recovery-run-btn:hover,
.recovery-refresh-btn:hover,
:root[data-theme='ce'] .recovery-run-btn:hover,
:root[data-theme='ce'] .recovery-refresh-btn:hover,
:root[data-theme='dark'] .recovery-run-btn:hover,
:root[data-theme='dark'] .recovery-refresh-btn:hover {
  background: var(--accent-soft);
  border-color: rgba(138, 245, 167, 0.58);
  color: var(--accent);
}

.recovery-featured-insight {
  background: transparent;
  border-left: 1px solid var(--surface-border);
  border-radius: 0;
  padding: 12px 0 12px 26px;
}

.recovery-featured-insight-icon {
  background: rgba(138, 245, 167, 0.08);
  color: var(--accent);
}

.recovery-featured-insight-label {
  color: var(--accent);
}

.recovery-featured-insight-text {
  color: var(--muted);
}

.recovery-featured-insight-button,
:root[data-theme='ce'] .recovery-featured-insight-button,
:root[data-theme='dark'] .recovery-featured-insight-button {
  background: transparent;
  border: 1px solid rgba(138, 245, 167, 0.58);
  border-radius: 8px;
  color: var(--accent);
}

.recovery-featured-insight-button:hover {
  background: var(--accent-soft);
}

.recovery-analysis-card,
:root[data-theme='dark'] .recovery-analysis-card,
:root[data-theme='ce'] .recovery-analysis-card {
  background: linear-gradient(145deg, rgba(10, 24, 39, 0.94), rgba(6, 17, 29, 0.82));
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 18px 20px;
}

.recovery-analysis-card-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(138, 245, 167, 0.08);
  color: var(--accent);
}

.recovery-analysis-card-icon svg {
  width: 20px;
  height: 20px;
}

.recovery-analysis-card-body {
  margin-left: 58px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.recovery-next-step-card,
:root[data-theme='dark'] .recovery-next-step-card,
:root[data-theme='ce'] .recovery-next-step-card {
  border: 1px solid rgba(138, 245, 167, 0.3);
  border-radius: 10px;
  background: linear-gradient(110deg, rgba(9, 34, 33, 0.62), rgba(7, 17, 31, 0.78));
}

@media (max-width: 720px) {
  .recovery-overview-hero {
    padding: 18px;
  }

  .recovery-featured-insight {
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid var(--surface-border);
  }
}

/* ───────────────────────────────────────────────────────────────────────────
   Settings — Support & Docs look and feel (same treatment as Recovery)
   ─────────────────────────────────────────────────────────────────────────── */

.page-tabs ul {
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 0;
}

.page-tabs .philo-tab {
  padding: 13px 18px;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(10, 24, 39, 0.94), rgba(6, 17, 29, 0.82));
  color: var(--muted);
  font-weight: 600;
}

.page-tabs .philo-tab:hover {
  background: var(--surface-2);
  border-color: rgba(138, 245, 167, 0.38);
  color: var(--text);
}

.page-tabs .philo-tab.active,
.page-tabs .philo-tab:focus {
  background: linear-gradient(145deg, rgba(9, 34, 33, 0.62), rgba(7, 17, 31, 0.78));
  border-color: rgba(138, 245, 167, 0.58);
  color: var(--accent);
}

.settings-content {
  max-width: 820px;
}

.settings-content h2 {
  color: var(--accent);
  font-size: 1.15rem;
}

.settings-content h3 {
  color: var(--accent);
}

#settingsView .primary-button,
:root[data-theme='ce'] #settingsView .primary-button,
:root[data-theme='dark'] #settingsView .primary-button {
  padding: 9px 14px;
  border: 1px solid rgba(138, 245, 167, 0.58);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: none;
}

#settingsView .primary-button:hover,
:root[data-theme='ce'] #settingsView .primary-button:hover,
:root[data-theme='dark'] #settingsView .primary-button:hover {
  background: var(--accent-soft);
  border-color: rgba(138, 245, 167, 0.58);
  color: var(--accent);
}

/* Teams & Planner bridge */
.teams-card { grid-column: span 2; }
.teams-webhook-row, .teams-token-create { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.teams-webhook-row input, .teams-token-create input { flex: 1 1 260px; min-width: 0; padding: 9px 12px; border: 1px solid var(--surface-border); border-radius: 7px; background: rgba(5, 15, 29, .8); color: var(--text); font-size: .78rem; }
.teams-webhook-row input:focus, .teams-token-create input:focus { outline: none; border-color: rgba(138, 245, 167, .55); }
.teams-webhook-row .connections-text-button, .teams-token-create .connections-text-button { flex: none; padding: 8px 14px; border: 1px solid var(--surface-border); border-radius: 7px; }
.teams-webhook-row .connections-text-button:hover, .teams-token-create .connections-text-button:hover { border-color: rgba(138, 245, 167, .55); }
.teams-webhook-row .connections-text-button:disabled, .teams-token-create .connections-text-button:disabled, .teams-token-row .connection-menu-action:disabled { opacity: .45; pointer-events: none; }
.teams-token-reveal { margin-top: 10px; }
.teams-token-reveal .calm-key-value { margin-top: 8px; font-size: .82rem; overflow-wrap: anywhere; }
.teams-token-list { display: grid; margin-top: 6px; }
.teams-token-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(145, 168, 204, .1); }
.teams-token-row p { min-width: 0; margin: 0; }
.teams-token-row strong { display: block; color: #dce6f6; font-size: .72rem; font-weight: 500; }
.teams-token-row span { display: block; color: var(--muted); font-size: .62rem; overflow-wrap: anywhere; }
.teams-token-row .connection-menu-action { padding: 4px 8px; font-size: .55rem; }
.teams-how { margin-top: 14px; }
.teams-how summary { cursor: pointer; color: var(--accent); font-size: .74rem; }
.teams-how ol { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: .72rem; line-height: 1.6; }
.teams-how code { padding: 1px 5px; border-radius: 4px; background: rgba(138, 245, 167, .08); color: var(--accent); font-size: .68rem; overflow-wrap: anywhere; }
.teams-how pre { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--surface-border); border-radius: 6px; background: rgba(5, 15, 29, .8); color: #dce6f6; font-size: .66rem; line-height: 1.55; overflow-x: auto; white-space: pre; }
@media (max-width: 620px) { .teams-card { grid-column: auto; } }

/* Trello integration */
.trello-card { grid-column: span 2; }
.trello-card select { flex: 1 1 260px; min-width: 0; padding: 9px 12px; border: 1px solid var(--surface-border); border-radius: 7px; background: rgba(5, 15, 29, .8); color: var(--text); font-size: .78rem; }
.trello-card select:focus { outline: none; border-color: rgba(138, 245, 167, .55); }
.trello-card a { color: var(--accent); }
@media (max-width: 620px) { .trello-card { grid-column: auto; } }

/* Trello list chips + board toggle */
.trello-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.trello-chip { padding: 6px 12px; border: 1px solid var(--surface-border); border-radius: 999px; background: transparent; color: var(--text); font-size: .7rem; }
.trello-chip:hover { border-color: rgba(138, 245, 167, .45); }
.trello-chip.is-active { border-color: rgba(138, 245, 167, .8); background: rgba(138, 245, 167, .12); color: var(--accent); }
.trello-chip:disabled { opacity: .4; pointer-events: none; }
.trello-board-toggle { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: #dce6f6; font-size: .76rem; cursor: pointer; }
.trello-board-toggle input { accent-color: #8af5a7; }

/* GitHub integration */
.github-card { grid-column: span 2; }
@media (max-width: 620px) { .github-card { grid-column: auto; } }
