:root {
  --bg: #0e1116;
  --bg-elev: #161a22;
  --bg-card: #1a1f2a;
  --bg-card-hover: #222838;
  --border: #2a3040;
  --border-strong: #3a4258;
  --text: #e6e8ec;
  --text-dim: #9aa3b2;
  --text-muted: #6b7486;
  --accent: #7ec8c8;
  --accent-2: #c9a26a;
  --accent-3: #b888c8;
  --danger: #c87878;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.25);
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(14,17,22,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.brand-mark { color: var(--accent); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title { font-weight: 700; font-size: 16px; color: var(--text); }
.brand-sub { font-size: 12px; color: var(--text-dim); }
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover {
  color: var(--text);
  background: var(--bg-elev);
  text-decoration: none;
}

main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 60px; }
section { padding: 48px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

.intro { padding-top: 64px; }
.intro-inner { max-width: 760px; }
.intro h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.lede {
  font-size: 18px;
  color: var(--text-dim);
  margin: 0 0 20px;
  max-width: 640px;
}
.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.intro-meta span { background: var(--bg-elev); padding: 4px 10px; border-radius: 999px; }
.intro-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--accent);
  color: #0e1116;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: #92d8d8; text-decoration: none; color: #0e1116; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn.ghost:hover { background: var(--bg-elev); }

.section-head { margin-bottom: 28px; }
.section-head h2 {
  font-size: 28px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.section-sub { color: var(--text-dim); margin: 0; font-size: 15px; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn.active {
  background: var(--accent);
  color: #0e1116;
  border-color: var(--accent);
  font-weight: 600;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  cursor: pointer;
  outline: none;
  position: relative;
}
.entry-card:hover, .entry-card:focus-visible {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}
.entry-card.expanded { border-color: var(--accent); }
.card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}
.card-swatch {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.card-cat {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 4px;
}
.card-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: var(--text);
}
.card-teaser {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}
.card-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
}
.card-note p { margin: 0; }
.bookmark-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
  flex-shrink: 0;
}
.bookmark-btn:hover { color: var(--accent-2); border-color: var(--accent-2); }
.bookmark-btn.active { color: var(--accent-2); border-color: var(--accent-2); background: rgba(201,162,106,0.1); }
.archive-hint {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.timeline li {
  position: relative;
  padding-left: 36px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.t-year {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: rgba(126,200,200,0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.timeline h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--text);
}
.timeline p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

.submit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.submit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.submit-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--text);
}
.submit-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 14px;
}
.submit-card li { margin-bottom: 6px; }
.submit-note { color: var(--text-muted); font-size: 13px; }

.collection-panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 80px;
}
.collection-empty { color: var(--text-muted); margin: 0; font-size: 14px; }
.collection-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.collection-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.collection-item:last-child { border-bottom: none; }
.collection-item-title { color: var(--text); }
.collection-item-cat { color: var(--text-muted); font-size: 12px; }
.collection-item-remove {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.collection-item-remove:hover { color: var(--danger); border-color: var(--danger); }

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.note {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.note h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--text);
}
.note p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-dim); }
.footer-col strong { color: var(--text); font-size: 15px; }
.footer-col a { color: var(--text-dim); }
.footer-col a:hover { color: var(--accent); }

@media (max-width: 780px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { width: 100%; overflow-x: auto; }
  .intro { padding-top: 40px; }
  section { padding: 36px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 16px; }
  .archive-grid { grid-template-columns: 1fr; }
  .card-top { grid-template-columns: auto 1fr; }
  .bookmark-btn { grid-column: 2; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
