:root {
  --bg: #0b0c10;
  --panel: #111318;
  --text: #e6e7ea;
  --muted: #a7adbb;
  --accent: #b194d6; /* soft taro-lilac */
  --accent-2: #6b5bb6;
  --code-bg: #0f1117;
  --border: #22242b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}
html,
body {
  height: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  background: linear-gradient(180deg, #090a0f 0%, #0d1016 100%);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
}
a {
  color: var(--accent);
}
.wrap {
  max-width: 960px;
  width: 100%;
}
.hero {
  background: linear-gradient(145deg, color-mix(in lab, var(--panel) 90%, var(--accent) 5%) 0%, var(--panel) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow), inset 0 0 0 1px color-mix(in lab, var(--accent) 10%, transparent);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -30%;
  width: 60%;
  height: 160%;
  background: radial-gradient(circle at center, color-mix(in lab, var(--accent) 25%, transparent) 0%, transparent 70%);
  transform: rotate(25deg);
  opacity: 0.25;
  pointer-events: none;
}

.hero .meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero .meta a {
  color: var(--accent);
  text-decoration: none;
}

.hero .meta a:hover {
  text-decoration: underline;
}
h1 {
  font-size: clamp(1.6rem, 2.6vw + 1rem, 2.6rem);
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: 0.2px;
}
.subtitle {
  color: var(--muted);
  margin: 0 0 8px;
}
.tag {
  display: inline-flex;
  gap: 0.5ch;
  align-items: center;
  background: color-mix(in lab, var(--accent) 16%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in lab, var(--accent) 40%, var(--border));
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.content {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
section h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}
p {
  margin: 0 0 12px;
}
ul {
  padding-left: 20px;
  margin: 0 0 12px;
}

pre {
  background: var(--code-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  overflow: auto;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.95rem;
}

.demo {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 8px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.hint {
  color: var(--muted);
  font-size: 0.92rem;
}
.footer {
  color: var(--muted);
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
}

/* ===== Demo styles using OBEM naming ===== */
.my_element {
  border: 1px dashed var(--accent);
  border-radius: 12px;
  padding: 12px;
  position: relative;
}
.my_element-title {
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 6px;
}
.my_element-children {
  background: color-mix(in lab, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in lab, var(--accent) 40%, var(--border));
  border-radius: 10px;
  padding: 10px;
  margin: 6px 0;
}
.my_element-children--modifier {
  outline: 2px solid var(--accent-2);
  box-shadow: inset 0 0 0 9999px color-mix(in lab, var(--accent-2) 12%, transparent);
}
.my_element-children-item {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin: 4px 6px 0 0;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7fb;
    --panel: #ffffff;
    --text: #16181d;
    --muted: #55607a;
    --code-bg: #f3f5fa;
    --border: #e8e9ef;
  }
  body {
    background: linear-gradient(180deg, #f3f4f8 0%, #eef0f6 100%);
  }
}
