*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg: #0d1117;
      --surface: #161b22;
      --surface2: #1c2330;
      --surface3: #21262d;
      --border: rgba(255,255,255,0.08);
      --border2: rgba(255,255,255,0.14);
      --text: #e6edf3;
      --muted: #8b949e;
      --muted2: #6e7681;
      --oracle: #e05c28;
      --oracle-dim: rgba(224,92,40,0.12);
      --oracle-mid: rgba(224,92,40,0.25);
      --ps: #1dab73;
      --ps-dim: rgba(29,171,115,0.12);
      --ps-mid: rgba(29,171,115,0.25);
      --both: #d4a017;
      --both-dim: rgba(212,160,23,0.12);
      --both-mid: rgba(212,160,23,0.25);
      --review: #a78bfa;
      --review-dim: rgba(167,139,250,0.12);
      --review-mid: rgba(167,139,250,0.25);
      --accent: #3b82f6;
      --accent-dim: rgba(59,130,246,0.12);
      --radius: 10px;
      --radius-lg: 14px;
    }

    html { scroll-behavior: smooth; }

    body {
      font-family: 'Sora', sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      line-height: 1.6;
    }

    /* ── HERO ── */
    .hero {
      background: linear-gradient(135deg, #0d1117 0%, #111827 50%, #0d1117 100%);
      border-bottom: 1px solid var(--border);
      padding: 3rem 0 2.5rem;
      position: relative;
      overflow: hidden;
    }

    .hero::before {
      content: '';
      position: absolute;
      top: -60px; right: -60px;
      width: 320px; height: 320px;
      background: radial-gradient(circle, rgba(224,92,40,0.12) 0%, transparent 70%);
      pointer-events: none;
    }

    .hero::after {
      content: '';
      position: absolute;
      bottom: -80px; left: 10%;
      width: 280px; height: 280px;
      background: radial-gradient(circle, rgba(29,171,115,0.08) 0%, transparent 70%);
      pointer-events: none;
    }

    .container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      font-weight: 500;
      color: var(--oracle);
      background: var(--oracle-dim);
      border: 1px solid var(--oracle-mid);
      border-radius: 99px;
      padding: 4px 12px;
      margin-bottom: 1.25rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .hero-badge::before { content: '●'; font-size: 8px; animation: pulse 2s ease-in-out infinite; }

    @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

    .hero h1 {
      font-size: clamp(1.75rem, 4vw, 2.75rem);
      font-weight: 600;
      line-height: 1.15;
      margin-bottom: 0.875rem;
      letter-spacing: -0.02em;
    }

    .hero h1 span.oracle-text { color: var(--oracle); }
    .hero h1 span.ps-text { color: var(--ps); }

    .hero-sub {
      font-size: 1rem;
      color: var(--muted);
      max-width: 560px;
      margin-bottom: 2rem;
      font-weight: 300;
    }

    .stats-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
    }

    @media (max-width: 640px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

    .stat-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1rem 1.25rem;
      text-align: center;
      transition: border-color 0.2s;
    }

    .stat-card:hover { border-color: var(--border2); }

    .stat-num {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 1.75rem;
      font-weight: 600;
      color: var(--text);
    }

    .stat-label { font-size: 12px; color: var(--muted); margin-top: 3px; }

    /* ── MAIN LAYOUT ── */
    .app-body {
      display: grid;
      grid-template-columns: 220px 1fr;
      gap: 0;
      min-height: calc(100vh - 280px);
    }

    @media (max-width: 768px) { .app-body { grid-template-columns: 1fr; } }

    /* ── SIDEBAR ── */
    .sidebar {
      background: var(--surface);
      border-right: 1px solid var(--border);
      padding: 1.5rem 0;
      position: sticky;
      top: 0;
      height: 100vh;
      overflow-y: auto;
    }

    @media (max-width: 768px) {
      .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
      }
    }

    .sidebar-title {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted2);
      padding: 0 1.25rem 0.75rem;
    }

    .week-nav { list-style: none; }

    .week-nav-item {
      display: block;
      padding: 0.625rem 1.25rem;
      font-size: 13px;
      color: var(--muted);
      cursor: pointer;
      transition: all 0.15s;
      border-left: 2px solid transparent;
      user-select: none;
    }

    .week-nav-item:hover { color: var(--text); background: var(--surface2); }

    .week-nav-item.active {
      color: var(--text);
      background: var(--surface2);
      border-left-color: var(--oracle);
    }

    .week-nav-label {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 10px;
      color: var(--muted2);
      display: block;
      margin-bottom: 2px;
    }

    /* Progress bar in sidebar */
    .sidebar-progress {
      padding: 1.25rem;
      border-top: 1px solid var(--border);
      margin-top: 1rem;
    }

    .sidebar-progress-label {
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 8px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .sidebar-progress-pct {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      color: var(--ps);
    }

    .prog-bar-bg {
      height: 4px;
      border-radius: 99px;
      background: var(--surface3);
    }

    .prog-bar-fill {
      height: 4px;
      border-radius: 99px;
      background: linear-gradient(90deg, var(--oracle), var(--ps));
      width: 0%;
      transition: width 0.4s ease;
    }

    .prog-days { font-size: 11px; color: var(--muted2); margin-top: 6px; }

    /* ── MAIN CONTENT ── */
    .main-content { padding: 2rem 2rem; overflow-y: auto; }

    @media (max-width: 768px) { .main-content { padding: 1.25rem 1rem; } }

    .week-panel { display: none; }
    .week-panel.active { display: block; }

    .week-header {
      margin-bottom: 1.5rem;
      padding-bottom: 1.25rem;
      border-bottom: 1px solid var(--border);
    }

    .week-eyebrow {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      font-weight: 500;
      color: var(--oracle);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 0.5rem;
    }

    .week-title {
      font-size: 1.375rem;
      font-weight: 600;
      letter-spacing: -0.02em;
      margin-bottom: 0.5rem;
    }

    .week-desc { font-size: 14px; color: var(--muted); max-width: 620px; }

    /* ── DAY CARDS ── */
    .day-list { display: flex; flex-direction: column; gap: 10px; }

    .day-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .day-card:hover { border-color: var(--border2); }

    .day-card.open { border-color: var(--border2); box-shadow: 0 4px 24px rgba(0,0,0,0.3); }

    .day-card.done .day-title-main { opacity: 0.45; text-decoration: line-through; }

    .day-header {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 1rem 1.25rem;
      cursor: pointer;
      user-select: none;
    }

    .day-badge {
      width: 40px; height: 40px;
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      font-weight: 600;
      flex-shrink: 0;
    }

    .day-badge.oracle { background: var(--oracle-dim); color: var(--oracle); border: 1px solid var(--oracle-mid); }
    .day-badge.ps { background: var(--ps-dim); color: var(--ps); border: 1px solid var(--ps-mid); }
    .day-badge.both { background: var(--both-dim); color: var(--both); border: 1px solid var(--both-mid); }
    .day-badge.review { background: var(--review-dim); color: var(--review); border: 1px solid var(--review-mid); }

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

    .day-title-main {
      font-size: 14px;
      font-weight: 500;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .day-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }

    .day-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

    .tag {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 10px;
      font-weight: 500;
      padding: 3px 9px;
      border-radius: 99px;
      letter-spacing: 0.04em;
    }

    .tag.oracle { background: var(--oracle-dim); color: var(--oracle); }
    .tag.ps { background: var(--ps-dim); color: var(--ps); }
    .tag.both { background: var(--both-dim); color: var(--both); }
    .tag.review { background: var(--review-dim); color: var(--review); }
    /* .tag.hours removed — module uses sections, not time estimates */

    .done-btn {
      width: 28px; height: 28px;
      border-radius: 50%;
      border: 1.5px solid var(--border2);
      background: transparent;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      color: var(--muted);
      font-size: 13px;
      transition: all 0.2s;
      flex-shrink: 0;
    }

    .done-btn:hover { border-color: var(--ps); color: var(--ps); }
    .done-btn.active { background: var(--ps); border-color: var(--ps); color: #fff; }

    .chevron {
      color: var(--muted2);
      font-size: 12px;
      transition: transform 0.2s;
      flex-shrink: 0;
    }

    .day-card.open .chevron { transform: rotate(180deg); }

    /* ── DAY BODY ── */
    .day-body {
      display: none;
      border-top: 1px solid var(--border);
      padding: 1.25rem 1.25rem 1.25rem;
    }

    .day-card.open .day-body { display: block; }

    .body-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.5rem;
    }

    @media (max-width: 640px) { .body-grid { grid-template-columns: 1fr; } }

    .section-label {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted2);
      margin-bottom: 0.75rem;
    }

    .task-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }

    .task-item {
      display: flex;
      gap: 10px;
      font-size: 13px;
      color: #c9d1d9;
      line-height: 1.55;
      align-items: flex-start;
    }

    .task-dot {
      width: 5px; height: 5px;
      border-radius: 50%;
      margin-top: 7px;
      flex-shrink: 0;
    }

    .task-dot.oracle { background: var(--oracle); }
    .task-dot.ps { background: var(--ps); }
    .task-dot.both { background: var(--both); }
    .task-dot.review { background: var(--review); }

    .link-list { display: flex; flex-direction: column; gap: 6px; }

    .link-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 12.5px;
      color: var(--accent);
      text-decoration: none;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
    }

    .link-item:hover { background: var(--surface3); border-color: var(--border2); color: #93c5fd; }

    .link-arrow { flex-shrink: 0; opacity: 0.6; }

    .tip-box {
      margin-top: 1.25rem;
      padding: 0.875rem 1rem;
      background: rgba(212,160,23,0.07);
      border: 1px solid rgba(212,160,23,0.2);
      border-radius: 8px;
      font-size: 13px;
      color: #d4a017;
      line-height: 1.6;
    }

    .tip-box strong { color: #e8b84b; }

    /* ── LEGEND ── */
    .legend {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      margin-bottom: 1.5rem;
      align-items: center;
      padding: 0.875rem 1rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
    }

    .legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }

    .legend-dot {
      width: 8px; height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    /* ── MOBILE NAV ── */
    .mobile-week-nav {
      display: none;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 1.25rem;
    }

    @media (max-width: 768px) { .mobile-week-nav { display: flex; } .sidebar-nav-list { display: none; } }

    .mobile-tab {
      padding: 6px 14px;
      font-size: 12px;
      border: 1px solid var(--border2);
      border-radius: 99px;
      background: var(--surface);
      color: var(--muted);
      cursor: pointer;
      transition: all 0.15s;
      font-family: 'IBM Plex Mono', monospace;
    }

    .mobile-tab.active { background: var(--oracle); color: #fff; border-color: var(--oracle); }

    /* ── FOOTER ── */
    footer {
      background: var(--surface);
      border-top: 1px solid var(--border);
      padding: 1.5rem;
      text-align: center;
      font-size: 12px;
      color: var(--muted2);
    }

    footer a { color: var(--muted); text-decoration: none; }
    footer a:hover { color: var(--text); }

    /* ── ANIMATIONS ── */
    @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    .week-panel.active { animation: fadeIn 0.25s ease; }

    /* ── SCROLLBAR ── */
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--bg); }
    ::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 99px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--border2); }

    /* ── AUTH MODAL ── */
    .auth-overlay {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.75);
      backdrop-filter: blur(8px);
      display: flex; align-items: center; justify-content: center;
      z-index: 1000;
      padding: 1rem;
    }

    .auth-modal {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: var(--radius-lg);
      padding: 2rem;
      width: 100%;
      max-width: 400px;
      box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    }

    .auth-logo {
      display: flex; align-items: center; gap: 10px;
      margin-bottom: 1.5rem;
    }

    .auth-logo-icon {
      width: 40px; height: 40px;
      background: var(--oracle-dim);
      border: 1px solid var(--oracle-mid);
      border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 20px;
    }

    .auth-logo-text {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      line-height: 1.3;
    }

    .auth-logo-sub { font-size: 11px; color: var(--muted); font-weight: 400; }

    .auth-title {
      font-size: 1.25rem;
      font-weight: 600;
      letter-spacing: -0.02em;
      margin-bottom: 0.375rem;
    }

    .auth-desc { font-size: 13px; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.5; }

    .auth-tabs {
      display: flex;
      background: var(--surface2);
      border-radius: 8px;
      padding: 3px;
      margin-bottom: 1.5rem;
      gap: 3px;
    }

    .auth-tab {
      flex: 1;
      padding: 7px;
      border: none;
      background: transparent;
      border-radius: 6px;
      color: var(--muted);
      font-family: 'Sora', sans-serif;
      font-size: 13px;
      cursor: pointer;
      transition: all 0.15s;
    }

    .auth-tab.active { background: var(--surface3); color: var(--text); font-weight: 500; }

    .auth-field { margin-bottom: 1rem; }

    .auth-label {
      display: block;
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 6px;
      font-family: 'IBM Plex Mono', monospace;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .auth-input {
      width: 100%;
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: 8px;
      padding: 10px 14px;
      color: var(--text);
      font-family: 'Sora', sans-serif;
      font-size: 14px;
      outline: none;
      transition: border-color 0.15s;
    }

    .auth-input:focus { border-color: var(--oracle); }
    .auth-input::placeholder { color: var(--muted2); }

    .auth-btn {
      width: 100%;
      padding: 11px;
      background: var(--oracle);
      border: none;
      border-radius: 8px;
      color: #fff;
      font-family: 'Sora', sans-serif;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: opacity 0.15s;
      margin-top: 0.5rem;
    }

    .auth-btn:hover { opacity: 0.9; }
    .auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }

    .auth-guest-btn {
      width: 100%;
      padding: 10px;
      background: transparent;
      border: 1px solid var(--border2);
      border-radius: 8px;
      color: var(--muted);
      font-family: 'Sora', sans-serif;
      font-size: 13px;
      cursor: pointer;
      margin-top: 0.625rem;
      transition: all 0.15s;
    }

    .auth-guest-btn:hover { border-color: var(--border2); color: var(--text); background: var(--surface2); }

    .auth-error {
      font-size: 12.5px;
      color: #f87171;
      background: rgba(248,113,113,0.08);
      border: 1px solid rgba(248,113,113,0.2);
      border-radius: 6px;
      padding: 8px 12px;
      margin-bottom: 1rem;
      display: none;
    }

    .auth-success {
      font-size: 12.5px;
      color: var(--ps);
      background: var(--ps-dim);
      border: 1px solid var(--ps-mid);
      border-radius: 6px;
      padding: 8px 12px;
      margin-bottom: 1rem;
      display: none;
    }

    .auth-note {
      font-size: 11.5px;
      color: var(--muted2);
      text-align: center;
      margin-top: 1rem;
      line-height: 1.5;
    }

    /* ── USER BAR ── */
    .user-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0.75rem 1.25rem;
      border-bottom: 1px solid var(--border);
      background: var(--surface);
      font-size: 12px;
    }

    .user-bar-avatar {
      width: 28px; height: 28px;
      background: var(--oracle-dim);
      border: 1px solid var(--oracle-mid);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      font-weight: 600;
      color: var(--oracle);
      flex-shrink: 0;
    }

    .user-bar-name { color: var(--text); font-weight: 500; flex: 1; }
    .user-bar-mode { color: var(--muted2); font-size: 11px; }

    .user-bar-sync {
      font-size: 11px;
      color: var(--ps);
      display: flex; align-items: center; gap: 5px;
    }

    .user-bar-signout {
      font-size: 11.5px;
      color: var(--muted2);
      cursor: pointer;
      padding: 4px 10px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: transparent;
      font-family: 'Sora', sans-serif;
      transition: all 0.15s;
    }

    .user-bar-signout:hover { color: var(--text); border-color: var(--border2); }

    .sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ps); animation: pulse 2s ease-in-out infinite; display:inline-block; }

    /* ── GOOGLE SIGN-IN BUTTON ── */
    .google-btn {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 12px 20px;
      background: #fff;
      border: none;
      border-radius: 8px;
      color: #3c4043;
      font-family: 'Sora', sans-serif;
      font-size: 15px;
      font-weight: 500;
      cursor: pointer;
      transition: box-shadow 0.2s, background 0.2s;
      box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }

    .google-btn:hover { background: #f8f8f8; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
    .google-btn:active { background: #f0f0f0; }
    .google-btn:disabled { opacity: 0.6; cursor: not-allowed; }

    .google-btn svg { flex-shrink: 0; }

    .auth-divider {
      display: flex; align-items: center; gap: 12px;
      margin: 1rem 0;
      color: var(--muted2);
      font-size: 12px;
    }
    .auth-divider::before, .auth-divider::after {
      content: ''; flex: 1; height: 1px; background: var(--border2);
    }

    /* ── SETUP BANNER ── */
    .setup-banner {
      background: rgba(212,160,23,0.08);
      border: 1px solid rgba(212,160,23,0.25);
      border-radius: 8px;
      padding: 10px 14px;
      font-size: 12.5px;
      color: #d4a017;
      margin-bottom: 1rem;
      line-height: 1.5;
    }
    .setup-banner a { color: #e8b84b; }