/* Dark theme shared styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  line-height: 1.5;
  padding: 0;
  max-width: 100%;
  margin: 0 auto;
  -webkit-text-size-adjust: 100%;
}
a { color: #64b5f6; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.nav {
  background: #141414;
  border-bottom: 1px solid #2a2a2a;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.nav a {
  display: inline-block;
  padding: 6px 12px;
  margin-right: 4px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #888;
}
.nav a:hover { background: #1a1a1a; color: #e0e0e0; text-decoration: none; }
.nav a.active { background: #1e3a5f; color: #64b5f6; }

/* Container */
.container { padding: 12px; max-width: 900px; margin: 0 auto; }

/* Headings */
h1 { font-size: 1.3rem; margin-bottom: 4px; color: #fff; }
.subtitle { font-size: 0.8rem; color: #888; margin-bottom: 16px; }
h2 { font-size: 1.05rem; color: #fff; margin: 20px 0 10px; font-weight: 600; }
h3 { font-size: 0.95rem; color: #ccc; margin: 16px 0 8px; font-weight: 500; }

/* Summary bar */
.summary-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.summary-pill {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 80px;
  text-align: center;
  flex-shrink: 0;
}
.summary-number { font-size: 1.2rem; font-weight: 700; color: #fff; }
.summary-label { font-size: 0.65rem; color: #888; text-transform: uppercase; }

/* Phase / Card */
.phase, .card {
  background: #141414;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid #222;
}
.phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}
.phase-title { font-size: 0.95rem; font-weight: 600; color: #fff; }
.progress-bar {
  width: 80px;
  height: 6px;
  background: #333;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill { height: 100%; border-radius: 3px; }
.progress-text { font-size: 0.75rem; color: #888; margin-left: 8px; }

/* Tasks */
.task {
  display: flex;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #1f1f1f;
}
.task:last-child { border-bottom: none; }
.task-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #444;
  margin-right: 10px;
  margin-top: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
}
.task-checkbox.done { background: #1a3a1a; border-color: #4caf50; color: #4caf50; }
.task-content { flex: 1; }
.task-title { font-size: 0.9rem; color: #e0e0e0; }
.task-desc { font-size: 0.78rem; color: #999; margin-top: 2px; }
.task-meta { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.tag {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}
.tag-randy { background: #1e3a5f; color: #64b5f6; }
.tag-ira { background: #5f1e3a; color: #f06292; }
.tag-fami { background: #3a5f1e; color: #a5d6a7; }
.tag-waiting { background: #4a3b00; color: #ffd54f; }
.tag-progress { background: #003a4a; color: #4fc3f7; }
.tag-done { background: #1a3a1a; color: #81c784; }
.tag-blocked { background: #3a0000; color: #ef5350; }
.tag-urgent { background: #4a0000; color: #ff5252; }
.tag-category { background: #2a2a2a; color: #aaa; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 0.85rem; }
th { text-align: left; padding: 8px; color: #888; font-weight: 500; border-bottom: 1px solid #2a2a2a; }
td { padding: 8px; border-bottom: 1px solid #1a1a1a; vertical-align: top; }
td:first-child { color: #ccc; }

/* Lists */
ul { padding-left: 20px; margin: 8px 0; }
li { margin-bottom: 4px; font-size: 0.85rem; color: #ccc; }

/* Links / Resources */
.resource-item {
  padding: 10px 0;
  border-bottom: 1px solid #1f1f1f;
}
.resource-name { font-weight: 500; color: #e0e0e0; font-size: 0.9rem; }
.resource-detail { font-size: 0.78rem; color: #999; margin-top: 2px; }
.resource-link { font-size: 0.78rem; color: #64b5f6; }

/* Letter block */
.letter-block {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 14px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #ccc;
  margin: 10px 0;
}
.letter-block p { margin-bottom: 8px; }
.letter-block strong { color: #e0e0e0; }

/* Updated timestamp */
.updated { font-size: 0.75rem; color: #555; text-align: center; margin-top: 24px; padding-bottom: 20px; }

/* Mobile */
@media (max-width: 480px) {
  .container { padding: 8px; }
  .phase, .card { padding: 12px; }
  .phase-header { flex-wrap: wrap; gap: 6px; }
  .progress-bar { width: 60px; }
  .task-title { font-size: 0.85rem; }
  .tag { font-size: 0.65rem; padding: 1px 6px; }
  .summary-pill { min-width: 70px; padding: 6px 8px; }
  .summary-number { font-size: 1rem; }
  .nav a { padding: 5px 10px; font-size: 0.8rem; }
  h1 { font-size: 1.15rem; }
  h2 { font-size: 0.95rem; }
}
