:root {
  --bg: #f4f1ec;
  --paper: #fffdf9;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e5e4;
  --accent: #7c3aed;
  --accent-2: #0891b2;
  --ad-label: #a8a29e;
  --max-w: 720px;
  --font: "Georgia", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.7;
  font-size: 18px;
}

a { color: #6d28d9; }

.publisher-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #78716c;
  margin-bottom: 0.5rem;
}

.demo-chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #f5f5f4;
  color: #78716c;
  margin-left: 0.5rem;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.page {
  max-width: calc(var(--max-w) + 4rem);
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}

.article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
}

.article-meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.article-meta .dot::before {
  content: "·";
  margin-right: 0.35rem;
  color: #d6d3d1;
}

.article h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  line-height: 1.2;
  font-weight: 700;
}

.lead {
  font-size: 1.12rem;
  color: #44403c;
  margin: 0 0 1.5rem;
  line-height: 1.55;
}

.article h2 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: #292524;
}

.article p {
  margin: 0 0 1.1rem;
  text-align: justify;
  hyphens: auto;
}

.ad-slot {
  margin: 1.75rem 0;
  padding: 0.85rem 0 0.25rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fafaf9;
}

.ad-slot__label {
  font-family: var(--sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ad-label);
  text-align: center;
  margin-bottom: 0.65rem;
}

.ad-slot__frame {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90px;
}

/* Banner creative */
#creative {
  width: 100%;
  max-width: 728px;
  height: 90px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s;
  text-align: center;
  padding: 0 1rem;
}

#creative:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}

#creative.pa-clicked {
  outline: 3px solid #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2);
}

/* OLV creative */
#olv-wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: #0c0a09;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

#olv-wrap.pa-clicked {
  outline: 3px solid #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2);
}

#olv-wrap video {
  width: 100%;
  display: block;
  vertical-align: top;
}

.ad-slot--video .ad-slot__frame {
  min-height: auto;
  padding: 0 0.5rem 0.5rem;
}

.page-note {
  max-width: calc(var(--max-w) + 4rem);
  margin: 1.25rem auto 0;
  padding: 0 1.5rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
}

.page-note code {
  font-size: 0.82em;
  background: #e7e5e4;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* Event log — dark panel below article */
#pa-event-log {
  max-width: calc(var(--max-w) + 4rem);
  margin: 1.5rem auto 2rem !important;
  border-radius: 8px !important;
}

@media (max-width: 760px) {
  .article p { text-align: left; }
  #creative { height: 80px; font-size: 0.85rem; }
}
