:root {
  --ink: #14181f;
  --muted: #5b6573;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --surface: #f4f5f7;
  --surface-raised: #ffffff;
  --header: #0f1218;
  --accent: #1877f2;
  --accent-soft: #e7f3ff;
  --accent-hover: #166fe5;
  --accent-ring: rgba(24, 119, 242, 0.12);
  --accent-muted: #7eb8ff;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --late-border: #f97066;
  --shadow: 0 1px 2px rgba(15, 18, 24, 0.04), 0 8px 20px rgba(15, 18, 24, 0.06);
  --radius: 8px;
  --radius-sm: 6px;
  --font: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100%; }
html, body { margin: 0; }
body {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body > main,
body > .floor {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

h1, h2, .mark {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mono { font-family: var(--mono); font-size: 0.85em; }

/* —— Header —— */
.beam {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0 1rem;
  background: var(--header);
  color: #e8eaed;
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
}
.beam-start {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.icon-btn, .menu-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: #e8eaed;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.icon-bars {
  display: block;
  width: 14px;
  height: 10px;
  background:
    linear-gradient(#e8eaed, #e8eaed) 0 0 / 100% 1.5px no-repeat,
    linear-gradient(#e8eaed, #e8eaed) 0 50% / 100% 1.5px no-repeat,
    linear-gradient(#e8eaed, #e8eaed) 0 100% / 100% 1.5px no-repeat;
}
.menu-btn {
  padding: 0.4rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 12rem;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}
.menu-btn-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-btn::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.65;
}
.icon-btn:hover, .menu-btn:hover,
.icon-btn:focus-visible, .menu-btn:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  outline: none;
}

.mark {
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
}
.context {
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
  justify-self: center;
  max-width: min(42vw, 36ch);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.context:empty { visibility: hidden; }

.menu-wrap { position: relative; justify-self: end; }
.menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 12.5rem;
  background: var(--surface-raised);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.3rem;
  display: grid;
  gap: 1px;
  z-index: 50;
}
.menu-panel[hidden] { display: none !important; }
.menu-panel a,
.menu-panel button {
  display: block;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu-panel a.on {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.menu-panel a:hover,
.menu-panel button:hover,
.menu-panel a:focus-visible,
.menu-panel button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}
.menu-btn.mine-on,
.menu-btn.work-on {
  border-color: var(--accent-muted);
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.28);
}
.menu-panel form { margin: 0; }
.menu-divider {
  height: 1px;
  background: var(--line);
  margin: 0.25rem 0.4rem;
}

/* —— Board chrome —— */
.floor {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  /* Keep the board viewport fixed; columns scroll internally */
  overflow: hidden;
}
.rail {
  position: fixed;
  top: 0;
  left: 0;
  width: 248px;
  height: 100vh;
  background: #161b22;
  color: #e8eaed;
  padding: 4rem 0.7rem 1rem;
  z-index: 35;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
body.rail-open .rail { transform: translateX(0); }
body.rail-open .board-main { margin-left: 248px; }
.board-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: margin-left 0.2s ease;
}
.board-search-wrap {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  padding: 0.85rem 1.15rem 0.65rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.board-search {
  flex: 1 1 18rem;
  max-width: 420px;
  position: relative;
  display: block;
}
.board-search input[type="search"] {
  width: 100%;
  height: 2.4rem;
  padding: 0 2.25rem 0 2.15rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 13.5px;
  box-shadow: 0 1px 2px rgba(15, 18, 24, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.board-search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.12);
}
.board-search input[type="search"]::-webkit-search-cancel-button {
  display: none;
}
.board-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  display: flex;
}
.board-search-clear {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.65rem;
  height: 1.65rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.board-search-clear:hover {
  background: var(--surface);
  color: var(--ink);
}
.board-search-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}
.mark-hit {
  background: #ffe566;
  color: inherit;
  padding: 0 0.05em;
  border-radius: 2px;
}
.ticket.is-filtered-out { display: none; }
.stations { transition: margin-left 0.2s ease; }
.rail-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 24, 0.45);
  z-index: 34;
}
.rail-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 234, 237, 0.45);
  margin: 0 0 0.55rem 0.55rem;
}
.rail-row { display: flex; align-items: center; gap: 0.15rem; }
.rail-row .rail-item { flex: 1; }
.rail-edit {
  color: var(--accent-muted);
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.rail-edit:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.rail-item, .rail-add {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 0.48rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.12rem;
  font-size: 13px;
  font-weight: 500;
}
.rail-item.on { background: rgba(255, 255, 255, 0.1); }
.rail-item:hover { background: rgba(255, 255, 255, 0.06); }
.rail-add { color: var(--accent-muted); margin-top: 0.4rem; }

/* —— Columns —— */
.stations {
  flex: 1 1 auto;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1.15rem;
  /* Equal-height columns so short stages stay droppable mid-board */
  align-items: stretch;
  min-height: 0;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
}
.stations::-webkit-scrollbar { display: none; }
.stations.is-panning,
.stations.is-panning * {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
.stations .ticket,
.stations .station-head,
.stations input,
.stations button,
.stations a,
.stations label {
  user-select: auto;
  cursor: auto;
}
.stations .ticket.movable { cursor: grab; }
.stations .station-head.movable { cursor: grab; }
.station {
  background: #eef0f3;
  min-width: 280px;
  max-width: 300px;
  flex: 0 0 280px;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-left-color: transparent;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}
.station[data-column-kind="new"] { border-left-color: #94a3b8; }
.station[data-column-kind="assigned"] { border-left-color: #3b82f6; }
.station[data-column-kind="in_process"] { border-left-color: #f59e0b; }
.station[data-column-kind="finished"] { border-left-color: #22c55e; }
.station[data-column-kind="rejected"] { border-left-color: #ef4444; }
.station[data-column-kind="testing"] { border-left-color: #a855f7; }
.station-head.movable { cursor: grab; }
.station.dragging { opacity: 0.5; }
.station.over {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  background: var(--accent-soft);
}
.station-head {
  margin: 0 0 0.65rem;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  flex-shrink: 0;
}
.station-title {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.stamp {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.drop {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px;
  border-radius: var(--radius-sm);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.drop.over {
  background: rgba(24, 119, 242, 0.08);
  outline: 1px dashed rgba(24, 119, 242, 0.4);
}
.drop-hint {
  margin: auto 0.4rem;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* —— Cards —— */
.ticket {
  background: var(--surface-raised);
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 1px rgba(15, 18, 24, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ticket:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.ticket.movable { cursor: grab; }
.ticket.dragging { opacity: 0.45; }
.ticket.drop-success,
.station.drop-success,
.station-row.drop-success {
  animation: dropPulse 400ms ease-out;
}
.ticket a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  display: block;
  font-size: 13.5px;
  line-height: 1.35;
}
.ticket a:hover { color: var(--accent); }
.ticket.late {
  background: var(--danger-soft);
  border-color: #fecdca;
  border-left: 3px solid var(--late-border);
}
.ticket-unread {
  background: #eef1f4;
  border-color: #c5ccd6;
  box-shadow: inset 3px 0 0 #7a8fa0;
}
.ticket-unread:hover {
  background: #e8ecf0;
  border-color: #b8c0cb;
}
.ticket-unread a { color: #2a3340; }
.ticket-unread.late {
  background: #f6eceb;
  border-color: #f0c9c5;
  box-shadow: inset 3px 0 0 var(--late-border);
}
.ticket-new {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4a5c6a;
  background: rgba(122, 143, 160, 0.16);
}
.chip {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface);
  color: var(--muted);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.board-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.board-tags .chip { margin: 0; }
.meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--mono);
}

/* —— Forms / controls —— */
.add-ticket {
  display: flex;
  gap: 0;
  margin-top: 0.6rem;
  flex-shrink: 0;
}
.add-ticket input {
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ink);
}
.add-station form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  margin-top: 0.6rem;
  flex-shrink: 0;
}
.add-station input {
  grid-column: 1 / -1;
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ink);
}
.add-station .station-kind-pick {
  grid-column: 1;
  min-width: 0;
  width: 100%;
  max-width: none;
}
.add-station button {
  grid-column: 2;
  align-self: stretch;
}
label input, label textarea, select,
.form-stack input, .form-stack textarea, .form-stack select,
.panel input, .panel textarea, .panel select {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.add-ticket input:focus, .add-station input:focus,
.add-station .station-kind-pick:focus,
label input:focus, label textarea:focus, select:focus,
.form-stack input:focus, .form-stack textarea:focus, .form-stack select:focus,
.panel input:focus, .panel textarea:focus, .panel select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.12);
}
.add-ticket button {
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background 0.15s ease;
}
.add-station button {
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
button, .btn {
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.55rem 1rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.add-ticket button:hover, .add-station button:hover, button:hover, .btn:hover {
  background: var(--accent-hover);
}
.btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.danger { background: var(--danger); }
.danger:hover { background: #912018; }
.sheet-actions .danger {
  padding: 0.3rem 0.65rem;
  font-size: 12px;
}
.text-btn {
  background: none;
  color: var(--danger);
  padding: 0;
  border-radius: 0;
}
.text-btn:hover { background: none; text-decoration: underline; }

.pad { padding: 1.5rem; max-width: 920px; margin: 0 auto; width: 100%; }
.pad > h1 { margin: 0 0 1rem; font-size: 1.35rem; }
.form-card {
  background: var(--surface-raised);
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 560px;
}
.form-card form, .form-card label { display: grid; gap: 0.35rem; margin-bottom: 0.85rem; }
.form-card label { font-size: 13px; font-weight: 500; color: var(--muted); }
.check { display: flex; gap: 0.45rem; align-items: flex-start; margin: 0; font-weight: 400; color: var(--ink); font-size: 13.5px; line-height: 1.35; }
.check input { width: auto; margin-top: 0.15rem; flex-shrink: 0; }

/* —— Shared admin / detail pages —— */
.page,
.task-page {
  max-width: 1040px;
  padding: 1.75rem 1.5rem 2.5rem;
  margin: 0 auto;
  width: 100%;
}
.task-page {
  max-width: 900px;
  padding: 1.25rem 1.25rem calc(4.5rem + env(safe-area-inset-bottom, 0px));
}
.page-narrow { max-width: 520px; }
.page-wide { max-width: none; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.25rem;
  transition: color 0.15s ease;
}
.back-link:hover { color: var(--accent); }
.page-head,
.task-head { margin-bottom: 1.5rem; }
.page-kicker,
.task-board {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-head h1,
.task-head h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}
.page-toolbar .page-head { margin: 0; }
.panel,
.task-comments {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem 1.35rem;
  margin-bottom: 1.5rem;
}
.task-form {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}
.panel:last-child { margin-bottom: 0; }
.panel > .page-kicker { margin-bottom: 0.45rem; }
.panel > .lede { margin: 0 0 1.1rem; }
.panel h2,
.section-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.form-stack {
  display: grid;
  gap: 0.95rem;
}
.form-stack label,
.task-form label,
.comment-form label,
.edit-card > label,
.edit-card .form-row label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.status-toggle {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 0.45rem;
}
.status-toggle legend {
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.status-toggle {
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: center;
  column-gap: 0.55rem;
}
.status-toggle legend {
  grid-column: 1 / -1;
}
.status-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
}
.status-opt:has(input:checked) {
  border-color: var(--ink);
  background: var(--surface);
}
.status-opt input {
  width: auto;
  margin: 0;
}
.field-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.page-desk { max-width: 880px; }
.desk-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.desk-search input[type="search"] {
  width: min(16rem, 70vw);
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 13.5px;
}
.desk-search input[type="search"]:focus {
  outline: none;
  border-color: var(--ink);
}
.desk-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.desk-sheet { margin: 0; }
.desk-num {
  width: 2.4rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}
.desk-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.desk-pill-on {
  background: var(--accent-soft);
  color: var(--accent);
}
.desk-pill-off {
  background: var(--surface);
  color: var(--muted);
}
.desk-until {
  margin-left: 0.4rem;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.desk-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.desk-link:hover { text-decoration: underline; }
.form-actions,
.task-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}
.task-actions-top {
  flex-shrink: 0;
  margin: 0;
  margin-left: auto;
  padding: 0;
  border: 0;
  justify-content: flex-end;
}
.task-page {
  padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
}
.task-actions-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  margin: 0;
  padding: 0.7rem 1.25rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(15, 18, 24, 0.07);
  justify-content: flex-end;
  transform: translateY(100%);
  transition: transform 0.2s ease;
  pointer-events: none;
}
.task-actions-dock.is-live {
  transform: translateY(0);
  pointer-events: auto;
}
.task-actions-dock[aria-hidden="true"] button {
  pointer-events: none;
}
.form-actions {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.task-actions-dock .task-save {
  min-width: 8.5rem;
}
.form-actions .text-btn,
.task-actions .text-btn {
  font-size: 13px;
  font-weight: 500;
}
.cred-box {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.cred-box code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}
.cred-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* —— Task detail —— */
.task-shell {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.task-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem 1.15rem;
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  position: sticky;
  top: 0;
  z-index: 12;
}
.task-back {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.task-back:hover { color: var(--accent); }
.task-toolbar-main {
  min-width: 0;
}
.task-toolbar-main .task-board {
  margin: 0 0 0.12rem;
  font-size: 10px;
}
.task-toolbar-main h1 {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-save {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.15rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.task-save:hover { background: var(--accent-hover); }
.task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 0;
  align-items: start;
}
.task-section {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem 1.25rem 1.35rem;
}
.task-section-meta {
  background: #f7f8fa;
  border-left: 1px solid var(--line);
}
.task-section-label {
  margin: 0 0 0.15rem;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.task-section-meta .task-section-label:not(:first-child) {
  margin-top: 0.65rem;
}
.task-page .task-comments {
  margin: 0;
  padding: 1.1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.task-page .task-comments .thread { margin-bottom: 0.95rem; }
.comment-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
}
.comment-compose-field { margin: 0; }
.comment-compose textarea {
  min-height: 4.25rem;
  resize: vertical;
}
.comment-compose button {
  min-width: 6.5rem;
  height: 2.35rem;
  padding: 0 1rem;
  align-self: end;
}
.task-footer {
  display: flex;
  justify-content: center;
  padding: 0.95rem 1.25rem 1.15rem;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}
.task-delete {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--danger);
  background: #fff;
  border: 1px solid #fecdca;
  border-radius: var(--radius-sm);
  padding: 0.48rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.task-delete:hover {
  background: var(--danger-soft);
  border-color: #f9b4ad;
}
.task-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.85fr);
  gap: 1.75rem 2rem;
  align-items: start;
}
.task-main,
.task-side,
.task-dates,
.comment-form {
  display: grid;
  gap: 0.95rem;
}
.task-form input,
.task-form textarea,
.comment-form textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.task-form textarea,
.comment-form textarea {
  resize: vertical;
  min-height: 6.5rem;
  line-height: 1.5;
}
.task-form input:focus,
.task-form textarea:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.12);
}
.task-form input[readonly],
.task-form textarea[readonly] {
  background: var(--surface);
  color: var(--ink);
}
.task-dates {
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.assignee-block {
  display: grid;
  gap: 0.55rem;
}
.assignee-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.assignee-list {
  display: grid;
  gap: 0.15rem;
  max-height: 16rem;
  overflow: auto;
  padding: 0.35rem 0.15rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.assignee-list .check {
  padding: 0.45rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: background 0.12s ease;
}
.assignee-hidden {
  margin: 0.35rem 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.staff-board-access {
  display: grid;
  gap: 0.5rem;
}
.staff-board-admin-note {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.task-comments h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.task-page .task-comments h2 { display: none; }
.task-comments .thread { margin-bottom: 1.15rem; }
.task-comments .thread li {
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.55rem;
}
.task-comments .thread li:last-child { margin-bottom: 0; }
.thread-empty {
  color: var(--muted);
  font-size: 13.5px;
  border-style: dashed !important;
  background: transparent !important;
}
.task-comments .thread time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.35rem;
}
.task-comments .thread p {
  margin: 0.35rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.task-activity,
.task-comments {
  margin-top: 1rem;
  padding: 1.15rem 1.25rem 1.25rem;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.task-activity h2,
.task-comments h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.activity-thread {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-thread li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.activity-thread li:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-thread time {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.activity-thread p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}
.task-status-form { margin: 0 0 1rem; }
.task-status-label {
  display: grid;
  gap: 0.35rem;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.task-status-label select {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  min-height: 44px;
}
.task-status-readonly {
  margin: 0 0 1rem;
  font-size: 14px;
  font-weight: 600;
}

.work-page .page-head { margin-bottom: 1.25rem; }
.work-section { margin-bottom: 1.75rem; }
.work-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.work-count {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}
.work-list { display: grid; gap: 0.55rem; }
.work-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.work-card-late { border-color: rgba(192, 57, 43, 0.35); background: #fff8f7; }
.work-card-title {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}
.work-card-title:hover { color: var(--accent); }
.work-card-meta {
  margin: 0.25rem 0 0;
  font-size: 13px;
  color: var(--muted);
}
.work-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.work-badge-late { background: #fdecea; color: #c0392b; }
.work-empty {
  padding: 1.25rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-raised);
}
.work-boards { margin-top: 2rem; }
.work-boards-label {
  margin: 0 0 0.55rem;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.work-board-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.work-board-link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
}
.work-board-link:hover { border-color: var(--accent); color: var(--accent); }

.board-template-grid {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.board-template-grid legend { margin-bottom: 0.35rem; }
.board-template {
  display: block;
  cursor: pointer;
}
.board-template input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.board-template-body {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.board-template input:checked + .board-template-body,
.board-template-body:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(24, 119, 242, 0.15);
}
.board-template-body strong { font-size: 14px; }
.board-template-body > span { font-size: 13px; color: var(--muted); }
.board-template-cols {
  font-family: var(--mono);
  font-size: 11px !important;
  color: var(--muted) !important;
}

.task-comments .thread p {
  margin: 0.4rem 0 0;
  line-height: 1.5;
}
.comment-form button {
  justify-self: start;
  min-width: 7rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}
.sheet-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.sheet-wrap .sheet {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  min-width: 56rem;
  table-layout: fixed;
}
.sheet {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.sheet th, .sheet td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.sheet td.cell-tight {
  width: 9%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sheet td.cell-text {
  width: auto;
}
.sheet tbody tr:last-child td { border-bottom: 0; }
.sheet th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface);
  white-space: nowrap;
}
.sheet a { color: var(--accent); text-decoration: none; font-weight: 500; }
.sheet a:hover { text-decoration: underline; }
.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: center;
}
.inline { display: inline; }
.board-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin: 0;
}
.board-card-wrap { display: flex; align-items: stretch; gap: 0.35rem; }
.board-card-wrap .board-card { flex: 1; }
.board-card {
  background: var(--surface-raised);
  padding: 1rem 1.05rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.board-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-top: 0.5rem; }
.page-edit {
  max-width: 52rem;
  min-width: 0;
  overflow-x: hidden;
}
.page-edit-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}
.page-edit-toolbar .page-head {
  margin: 0;
}
.edit-save {
  margin: 0;
  min-width: 6.5rem;
}
.board-edit-form {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 820px) {
  .board-edit-form {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    align-items: start;
  }
}
.board-edit-panel {
  display: grid;
  gap: 1.1rem;
  margin-bottom: 0;
  padding: 1rem 1.1rem;
}
.board-edit-columns {
  margin-bottom: 0;
  padding: 1rem 1.15rem 1.05rem;
  min-width: 0;
}
.board-edit-columns-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.board-edit-columns-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.board-edit-columns .edit-hint {
  margin: 0;
}
.edit-field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}
.edit-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.edit-field input {
  width: 100%;
  margin: 0;
}
.board-edit-roster {
  max-height: min(11rem, 32vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.edit-danger-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid #fecdca;
  border-radius: var(--radius);
  background: #fff8f7;
}
.edit-danger-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  margin-bottom: 0.15rem;
}
.edit-danger-copy p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.danger-outline {
  background: #fff;
  color: var(--danger);
  border: 1px solid #fecdca;
  box-shadow: none;
}
.danger-outline:hover,
.danger-outline:focus-visible {
  background: var(--danger-soft);
  border-color: #fca5a5;
}
.edit-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem 1.3rem;
  margin-bottom: 1rem;
}
.page-edit .edit-card {
  margin-bottom: 0;
}
.page-edit .edit-hint {
  margin: 0;
}
.edit-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.edit-hint {
  margin: 0 0 0.9rem;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.edit-name {
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.edit-name label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}
.edit-sec .page-kicker { margin-bottom: 0.2rem; }

/* —— Settings switchboard —— */
.page-settings { max-width: 640px; }
.set-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding-bottom: 1.15rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.set-who {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.set-who .roster-av {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 11px;
}
.set-who-text {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}
.set-who-text strong {
  font-size: 13.5px;
  font-weight: 600;
}
.set-who-text .mono {
  font-size: 11.5px;
  color: var(--muted);
}
.set-nav {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1rem;
}
.set-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.95rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease;
}
.set-row + .set-row { box-shadow: inset 0 1px 0 var(--line); }
.set-row:hover { background: #f6fbfa; }
.set-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.set-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}
.set-copy strong {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.set-copy span {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.35;
}
.set-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 7px;
  background: var(--accent-soft);
  position: relative;
  flex-shrink: 0;
}
.set-mark::before,
.set-mark::after {
  content: "";
  position: absolute;
  background: var(--accent);
}
.set-mark-report::before {
  left: 6px;
  right: 6px;
  top: 7px;
  height: 2px;
  border-radius: 1px;
  box-shadow: 0 5px 0 var(--accent), 0 10px 0 var(--accent);
}
.set-mark-people::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
}
.set-mark-people::after {
  width: 12px;
  height: 7px;
  border-radius: 7px 7px 2px 2px;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
}
.set-mark-company::before {
  inset: 7px 7px 8px;
  background: transparent;
  border: 1.5px solid var(--accent);
  border-radius: 2px;
}
.set-mark-company::after {
  width: 5px;
  height: 4px;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  border-radius: 0 0 1px 1px;
}
.set-chev {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  opacity: 0.4;
  transition: border-color 0.12s ease, opacity 0.12s ease;
}
.set-row:hover .set-chev {
  border-color: var(--accent);
  opacity: 1;
}
.set-account { margin-bottom: 0; }
.set-account .edit-actions { margin-bottom: 0; }
.edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.15rem 0 1rem;
}
.edit-actions button { min-width: 7.5rem; }
.roster {
  display: grid;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.roster-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.7rem;
  align-items: center;
  margin: 0;
  padding: 0.55rem 0.75rem;
  font-weight: 400;
  cursor: pointer;
}
.roster-row + .roster-row { border-top: 1px solid var(--line); }
.roster-row:hover { background: var(--surface); }
.roster-row input { width: auto; margin: 0; }
.roster-av {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.roster-who {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}
.roster-who strong { font-size: 13.5px; font-weight: 600; }
.roster-who .mono { font-size: 11.5px; color: var(--muted); }
.station-grid-head,
.station-row {
  display: grid;
  grid-template-columns: 1.25rem 1.5rem minmax(0, 1fr) minmax(7rem, 8.5rem) 2.1rem;
  gap: 0.45rem;
  align-items: center;
}
.station-grid-head {
  margin: 0.15rem 0 0.2rem;
  padding: 0 0 0.35rem;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.station-list { margin: 0 0 0.75rem; min-width: 0; }
.station-row {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-width: 0;
}
.station-row.dragging { opacity: 0.45; }
.station-row.over { background: var(--accent-soft); }
button.station-grip {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.7rem;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background-color: transparent;
  background-image: radial-gradient(circle, currentColor 1.15px, transparent 1.25px);
  background-size: 5px 5px;
  background-position: 50% 40%;
  cursor: grab;
  opacity: 0.7;
  box-shadow: none;
}
button.station-grip:hover {
  opacity: 1;
  color: var(--ink);
  background-color: var(--surface);
  background-image: radial-gradient(circle, currentColor 1.15px, transparent 1.25px);
}
button.station-grip:active { cursor: grabbing; }
.station-row .stamp { width: 1.5rem; text-align: center; }
.station-rename {
  display: block;
  min-width: 0;
  margin: 0;
}
.station-rename input { width: 100%; min-width: 0; margin: 0; }
.station-kind,
.station-kind-pick {
  width: 100%;
  min-width: 0;
  max-width: none;
  font: inherit;
  font-size: 12px;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}
.station-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--danger);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  justify-self: end;
}
.station-del:hover {
  background: var(--danger-soft);
  border-color: #fecdca;
}
.station-rename button {
  margin: 0;
  padding: 0.4rem 0.7rem;
  min-width: 0;
}
.station-add {
  display: grid;
  grid-template-columns: 1.25rem 1.5rem minmax(0, 1fr) minmax(7rem, 8.5rem) auto;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.station-add input {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.station-add .station-kind-pick {
  min-width: 0;
  width: 100%;
}
.station-add button {
  margin: 0;
  white-space: nowrap;
  min-width: 0;
  padding: 0.4rem 0.75rem;
  font-size: 13px;
}
.edit-danger {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0.15rem 0.2rem;
}
.edit-danger p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.wide { max-width: none; }
.filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 1rem;
  margin-bottom: 0;
}
.filter label {
  display: grid;
  gap: 0.35rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  min-width: 14rem;
}
.filter select {
  min-width: 16rem;
}
.report-block { margin-bottom: 1.75rem; }
.report-block .section-title { margin-bottom: 0.85rem; }
.empty { color: var(--muted); }
.colophon {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1rem;
  text-align: center;
  padding: 0.85rem 1rem;
  flex-shrink: 0;
  background: #0f1218;
  color: #ffffff;
  font-size: 12px;
  font-family: var(--mono);
  z-index: 30;
}
.colophon-credit {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.85;
  letter-spacing: 0.02em;
  transition: opacity 0.15s ease;
}
.colophon-credit:hover,
.colophon-credit:focus-visible {
  opacity: 1;
  outline: none;
}

/* —— Landing + login overlay —— */
.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 90;
  padding: 0.5rem 0.8rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.skip:focus { top: 1rem; }

html:has(body.land) {
  overflow-x: hidden;
}
body.land {
  height: auto;
  max-height: none;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  display: block;
  padding-top: 64px;
  background: #f7f8f6;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  scroll-padding-top: 72px;
}
body.land > main {
  flex: none;
  overflow: visible;
  min-height: 0;
}

.land-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 64px;
  width: 100%;
  margin: 0;
  padding: 0.75rem max(1.5rem, calc((100% - 1120px) / 2 + 1.5rem));
  box-sizing: border-box;
  background: rgba(247, 248, 246, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(20, 24, 31, 0.06);
}
.land-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.land-mark-icon {
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 5px / 4px 11px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 6px 0 / 4px 16px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 12px 7px / 4px 9px no-repeat;
}
.land-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.35rem;
}
.land-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.land-nav a:hover,
.land-nav a:focus-visible {
  color: var(--ink);
  outline: none;
}
.land-nav .land-login {
  background: var(--accent);
  color: #fff;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.land-nav .land-login:hover,
.land-nav .land-login:focus-visible {
  background: var(--accent-hover);
  color: #fff;
}

.land-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: 4.5rem 1.5rem 5rem;
  max-width: 1120px;
  margin: 0 auto;
  isolation: isolate;
  overflow: visible;
}
.land-hero::before {
  content: "";
  position: absolute;
  inset: -20% 0 10%;
  z-index: -1;
  background-image:
    linear-gradient(rgba(15, 18, 24, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 18, 24, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 70% at 55% 40%, #000 15%, transparent 72%);
  pointer-events: none;
}
.land-hero::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 8%;
  height: 220px;
  z-index: -1;
  border: 1px solid rgba(24, 119, 242, 0.18);
  border-radius: 50%;
  transform: rotate(-8deg);
  pointer-events: none;
}
.land-kicker {
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.land-hero h1,
.land-block h2,
.land-close h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}
.land-hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.land-lede {
  margin: 1.15rem 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}
.land-coords {
  margin: 1.35rem 0 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a93a0;
}
.land-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 1.75rem;
  padding: 0.7rem 1.25rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
}
.land-cta:hover,
.land-cta:focus-visible {
  background: var(--accent-hover);
  outline: none;
}

.land-board {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  min-height: 280px;
  padding: 0.5rem 0 2rem;
}
.land-col {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(20, 24, 31, 0.08);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: var(--shadow);
}
.land-col-shift {
  margin-top: 2.2rem;
}
.land-col > p {
  margin: 0 0 0.65rem;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.land-card {
  display: grid;
  gap: 0.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.55rem;
}
.land-card:last-child { margin-bottom: 0; }
.land-card strong {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.land-card span {
  font-size: 12px;
  color: var(--muted);
}
.land-card-late {
  border-color: var(--late-border);
}
.land-card-late span { color: var(--danger); }
.land-toast {
  position: absolute;
  right: 0;
  bottom: 0.4rem;
  display: grid;
  gap: 0.15rem;
  width: min(220px, 70%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 10px 28px rgba(15, 18, 24, 0.1);
}
.land-toast strong { font-size: 13px; }
.land-toast span { font-size: 12px; color: var(--muted); }

.land-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1120px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.land-stats > div {
  padding: 1.6rem 1.4rem;
}
.land-stats > div + div {
  border-left: 1px solid var(--line);
}
.land-stat-n {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.land-stats p:last-child {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.land-block {
  max-width: 1120px;
  margin: 0 auto;
  padding: 5rem 1.5rem 2rem;
}
.land-block h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  max-width: 16ch;
}
.land-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.75rem;
  margin-top: 2.75rem;
}
.land-features h3,
.land-steps h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.land-features p,
.land-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.land-pricing-lede,
.land-pricing-note {
  margin: 0.85rem 0 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.land-pricing-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}
.land-pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 0.75rem;
  align-items: stretch;
}
.land-price {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.35rem 1.25rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.land-price-featured {
  padding-top: 1.55rem;
  border-color: rgba(24, 119, 242, 0.45);
  box-shadow: 0 14px 36px rgba(24, 119, 242, 0.14);
}
.land-price-badge {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.25);
}
.land-price h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.land-price-boards {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.land-price-amount {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.land-price-amount strong {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.land-price-perks {
  list-style: none;
  margin: 0 0 0.35rem;
  padding: 0;
  flex: 1 1 auto;
  font-size: 0.9rem;
  color: var(--muted);
}
.land-price-perks li {
  padding: 0.2rem 0;
}
.land-price-perks li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}
.land-price .land-cta {
  width: 100%;
  text-align: center;
  margin-top: auto;
}
.land-cta-outline {
  background: #fff;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(24, 119, 242, 0.35);
}
.land-cta-outline:hover,
.land-cta-outline:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.land-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin: 2.5rem 0 0;
  padding: 0;
  counter-reset: step;
}
.land-steps li {
  position: relative;
  padding-top: 2.4rem;
}
.land-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.land-close {
  max-width: 1120px;
  margin: 3rem auto 0;
  padding: 4.5rem 1.5rem 5rem;
  border-top: 1px solid var(--line);
}
.land-close p {
  margin: 1rem 0 0;
  max-width: 36rem;
  color: var(--muted);
}

.land-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1.5rem;
  max-width: 1120px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.land-foot p { margin: 0; flex: 1; }
.land-foot-links a,
.land-foot a:not(.land-mark):not(.land-foot-credit) {
  font-family: var(--mono);
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.land-foot-links a:hover,
.land-foot-links a:focus-visible,
.land-foot a:not(.land-mark):not(.land-foot-credit):hover,
.land-foot a:not(.land-mark):not(.land-foot-credit):focus-visible {
  color: var(--accent);
  outline: none;
}
.land-foot-credit {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: var(--accent-hover);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(24, 119, 242, 0.28);
  box-shadow: 0 2px 10px rgba(24, 119, 242, 0.1);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.land-foot-credit:hover,
.land-foot-credit:focus-visible {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.22);
  outline: none;
}

.land-lang {
  position: relative;
  margin-left: 0.35rem;
}
.land-lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
  cursor: pointer;
  padding: 0.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
}
.land-lang-trigger::-webkit-details-marker { display: none; }
.land-lang-trigger::marker { content: ''; }
.land-lang-trigger:hover,
.land-lang[open] .land-lang-trigger {
  border-color: rgba(24, 119, 242, 0.35);
  background: var(--accent-soft);
}
.land-lang-chev {
  width: 7px;
  height: 7px;
  margin-right: 0.35rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.15s ease;
}
.land-lang[open] .land-lang-chev {
  transform: rotate(225deg) translateY(1px);
}
.land-lang-sticker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 2rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
}
.land-lang-flag {
  font-size: 1.05rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.land-lang-trigger .land-lang-sticker {
  padding: 0.22rem 0.42rem;
}
.land-lang-trigger .land-lang-flag {
  font-size: 1.15rem;
}
.land-lang-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 50;
  display: grid;
  gap: 0.35rem;
  min-width: 8.5rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 18, 24, 0.1);
}
.land-lang-menu .land-lang-sticker {
  width: 100%;
  justify-content: flex-start;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: normal;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
}
.land-lang-menu .land-lang-flag {
  font-size: 1.2rem;
}
.land-lang-menu .land-lang-sticker:hover,
.land-lang-menu .land-lang-sticker:focus-visible {
  background: var(--surface);
  color: var(--ink);
  outline: none;
}
.land-lang-sticker-on {
  color: var(--accent-hover);
  background: var(--accent-soft);
  border-color: rgba(24, 119, 242, 0.2);
}
.land-lang-trigger .land-lang-sticker-on {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
}

.land-why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.land-why-card {
  padding: 1.25rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.land-why-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 600;
}
.land-why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.land-faq {
  display: grid;
  gap: 0.65rem;
  margin-top: 2rem;
  max-width: 42rem;
}
.land-faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.15rem 1rem;
}
.land-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 0;
  list-style: none;
}
.land-faq-item summary::-webkit-details-marker { display: none; }
.land-faq-item p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.land-pricing-payment {
  margin: 0.75rem 0 0;
  max-width: 48ch;
  font-size: 0.88rem;
  color: var(--muted);
}

.land-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}
.land-contact-form {
  display: grid;
  gap: 0.85rem;
}
.land-contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 13px;
  font-weight: 500;
}
.land-contact-form input,
.land-contact-form select,
.land-contact-form textarea {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.land-contact-form textarea { resize: vertical; min-height: 4.5rem; }
.land-cta-submit {
  margin-top: 0.35rem;
  border: 0;
  cursor: pointer;
  justify-self: start;
}
.land-contact-aside {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}
.land-contact-aside p {
  margin: 0 0 0.65rem;
  font-size: 14px;
}
.land-contact-aside a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.land-flash {
  margin-top: 1rem;
  max-width: 36rem;
}

.land-foot-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.land-foot-links a {
  font-family: inherit;
  letter-spacing: normal;
}

.land-legal {
  max-width: 42rem;
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
}
.land-legal h1 {
  margin: 1.25rem 0 0.35rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}
.land-legal-updated {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 14px;
}
.land-legal section {
  margin-bottom: 1.75rem;
}
.land-legal section h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}
.land-legal section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.gate-dialog {
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
  width: min(26rem, calc(100% - 2rem));
}
.gate-dialog:not([open]) {
  display: none !important;
}
.gate-dialog::backdrop {
  background: rgba(15, 18, 24, 0.45);
}
.gate-dialog:target {
  display: block !important;
}
.ticket-login {
  position: relative;
  width: 100%;
  background: #fff;
  padding: 2.35rem 2rem 2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(15, 18, 24, 0.04),
    0 18px 40px rgba(15, 18, 24, 0.12);
}
.gate-dialog-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(#5b6573, #5b6573) 50% 50% / 12px 1.5px no-repeat,
    linear-gradient(#5b6573, #5b6573) 50% 50% / 1.5px 12px no-repeat,
    transparent;
  transform: rotate(45deg);
}
.gate-dialog-close:hover,
.gate-dialog-close:focus-visible {
  background:
    linear-gradient(#14181f, #14181f) 50% 50% / 12px 1.5px no-repeat,
    linear-gradient(#14181f, #14181f) 50% 50% / 1.5px 12px no-repeat,
    var(--surface);
  outline: none;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.ticket-login h2 {
  margin: 0.5rem 0 0.4rem;
  font-size: clamp(1.8rem, 4vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.lede {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.flash {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid #fecdca;
  margin: 0 0 1rem;
  font-size: 13px;
}
.ticket-login label {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.95rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.ticket-login input {
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  padding: 0.65rem 0.8rem;
  background: var(--surface-raised);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ticket-login input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.12);
}
.ticket-login button[type="submit"] {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 0.45rem;
  padding: 0.7rem 0.95rem;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .land-hero,
  .land-features,
  .land-steps,
  .land-pricing,
  .land-stats,
  .land-why,
  .land-contact-grid {
    grid-template-columns: 1fr 1fr;
  }
  .land-stats > div:nth-child(3),
  .land-stats > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .land-stats > div:nth-child(3) { border-left: 0; }
  .land-nav a:not(.land-login) { display: none; }
  .land-col-shift { margin-top: 0; }
}
@media (max-width: 640px) {
  .land-hero,
  .land-features,
  .land-steps,
  .land-pricing,
  .land-stats,
  .land-why,
  .land-contact-grid {
    grid-template-columns: 1fr;
  }
  .land-hero { padding: 2.5rem 1.15rem 3rem; }
  .land-board { min-height: 0; }
  .land-toast { position: static; width: auto; margin-top: 0.75rem; }
  .land-stats > div + div,
  .land-stats > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  .land-bar { backdrop-filter: none; }
}

.thread { list-style: none; padding: 0; margin: 0; }
.thread li {
  background: var(--surface-raised);
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

/* —— Feedback —— */
.board-toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.4rem;
  z-index: 80;
  pointer-events: none;
}
.board-toast {
  background: var(--header);
  color: #f5f6f8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.board-toast.in {
  opacity: 1;
  transform: translateY(0);
}

@keyframes dropPulse {
  0% { box-shadow: 0 0 0 0 rgba(24, 119, 242, 0); }
  40% { box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(24, 119, 242, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .ticket.drop-success,
  .station.drop-success,
  .station-row.drop-success {
    animation: none !important;
  }
  .gate-cursor { display: none; }
}

@media (max-width: 800px) {
  .menu-panel { min-width: 11rem; }
  .stations {
    padding: 0.85rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .station {
    scroll-snap-align: start;
    min-width: min(82vw, 300px);
    flex: 0 0 min(82vw, 300px);
  }
  .ticket {
    padding: 0.85rem 0.9rem;
    min-height: 44px;
  }
  .ticket a { font-size: 15px; }
  body.rail-open .board-main { margin-left: 0; }
  body.rail-open .rail-scrim { display: block; }
  .page,
  .task-page { padding: 1rem 0.85rem calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
  .task-layout { grid-template-columns: 1fr; }
  .task-section-meta {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .task-toolbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "back save"
      "title title";
  }
  .task-back { grid-area: back; }
  .task-save { grid-area: save; }
  .task-toolbar-main { grid-area: title; }
  .comment-compose {
    grid-template-columns: 1fr;
  }
  .comment-compose button { width: 100%; }
  .task-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .task-dates,
  .form-row { grid-template-columns: 1fr; }
  .task-form,
  .task-comments,
  .panel { padding: 1.15rem 1.1rem 1.25rem; }
  .set-row { padding: 0.9rem 1rem; }
  .filter label,
  .filter select { min-width: 0; width: 100%; }
}

.plymo-confirm-dialog {
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
  width: min(26rem, calc(100% - 2rem));
}
.plymo-confirm-dialog:not([open]) {
  display: none !important;
}
.plymo-confirm-dialog::backdrop {
  background: rgba(15, 18, 24, 0.45);
  animation: plymo-fade-in 0.15s ease;
}
.plymo-confirm-card {
  animation: plymo-slide-up 0.18s ease;
}
@keyframes plymo-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes plymo-slide-up {
  from { opacity: 0; transform: translateY(0.35rem); }
  to { opacity: 1; transform: translateY(0); }
}
.plymo-confirm-card {
  background: var(--surface-raised);
  padding: 1.5rem 1.35rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(15, 18, 24, 0.04),
    0 18px 40px rgba(15, 18, 24, 0.12);
}
.plymo-confirm-title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.plymo-confirm-message {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
}
.plymo-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.plymo-confirm-actions button {
  min-width: 6.5rem;
}
.plymo-confirm-ok:not(.danger) {
  background: var(--accent);
  color: #fff;
}
.plymo-confirm-ok:not(.danger):hover {
  background: var(--accent-hover);
}
.plymo-confirm-ok.danger {
  background: var(--danger);
  color: #fff;
}
.plymo-confirm-ok.danger:hover {
  background: #912018;
}
