/* Platespin
   Tokens first (light, then dark), then layout, components and views. */

:root {
  color-scheme: light;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #ffffff;
  --bg-page: #f7f7f8;
  --bg-subtle: #f4f4f5;
  --bg-hover: #f0f0f2;
  --bg-active: #e7e7ea;
  --border: #e4e4e7;
  --border-strong: #d0d0d6;
  --text: #1d1d1f;
  --text-2: #52525b;
  --text-3: #71717a;

  --accent: #256abf;
  --accent-hover: #1c5cab;
  --accent-soft: #e8f1fc;
  --accent-text: #1c5cab;
  --on-accent: #ffffff;
  --focus: #3b82f6;

  /* Charts and meters (one hue, lighter track of the same ramp) */
  --series: #2a78d6;
  --track: #cde2fb;

  /* Status: always paired with an icon or a word */
  --good: #0ca30c;
  --good-text: #006300;
  --critical: #d03b3b;
  --critical-text: #c42f2f;
  --critical-soft: #fdecec;

  --priority-high: #e5484d;
  --priority-high-text: #c42b30;
  --priority-high-bg: #feebec;
  --priority-medium: #f5a524;
  --priority-medium-text: #8a5100;
  --priority-medium-bg: #fff3d6;
  --priority-low: #3e63dd;
  --priority-low-text: #3451b2;
  --priority-low-bg: #edf2fe;

  /* Timeline: weekend shading, week lines */
  --tl-weekend: rgba(16, 24, 40, 0.035);
  --tl-line: #ececef;

  --sidebar-bg: #1f2024;
  --sidebar-text: #e7e7ea;
  --sidebar-muted: #a3a3ad;
  --sidebar-hover: rgba(255, 255, 255, 0.07);
  --sidebar-active: rgba(255, 255, 255, 0.13);

  /* Illustrations: the paper they're drawn on, dimmed a little in dark mode */
  --art-paper: #faf7ef;
  --art-filter: none;

  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-2: 0 4px 14px rgba(16, 24, 40, 0.1);
  --shadow-3: 0 18px 50px rgba(16, 24, 40, 0.22);
  --radius: 8px;
  --radius-small: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1b1b1f;
    --bg-page: #151518;
    --bg-subtle: #222227;
    --bg-hover: #29292f;
    --bg-active: #333339;
    --border: #313137;
    --border-strong: #46464e;
    --text: #ededf0;
    --text-2: #b6b6bf;
    --text-3: #92929c;
    --accent: #2a78d6;
    --accent-hover: #3987e5;
    --accent-soft: #1b2a40;
    --accent-text: #86b6ef;
    --series: #3987e5;
    --track: #0d366b;
    --good-text: #3fcf5f;
    --critical-text: #ff8080;
    --critical-soft: #3a1f22;
    --priority-high-text: #ff9592;
    --priority-high-bg: #3b1a1d;
    --priority-medium-text: #ffca16;
    --priority-medium-bg: #33270a;
    --priority-low-text: #9eb1ff;
    --priority-low-bg: #1c2340;
    --tl-weekend: rgba(255, 255, 255, 0.03);
    --tl-line: #26262b;
    --sidebar-bg: #121215;
    --art-filter: brightness(0.72);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 18px 50px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1b1f;
  --bg-page: #151518;
  --bg-subtle: #222227;
  --bg-hover: #29292f;
  --bg-active: #333339;
  --border: #313137;
  --border-strong: #46464e;
  --text: #ededf0;
  --text-2: #b6b6bf;
  --text-3: #92929c;
  --accent: #2a78d6;
  --accent-hover: #3987e5;
  --accent-soft: #1b2a40;
  --accent-text: #86b6ef;
  --series: #3987e5;
  --track: #0d366b;
  --good-text: #3fcf5f;
  --critical-text: #ff8080;
  --critical-soft: #3a1f22;
  --priority-high-text: #ff9592;
  --priority-high-bg: #3b1a1d;
  --priority-medium-text: #ffca16;
  --priority-medium-bg: #33270a;
  --priority-low-text: #9eb1ff;
  --priority-low-bg: #1c2340;
  --tl-weekend: rgba(255, 255, 255, 0.03);
  --tl-line: #26262b;
  --sidebar-bg: #121215;
  --art-filter: brightness(0.72);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 18px 50px rgba(0, 0, 0, 0.6);
}

/* Base ------------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font: 14px/1.45 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

::placeholder {
  color: var(--text-3);
  opacity: 1;
}

kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  font: 12px/1.5 var(--font);
  text-align: center;
  color: var(--text-2);
  background: var(--bg-subtle);
}

.icon {
  flex: none;
}

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

.muted {
  color: var(--text-3);
}

.small {
  font-size: 12.5px;
}

.tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-active);
  vertical-align: middle;
}

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

.noscript {
  padding: 24px;
}

/* Scrollbars that stay out of the way */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

/* Layout ---------------------------------------------------------------------- */

.app {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scrim {
  display: none;
}

.app[hidden],
.auth-screen[hidden] {
  display: none;
}

/* Sidebar --------------------------------------------------------------------- */

.sidebar {
  width: 248px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  color: var(--sidebar-text);
  background: var(--sidebar-bg);
  overflow: hidden;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.logo {
  flex: none;
}

.sidebar .icon-btn {
  color: var(--sidebar-muted);
}

.sidebar .icon-btn:hover {
  color: var(--sidebar-text);
  background: var(--sidebar-hover);
}

.sidebar .sidebar-close {
  display: none;
}

.nav,
.project-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.project-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-small);
  color: var(--sidebar-text);
  background: none;
  text-align: left;
}

.nav-item .icon {
  color: var(--sidebar-muted);
}

.nav-item:hover {
  background: var(--sidebar-hover);
}

.nav-item.active {
  background: var(--sidebar-active);
  font-weight: 550;
}

.nav-item.active .icon {
  color: var(--sidebar-text);
}

.nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-badge {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  color: var(--sidebar-text);
  background: rgba(255, 255, 255, 0.14);
}




.nav-empty {
  color: var(--sidebar-muted);
}

.nav-none {
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--sidebar-muted);
}

.team-group {
  margin-top: 14px;
}

.team-heading {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 2px;
  border-radius: var(--radius-small);
}

.team-heading:hover {
  background: var(--sidebar-hover);
}

.team-heading.active {
  background: var(--sidebar-active);
}

.sidebar .team-toggle {
  width: 22px;
  height: 32px;
}

.sidebar .team-toggle:hover {
  background: none;
}

.team-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-weight: 600;
  color: var(--sidebar-text);
}

.sidebar .team-add {
  width: 26px;
  height: 26px;
}

@media (hover: hover) {
  .sidebar .team-add {
    opacity: 0;
  }

  .team-heading:hover .team-add,
  .team-heading:focus-within .team-add {
    opacity: 1;
  }
}

.team-projects-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 16px;
}

.team-projects-nav .nav-item {
  min-height: 32px;
}

.team-projects-nav .nav-none {
  padding-left: 12px;
}

.team-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  background: var(--swatch);
}

.team-initial.small {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 11px;
}

.team-initial.large {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 19px;
}

.project-swatch {
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 4px;
  background: var(--swatch);
}





/* Top bar --------------------------------------------------------------------- */

.topbar {
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.topbar .menu-toggle {
  display: none;
}

.search {
  position: relative;
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.search > .icon {
  position: absolute;
  left: 11px;
  color: var(--text-3);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 36px;
  padding: 0 34px 0 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-subtle);
}

.search-input:hover {
  border-color: var(--border-strong);
}

.search-input:focus {
  outline: none;
  border-color: var(--focus);
  background: var(--bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}

.search-input::-webkit-search-cancel-button {
  display: none;
}

.search-kbd {
  position: absolute;
  right: 10px;
  pointer-events: none;
}

.search-input:focus + .search-kbd {
  display: none;
}

.topbar-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 70px;
  justify-content: flex-end;
  font-size: 12.5px;
  color: var(--text-3);
}

.avatar-btn {
  display: flex;
  padding: 2px;
  border: 0;
  border-radius: 999px;
  background: none;
}

.avatar-btn:hover {
  box-shadow: 0 0 0 2px var(--border-strong);
}

/* Buttons --------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  font-weight: 550;
  white-space: nowrap;
  color: var(--text);
  background: var(--bg);
}

.btn:hover:not(:disabled) {
  background: var(--bg-hover);
}

.btn:disabled {
  opacity: 0.55;
}

.btn-primary {
  border-color: transparent;
  color: var(--on-accent);
  background: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-danger {
  border-color: transparent;
  color: #ffffff;
  background: var(--critical);
}

.btn-danger:hover:not(:disabled) {
  background: #b92f2f;
}

.btn-subtle {
  border-color: transparent;
  color: var(--text-2);
  background: none;
}

.btn-subtle:hover:not(:disabled) {
  color: var(--text);
}

.btn-subtle.danger:hover:not(:disabled) {
  color: var(--critical-text);
  background: var(--critical-soft);
}

.btn-wide {
  width: 100%;
  height: 38px;
}

.btn-small {
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
}

.btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-text);
  background: var(--accent-soft);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius-small);
  color: var(--text-3);
  background: none;
}

.icon-btn:hover:not(:disabled) {
  color: var(--text);
  background: var(--bg-hover);
}

.icon-btn.danger-icon:hover:not(:disabled) {
  color: var(--critical-text);
  background: var(--critical-soft);
}

.chip-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  background: var(--bg);
}

.chip-btn:hover,
.chip-btn.selected {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-soft);
}

.segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-small);
  background: var(--bg-active);
}

.segmented button {
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-2);
  background: none;
}

.segmented button.active {
  color: var(--text);
  background: var(--bg);
  box-shadow: var(--shadow-1);
}

/* Small shared pieces --------------------------------------------------------- */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--size, 24px);
  height: var(--size, 24px);
  flex: none;
  border-radius: 999px;
  font-size: calc(var(--size, 24px) * 0.4);
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: var(--avatar, #8b8d98);
  user-select: none;
}

.avatar-empty {
  border: 1px dashed var(--border-strong);
  color: var(--text-3);
  background: none;
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: none;
  padding: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  color: transparent;
  background: var(--bg);
  transition: background-color 0.12s, border-color 0.12s;
}

.check:hover,
.row:hover .check:not(.checked, .static),
.home-task:hover .check:not(.checked, .static),
.card[data-id]:hover .check:not(.checked, .static) {
  border-color: var(--good);
  color: var(--good);
}

.check.checked {
  border-color: var(--good);
  color: #ffffff;
  background: var(--good);
}

.check.static {
  pointer-events: none;
}

.due {
  white-space: nowrap;
  color: var(--text-2);
}

.due.overdue {
  color: var(--critical-text);
  font-weight: 550;
}

.due.today {
  color: var(--good-text);
  font-weight: 550;
}

.due.soon {
  color: var(--text);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.priority-high {
  color: var(--priority-high-text);
  background: var(--priority-high-bg);
}

.priority-medium {
  color: var(--priority-medium-text);
  background: var(--priority-medium-bg);
}

.priority-low {
  color: var(--priority-low-text);
  background: var(--priority-low-bg);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--bg-subtle);
}

a.chip:hover {
  color: var(--text);
  background: var(--bg-active);
}

.chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-muted {
  color: var(--text-3);
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--text-3);
}

.field-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  min-height: 30px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  color: var(--text);
  background: none;
  text-align: left;
}

.field-btn:hover:not(:disabled) {
  border-color: var(--border);
  background: var(--bg-hover);
}

.field-btn.is-empty .icon {
  color: var(--text-3);
  opacity: 0;
}

.row:hover .field-btn.is-empty .icon,
.row:focus-within .field-btn.is-empty .icon,
.card[data-id]:hover .field-btn.is-empty .icon,
.subtask:hover .field-btn.is-empty .icon,
.pane-field .field-btn.is-empty .icon,
.field-btn.is-empty:focus-visible .icon {
  opacity: 1;
}

/* What viewers see instead of a button */
.field-btn.field-static {
  cursor: default;
}

.field-btn.field-static:hover {
  border-color: transparent;
  background: none;
}

.badge-view-only {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-2);
  background: var(--bg-active);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-2);
  background: var(--bg-active);
}

.role-badge.role-admin {
  color: var(--accent-text);
  background: var(--accent-soft);
}

.role-badge.role-viewer {
  background: none;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.field-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.spinner.small {
  width: 12px;
  height: 12px;
  border-width: 1.5px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 16px;
  color: var(--text-3);
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 56px 16px;
  text-align: center;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  border-radius: 999px;
  color: var(--accent-text);
  background: var(--accent-soft);
}

.empty-icon.danger {
  color: var(--critical-text);
  background: var(--critical-soft);
}

/* An illustration in a rounded tile the color of its paper, its edges faded
   out so the drawing sits in the tile rather than on it. */
.empty-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 248px;
  aspect-ratio: 1;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--art-paper);
  filter: var(--art-filter);
}

.empty-art img {
  width: auto;
  height: 100%;
  mask-image: linear-gradient(to right, transparent 1%, #000 8%, #000 92%, transparent 99%),
    linear-gradient(transparent 1%, #000 7%, #000 93%, transparent 99%);
  mask-composite: intersect;
}

.empty-title {
  font-size: 15px;
  font-weight: 600;
}

.empty-text {
  max-width: 380px;
  margin-bottom: 8px;
  color: var(--text-2);
}

/* Pages and view headers ------------------------------------------------------ */

.view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--bg-page);
}

.view-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px 12px;
}

.view-head-text {
  flex: 1;
}

.view-title {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.view-subtitle {
  color: var(--text-2);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
}

.toolbar-spacer {
  flex: 1;
}

.toolbar-count {
  font-size: 12.5px;
  color: var(--text-3);
}

/* Project header -------------------------------------------------------------- */

.project-head {
  padding: 16px 24px 0;
  border-bottom: 1px solid var(--border);
}

.crumb {
  display: inline-block;
  margin: 0 0 4px 2px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-3);
}

.crumb:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: var(--swatch);
}

.project-icon.large {
  width: 40px;
  height: 40px;
}

button.project-icon:hover {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch) 30%, transparent);
}

.title-input {
  flex: 0 1 auto;
  min-width: 120px;
  width: min(100%, 560px);
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
  background: none;
  text-overflow: ellipsis;
}

.title-input:hover {
  border-color: var(--border);
}

.title-input:focus {
  outline: none;
  border-color: var(--focus);
  background: var(--bg);
}

.tabs {
  display: flex;
  gap: 4px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 10px;
  border-bottom: 2px solid transparent;
  font-weight: 550;
  white-space: nowrap;
  color: var(--text-2);
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.tabs.small {
  margin: 0;
  gap: 2px;
}

.tabs.small button {
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-2);
  background: none;
}

.tabs.small button:hover {
  background: var(--bg-hover);
}

.tabs.small button.active {
  color: var(--accent-text);
  background: var(--accent-soft);
}

/* List view ------------------------------------------------------------------- */

.list-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 24px 48px;
}

.list-grid {
  --cols: minmax(260px, 1fr) 176px 124px 116px;
  min-width: 680px;
}

.list-header,
.row {
  display: grid;
  grid-template-columns: var(--cols);
}

.list-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-3);
  background: var(--bg);
}

.list-header .cell {
  min-height: 36px;
}

.cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  padding: 3px 8px;
  border-left: 1px solid var(--border);
}

.cell-name {
  padding-left: 4px;
  border-left: 0;
}

.row {
  position: relative;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
}

.row:hover {
  background: var(--bg-subtle);
}

.row.selected {
  background: var(--accent-soft);
}

.row.is-done .task-name {
  color: var(--text-3);
}

.row.is-dragging,
.card.is-dragging,
.cal-chip.is-dragging {
  opacity: 0.4;
}

.grip {
  display: flex;
  margin-left: -6px;
  color: var(--text-3);
  opacity: 0;
  cursor: grab;
}

.row:hover .grip {
  opacity: 1;
}

.task-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta {
  display: inline-flex;
  gap: 8px;
}

.row .cell-name {
  position: relative;
}

.row-open {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  transform: translateY(-50%);
  border-radius: 5px;
  font-size: 12px;
  color: var(--text-3);
  opacity: 0;
}

.row:hover .row-open,
.row:focus-visible .row-open {
  opacity: 1;
  background: var(--bg-active);
}

.parent-ref {
  display: inline-flex;
  flex: 0 3 auto;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-3);
}

.inline-input {
  flex: 1;
  min-width: 0;
  padding: 3px 6px;
  border: 1px solid var(--focus);
  border-radius: 5px;
  background: var(--bg);
}

.inline-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent);
}

.section {
  margin-top: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.section-head.drop-target {
  border-radius: var(--radius-small);
  background: var(--accent-soft);
}

.section-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  font-size: 15px;
  font-weight: 650;
}

.is-overdue .section-name {
  color: var(--critical-text);
}

.section-count {
  min-width: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--text-2);
  background: var(--bg-active);
}

.section-add-top {
  opacity: 0;
}

.section-head:hover .section-add-top,
.section-add-top:focus-visible {
  opacity: 1;
}

.section-input {
  flex: 0 1 320px;
  font-size: 15px;
  font-weight: 650;
}

.section-body {
  border-top: 1px solid var(--border);
}

.section-body.drop-target {
  box-shadow: inset 2px 0 0 var(--accent);
}

.add-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  text-align: left;
}

.add-row .cell {
  gap: 6px;
  padding-left: 30px;
}

.add-row:hover {
  color: var(--text);
}

.composer-row {
  cursor: default;
}

.composer-row .cell {
  grid-column: 1 / -1;
  padding-left: 24px;
}

.composer-input {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--focus);
  border-radius: 5px;
  background: var(--bg);
  resize: none;
}

.composer-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent);
}

.section-add {
  display: flex;
  max-width: 360px;
  margin-top: 18px;
}

.add-section-btn {
  margin-top: 16px;
}

.my-grid {
  --cols: minmax(260px, 1fr) 200px 130px 120px;
}

/* Drag and drop markers */
.drop-marker-line {
  height: 2px;
  margin: -1px 0;
  border-radius: 2px;
  background: var(--accent);
}

.drop-marker-card {
  height: 44px;
  flex: none;
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

/* Board view ------------------------------------------------------------------ */

.board {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 24px 20px;
  overflow: auto;
  background: var(--bg-page);
}

.column {
  width: 290px;
  max-height: 100%;
  flex: none;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  background: var(--bg-subtle);
}

.column-new {
  padding: 8px;
  background: none;
}

.add-column {
  justify-content: flex-start;
  width: 100%;
}

.column-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 6px 12px;
}

.column-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-head .section-input {
  font-size: 14px;
}

.column-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 48px;
  padding: 4px 8px 8px;
  overflow-y: auto;
}

.column-body.drop-target {
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-1);
  cursor: pointer;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-2);
}

.card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.card-top .check {
  margin-top: 1px;
}

.card-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.card.is-done .card-name {
  color: var(--text-3);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 -4px;
  font-size: 12.5px;
}

.card-foot .field-btn {
  min-height: 28px;
  padding: 2px 5px;
}

.card-meta {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.composer-card {
  cursor: default;
}

.composer-card .composer-input {
  min-height: 52px;
}

.add-card {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 8px 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--radius-small);
  color: var(--text-3);
  background: none;
}

.add-card:hover {
  color: var(--text);
  background: var(--bg-hover);
}

/* Calendar view --------------------------------------------------------------- */

.calendar {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.calendar-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
}

.calendar-title {
  margin-left: 8px;
  font-size: 17px;
  font-weight: 650;
}

.calendar-body {
  flex: 1;
  min-height: 0;
  display: flex;
}

.calendar-scroll {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 0 24px 24px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(88px, 1fr));
  grid-template-rows: auto;
  grid-auto-rows: minmax(108px, auto);
  min-width: 640px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.calendar-dow {
  padding: 6px 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-3);
}

.day {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 4px 6px 6px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.day.weekend {
  background: var(--bg-page);
}

.day.outside .day-number {
  color: var(--text-3);
}

.day.drop-target {
  background: var(--accent-soft);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.day.today .day-number {
  color: #ffffff;
  background: var(--accent);
}

.day-add {
  width: 24px;
  height: 24px;
  opacity: 0;
}

.day:hover .day-add,
.day-add:focus-visible {
  opacity: 1;
}

.day-tasks {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cal-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12.5px;
  text-align: left;
  background: var(--bg);
  box-shadow: var(--shadow-1);
  cursor: pointer;
}

.cal-chip:hover {
  border-color: var(--border-strong);
}

.cal-chip.selected {
  border-color: var(--accent);
}

.cal-chip .check {
  width: 14px;
  height: 14px;
  border-width: 1.25px;
}

.cal-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-chip.is-done .cal-chip-name {
  color: var(--text-3);
  text-decoration: line-through;
}

.cal-chip.overdue {
  border-left: 3px solid var(--critical);
}

.day-more {
  padding: 2px 6px;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 550;
  text-align: left;
  color: var(--text-2);
  background: none;
}

.day-more:hover {
  background: var(--bg-hover);
}

.day-composer {
  padding: 3px 6px;
  font-size: 12.5px;
}

.day-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
}

.day-list-title {
  margin-bottom: 4px;
  font-weight: 600;
}

.unscheduled {
  width: 230px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 24px 24px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-y: auto;
  background: var(--bg-subtle);
}

.unscheduled.drop-target {
  background: var(--accent-soft);
}

.unscheduled-title {
  font-size: 14px;
  font-weight: 650;
}

.unscheduled-hint {
  font-size: 12.5px;
  color: var(--text-2);
}

.unscheduled-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Home ------------------------------------------------------------------------ */

.home {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.home-head {
  margin-bottom: 24px;
  text-align: center;
}

.home-date {
  font-weight: 550;
  color: var(--text-2);
}

.home-head h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.kpis.compact {
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.kpis.compact .stat {
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-color: transparent;
}

.stat-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-2);
}

.stat-value {
  font-size: 28px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.kpis.compact .stat-value {
  font-size: 22px;
}

.stat-critical .stat-label {
  color: var(--critical-text);
  font-weight: 550;
}

.stat-critical .stat-label .icon {
  color: var(--critical);
}

.stat-note {
  font-size: 12px;
  color: var(--text-3);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.card-head h2 {
  white-space: nowrap;
}

section.card {
  display: block;
  padding: 16px 18px;
  cursor: default;
  box-shadow: none;
}

section.card:hover {
  border-color: var(--border);
  box-shadow: none;
}

section.card h2 {
  font-size: 16px;
  font-weight: 650;
}

section.card h2 a:hover {
  text-decoration: underline;
}

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

.card-empty {
  padding: 18px 4px;
  color: var(--text-2);
}

.home-tasks {
  display: flex;
  flex-direction: column;
}

.home-task {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.home-task:hover {
  background: var(--bg-subtle);
}

.home-task-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-task.is-done .home-task-name {
  color: var(--text-3);
}

.home-task-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.home-task-where {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-3);
}

.home-task-where .project-swatch {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.home-task-due {
  width: 76px;
  flex: none;
  text-align: right;
  font-size: 13px;
}

.project-tiles {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius);
}

.project-tile:hover {
  background: var(--bg-subtle);
}

.project-tile.is-archived {
  opacity: 0.75;
}

.project-tile-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.project-tile-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-tile-team {
  margin-top: -4px;
  font-size: 12px;
  color: var(--text-3);
}

.project-tile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12.5px;
  color: var(--text-2);
}

.overdue-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 550;
  color: var(--critical-text);
}

.overdue-note .icon {
  color: var(--critical);
}

.project-tile-percent {
  width: 44px;
  flex: none;
  text-align: right;
  font-weight: 600;
  color: var(--text-2);
}

/* Meter: same-hue track and fill */
.meter {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--track);
}

.meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--series);
}

/* Overview -------------------------------------------------------------------- */

.overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

.overview-about,
.overview-progress {
  grid-column: span 1;
}

.overview-upcoming {
  grid-column: 1 / -1;
}

.about-input {
  width: 100%;
  min-height: 120px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  line-height: 1.55;
  background: var(--bg-subtle);
  resize: none;
}

.about-input:hover {
  border-color: var(--border);
}

.about-input:focus {
  outline: none;
  border-color: var(--focus);
  background: var(--bg);
}

.progress-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-line .meter {
  flex: 1;
}

.progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.chart {
  margin: 0;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(90px, 32%) 1fr;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  padding: 2px 4px;
  border-radius: var(--radius-small);
}

.bar-row:hover,
.bar-row:focus-visible {
  background: var(--bg-subtle);
}

.bar-label {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
}

.bar-track {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border-left: 1px solid var(--border-strong);
}

.bar {
  height: 14px;
  border-radius: 0 4px 4px 0;
  background: var(--series);
}

.bar-value {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Tooltip for bars (hover or keyboard focus) */
.bar-row::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 32%;
  z-index: 5;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--bg);
  background: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
}

.bar-row:hover::after,
.bar-row:focus-visible::after {
  opacity: 1;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table thead th {
  font-weight: 600;
  color: var(--text-2);
}

.data-table tbody th {
  font-weight: 450;
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Task pane ------------------------------------------------------------------- */

.pane {
  width: 540px;
  flex: none;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--bg);
}

.pane[hidden] {
  display: none;
}

.pane-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 56px;
  flex: none;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--border);
}

.complete-btn {
  height: 32px;
  font-size: 13px;
}

.complete-btn:hover:not(:disabled) {
  border-color: var(--good);
  color: var(--good-text);
  background: color-mix(in srgb, var(--good) 8%, transparent);
}

.complete-btn.is-complete {
  border-color: transparent;
  color: #ffffff;
  background: var(--good);
}

.complete-btn.is-complete:hover:not(:disabled) {
  color: #ffffff;
  background: #098a09;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  font-size: 13px;
  font-weight: 550;
  color: var(--text-2);
}

.status-chip .icon {
  color: var(--text-3);
}

.status-chip.is-complete {
  border-color: transparent;
  color: var(--good-text);
  background: color-mix(in srgb, var(--good) 12%, transparent);
}

.status-chip.is-complete .icon {
  color: var(--good-text);
}

.pane-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 24px 24px;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 4px 8px;
  border: 0;
  border-radius: var(--radius-small);
  font-size: 13px;
  color: var(--text-2);
  background: var(--bg-subtle);
}

.breadcrumb:hover {
  color: var(--text);
  background: var(--bg-active);
}

.pane-title {
  width: 100%;
  margin: 0 0 12px -8px;
  width: calc(100% + 8px);
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  background: none;
  resize: none;
  overflow: hidden;
}

.pane-title:hover {
  border-color: var(--border);
}

.pane-title:focus {
  outline: none;
  border-color: var(--focus);
}

.pane-title.is-done {
  color: var(--text-2);
}

.pane-fields {
  display: grid;
  gap: 2px;
  margin-bottom: 20px;
}

.pane-field {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  min-height: 36px;
}

.pane-label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-2);
}

.pane-value {
  min-width: 0;
  margin-left: -8px;
}

.pane-static {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
}

a.team-ref {
  color: var(--accent-text);
}

a.team-ref:hover {
  text-decoration: underline;
}

.pane-section {
  margin-bottom: 22px;
}

.pane-section > .pane-label {
  margin-bottom: 6px;
}

.pane-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.pane-description {
  width: 100%;
  min-height: 90px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  line-height: 1.55;
  background: var(--bg);
  resize: none;
}

.pane-description:hover {
  border-color: var(--border-strong);
}

.pane-description:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent);
}

.subtasks {
  margin-bottom: 6px;
  border-top: 1px solid var(--border);
}

.subtask {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 2px 4px;
  border-bottom: 1px solid var(--border);
}

.subtask:hover {
  background: var(--bg-subtle);
}

.subtask-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 4px 0;
  border: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: none;
}

.subtask-name:hover {
  text-decoration: underline;
}

.subtask.is-done .subtask-name {
  color: var(--text-3);
}

.subtask .field-btn {
  font-size: 12.5px;
}

.subtask.composer-row {
  border-bottom: 0;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event {
  font-size: 13px;
  color: var(--text-2);
}

.event strong {
  font-weight: 600;
  color: var(--text);
}

.event time,
.comment-head time {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

.comment {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.comment.is-pending {
  opacity: 0.65;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.comment-actions {
  width: 24px;
  height: 24px;
  margin-left: auto;
  opacity: 0;
}

.comment:hover .comment-actions,
.comment-actions:focus-visible {
  opacity: 1;
}

.comment-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.comment-edit {
  resize: none;
}

.pane-composer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: none;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-page);
}

.composer-box {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.composer-box:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent);
}

.comment-input {
  display: block;
  width: 100%;
  min-height: 38px;
  max-height: 200px;
  padding: 9px 12px 4px;
  border: 0;
  border-radius: var(--radius);
  background: none;
  resize: none;
}

.comment-input:focus {
  outline: none;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 4px 6px 6px;
}

.hint {
  font-size: 12px;
  color: var(--text-3);
}

/* Teams ----------------------------------------------------------------------- */

.narrow-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 24px 48px;
}

.narrow-page .view-head {
  padding: 0 0 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-2);
}

.back-link:hover {
  color: var(--text);
}

.view-subtitle .role-badge {
  vertical-align: 1px;
}

.team-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.team-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
}

.team-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.team-card-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-card-meta {
  font-size: 12.5px;
  color: var(--text-3);
}

section.card.team-section {
  margin-top: 16px;
}

/* On the Teams page, set apart from the list of teams. */
section.card.team-section.app-invite {
  margin-top: 32px;
}

.section-title {
  margin-bottom: 10px;
}

.section-note {
  margin-bottom: 12px;
  font-size: 13.5px;
  color: var(--text-2);
}

.team-section .form-hint,
.team-section .form-error {
  margin-top: 8px;
}

/* Settings -------------------------------------------------------------------- */

.settings-tabs {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.settings-tabs .tab {
  margin-bottom: -1px;
}

.settings-section .form {
  max-width: 440px;
}

.settings-section .form .form-hint,
.settings-section .form .form-error {
  margin-top: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 640px) {
  /* Room for every tab across a phone. */
  .settings-tabs .tab .icon {
    display: none;
  }
}

.settings-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-small);
  font-size: 13.5px;
  color: var(--priority-medium-text);
  background: var(--priority-medium-bg);
}

.settings-warning .icon {
  flex: none;
  margin-top: 2px;
}

.setting-list .setting-row + .setting-row {
  border-top: 1px solid var(--border);
}

.setting-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
}

.settings-section > .setting-row {
  padding-bottom: 4px;
}

.setting-text {
  flex: 1;
  min-width: 0;
}

.setting-label {
  font-weight: 600;
  cursor: pointer;
}

.setting-hint {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-2);
}

.signin-row {
  align-items: center;
}

/* The Site tab (owners) */
.site-facts {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 8px 16px;
  margin: 4px 0 12px;
  font-size: 13.5px;
}

.site-facts dt {
  font-weight: 600;
  color: var(--text-2);
}

.site-facts dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-update {
  color: var(--priority-medium-text);
}

.site-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-small);
  font-size: 13.5px;
  background: var(--bg-subtle);
}

.site-check .icon {
  flex: none;
  margin-top: 2px;
}

.site-check.is-good {
  border: 1px solid color-mix(in srgb, var(--good) 45%, transparent);
  background: color-mix(in srgb, var(--good) 7%, var(--bg));
}

.site-check.is-bad {
  color: var(--critical-text);
  background: var(--critical-soft);
}

.site-backups {
  margin-top: 14px;
  font-size: 13px;
}

.site-backups summary {
  cursor: pointer;
  font-weight: 550;
  color: var(--text-2);
}

.site-backups ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.site-backups li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 6px 0;
  border-top: 1px solid var(--border);
}

.site-backup-name {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.site-backup-meta {
  color: var(--text-3);
}

.site-monitor {
  margin: 14px 0 0;
}

.site-monitor code {
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 12.5px;
  overflow-wrap: anywhere;
  background: var(--bg-subtle);
}

.site-people .person-name .role-badge {
  margin-left: 6px;
  vertical-align: 1px;
}

.person-meta {
  font-size: 12.5px;
  color: var(--text-3);
}

.person.is-off .person-name,
.person.is-off .person-email {
  color: var(--text-3);
}

@media (max-width: 640px) {
  .site-facts {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .site-facts dd {
    margin-bottom: 8px;
  }
}

.signin-name {
  font-weight: 600;
}

.setting-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13.5px;
}

.setting-extra-label {
  font-weight: 550;
}

.setting-extra-note {
  color: var(--text-3);
}

/* An on/off switch, drawn over a real checkbox. */
.switch {
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  margin: 2px 0 0;
  border-radius: 999px;
  background: var(--border-strong);
  appearance: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.25);
  transition: transform 0.15s;
}

.switch:checked {
  background: var(--accent);
}

.switch:checked::before {
  transform: translateX(16px);
}

.switch:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.theme-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.theme-choice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  color: var(--text);
  background: var(--bg);
}

.theme-choice:hover {
  border-color: var(--border-strong);
}

.theme-choice.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.theme-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-weight: 600;
}

.theme-note {
  font-size: 12.5px;
  color: var(--text-3);
}

/* Small pictures of the app in each theme. Fixed colors: they show the theme, not follow it. */
.theme-preview {
  --p-bg: #ffffff;
  --p-side: #1f2024;
  --p-line: #e4e4e7;
  --p-card: #f4f4f5;
  display: flex;
  height: 84px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--p-bg);
}

.theme-preview.preview-dark {
  --p-bg: #1b1b1f;
  --p-side: #121215;
  --p-line: #3a3a41;
  --p-card: #222227;
}

.theme-preview.preview-system {
  --p-bg: transparent;
  --p-line: rgba(128, 128, 140, 0.45);
  --p-card: rgba(128, 128, 140, 0.18);
  background: linear-gradient(115deg, #ffffff 0 52%, #1b1b1f 52% 100%);
}

.preview-side {
  width: 22%;
  background: var(--p-side);
}

.preview-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}

.preview-line {
  width: 70%;
  height: 6px;
  border-radius: 3px;
  background: var(--p-line);
}

.preview-line.short {
  width: 45%;
}

.preview-card {
  flex: 1;
  border: 1px solid var(--p-line);
  border-radius: 4px;
  background: var(--p-card);
}

.people {
  display: flex;
  flex-direction: column;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.person:first-child {
  border-top: 0;
}

.person-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.person-name {
  font-weight: 600;
}

.person-email {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  color: var(--text-2);
}

.person .btn {
  flex: none;
}

.invite-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invite-form .input {
  flex: 1 1 240px;
  width: auto;
}

.invite-link {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--good) 45%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--good) 7%, var(--bg));
}

.invite-link > p:first-child {
  margin-bottom: 10px;
}

.invite-link > p:first-child .icon {
  color: var(--good-text);
  vertical-align: -3px;
}

.invite-link.is-warning {
  border-color: color-mix(in srgb, var(--priority-medium) 55%, transparent);
  background: var(--priority-medium-bg);
}

.invite-link.is-warning > p:first-child .icon {
  color: var(--priority-medium-text);
}

.link-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
}

.pending {
  margin-top: 20px;
}

.pending .subsection-title {
  margin-bottom: 4px;
}

.pending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.pending-item:first-child {
  border-top: 0;
}

.pending-item > .icon {
  color: var(--text-3);
}

.pending-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pending-email {
  overflow: hidden;
  font-weight: 550;
  text-overflow: ellipsis;
}

.pending-meta {
  font-size: 12.5px;
  color: var(--text-3);
}

.team-projects {
  display: flex;
  flex-direction: column;
  margin: 0 -8px 8px;
}

.team-project {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-small);
}

.team-project:hover {
  background: var(--bg-hover);
}

.team-project-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-project-name + .tag {
  margin-left: 0;
}

.team-project-meta {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}

.audit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
}

.audit li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
}

.audit time {
  color: var(--text-3);
}

section.card.danger-zone,
section.card.danger-zone:hover {
  border-color: color-mix(in srgb, var(--critical) 35%, var(--border));
}

.danger-zone .section-title {
  color: var(--critical-text);
}

/* Sign-in screens ------------------------------------------------------------- */

.auth-screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12vh 16px 48px;
  background: var(--bg-page);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 28px 26px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow-2);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 15px;
  font-weight: 650;
}

.auth-title {
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.auth-note {
  margin-bottom: 18px;
  color: var(--text-2);
}

.auth-warning {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-small);
  color: var(--priority-medium-text);
  background: var(--priority-medium-bg);
}

.auth-footer {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-3);
}

/* What Platespin is (for visitors who aren't signed in), and the privacy and terms links under the card. */
.auth-about {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-3);
}

.auth-legal {
  margin-top: 16px;
  font-size: 13px;
  text-align: center;
  color: var(--text-3);
}

.settings-legal {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-3);
}

/* "or", between signing in with a password and the other ways. */
.auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  font-size: 12.5px;
  color: var(--text-3);
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}

.auth-alternatives {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.provider-btn .brand-logo {
  flex: none;
}

/* Popovers and menus ---------------------------------------------------------- */

.popover {
  position: fixed;
  z-index: 60;
  min-width: 200px;
  max-width: calc(100vw - 16px);
  max-height: min(460px, calc(100vh - 16px));
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-3);
}

.menu {
  display: flex;
  flex-direction: column;
  padding: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  text-align: left;
  color: var(--text);
  background: none;
}

.menu-item .icon {
  color: var(--text-3);
}

.menu-item:hover:not(:disabled),
.menu-item:focus-visible {
  outline: none;
  background: var(--bg-hover);
}

.menu-item:disabled {
  color: var(--text-3);
}

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

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

.menu-item.checked .menu-label {
  font-weight: 600;
}

.menu-item.checked > .icon:last-child {
  color: var(--accent-text);
}

.menu-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-hint {
  font-size: 12px;
  color: var(--text-3);
}

.menu-swatch {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 999px;
  background: var(--swatch);
}

.menu-heading {
  padding: 8px 10px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}

.menu-separator {
  height: 1px;
  margin: 4px 0;
  background: var(--border);
}

.picker {
  display: flex;
  flex-direction: column;
}

.picker-search {
  margin: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--bg);
}

.picker-search:focus {
  outline: none;
  border-color: var(--focus);
}

.picker-list {
  display: flex;
  flex-direction: column;
  max-height: 280px;
  overflow-y: auto;
  padding: 0 4px 4px;
}

.picker-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  text-align: left;
  background: none;
}

.picker-option.active {
  background: var(--bg-hover);
}

.picker-option.selected > .icon:last-child {
  margin-left: auto;
  color: var(--accent-text);
}

.picker-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.picker-meta {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  color: var(--text-3);
}

.picker-empty {
  padding: 10px;
  color: var(--text-3);
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 10px;
}

.color-choice {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--swatch);
}

.color-choice.selected,
.color-choice:hover {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--swatch);
}

.datepicker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.date-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.date-title {
  font-weight: 600;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.date-dow {
  padding: 2px 0;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  color: var(--text-3);
}

.date-cell {
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  background: none;
}

.date-cell:hover {
  background: var(--bg-hover);
}

.date-cell.outside {
  color: var(--text-3);
}

.date-cell.today {
  font-weight: 700;
  color: var(--accent-text);
}

.date-cell.selected {
  color: #ffffff;
  background: var(--accent);
}

.date-clear {
  align-self: flex-start;
}

/* Search results */
.search-results {
  padding: 4px;
}

.search-heading {
  padding: 8px 10px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 5px;
  text-align: left;
  background: none;
}

.search-result.active,
.search-result:hover {
  background: var(--bg-hover);
}

.search-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-name.done {
  color: var(--text-3);
  text-decoration: line-through;
}

.search-where {
  max-width: 40%;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-3);
}

.search-empty {
  padding: 12px 10px;
  color: var(--text-3);
}

/* Dialogs --------------------------------------------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
  background: rgba(15, 15, 20, 0.45);
  overflow-y: auto;
}

.dialog {
  width: 100%;
  max-width: 560px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow-3);
}

.dialog-small {
  max-width: 420px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 4px 20px;
}

.dialog-head h2 {
  font-size: 17px;
  font-weight: 650;
}

.dialog-body {
  padding: 8px 20px 20px;
}

.dialog-message {
  color: var(--text-2);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form .dialog-actions {
  margin-top: 4px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.form-hint {
  font-size: 12.5px;
  color: var(--text-3);
}

.form-error {
  font-size: 13px;
  color: var(--critical-text);
}

.form-error:empty {
  display: none;
}

.input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  background: var(--bg);
  resize: vertical;
}

.input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent);
}

.select {
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  background: var(--bg);
}

.select:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent);
}

.form-field .select {
  width: 100%;
}

.divider {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.subsection-title {
  font-size: 14px;
  font-weight: 650;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-2);
}

.check-row input {
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.input-large {
  padding: 10px 12px;
  font-size: 17px;
  font-weight: 550;
}

.color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-row button {
  display: inline-flex;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: none;
}

.color-row button.selected {
  box-shadow: 0 0 0 2px var(--text);
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--swatch);
}

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

.template-row button {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: left;
}

.template-row button:hover {
  border-color: var(--border-strong);
}

.template-row button.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: var(--accent-soft);
}

.template {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
}

.template .icon {
  color: var(--accent-text);
}

.template-name {
  font-weight: 600;
}

.template-sections {
  font-size: 12px;
  color: var(--text-3);
}

.quick-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--bg);
}

.quick-field:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.shortcuts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  margin: 4px 0 0;
}

.shortcuts dt {
  white-space: nowrap;
}

.shortcuts dd {
  margin: 0;
  color: var(--text-2);
}

/* Toasts ---------------------------------------------------------------------- */

.toasts {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 10px 14px;
  border-radius: var(--radius);
  color: #f5f5f7;
  background: #2b2b31;
  box-shadow: var(--shadow-3);
  animation: toast-in 0.18s ease-out;
}

.toast .icon {
  color: #7ee08f;
}

.toast-error .icon {
  color: #ff8a8a;
}

.toast-text {
  flex: 1;
}

.toast-action {
  border: 0;
  font-weight: 600;
  color: #9ec5f4;
  background: none;
}

.toast-close {
  color: #b4b4bd;
}

.toast-close:hover:not(:disabled) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Tags ------------------------------------------------------------------------ */

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 160px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
  line-height: 18px;
  white-space: nowrap;
  color: color-mix(in srgb, var(--swatch) 45%, var(--text));
  background: color-mix(in srgb, var(--swatch) 16%, var(--bg));
}

.tag-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 999px;
  background: var(--swatch);
}

.tag-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.tag-more {
  font-size: 12px;
  color: var(--text-3);
}

.row-meta {
  align-items: center;
  min-width: 0;
}

.row-meta .tag-list {
  flex-wrap: nowrap;
  overflow: hidden;
}

.row-meta .tag-pill {
  max-width: 110px;
}

.tags-btn {
  flex-wrap: wrap;
}

.tag-swatch {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 3px;
  background: var(--swatch);
}

.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.picker-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  text-align: left;
  color: var(--text-2);
  background: none;
}

.picker-footer:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.tag-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 50vh;
  margin: 12px 0;
  padding: 2px;
  overflow-y: auto;
}

.tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-color-btn {
  width: 28px;
  height: 28px;
  flex: none;
  padding: 0;
  border: 3px solid var(--bg);
  border-radius: 8px;
  background: var(--swatch);
  box-shadow: 0 0 0 1px var(--border-strong);
}

.tag-color-btn:hover:not(:disabled) {
  box-shadow: 0 0 0 2px var(--border-strong);
}

.tag-name-input {
  flex: 1;
  min-width: 0;
}

.tag-new {
  display: flex;
  gap: 8px;
}

.tag-new .input {
  flex: 1;
  min-width: 0;
}

/* Repeating tasks ------------------------------------------------------------- */

.repeat-custom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.repeat-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.repeat-every {
  width: 76px;
}

.repeat-custom .form-hint,
.repeat-custom .dialog-actions {
  margin-top: 0;
}

/* Attachments ----------------------------------------------------------------- */

.pane {
  position: relative; /* for the drop hint (small screens make it fixed instead) */
}

.pane.is-dropping::after {
  content: "Drop files to attach them to this task";
  position: absolute;
  inset: 8px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--accent);
  border-radius: 12px;
  font-weight: 600;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent-soft) 90%, transparent);
  pointer-events: none;
}

.attachments {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 8px -6px;
}

.attachment {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 4px;
  border-radius: var(--radius-small);
}

.attachment:hover {
  background: var(--bg-subtle);
}

.attachment-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  border: 0;
  border-radius: var(--radius-small);
  text-align: left;
  color: var(--text);
  background: none;
}

.attachment-thumb {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-3);
  background: var(--bg-subtle);
}

.attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-ext {
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.attachment-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.attachment-name {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta {
  font-size: 12px;
  color: var(--text-3);
}

.attachment.is-uploading .attachment-name {
  color: var(--text-2);
}

.attachment .icon-btn {
  opacity: 0;
}

.attachment:hover .icon-btn,
.attachment .icon-btn:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .attachment .icon-btn {
    opacity: 1;
  }
}

.attach-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dialog-large {
  max-width: 1000px;
}

.dialog-head h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.image-preview img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
  border-radius: 6px;
}

/* Timeline view --------------------------------------------------------------- */

.timeline {
  --names: 280px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.timeline-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
}

.timeline-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.tl-canvas {
  position: relative;
  width: calc(var(--names) + var(--lane));
  min-height: 100%;
}

.tl-scale {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  height: 52px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.tl-corner {
  position: sticky;
  left: 0;
  z-index: 5;
  width: var(--names);
  flex: none;
  display: flex;
  align-items: flex-end;
  padding: 0 16px 8px;
  border-right: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-3);
  background: var(--bg);
}

.tl-ticks {
  position: relative;
  width: var(--lane);
  flex: none;
}

.tl-months,
.tl-days {
  position: relative;
  height: 26px;
}

.tl-month {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--border);
}

.tl-month-label {
  position: sticky;
  left: calc(var(--names) + 4px);
  display: inline-block;
  padding: 5px 8px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.tl-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  white-space: nowrap;
  color: var(--text-2);
}

.zoom-month .tl-tick {
  justify-content: flex-start;
  padding-left: 4px;
  border-left: 1px solid var(--tl-line);
}

.tl-tick.is-weekend {
  color: var(--text-3);
}

.tl-tick.is-today {
  font-weight: 700;
  color: var(--accent-text);
}

.tl-body {
  position: relative;
}

.tl-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--names);
  width: var(--lane);
  pointer-events: none;
}

.tl-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  opacity: 0.6;
}

.tl-row {
  position: relative;
  display: flex;
  height: 38px;
  border-bottom: 1px solid var(--tl-line);
}

.tl-name {
  position: sticky;
  left: 0;
  z-index: 2;
  width: var(--names);
  min-width: 0;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 16px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.tl-row:hover .tl-name {
  background: var(--bg-subtle);
}

.tl-row.selected .tl-name {
  background: var(--accent-soft);
}

.tl-task-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  background: none;
}

.tl-task-name:hover {
  text-decoration: underline;
}

.tl-row.is-done .tl-task-name {
  color: var(--text-3);
}

.tl-section-row {
  height: 40px;
}

.tl-section-row .tl-name {
  gap: 4px;
  padding-left: 6px;
}

.tl-section-row .tl-lane {
  background: color-mix(in srgb, var(--bg-subtle) 70%, transparent);
}

.tl-section-name {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-lane {
  position: relative;
  width: var(--lane);
  flex: none;
}

.tl-lane.can-schedule {
  cursor: crosshair;
}

.tl-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  white-space: nowrap;
  color: var(--text-3);
  opacity: 0;
  pointer-events: none;
}

.tl-row:hover .tl-hint {
  opacity: 1;
}

.tl-bar {
  position: absolute;
  top: 7px;
  height: 24px;
  min-width: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--swatch) 55%, var(--bg));
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text);
  background: color-mix(in srgb, var(--swatch) 20%, var(--bg));
  box-shadow: inset 3px 0 0 var(--swatch);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.tl-bar:hover,
.tl-bar.is-dragging {
  box-shadow: inset 3px 0 0 var(--swatch), var(--shadow-2);
}

.tl-bar.is-dragging {
  z-index: 3;
  cursor: grabbing;
}

.tl-bar.is-static {
  cursor: pointer;
}

.tl-bar.is-overdue {
  border-color: var(--critical);
}

.tl-bar.is-done {
  opacity: 0.55;
}

.tl-bar.is-done .tl-bar-name {
  text-decoration: line-through;
}

.tl-row.selected .tl-bar {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.tl-bar.is-ghost {
  border-style: dashed;
  pointer-events: none;
}

.tl-bar-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Too short for its name: the name goes after the bar */
.tl-bar.is-narrow {
  padding: 0 4px;
}

.tl-bar.is-narrow .tl-bar-name {
  position: absolute;
  left: calc(100% + 8px);
  max-width: 260px;
  color: var(--text-2);
  pointer-events: none;
}

.tl-bar.is-dragging.is-narrow .tl-bar-name {
  visibility: hidden;
}

.tl-bar-tip {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  z-index: 2;
  display: none;
  padding: 2px 7px;
  border-radius: 4px;
  transform: translateY(-50%);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--bg);
  background: var(--text);
  pointer-events: none;
}

.tl-bar.is-dragging .tl-bar-tip {
  display: block;
}

.tl-handle {
  position: absolute;
  top: -1px;
  bottom: -1px;
  z-index: 1;
  width: 10px;
  cursor: ew-resize;
}

.tl-handle.is-start {
  left: -4px;
}

.tl-handle.is-end {
  right: -4px;
}

.tl-bar:hover .tl-handle::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 4px;
  width: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--swatch) 60%, var(--text));
}

/* Inbox ----------------------------------------------------------------------- */

.inbox-toolbar {
  margin-bottom: 12px;
}

.inbox-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.inbox-item {
  display: flex;
  align-items: flex-start;
  border-top: 1px solid var(--border);
}

.inbox-item:first-child {
  border-top: 0;
}

.inbox-item:hover {
  background: var(--bg-subtle);
}

.inbox-item.selected {
  background: var(--accent-soft);
}

.inbox-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 8px 12px 16px;
  border: 0;
  text-align: left;
  color: var(--text);
  background: none;
}

.inbox-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 999px;
  color: var(--good-text);
  background: color-mix(in srgb, var(--good) 12%, transparent);
}

.inbox-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inbox-what {
  color: var(--text-2);
}

.inbox-what strong {
  font-weight: 600;
  color: var(--text);
}

.inbox-task {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-weight: 550;
}

.inbox-task .check {
  width: 16px;
  height: 16px;
}

.inbox-task-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-task.is-done .inbox-task-name {
  color: var(--text-3);
}

.inbox-snippet {
  display: -webkit-box;
  overflow: hidden;
  padding-left: 8px;
  border-left: 2px solid var(--border-strong);
  font-size: 13.5px;
  color: var(--text-2);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.inbox-where {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-3);
}

.inbox-mark {
  margin: 12px 12px 0 0;
}

.unread-dot {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  opacity: 0;
}

.inbox-item:hover .unread-dot,
.inbox-mark:focus-visible .unread-dot,
.inbox-item.is-unread .unread-dot {
  opacity: 1;
}

.inbox-item.is-unread .unread-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.nav-badge.is-unread {
  color: #ffffff;
  background: var(--accent);
}

/* The Inbox in the top bar, shown on small screens where the sidebar is hidden */
.inbox-btn {
  position: relative;
  display: none;
  color: var(--text-2);
}

.inbox-count {
  position: absolute;
  top: 0;
  right: -3px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #ffffff;
  background: var(--critical);
}

/* Responsive ------------------------------------------------------------------ */

@media (max-width: 1180px) {
  .pane {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    width: min(540px, 100vw);
    box-shadow: var(--shadow-3);
  }
}

@media (max-width: 960px) {
  .home-grid,
  .overview {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 820px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .app.sidebar-open .sidebar {
    transform: none;
    box-shadow: var(--shadow-3);
  }

  .app.sidebar-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 44;
    background: rgba(15, 15, 20, 0.45);
  }

  .sidebar .sidebar-close,
  .topbar .menu-toggle {
    display: inline-flex;
  }

  .hide-narrow,
  .save-status,
  .search-kbd {
    display: none;
  }

  .topbar {
    gap: 8px;
    padding: 0 10px;
  }

  .create-btn {
    width: 36px;
    padding: 0;
  }

  .view-head,
  .toolbar,
  .project-head,
  .calendar-head,
  .timeline-head {
    padding-left: 16px;
    padding-right: 16px;
  }

  .inbox-btn {
    display: inline-flex;
  }

  .list-scroll,
  .calendar-scroll {
    padding-left: 12px;
    padding-right: 12px;
  }

  .board {
    padding: 12px;
  }

  .unscheduled {
    display: none;
  }
}

@media (max-width: 640px) {
  .list-grid,
  .my-grid {
    --cols: minmax(0, 1fr) 96px;
    min-width: 0;
  }

  /* Phones show the task name and the due date (the third column in both lists) */
  .list-header .cell:not(.cell-name):not(:nth-child(3)),
  .row .cell:not(.cell-name):not(:nth-child(3)) {
    display: none;
  }

  .row-open {
    display: none;
  }

  .home {
    padding: 20px 12px 32px;
  }

  .narrow-page {
    padding: 16px 12px 32px;
  }

  .narrow-page .view-head {
    flex-wrap: wrap;
  }

  .person {
    flex-wrap: wrap;
  }

  .person-info {
    flex-basis: calc(100% - 48px);
  }

  .audit li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .auth-screen {
    padding-top: 24px;
  }

  .auth-card {
    padding: 22px 18px;
  }

  .home-head h1 {
    font-size: 24px;
  }

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

  .pane-body {
    padding: 12px 16px 20px;
  }

  .pane-field {
    grid-template-columns: 96px 1fr;
  }

  .column {
    width: 82vw;
  }

  .timeline {
    --names: 150px;
  }

  .tl-name,
  .tl-corner {
    padding-left: 10px;
  }

  .inbox-open {
    padding-left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .check.checked,
  .meter-fill,
  .bar,
  .date-cell.selected {
    forced-color-adjust: none;
    background: Highlight;
  }

  .tl-bar {
    forced-color-adjust: none;
    border-color: CanvasText;
    color: HighlightText;
    background: Highlight;
  }
}
