:root {
  color-scheme: dark;
  --bg: #080908;
  --surface: rgba(28, 31, 29, 0.68);
  --surface-strong: rgba(43, 48, 45, 0.86);
  --surface-soft: rgba(255, 255, 255, 0.065);
  --ink: #f3f5f0;
  --muted: #9fa9a2;
  --muted-2: #707b75;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #56d8ba;
  --accent-dark: #2eb394;
  --danger: #ff6b7d;
  --blocker: #ff6f61;
  --blocked: #e5c86c;
  --done: #64d98a;
  --parallel: #75a8ff;
  --sequential: #e5c86c;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --task-card-width: 360px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(140deg, rgba(86, 216, 186, 0.08), transparent 28%),
    linear-gradient(215deg, rgba(255, 180, 95, 0.06), transparent 34%),
    linear-gradient(140deg, #080908 0%, #10110f 48%, #080908 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(90px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(8, 9, 8, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px) saturate(150%);
}

.topbar > form {
  justify-self: end;
}

.tab-nav {
  display: inline-flex;
  gap: 4px;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  padding: 4px;
}

.tab-nav a,
.ghost-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  padding: 0 12px;
  text-decoration: none;
}

.tab-nav a.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: var(--ink);
}

.tab-nav a:hover,
.ghost-link:hover {
  color: var(--ink);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 14px;
}

.login-brand {
  margin-bottom: 20px;
}

.login-brand .brand-mark,
.error-brand {
  width: 56px;
  height: 56px;
}

.error-brand {
  margin-bottom: 14px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.board-shell {
  position: relative;
  z-index: 1;
  padding: 18px 24px 32px;
}

.daily-shell {
  padding: 18px 24px 36px;
}

.daily-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.daily-add-form {
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  gap: 8px;
  max-width: none;
}

.daily-must-toggle {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(229, 200, 108, 0.34);
  border-radius: 8px;
  background: rgba(229, 200, 108, 0.08);
  color: #f1dda1;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 10px;
  white-space: nowrap;
}

.daily-must-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--blocked);
}

.daily-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.daily-search input {
  flex: 1 1 auto;
}

.daily-add-button {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.daily-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.daily-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
  padding: 16px;
  backdrop-filter: blur(18px) saturate(145%);
}

.daily-panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.daily-panel-header h2,
.archive-group h3 {
  margin: 0;
}

.daily-panel-header span {
  min-width: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
  padding: 4px 9px;
  text-align: center;
}

.daily-list {
  display: grid;
  gap: 8px;
}

.daily-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 10px;
}

.daily-task.must-do-today {
  border-color: rgba(229, 200, 108, 0.5);
  background:
    linear-gradient(135deg, rgba(229, 200, 108, 0.15), transparent 56%),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 3px 0 0 rgba(229, 200, 108, 0.82);
}

.daily-task[draggable="true"] {
  cursor: grab;
}

.daily-task.is-dragging {
  opacity: 0.62;
}

.daily-task form {
  min-width: 0;
}

.daily-task > form:first-child label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--ink);
  font-size: 0.98rem;
}

.daily-task input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--done);
}

.daily-task span,
.daily-task-title {
  overflow-wrap: anywhere;
}

.daily-task-title {
  display: grid;
  gap: 5px;
}

.daily-must-badge {
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(229, 200, 108, 0.42);
  border-radius: 999px;
  background: rgba(229, 200, 108, 0.12);
  color: #f1dda1;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  padding: 4px 7px;
}

.daily-must-form {
  display: flex;
  justify-content: center;
}

.daily-must-icon {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(229, 200, 108, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 950;
}

.daily-must-icon input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
}

.daily-must-icon:has(input:checked) {
  border-color: rgba(229, 200, 108, 0.58);
  background: rgba(229, 200, 108, 0.16);
  color: #ffe8a6;
}

.daily-task.archived {
  grid-template-columns: 1fr;
  opacity: 0.86;
}

.daily-task.archived span {
  color: var(--muted);
  text-decoration: line-through;
}

.daily-task.archived .daily-must-badge {
  color: #d8c484;
  text-decoration: none;
}

.archive-panel {
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.archive-panel.daily-drop-target {
  outline: 2px dashed rgba(100, 217, 138, 0.62);
  outline-offset: 6px;
  background:
    linear-gradient(135deg, rgba(100, 217, 138, 0.1), transparent 48%),
    var(--surface);
}

.archive-group {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.archive-group h3 {
  color: var(--muted);
  font-size: 0.88rem;
}

.daily-empty {
  margin: 0;
  color: var(--muted);
}

.agenda-entry {
  grid-template-columns: 1fr;
}

.travel-entry {
  grid-template-columns: 1fr;
}

.travel-add-form {
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.5fr) minmax(140px, 0.5fr);
  max-width: none;
}

.travel-add-form button {
  min-height: 40px;
}

.travel-panel {
  margin-top: 0;
}

.travel-panel-header {
  align-items: center;
}

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

.travel-actions form {
  margin: 0;
}

.travel-timezone-form label {
  display: grid;
  gap: 3px;
}

.travel-timezone-form span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.travel-timezone-form select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-weight: 850;
  padding: 0 34px 0 10px;
}

.travel-actions button,
.travel-actions a {
  min-height: 36px;
  white-space: nowrap;
}

.travel-actions span {
  margin-left: 4px;
  color: inherit;
  font-size: 0.82em;
}

.travel-calendar-note {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.travel-calendar-note code {
  color: var(--ink);
  font-size: 0.82rem;
}

.travel-calendar-note.is-success {
  color: var(--accent);
}

.travel-calendar-note.is-warning {
  color: #ffb36b;
}

.travel-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}

.travel-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(117, 168, 255, 0.1), transparent 54%),
    rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.travel-card.is-past {
  opacity: 0.88;
}

.travel-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.travel-card-header h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.travel-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.travel-card-actions form {
  margin: 0;
}

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

.travel-detail-grid div {
  min-width: 0;
}

.travel-detail-grid dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.travel-detail-grid dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.travel-edit-details {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.travel-flight-panel {
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.travel-flight-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.travel-flight-panel header p:not(.eyebrow) {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.travel-flight-panel form {
  margin: 0;
}

.travel-flight-list {
  display: grid;
  gap: 8px;
}

.travel-flight-status {
  display: grid;
  grid-template-columns: minmax(78px, 0.3fr) minmax(90px, 0.35fr) 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 9px 10px;
}

.travel-flight-status strong,
.travel-flight-status span {
  font-weight: 900;
}

.travel-flight-status span {
  color: var(--accent);
}

.travel-flight-status small,
.travel-flight-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.travel-flight-status.is-missing span {
  color: #ffb36b;
}

.travel-flight-empty {
  margin: 0;
}

.travel-edit-details summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 850;
  list-style: none;
  padding: 0 12px;
}

.travel-edit-details summary::-webkit-details-marker {
  display: none;
}

.travel-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
}

.travel-edit-form label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.travel-edit-form .travel-edit-wide {
  grid-column: 1 / -1;
}

.travel-edit-form label span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.travel-edit-form input {
  min-height: 34px;
  padding: 8px 9px;
  font-size: 0.9rem;
  font-weight: 800;
}

.travel-save-button {
  align-self: end;
  min-height: 34px;
  padding: 0 12px;
}

.app-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
}

.app-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.dialog-panel {
  display: grid;
  gap: 14px;
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(117, 168, 255, 0.08), transparent 44%),
    rgba(18, 21, 19, 0.96);
  padding: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.dialog-header h2 {
  margin: 0;
}

.travel-past-list {
  grid-template-columns: 1fr;
}

.meeting-add-form {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.35fr) minmax(120px, 0.25fr) auto;
  max-width: none;
}

.meeting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

.meeting-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  backdrop-filter: blur(18px) saturate(145%);
}

.meeting-card.is-today {
  border-color: rgba(229, 200, 108, 0.56);
  background:
    linear-gradient(135deg, rgba(229, 200, 108, 0.16), transparent 54%),
    var(--surface);
  box-shadow: inset 0 0 0 1px rgba(229, 200, 108, 0.18);
}

.meeting-card.is-soon {
  border-color: rgba(255, 111, 97, 0.7);
  background:
    linear-gradient(135deg, rgba(255, 111, 97, 0.26), transparent 54%),
    var(--surface);
  box-shadow:
    inset 0 0 0 1px rgba(255, 111, 97, 0.28),
    0 0 32px rgba(255, 111, 97, 0.14);
}

.meeting-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.meeting-header h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.meeting-alert {
  width: max-content;
  margin: 0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.meeting-alert.today {
  background: rgba(229, 200, 108, 0.14);
  color: #f2d984;
}

.meeting-alert.urgent {
  background: rgba(255, 111, 97, 0.16);
  color: #ffafa7;
}

.agenda-item-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.agenda-item-list {
  display: grid;
  gap: 8px;
}

.agenda-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 10px;
}

.agenda-item span {
  overflow-wrap: anywhere;
}

.agenda-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.agenda-item-actions form {
  margin: 0;
}

.agenda-discussed-button {
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.agenda-history-panel {
  margin-top: 18px;
}

.agenda-history-search {
  max-width: 460px;
}

.agenda-history-list {
  display: grid;
  gap: 8px;
}

.agenda-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.agenda-history-item span {
  overflow-wrap: anywhere;
  font-weight: 900;
}

.agenda-history-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.agenda-history-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.agenda-history-actions form {
  margin: 0;
}

.add-objective {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 18px;
}

.add-objective-menu {
  position: relative;
}

.add-objective-menu summary {
  list-style: none;
}

.add-objective-menu summary::-webkit-details-marker {
  display: none;
}

.add-objective-menu summary::marker {
  content: "";
}

.add-objective-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 42;
  display: grid;
  width: min(420px, calc(100vw - 48px));
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--parallel) 32%, var(--line-strong));
  border-radius: 8px;
  background:
    linear-gradient(to bottom, rgba(91, 140, 255, 0.1), transparent 46%),
    #171b19;
  padding: 12px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.crossing-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.crossing-card {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr);
  gap: 10px 12px;
  min-width: 260px;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(145%);
}

.crossing-card.blocker {
  border-color: rgba(201, 65, 69, 0.45);
}

.crossing-card p,
.crossing-card strong,
.crossing-card small {
  display: block;
}

.crossing-card p {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.crossing-card strong {
  font-size: 0.98rem;
}

.crossing-card small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.35;
}

.crossing-line {
  display: grid;
  align-content: center;
  gap: 3px;
  width: 24px;
}

.crossing-line span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--dot-color);
}

.quick-form,
.card-form,
.stack {
  display: grid;
  gap: 10px;
}

.quick-form {
  grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 2fr) minmax(150px, 0.5fr) auto;
  align-items: center;
  max-width: 1180px;
}

.quick-form.daily-add-form {
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  gap: 8px;
  max-width: none;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  box-shadow: 0 0 0 3px rgba(86, 216, 186, 0.12);
}

select {
  color: var(--ink);
  padding-right: 34px;
}

option,
optgroup {
  background: #181b19;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.objective-card:not(.is-editing) .title-input,
.objective-card:not(.is-editing) textarea[readonly],
.subtask-card:not(.is-editing) .title-input,
.subtask-card:not(.is-editing) .notes-field textarea {
  pointer-events: none;
  user-select: none;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.board {
  display: grid;
  align-items: start;
  grid-auto-columns: max-content;
  grid-auto-flow: column;
  gap: max(12px, calc(22px * var(--objectives-scale, 1)));
  height: var(--board-viewport-height, calc(100vh - 176px));
  min-height: 280px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 10px;
  padding-bottom: 72px;
  scroll-snap-type: none;
  overscroll-behavior: contain;
  scrollbar-color: color-mix(in srgb, var(--accent) 58%, var(--muted)) rgba(255, 255, 255, 0.08);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  cursor: grab;
}

.board.is-panning {
  cursor: grabbing;
  user-select: none;
}

.board.is-panning * {
  cursor: grabbing !important;
  user-select: none;
}

.board::-webkit-scrollbar {
  width: 12px;
  height: 0;
}

.board::-webkit-scrollbar:horizontal {
  height: 0;
}

.board::-webkit-scrollbar:vertical {
  width: 12px;
}

.board::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.board::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 58%, var(--muted));
  background-clip: padding-box;
}

.objectives-view-controls {
  position: fixed;
  right: 24px;
  bottom: 42px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 18, 17, 0.86);
  padding: 6px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px) saturate(145%);
}

.objectives-view-controls .scale-reset {
  min-width: 48px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 2px;
  text-align: center;
}

.objectives-view-controls .scale-reset:not(:disabled) {
  color: var(--ink);
  cursor: pointer;
}

.objectives-view-controls .scale-reset:not(:disabled):hover {
  color: var(--accent);
}

.objectives-view-controls .icon-button {
  width: 38px;
  min-height: 38px;
  border-radius: 999px;
}

.board-scrollbar-proxy {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom));
  right: 24px;
  left: 24px;
  z-index: 34;
  display: none;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  opacity: 0.78;
  scrollbar-color: color-mix(in srgb, var(--accent) 58%, var(--muted)) rgba(255, 255, 255, 0.08);
}

.board-scrollbar-proxy.is-visible {
  display: block;
}

.board-scrollbar-proxy > div {
  height: 1px;
}

.board.drop-target {
  outline: 2px dashed rgba(31, 122, 111, 0.35);
  outline-offset: 8px;
}

.objective-column {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0;
  padding-left: 0;
  scroll-snap-align: none;
  zoom: var(--objectives-scale, 1);
}

.objective-column > *:not(.flow-svg) {
  position: relative;
  z-index: 1;
}

.flow-svg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.flow-svg path {
  fill: none;
  stroke: color-mix(in srgb, var(--flow-color) 78%, transparent);
  stroke-width: 7px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.flow-svg path.tree-path {
  stroke-linejoin: round;
}

.flow-svg path.blocked-flow {
  stroke: rgba(255, 111, 97, 0.82);
  stroke-dasharray: 10 9;
  filter: drop-shadow(0 0 8px rgba(255, 111, 97, 0.28));
}

.objective-column::before {
  content: none;
}

.objective-card,
.subtask-card,
.result-card,
.add-subtask,
.empty-state,
.login-panel,
.error-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(145%);
}

.objective-card {
  position: relative;
  justify-self: center;
  width: var(--task-card-width);
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--flow-color) 54%, var(--line));
  border-top: 6px solid var(--flow-color);
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--flow-color) 18%, transparent), transparent 78%),
    var(--surface);
  cursor: default;
}

.objective-card .card-kicker {
  padding-right: 46px;
}

.objective-card::before {
  position: absolute;
  top: 24px;
  left: -25px;
  width: 25px;
  height: 10px;
  border-radius: 999px 0 0 999px;
  background: var(--flow-color);
  content: none;
}

.objective-column.not-started .objective-card {
  border-color: color-mix(in srgb, var(--muted-2) 54%, var(--line));
  border-top-color: color-mix(in srgb, var(--muted-2) 82%, var(--line));
  background:
    linear-gradient(135deg, rgba(120, 128, 122, 0.12), transparent 56%),
    rgba(22, 24, 22, 0.7);
}

.objective-column.in-progress .objective-card {
  border-color: color-mix(in srgb, #4fc3ff 54%, var(--line));
  border-top-color: #4fc3ff;
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.18), transparent 56%),
    linear-gradient(to right, rgba(79, 195, 255, 0.08), transparent 70%),
    var(--surface);
}

.objective-column.done .objective-card {
  border-color: rgba(100, 217, 138, 0.58);
  border-top-color: var(--done);
  background:
    linear-gradient(135deg, rgba(100, 217, 138, 0.22), transparent 56%),
    var(--surface);
}

.subtask-list {
  display: flex;
  width: max-content;
  min-width: calc(var(--column-count, 1) * var(--task-card-width) + (var(--column-count, 1) - 1) * 18px + 36px);
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 20px;
  padding: 18px 18px 0;
  border-top: 1px solid color-mix(in srgb, var(--flow-color) 40%, var(--line));
  position: relative;
}

.objective-column.not-started .subtask-grid-row {
  filter: grayscale(0.94);
  opacity: 1;
}

.objective-column.done .subtask-grid-row {
  filter: grayscale(0.94);
  opacity: 1;
}

.subtask-grid-row {
  position: relative;
  display: grid;
  column-gap: 18px;
  grid-template-columns: repeat(var(--column-count, 1), var(--task-card-width));
  align-items: stretch;
  min-height: var(--task-card-min-height, 150px);
  transition:
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.subtask-grid-row.is-empty {
  isolation: isolate;
  height: var(--task-card-min-height, 150px);
  min-height: 0;
}

.subtask-list.is-pristine .subtask-grid-row.is-empty {
  height: var(--starter-task-ghost-height, 96px);
}

.subtask-grid-row.is-empty::before {
  content: "";
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 0;
  border: 1px dashed color-mix(in srgb, var(--flow-color) 34%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--flow-color) 5%, transparent), transparent),
    rgba(255, 255, 255, 0.012);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018);
  opacity: 0.72;
  pointer-events: none;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    opacity 140ms ease;
}

.subtask-grid-row.is-empty:hover::before,
.subtask-grid-row.is-empty:focus-within::before {
  border-color: color-mix(in srgb, var(--flow-color) 54%, var(--line));
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--flow-color) 8%, transparent), transparent),
    rgba(255, 255, 255, 0.018);
  opacity: 1;
}

.subtask-grid-row > .grid-cell-add-form,
.subtask-grid-row > .subtask-card,
.subtask-grid-row > .subtask-drop-indicator {
  grid-row: 1;
}

.row-insert-button-form,
.row-delete-button-form,
.column-insert-button-form,
.column-delete-button-form {
  display: flex;
  justify-content: center;
  margin: 0;
}

.add-subtask-default {
  align-self: center;
  margin-top: 12px;
}

.subtask-card {
  position: relative;
  z-index: 1;
  min-height: var(--task-card-min-height, 150px);
  padding: 13px;
  border-left: 4px solid var(--flow-color);
  background: #151816;
  cursor: default;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

.card-drag-handle {
  position: absolute;
  top: -1px;
  left: 50%;
  z-index: 8;
  display: grid;
  width: 56px;
  height: 20px;
  min-height: 20px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--flow-color) 42%, var(--line-strong));
  border-top: 0;
  border-radius: 0 0 999px 999px;
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--flow-color) 22%, transparent), rgba(255, 255, 255, 0.035)),
    rgba(12, 14, 13, 0.78);
  color: color-mix(in srgb, var(--flow-color) 68%, var(--ink));
  cursor: grab;
  padding: 0;
  touch-action: none;
  transform: translateX(-50%);
}

.card-drag-handle::before {
  width: 24px;
  height: 8px;
  background-image: radial-gradient(currentColor 1.4px, transparent 1.6px);
  background-position: 0 0;
  background-size: 8px 4px;
  content: "";
  opacity: 0.74;
}

.card-drag-handle:hover,
.card-drag-handle:focus-visible {
  border-color: color-mix(in srgb, var(--flow-color) 72%, var(--line-strong));
  color: var(--ink);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--flow-color) 18%, transparent);
}

.card-drag-handle:active {
  cursor: grabbing;
}

.subtask-card::before {
  position: absolute;
  top: 28px;
  left: -31px;
  width: 26px;
  height: 5px;
  border-radius: 999px 0 0 999px;
  background: var(--flow-color);
  content: none;
}

.subtask-card[data-crossing-key]:not([data-crossing-key=""]) {
  border-color: color-mix(in srgb, var(--flow-color) 44%, var(--line));
}

.subtask-card[data-crossing-key]:not([data-crossing-key=""])::after {
  position: absolute;
  top: 28px;
  right: -18px;
  width: 18px;
  border-top: 2px dashed color-mix(in srgb, var(--flow-color) 65%, transparent);
  content: none;
}

.subtask-card.not-started {
  background:
    linear-gradient(135deg, rgba(134, 143, 136, 0.08), transparent 52%),
    #141715;
  border-color: color-mix(in srgb, var(--muted-2) 42%, var(--line));
  border-left-color: color-mix(in srgb, var(--flow-color) 38%, var(--muted-2));
}

.subtask-card.in-progress {
  background:
    linear-gradient(135deg, rgba(79, 195, 255, 0.18), transparent 48%),
    linear-gradient(to right, rgba(79, 195, 255, 0.1), transparent 68%),
    #121819;
  border-color: color-mix(in srgb, #4fc3ff 48%, var(--line));
  border-left-color: #4fc3ff;
  box-shadow:
    inset 0 0 0 1px rgba(79, 195, 255, 0.14),
    0 0 24px rgba(79, 195, 255, 0.08);
}

.subtask-card.blocked-downstream,
.subtask-card.blocked-by-link {
  background:
    linear-gradient(135deg, rgba(229, 200, 108, 0.22), transparent 48%),
    linear-gradient(to right, rgba(229, 200, 108, 0.14), transparent 70%),
    #171714;
  border-color: color-mix(in srgb, var(--blocked) 56%, var(--line));
  border-left-color: var(--blocked);
  box-shadow:
    inset 0 0 0 1px rgba(229, 200, 108, 0.24),
    0 0 28px rgba(229, 200, 108, 0.1);
  filter: saturate(0.92);
  opacity: 1;
}

.subtask-card.blocked-downstream.done,
.subtask-card.blocked-by-link.done {
  filter: none;
}

.subtask-card.dragging {
  z-index: 4;
  opacity: 0.88;
  transform: scale(0.985) rotate(0.35deg);
  box-shadow:
    0 0 0 1px rgba(86, 216, 186, 0.22),
    0 18px 42px rgba(0, 0, 0, 0.34);
}

.subtask-card:has(.card-menu[open]),
.objective-card:has(.card-menu[open]) {
  z-index: 120;
}

.objective-column.dragging {
  opacity: 0.62;
  transform: rotate(0.35deg);
}

.subtask-list.drop-target {
  border-radius: 8px;
  outline: 2px solid rgba(86, 216, 186, 0.68);
  outline-offset: 8px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--flow-color) 14%, transparent), transparent 28%),
    color-mix(in srgb, var(--flow-color) 7%, transparent);
}

.subtask-list.snap-parallel {
  outline-color: rgba(117, 168, 255, 0.68);
}

.subtask-drop-indicator {
  position: relative;
  z-index: 5;
  align-self: stretch;
  height: auto;
  min-height: var(--task-card-min-height, 150px);
  border-radius: 12px;
  border: 2px dashed color-mix(in srgb, var(--accent) 72%, white);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  box-shadow:
    0 0 0 4px rgba(86, 216, 186, 0.14),
    0 0 24px rgba(86, 216, 186, 0.32);
  pointer-events: none;
}

.subtask-drop-indicator.is-invalid {
  border-color: color-mix(in srgb, var(--blocker) 72%, white);
  background: color-mix(in srgb, var(--blocker) 18%, transparent);
  box-shadow:
    0 0 0 4px rgba(255, 111, 97, 0.14),
    0 0 24px rgba(255, 111, 97, 0.32);
}

.subtask-drop-indicator::after {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(7, 10, 9, 0.86);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  color: var(--ink);
  content: attr(data-label);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

body.is-dragging-subtask .subtask-card:not(.dragging) {
  filter: saturate(0.82) brightness(0.88);
}

.resize-handle {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 8px;
  z-index: 4;
  cursor: ew-resize;
  background: transparent;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 120ms ease, background 120ms ease;
}

.subtask-card:hover .resize-handle,
.resize-handle.is-active {
  opacity: 1;
  background: color-mix(in srgb, var(--flow-color) 32%, transparent);
}

.resize-handle:hover,
.resize-handle.is-active {
  background: color-mix(in srgb, var(--flow-color) 58%, transparent);
}

.resize-handle-left {
  left: -4px;
}

.resize-handle-right {
  right: -4px;
}

.subtask-card.blocker {
  background:
    linear-gradient(135deg, rgba(255, 111, 97, 0.34), transparent 48%),
    linear-gradient(to right, rgba(255, 111, 97, 0.26), transparent 68%),
    #191615;
  border-color: rgba(255, 111, 97, 0.72);
  border-left-color: var(--blocker);
  box-shadow:
    inset 0 0 0 1px rgba(255, 111, 97, 0.42),
    0 0 34px rgba(255, 111, 97, 0.18);
}

.subtask-card.done {
  background:
    linear-gradient(135deg, rgba(100, 217, 138, 0.28), transparent 48%),
    linear-gradient(to right, rgba(100, 217, 138, 0.2), transparent 68%),
    #151a16;
  border-color: rgba(100, 217, 138, 0.62);
  border-left-color: var(--done);
  box-shadow:
    inset 0 0 0 1px rgba(100, 217, 138, 0.3),
    0 0 30px rgba(100, 217, 138, 0.12);
}

.subtask-card.obe,
.subtask-card.not-done {
  filter: grayscale(0.5) brightness(0.78);
}

.result-card {
  position: relative;
  width: var(--task-card-width);
  padding: 13px;
  border-color: color-mix(in srgb, var(--flow-color) 40%, var(--line));
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--flow-color) 10%, transparent), transparent 80%),
    rgba(20, 23, 21, 0.72);
}

.result-divider {
  width: min(100%, calc(var(--task-card-width) + 36px));
  height: 1px;
  margin: 8px 0 2px;
  background:
    linear-gradient(
      to right,
      transparent,
      color-mix(in srgb, var(--flow-color) 80%, transparent) 18%,
      color-mix(in srgb, var(--flow-color) 92%, transparent) 50%,
      color-mix(in srgb, var(--flow-color) 80%, transparent) 82%,
      transparent
    );
  box-shadow: 0 0 18px color-mix(in srgb, var(--flow-color) 28%, transparent);
}

.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--flow-color);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.objective-id,
.task-id {
  color: color-mix(in srgb, var(--flow-color) 78%, #fff);
  font-size: 0.72rem;
  font-weight: 900;
}

.objective-id,
.task-id {
  display: inline-flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
  border: 1px solid color-mix(in srgb, var(--flow-color) 42%, var(--line));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  padding: 2px 7px;
}

.card-field {
  display: grid;
  gap: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 9px;
}

.field-label {
  color: color-mix(in srgb, var(--muted) 78%, var(--ink));
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.subtask-card:not(.is-editing) > .card-form .card-field {
  gap: 6px;
}

.subtask-card:not(.is-editing) > .card-form .title-field {
  border-top: 0;
  padding-top: 2px;
}

.subtask-card:not(.is-editing) > .card-form .flag-field.is-disabled {
  display: none;
}

.title-input {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 6px 0 9px;
  font-size: 1.04rem;
  font-weight: 800;
}

.objective-card .title-input {
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.2;
}

.objective-card .objective-title-input {
  min-height: 0;
  overflow: hidden;
  resize: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.objective-card input,
.objective-card select,
.objective-card textarea,
.subtask-card input,
.subtask-card select,
.subtask-card textarea {
  cursor: auto;
}

.objective-card button,
.subtask-card button {
  cursor: pointer;
}

.objective-card .card-drag-handle,
.subtask-card .card-drag-handle {
  cursor: grab;
}

.objective-card .card-drag-handle:active,
.subtask-card .card-drag-handle:active {
  cursor: grabbing;
}

.objective-card:not(.is-editing) > .card-form input:not([type="hidden"]):not([type="checkbox"]),
.objective-card:not(.is-editing) > .card-form textarea,
.subtask-card:not(.is-editing) > .card-form input:not([type="hidden"]):not([type="checkbox"]),
.subtask-card:not(.is-editing) > .card-form textarea {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  opacity: 1;
  pointer-events: none;
}

.subtask-card:not(.is-editing) > .card-form .title-input {
  border-bottom: 0;
  padding-bottom: 0;
}

.subtask-card:not(.is-editing) > .card-form textarea {
  min-height: 1.8rem;
  padding: 0;
}

.objective-card:not(.is-editing) > .card-form select,
.subtask-card:not(.is-editing) > .card-form select {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--flow-color) 28%, var(--line));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  min-width: 116px;
  width: max-content;
  max-width: 100%;
  padding: 5px 10px;
  color: color-mix(in srgb, var(--flow-color) 75%, #fff);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-align-last: center;
}

.objective-column.not-started .objective-card:not(.is-editing) > .card-form select,
.subtask-card.not-started:not(.is-editing) > .card-form select {
  border-color: color-mix(in srgb, var(--muted-2) 58%, var(--line));
  color: color-mix(in srgb, var(--muted) 86%, #fff);
}

.objective-column.in-progress .objective-card:not(.is-editing) > .card-form select,
.subtask-card.in-progress:not(.is-editing) > .card-form select {
  border-color: rgba(79, 195, 255, 0.42);
  background: rgba(79, 195, 255, 0.08);
  color: #aee7ff;
}

.objective-card:not(.is-editing) > .card-form textarea::placeholder,
.subtask-card:not(.is-editing) > .card-form textarea::placeholder {
  color: transparent;
}

.objective-card.is-editing,
.subtask-card.is-editing {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--flow-color) 32%, transparent),
    0 0 28px color-mix(in srgb, var(--flow-color) 14%, transparent);
}

.card-edit-actions {
  display: none;
}

.objective-card.is-editing .card-edit-actions,
.subtask-card.is-editing .card-edit-actions {
  display: flex;
  justify-content: flex-end;
}

.edit-done-button {
  min-height: 32px;
  padding-inline: 14px;
}

.form-row,
.subtask-footer,
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.autosave-form.is-saving {
  opacity: 0.72;
}

.autosave-form.save-error {
  outline: 1px solid rgba(255, 107, 125, 0.55);
  outline-offset: 4px;
}

.blocker-link-field {
  display: none;
}

.blocker-link-field.is-visible {
  display: grid;
}

.blocker-toggle {
  display: inline-grid;
  min-height: 30px;
  width: max-content;
  align-items: center;
  gap: 8px;
}

.blocker-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  accent-color: var(--blocker);
  opacity: 0;
  pointer-events: none;
}

.flag-add {
  display: inline-grid;
  width: 30px;
  min-height: 30px;
  place-items: center;
}

.flag-plus {
  position: relative;
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 1px solid color-mix(in srgb, var(--blocker) 48%, transparent);
  border-radius: 999px;
  background: rgba(255, 111, 97, 0.14);
  color: inherit;
  font-size: 0;
  line-height: 0;
}

.flag-plus::before,
.flag-plus::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

.flag-plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

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

.blocker-toggle:not(.has-flag):hover .flag-add {
  filter: brightness(1.15);
}

.block-link-handle {
  display: inline-flex;
  width: max-content;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 111, 97, 0.5);
  cursor: crosshair;
}

.block-link-handle.is-visible {
  display: inline-flex;
}

.subtask-card.linking {
  outline: 2px solid rgba(255, 111, 97, 0.62);
  outline-offset: 4px;
}

.subtask-card.link-drop-target {
  outline: 2px solid rgba(86, 216, 186, 0.78);
  outline-offset: 5px;
}

.subtask-card.link-related {
  outline: 2px solid rgba(255, 111, 97, 0.58);
  outline-offset: 5px;
}

.link-drag-svg {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100vw;
  height: 100vh;
  overflow: visible;
  pointer-events: none;
}

.block-links-svg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  overflow: visible;
  pointer-events: none;
}

.block-links-hit-svg {
  position: fixed;
  inset: 0;
  z-index: 20;
  width: 100vw;
  height: 100vh;
  overflow: visible;
  pointer-events: none;
}

.block-link-path {
  fill: none;
  stroke: rgba(255, 111, 97, 0.72);
  stroke-width: 4px;
  stroke-linecap: round;
  filter: drop-shadow(0 0 9px rgba(255, 111, 97, 0.36));
  pointer-events: none;
}

.block-link-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 22px;
  stroke-linecap: round;
  pointer-events: stroke;
}

.block-link-group.is-active .block-link-path {
  stroke: #ff8f84;
  stroke-width: 5px;
}

.block-link-delete {
  position: fixed;
  z-index: 30;
  min-height: 30px;
  border: 1px solid rgba(255, 111, 97, 0.55);
  border-radius: 999px;
  background: rgba(28, 16, 15, 0.94);
  color: #ffd5d0;
  padding: 0 11px;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
}

.link-drag-svg path {
  fill: none;
  stroke: var(--blocker);
  stroke-width: 4px;
  stroke-linecap: round;
  stroke-dasharray: 10 8;
  filter: drop-shadow(0 0 8px rgba(255, 111, 97, 0.45));
}

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

.subtask-footer,
.card-actions {
  justify-content: space-between;
}

.card-actions {
  margin-top: 10px;
  justify-content: flex-end;
}

.card-menu {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 50;
}

.card-menu[open] {
  z-index: 130;
}

.card-menu summary {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0;
  font-weight: 900;
  line-height: 0;
  list-style: none;
  cursor: pointer;
}

.card-menu summary span {
  display: block;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
}

.card-menu summary::-webkit-details-marker {
  display: none;
}

.card-menu summary::marker {
  content: "";
}

.card-menu-panel {
  position: fixed;
  top: var(--card-menu-top, 0);
  left: var(--card-menu-left, 0);
  z-index: 1000;
  min-width: 258px;
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(24, 27, 25, 0.94);
  padding: 6px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
}

.menu-edit,
.menu-discuss,
.menu-danger {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-weight: 800;
  text-align: left;
}

.menu-edit {
  color: var(--ink);
}

.menu-edit:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-discuss {
  margin-top: 6px;
  color: color-mix(in srgb, var(--accent) 78%, #fff);
}

.menu-discuss:hover {
  background: rgba(86, 216, 186, 0.12);
}

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

.menu-danger:hover {
  background: rgba(255, 107, 125, 0.12);
}

.discuss-form {
  display: grid;
  gap: 6px;
  margin: 6px 0;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 0;
}

.discuss-form label {
  gap: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discuss-form select {
  width: 100%;
  min-height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.grid-action-group {
  display: grid;
  gap: 8px;
  margin: 6px 0;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 0;
}

.grid-action-section {
  display: grid;
  gap: 4px;
}

.grid-action-title {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0 6px 2px;
  text-transform: uppercase;
}

.grid-action-section form,
.grid-action-group .row-insert-button-form,
.grid-action-group .row-delete-button-form,
.grid-action-group .column-insert-button-form,
.grid-action-group .column-delete-button-form {
  position: static;
  display: block;
  justify-content: stretch;
  margin: 0;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: none;
}

.menu-grid-action,
.menu-grid-danger {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
}

.menu-grid-action {
  color: var(--ink);
}

.menu-grid-action:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-grid-danger {
  color: color-mix(in srgb, var(--danger) 86%, var(--ink));
}

.menu-grid-danger:hover {
  background: rgba(255, 107, 125, 0.12);
}

.menu-grid-action:disabled,
.menu-grid-danger:disabled {
  color: color-mix(in srgb, var(--muted) 58%, transparent);
  cursor: not-allowed;
  opacity: 0.56;
}

.menu-grid-action:disabled:hover,
.menu-grid-danger:disabled:hover {
  background: transparent;
}

.primary-button,
.small-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button,
.small-button {
  background: var(--accent);
  color: #04120f;
  padding: 0 16px;
}

.primary-button:hover,
.small-button:hover {
  background: #7be6ce;
}

.small-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.9rem;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: var(--ink);
  padding: 0 14px;
  text-decoration: none;
}

.icon-button {
  width: 34px;
  min-height: 34px;
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line);
  color: var(--ink);
  font-size: 1rem;
}

.icon-button.danger {
  color: var(--danger);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(229, 200, 108, 0.13);
  color: var(--sequential);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
}

.pill-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, max-content));
  gap: 6px;
  width: 100%;
}

.pill.parallel {
  background: rgba(117, 168, 255, 0.14);
  color: var(--parallel);
}

.pill.blocker {
  border-color: rgba(255, 111, 97, 0.5);
  background: rgba(255, 111, 97, 0.14);
  color: var(--blocker);
}

.pill.crossing {
  border: 1px dashed currentColor;
}

.pill.link {
  grid-column: 1 / -1;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 7px;
  min-height: 0;
  border-radius: 18px;
  background: color-mix(in srgb, var(--linked-color) 18%, transparent);
  color: color-mix(in srgb, var(--linked-color) 80%, #fff);
  padding: 7px 10px;
  white-space: normal;
}

.pill.blocked {
  grid-column: 1 / -1;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 7px;
  min-height: 0;
  border-radius: 18px;
  background: rgba(229, 200, 108, 0.13);
  color: #f2d984;
  padding: 7px 10px;
  white-space: normal;
}

.pill.blocked.implicit {
  border: 1px solid rgba(229, 200, 108, 0.28);
}

.pill-token {
  display: inline-flex;
  min-width: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 7px;
}

.pill.crossing {
  grid-column: 1 / -1;
  justify-content: center;
}

.grid-cell-add-form {
  display: flex;
  width: 100%;
  height: auto;
  min-height: var(--task-card-min-height, 150px);
  margin: 0;
  justify-self: stretch;
  align-self: stretch;
  z-index: 2;
  opacity: 0;
  transition: opacity 140ms ease;
}

.subtask-grid-row.is-empty > .grid-cell-add-form {
  height: 100%;
  min-height: 0;
}

.grid-cell-add-form:hover,
.grid-cell-add-form:focus-within {
  opacity: 1;
}

.grid-cell-add-button {
  display: grid;
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: var(--task-card-min-height, 150px);
  align-self: stretch;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--flow-color) 28%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--flow-color) 7%, transparent), transparent),
    rgba(255, 255, 255, 0.018);
  color: color-mix(in srgb, var(--ink) 36%, transparent);
  list-style: none;
  cursor: pointer;
  opacity: 0.62;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    opacity 140ms ease;
}

.subtask-grid-row.is-empty .grid-cell-add-button {
  height: 100%;
  min-height: 0;
}

.grid-cell-add-button::-webkit-details-marker {
  display: none;
}

.grid-cell-add-button::marker {
  content: "";
}

.grid-cell-add-button span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--flow-color) 40%, var(--line));
  border-radius: 999px;
  background: rgba(16, 19, 18, 0.78);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
}

.grid-cell-add-form:hover .grid-cell-add-button,
.grid-cell-add-button:focus-visible {
  border-color: color-mix(in srgb, var(--flow-color) 58%, var(--line));
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--flow-color) 12%, transparent), transparent),
    rgba(255, 255, 255, 0.035);
  color: var(--ink);
  opacity: 1;
}

.empty-state {
  width: min(520px, calc(100vw - 48px));
  padding: 28px;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(460px, 100%);
}

.login-panel,
.error-shell {
  padding: 28px;
}

.notice.error {
  border: 1px solid rgba(173, 47, 57, 0.2);
  border-radius: 8px;
  background: rgba(173, 47, 57, 0.08);
  color: var(--danger);
  padding: 10px 12px;
}

.as-link {
  text-decoration: none;
}

.error-shell {
  width: min(560px, calc(100vw - 48px));
  margin: 12vh auto;
}

@media (max-width: 760px) {
  .topbar,
  .board-shell,
  .daily-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .topbar > form,
  .tab-nav {
    justify-self: stretch;
  }

  .quick-form {
    grid-template-columns: 1fr;
  }

  .daily-entry,
  .daily-layout,
  .meeting-add-form,
  .travel-detail-grid,
  .travel-add-form,
  .travel-edit-form {
    grid-template-columns: 1fr;
  }

  .travel-panel-header,
  .dialog-header {
    align-items: stretch;
    flex-direction: column;
  }

  .travel-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .travel-timezone-form select {
    width: 100%;
  }

  .travel-flight-panel header {
    align-items: stretch;
    flex-direction: column;
  }

  .travel-flight-status {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .agenda-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .agenda-item-actions,
  .agenda-history-actions {
    justify-content: flex-end;
  }

  .agenda-history-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .daily-search {
    align-items: stretch;
    flex-direction: column;
  }

  .board {
    grid-auto-columns: max-content;
  }

  .board-scrollbar-proxy {
    right: 14px;
    left: 14px;
  }

  .subtask-list {
    align-items: flex-start;
  }

  .objective-card,
  .subtask-card {
    width: min(var(--task-card-width), calc(100vw - 58px));
    flex-basis: min(var(--task-card-width), calc(100vw - 58px));
  }

}

@media (max-width: 760px) {
  .board-shell {
    --task-card-width: min(304px, calc(100vw - 48px));
    --task-card-min-height: 112px;
    --starter-task-ghost-height: 80px;
    padding-top: 10px;
    padding-bottom: 18px;
  }

  .add-objective {
    margin-bottom: 10px;
  }

  .add-objective-panel {
    width: min(360px, calc(100vw - 28px));
  }

  .crossing-summary {
    gap: 8px;
    margin-bottom: 10px;
  }

  .crossing-card {
    min-width: min(250px, calc(100vw - 54px));
    padding: 10px;
  }

  .board {
    width: calc(100vw - 28px);
    height: var(--board-viewport-height, calc(100vh - 188px));
    min-height: 360px;
    gap: 12px;
    overflow-x: auto;
    overflow-y: auto;
    padding-right: 0;
    padding-bottom: 48px;
    scroll-padding-inline: 0;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    cursor: auto;
  }

  .board.is-panning,
  .board.is-panning * {
    cursor: auto !important;
  }

  .board::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  .board::-webkit-scrollbar:horizontal {
    height: 8px;
  }

  .board::-webkit-scrollbar:vertical {
    width: 8px;
  }

  .objective-column {
    scroll-snap-align: start;
  }

  .objective-card,
  .subtask-card,
  .result-card {
    width: var(--task-card-width);
  }

  .objective-card {
    padding: 12px;
    border-top-width: 5px;
  }

  .objective-card .card-kicker {
    padding-right: 38px;
  }

  .objective-card .title-input {
    font-size: 1rem;
  }

  .objective-card:not(.is-editing) > .card-form textarea {
    max-height: 3.2rem;
    overflow: hidden;
  }

  .subtask-list {
    min-width: calc(var(--column-count, 1) * var(--task-card-width) + (var(--column-count, 1) - 1) * 10px + 20px);
    gap: 8px;
    margin-top: 10px;
    padding: 12px 10px 0;
  }

  .subtask-grid-row {
    column-gap: 10px;
    grid-template-columns: repeat(var(--column-count, 1), var(--task-card-width));
  }

  .subtask-grid-row.is-empty {
    height: 80px;
  }

  .subtask-card {
    min-height: 0;
    padding: 10px 10px 9px 12px;
    border-left-width: 3px;
  }

  .subtask-card:not(.is-editing) .card-field {
    gap: 4px;
    border-top: 0;
    padding-top: 6px;
  }

  .subtask-card:not(.is-editing) .field-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .subtask-card:not(.is-editing) .notes-field:has(textarea:placeholder-shown) {
    display: none;
  }

  .subtask-card:not(.is-editing) > .card-form textarea {
    min-height: 0;
    max-height: 3.2rem;
    line-height: 1.35;
  }

  .subtask-card:not(.is-editing) > .card-form .title-input {
    padding-top: 0;
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .objective-card:not(.is-editing) > .card-form select,
  .subtask-card:not(.is-editing) > .card-form select {
    min-width: 0;
    padding: 4px 9px;
    font-size: 0.72rem;
  }

  .card-kicker,
  .objective-id,
  .task-id {
    font-size: 0.66rem;
  }

  .card-menu {
    top: 8px;
    right: 8px;
  }

  .card-menu summary {
    width: 30px;
    height: 30px;
  }

  .card-menu-panel {
    min-width: min(258px, calc(100vw - 28px));
  }

  .card-drag-handle {
    width: 44px;
    height: 16px;
    min-height: 16px;
  }

  .card-drag-handle::before {
    width: 20px;
    height: 6px;
    background-size: 7px 3px;
  }

  .pill-row {
    gap: 4px;
  }

  .pill {
    min-height: 24px;
    padding: 3px 7px;
    font-size: 0.68rem;
  }

  .objectives-view-controls {
    right: 10px;
    bottom: 12px;
    gap: 4px;
    padding: 4px;
  }

  .objectives-view-controls .icon-button {
    width: 32px;
    min-height: 32px;
  }

  .objectives-view-controls .scale-reset {
    min-width: 42px;
    font-size: 0.72rem;
  }

  .board-scrollbar-proxy {
    display: none !important;
  }
}
