* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: #0a0a0a;
  color: #f5f5f5;
  font-family: "JetBrains Mono", "SF Mono", "Fira Code", ui-monospace, monospace;
}

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

/* Prevent iOS from auto-zooming on focus — any input/textarea must render
   at >=16px or Mobile Safari shoves the layout. !important so per-class
   font-size overrides can't accidentally drop below this threshold. */
input,
textarea,
select {
  font-size: 16px !important;
}

/* The app reads as monospace by default (body), but small button text,
   menu items, and input placeholders use the OS system font for legibility. */
.button,
.idea-menu button,
::placeholder {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app {
  width: min(960px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 16px calc(88px + env(safe-area-inset-bottom));
}

.header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 10px 0 22px;
  border-bottom: 1px solid #1f1f1f;
}

/* Mobile only: focusing a Dump input enters "composer mode" — the page
   clears to a single writing surface so capture never collapses into a
   weird void above the keyboard. Desktop is untouched. */
@media (max-width: 600px) {
  .header {
    overflow: hidden;
    max-height: 480px;
    transition: max-height 0.3s ease, opacity 0.22s ease;
  }
  .app.capturing .header {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
  }
  .nav {
    transition: transform 0.25s ease;
  }
  .app.capturing .nav {
    transform: translateY(100%);
    pointer-events: none;
  }

  /* Everything that isn't the active composer steps aside. */
  .app.capturing .folder-filter,
  .app.capturing .empty,
  .app.capturing .idea-row:not(.editing) {
    display: none;
  }
  /* When editing an existing idea, the new-idea capture box steps aside too. */
  .app.capturing:has(.idea-row.editing) .idea-input {
    display: none;
  }
  /* The focused input fills the space — a deliberate writing surface. */
  .app.capturing .idea-capture,
  .app.capturing .idea-row.editing .idea-text-input {
    min-height: 55vh;
  }
}

.brand,
.identity,
.stats,
.actions,
.toolbar,
.card-top,
.ship-meta,
.focus-strip,
.readiness,
.idea-input {
  display: flex;
}

.brand {
  align-items: center;
  gap: 12px;
}

.logo-mark {
  border-radius: 12px;
  flex: 0 0 auto;
}

.eyebrow,
.section-title {
  margin: 0 0 6px;
  color: #737373;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1;
  letter-spacing: 0;
}

.stats {
  gap: 10px;
  flex-wrap: wrap;
}

/* PORT — stats row + activity dots + divider + collapsible shelved section */
/* Compound selector beats the mobile @media .stats override */
.stats.port-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.stats.port-stats .metric {
  min-width: 0;
}

.port-divider {
  border: none;
  border-top: 1px solid #1f1f1f;
  margin: 18px 0 14px;
}

.shelved-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #1f1f1f;
}

.shelved-section > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #737373;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0 0 16px;
  user-select: none;
}

.shelved-section > summary::-webkit-details-marker {
  display: none;
}

/* Chevron rotates 90° when the details is open. */
.shelved-chev {
  color: #525252;
  transition: transform 0.18s ease;
  flex: 0 0 auto;
}
.shelved-section[open] .shelved-chev {
  transform: rotate(90deg);
}

/* Count — mono, faint, no uppercase transform (overrides the summary's). */
.shelved-count {
  color: #525252;
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.shelved-stack {
  margin-top: 12px;
}

.port-signout {
  display: block;
  margin: 36px auto 0;
  padding: 6px 10px;
  background: transparent;
  border: none;
  color: #525252;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.port-signout:hover {
  color: #f87171;
}

.metric {
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  background: #101010;
}

.metric strong {
  display: block;
  color: #f5f5f5;
  font-size: 18px;
  line-height: 1.1;
}

.metric span {
  color: #525252;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.green {
  color: #10b981 !important;
}

.blue {
  color: #60a5fa !important;
}

.red {
  color: #f87171 !important;
}

.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-around;
  background: #0a0a0a;
  border-top: 1px solid #1f1f1f;
  /* Roomier dock — Twitter-style breathing room around the tabs rather
     than oversized icons. */
  padding: 12px 0 calc(14px + env(safe-area-inset-bottom));
}

.nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #525252;
  cursor: pointer;
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 9.5px;
}
/* Normal-size icons + a small label. The whitespace (gap + bar padding)
   does the work, not icon size. */
.nav button svg {
  width: 22px;
  height: 22px;
}

.nav button.active {
  color: #10b981;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid #333;
  border-radius: 6px;
  background: transparent;
  color: #d4d4d4;
  cursor: pointer;
  padding: 8px 12px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
}

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

.button.filled {
  background: #f5f5f5;
  border-color: #f5f5f5;
  color: #0a0a0a !important;
  font-weight: 700;
}

.button.wide {
  width: 100%;
  margin-bottom: 16px;
}

.button.green {
  border-color: #10b981;
}

.button.blue {
  border-color: #3b82f6;
}

.button.red {
  border-color: #ef4444;
}

.button.gold {
  color: #f59e0b;
  border-color: #f59e0b;
}

.button.ghost,
.icon-button {
  color: #737373;
}

.icon-button.danger {
  color: #b91c1c;
  border-color: #2a1717;
}
.icon-button.danger:hover {
  color: #ef4444;
  border-color: #3f1a1a;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #262626;
  border-radius: 6px;
  background: #111;
  color: #f5f5f5;
  outline: none;
  padding: 13px 14px;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: #737373;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.idea-input {
  gap: 8px;
  margin-bottom: 18px;
}

.idea-input input {
  flex: 1;
}

.idea-capture {
  flex: 1;
  min-height: 0;
  resize: none;
  overflow: hidden;
  line-height: 1.4;
  font-family: inherit;
}

.idea-text-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f5f5f5;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  padding: 0;
  min-height: 0;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  font-family: inherit;
}
.idea-text-input::placeholder { color: #555; }

.idea-text {
  cursor: text;
}

.idea-text-empty {
  color: #555;
  font-style: italic;
}

.stack {
  display: grid;
  gap: 6px;
}

.card,
.idea-row,
.focus-card,
.empty,
.ship-card {
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  background: #101010;
}

.card,
.focus-card,
.ship-card {
  padding: 24px;
}

.idea-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  min-width: 0;
}

.idea-row-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.idea-row .idea-actions {
  align-items: center;
  flex-shrink: 0;
}

.idea-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}

.idea-link {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.idea-link:hover { color: #bfdbfe; }

.idea-hashtag {
  color: #f59e0b;
  font-weight: 500;
}

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

.idea-menu-wrap {
  position: relative;
}

.idea-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.idea-menu button {
  background: none;
  border: none;
  color: #d5d5d5;
  text-align: left;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
}

.idea-menu button:hover {
  background: #222;
}

/* BuildCard menu — the ⋯ sits on the left, so open the menu leftward-anchored */
.card-menu {
  right: auto;
  left: 0;
}

.idea-menu button.danger {
  color: #ef4444;
}

.idea-menu button.danger:hover {
  background: #2a1212;
}

.idea-project-tag {
  align-self: flex-start;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  color: #888;
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.idea-project-tag:hover {
  color: #f5f5f5;
  border-color: #444;
}

.idea-project-input {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  color: #f5f5f5;
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
  width: 50%;
  min-width: 160px;
}

.idea-project-input:focus {
  border-color: #444;
}

.idea-note {
  background: #0c0c0c;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  color: #c5c5c5;
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  width: 100%;
}

.idea-note:focus {
  border-color: #444;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #f5f5f5;
  font-size: 13px;
  padding: 10px 18px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.2s ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}


.card-top,
.toolbar,
.ship-meta,
.focus-strip {
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.identity {
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.identity.big img,
.identity.big .logo-mark {
  width: 48px;
  height: 48px;
}

.identity img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 7px;
  flex: 0 0 auto;
}

.identity h2,
.ship-card h2 {
  color: #f5f5f5;
  font-size: 16px;
  line-height: 1.25;
}

.identity p,
.ship-card p,
.muted,
.empty span,
.missing {
  color: #737373;
  font-size: 12px;
  line-height: 1.5;
}

.tags,
.actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid color-mix(in srgb, var(--tag), transparent 70%);
  border-radius: 4px;
  background: color-mix(in srgb, var(--tag), transparent 92%);
  color: var(--tag);
  padding: 3px 7px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.readiness {
  gap: 7px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.readiness span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #262626;
  border-radius: 999px;
  color: #737373;
  padding: 5px 9px;
  font-size: 10px;
  text-transform: uppercase;
}

.readiness span.done {
  border-color: #10b98133;
  color: #10b981;
}

.money,
.paused-note {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-left: 2px solid #f59e0b;
  border-radius: 4px;
  background: #f59e0b0d;
  color: #fbbf24;
  font-size: 12px;
}

.paused-note {
  border-left-color: #ef4444;
  background: #ef44440d;
  color: #f87171;
}

/* A calm to-do hint, not an error */
.missing {
  margin: 8px 0 0;
  color: #666;
  font-size: 12px;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 42px 18px;
  text-align: center;
}

.empty strong {
  font-size: 16px;
}

/* Interactive Dump empty state */
.dump-empty {
  display: grid;
  place-items: center;
  min-height: 168px;
  padding: 28px 24px;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  background: #101010;
  cursor: text;
  text-align: center;
}
.dump-empty.active {
  cursor: default;
}

/* Both children share one grid cell so the card size stays fixed */
.dump-empty-text,
.dump-empty-input {
  grid-area: 1 / 1;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.dump-empty-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dump-empty-text strong {
  font-size: 16px;
  font-weight: 600;
  color: #f5f5f5;
}
.dump-empty-text span {
  font-size: 13px;
  color: #5a5a5a;
}

.dump-empty-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  color: #f5f5f5;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
  resize: none;
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}
.dump-empty-input::placeholder { color: #555; }

.dump-empty.active .dump-empty-text {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}
.dump-empty.active .dump-empty-input {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.focus {
  display: grid;
  gap: 12px;
}

.empty-focus {
  padding: 34px;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  background: #101010;
}

.empty-focus h2 {
  margin-bottom: 8px;
}

.empty-focus p {
  color: #737373;
  margin-bottom: 16px;
}

.focus-strip {
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  padding: 12px 14px;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
}

.focus-card {
  border-color: #3b82f655;
  box-shadow: 0 0 0 1px #3b82f611;
}

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #1f1f1f;
  margin: 8px 0 16px;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #10b981;
}

.tasks {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.task {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  background: #0d0d0d;
  color: #a3a3a3;
  cursor: pointer;
  padding: 11px 14px;
  text-align: left;
}

.task span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid #333;
  border-radius: 4px;
  flex: 0 0 auto;
}

.task.done {
  color: #10b981;
}

.task.done span {
  border-color: #10b981;
  background: #10b981;
  color: #0a0a0a;
}

/* ──────────────────────────────────────────────────────────────────
   MOTION — lightweight weekly side items rendered below the focus card.
   Deliberately NO card chrome — that's what gives main vs motion its
   visual hierarchy. Motion is a list on the page, main is a framed card.
   ────────────────────────────────────────────────────────────────── */
.motion-section {
  margin-top: 32px;
  /* On mobile this is inside .app which already has padding; keep this
     section flat — no extra padding/borders so it reads as part of the
     page, not another card. */
}
.motion-list {
  display: flex;
  flex-direction: column;
}
.motion-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #1a1a1a;
  font-size: 14px;
  color: #d4d4d4;
}
.motion-row:last-of-type {
  /* The input form is the last child; the last row before it keeps its border. */
}
.motion-check {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 0;
  background: transparent;
  border: 1.5px solid #333;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0a;
  transition: background 0.15s, border-color 0.15s;
}
.motion-row.done .motion-check {
  background: #10b981;
  border-color: #10b981;
}
.motion-text {
  flex: 1 1 auto;
  line-height: 1.4;
  word-break: break-word;
}
.motion-row.done .motion-text {
  color: #666;
  text-decoration: line-through;
  text-decoration-color: #333;
}
/* Per-item ⋯ menu replaces the old hover-X. Always-visible but
   muted; menu pops below with Edit / Delete. */
.motion-actions {
  flex: 0 0 auto;
  position: relative;
  display: inline-flex;
}
.motion-more {
  background: transparent;
  border: none;
  color: #525252;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.motion-more:hover { color: #d4d4d4; background: rgba(255,255,255,0.04); }
.motion-menu {
  top: calc(100% + 4px);
  right: 0;
  left: auto;
}
/* Inline edit input — borderless, blends with the row so it reads as
   the same row going into edit mode, not a separate field. */
.motion-text-input {
  flex: 1 1 auto;
  border: none;
  background: transparent;
  padding: 0;
  color: #f5f5f5;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
}
.motion-input-form {
  display: flex;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid transparent;
}
.motion-input {
  flex: 1 1 auto;
  background: transparent;
  border: none;
  outline: none;
  color: #d4d4d4;
  font-family: inherit;
  font-size: 14px;
  padding: 0;
  width: 100%;
}
.motion-input::placeholder {
  color: #525252;
}

/* ──────────────────────────────────────────────────────────────────
   LEARNING PROMPT — single-line "What did you learn?" card that
   appears at the top of This Week when a past week has an unfilled
   recap. Calm, inviting, low-friction.
   ────────────────────────────────────────────────────────────────── */
.learning-prompt {
  background: #111;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.learning-prompt-chip {
  flex-shrink: 0;
  background: color-mix(in oklab, #f59e0b 13%, transparent);
  color: #f59e0b;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  line-height: 1;
}
.learning-prompt-form {
  flex: 1;
  min-width: 0;
}
.learning-prompt-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #eeeeee;
  font-family: inherit;
  font-size: 15px;
  padding: 2px 0;
}
.learning-prompt-input::placeholder { color: #666; }
.learning-prompt-skip {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #404040;
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: color 0.15s;
}
.learning-prompt-skip:hover { color: #a3a3a3; }

/* "weeks ↗" link now lives stacked under the ⋯ in .port-card-actions —
   see .port-card-weeks. The old .port-secondary block was removed. */

/* ──────────────────────────────────────────────────────────────────
   RECAPS PAGE — dedicated screen for weekly recaps. Reflective,
   calm, narrative. NOT a dashboard.
   ────────────────────────────────────────────────────────────────── */
.recaps-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}
.recaps-back {
  background: transparent;
  border: none;
  color: #a3a3a3;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  transition: color 0.15s;
}
.recaps-back:hover { color: #eeeeee; }
.recaps-title {
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: #eeeeee;
  margin: 16px 0 4px;
}
.recaps-sub {
  font-size: 13px;
  margin: 0 0 20px;
}
.recaps-empty {
  padding: 32px 0;
  text-align: center;
}
.recaps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.recap-card {
  background: #111;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.recap-week {
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  font-size: 18px;
  color: #eeeeee;
  letter-spacing: -0.02em;
}
.recap-block { display: flex; flex-direction: column; gap: 5px; }
.recap-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #525252;
  font-family: ui-monospace, Menlo, monospace;
}
.recap-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
  color: #eeeeee;
}
.recap-outcome-icon {
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  width: 14px;
  flex-shrink: 0;
}
.recap-main.outcome-shipped .recap-outcome-icon { color: #10b981; }
.recap-main.outcome-shelved .recap-outcome-icon { color: #f87171; }
.recap-main.outcome-continued .recap-outcome-icon { color: #f59e0b; }
.recap-main-name { font-weight: 500; }
.recap-outcome-label {
  color: #666;
  font-size: 12px;
}
.recap-motion {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.recap-motion li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-family: ui-monospace, Menlo, monospace;
}
.recap-motion li.done { color: #d4d4d4; }
.recap-motion li.undone { color: #525252; text-decoration: line-through; text-decoration-color: #333; }
.recap-motion-icon {
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  width: 14px;
  flex-shrink: 0;
}
.recap-motion li.done .recap-motion-icon { color: #10b981; }
.recap-motion li.undone .recap-motion-icon { color: #525252; }
.recap-learning {
  font-family: inherit;
  font-size: 15px;
  font-style: italic;
  color: #eeeeee;
  line-height: 1.5;
  margin: 0;
  cursor: text;
  padding: 4px 0;
}
.recap-learning:hover {
  color: #ffffff;
}
.recap-learning-empty {
  background: transparent;
  border: 1px dashed #2a2a2a;
  color: #666;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-start;
  transition: color 0.15s, border-color 0.15s;
}
.recap-learning-empty:hover {
  color: #10b981;
  border-color: #10b981;
}
.recap-learning-input {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  color: #eeeeee;
  resize: vertical;
  outline: none;
  font-style: italic;
}
.recap-learning-input:focus {
  border-color: #10b981;
}

.build-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22%;
  object-fit: cover;
  font-weight: 700;
  line-height: 1;
}

/* Build picture — single image, editor control */
.picture-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.photo-error {
  margin: 6px 0 0;
  color: #f87171;
  font-size: 12px;
}

.ship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.ship-card {
  position: relative;
}

.ship-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.ship-card-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.ship-logo {
  flex: 0 0 auto;
}

.ship-logo img {
  border-radius: 11px;
  object-fit: cover;
}

/* Ship number corner stamp — quiet faint mono, top-right of the card. */
.ship-number {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #525252;
  letter-spacing: 0.05em;
  z-index: 1;
  pointer-events: none;
}

.ship-meta {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #737373;
}

.ship-span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, #10b981, transparent 70%);
  background: color-mix(in srgb, #10b981, transparent 90%);
  color: #10b981;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.card-checkpoints {
  margin: 14px 0;
}

.checkpoint-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: #737373;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.3px;
}

.checkpoint-toggle svg {
  transition: transform 0.12s ease;
}

.checkpoint-toggle.all-done {
  color: #10b981;
}

.card-tasks {
  margin-top: 10px;
  margin-bottom: 0;
}

.ship-card p {
  margin: 8px 0 18px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.86);
  padding: 16px;
}

.modal-card {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  display: grid;
  gap: 14px;
  border: 1px solid #262626;
  border-radius: 10px;
  background: #111;
  padding: 24px;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.modal-actions-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.logo-label {
  color: #737373;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.checkpoint-edit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.checkpoint-row {
  display: flex;
  gap: 6px;
}
.checkpoint-row input {
  flex: 1;
}
.checkpoint-row .icon-button {
  flex: 0 0 auto;
}

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

.more-toggle {
  background: none;
  border: none;
  color: #737373;
  font: inherit;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: left;
  padding: 4px 0;
  cursor: pointer;
}
.more-toggle:hover { color: #f5f5f5; }

.week-dots {
  display: flex;
  gap: 10px;
  padding: 14px 0 4px;
}

.week-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.week-dot span {
  font-size: 9px;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dot-pip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid #262626;
  transition: background 0.2s, border-color 0.2s;
}

.week-dot.active .dot-pip {
  background: #10b981;
  border-color: #10b981;
}

/* Today emphasis — small size bump + brighter, bolder weekday label.
   Subtle: matches the design canvas's todayIndex=3 treatment without
   ballooning the sidebar dot panel. */
.week-dot.today .dot-pip {
  width: 11px;
  height: 11px;
}
.week-dot.today span {
  color: #d4d4d4;
  font-weight: 700;
}

.week-dot.future .dot-pip {
  opacity: 0.25;
}

.folder-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 18px;
}

/* Base pill style — shared between the "All" filter pill and the folder
   chips. Pill-shaped (border-radius:99), readable type, count badge
   inline. Inactive chips: transparent + faint. Active state below. */
.folder-filter > button,
.folder-chip > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #1f1f1f;
  color: #737373;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 99px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

/* "All" pill — uppercase, treat-as-active by default (filled) */
.folder-filter-all {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  background: #161616 !important;
  border-color: #262626 !important;
  color: #f5f5f5 !important;
}
.folder-filter-all.active {
  /* When "All" is active (no folder selected) it gets the strong fill. */
  background: #161616 !important;
  color: #f5f5f5 !important;
}
.folder-filter-all:not(.active) {
  /* When a folder IS selected, "All" recedes — return to the muted style. */
  background: transparent !important;
  border-color: #1f1f1f !important;
  color: #737373 !important;
}

/* Folder chip — lowercase with #folder format and a faint ·N count. */
.folder-chip {
  position: relative;
  display: inline-flex;
  -webkit-touch-callout: none;
  user-select: none;
}
.folder-chip > button {
  text-transform: lowercase;
  letter-spacing: 0.4px;
}
.folder-chip.active > button {
  color: #f59e0b;
  border-color: color-mix(in oklab, #f59e0b 30%, transparent);
}
.folder-chip > button:hover {
  color: #d4d4d4;
  border-color: #2a2a2a;
}
.folder-chip.active > button:hover {
  color: #fbbf24;
}

/* Faint count badge inline with the label. */
.folder-count {
  color: #525252;
  font-family: ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.folder-chip-input {
  width: 116px;
  background: #111;
  border: 1px solid #444;
  border-radius: 4px;
  color: #f5f5f5;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  outline: none;
}

.folder-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  display: flex;
  flex-direction: column;
  min-width: 124px;
  padding: 4px;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.folder-menu button {
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #d4d4d4;
  font-size: 12px;
  text-align: left;
  padding: 7px 10px;
  cursor: pointer;
}
.folder-menu button:hover { background: #222; }
.folder-menu button.danger { color: #ef4444; }
.folder-menu button.danger:hover { background: #2a1717; }

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.button.ghost.subtle {
  opacity: 0.6;
  font-size: 11px;
}

.button.ghost.subtle:hover {
  opacity: 1;
}

.muted.small {
  font-size: 11px;
  margin: 4px 0 0;
}

.ship-retro {
  border-top: 1px dashed #2a2a2a;
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.retro-block strong {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #666;
  margin-bottom: 4px;
}

.retro-block p {
  margin: 0;
  font-size: 13px;
  color: #c5c5c5;
  white-space: pre-wrap;
}

.retro-block ul {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
}

.retro-block a {
  color: #60a5fa;
  text-decoration: none;
  word-break: break-all;
}

.retro-block a:hover {
  text-decoration: underline;
}

.folder-filter > button.active,
.folder-filter > button:hover,
.folder-chip.active > button,
.folder-chip > button:hover {
  border-color: #444;
  color: #f5f5f5;
}

.subsection-title {
  font-size: 11px;
  color: #666;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 18px 0 8px;
}

.folder-badge {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 10px;
  color: #525252;
  background: #161616;
  letter-spacing: 0.4px;
  text-transform: lowercase;
  padding: 2px 7px;
  border: 1px solid #1f1f1f;
  border-radius: 4px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.folder-input-sm {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  color: #888;
  font-size: 11px;
  padding: 4px 8px;
  width: 90px;
  outline: none;
}

.folder-input-sm:focus {
  border-color: #444;
  color: #f5f5f5;
}

footer {
  padding: 42px 0 10px;
  text-align: center;
  color: #333;
  letter-spacing: 2px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.signout-btn {
  background: none;
  border: none;
  color: #444;
  font-size: 10px;
  letter-spacing: 2px;
  cursor: pointer;
  padding: 0;
  text-transform: uppercase;
}

.signout-btn:hover {
  color: #888;
}

.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 16px;
  text-align: center;
  background: #0a0a0a;
}

/* Logo at the top — links back to the marketing landing page. */
.auth-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: opacity 0.15s;
}
.auth-brand:hover { opacity: 1; }

/* Plain headline — used by the set-new-password screen. (The cycling
   typewriter hero was removed from the sign-in/up screens.) */
.auth-headline {
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  font-size: clamp(24px, 4.5vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #f5f5f5;
  margin: 0;
  max-width: 600px;
}

.auth-input {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #f5f5f5;
  padding: 12px 14px;
  width: 100%;
  max-width: 340px;
  font-size: 14px;
  outline: none;
}

.auth-input:focus {
  border-color: #444;
}

.auth-sub {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
  margin: 0;
}

/* Card wrapping the auth controls — gives the form a contained surface
   that sits below the hero headline. */
.auth-card {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 24px;
  background: #101010;
  border: 1px solid #1f1f1f;
  border-radius: 16px;
}

.auth-toggle {
  background: none;
  border: none;
  color: #737373;
  cursor: pointer;
  font-size: 12px;
  padding: 6px 10px;
  margin-top: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.auth-toggle strong {
  color: #f5f5f5;
  font-weight: 600;
  margin-left: 4px;
}

.auth-toggle:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Inside the .auth-card, controls go full-width (the card itself caps
   the width at 340px). */
.auth-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.auth-form .auth-input {
  max-width: none;
}

.auth-form .button.wide {
  margin-bottom: 0;
}

.auth-error {
  margin: 0;
  text-align: left;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: #525252;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #1f1f1f;
}

.auth-card .button.wide {
  max-width: none;
  margin-bottom: 0;
}
.auth-toggle {
  margin-top: 0;
}

/* Password field + eye toggle. The input keeps right padding so text
   never runs under the eye button. */
.pw-field { position: relative; width: 100%; }
.pw-field .auth-input { padding-right: 42px; }
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #737373;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s;
}
.pw-toggle:hover { color: #d4d4d4; }

/* Password strength meter — 4 segments + a label, colored by score. */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 2px 0;
}
.pw-strength-bars {
  display: flex;
  gap: 4px;
  flex: 1;
}
.pw-strength-seg {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  transition: background 0.2s;
}
.pw-strength-label {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex: 0 0 auto;
}

/* "Forgot password?" — quiet right-aligned link under the password field. */
.auth-forgot {
  align-self: flex-end;
  background: none;
  border: none;
  color: #93c5fd;
  cursor: pointer;
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 2px 2px;
  margin-top: -2px;
}
.auth-forgot:hover { text-decoration: underline; text-underline-offset: 2px; }

.auth-sent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 6px 4px;
}

.auth-sent-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #10b981;
}
/* Body copy in the sent screens — override the tiny .small so it stays
   readable on desktop. */
.auth-sent p.small {
  font-size: 14px;
  line-height: 1.55;
}
.auth-sent .auth-link {
  font-size: 14px;
  margin-top: 4px;
}

.auth-link {
  background: none;
  border: none;
  color: #93c5fd;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 6px;
}
.auth-link:hover { color: #bfdbfe; }

/* The header is the desktop app-bar — hidden on mobile, the mobile UI relies
   on the bottom nav alone. */
@media (max-width: 759px) {
  .header {
    display: none;
  }
}

/* Sidebar is desktop-only; mobile keeps the bottom-fixed nav unchanged. */
.sidebar { display: none; }
.app-main { /* on mobile: just an invisible wrapper, no styles needed */ }

@media (min-width: 760px) {
  .header {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  /* Softened header stats: no visible border, just a subtle surface lift */
  .header-stats {
    display: flex;
    gap: 10px;
  }
  .header-stats .metric {
    border: none;
    background: #161616;
  }

  /* Header already shows the stats globally — Port doesn't need them again */
  .stats.port-stats {
    display: none;
  }

  /* Nav moves from fixed-bottom mobile dock to in-flow horizontal under the header */
  .nav {
    position: static;
    border-top: none;
    border-bottom: 1px solid #1f1f1f;
    background: transparent;
    padding: 4px 0;
    justify-content: flex-start;
    gap: 4px;
  }
  .nav button {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 8px;
    padding: 10px 14px;
  }

  /* No fixed bottom nav, so the bottom padding can go back to a normal value */
  .app {
    padding-bottom: 40px;
  }

  /* Center nav items vertically so the dots line up with the labels */
  .nav {
    align-items: center;
  }

  /* WeekDots in the nav: pushed far right, compact, quiet — app-shell signal */
  .nav > .week-dots {
    margin-left: auto;
    padding: 0;
    gap: 7px;
  }
  .nav > .week-dots .dot-pip {
    width: 7px;
    height: 7px;
  }
  .nav > .week-dots .week-dot span {
    font-size: 8px;
  }

  /* Port's own WeekDots is gone on desktop — they live in the nav now */
  section > .week-dots {
    display: none;
  }
}

/* Mobile keeps the WeekDots inside Port content; nav stays clean */
@media (max-width: 759px) {
  .nav > .week-dots {
    display: none;
  }
}

@media (min-width: 601px) {
  .tagline::before {
    content: "another week, ";
  }
}

@media (max-width: 600px) {
  /* Long ideas truncate to a single line so a row can't take over the screen */
  .idea-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .metric {
    min-width: 0;
  }

  .card-top,
  .toolbar {
    flex-direction: column;
  }

  .idea-input {
    flex-direction: column;
  }

  .button.filled.wide {
    justify-content: center;
  }
}

/* ---------------------------------------------------------------------- */
/* Profile (Port header + editor + per-build public toggle)                */
/* ---------------------------------------------------------------------- */

.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #161616;
}

.avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
}

.avatar-skeleton {
  width: 72px;
  height: 72px;
  background: #161616;
}

.skeleton-line {
  height: 10px;
  width: 80px;
  border-radius: 4px;
  background: #161616;
  margin: 6px 0;
}
.skeleton-line.wide { width: 140px; }

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  background: #101010;
  margin-bottom: 14px;
}

.profile-header-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  word-break: break-word;
}

.profile-handle {
  margin: 0 0 6px;
  color: #737373;
  font-size: 13px;
  line-height: 1.2;
}

.profile-bio {
  margin: 6px 0 8px;
  color: #d5d5d5;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.profile-public-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, #10b981, transparent 70%);
  background: color-mix(in srgb, #10b981, transparent 92%);
  color: #10b981;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.3px;
}

.profile-private-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #525252;
  font-size: 11px;
  letter-spacing: 0.3px;
}

.profile-setup-prompt {
  color: #f59e0b;
  font-size: 11px;
}

.profile-edit {
  flex: 0 0 auto;
  align-self: flex-start;
}

/* Editor (replaces the display block while editing) */

.profile-editor {
  padding: 16px;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  background: #101010;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-editor-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.profile-editor-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-avatar-edit {
  position: relative;
  width: 80px;
  height: 80px;
  flex: 0 0 auto;
}

.profile-avatar-upload {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #10b981;
  color: #0a0a0a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid #101010;
  transition: transform 0.1s ease;
}
.profile-avatar-upload:hover {
  transform: scale(1.05);
}

.profile-avatar-remove {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1f1f1f;
  color: #f87171;
  border: 2px solid #101010;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.profile-avatar-remove:hover {
  background: #2a1414;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.profile-field > span {
  color: #737373;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profile-field input,
.profile-field textarea {
  background: #0a0a0a;
  border: 1px solid #1f1f1f;
  border-radius: 6px;
  color: #f5f5f5;
  padding: 9px 10px;
  outline: none;
  width: 100%;
  resize: vertical;
}
.profile-field input:focus,
.profile-field textarea:focus {
  border-color: #2a2a2a;
}

.field-error {
  color: #f87171;
  font-size: 11px;
  font-style: normal;
}

.field-hint {
  color: #525252;
  font-size: 11px;
  font-style: normal;
}

.username-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.username-input-wrap input {
  padding-left: 24px;
  padding-right: 32px;
}

.username-prefix {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #525252;
  font-size: 14px;
  pointer-events: none;
}

.username-status {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: #525252;
}
.username-status.checking { color: #737373; }
.username-status.free { color: #10b981; }
.username-status.taken { color: #f87171; }

.profile-toggle {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  background: #0a0a0a;
  cursor: pointer;
}
.profile-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: #10b981;
}
.profile-toggle span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.profile-toggle strong {
  font-size: 13px;
  color: #f5f5f5;
}
.profile-toggle em {
  color: #737373;
  font-size: 11px;
  font-style: normal;
  line-height: 1.4;
}
.profile-toggle input:disabled + span strong { color: #525252; }

.profile-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Per-build public/private toggle on ShipCard */

.ship-public-toggle {
  background: transparent;
  border: 1px solid #1f1f1f;
  color: #525252;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  padding: 0;
}
.ship-public-toggle:hover:not(:disabled) {
  color: #d5d5d5;
  border-color: #2a2a2a;
}
.ship-public-toggle.on {
  color: #10b981;
  border-color: color-mix(in srgb, #10b981, transparent 70%);
  background: color-mix(in srgb, #10b981, transparent 92%);
}
.ship-public-toggle:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------------- */
/* First-run profile setup                                                */
/* ---------------------------------------------------------------------- */

.profile-setup {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 40px;
}

.profile-setup-inner {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.profile-setup-logo {
  margin-bottom: 4px;
}

.profile-setup-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
}

.profile-setup-sub {
  margin: 0 0 16px;
  text-align: center;
  font-size: 13px;
  max-width: 320px;
}

.profile-setup-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-setup-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 4px 0 6px;
}

.profile-setup-avatar {
  width: 96px;
  height: 96px;
}

.profile-setup-avatar-hint {
  font-size: 11px;
  color: #737373;
}

.field-optional {
  color: #525252;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}

.profile-setup-signout {
  align-self: center;
  margin-top: 6px;
}

@media (max-width: 600px) {
  .profile-setup {
    padding: 28px 16px 28px;
  }
}

/* ---------------------------------------------------------------------- */
/* Public profile (/u/:username)                                          */
/* ---------------------------------------------------------------------- */

.public-profile {
  width: min(960px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.public-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid #1f1f1f;
}

.public-profile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f5f5f5;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.public-profile-card {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  background: #101010;
}

.public-profile-info {
  flex: 1;
  min-width: 0;
}

.public-profile-info h1 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.15;
  word-break: break-word;
}

.public-profile-handle {
  margin: 0 0 10px;
  color: #737373;
  font-size: 14px;
}

.public-profile-bio {
  margin: 0 0 10px;
  color: #d5d5d5;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.public-profile-stat {
  margin: 0;
  color: #737373;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.public-profile-stat strong {
  color: #10b981;
  font-weight: 600;
}

.public-profile-loading,
.public-profile-missing {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}
.public-profile-missing h1 {
  margin: 0;
  font-size: 22px;
}
.public-profile-missing code {
  color: #f5f5f5;
}

.public-profile-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid #1f1f1f;
  text-align: center;
}
.public-profile-footer a {
  color: #525252;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.public-profile-footer a strong {
  color: #d5d5d5;
  font-weight: 500;
}
.public-profile-footer a:hover { color: #d5d5d5; }

/* Profile responsive tweaks */

@media (max-width: 600px) {
  .profile-header {
    flex-wrap: wrap;
  }
  .profile-edit {
    margin-left: auto;
  }
  .profile-editor-top {
    flex-direction: column;
    align-items: center;
  }
  .profile-editor-fields {
    width: 100%;
  }
  .public-profile-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   DESKTOP CHASSIS — left sidebar + main content rail.
   Layered on top of the mobile-first base. On <760px viewports this
   whole block is inert; mobile keeps its existing top app-bar +
   bottom-fixed nav.
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 760px) {
  /* .app becomes the flex shell. The old centered 960px container goes
     away — sidebar + main now own the whole viewport width. */
  .app {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 100vh;
  }

  /* The in-flow top app-bar and the horizontal nav are obsolete on
     desktop — the sidebar carries both brand and navigation. Hide them
     inside .app-main; mobile is unaffected because mobile already hides
     the header and shows the nav as the bottom-fixed dock. */
  .app-main > .header,
  .app-main > .nav {
    display: none;
  }

  /* Main content rail. Pages set their own max-width where they want
     to (Port at 1040, Plan at 920, etc.) — this just provides the
     desktop padding and the column-fill behavior. */
  .app-main {
    flex: 1;
    min-width: 0;
    padding: 40px 64px 64px;
  }

  /* ── Sidebar ─────────────────────────────────────────────────────── */
  .sidebar {
    display: flex;
    flex-direction: column;
    flex: 0 0 240px;
    background: #0b0b0b;
    border-right: 1px solid #1f1f1f;
    padding: 22px 14px 18px;
    gap: 22px;
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
    box-sizing: border-box;
  }
  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 8px 0;
  }
  .sidebar-brand-name {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 15px;
    font-weight: 700;
    color: #f5f5f5;
    letter-spacing: -0.015em;
  }
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  /* Nav item — used for both main items and the "more" recaps row. */
  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #737373;
    cursor: pointer;
    position: relative;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
  }
  .sidebar-item:hover {
    color: #d4d4d4;
  }
  .sidebar-item.active {
    background: #161616;
    border-color: #1f1f1f;
    color: #f5f5f5;
  }
  .sidebar-rail {
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: #10b981;
    border-radius: 3px;
  }
  .sidebar-label {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 13px;
    flex: 1;
    letter-spacing: -0.01em;
  }
  .sidebar-count {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 10px;
    color: #525252;
    font-variant-numeric: tabular-nums;
  }
  .sidebar-item-secondary {
    padding: 8px 12px;
  }
  .sidebar-item-secondary .sidebar-label {
    font-size: 12.5px;
  }
  .sidebar-bullet {
    width: 14px;
    display: inline-flex;
    justify-content: center;
    color: #525252;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 10px;
  }
  .sidebar-badge {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 9px;
    font-weight: 600;
    color: #f59e0b;
    background: color-mix(in oklab, #f59e0b 13%, transparent);
    border-radius: 99px;
    padding: 2px 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Week-dots block sits below main nav, before "more". */
  .sidebar-week {
    padding: 14px 12px;
    border: 1px solid #1f1f1f;
    border-radius: 10px;
    background: #101010;
    display: flex;
    justify-content: center;
  }
  .sidebar-week .week-dots {
    padding: 0;
    margin: 0;
    gap: 10px;
    justify-content: center;
    width: 100%;
  }

  .sidebar-spacer { flex: 1; }

  /* User chip at the sidebar's foot — avatar + display name + handle. */
  .sidebar-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #1f1f1f;
    background: #101010;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
  }
  .sidebar-user-chip:hover {
    border-color: #262626;
    background: #161616;
  }
  .sidebar-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: oklch(0.55 0.13 200);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: ui-monospace, Menlo, monospace;
    font-weight: 700;
    font-size: 13px;
    flex: 0 0 auto;
  }
  .sidebar-user-info {
    flex: 1;
    min-width: 0;
    line-height: 1.15;
  }
  .sidebar-user-name {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 12.5px;
    font-weight: 600;
    color: #f5f5f5;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sidebar-user-handle {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 10.5px;
    color: #525252;
    margin-top: 1px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   PORT PROFILE CARD — unified identity + stats card.
   Mobile-first: works at any width. Desktop bumps padding, type sizes,
   and the big number scale. Replaces the legacy ProfileHeader + Metric
   grid + WeekDots stack at the top of Port.
   ═══════════════════════════════════════════════════════════════════ */
.port-card {
  position: relative;
  background: #101010;
  border: 1px solid #1f1f1f;
  border-radius: 16px;
  padding: 20px 22px 22px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}

.port-card-identity {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.port-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.port-card-name {
  margin: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 19px;
  font-weight: 700;
  color: #f5f5f5;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.port-card-handle {
  margin: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12.5px;
  color: #737373;
}
.port-card-bio {
  margin: 6px 0 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  color: #d4d4d4;
  line-height: 1.5;
}
.port-card-public,
.port-card-private {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #737373;
  text-decoration: none;
  width: max-content;
}
.port-card-public { color: #10b981; }
.port-card-public:hover { color: #34d399; }

/* ⋯ menu in the top-right of the identity row. */
.port-card-actions {
  position: relative;
  flex: 0 0 auto;
  align-self: flex-start;
}
/* "weeks ↗" lives inside the streak stat's body row now — pushed to
   the right with margin-left:auto so it baseline-aligns with the
   streak number/bars. No more floating-in-empty-padding. */
.port-stat-body .port-card-weeks {
  margin-left: auto;
  align-self: flex-end;
  margin-bottom: 4px;
}
.port-card-weeks {
  background: transparent;
  border: none;
  padding: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s;
}
.port-card-weeks:hover { color: #10b981; }
/* Desktop weeks link lives in the profile card; on mobile it relocates
   to the WeekDots row, so hide the in-card one when the mobile-extras
   block is visible. */
@media (max-width: 759px) {
  .port-card-weeks-desktop { display: none; }
}
.port-card-more {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #1f1f1f;
  background: transparent;
  color: #737373;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.port-card-more:hover {
  border-color: #2a2a2a;
  color: #d4d4d4;
}
.port-card-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #161616;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  padding: 4px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 5;
}
.port-card-menu button {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: transparent;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  color: #f5f5f5;
  cursor: pointer;
  text-align: left;
}
.port-card-menu button:hover {
  background: rgba(255,255,255,0.05);
}

.port-card-divider {
  height: 1px;
  background: #1f1f1f;
  margin: 20px 0 18px;
}

/* Stats — eyebrow + sub-stat on the same line, big number below. */
.port-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.port-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.port-stat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-height: 14px;
}
.port-stat-eyebrow {
  font-size: 10px;
  font-weight: 600;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.port-stat-sub {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #525252;
  font-variant-numeric: tabular-nums;
}
.port-stat-body {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.port-stat-number {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 44px;
  font-weight: 700;
  color: #525252;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.port-stat-number.tone-green {
  color: #10b981;
}
/* Streak bars — cycle 1→7 then reset; intensity comes from inline
   `background`/`opacity`/`boxShadow` set in the JSX (per tier). */
.port-stat-bars {
  display: flex;
  gap: 3px;
  align-self: center;
}
.port-stat-bar {
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: #10b981;
  flex-shrink: 0;
}

/* Port-page wrapper helps target the section for mobile-only extras. */
.port-page { display: flex; flex-direction: column; }
.port-mobile-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

/* Desktop bump — bigger numbers, more breathing room. */
@media (min-width: 760px) {
  .port-card {
    padding: 24px 28px 26px;
    margin-bottom: 32px;
  }
  .port-card-identity { gap: 20px; }
  .port-card-name { font-size: 22px; }
  .port-card-handle { font-size: 13px; }
  .port-card-bio { font-size: 13.5px; max-width: 520px; }
  .port-card-divider { margin: 26px 0 24px; }
  .port-card-stats { gap: 32px; }
  /* Big hero numbers clamp with the viewport so narrow laptops (~1024px
     minus the 240px sidebar = 656px usable) don't get two 64px digits
     fighting the layout. */
  .port-stat-number { font-size: clamp(48px, 5.2vw, 64px); }
  .port-stat-bar { width: 4px; height: 18px; }
  /* Sidebar carries WeekDots + recaps on desktop — Port doesn't need them. */
  .port-mobile-extras { display: none; }
  /* Constrain the Port content rail to the design canvas spec. */
  .port-page { max-width: 1040px; margin: 0 auto; width: 100%; }
}

/* ── 3-column ship grid on desktop ──────────────────────────────── */
@media (min-width: 760px) {
  .ship-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Slightly more breathing room inside ship cards for the new layout. */
.ship-card {
  min-height: 160px;
}

/* ═══════════════════════════════════════════════════════════════════
   FOCUS CARD — refreshed for the new desktop. Quiet corner day stamp
   replaces the old above-the-card focus-strip; ship button isolated
   to the right of a spacer; tasks list stays as-is.
   ═══════════════════════════════════════════════════════════════════ */
.focus-card-active {
  position: relative;
  /* Subtle blue tint — this is the *active* build, distinguished from
     the surface tone elsewhere. Border + a very faint outer halo. */
  border-color: color-mix(in oklab, #3b82f6 28%, #1f1f1f);
  box-shadow: 0 0 0 1px color-mix(in oklab, #3b82f6 10%, transparent);
}
.focus-day-stamp {
  position: absolute;
  top: 18px;
  right: 20px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #525252;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  z-index: 1;
  pointer-events: none;
}
/* Make room for the day stamp on the identity row. */
.focus-card-active .card-top { padding-right: 92px; }

/* Big green ship button. Isolated to the right by a flex spacer so it
   reads as the primary action even with two ghost buttons on the left. */
.focus-card-active .ship-launch {
  background: #10b981 !important;
  color: #062c20 !important;
  border-color: #10b981 !important;
  width: 52px;
  height: 44px;
  padding: 0;
  border-radius: 10px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.focus-card-active .ship-launch:hover {
  filter: brightness(1.05);
}

/* ═══════════════════════════════════════════════════════════════════
   MOTION TOGGLE — the entry point. Collapsed bottom-right pill that
   opens the MotionSection inline below it. The main build above
   stays visually dominant; motion is supporting context, on demand.
   ═══════════════════════════════════════════════════════════════════ */
.motion-toggle {
  margin-top: 24px;
}
.motion-toggle-row {
  display: flex;
  justify-content: flex-end;
}
.motion-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 99px;
  background: #101010;
  border: 1px solid #1f1f1f;
  color: #737373;
  cursor: pointer;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.motion-pill:hover {
  border-color: #2a2a2a;
  color: #d4d4d4;
}
.motion-toggle.open .motion-pill {
  background: #161616;
  border-color: #2a2a2a;
  color: #f5f5f5;
}
.motion-pill-label {
  text-transform: lowercase;
}
/* Count stands alone (the "motion" word is hidden when items exist), so we
   render it as plain text — no badge fill or border — matching the design
   canvas's floating "3 ⌄" treatment. */
.motion-pill-count {
  font-family: ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: inherit;
}
.motion-toggle.open .motion-pill-count {
  color: #10b981;
}
.motion-pill-chev {
  transition: transform 0.18s ease;
}
.motion-toggle.open .motion-pill-chev {
  transform: rotate(180deg);
}
.motion-toggle-body {
  margin-top: 14px;
}
/* MotionSection lives inside the toggle body now — kill its own top margin
   since the toggle adds its own. */
.motion-toggle-body .motion-section {
  margin-top: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   DUMP CAPTURE BAR — visual chrome (+ icon, ⌘K hint) around the
   existing growing textarea so capture reads as an intentional
   surface, not a placeholder text field. Mobile composer mode is
   unchanged (the .app.capturing rules still expand the textarea).
   ═══════════════════════════════════════════════════════════════════ */
.dump-capture-wrap {
  background: #101010;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 26px 24px;
  min-height: 88px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color 0.18s;
}
.dump-capture-wrap:focus-within {
  border-color: #3a3a3a;
}
.dump-capture-text {
  /* Override the global input/textarea border + bg so the textarea
     blends seamlessly into the outer .dump-capture-wrap pill — no
     nested rectangle inside the rectangle. */
  border: none;
  background: transparent;
  padding: 0;
  color: #d4d4d4;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
  font-style: italic;
}
.dump-capture-text:focus,
.dump-capture-text:not(:placeholder-shown) {
  font-style: normal;
}
.dump-capture-text::placeholder {
  color: #525252;
}
.dump-capture-kbd {
  flex: 0 0 auto;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
  color: #3a3a3a;
  border: 1px solid #1f1f1f;
  border-radius: 4px;
  padding: 3px 6px;
  align-self: flex-start;
}
@media (max-width: 600px) {
  /* Mobile: kbd hint takes up space without earning its keep — hide it.
     (+ glyph is now removed on all viewports — see JSX.) */
  .dump-capture-kbd { display: none; }
  .dump-capture-wrap {
    min-height: 0;
    padding: 14px 16px;
    align-items: center;
    gap: 12px;
  }
}

/* Content rails — each page sits in a calm centered column on desktop
   so the layout doesn't stretch edge-to-edge. Plan is a touch wider
   because it's a 2-col grid; everything else gets the same 720px lane
   as Dump to match the design canvas. */
@media (min-width: 760px) {
  .dump-page { max-width: 720px; margin: 0 auto; width: 100%; }
  .focus,
  .learning-prompt,
  .motion-toggle { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
  .recaps-page { max-width: 680px; margin: 0 auto; width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════
   PLAN — 2-col grid on desktop, single column on mobile.
   Mobile keeps the top "Add build" button; desktop hides it and uses
   the dashed empty slot at the grid's end as the primary affordance.
   ═══════════════════════════════════════════════════════════════════ */
.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}
.plan-empty-slot {
  background: transparent;
  border: 1px dashed #2a2a2a;
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #525252;
  cursor: pointer;
  font-family: inherit;
  min-height: 140px;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.plan-empty-slot:hover {
  border-color: #3a3a3a;
  color: #d4d4d4;
  background: rgba(255,255,255,0.02);
}
.plan-empty-slot span {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
}
/* Sub-caption shown inside the slot only when the plan is otherwise empty —
   gives a new user a hint about the two paths in (promote from Dump or
   start fresh) without adding a separate hint row below the grid. */
.plan-empty-slot-sub {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #525252;
  text-align: center;
  max-width: 280px;
  margin-top: 4px;
  line-height: 1.45;
}

@media (min-width: 760px) {
  .plan-page { max-width: 920px; margin: 0 auto; width: 100%; }
  .plan-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   THIS WEEK — EMPTY STATE (hero)
   When there's no main build yet, treat the screen as a destination,
   not a void. Amber week chip → big "no focus set." headline → three
   action cards (from plan / from dump / fresh build). The primary
   card is whichever path is closest to landing a focus fast.
   ═══════════════════════════════════════════════════════════════════ */
.this-week-empty {
  padding: 24px 0 8px;
}
.this-week-empty-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 5px 12px;
  border-radius: 99px;
  background: color-mix(in oklab, #f59e0b 13%, transparent);
  color: #f59e0b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.this-week-empty-chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f59e0b;
  flex: 0 0 auto;
}
.this-week-empty-headline {
  margin: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  font-size: clamp(36px, 7vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: #f5f5f5;
}
.this-week-empty-sub {
  margin: 18px 0 36px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 15px;
  color: #737373;
  max-width: 540px;
  line-height: 1.55;
}

.this-week-empty-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.this-week-action-card {
  background: #101010;
  border: 1px solid #1f1f1f;
  border-radius: 14px;
  padding: 20px 18px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  font-family: inherit;
  color: #f5f5f5;
  min-height: 140px;
  transition: border-color 0.18s, background 0.18s;
}
.this-week-action-card:hover {
  border-color: #2a2a2a;
}
.this-week-action-card.primary {
  background: #161616;
  border-color: #2a2a2a;
}
.this-week-action-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.this-week-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #0c0c0c;
  border: 1px solid #1f1f1f;
  color: #f5f5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.this-week-action-count {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #525252;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 99px;
  padding: 3px 9px;
  font-variant-numeric: tabular-nums;
}
.this-week-action-spacer { flex: 1; }
.this-week-action-body h3 {
  margin: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 18px;
  font-weight: 700;
  color: #f5f5f5;
  letter-spacing: -0.02em;
}
.this-week-action-body p {
  margin: 6px 0 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  color: #737373;
  line-height: 1.45;
}
.this-week-action-foot {
  display: flex;
  justify-content: flex-end;
  color: #525252;
}
.this-week-action-card.primary .this-week-action-foot {
  color: #10b981;
}

@media (min-width: 760px) {
  .this-week-empty { padding: 48px 0 16px; }
  .this-week-empty-headline { font-size: clamp(40px, 6vw, 64px); }
  .this-week-empty-sub { font-size: 17px; }
  .this-week-empty-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .this-week-action-card { padding: 24px 20px 20px; min-height: 200px; }
  .this-week-action-body h3 { font-size: 20px; }
}

/* ═══════════════════════════════════════════════════════════════════
   RECAPS — 2-col grid layout (80px eyebrow column + content column).
   Cleaner alignment than the flex-stacked block layout it replaces.
   ═══════════════════════════════════════════════════════════════════ */
.recap-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 4px;
}
.recap-range {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #525252;
}
.recap-grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 6px 14px;
  row-gap: 12px;
  align-items: baseline;
  margin-top: 8px;
}
/* Inside the grid, the labels lose their bottom-margin (the grid row-gap
   handles vertical rhythm). */
.recap-grid .recap-label {
  margin: 0;
  align-self: baseline;
  padding-top: 2px;
}
.recap-learning-cell {
  min-width: 0;
}

/* Tighter content rail on desktop — recaps are intimate, not sprawling. */
@media (min-width: 760px) {
  .recaps-page { max-width: 680px; margin: 0 auto; width: 100%; }
}

/* Mobile shrinks the eyebrow column so longer lines (e.g. main build
   names + outcome label) still have room. */
@media (max-width: 480px) {
  .recap-grid {
    grid-template-columns: 60px 1fr;
    gap: 6px 10px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   BUILD EDITOR — restyled to match the design canvas. Used in all
   contexts (promote-from-Dump on desktop, edit-build everywhere).
   No field labels — placeholders carry meaning. Letter tile next to
   the title input. Checkpoints in a hairlined container.
   ═══════════════════════════════════════════════════════════════════ */
.build-editor {
  width: min(620px, 100%);
  padding: 28px 32px 22px;
  gap: 22px;
  border-radius: 16px;
  border-color: #2a2a2a;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.editor-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.editor-name {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  border-bottom: 1px solid #1f1f1f;
  color: #f5f5f5;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  padding: 8px 0 10px;
  border-radius: 0;
  transition: border-color 0.18s;
}
.editor-name:focus {
  border-bottom-color: #2a2a2a;
}
.editor-name::placeholder {
  color: #525252;
  font-weight: 700;
}

.editor-purpose {
  background: #0c0c0c;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  padding: 14px 16px;
  color: #d4d4d4;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
  resize: none;
  transition: border-color 0.18s;
}
.editor-purpose:focus {
  border-color: #2a2a2a;
}
.editor-purpose::placeholder {
  color: #525252;
}

/* Checkpoints — hairlined container with rows. */
.editor-checkpoints-wrap {
  display: grid;
  gap: 10px;
}
.editor-checkpoints-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px;
}
.editor-eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.editor-eyebrow-count {
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 400;
  color: #525252;
  text-transform: none;
  letter-spacing: 0;
}
.editor-eyebrow-hint {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #3a3a3a;
  font-style: italic;
}
.editor-checkpoints {
  background: #0c0c0c;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  overflow: hidden;
}
.editor-checkpoint-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid #1f1f1f;
}
.editor-checkpoint-box {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1.5px solid #2e2e2e;
  flex: 0 0 auto;
  background: transparent;
}
.editor-checkpoint-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #d4d4d4;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
  padding: 0;
}
.editor-checkpoint-row input::placeholder {
  color: #525252;
}
.editor-checkpoint-remove {
  background: transparent;
  border: none;
  color: #3a3a3a;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  flex: 0 0 auto;
}
.editor-checkpoint-row:hover .editor-checkpoint-remove,
.editor-checkpoint-remove:focus-visible {
  opacity: 1;
}
.editor-checkpoint-remove:hover {
  color: #f87171;
}
@media (hover: none) {
  .editor-checkpoint-remove { opacity: 0.55; }
}
.editor-checkpoint-add {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  color: #525252;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s;
}
.editor-checkpoint-add:hover {
  color: #d4d4d4;
}
.editor-checkpoint-add-box {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px dashed #3a3a3a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3a3a3a;
  flex: 0 0 auto;
}

/* More-details pill chip — right-aligned, chevron-down rotates open. */
.editor-more-row {
  display: flex;
  justify-content: flex-end;
}
.editor-more-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 99px;
  background: #0c0c0c;
  border: 1px solid #1f1f1f;
  color: #737373;
  cursor: pointer;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  transition: color 0.15s, border-color 0.15s;
}
.editor-more-chip:hover {
  color: #d4d4d4;
  border-color: #2a2a2a;
}
.editor-more-chev {
  transition: transform 0.18s;
}
.editor-more-chev.open {
  transform: rotate(180deg);
}

/* Tighten the modal-actions footer with the new editor styles. */
.build-editor .modal-actions {
  padding-top: 18px;
  margin-top: -2px;
  border-top: 1px solid #1f1f1f;
}

/* ═══════════════════════════════════════════════════════════════════
   SHIP CARD — restyled to match the design canvas. Clean head row
   (logo + name), optional green span chip, spacer, foot row with
   date range + ⋯ menu. Stripped: no purpose paragraph (lives in
   editor), no public-toggle button (now in the menu as "Share link").
   ═══════════════════════════════════════════════════════════════════ */
.ship-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  min-height: 180px;
}
.ship-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding-right: 32px; /* keep clear of the #N corner stamp */
}
.ship-card-name {
  margin: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 16px;
  font-weight: 700;
  color: #f5f5f5;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ship-card-spacer { flex: 1; }
.ship-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.ship-card-date-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ship-card-date {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  color: #737373;
}
/* "sat Nd in plan" sub-line under the date range. Quieter than the date
   itself so it reads as metadata, not a primary stat. */
.ship-card-plantime {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  color: #525252;
  font-variant-numeric: tabular-nums;
}
.ship-card-more {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  margin-right: -6px;
}
/* Override the old .ship-card-top / .ship-card-top-right rules — they're
   no longer rendered, but harmless. */

/* Retro section inside the card stays styled by the existing .ship-retro
   rules in the original block. */

/* Menu-trigger buttons (the ⋯ that opens a card's menu) — borderless,
   compact, faint. Targeted by aria-label so all three card types (idea
   row, build card, ship card) get the same treatment without each
   needing a new className. */
.icon-button[aria-label="More actions"] {
  border: none;
  background: transparent;
  min-height: 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #525252;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.icon-button[aria-label="More actions"]:hover {
  color: #d4d4d4;
  background: rgba(255, 255, 255, 0.04);
}

/* ═══════════════════════════════════════════════════════════════════
   BUILD CARD — quiet "N/M checkpoints" text on Plan + chev-right start
   button. No progress bar; the count is a glance, not a meter.
   ═══════════════════════════════════════════════════════════════════ */
.cp-summary-text {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #737373;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 0;
}
.cp-summary-text.all-done {
  color: #10b981;
}
.actions-spacer {
  flex: 1;
}

/* Chev-right start button — borderless, faint blue, hover/active states. */
.card-start {
  background: transparent;
  border: none;
  color: #60a5fa;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.card-start:hover:not(:disabled) {
  background: rgba(96, 165, 250, 0.08);
  color: #93c5fd;
}
.card-start:disabled {
  color: #2a2a2a;
  cursor: default;
}

/* ═══════════════════════════════════════════════════════════════════
   IDEA ROW — promote chev-right (replaces the gold "Plan" button)
   ═══════════════════════════════════════════════════════════════════ */
.idea-plan-action {
  background: transparent;
  border: none;
  color: #f59e0b;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: background 0.15s, color 0.15s;
}
.idea-plan-action:hover:not(:disabled) {
  background: color-mix(in oklab, #f59e0b 8%, transparent);
  color: #fbbf24;
}
.idea-plan-action:disabled {
  color: #2a2a2a;
  cursor: default;
}

/* ═══════════════════════════════════════════════════════════════════
   SHIPS FEED — recent public ships across all profiles. Author row +
   follow toggle on top, the shipped build below.
   ═══════════════════════════════════════════════════════════════════ */
.feed-title {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: #f5f5f5;
}
.feed-sub { margin: 4px 0 20px; font-size: 13px; }
.feed-loading { padding: 24px 0; }
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feed-card {
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  background: #101010;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feed-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.feed-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.feed-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.feed-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: oklch(0.5 0.13 200);
  color: #fff;
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  font-size: 14px;
}
.feed-author-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.feed-author-name {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
  font-weight: 700;
  color: #f5f5f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-author-handle { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: #525252; }
.feed-author:hover .feed-author-name { color: #10b981; }
.feed-follow {
  flex: 0 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid #10b981;
  background: #10b981;
  color: #062c20;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.feed-follow:hover { filter: brightness(1.05); }
.feed-follow.following {
  background: transparent;
  color: #737373;
  border-color: #2a2a2a;
}
.feed-follow.following:hover { color: #f87171; border-color: #3f1a1a; }
.feed-follow:disabled { opacity: 0.5; cursor: default; }
.feed-card-body {
  display: flex;
  align-items: center;
  gap: 12px;
}
.feed-build { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.feed-build-name {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 15px;
  font-weight: 700;
  color: #f5f5f5;
}
.feed-build-date {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.feed-visit {
  flex: 0 0 auto;
  color: #737373;
  display: inline-flex;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.feed-visit:hover { color: #d4d4d4; background: rgba(255,255,255,0.04); }

@media (min-width: 760px) {
  .feed-page { max-width: 720px; margin: 0 auto; width: 100%; }
}
