@font-face {
  font-family: 'Geist';
  src: url('https://musechain.io/fonts/geist/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-sand: #fbf9f5;
  --bg-card: #ffffff;
  --text-main: #1d2125;
  --text-muted: #5e6c76;
  --border-subtle: #e6dfd5;
  --border-strong: #cfc4b4;
  --slate-blue: #2c4251;
  --amber-soft: #f4a261;
  --amber-bg: #fff6ee;
  --sage-green: #2a9d8f;
  --sage-bg: #f0f8f6;
  --lime-accent: #ccff00;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-subtle: 0 4px 18px rgba(30, 35, 40, 0.04);
  --shadow-card: 0 6px 24px rgba(30, 35, 40, 0.07);
}

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

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-sand);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--slate-blue);
  text-decoration-color: var(--amber-soft);
  text-underline-offset: 3px;
  transition: all 0.15s ease;
}
a:hover {
  color: #0d1e2b;
  text-decoration-color: var(--slate-blue);
}

.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.banner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.compass-badge {
  font-size: 26px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
}

.site-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.site-sub {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--slate-blue);
  background: #ece5dc;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 24px 64px 24px;
}

/* HERO */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 56px;
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  max-height: 440px;
  overflow: hidden;
  background: #e9e3da;
}

.hero-img {
  width: 100%;
  height: 100%;
  max-height: 440px;
  object-fit: cover;
  display: block;
}

.handwritten-sticker {
  position: absolute;
  background: #fffef8;
  color: #4a3e2a;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 14px;
  padding: 8px 16px;
  border: 1px dashed #c0b094;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: rotate(-1.5deg);
  pointer-events: none;
}

.hero-content {
  padding: 36px 40px;
}

.kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--slate-blue);
  margin-bottom: 8px;
}

.hero-content h1 {
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--slate-blue);
  margin-bottom: 16px;
}

.hero-content .lead {
  font-size: 18px;
  line-height: 1.6;
  color: #3b4249;
  max-width: 860px;
  margin-bottom: 24px;
}

.meta-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  flex-wrap: wrap;
}

.pulse-tag {
  color: var(--sage-green);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pulse-tag::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--sage-green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.2);
}

/* SECTION COMMON */
.section-block {
  margin-bottom: 56px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 12px;
}

.step-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--amber-soft);
  font-feature-settings: "tnum";
}

.section-heading h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--slate-blue);
}

.section-heading p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* GRID LAYOUTS */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

/* CARDS */
.compass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.compass-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.card-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.card-tag.amber {
  background: var(--amber-bg);
  color: #a35c24;
}
.card-tag.blue {
  background: #edf3f7;
  color: var(--slate-blue);
}
.card-tag.green {
  background: var(--sage-bg);
  color: #1a6d63;
}

.compass-card h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}

.compass-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.annotation {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: #645543;
  background: #faf6f0;
  padding: 8px 12px;
  border-left: 2px solid var(--amber-soft);
  margin-bottom: 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.card-action {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--slate-blue);
}
.card-action:hover {
  text-decoration: underline;
}

/* ROOM MATCHER */
.room-matcher-box {
  background: #fdfbf7;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.matcher-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  margin-top: 20px;
}

.matcher-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-blue);
}

.select-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
}

.radio-pill-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}
.pill:hover {
  border-color: var(--amber-soft);
  background: var(--amber-bg);
}

.primary-btn {
  background: var(--slate-blue);
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 8px;
}
.primary-btn:hover {
  background: #192731;
}

.match-result-card {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.room-chip {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--amber-soft);
  letter-spacing: 0.08em;
}

.result-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--slate-blue);
  margin-top: 4px;
  margin-bottom: 12px;
}

#result-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.result-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 16px;
}

.mini-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #796d5b;
  display: block;
  margin-bottom: 2px;
}

.detail-box p {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
}

/* GUIDES ACCORDION */
.guide-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.guide-item summary {
  padding: 18px 24px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  user-select: none;
}
.guide-item summary::-webkit-details-marker {
  display: none;
}

.guide-pill {
  font-size: 11px;
  font-weight: 700;
  background: #e9ecef;
  color: var(--slate-blue);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.status-ok {
  margin-left: auto;
  font-size: 12px;
  color: var(--sage-green);
  font-weight: 600;
}
.status-warn {
  margin-left: auto;
  font-size: 12px;
  color: #d97706;
  font-weight: 600;
}

.guide-body {
  padding: 0 24px 24px 24px;
  font-size: 14px;
  color: #333a40;
  border-top: 1px solid var(--border-subtle);
  margin-top: 8px;
  padding-top: 16px;
}

.step-list {
  margin: 12px 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.curator-note {
  background: #fdfaf2;
  border-left: 3px solid var(--amber-soft);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  margin-top: 16px;
}

/* SOURCE LIBRARY & LIVE SENTINEL */
.library-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
}

.library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.secondary-btn {
  background: #fff;
  border: 1px solid var(--border-strong);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--slate-blue);
}
.secondary-btn:hover {
  background: #f3efe8;
}

.source-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 20px;
}

.source-table th {
  text-align: left;
  border-bottom: 2px solid var(--border-subtle);
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.source-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.status-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.status-pill.green {
  background: #e6f6f3;
  color: #127568;
}
.status-pill.amber {
  background: #fdf2e9;
  color: #b45309;
}

.audit-log-terminal {
  background: #181d22;
  color: #c7d2de;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  overflow: hidden;
}

.terminal-bar {
  background: #111417;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  color: #8c9ba5;
  font-size: 11px;
}

.audit-log-terminal pre {
  padding: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

/* COMMUNITY STORIES */
.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
}

.story-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.avatar {
  font-size: 24px;
  background: #f1ede6;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-author strong {
  display: block;
  font-size: 14px;
  color: var(--slate-blue);
}

.story-author small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.story-card p {
  font-size: 14px;
  color: #384249;
  line-height: 1.6;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #f4eee6;
  padding: 40px 24px;
}

.footer-wrap {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-sub {
  margin-top: 4px;
  font-size: 12px;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--slate-blue);
  font-weight: 500;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 24px;
  }
  .hero-content {
    padding: 24px;
  }
  .matcher-wrapper {
    grid-template-columns: 1fr;
  }
  .banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    flex-wrap: wrap;
    gap: 8px;
  }
}