/* Approved preservation-led refinement, applied after the deployed themes. */
:root, .dark { --evolve-row-border: 210 5% 23%; --evolve-row-hover: 210 7.14% 16.47%; }
.task-row {
  background: hsl(var(--card) / .78);
  border-color: hsl(var(--evolve-row-border) / .68);
  box-shadow: inset 0 1px hsl(var(--glass-highlight) / .12);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background-color .15s, border-color .15s;
  padding: 12px 14px; border-radius: 14px;
}
.task-row:hover { transform: none; background: hsl(var(--evolve-row-hover)); border-color: hsl(var(--evolve-row-border)); box-shadow: none; }
.evolve-task-description { font-size: 13px; line-height: 1.5; margin-top: 4px; }
.evolve-inline-add { border: 1px dashed hsl(var(--border)); box-shadow:none; background:transparent; }
.evolve-inline-add:hover { background:hsl(var(--secondary) / .4); }
.sidebar-item { position:relative; }
.sidebar-item.active::before { position:absolute; left:3px; width:3px; box-shadow:none; }
.sidebar-item.active > :last-child:not(:first-child) { color:inherit !important; }
.evolve-sidebar > div { box-shadow:0 10px 30px hsl(213 30% 25% / .07); }
.evolve-sort { width:180px; min-width:180px; gap:8px; }
.evolve-sort-label { flex:1; text-align:left; white-space:nowrap; }
.atmosphere-panel { padding:16px 18px; box-shadow:inset 0 1px hsl(var(--glass-highlight) / .25); border-color:hsl(var(--border) / .65); background:linear-gradient(120deg,hsl(var(--glass-surface-strong) / .8),hsl(var(--card) / .5)); }
.atmosphere-panel::before { opacity:.35; box-shadow:none; }
.atmosphere-glyph { width:34px; height:34px; box-shadow:none; }
.atmosphere-panel .load-track { display:none; }
main h1 { font-family:var(--font-serif); font-size:24px; line-height:1.3; letter-spacing:-.02em; }
.evolve-page-heading { margin:20px 28px 16px; padding:16px 18px; border:1px solid hsl(var(--border) / .65); border-radius:var(--glass-large-radius); background:hsl(var(--card) / .55); gap:16px; }
main > div > div:first-child:not(.tasks-page) h1 > span:first-child { font-family:var(--font-sans); font-size:18px; }
.evolve-detail-backdrop { background:hsl(var(--background) / .38); backdrop-filter:blur(2px); }
.task-document { max-width:500px; }
.document-chip[aria-pressed="true"] { box-shadow:inset 0 0 0 1px currentColor; font-weight:700; }
.document-chip[aria-pressed="true"]::after { content:'✓'; margin-left:3px; }
/* Glass defines position:relative late in the deployed stylesheet. Restore primitive positioning. */
[role="dialog"].glass-material-large { position:fixed; }
.evolve-dialog-close { position:absolute; inset:12px 12px auto auto; width:32px; height:32px; display:grid; place-items:center; padding:0; }
[role="dialog"] > div:first-child { padding-right:32px; }
.evolve-field { display:flex; flex-direction:column; gap:6px; font-size:12px; color:hsl(var(--muted-foreground)); }
.evolve-field input,.evolve-field textarea { color:hsl(var(--foreground)); }
[role="dialog"] { max-height:calc(100dvh - 32px); overflow-y:auto; }
.evolve-habit-heading,.evolve-habit-row { display:grid; grid-template-columns:minmax(160px,1fr) 444px 32px; align-items:center; gap:12px; padding:12px; }
.evolve-habit-heading { margin-bottom:6px; }
.evolve-habit-heading-label { font-size:13px; font-weight:600; }
.evolve-habit-name { grid-column:1; grid-row:1; }
.evolve-habit-row > .flex.gap-1 { grid-column:2; grid-row:1; }
.evolve-habit-record { grid-column:1; grid-row:2; margin-left:42px; }
.evolve-habit-delete { grid-column:3; grid-row:1; min-width:32px; min-height:32px; opacity:.7; }
.evolve-habit-empty { opacity:1; }
.evolve-habit-empty > div { border-color:hsl(var(--muted-foreground) / .65); }
.dark .evolve-habit-empty > div { border-color:hsl(var(--muted-foreground) / .8) !important; }
.evolve-habit-row button:disabled { cursor:default; }
.evolve-habit-row button:not(:disabled)[data-testid^="habit-check"] { outline:1px solid hsl(var(--muted-foreground) / .6); outline-offset:1px; }
.evolve-week-switch { display:flex; align-items:center; justify-content:space-between; gap:8px; font-weight:400; font-size:12px; }
.evolve-week-switch button { width:40px; height:40px; border:1px solid hsl(var(--border)); border-radius:10px; font-size:18px; }
.evolve-week-switch button:disabled { opacity:.3; }
button:focus-visible,a:focus-visible,[role="button"]:focus-visible { outline:2px solid hsl(var(--ring)); outline-offset:3px; }
.dark .task-row { border-color:hsl(var(--evolve-row-border) / .65); background:hsl(var(--card)); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.dark .task-row:hover { background:hsl(var(--evolve-row-hover)); border-color:hsl(var(--evolve-row-border)); }
.dark .atmosphere-panel { background:hsl(var(--card) / .55); border-color:hsl(var(--border) / .5); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.dark .atmosphere-panel::before { display:none; }
.dark .atmosphere-glyph { background:hsl(var(--secondary)); border-color:hsl(var(--border)); }
.dark .task-document,.dark [role="dialog"].glass-material-large { background:hsl(var(--card) / .98); }
@media(max-width:1100px) and (min-width:768px) {
  .evolve-habit-heading,.evolve-habit-row { grid-template-columns:minmax(0,1fr) 32px; }
  .evolve-habit-heading > .flex.gap-1,.evolve-habit-row > .flex.gap-1 { grid-column:1 / -1; grid-row:2; justify-self:end; }
  .evolve-habit-delete { grid-column:2; }
  .evolve-habit-record { grid-row:3; }
}
@media(max-width:767px) {
  main h1 { font-size:22px; }
  .evolve-page-heading { margin:16px; padding:14px; flex-wrap:wrap; }
  .evolve-habits > div:first-child > div:first-child { gap:8px; flex-wrap:wrap; }
  .task-row { padding:12px 10px; gap:8px; }
  .task-row > button[aria-pressed] { min-width:28px; min-height:28px; display:grid; place-items:center; margin-top:0; }
  .task-row > div:first-child { width:0; }
  .evolve-sort { width:174px; min-width:174px; }
  .task-document { max-width:100%; }
  .atmosphere-panel { padding:14px; }
  .evolve-habits > div { padding-left:16px; padding-right:16px; }
  .evolve-habit-heading,.evolve-habit-row { grid-template-columns:minmax(0,1fr) 36px; gap:8px; padding:12px; }
  .evolve-habit-heading-label { grid-column:1 / -1; }
  .evolve-habit-heading-label > span { display:none; }
  .evolve-habit-heading > .flex.gap-1,.evolve-habit-row > .flex.gap-1 { grid-column:1 / -1; grid-row:2; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; width:100%; }
  .evolve-habit-heading > .flex.gap-1 > div { width:auto; }
  .evolve-habit-row > .flex.gap-1 > button { width:100%; height:40px; }
  .evolve-habit-delete { grid-column:2; width:36px; height:40px; }
  .evolve-habit-record { grid-row:3; }
  .evolve-habit-name .truncate { white-space:normal; overflow:visible; }
  .document-chip { min-height:40px; }
  [role="dialog"] { width:calc(100% - 24px); }
  .evolve-field input,.evolve-field textarea { font-size:16px; }
}
@media(prefers-reduced-motion:reduce) { .task-row { animation:none; transition:none; } }

/* Shared content modules, deliberately separate from their heading panels. */
.evolve-long-content { max-width:1100px; padding:20px 28px 32px; margin:0 auto; }
.evolve-long-content > .evolve-page-heading { margin:0 0 24px; }
.evolve-review,.evolve-settings { max-width:920px; }
.evolve-review [data-testid^="review-step-"] { background:hsl(var(--card)); border-color:hsl(var(--border)); }
.evolve-review [data-testid^="review-step-"]:has([aria-pressed="true"]) { border-color:#83b89e66; }
.evolve-review [data-testid^="review-step-"] > div:first-child { min-height:56px; }
.evolve-review [data-testid^="review-step-"] button:focus-visible { outline-offset:4px; }
.evolve-settings :is([role="switch"],[role="slider"]) { flex-shrink:0; }
.evolve-stats .tabular-nums { font-variant-numeric:tabular-nums; }
.evolve-board-scroll { padding:0 28px 24px; scrollbar-width:thin; scrollbar-color:hsl(var(--muted-foreground)) transparent; }
.evolve-kanban [data-testid^="kanban-col-"] { width:284px; background:hsl(var(--card) / .65) !important; border:1px solid hsl(var(--border)); border-radius:18px; }
.evolve-kanban [data-testid^="kanban-col-"] > div:first-child { min-height:48px; padding:12px 14px; }
/* These two legacy surfaces use !important in the deployed bundle. */
.evolve-kanban [draggable="true"] { background:hsl(var(--secondary) / .5) !important; border-radius:12px !important; box-shadow:none; }
.evolve-matrix [data-testid^="quadrant-"] { background:hsl(var(--card)); border-width:1px; border-top-width:3px; border-radius:16px; }
.evolve-matrix [data-testid^="eisenhower-task-"] { min-height:48px; }

.evolve-notes-desktop,.evolve-calendar-desktop { margin:16px 24px; height:calc(100% - 32px); border:1px solid hsl(var(--border)); border-radius:18px; background:hsl(var(--card)); }
.evolve-notes-desktop .evolve-note-folders { width:164px; background:hsl(var(--card)); }
.evolve-notes-desktop .evolve-note-list { width:236px; background:hsl(var(--background) / .5); }
.evolve-note-editor { background:hsl(var(--card)); }
.evolve-note-editor > div:first-child,.evolve-note-list > div:first-child,.evolve-note-folders > div:first-child { min-height:52px; }
.evolve-note-editor input[aria-label="Заголовок заметки"] { font-family:var(--font-serif); font-size:22px; line-height:1.45; padding:20px 24px 12px; background:transparent; }
.evolve-note-editor textarea { padding:12px 24px 32px; line-height:1.8; background:transparent; }
.evolve-note-list [class~="text-muted-foreground/60"],.evolve-note-list [class~="text-muted-foreground/40"],.evolve-note-folders [class~="text-muted-foreground/40"] { color:hsl(var(--muted-foreground)); }
.evolve-note-folders .group:focus-within button,.evolve-note-folders .group:hover button { opacity:1; }
.evolve-calendar-month { width:340px; background:hsl(var(--card)); }
.evolve-calendar-day { flex:1; min-width:0; width:auto; background:hsl(var(--background) / .3); }
.evolve-calendar-day > div:first-child { min-height:64px; }
.evolve-calendar-day > div:nth-child(2) { padding:20px 24px; }
.evolve-calendar-day textarea { min-height:180px; line-height:1.7; }
.evolve-calendar-month button[aria-pressed],.evolve-calendar-mobile button[aria-pressed] { min-height:42px; }
.evolve-calendar-month [class~="text-muted-foreground/50"],.evolve-calendar-mobile [class~="text-muted-foreground/50"] { color:hsl(var(--muted-foreground)); }
.evolve-calendar-month button[aria-current="date"]:not([aria-pressed="true"]) { box-shadow:inset 0 0 0 1px hsl(var(--primary) / .55); }
@media(min-width:768px) and (max-width:1099px) {
  .evolve-notes-desktop,.evolve-calendar-desktop { display:none; }
  .evolve-notes-mobile,.evolve-calendar-mobile { display:flex; }
}
@media(max-width:767px) {
  .evolve-long-content { padding:16px 16px 28px; }
  .evolve-long-content > .evolve-page-heading { margin:0 0 20px; }
  .evolve-board-scroll { padding:0 16px 20px; }
  .evolve-kanban [data-testid^="kanban-col-"] { width:calc(100vw - 48px); max-width:320px; }
  .evolve-page-heading h1 { overflow-wrap:anywhere; }
  .evolve-settings section > .p-5 { padding:16px; }
  .evolve-settings .grid-cols-2 { grid-template-columns:minmax(0,1fr); }
  .evolve-note-editor input[aria-label="Заголовок заметки"] { padding:16px 18px 10px; }
  .evolve-note-editor textarea { padding:10px 18px 24px; font-size:16px; }
  .evolve-note-folders .group button { opacity:1; }
  .evolve-calendar-day > div:nth-child(2) { padding:16px; }
  .evolve-calendar-day textarea { font-size:16px; }
}
