/* Bento design system — UCI blue + gold, Inter, card grid. */


@view-transition { navigation: auto; }

:root {
  --uci-blue: #0064A4;
  --uci-blue-dark: #00447b;
  --uci-blue-soft: #eef6fc;
  --uci-gold: #FFD200;
  --uci-gold-soft: #fff8dc;

  --bg: #e7e6e0;
  --card: #ffffff;
  --card-2: #efede7;
  --ink: #0f172a;
  --ink-2: #334155;
  --subtle: #64748b;
  --hairline: rgba(15, 23, 42, 0.1);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 320ms;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  color-scheme: light;
}

/* Match OS preference at first paint so users on dark mode don't see a
   light-theme flash before the inline head script sets data-theme. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0d12;
    --card: #14181f;
    --card-2: #1a1f28;
    --ink: #f1f5f9;
    --ink-2: #cbd5e1;
    --subtle: #8892a6;
    --hairline: rgba(255, 255, 255, 0.08);
    --uci-blue-soft: rgba(88, 166, 255, 0.12);
    --uci-gold-soft: rgba(255, 210, 0, 0.14);
    color-scheme: dark;
  }
}

html[data-theme="dark"] {
  --bg: #0a0d12;
  --card: #14181f;
  --card-2: #1a1f28;
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --subtle: #8892a6;
  --hairline: rgba(255, 255, 255, 0.08);
  --uci-blue-soft: rgba(88, 166, 255, 0.12);
  --uci-gold-soft: rgba(255, 210, 0, 0.14);
  color-scheme: dark;
}

/* Explicit light override wins over prefers-color-scheme. */
html[data-theme="light"] {
  --bg: #e7e6e0;
  --card: #ffffff;
  --card-2: #efede7;
  --ink: #0f172a;
  --ink-2: #334155;
  --subtle: #64748b;
  --hairline: rgba(15, 23, 42, 0.1);
  --uci-blue-soft: #eef6fc;
  --uci-gold-soft: #fff8dc;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ── App shell ─────────────────────────────────── */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px;
  gap: 14px;
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .app { padding: 10px; gap: 10px; }
}

/* ── Nav ──────────────────────────────────────── */
/* 3-column grid so nav-links are always page-centered,
   regardless of how wide the brand/crumb or action cluster becomes. */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: var(--card);
  padding: 10px 14px 10px 18px;
  border-radius: var(--r-pill);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px var(--hairline);
  transition: background-color var(--dur) var(--ease);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  min-width: 0; justify-self: start; flex-wrap: wrap;
}
.nav-links { justify-self: center; }
.nav-actions { justify-self: end; }
.nav-logo {
  width: 106px; height: 18px;
  background-color: var(--uci-blue);
  -webkit-mask: center/contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20301.70001%2051.039999%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M%200%2C29.02%20V%202.05%20h%2013.45%20v%2026.69%20c%200%2C6.93%203.5%2C10.22%208.85%2C10.22%205.35%2C0%208.92%2C-3.16%208.92%2C-9.88%20V%202.05%20h%2013.45%20v%2026.62%20c%200%2C15.44%20-8.85%2C22.3%20-22.51%2C22.3%20C%208.5%2C50.97%200%2C44.04%200%2C29.01%20Z%20M%2050.39%2C26.21%20v%20-0.14%20c%200%2C-14%2010.7%2C-24.98%2025.25%2C-24.98%209.81%2C0%2016.12%2C4.12%2020.38%2C9.95%20L%2086%2C18.79%20c%20-2.74%2C-3.36%20-5.9%2C-5.63%20-10.5%2C-5.63%20-6.72%2C0%20-11.46%2C5.76%20-11.46%2C12.76%20v%200.14%20c%200%2C7.21%204.74%2C12.83%2011.46%2C12.83%205.01%2C0%207.96%2C-2.33%2010.84%2C-5.83%20L%2096.36%2C40.2%20C%2091.83%2C46.44%2085.72%2C51.04%2075.16%2C51.04%2061.44%2C51.04%2050.39%2C40.54%2050.39%2C26.2%20Z%20M%20110.26%2C2.06%20h%2013.31%20v%2048.03%20h%20-13.31%20z%20M%20131.35%2C12.97%20h%2013.04%20v%207.48%20c%202.13%2C-5.08%205.56%2C-8.37%2011.73%2C-8.1%20v%2013.72%20h%20-1.1%20c%20-6.79%2C0%20-10.64%2C3.91%20-10.64%2C12.42%20v%2011.6%20H%20131.34%20V%2012.97%20Z%20M%20158.03%2C12.97%20h%2013.72%20l%207.14%2C21.68%207.21%2C-21.68%20h%2013.45%20l%20-14.82%2C37.4%20h%20-11.87%20l%20-14.82%2C-37.4%20z%20M%20202.48%2C0%20H%20216%20v%209.61%20h%20-13.52%20z%20m%200.28%2C12.97%20h%2012.97%20v%2037.12%20h%20-12.97%20z%20M%20222.65%2C12.97%20h%2013.04%20v%205.21%20c%202.4%2C-3.09%205.83%2C-6.04%2011.12%2C-6.04%207.89%2C0%2012.63%2C5.22%2012.63%2C13.65%20v%2024.29%20h%20-12.97%20v%20-20.1%20c%200%2C-4.12%20-2.13%2C-6.31%20-5.28%2C-6.31%20-3.15%2C0%20-5.49%2C2.2%20-5.49%2C6.31%20v%2020.1%20H%20222.66%20V%2012.96%20Z%20M%20264.31%2C31.7%20v%20-0.14%20c%200%2C-10.84%207.75%2C-19.42%2018.73%2C-19.42%2012.76%2C0%2018.66%2C9.4%2018.66%2C20.31%200%2C0.82%200%2C1.78%20-0.07%2C2.68%20h%20-24.84%20c%201.03%2C4.05%203.98%2C6.11%208.03%2C6.11%203.16%2C0%205.56%2C-1.17%208.23%2C-3.77%20l%207.21%2C5.97%20c%20-3.57%2C4.53%20-8.71%2C7.55%20-16.06%2C7.55%20-11.67%2C0%20-19.9%2C-7.82%20-19.9%2C-19.28%20z%20m%2025.25%2C-3.23%20c%20-0.48%2C-4.12%20-2.95%2C-6.72%20-6.52%2C-6.72%20-3.57%2C0%20-5.76%2C2.61%20-6.45%2C6.72%20z%22%2F%3E%3C%2Fsvg%3E");
          mask: center/contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20301.70001%2051.039999%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M%200%2C29.02%20V%202.05%20h%2013.45%20v%2026.69%20c%200%2C6.93%203.5%2C10.22%208.85%2C10.22%205.35%2C0%208.92%2C-3.16%208.92%2C-9.88%20V%202.05%20h%2013.45%20v%2026.62%20c%200%2C15.44%20-8.85%2C22.3%20-22.51%2C22.3%20C%208.5%2C50.97%200%2C44.04%200%2C29.01%20Z%20M%2050.39%2C26.21%20v%20-0.14%20c%200%2C-14%2010.7%2C-24.98%2025.25%2C-24.98%209.81%2C0%2016.12%2C4.12%2020.38%2C9.95%20L%2086%2C18.79%20c%20-2.74%2C-3.36%20-5.9%2C-5.63%20-10.5%2C-5.63%20-6.72%2C0%20-11.46%2C5.76%20-11.46%2C12.76%20v%200.14%20c%200%2C7.21%204.74%2C12.83%2011.46%2C12.83%205.01%2C0%207.96%2C-2.33%2010.84%2C-5.83%20L%2096.36%2C40.2%20C%2091.83%2C46.44%2085.72%2C51.04%2075.16%2C51.04%2061.44%2C51.04%2050.39%2C40.54%2050.39%2C26.2%20Z%20M%20110.26%2C2.06%20h%2013.31%20v%2048.03%20h%20-13.31%20z%20M%20131.35%2C12.97%20h%2013.04%20v%207.48%20c%202.13%2C-5.08%205.56%2C-8.37%2011.73%2C-8.1%20v%2013.72%20h%20-1.1%20c%20-6.79%2C0%20-10.64%2C3.91%20-10.64%2C12.42%20v%2011.6%20H%20131.34%20V%2012.97%20Z%20M%20158.03%2C12.97%20h%2013.72%20l%207.14%2C21.68%207.21%2C-21.68%20h%2013.45%20l%20-14.82%2C37.4%20h%20-11.87%20l%20-14.82%2C-37.4%20z%20M%20202.48%2C0%20H%20216%20v%209.61%20h%20-13.52%20z%20m%200.28%2C12.97%20h%2012.97%20v%2037.12%20h%20-12.97%20z%20M%20222.65%2C12.97%20h%2013.04%20v%205.21%20c%202.4%2C-3.09%205.83%2C-6.04%2011.12%2C-6.04%207.89%2C0%2012.63%2C5.22%2012.63%2C13.65%20v%2024.29%20h%20-12.97%20v%20-20.1%20c%200%2C-4.12%20-2.13%2C-6.31%20-5.28%2C-6.31%20-3.15%2C0%20-5.49%2C2.2%20-5.49%2C6.31%20v%2020.1%20H%20222.66%20V%2012.96%20Z%20M%20264.31%2C31.7%20v%20-0.14%20c%200%2C-10.84%207.75%2C-19.42%2018.73%2C-19.42%2012.76%2C0%2018.66%2C9.4%2018.66%2C20.31%200%2C0.82%200%2C1.78%20-0.07%2C2.68%20h%20-24.84%20c%201.03%2C4.05%203.98%2C6.11%208.03%2C6.11%203.16%2C0%205.56%2C-1.17%208.23%2C-3.77%20l%207.21%2C5.97%20c%20-3.57%2C4.53%20-8.71%2C7.55%20-16.06%2C7.55%20-11.67%2C0%20-19.9%2C-7.82%20-19.9%2C-19.28%20z%20m%2025.25%2C-3.23%20c%20-0.48%2C-4.12%20-2.95%2C-6.72%20-6.52%2C-6.72%20-3.57%2C0%20-5.76%2C2.61%20-6.45%2C6.72%20z%22%2F%3E%3C%2Fsvg%3E");
  display: inline-block;
  font-size: 0; color: transparent;
  transition: opacity var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-logo:hover { opacity: 0.75; }
html[data-theme="dark"] .nav-logo { background-color: #ffffff; }
@media (max-width: 520px) { .nav-logo { width: 88px; height: 15px; } }

.nav-name { font-weight: 600; font-size: 16px; white-space: nowrap; }
.nav-name::before {
  content: "·";
  margin-right: 8px;
  color: var(--subtle);
  font-weight: 400;
}
@media (max-width: 860px) { .tool-crumb-badge { display: none; } }
@media (max-width: 720px) {
  .nav {
    grid-template-columns: auto 1fr;
    border-radius: var(--r-lg);
    padding: 10px 14px;
  }
  .nav-links { grid-column: 1 / -1; justify-self: center; order: 3; }
  .nav-actions { justify-self: end; }
}

.nav-links { display: flex; gap: 2px; font-size: 13px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-pill);
  color: var(--ink-2); font-weight: 500;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-link svg {
  width: 15px; height: 15px; flex-shrink: 0;
  opacity: 0.75;
  transition: opacity var(--dur) var(--ease);
}
.nav-link:hover svg, .nav-link.active svg { opacity: 1; }
.nav-link:hover { background: var(--card-2); color: var(--ink); }
.nav-link.active { background: var(--ink); color: var(--bg); }

.nav-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }
.theme-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card-2); border: 0; cursor: pointer;
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.theme-btn:hover { background: var(--hairline); transform: rotate(25deg); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .icon-sun { display: none; }
html[data-theme="dark"] .theme-btn .icon-sun { display: block; }
html[data-theme="dark"] .theme-btn .icon-moon { display: none; }

.loc-chip {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--subtle);
  background: var(--card-2); padding: 6px 12px; border-radius: var(--r-pill);
}
.loc-dot { width: 6px; height: 6px; border-radius: 50%; background: #16a34a; }
@media (max-width: 860px) { .loc-chip { display: none; } }
@media (max-width: 520px) { .nav-links .nav-link { padding: 8px 10px; } }

/* ── Page enter animation (fallback for browsers without View Transitions) ─── */
.page { flex: 1; animation: pageIn 420ms var(--ease) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cards ────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 22px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
  box-shadow: 0 0 0 1px var(--hairline);
  position: relative;
  overflow: hidden;
}
.card.interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--hairline), 0 12px 32px -12px rgba(15,23,42,0.18);
}
html[data-theme="dark"] .card.interactive:hover {
  box-shadow: 0 0 0 1px var(--hairline), 0 12px 32px -12px rgba(0,0,0,0.6);
}

.eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--subtle);
}
.eyebrow-pill {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; display: inline-block;
  background: var(--uci-blue-soft); color: var(--uci-blue);
  border: 1px solid rgba(0, 100, 164, 0.22);
}
html[data-theme="dark"] .eyebrow-pill { color: #58a6ff; border-color: rgba(88, 166, 255, 0.3); }
.eyebrow-pill.gold {
  background: var(--uci-gold-soft); color: #806600;
  border-color: rgba(128, 102, 0, 0.28);
}
html[data-theme="dark"] .eyebrow-pill.gold { color: var(--uci-gold); border-color: rgba(255, 210, 0, 0.3); }

/* ── Breadcrumbs (shared chip-style) ───────────── */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem; margin-bottom: 14px;
}
.crumb {
  display: inline-flex; align-items: center;
  padding: 7px 14px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; letter-spacing: 0.2px;
  background: var(--card-2); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.crumb:hover {
  background: var(--uci-blue-soft); color: var(--uci-blue);
  box-shadow: inset 0 0 0 1px rgba(0, 100, 164, 0.22);
  transform: translateY(-1px);
}
.crumb.crumb-current {
  background: var(--uci-blue); color: #fff;
  box-shadow: none;
  font-weight: 700; cursor: default;
}
.crumb.crumb-current:hover { transform: none; }
html[data-theme="dark"] .crumb:hover {
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.3);
}
.crumb-sep {
  color: #97a7bb; font-size: 18px; font-weight: 700;
  user-select: none; line-height: 1;
}
html[data-theme="dark"] .crumb-sep { color: #54627a; }

.card-title {
  font-size: 22px; font-weight: 700; letter-spacing: -0.5px;
  margin: 14px 0 4px;
}
.card-desc { font-size: 13px; color: var(--subtle); line-height: 1.5; }

/* ── Footer ──────────────────────────────────── */
.foot {
  display: flex; justify-content: space-between; align-items: center;
  /* Top padding = bottom padding + .app padding-bottom, so text is
     visually equidistant from the border line above and the viewport below */
  padding: 20px 18px 2px;
  color: var(--subtle); font-size: 12px;
  border-top: 1px solid var(--hairline);
  margin-top: 4px;
}
.foot a { border-bottom: 1px dashed currentColor; }
@media (max-width: 640px) {
  .foot { flex-direction: column; gap: 6px; padding: 14px 4px 4px; text-align: center; }
}

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 13px;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
  cursor: pointer; border: 0;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.btn-ghost:hover { background: var(--card-2); }

/* ── Home bento grid ──────────────────────────── */
.home-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(170px, auto);
  gap: 14px;
  align-content: start;
}
@media (max-width: 1000px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .home-grid { grid-template-columns: 1fr; }
}

/* Hero — 2x2 */
.hero {
  grid-column: span 2; grid-row: span 2;
  background: var(--uci-blue);
  color: #fff;
  padding: 36px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 360px;
}
@media (max-width: 520px) {
  .hero { padding: 26px; min-height: 280px; grid-column: span 1; grid-row: span 1; }
}
.hero-blob-gold {
  position: absolute; top: -40px; right: -40px;
  width: 260px; height: 260px; border-radius: 50%;
  background: var(--uci-gold); opacity: 0.28;
  animation: float1 12s var(--ease) infinite alternate;
}
.hero-blob-white {
  position: absolute; bottom: -60px; left: -20px;
  width: 180px; height: 180px; border-radius: 50%;
  background: #fff; opacity: 0.08;
  animation: float2 14s var(--ease) infinite alternate;
}
@keyframes float1 { from { transform: translate(0,0); } to { transform: translate(-30px, 20px) scale(1.08); } }
@keyframes float2 { from { transform: translate(0,0); } to { transform: translate(40px, -20px) scale(1.12); } }
.hero-top { position: relative; }
.hero-eyebrow { color: rgba(255,255,255,0.75); margin-bottom: 20px; }
.hero-title {
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.05; font-weight: 700;
  letter-spacing: -1.5px;
  max-width: 520px;
  margin: 0 0 16px;
}
.hero-title em { color: var(--uci-gold); font-style: normal; }
.hero-sub {
  font-size: 14px; line-height: 1.55; opacity: 0.9;
  max-width: 480px; margin: 0;
}
.hero-sub strong { font-weight: 700; }
.hero-cta { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-white { background: #fff; color: var(--uci-blue); }
.btn-white:hover { background: var(--uci-gold); color: var(--uci-blue-dark); }
.btn-glass {
  background: rgba(255,255,255,0.12); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}
.btn-glass:hover { background: rgba(255,255,255,0.22); }

/* Course cards */
.course-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
}

/* Academic strip — spans 2 cols, holds 3 mini cards in row 1 */
.card-strip {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.card-strip > .card { padding: 16px; gap: 8px; }
.card-strip .card-title { font-size: 17px; letter-spacing: -0.3px; }
.card-strip .card-desc { font-size: 12px; line-height: 1.45; }
.card-strip .card-meta { font-size: 11px; }
.eyebrow-pill.navy {
  background: rgba(0,85,155,0.12); color: var(--uci-blue);
}
html[data-theme="dark"] .eyebrow-pill.navy { background: rgba(88,166,255,0.18); color: #58a6ff; }
@media (max-width: 1000px) {
  .card-strip { grid-column: span 2; }
}
@media (max-width: 520px) {
  .card-strip { grid-column: span 1; grid-template-columns: 1fr; }
}
.week-row { display: flex; gap: 4px; }
.week-chip {
  flex: 1; height: 34px; border-radius: 6px;
  background: var(--card-2); color: var(--subtle);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.week-chip.active { background: var(--uci-blue); color: #fff; box-shadow: none; }
.card-meta { font-size: 12px; color: var(--subtle); }

/* Dark status card */
.dark-card { background: var(--ink); color: #fff; }
html[data-theme="dark"] .dark-card { background: #000; }
.dark-card .eyebrow { color: rgba(255,255,255,0.55); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  font-size: 11px; padding: 4px 10px;
  background: rgba(255,255,255,0.1); border-radius: var(--r-pill);
}

/* Tools strip — spans 2 */
.tools-card {
  grid-column: span 2;
  background: var(--uci-gold); color: var(--ink);
  display: flex; flex-direction: column; gap: 18px;
}
html[data-theme="dark"] .tools-card { color: #1a1200; }
.tools-title {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700; letter-spacing: -0.8px;
  margin-top: 10px;
}
.tools-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  flex: 1;
}
@media (max-width: 520px) { .tools-card { grid-column: span 1; } }
.tool-chip {
  background: rgba(0,0,0,0.08); border-radius: 12px;
  padding: 14px 8px; text-align: center;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px;
  min-height: 0;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tool-chip:hover { background: rgba(0,0,0,0.16); transform: translateY(-2px); }
.tool-chip-all {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.28);
}
.tool-chip-all:hover { background: rgba(0,0,0,0.08); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.45); }
.tool-glyph { font-size: 26px; line-height: 1; }
.tool-name { font-size: 12px; font-weight: 600; letter-spacing: -0.1px; }

/* Heatmap — spans 2 on home */
.heat-card { grid-column: span 2; }
@media (max-width: 520px) { .heat-card { grid-column: span 1; } }
.heatmap {
  display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px;
  margin-top: 14px;
}
.hm-cell {
  aspect-ratio: 1; border-radius: 2px;
  background: var(--card-2);
  opacity: 0; transform: scale(0.4);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease), background 300ms var(--ease);
}
.hm-cell.mounted { opacity: 1; transform: scale(1); }
.hm-0 { background: var(--card-2); }
.hm-1 { background: #9be9a8; }
.hm-2 { background: #40c463; }
.hm-3 { background: #30a14e; }
.hm-4 { background: #216e39; }
html[data-theme="dark"] .hm-0 { background: #161b22; }
html[data-theme="dark"] .hm-1 { background: #0e4429; }
html[data-theme="dark"] .hm-2 { background: #006d32; }
html[data-theme="dark"] .hm-3 { background: #26a641; }
html[data-theme="dark"] .hm-4 { background: #39d353; }

/* ── About page ────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(160px, auto);
  gap: 14px;
  align-content: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .about-grid { grid-template-columns: 1fr; } }

.about-hero {
  grid-column: span 2;
  background: var(--uci-blue); color: #fff;
  padding: 36px; min-height: 240px;
}
.about-blob {
  position: absolute; top: -80px; right: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: var(--uci-gold); opacity: 0.25;
  animation: float1 14s var(--ease) infinite alternate;
}
.about-title {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700; letter-spacing: -1.5px;
  margin: 12px 0 8px; position: relative;
}
.about-role { opacity: 0.9; font-size: 15px; margin: 0 0 22px; position: relative; }
.about-chips { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.chip-link {
  padding: 8px 14px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.15); color: #fff;
  font-size: 13px; font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
  transition: background var(--dur) var(--ease);
}
.chip-link:hover { background: rgba(255,255,255,0.28); }

.about-bio { grid-column: span 1; grid-row: span 2; }
.about-bio p { font-size: 14px; line-height: 1.65; color: var(--ink-2); margin: 10px 0 14px; }

.bullet-list { margin: 14px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.8; }

.study-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); margin-top: 10px; }

.about-quote { grid-column: span 2; padding: 28px 32px; }
.about-quote blockquote {
  margin: 12px 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.3; font-style: italic;
  letter-spacing: -0.5px;
}
@media (max-width: 900px) {
  .about-hero { grid-column: span 2; }
  .about-bio { grid-column: span 2; grid-row: auto; }
  .about-quote { grid-column: span 2; }
}
@media (max-width: 520px) {
  .about-hero, .about-bio, .about-quote { grid-column: span 1; }
}

/* ── Page header (shared by Notes / Tools) ───────── */
.page-head { padding: 32px; }
.page-title {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700; letter-spacing: -1.2px;
  margin: 10px 0; line-height: 1.1; text-wrap: pretty;
}
.page-sub { font-size: 15px; color: var(--ink-2); max-width: 620px; margin: 0; line-height: 1.55; }

.page-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--hairline);
}
@media (max-width: 640px) { .page-stats { grid-template-columns: repeat(2, 1fr); } }
.stat-n { font-size: clamp(22px, 2.4vw, 32px); font-weight: 700; letter-spacing: -0.5px; }
.stat-l { font-size: 11px; color: var(--subtle); letter-spacing: 2px; text-transform: uppercase; margin-top: 4px; }

.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 6px 0;
}
.section-meta { font-size: 12px; color: var(--subtle); }

/* ── Notes page ───────────────────────────────── */
.notes-page { display: flex; flex-direction: column; gap: 14px; }

.notes-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.demo-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .notes-grid, .demo-grid { grid-template-columns: 1fr; } }

.course-full { display: flex; flex-direction: column; gap: 16px; padding: 26px; }
.course-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
.lang-pills {
  display: inline-flex; gap: 3px; flex-shrink: 0;
  padding: 3px; border-radius: var(--r-pill);
  background: var(--card-2);
}
.lang-pill {
  font-size: 11px; padding: 4px 10px; border-radius: var(--r-pill);
  color: var(--subtle); font-weight: 600; letter-spacing: 0.3px;
  line-height: 1;
}

.weeks-eyebrow { margin-bottom: -8px; }

.weeks-list {
  display: flex; flex-direction: column;
  border-radius: var(--r-md);
  background: var(--card-2);
  padding: 6px;
}
.week-row-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-radius: 10px;
  transition: background var(--dur) var(--ease);
  cursor: pointer;
}
.week-row-item:hover { background: var(--card); }
.week-row-item:hover .week-row-arrow { color: var(--uci-blue); transform: translateX(2px); }
html[data-theme="dark"] .week-row-item:hover .week-row-arrow { color: #58a6ff; }
.week-row-n { font-size: 13px; font-weight: 600; }
.week-row-arrow {
  font-size: 12px; font-weight: 600; color: var(--subtle);
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.course-open { align-self: flex-start; }

.muted-card { opacity: 0.55; }

/* ── Course hub (ICS-45C / IN4MATX-43) ─────────── */
.course-hub-page { display: flex; flex-direction: column; gap: 14px; }

.course-hero-head {
  display: grid; grid-template-columns: 1fr auto; gap: 20px;
  align-items: flex-end; padding: 32px;
}
@media (max-width: 720px) { .course-hero-head { grid-template-columns: 1fr; } }

.lang-switch {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--card-2); border-radius: var(--r-pill);
}
.lang-switch button {
  border: 0; cursor: pointer;
  padding: 6px 14px; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-2);
  font-size: 12px; font-weight: 600;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  font-family: inherit;
}
.lang-switch button.active { background: var(--ink); color: var(--bg); }
.lang-switch button:hover:not(.active) { color: var(--ink); }

.week-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
@media (max-width: 720px) { .week-grid { grid-template-columns: 1fr; } }

.week-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px; position: relative;
}
.week-card .week-badge {
  display: inline-block; align-self: flex-start;
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--uci-blue-soft); color: var(--uci-blue);
}
.week-card.gold .week-badge { background: var(--uci-gold-soft); color: #806600; }
html[data-theme="dark"] .week-card.gold .week-badge { color: var(--uci-gold); }
.week-card h3 {
  margin: 0 0 6px; font-size: 18px; font-weight: 700;
  letter-spacing: -0.3px;
}
.week-card .week-summary {
  margin: 0; font-size: 13px; line-height: 1.55;
  color: var(--ink-2);
}
.week-card .week-date {
  font-size: 11px; color: var(--subtle); margin: 0;
}
.week-meta-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-top: auto;
  padding-top: 12px; border-top: 1px solid var(--hairline);
}
.note-state {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--subtle);
}
.note-state.ready { color: var(--uci-blue); }
html[data-theme="dark"] .note-state.ready { color: #58a6ff; }
.btn-open {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--bg);
  font-size: 12px; font-weight: 600;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn-open:hover { transform: translateX(2px); }
.btn-open.disabled {
  background: var(--card-2); color: var(--subtle);
  cursor: not-allowed; pointer-events: none;
}

/* ── Compact tool breadcrumb (address-bar style) ─────── */
.tool-crumb {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; flex-wrap: wrap;
}
.tool-crumb-chip {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
  background: var(--uci-blue-soft); color: var(--uci-blue);
  box-shadow: inset 0 0 0 1px rgba(0, 100, 164, 0.22);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tool-crumb-chip:hover {
  background: rgba(0, 100, 164, 0.17); transform: translateY(-1px);
}
html[data-theme="dark"] .tool-crumb-chip {
  background: rgba(88, 166, 255, 0.12); color: #7fb3ff;
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.22);
}
html[data-theme="dark"] .tool-crumb-chip:hover {
  background: rgba(88, 166, 255, 0.22);
}
.tool-crumb-chip.active {
  background: var(--uci-blue); color: #fff;
  box-shadow: none; cursor: default;
}
.tool-crumb-chip.active:hover {
  background: var(--uci-blue); transform: none;
}
.tool-crumb-sep {
  color: var(--subtle); font-size: 14px; font-weight: 700;
  line-height: 1; user-select: none;
}
.tool-crumb-badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
  background: #e67e22; color: #fff;
}
.tool-crumb-spacer { flex: 1; min-width: 0; }

/* ── Tool pages: neutralize legacy #main / .inner padding so Bento shell controls layout ── */
.app #main,
.app #main.alt {
  background: transparent !important;
  border: 0 !important;
}
.app #main > * {
  border-top: 0 !important;
}
.app #main > * > .inner {
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* ── Normalize anchor styling inside nav/footer (no border-bottom, inherit color) ── */
.app .nav a, .app .nav a:hover, .app .nav a:active, .app .nav a:focus,
.app .foot a, .app .foot a:hover, .app .foot a:active, .app .foot a:focus {
  border-bottom: 0 !important;
  color: inherit !important;
}
.app a.nav-link { color: var(--ink-2) !important; }
.app a.nav-link:hover { color: var(--ink) !important; background: var(--card-2); }
.app a.nav-link.active { color: var(--bg) !important; background: var(--ink); }
.app .foot a { border-bottom: 1px dashed currentColor !important; }
.app .foot a:hover { color: var(--ink) !important; }

/* ── Tools page ───────────────────────────────── */
.tools-page { display: flex; flex-direction: column; gap: 14px; }
.tools-list { display: flex; flex-direction: column; gap: 10px; }
.tool-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px; align-items: center;
  padding: 18px 22px;
}
.tool-glyph-big {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 26px; font-weight: 600;
}
.tool-row-top { display: flex; align-items: center; gap: 10px; }
.tool-card-name { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.tool-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: #e67e22; color: #fff; text-transform: uppercase;
}
.tool-arrow {
  font-size: 22px; color: var(--subtle);
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.tool-card:hover .tool-arrow { transform: translateX(4px); color: var(--ink); }
@media (max-width: 520px) {
  .tool-card { grid-template-columns: 48px 1fr; padding: 14px; }
  .tool-arrow { display: none; }
  .tool-glyph-big { width: 48px; height: 48px; font-size: 22px; }
}
