:root {
  --bg: #ffffff;
  --bg-soft: #e3e7ed;
  --bg-dark: #0a0d17;
  --text: #0b0c0f;
  --text-soft: #4b5158;
  --text-faint: #5f6873;
  --border: #e6e8ec;
  --accent: #0080d0;
  --accent-ink: #0074bd;
  --accent-dark: #0069a8;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(16,18,22,0.05);
  --shadow-md: 0 8px 30px rgba(16,18,22,0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased; letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
summary:focus-visible { outline-offset: -3px; }
.article-cta :focus-visible { outline-color: #70b0e0; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600; transition: top .2s ease;
}
.skip-link:focus { top: 12px; }
main { scroll-margin-top: 88px; }
.container { width: min(1140px, 92%); margin: 0 auto; }
h1 { font-family: 'Sora', 'Inter', sans-serif; letter-spacing: -0.035em; line-height: 1.12; font-size: clamp(1.7rem, 4vw, 2.5rem); }

body { padding-top: 64px; }
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform: scaleX(0); transform-origin: left; z-index: 101; background: linear-gradient(90deg, var(--accent), #70b0e0); }
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(230,232,236,0.8);
  transition: box-shadow .25s ease;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; transition: height .25s ease; }
nav.scrolled { box-shadow: 0 6px 24px rgba(16,18,22,0.08); }
nav.scrolled .nav-inner { height: 56px; }
nav.scrolled .logo-img { height: 36px; }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 0.9rem; color: var(--text-soft); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-social { display: flex; align-items: center; gap: 4px; margin-right: 4px; }
.nav-social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--text-faint); transition: color .18s ease, background .18s ease; }
.nav-social a:hover { color: var(--accent); background: var(--bg-soft); }
@media (max-width: 1100px) { .nav-social { display: none; } }
.menu-btn { display: none; background: none; border: 1px solid var(--border); border-radius: 10px; width: 42px; height: 42px; cursor: pointer; place-items: center; }
.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: 12px 4% 20px; background: #fff; border-bottom: 1px solid var(--border); max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; }
.mobile-menu a { flex-shrink: 0; padding: 13px 14px; border-radius: 10px; font-weight: 550; font-size: 0.98rem; color: var(--text-soft); }
.mobile-menu a:hover { background: var(--bg-soft); color: var(--text); }
.mobile-menu .btn { margin-top: 8px; }
.mobile-menu .btn-primary { color: #fff; }
.mobile-menu .btn-primary:hover { background: #000; }
.mobile-menu.open { display: flex; }
.logo-img { height: 44px; width: auto; display: block; transition: height .25s ease; }
.footer-brand .logo-img { height: 26px; }
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #000; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  cursor: pointer; border: none; white-space: nowrap;
}
.btn-accent { background: var(--accent-ink); color: #fff; }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,128,208,0.3); background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }
.btn-sm { padding: 9px 20px; font-size: 0.88rem; }

.article-page { max-width: 780px; padding: 56px 0 80px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-faint); font-size: 0.9rem; font-weight: 600; margin-bottom: 36px; }
.back-link:hover { color: var(--accent-ink); }
.news-meta { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; color: var(--text-faint); font-weight: 500; margin-bottom: 14px; }
.ptag { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.article-page h1 { margin-bottom: 32px; overflow-wrap: anywhere; }

.article { font-size: 0.99rem; color: var(--text-soft); line-height: 1.75; overflow-wrap: anywhere; }
.article p { margin-bottom: 16px; }
.article strong { color: var(--text); }
.article h4, .article h2 { color: var(--text); font-family: 'Sora', 'Inter', sans-serif; font-size: 1.2rem; margin: 30px 0 12px; letter-spacing: -0.02em; }
.article ul, .article ol { margin: 0 0 16px 22px; }
.article li { margin-bottom: 8px; }
.article a { color: var(--accent-ink); font-weight: 600; }
.article code {
  font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace; font-size: 0.84em;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 7px; color: var(--text);
}
.article .cmd { display: block; background: var(--bg-dark); border-radius: 10px; padding: 13px 16px; margin: 10px 0 16px; overflow-x: auto; }
.article .cmd code { background: none; border: none; padding: 0; color: #7ce38b; font-size: 0.85rem; overflow-wrap: normal; }
.article .warn { background: #fff8e6; border: 1px solid #f0dfae; border-radius: 12px; padding: 16px 20px; margin-bottom: 18px; font-size: 0.93rem; }
.article .warn strong { color: #8a6d00; }
.article .step-img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); margin: 12px 0 22px; display: block; box-shadow: var(--shadow-sm); }
.article .btn, .article-cta .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.archive-list { display: grid; gap: 14px; margin-top: 22px; }
.archive-item { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.archive-item time { color: var(--text-faint); font-size: 0.82rem; font-weight: 600; }
.archive-item a { color: var(--text); font-weight: 700; }
.archive-item a:hover { color: var(--accent-ink); }
.archive-note { background: var(--accent-soft); border: 1px solid rgba(0,128,208,0.18); border-radius: 14px; padding: 16px 18px; color: var(--text-soft); }
.legacy-article img, .legacy-article video, .legacy-article iframe { max-width: 100%; height: auto; }
.legacy-article video { display: block; margin-bottom: 8px; background: var(--bg-dark); object-fit: contain; }
.legacy-article iframe { aspect-ratio: 16 / 9; width: 100%; border: 0; }
.legacy-article .wp-caption { max-width: 100%; }

.article-cta {
  margin-top: 56px; text-align: center; background: var(--bg-dark); color: #fff;
  border-radius: 22px; padding: 48px 36px;
}
.article-cta h2 { font-family: 'Sora', 'Inter', sans-serif; font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -0.03em; margin-bottom: 12px; }
.article-cta p { color: rgba(255,255,255,0.6); margin-bottom: 26px; }

footer { border-top: 1px solid var(--border); padding: 70px 0 40px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 56px; }
.footer-brand p { color: var(--text-soft); font-size: 0.9rem; margin-top: 16px; max-width: 260px; }
.footer-col h4 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 18px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { color: var(--text-soft); font-size: 0.92rem; font-weight: 500; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: 28px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 0.84rem; }

.ai-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 95;
  display: flex; align-items: center; gap: 10px;
  background: var(--accent-ink); color: #fff; border-radius: 999px;
  padding: 14px 22px 14px 17px; font-weight: 650; font-size: 0.9rem; letter-spacing: -0.01em;
  box-shadow: 0 10px 34px rgba(0,128,208,0.45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.ai-fab:hover { transform: translateY(-3px); box-shadow: 0 16px 46px rgba(0,128,208,0.55); background: var(--accent-dark); }
.ai-fab .pulse {
  position: absolute; top: -3px; right: -3px; width: 13px; height: 13px;
  border-radius: 50%; background: #28c840; border: 2.5px solid #fff;
}
.to-top {
  position: fixed; right: 24px; bottom: 92px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; color: var(--text); cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(10px); transition: opacity .25s ease, transform .25s ease;
}
.to-top.show { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.to-top:hover { transform: translateY(-2px); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .nav-cta .btn-ghost { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 901px) {
  .mobile-menu.open { display: none; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .nav-links { gap: 16px; white-space: nowrap; }
}
@media (max-width: 560px) {
  .article-page { padding: 40px 0 64px; }
  .nav-cta .btn-primary { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .ai-fab { padding: 15px; }
  .ai-fab .lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
