* {
  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;
}

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

.app {
  width: min(960px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

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

.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;
}

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

.metric strong {
  display: block;
  color: #d4d4d4;
  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 {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 18px 0 28px;
}

.nav button {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-bottom-color: #262626;
  background: transparent;
  color: #737373;
  cursor: pointer;
  padding: 10px 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
}

.nav button.active {
  border-color: #f5f5f5;
  color: #f5f5f5;
  border-radius: 6px;
}

.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-text-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f5f5f5;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  padding: 0;
}
.idea-text-input::placeholder { color: #555; }

.idea-text {
  cursor: text;
}

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

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

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

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

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

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

.idea-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.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;
}

.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); }
}

.toast-update {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 16px;
}
.toast-update button {
  background: #f5f5f5;
  color: #0a0a0a;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.toast-update button:hover { background: #ffffff; }

.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,
.missing {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-left: 2px solid #f59e0b;
  border-radius: 4px;
  background: #f59e0b0d;
  color: #fbbf24;
  font-size: 12px;
}

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

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

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

.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: 8px;
  margin-bottom: 16px;
}

.task {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #1f1f1f;
  border-radius: 6px;
  background: #0d0d0d;
  color: #a3a3a3;
  cursor: pointer;
  padding: 11px;
  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;
}

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

.ship-card {
  position: relative;
  min-height: 260px;
}

.ship-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
}

.ship-logo img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.ship-number {
  position: absolute;
  top: 18px;
  right: 18px;
  color: #333;
  font-size: 22px;
  font-weight: 700;
}

.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;
}

.logo-preview {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
  border: 1px solid #262626;
}

.logo-inputs {
  display: flex;
  gap: 8px;
}

.logo-inputs input {
  flex: 1;
}

.upload-btn {
  flex-shrink: 0;
  cursor: pointer;
  white-space: nowrap;
}

.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: 10px;
  height: 10px;
  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;
}

.week-dot.today span {
  color: #737373;
}

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

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

.folder-filter > button,
.folder-chip > button {
  background: #111;
  border: 1px solid #2a2a2a;
  color: #888;
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.folder-filter > button {
  border-radius: 4px;
}

.folder-chip {
  display: inline-flex;
  align-items: stretch;
  border-radius: 4px;
  overflow: hidden;
}

.folder-chip > button {
  border-radius: 4px 0 0 4px;
  border-right: none;
}

.folder-chip-icon {
  background: #111;
  border: 1px solid #2a2a2a;
  border-left: none;
  color: #555;
  font-size: 11px;
  padding: 4px 6px;
  cursor: pointer;
  line-height: 1;
}

.folder-chip-icon:last-child {
  border-radius: 0 4px 4px 0;
}

.folder-chip-icon:hover {
  color: #f5f5f5;
  border-color: #444;
}

.folder-chip-x:hover {
  color: #ef4444;
}

.braindump-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.braindump-search {
  flex: 1;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  color: #f5f5f5;
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
}

.braindump-search:focus {
  border-color: #444;
}

.braindump-controls select {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  color: #f5f5f5;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
}

.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-size: 10px;
  color: #555;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
}

.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: 16px;
  padding: 32px 16px;
  text-align: center;
}

.auth-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  margin: 0;
}

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

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

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

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

@media (max-width: 600px) {
  .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;
  }
}
