/* DiamondGamer Workspace: neutral dark greys, quiet borders, one user-chosen accent,
   optional user-chosen gradient background. Components only read the tokens below.
   --accent, --accent-ink, --accent-text, --g1 and --g2 are written by app.js (Appearance panel). */

/* Registered so colour changes animate instead of jumping */
@property --accent { syntax: '<color>'; inherits: true; initial-value: #0071e3; }
@property --accent-ink { syntax: '<color>'; inherits: true; initial-value: #ffffff; }
@property --accent-text { syntax: '<color>'; inherits: true; initial-value: #4da3ff; }
@property --g1 { syntax: '<color>'; inherits: true; initial-value: #1f1f21; }
@property --g2 { syntax: '<color>'; inherits: true; initial-value: #1f1f21; }

:root {
  /* Light theme: neutral system greys */
  --bg: #f5f5f7;
  --nav: #ececef;
  --surface: #ffffff;
  --surface2: #f2f2f4;
  --well: #ededf0;
  --hover: #e8e8ed;
  --input: #ffffff;
  --border: #dedee3;
  --border-strong: #c9c9cf;
  --text: #1d1d1f;
  --text-2: #3a3a3c;
  --muted: #636366;
  --faint: #98989d;
  --accent: #0071e3;
  --accent-ink: #ffffff;
  --accent-text: #0066cc;
  --accent-hover: color-mix(in oklab, var(--accent) 88%, black);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --avatar: #e3e3e8;
  --green: #1f7a3a;  --green-soft: #e3f3e7;
  --amber: #8a5300;  --amber-soft: #fbf0dc;
  --red: #c4291c;    --red-soft: #fde8e6;
  --blue: #0b5cad;   --blue-soft: #e4effb;
  --scrim: rgba(0, 0, 0, .35);
  --elev: 0 18px 48px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06);
  --dialog-bg: var(--surface);

  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --side-w: 244px;
  --top-h: 52px;
  --r-sm: 6px;
  --r: 9px;
  --r-lg: 14px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light;
  transition: --accent .35s ease, --accent-ink .35s ease, --accent-text .35s ease, --g1 .8s var(--ease), --g2 .8s var(--ease);
}

.dark-theme {
  /* Dark theme (default): neutral charcoal */
  --bg: #1f1f21;
  --nav: #18181a;
  --surface: #262628;
  --surface2: #2c2c2e;
  --well: #1b1b1d;
  --hover: #323235;
  --input: #1c1c1e;
  --border: #353538;
  --border-strong: #48484c;
  --text: #f5f5f7;
  --text-2: #d1d1d6;
  --muted: #a1a1a6;
  --faint: #6e6e73;
  --accent-hover: color-mix(in oklab, var(--accent) 86%, white);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --avatar: #3a3a3c;
  --green: #4fd27a;  --green-soft: rgba(79, 210, 122, .13);
  --amber: #ffbd4a;  --amber-soft: rgba(255, 189, 74, .13);
  --red: #ff7b72;    --red-soft: rgba(255, 123, 114, .13);
  --blue: #6cb4ff;   --blue-soft: rgba(108, 180, 255, .13);
  --scrim: rgba(0, 0, 0, .6);
  --elev: 0 24px 64px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* Gradient backgrounds (opt-in from Appearance). Surfaces turn translucent so the gradient
   tints the whole app; muted text is lifted so it stays AA-readable over any colour. */
.has-gradient { --bg: transparent; }
.has-gradient body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(155deg, var(--g-from), var(--g-to));
}
.has-gradient.dark-theme {
  --g-from: color-mix(in oklab, var(--g1) 34%, #0e0e10);
  --g-to: color-mix(in oklab, var(--g2) 34%, #0e0e10);
  background: #0e0e10;
  --nav: rgba(0, 0, 0, .32);
  --surface: rgba(0, 0, 0, .38);
  --surface2: rgba(255, 255, 255, .07);
  --well: rgba(0, 0, 0, .2);
  --hover: rgba(255, 255, 255, .09);
  --input: rgba(0, 0, 0, .3);
  --border: rgba(255, 255, 255, .1);
  --border-strong: rgba(255, 255, 255, .2);
  --avatar: rgba(255, 255, 255, .14);
  --text-2: #e5e5ea;
  --muted: #c7c7cc;
  --faint: #9a9aa0;
  --dialog-bg: rgba(30, 30, 32, .9);
}
.has-gradient:not(.dark-theme) {
  --g-from: color-mix(in oklab, var(--g1) 22%, #f5f5f7);
  --g-to: color-mix(in oklab, var(--g2) 22%, #f5f5f7);
  background: #f5f5f7;
  --nav: rgba(255, 255, 255, .4);
  --surface: rgba(255, 255, 255, .62);
  --surface2: rgba(0, 0, 0, .04);
  --well: rgba(255, 255, 255, .3);
  --hover: rgba(0, 0, 0, .06);
  --input: rgba(255, 255, 255, .75);
  --border: rgba(0, 0, 0, .09);
  --border-strong: rgba(0, 0, 0, .18);
  --avatar: rgba(0, 0, 0, .08);
  --muted: #48484a;
  --dialog-bg: rgba(255, 255, 255, .9);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--border-strong) transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-soft); color: var(--text); }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
a[href], summary, select, label[for], input[type=checkbox], input[type=radio], [role=tab] { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: var(--r-sm); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 0; }
svg { width: 16px; height: 16px; stroke-width: 1.75; vertical-align: middle; flex-shrink: 0; }
img { object-fit: contain; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.15; letter-spacing: -.022em; }
h2 { font-size: 15px; line-height: 1.4; letter-spacing: -.005em; }
h3 { font-size: 14px; line-height: 1.4; }
small { font-size: 12px; }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono, .number { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 8px 12px; z-index: 1000; }
.skip:focus { top: 12px; }
.initial { padding: 64px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.section-gap { margin-top: 16px; }

/* Shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
.workspace { grid-column: 2; min-width: 0; }
.menu-backdrop { display: none; }
.nav-open { overflow: hidden; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 30;
  display: flex; flex-direction: column;
  padding: 10px 10px 12px;
  background: var(--nav);
  border-right: 1px solid var(--border);
  overflow: hidden;
}
/* Nav scrolls on its own; brand and profile stay pinned */
.sidebar nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; margin: 0 -6px; padding: 0 6px 8px; }
.nav-link .project-mark { width: 20px; height: 20px; border-radius: 6px; border: 0; background: var(--surface2); }
.nav-link .project-mark img { width: 14px; height: 14px; }
.nav-link .project-mark svg { width: 12px; height: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; margin-bottom: 6px; border-radius: var(--r); }
.brand img { width: 26px; height: 26px; }
.brand strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.brand small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.nav-label { color: var(--muted); font-size: 12px; font-weight: 600; padding: 14px 10px 4px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  min-height: 32px; padding: 5px 10px; margin: 1px 0;
  border-radius: var(--r);
  color: var(--text-2); font-size: 14px;
  transition: background-color .15s, color .15s;
}
.nav-link svg { color: var(--muted); transition: color .15s; }
.nav-link:hover { background: var(--hover); color: var(--text); }
.nav-link:active { background: var(--border); }
.nav-link.active { background: var(--accent-soft); color: var(--text); font-weight: 500; }
.nav-link.active svg { color: var(--accent-text); }
.nav-link .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-bottom { flex-shrink: 0; padding-top: 8px; }
.local-note { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.local-note svg { width: 14px; height: 14px; margin-top: 1px; }
.local-note strong { display: block; color: var(--text-2); font-weight: 500; }
.profile { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding: 12px 6px 0 8px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--avatar); color: var(--text-2);
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
}
.avatar svg { width: 14px; height: 14px; }
.avatar.dark { background: var(--accent-soft); color: var(--accent-text); }
.tiny-avatar { width: 22px; height: 22px; font-size: 11px; }
.profile-name { min-width: 0; flex: 1; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-name small { display: block; color: var(--muted); font-weight: 400; }
.side-logout { width: 32px; height: 32px; border-radius: var(--r); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; transition: background-color .15s, color .15s; }
.side-logout:hover { background: var(--hover); color: var(--text); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px;
  /* Translucent material: content scrolls under it */
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.has-gradient .topbar { background: rgba(0, 0, 0, .18); }
.has-gradient:not(.dark-theme) .topbar { background: rgba(255, 255, 255, .35); }
.breadcrumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; min-width: 0; }
.crumb { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumb a { color: var(--muted); white-space: nowrap; transition: color .15s; }
.crumb a:hover { color: var(--text); }
.crumb svg { width: 14px; height: 14px; color: var(--faint); }
.breadcrumbs strong { font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs > svg { width: 14px; height: 14px; color: var(--faint); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.search-launch {
  display: flex; align-items: center; gap: 8px;
  height: 34px; min-width: 240px; padding: 0 8px 0 10px;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface); color: var(--muted);
  font-size: 13px; text-align: left;
  transition: border-color .15s, background-color .15s;
}
.search-launch:hover { border-color: var(--border-strong); color: var(--text-2); }
kbd, .search-launch kbd {
  margin-left: auto; font-family: var(--font-ui); font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--border); background: var(--surface2); border-radius: 4px; padding: 0 5px; line-height: 18px;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); background: transparent; border: 1px solid transparent;
  transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:active { transform: scale(.96); }
.mobile-menu { display: none; }
.preview-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 28px; font-size: 13px;
  background: var(--accent-soft); color: var(--text); border-bottom: 1px solid var(--border);
}
.preview-banner button { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }

/* Page */
main { max-width: 1320px; margin: 0 auto; padding: 32px 32px 48px; min-height: calc(100vh - var(--top-h)); }
main:focus { outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.page-heading > div:first-child { min-width: 0; }
.page-heading p { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 680px; }
.greeting h1 { display: flex; align-items: center; gap: 12px; font-size: 30px; }
.greeting h1 img { width: 28px; height: 28px; flex-shrink: 0; }
.eyebrow { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface); color: var(--text);
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .08s;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--hover); border-color: var(--border-strong); }
.btn:active { transform: scale(.98); }
.btn:disabled:active { transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--red); background: var(--red-soft); border-color: transparent; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); padding: 0 8px; }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Pills (real statuses only) */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 7px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 500; line-height: 1.6; white-space: nowrap;
  background: var(--surface2); color: var(--text-2); border: 1px solid var(--border);
}
.pill.blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.pill.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.pill.orange { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.pill.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.dot { display: inline-block; width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: currentColor; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px 12px; }
.card-head > div { min-width: 0; }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-body { padding: 0 18px 18px; }
.card-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; padding: 4px 6px; margin-right: -6px; border-radius: var(--r-sm); transition: color .15s, background-color .15s; }
.card-link svg { width: 14px; height: 14px; }
.card-link:hover { color: var(--text); background: var(--hover); }

/* Overview stats: one strip, hairline dividers */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; margin-bottom: 20px;
}
/* Hairlines drawn on each cell's top/left; the container clips the outer edges, so any count of stats fits */
.stat { padding: 16px 18px; min-width: 0; box-shadow: -1px -1px 0 var(--border); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
.stat-top svg { color: var(--faint); width: 15px; height: 15px; }
.stat-value { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 2px; }
.stat-value strong { font-size: 26px; font-weight: 500; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--muted); }
.stat-line { display: none; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.overview-grid > div { min-width: 0; }
.overview-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Overview: projects as quick-jump tiles */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; min-height: 34px; }
.section-head h2 { font-size: 15px; }
.overview-projects { margin-bottom: 20px; }
.project-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.project-tile {
  display: flex; gap: 12px; align-items: flex-start; min-width: 0;
  padding: 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: border-color .15s, background-color .15s, transform .08s;
}
.project-tile:hover { border-color: var(--border-strong); background: var(--hover); }
.project-tile:active { transform: scale(.985); }
.project-tile .project-desc strong { display: block; }
.project-tile .project-desc span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 13px; margin-top: 2px; }
.project-mark {
  width: 36px; height: 36px; border-radius: var(--r); flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); border: 1px solid var(--border); color: var(--muted);
}
.project-mark img { width: 24px; height: 24px; }
.project-desc { flex: 1; min-width: 0; }
.project-desc strong { font-size: 14px; font-weight: 500; }

.status-orbit { display: flex; align-items: center; gap: 14px; padding: 2px 0 14px; }
.orbit { font-family: var(--font-display); font-weight: 650; letter-spacing: -.03em; font-size: 34px; line-height: 1; color: var(--text); min-width: 44px; font-variant-numeric: tabular-nums; }
.status-orbit h3 { font-size: 14px; font-weight: 500; }
.status-breakdown { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding: 10px 0; color: var(--muted); font-size: 13px; }
.status-breakdown strong { color: var(--text); font-weight: 500; }
.import-note {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; line-height: 1.55; color: var(--muted);
  padding: 10px 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r);
}
.import-note svg { width: 15px; height: 15px; margin-top: 1px; color: var(--muted); }
.access-box { display: flex; gap: 12px; align-items: flex-start; padding: 4px 0 8px; }
.access-box svg { color: var(--muted); width: 20px; height: 20px; margin-top: 1px; }
.access-box strong { font-weight: 500; }
.access-box p { font-size: 13px; color: var(--muted); margin-top: 2px; }

.task-mini { display: flex; gap: 12px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--border); transition: background-color .15s; }
.task-mini:hover { background: var(--hover); }
.task-mini-main { flex: 1; min-width: 0; }
.task-mini-main a, .task-mini-main > strong { font-size: 13.5px; font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-mini-main a:hover { color: var(--accent-text); }
.task-mini-main p { font-size: 12px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.priority-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.priority-dot.high { background: var(--red); }
.priority-dot.med { background: var(--amber); }

.timeline-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.timeline-item:first-child { padding-top: 0; }
.timeline-item:last-child { border: 0; padding-bottom: 0; }
.timeline-symbol { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface2); color: var(--muted); }
.timeline-symbol svg { width: 13px; height: 13px; }
.timeline-item strong { font-size: 13px; font-weight: 500; display: block; }
.timeline-item p { font-size: 12.5px; color: var(--muted); margin-top: 1px; word-break: break-word; }
.timeline-item time { font-size: 12px; color: var(--muted); }

.empty { padding: 32px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty svg { display: block; width: 22px; height: 22px; color: var(--faint); margin: 0 auto 10px; }
.empty strong { display: block; color: var(--text); font-weight: 500; font-size: 14px; margin-bottom: 4px; }
.empty.small { padding: 18px 10px; font-size: 12.5px; }

/* Toolbars, filters, inputs */
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 16px 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-select, .search-input {
  height: 34px; padding: 0 10px; min-width: 140px;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--input); color: var(--text); font-size: 13px;
  transition: border-color .15s;
}
.filter-select:hover, .search-input:hover { border-color: var(--border-strong); }
.search-input { min-width: 260px; }
.search-input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--faint); opacity: 1; }
.segmented { display: inline-flex; gap: 2px; padding: 2px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r); }
.segmented button { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: var(--r-sm); color: var(--muted); font-size: 13px; transition: background-color .15s, color .15s; }
.segmented button svg { width: 14px; height: 14px; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed=true] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.dark-theme .segmented button[aria-pressed=true] { background: var(--hover); }

/* Task board */
.category-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 4px; }
.category-tab { display: inline-flex; gap: 7px; align-items: center; min-height: 32px; padding: 0 10px; border-radius: var(--r); color: var(--muted); font-size: 13px; transition: background-color .15s, color .15s; }
.category-tab svg { width: 15px; height: 15px; }
.category-tab:hover { background: var(--hover); color: var(--text); }
.category-tab[aria-selected=true] { background: var(--hover); color: var(--text); font-weight: 500; }
.category-tab span:last-child { font-size: 12px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }

.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.board-column { min-width: 0; min-height: 280px; padding: 6px; background: var(--well); border: 1px solid var(--border); border-radius: var(--r-lg); }
.column-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 10px; }
.column-head h2 { font-size: 13px; font-weight: 500; letter-spacing: 0; }
.column-head .column-number { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.task-card {
  display: block; width: 100%; text-align: left;
  padding: 12px; margin-bottom: 6px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  transition: border-color .15s, background-color .15s, transform .08s;
  content-visibility: auto; contain-intrinsic-size: auto 130px;
}
.task-card:last-child { margin-bottom: 0; }
.task-card:hover { border-color: var(--border-strong); }
.task-card:active { transform: scale(.99); }
.task-card h3 { font-size: 13.5px; font-weight: 500; line-height: 1.4; margin: 8px 0 4px; overflow-wrap: anywhere; }
.task-card > p { font-size: 12.5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.task-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.kind { font-size: 12px; color: var(--muted); text-transform: capitalize; }

/* Tables */
.table-wrap { position: relative; overflow: auto; max-width: 100%; } /* contains the absolutely positioned .sr-only header labels */
td > strong, td > small { white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th { font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 16px; white-space: nowrap; border-bottom: 1px solid var(--border); background: var(--surface); }
td { padding: 11px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
td .name-cell { display: flex; align-items: center; gap: 10px; }
td strong { display: block; font-size: 13px; font-weight: 500; }
td small { display: block; color: var(--muted); margin-top: 1px; }
td .pill + .pill { margin-left: 2px; }
tbody tr { transition: background-color .15s; content-visibility: auto; contain-intrinsic-size: auto 56px; }
tbody tr:hover { background: var(--hover); }
.table-btn { text-align: left; font-size: 13px; font-weight: 500; padding: 2px 0; transition: color .15s; }
.table-btn:hover { color: var(--accent-text); }
.audit-detail { max-width: 420px; overflow-wrap: anywhere; color: var(--text-2); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Vault */
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.resource {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: border-color .15s;
}
.resource:hover { border-color: var(--border-strong); }
.resource .resource-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.resource-symbol { width: 32px; height: 32px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; background: var(--surface2); color: var(--muted); }
.resource h3 { font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
.resource p { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.resource-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }

/* Service status */
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.service { padding: 16px; display: flex; flex-direction: column; transition: border-color .15s; }
.service:hover { border-color: var(--border-strong); }
.service-name { display: flex; gap: 10px; align-items: flex-start; }
.service-name h3 { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.service-name p { font-size: 12px; color: var(--muted); margin-top: 1px; text-transform: capitalize; }
.service-icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r); background: var(--surface2); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.service .service-description { font-size: 13px; color: var(--muted); margin: 12px 0; flex: 1; }
.service-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12.5px; }
.service-footer button { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 8px; margin-right: -8px; border-radius: var(--r-sm); color: var(--muted); font-size: 13px; transition: background-color .15s, color .15s; }
.service-footer button:hover { background: var(--hover); color: var(--text); }
.service-footer svg { width: 14px; height: 14px; }
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; margin-bottom: 20px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r);
  color: var(--muted); font-size: 13px; line-height: 1.55;
}
.notice svg { width: 16px; height: 16px; margin-top: 1px; color: var(--muted); }
.notice strong { color: var(--text); font-weight: 500; }

/* Soufflé hub */
.split { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 16px; align-items: start; }
.subnav { padding: 6px; }
.subnav button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  min-height: 34px; padding: 0 10px; border-radius: var(--r);
  color: var(--text-2); font-size: 13.5px; text-align: left;
  transition: background-color .15s, color .15s;
}
.subnav button svg { color: var(--muted); width: 15px; height: 15px; }
.subnav button:hover { background: var(--hover); color: var(--text); }
.subnav button[aria-current=page] { background: var(--hover); color: var(--text); font-weight: 500; }
.subnav button[aria-current=page] svg { color: var(--text); }
.subnav button span { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.email-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 18px; border-top: 1px solid var(--border);
  background: transparent; color: var(--text); text-align: left;
  transition: background-color .15s;
}
.email-row:hover { background: var(--hover); }
.email-row-main { min-width: 0; flex: 1; }
.email-row-main strong { display: block; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-row-main p { font-size: 12.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-row time { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mail-status { margin: 0 18px 14px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; min-width: 0; }
.field > span { font-weight: 500; color: var(--text-2); }
.field.full { grid-column: 1 / -1; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 38px; padding: 8px 11px;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--input); color: var(--text); font-size: 13.5px;
  transition: border-color .15s;
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--border-strong); }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.field input[type=color] { padding: 4px; height: 38px; }
.field input[type=checkbox] { width: 16px; min-height: 16px; }
.field small { color: var(--muted); font-size: 12px; }
.check-label {
  display: flex; align-items: center; gap: 9px; min-height: 40px;
  padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--input);
  transition: border-color .15s, background-color .15s;
}
.check-label:hover { border-color: var(--border-strong); }
.check-label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check-label input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-section { font-size: 14px; font-weight: 600; margin: 22px 0 10px; }
.form-error { display: none; color: var(--red); background: var(--red-soft); border-radius: var(--r); padding: 9px 12px; font-size: 13px; }
.form-error:not(:empty) { display: block; margin: 14px 0; }

/* Detail views (inside dialogs) */
.detail-copy { font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.detail-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
  margin: 16px 0; padding: 14px 16px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r);
}
.detail-meta dt { color: var(--muted); font-size: 12px; }
.detail-meta dd { margin: 2px 0 0; font-size: 13.5px; overflow-wrap: anywhere; }
.detail-images { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.detail-images:empty { display: none; }
.detail-images a { display: block; border-radius: var(--r); }
.detail-images img { display: block; width: 140px; height: 90px; object-fit: cover; border: 1px solid var(--border); border-radius: var(--r); transition: opacity .15s; }
.detail-images a:hover img { opacity: .85; }
#task-status-form, #review-form { margin-top: 18px; }
.review-item { border: 1px solid var(--border); border-radius: var(--r); padding: 12px; margin: 8px 0; font-size: 13px; }
.review-item p { margin-top: 6px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-item small { color: var(--muted); }

/* Dialog: the one elevated layer, so it gets the shadow */
dialog {
  width: min(640px, calc(100% - 32px)); max-height: 88dvh; padding: 0;
  background: var(--dialog-bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: var(--elev);
  overflow: auto; overscroll-behavior: contain;
}
dialog::backdrop { background: var(--scrim); }
.dialog-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 18px 20px 14px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.dialog-head > div { min-width: 0; }
.dialog-head h2 { font-family: var(--font-display); font-weight: 650; letter-spacing: -.015em; font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.dialog-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.dialog-head .icon-btn { width: 30px; height: 30px; margin: -2px -6px 0 0; }
.dialog-body { padding: 18px 20px 20px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Global search */
.search-results { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.search-result { display: flex; gap: 10px; align-items: center; min-height: 40px; padding: 8px 10px; border-radius: var(--r); text-align: left; transition: background-color .12s; }
.search-result:hover, .search-result:focus-visible { background: var(--hover); }
.search-result svg { color: var(--muted); width: 15px; height: 15px; }
.search-result span { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.import-files { font-family: var(--font-mono); font-size: 12px; color: var(--muted); max-height: 300px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r); padding: 4px 12px; }
.import-files div { padding: 8px 0; overflow-wrap: anywhere; border-bottom: 1px solid var(--border); }
.import-files div:last-child { border-bottom: 0; }
.import-files strong { color: var(--text-2); font-weight: 500; }

/* Toast */
#toast {
  position: fixed; bottom: 20px; left: calc(50% + var(--side-w) / 2); z-index: 200;
  transform: translateX(-50%) translateY(12px);
  max-width: calc(100% - 32px); padding: 10px 16px;
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--elev);
  font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease);
}
#toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.footnote { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.footnote span { display: flex; align-items: center; gap: 6px; }
.footnote svg { width: 13px; height: 13px; }
.loading-bar { position: fixed; top: 0; left: 0; z-index: 500; width: 100%; height: 2px; background: var(--accent); transform-origin: left; animation: loading 1s ease-in-out infinite alternate; }
@keyframes loading { from { transform: scaleX(.1); opacity: .5; } to { transform: scaleX(1); opacity: 1; } }

/* Sign in */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.login-form-wrap { width: 100%; display: flex; justify-content: center; padding: 0; min-height: 0; max-width: none; margin: 0; }
.login-form { width: min(380px, 100%); }
.login-mark { display: block; width: 40px; height: 40px; margin-bottom: 20px; }
.login-form h1 { font-size: 30px; }
.login-form > p { color: var(--muted); font-size: 14px; margin: 6px 0 24px; }
.login-form .field { margin: 14px 0; }
.login-form .btn { width: 100%; min-height: 40px; margin-top: 6px; }
.login-help { margin-top: 20px; padding: 12px 14px; font-size: 12.5px; line-height: 1.6; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.login-help strong { display: block; color: var(--text); font-weight: 500; margin-bottom: 2px; }
.login-help code { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); background: var(--surface2); border-radius: 4px; padding: 0 4px; }
.login-private { display: flex; gap: 7px; align-items: center; margin-top: 16px; font-size: 12px; color: var(--muted); }
.login-private svg { width: 14px; height: 14px; }

/* Dialog over a gradient: frosted material (the second and last blurred surface, with the top bar) */
.has-gradient dialog { -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%); }
.has-gradient .dialog-head { background: transparent; }

/* Appearance panel */
.appearance-section { padding: 4px 0 18px; }
.appearance-section + .appearance-section { border-top: 1px solid var(--border); padding-top: 18px; }
.appearance-section h3 { font-size: 14px; }
.appearance-section > p { color: var(--muted); font-size: 13px; margin: 2px 0 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch {
  position: relative; width: 30px; height: 30px; border-radius: 50%;
  background: var(--sw); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: transform .15s var(--ease), box-shadow .15s;
}
.swatch:hover { transform: scale(1.08); }
.swatch:active { transform: scale(.94); }
.swatch[aria-pressed=true] { box-shadow: 0 0 0 2px var(--dialog-bg), 0 0 0 4px var(--sw); }
.custom-color { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.custom-color input[type=color] { width: 30px; height: 30px; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%; background: none; overflow: hidden; }
.custom-color input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.custom-color input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.gradient-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.gradient-tile { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); text-align: left; border-radius: var(--r); }
.gradient-tile span:first-child {
  display: block; height: 52px; border-radius: var(--r);
  background: linear-gradient(155deg, var(--a), var(--b));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  transition: transform .15s var(--ease), box-shadow .15s;
}
.gradient-tile:hover span:first-child { transform: translateY(-2px); }
.gradient-tile[aria-pressed=true] span:first-child { box-shadow: 0 0 0 2px var(--dialog-bg), 0 0 0 4px var(--accent-text); }
.gradient-tile[aria-pressed=true] { color: var(--text); font-weight: 500; }
.gradient-custom { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 14px; }

/* Large desktop */
@media (min-width: 1600px) {
  main { max-width: 1440px; padding-top: 40px; }
}

/* Small desktop */
@media (max-width: 1200px) {
  :root { --side-w: 220px; }
  .topbar { padding: 0 24px; }
  .preview-banner { padding: 8px 24px; }
  main { padding: 28px 24px 40px; }
  .overview-grid { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); }
  .kanban { gap: 8px; }
  .resource-grid, .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 200px minmax(0, 1fr); }
}

/* Tablet */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-stack { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-actions .search-launch { min-width: 0; width: 34px; padding: 0; justify-content: center; background: transparent; border-color: transparent; }
  .top-actions .search-launch:hover { background: var(--hover); }
  .search-launch span, .search-launch kbd { display: none; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar > .muted { align-self: flex-start; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .subnav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .subnav button { width: auto; flex-shrink: 0; white-space: nowrap; gap: 8px; }
  .subnav button span { margin-left: 2px; }
}

/* Phone: sidebar becomes a drawer */
@media (max-width: 740px) {
  :root { --top-h: 56px; }
  .shell { display: block; }
  .sidebar {
    width: min(288px, 86vw); padding-top: 12px;
    transform: translateX(-100%);
    transition: transform .32s var(--ease);
    box-shadow: var(--elev);
  }
  .shell.menu-open .sidebar { transform: translateX(0); z-index: 30; }
  /* The drawer floats over page content, so over a gradient it needs a near-solid frosted material */
  .has-gradient .sidebar { background: var(--dialog-bg); -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%); }
  .menu-open .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 25; width: 100%; height: 100dvh; background: var(--scrim); }
  .mobile-menu { display: inline-flex; margin-left: -6px; }
  .topbar { padding: 0 16px; gap: 8px; }
  .breadcrumbs > span:first-of-type, .breadcrumbs > svg { display: none; }
  .preview-banner { padding: 8px 16px; flex-wrap: wrap; }
  main { padding: 20px 16px 32px; }
  h1 { font-size: 24px; }
  .greeting h1 { font-size: 25px; gap: 10px; }
  .greeting h1 img { width: 24px; height: 24px; }
  .page-heading { flex-wrap: wrap; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
  .page-heading p { font-size: 13.5px; }
  .page-heading .button-row { width: 100%; }
  .page-heading .button-row .btn { flex: 1; }
  .stat { padding: 14px; }
  .stat-value strong { font-size: 22px; }
  .overview-stack { display: flex; }
  .card-head { padding: 14px 16px 10px; }
  .card-body { padding: 0 16px 16px; }
  .project-row, .task-mini, .email-row { padding-left: 16px; padding-right: 16px; }
  .kanban { grid-template-columns: minmax(0, 1fr); }
  .board-column { min-height: 0; }
  .resource-grid, .services-grid { grid-template-columns: minmax(0, 1fr); }
  .filters { width: 100%; }
  .filter-select, .search-input { flex: 1; min-width: 0; }
  .search-input { flex-basis: 100%; width: 100%; }
  .segmented { align-self: flex-start; }
  .form-grid, .checks { grid-template-columns: minmax(0, 1fr); }
  .field.full { grid-column: auto; }
  .detail-meta { grid-template-columns: 1fr 1fr; }
  dialog { width: calc(100% - 16px); max-height: 92dvh; }
  .dialog-head { padding: 16px 16px 12px; }
  .dialog-body { padding: 16px; }
  .dialog-head h2 { font-size: 19px; }
  td, th { padding: 10px 12px; }
  .footnote { flex-direction: column; align-items: flex-start; gap: 4px; }
  #toast { left: 50%; bottom: 16px; }
}

/* Touch devices: every control reaches a 44px target */
@media (max-width: 740px), (pointer: coarse) {
  .btn, .btn.sm, .icon-btn, .nav-link, .subnav button, .category-tab, .side-logout,
  .search-result, .filter-select, .search-input, .field input, .field select, .check-label,
  .service-footer button, .card-link, .preview-banner button { min-height: 44px; }
  .icon-btn, .side-logout { width: 44px; height: 44px; }
  .search-launch { height: 44px; }
  .top-actions .search-launch { width: 44px; }
  .filter-select, .search-input { height: 44px; }
  .segmented button { min-height: 40px; }
  .card-link { display: inline-flex; align-items: center; }
  .dialog-head .icon-btn { width: 44px; height: 44px; margin: -8px -10px 0 0; }
  .swatch, .custom-color input[type=color] { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .task-card:active, .btn:active, .icon-btn:active { transform: none; }
  .project-row:hover .project-meta svg { transform: none; }
}

@media (prefers-contrast: more) {
  :root, .dark-theme { --border: var(--border-strong); --muted: var(--text-2); }
}
