/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #F7F7F5;
  --surface:   #FFFFFF;
  --border:    #E8E8E4;
  --text-1:    #111110;
  --text-2:    #6B6B67;
  --text-3:    #A8A8A4;
  --accent:    #111110;
  --accent-2:  #4A6741;
  --featured:  #F0EDE6;
  --dot-green: #3D7A4F;
  --dot-amber: #C08A2A;
  --dot-red:   #B84040;
  --dot-grey:  #BBBBBB;
  --radius:    14px;
  --radius-sm: 8px;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-weight: 400;
  min-height: 100vh;
  padding-bottom: 4rem;
}

a { text-decoration: none; color: inherit; }

/* ─── TOPBAR ─── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--text-1);
}
.logo-dot { color: var(--accent-2); }

.mission-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
}

.clock {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* ─── HERO ─── */
.hero {
  padding: 3.5rem 2rem 2rem;
  max-width: 720px;
}

.greeting {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-1);
  margin-bottom: 1rem;
}

.hero-title em {
  font-style: italic;
  color: var(--accent-2);
}

.hero-sub {
  font-size: 0.9rem;
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.6;
  max-width: 480px;
}

/* ─── TODAY ON CALENDAR ─── */
.day-activity {
  margin: 0 2rem 1.5rem;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: calc(100vw - 4rem);
}

.day-activity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.day-activity-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-1);
  letter-spacing: -0.02em;
}

.day-activity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.day-activity-btn {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--text-1);
  color: var(--surface);
  cursor: pointer;
  transition: opacity 0.15s;
}
.day-activity-btn:hover {
  opacity: 0.88;
}
.day-activity-btn--ghost {
  background: transparent;
  color: var(--text-2);
}

.day-activity-hint {
  font-size: 0.72rem;
  color: var(--text-3);
  font-weight: 300;
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.day-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.day-activity-item {
  display: flex;
  gap: 0.85rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}
.day-activity-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.day-activity-time {
  flex: 0 0 4.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  font-weight: 500;
  font-size: 0.75rem;
}

.day-activity-event {
  color: var(--text-1);
  font-weight: 400;
}

.day-activity-empty {
  font-size: 0.8rem;
  color: var(--text-3);
  font-weight: 300;
  padding: 0.25rem 0;
}

@media (max-width: 600px) {
  .day-activity {
    margin: 0 1.25rem 1.25rem;
    max-width: none;
  }
}

/* ─── STATUS STRIP ─── */
.status-strip {
  display: flex;
  gap: 0;
  margin: 1.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  flex: 1;
  border-right: 1px solid var(--border);
  transition: background 0.15s;
}
.status-item:last-child { border-right: none; }
.status-item:hover { background: var(--bg); }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot-grey);
  flex-shrink: 0;
  transition: background 0.3s;
}
.status-item.green .status-dot  { background: var(--dot-green); }
.status-item.amber .status-dot  { background: var(--dot-amber); }
.status-item.red   .status-dot  { background: var(--dot-red); }
.status-item.grey  .status-dot  { background: var(--dot-grey); }

.status-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.status-value {
  font-size: 0.8rem;
  color: var(--text-2);
  margin-left: auto;
  font-weight: 400;
}

/* ─── MODULE GRID ─── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  margin: 0 2rem;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ─── MODULE CARD ─── */
.module-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  min-height: 88px;
}

.module-card:hover {
  background: #FAFAF8;
}
.module-card:hover .module-arrow {
  transform: translateX(3px);
  opacity: 1;
}

.module-card--featured {
  background: var(--featured);
}
.module-card--featured:hover {
  background: #EAE7DF;
}

.module-card--journal {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.module-icon {
  font-size: 1.1rem;
  color: var(--text-3);
  flex-shrink: 0;
  width: 32px;
  text-align: center;
  line-height: 1;
}

.module-body {
  flex: 1;
  min-width: 0;
}

.module-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-sub {
  font-size: 0.78rem;
  color: var(--text-3);
  font-weight: 300;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-status-badge {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--dot-green);
  background: #EBF4EE;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  display: none;
  flex-shrink: 0;
}
.module-status-badge.show { display: block; }

.module-arrow {
  font-size: 1rem;
  color: var(--text-3);
  opacity: 0.5;
  flex-shrink: 0;
  transition: transform 0.2s, opacity 0.2s;
}

/* ─── PROGRESS ─── */
.progress-section {
  margin: 2rem 2rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.progress-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.progress-pct {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-1);
}

.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.progress-fill {
  height: 100%;
  background: var(--accent-2);
  border-radius: 99px;
  transition: width 1s ease;
  width: 0%;
}

.progress-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-3);
  font-weight: 300;
}

/* ─── FOOTER ─── */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 2rem 0;
  font-size: 0.72rem;
  color: var(--text-3);
  font-weight: 300;
  letter-spacing: 0.03em;
}

/* ─── MOBILE ─── */
@media (max-width: 600px) {
  .topbar { padding: 1rem 1.25rem; }
  .hero    { padding: 2.5rem 1.25rem 1.5rem; }
  .status-strip { margin: 1rem 1.25rem; flex-wrap: wrap; }
  .status-item  { min-width: 50%; border-bottom: 1px solid var(--border); }
  .grid    { margin: 0 1.25rem; }
  .progress-section { margin: 1.5rem 1.25rem 0; }
  .footer  { padding: 1.25rem 1.25rem 0; }
  .mission-pill { display: none; }
}

/* Roman OS slide-in nav (roman-nav.js) — fixed top-right hamburger */
.topbar {
  padding-right: 4.5rem;
}
