:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #111827;
  --muted: #6b7280;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-pale: rgba(79, 70, 229, 0.08);
  --accent-pale-2: rgba(124, 58, 237, 0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
h1, h2, h3, p { margin: 0; }

/* ─── TOPBAR ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.35);
}
.brand-name { font-weight: 700; font-size: 0.95rem; }
.brand-sub { display: none; }
.nav { display: flex; gap: 2px; }
.nav a {
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: background 130ms, color 130ms;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }

/* ─── MAIN CONTAINER ─── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

/* ─── HERO ─── */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-copy { padding: 52px 52px 48px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-pale);
  padding: 4px 12px;
  border-radius: 999px;
}
h1 {
  margin-top: 18px;
  font-size: clamp(1.9rem, 3.2vw, 3.2rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}
.hero-copy > p {
  margin-top: 18px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 42ch;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: transform 120ms, box-shadow 120ms, opacity 120ms;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}
.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1rem; font-weight: 700; }
.hero-stats span { font-size: 0.8rem; color: var(--muted); margin-top: 3px; }
.hero-visual {
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe, #c7d2fe);
  min-height: 380px;
}
.hero-visual img { filter: saturate(0.85) brightness(1.05); }

/* ─── CAROUSEL ─── */
.carousel { position: absolute; inset: 0; }
.carousel-track { display: flex; height: 100%; transition: transform 550ms cubic-bezier(0.4, 0, 0.2, 1); }
.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
  color: #fff;
  overflow: hidden;
}
.carousel-slide::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 70%);
  pointer-events: none;
}
.carousel-slide[data-theme="gpt"] { background: linear-gradient(150deg, #0f766e 0%, #10a37f 55%, #34d399 100%); }
.carousel-slide[data-theme="claude"] { background: linear-gradient(150deg, #7c2d12 0%, #d97757 55%, #f0a58a 100%); }
.carousel-slide[data-theme="grok"] { background: linear-gradient(150deg, #020617 0%, #1e293b 55%, #475569 100%); }
.carousel-slide[data-theme="gemini"] { background: linear-gradient(150deg, #1e3a8a 0%, #4285f4 45%, #a855f7 100%); }
.carousel-slide[data-theme="seedance"] { background: linear-gradient(150deg, #831843 0%, #db2777 50%, #f472b6 100%); }
.slide-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}
.slide-content { position: relative; z-index: 1; }
.slide-tag {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  margin-bottom: 14px;
}
.slide-title { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.slide-desc { margin-top: 14px; font-size: 0.95rem; line-height: 1.75; max-width: 34ch; color: rgba(255, 255, 255, 0.9); }
.slide-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.slide-chips span {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.carousel-dots {
  position: absolute;
  bottom: 20px;
  right: 48px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.4);
  transition: width 260ms, background 260ms;
}
.carousel-dot.is-active { width: 24px; background: #fff; }

/* ─── TOPIC GRID ─── */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 150ms, transform 150ms, box-shadow 150ms;
}
.topic-card:hover {
  border-color: rgba(79, 70, 229, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(79, 70, 229, 0.1);
}
.topic-card h2 { font-size: 0.9rem; line-height: 1.45; font-weight: 600; }
.topic-card h2 a { color: var(--text); }
.topic-card h2 a:hover { color: var(--accent); }
.topic-card p { margin-top: 6px; font-size: 0.8rem; line-height: 1.65; color: var(--muted); }

/* ─── CONTENT GRID ─── */
.content-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 22px;
  margin-bottom: 24px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.feed { padding: 22px 22px 16px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 { font-size: 1.1rem; font-weight: 700; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.search, select {
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.85rem;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}
.search input {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  width: min(180px, 38vw);
  font-size: 0.85rem;
  font-family: inherit;
}
select { padding: 0 12px; cursor: pointer; font-family: inherit; }
.post-card {
  padding: 14px 16px;
  margin-top: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 140ms, box-shadow 140ms;
}
.post-card:hover {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 2px 12px rgba(79, 70, 229, 0.08);
}
.featured {
  background: linear-gradient(135deg, var(--accent-pale), var(--accent-pale-2));
  border-color: rgba(79, 70, 229, 0.18);
}
.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
}
.tag { color: var(--accent); font-weight: 600; }
.post-card h3 { margin-top: 7px; font-size: 0.95rem; line-height: 1.5; font-weight: 600; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { margin-top: 5px; font-size: 0.82rem; line-height: 1.7; color: var(--muted); }
.post-links { display: flex; gap: 14px; margin-top: 12px; }

/* ─── SIDEBAR ─── */
.sidebar { display: grid; gap: 18px; align-content: start; }
.side-block { padding: 20px; height: fit-content; }
.chips.stacked { display: grid; gap: 8px; }
.chips span {
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.84rem;
}
.chips span strong { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 3px; }
.chips span small { color: var(--muted); font-size: 0.78rem; }
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 0.84rem;
  transition: background 130ms, border-color 130ms;
}
.chip.is-active {
  background: var(--accent-pale);
  border-color: rgba(79, 70, 229, 0.3);
  color: var(--accent);
  font-weight: 600;
}
.filter-row { margin-bottom: 12px; }
.timeline { display: grid; gap: 9px; }
.timeline div {
  padding: 12px 13px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.timeline strong { display: block; font-weight: 600; font-size: 0.87rem; margin-bottom: 3px; }
.timeline span { display: block; color: var(--muted); font-size: 0.8rem; }

/* ─── BOTTOM SECTIONS ─── */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.about { font-size: 0.92rem; line-height: 1.85; color: var(--muted); margin-top: 14px; }
.steps {
  margin: 14px 0 0;
  padding-left: 20px;
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--muted);
}
.steps li + li { margin-top: 4px; }

/* ─── SUB-PAGES ─── */
.archive-page, .service-page, .post-page {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 28px 80px;
}
.archive-head, .post-header {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.archive-head p, .post-header p { margin-top: 10px; color: var(--muted); line-height: 1.8; }
.archive-list, .service-grid, .doc-grid { display: grid; gap: 13px; margin-top: 16px; }
.archive-item, .service-detail, .doc-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 140ms, border-color 140ms;
}
.archive-item:hover, .service-detail:hover, .doc-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(79, 70, 229, 0.25);
}
.archive-item h2, .service-detail h2, .doc-card h2 { margin-top: 8px; font-size: 1.05rem; }
.archive-item p, .service-detail p, .doc-card p { margin-top: 6px; color: var(--muted); line-height: 1.8; }
.post-meta-inline { display: flex; gap: 16px; margin-top: 12px; color: var(--muted); font-size: 0.86rem; }
.post-body {
  margin-top: 16px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.post-body p { margin-bottom: 14px; line-height: 1.9; color: var(--text); }
.article-section + .article-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.article-section h2 { margin-bottom: 12px; font-size: 1.2rem; }
.article-sources {
  display: flex; gap: 14px; margin-top: 26px;
  padding-top: 20px; border-top: 1px solid var(--border); flex-wrap: wrap;
}
.article-sources a, .doc-actions a, .service-detail a { color: var(--accent); font-weight: 500; }
.article-sources a:hover, .doc-actions a:hover, .service-detail a:hover { text-decoration: underline; }
.code-block {
  margin-top: 14px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 10px;
  overflow-x: auto; background: var(--surface-2); color: var(--accent);
}
.code-block code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.88rem; }
.doc-actions { display: flex; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.status-box { display: grid; gap: 10px; margin-top: 16px; }
.status-box > div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.status-box strong, .status-box span { display: block; }
.status-box strong { font-weight: 600; margin-bottom: 3px; }
.status-box span { color: var(--muted); font-size: 0.85rem; }
.feed-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ─── ARTICLE INFO BLOCKS ─── */
.article-info-blocks { display: grid; gap: 14px; margin-bottom: 4px; }
.info-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.info-block-body { flex: 1; min-width: 0; }
.info-block-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.info-block-title { font-size: 1rem; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.info-block-desc { font-size: 0.84rem; color: var(--muted); line-height: 1.75; }
.info-block-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.info-block-link:hover { text-decoration: underline; }
.promo-code {
  display: inline-block;
  margin: 0 4px;
  padding: 2px 10px;
  font-size: 0.82rem;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-pale);
  border: 1px solid rgba(79,70,229,0.25);
  border-radius: 6px;
  letter-spacing: 0.04em;
  user-select: all;
}
.info-block-qr {
  flex-shrink: 0;
  text-align: center;
}
.qr-box {
  width: 72px;
  height: 72px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
}
.info-block-qr small {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 5px;
  white-space: nowrap;
}
@media (max-width: 500px) {
  .info-block { flex-direction: column; align-items: flex-start; }
  .info-block-qr { align-self: center; }
}

/* ─── LINK CARDS ─── */
.link-cards { display: grid; gap: 10px; margin-top: 16px; }
.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 140ms, box-shadow 140ms, transform 140ms;
}
.link-card:hover {
  border-color: rgba(79, 70, 229, 0.5);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}
.link-card-body { flex: 1; min-width: 0; }
.link-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
}
.link-card-title { font-size: 0.95rem; font-weight: 600; line-height: 1.4; }
.link-card-desc { font-size: 0.82rem; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.link-card-arrow {
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform 140ms, opacity 140ms;
}
.link-card:hover .link-card-arrow { transform: translateX(3px); opacity: 1; }

/* ─── HAMBURGER TOGGLE ─── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 220ms ease, opacity 220ms ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── RESPONSIVE ─── */
@media (max-width: 920px) {
  .hero, .content-grid, .bottom-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 340px; order: -1; }
  .topic-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-copy { padding: 30px; }
  .topbar-inner { padding: 0 18px; }
  main { padding: 20px 18px 60px; }
  .archive-page, .service-page, .post-page { padding: 0 18px 60px; }
}
@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 10px 18px 16px;
    gap: 2px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: 12px 14px;
    font-size: 1rem;
    border-radius: 10px;
  }
  .topbar { position: sticky; top: 0; z-index: 100; }
}
@media (max-width: 600px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .post-meta-inline { flex-direction: column; gap: 4px; }
  .toolbar { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  select { flex: 1; }
}
@media (max-width: 400px) {
  .topic-grid { grid-template-columns: 1fr; }
}
