:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --accent: #58a6ff;
  --accent-today: #f0883e;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --text-bright: #f0f6fc;
  --success: #3fb950;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header / Nav ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
}
header h1 { color: var(--text-bright); font-size: 1.8rem; }
header .subtitle { color: var(--text-muted); font-size: 0.95rem; margin-top: 0.25rem; }
nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
nav a { color: var(--accent); font-size: 0.9rem; }
.day-title { color: var(--text-bright); font-weight: 600; font-size: 1rem; flex: 1; text-align: center; }

/* ── Mantra quote ── */
.mantra-text {
  margin-top: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-left: 4px solid var(--accent);
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: rgba(88, 166, 255, 0.05);
  border-radius: 0 6px 6px 0;
  word-break: break-all;
}

/* ── Today banner ── */
.today-banner {
  margin: 1.5rem 2rem 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(240, 136, 62, 0.1);
  border: 1px solid var(--accent-today);
  border-radius: 8px;
  font-size: 1rem;
}
.today-link { color: var(--accent-today); font-weight: 600; font-size: 1.05rem; }

/* ── Days grid ── */
.days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  padding: 1rem 2rem 3rem;
}
.day-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.day-link:hover {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.07);
  text-decoration: none;
}
.day-link.today {
  border-color: var(--accent-today);
  background: rgba(240, 136, 62, 0.1);
}
.day-num { color: var(--text-bright); font-weight: 600; font-size: 0.95rem; }
.day-date { color: var(--text-muted); font-size: 0.75rem; margin-top: 0.2rem; }

/* ── Day page ── */
main { padding: 2rem; max-width: 1100px; margin: 0 auto; }
main h1 { font-size: 2.2rem; color: var(--text-bright); margin-bottom: 0.25rem; }
main h2 { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1rem; }
.mantra-meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }

/* ── Progress bar ── */
.progress {
  margin: 1.25rem 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--success);
}

/* ── Mantra output ── */
.mantra-output {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  white-space: pre;
  overflow: auto;
  max-height: 70vh;
  word-break: break-all;
}

/* ── Binary view ── */
.binary-details {
  margin-top: 0.75rem;
}
.binary-details summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}
.binary-details summary::before {
  content: '▶';
  font-size: 0.65rem;
  transition: transform 0.15s;
}
.binary-details[open] summary::before {
  transform: rotate(90deg);
}
.binary-details summary:hover { color: var(--text); }
.binary-view {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  word-break: break-all;
  white-space: normal;
}
.binary-note {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}
