:root {
  --yale-blue: #00356b;
  --yale-blue-light: #285e8e;
  --yale-blue-pale: #eaf1f8;
  --ink: #1a1a1a;
  --paper: #fdfcfa;
  --line: #dfe3e8;
  --accent: #c9a24b;
  --good: #2e7d32;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  position: relative;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

.bg-orn {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(0,53,107,0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(201,162,75,0.08), transparent 55%);
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253,252,250,0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.crest {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--yale-blue);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--yale-blue); }
.brand-sub { font-size: 0.72rem; color: #6b7280; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s, color 0.15s;
}
.site-nav a:hover { color: var(--yale-blue); border-color: var(--accent); }

/* hero */
.hero { padding: 64px 24px 40px; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  color: var(--yale-blue);
  margin: 0 0 18px;
  line-height: 1.2;
}
.hero-sub { max-width: 640px; color: #444; font-size: 1.02rem; }
.hero-clock {
  margin-top: 26px;
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--ink);
  letter-spacing: 1px;
  background: var(--yale-blue-pale);
  display: inline-block;
  padding: 10px 22px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

/* panels */
.panel { padding: 40px 24px; border-top: 1px solid var(--line); }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}
.panel-head h2 {
  font-family: var(--serif);
  color: var(--yale-blue);
  font-size: 1.5rem;
  margin: 0;
}
.panel-note { color: #666; font-size: 0.92rem; max-width: 700px; margin: 6px 0 20px; }

.live-dot {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--good);
  background: rgba(46,125,50,0.09);
  border: 1px solid rgba(46,125,50,0.25);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.live-dot::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* weather */
.weather-card {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--yale-blue);
  color: #fff;
  border-radius: 16px;
  padding: 28px 30px;
  flex-wrap: wrap;
}
.weather-loading { color: #666; font-style: italic; padding: 20px 0; }
.weather-temp { font-family: var(--serif); font-size: 3.2rem; font-weight: 700; }
.weather-desc { font-size: 1.05rem; opacity: 0.9; }
.weather-meta { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.85rem; opacity: 0.85; }
.weather-meta div span { display: block; font-size: 1.05rem; font-weight: 600; opacity: 1; }
.weather-updated { width: 100%; font-size: 0.75rem; opacity: 0.6; margin-top: 4px; }

/* wiki feed */
.wiki-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }
.wiki-feed li {
  border: 1px solid var(--line);
  border-left: 3px solid var(--yale-blue-light);
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  animation: slidein 0.35s ease;
  font-size: 0.9rem;
}
@keyframes slidein {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.wiki-feed a { color: var(--yale-blue); font-weight: 600; text-decoration: none; }
.wiki-feed a:hover { text-decoration: underline; }
.wiki-feed .wiki-meta { color: #888; font-size: 0.78rem; margin-top: 3px; }
.wiki-empty { color: #888; font-style: italic; padding: 14px 0; }

/* specimen */
.specimen-card {
  display: flex;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  flex-wrap: wrap;
}
.specimen-img-wrap { flex: 0 0 260px; background: #eee; min-height: 220px; display: flex; align-items: center; justify-content: center; }
.specimen-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.specimen-body { padding: 22px 22px 22px 0; flex: 1; min-width: 220px; }
.specimen-body h3 { font-family: var(--serif); color: var(--yale-blue); margin: 0 0 6px; font-size: 1.3rem; font-style: italic; }
.specimen-body dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 0.88rem; margin: 12px 0 0; }
.specimen-body dt { color: #888; }
.specimen-body dd { margin: 0; }
.btn {
  margin-top: 18px;
  background: var(--yale-blue);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--yale-blue-light); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* countdown */
.countdown-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.countdown-item {
  background: var(--yale-blue-pale);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  text-align: center;
}
.countdown-item .num { font-family: var(--serif); font-size: 2.1rem; color: var(--yale-blue); font-weight: 700; }
.countdown-item .label { font-size: 0.82rem; color: #555; margin-top: 4px; }
.countdown-item .date { font-size: 0.72rem; color: #999; margin-top: 2px; }

/* facts */
.fact-card {
  margin: 0;
  padding: 24px 28px;
  border-left: 4px solid var(--accent);
  background: #fff;
  border-radius: 0 14px 14px 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: #333;
  transition: opacity 0.3s;
}

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 26px 24px 50px; color: #888; font-size: 0.8rem; }

@media (max-width: 560px) {
  .site-nav { display: none; }
  .weather-card { flex-direction: column; align-items: flex-start; }
}

/* shuttle */
.shuttle-list { display: flex; flex-direction: column; gap: 10px; }
.shuttle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.88rem;
}
.shuttle-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 12px;
  background: var(--yale-blue-light);
}
.shuttle-name { font-weight: 700; color: var(--yale-blue); min-width: 60px; }
.shuttle-route { color: #555; }
.shuttle-updated { margin-left: auto; color: #999; font-size: 0.78rem; white-space: nowrap; }
.shuttle-empty { color: #888; font-style: italic; padding: 10px 0; }

/* trivia */
.trivia-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 28px;
  min-height: 120px;
}
.trivia-question {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0 0 20px;
}
.trivia-options { display: grid; gap: 10px; }
.trivia-option {
  text-align: left;
  background: var(--yale-blue-pale);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
.trivia-option:hover:not(:disabled) { border-color: var(--yale-blue-light); transform: translateX(2px); }
.trivia-option:disabled { cursor: default; }
.trivia-option.correct { background: rgba(46,125,50,0.15); border-color: var(--good); font-weight: 600; }
.trivia-option.incorrect { background: rgba(198,40,40,0.1); border-color: #c62828; }
.trivia-explain { margin-top: 18px; font-size: 0.9rem; color: #555; font-style: italic; }
.trivia-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; gap: 12px; }
.trivia-score { font-weight: 600; color: var(--yale-blue); font-size: 0.9rem; }
.trivia-error { color: #c62828; font-size: 0.85rem; margin-top: 10px; }
