/* ── Muji Design System ── */
:root {
  --bg: #FAFAF7;
  --bg-card: #FFFFFF;
  --text: #2C2C2C;
  --text-dim: #888888;
  --accent: #8B7355;
  --muji-red: #7F0019;
  --muji-red-hover: #A30020;
  --border: #E8E4DE;
  --hover: #F0EDE6;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", "PingFang TC", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: white; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--muji-red); }
img { max-width: 100%; }

/* Decorative Muji red accents */
.text-red { color: var(--muji-red); }
.feed-name.text-red { font-weight: 500; }
.border-red { border-color: var(--muji-red); }
/* Muji red badge — like their iconic red price tag */
.badge-red {
  display: inline-block; font-size: 0.65rem; padding: 0.1rem 0.45rem;
  background: var(--muji-red); color: white; letter-spacing: 0.05em;
}
.muji-accent {
  border-bottom: 1px solid var(--muji-red);
  padding-bottom: 0.3rem; display: inline-block;
}
/* Logo red square — Muji's signature mark */
.logo-mark {
  display: inline-block; width: 0.55rem; height: 0.55rem;
  background: var(--muji-red); margin-right: 0.4rem; vertical-align: middle;
}

/* Layout */
.site-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.reading { max-width: 720px; margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem;
}
.site-logo { font-size: 0.875rem; letter-spacing: 0.05em; }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { font-size: 0.875rem; color: var(--text-dim); }
.site-nav a:hover, .site-nav a.active { color: var(--muji-red); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 6rem; padding: 3rem 0;
  font-size: 0.875rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-title { font-weight: 500; margin-bottom: 0.75rem; font-size: 0.875rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: var(--text-dim); font-size: 0.875rem; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  text-align: center; font-size: 0.75rem; color: var(--text-dim);
}

/* Typography */
h1 { font-size: 2rem; font-weight: 500; line-height: 1.4; letter-spacing: 0.02em; margin-bottom: 1.5rem; }
h2 { font-size: 1.5rem; font-weight: 500; line-height: 1.4; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.2rem; font-weight: 500; margin: 2rem 0 0.75rem; }
p { margin-bottom: 1.2rem; font-size: 0.95rem; }
.section-title {
  font-size: 0.8rem; font-weight: 500; color: var(--text-dim);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.5rem;
}

/* Cards */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; padding: 1.5rem;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.card-link { display: block; border-bottom: none; }

/* Buttons */
.btn {
  display: inline-block; padding: 0.75rem 1.5rem; border-radius: 6px;
  font-size: 0.875rem; transition: all 0.2s; border-bottom: none;
}
.btn-primary { background: var(--text); color: white; border: none; }
.btn-primary:hover { opacity: 0.9; color: white; }
.btn-outline { border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--hover); color: var(--text); }

/* Utilities */
.py-section { padding-top: 4rem; padding-bottom: 4rem; }
.py-hero { padding-top: 6rem; padding-bottom: 4rem; }
.text-center { text-align: center; }
.text-dim { color: var(--text-dim); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.gap-4 { gap: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.grid { display: grid; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.inline-block { display: inline-block; }
.italic { font-style: italic; }
.border-b { border-bottom: 1px solid var(--border); }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.ml-8 { margin-left: 2rem; }
.ml-4 { margin-left: 1rem; }
.list-disc { padding-left: 1.5rem; }
.list-disc li { margin-bottom: 0.4rem; font-size: 0.875rem; }
code {
  background: var(--hover); padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.85em;
}
pre {
  background: #f5f4f0; padding: 1.2rem; border-radius: 6px;
  overflow-x: auto; font-size: 0.85rem; line-height: 1.5; margin-bottom: 1rem;
}
pre code { background: none; padding: 0; }
blockquote {
  border-left: 3px solid var(--border); padding-left: 1rem;
  color: var(--text-dim); margin: 1.5rem 0; font-size: 1rem;
}
.tag {
  display: inline-block; font-size: 0.75rem; padding: 0.2rem 0.5rem;
  background: var(--hover); border-radius: 3px; margin-right: 0.25rem;
}
.badge {
  display: inline-block; font-size: 0.7rem; padding: 0.15rem 0.5rem;
  background: var(--accent); color: white; border-radius: 3px;
}
/* Feed */
.feed-item { margin-bottom: 1rem; }
.feed-reply { margin-left: 2rem; border-left: 2px solid var(--accent); }
.feed-meta { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; font-size: 0.875rem; }
.feed-name { font-weight: 500; }
.feed-id { color: var(--text-dim); font-size: 0.75rem; }
.feed-time { color: var(--text-dim); font-size: 0.75rem; margin-left: auto; }
.feed-ref { background: var(--hover); padding: 0.5rem; border-radius: 4px; font-size: 0.8rem; margin-bottom: 0.5rem; color: var(--text-dim); }
/* Agent card */
.agent-card .anchor-badge { background: var(--accent); color: white; padding: 0.15rem 0.5rem; border-radius: 3px; font-size: 0.7rem; }

@media (max-width: 640px) {
  .site-nav { gap: 0.8rem; }
  .site-nav a { font-size: 0.8rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
