
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #f8fbff;
  --surface-soft: #eef4ff;
  --text: #16233f;
  --muted: #62718b;
  --line: #dfe6f0;
  --line-strong: #d3dce8;
  --primary: #1459dd;
  --primary-strong: #0f4bc0;
  --primary-soft: rgba(20, 89, 221, 0.08);
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 8px 20px rgba(17, 30, 61, .06);
  --shadow: 0 18px 42px rgba(17, 30, 61, .08);
  --shadow-lg: 0 28px 56px rgba(17, 30, 61, .10);
  --wrap: min(1240px, calc(100% - 36px));
  --header-height: 88px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 18px); }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, hsla(var(--v8-dna-hue, 220), 75%, 58%, var(--v8-orb-a, .06)), transparent 30%),
    radial-gradient(circle at 92% 2%, hsla(calc(var(--v8-dna-hue, 220) + 26), 70%, 52%, var(--v8-orb-b, .05)), transparent 34%),
    linear-gradient(180deg, #f9fbfe 0%, var(--bg) 24%, #f6f8fc 100%);
  color: var(--text);
  line-height: 1.65;
}
a { color: var(--primary); text-decoration: none; transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
a:hover { text-decoration: none; color: var(--primary-strong); }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip-link {
  position: absolute; left: 12px; top: 12px; background: #fff; padding: 10px 14px; border-radius: 12px;
  z-index: 100; transform: translateY(-220%); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(223,230,240,.95);
  transition: box-shadow .2s ease, background-color .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 12px 28px rgba(17, 30, 61, .08); }
.header-row {
  min-height: var(--header-height);
  display: grid; grid-template-columns: minmax(220px, 290px) minmax(0, 1fr); gap: 28px;
  align-items: center; padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; color: inherit; }
.brand:hover { text-decoration: none; color: inherit; }
.brand-logo, .brand-mark {
  width: 52px; height: 52px; border-radius: 16px; flex: 0 0 52px;
  background: linear-gradient(145deg, #edf3ff, #ffffff); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.brand-mark { display: grid; place-items: center; font-weight: 800; color: var(--primary); }
.brand-copy { min-width: 0; display: grid; gap: 2px; }
.brand-name { font-size: 1.32rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; color: var(--text); }
.brand-tagline {
  font-size: .9rem; color: var(--muted); line-height: 1.4; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.header-nav-shell { min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.nav-toggle {
  display: none; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 16px;
  width: 48px; height: 48px; padding: 0; box-shadow: var(--shadow-sm);
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); margin: 4px auto; border-radius: 3px; }
.primary-nav {
  min-width: 0; display: flex; justify-content: flex-end; overflow: hidden;
}
.nav-list {
  list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0;
  flex-wrap: nowrap; justify-content: flex-end; min-width: 0; overflow-x: auto; scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-item { position: relative; flex: 0 0 auto; }
.nav-item-row { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; white-space: nowrap; padding: 11px 13px; border-radius: 999px;
  color: var(--text); font-weight: 700; font-size: .98rem;
}
.nav-item.is-active > .nav-item-row > .nav-link,
.nav-link:hover { background: var(--primary-soft); color: var(--primary); }
.sub-toggle { border: 0; background: transparent; color: var(--muted); width: 28px; height: 28px; border-radius: 999px; }
.sub-toggle:hover { background: #f1f5fb; }
.sub-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; z-index: 20;
  padding: 10px; margin: 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); display: none;
}
.nav-item:hover .sub-menu,
.nav-item.is-open .sub-menu { display: block; }
.sub-menu a { display: block; padding: 10px 11px; border-radius: 10px; color: var(--text); }
.sub-menu a:hover { background: #f4f7fc; }

.breadcrumbs { padding: 16px 0 4px; }
.breadcrumbs-row { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .94rem; }
.breadcrumbs a { color: #5d6f8d; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span { color: #9aa8bf; }

.site-main { padding: 16px 0 84px; }
.hero-section, .page-hero, .section-block { padding: var(--v8-section-gap, 28px) 0; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .86fr); gap: 26px; align-items: stretch;
}
.hero-copy, .hero-panel, .card, .side-card, .empty-box, .simple-center {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.hero-copy {
  padding: 42px; background:
    radial-gradient(circle at top right, rgba(20, 89, 221, .08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.hero-panel {
  padding: 28px; background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-size: .82rem;
  font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
h1 {
  margin: 10px 0 14px; font-size: clamp(2.5rem, 5vw, 4.4rem); line-height: 1.03;
  letter-spacing: var(--v8-heading-tracking, -.04em);
}
.hero-summary, .page-hero .hero-summary {
  font-size: 1.08rem; color: #445574; max-width: 68ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 30px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px;
  border-radius: 999px; font-weight: 800; box-shadow: none;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 14px 24px rgba(20, 89, 221, .18); }
.btn-primary:hover { background: var(--primary-strong); color: #fff; transform: translateY(-1px); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { background: #f4f8ff; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0;
}
.hero-stats li {
  min-width: 0; padding: 14px 16px; border-radius: 16px; background: rgba(248, 251, 255, .95); border: 1px solid var(--line);
}
.hero-stats strong { display: block; font-size: 1.45rem; line-height: 1.1; }
.hero-stats span { color: var(--muted); font-size: .92rem; }
.check-list { padding-left: 18px; margin: 18px 0 0; color: #425370; }
.check-list li { margin-bottom: 10px; }
.inline-stats li { min-width: 120px; }
.compact-hero .wrap {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 34px;
}
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.chip, .pill-link {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 12px;
  background: #edf4ff; color: var(--primary); font-size: .9rem; font-weight: 700;
}
.chip:hover, .pill-link:hover { background: #dfeaff; color: var(--primary-strong); }
.section-head {
  display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 20px;
}
.section-head h2 {
  margin: 0 0 8px; font-size: clamp(1.72rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -.03em;
  text-wrap: balance;
}
.section-head p { margin: 0; color: var(--muted); max-width: 62ch; }
.section-highlight { position: relative; }
.alt-block {
  background: linear-gradient(180deg, rgba(235,242,255,.65), rgba(245,247,251,0));
}

.category-grid, .post-grid, .feature-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.card, .feature-card {
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover, .feature-card:hover {
  transform: translateY(calc(-1 * var(--v8-card-lift, 2px))); box-shadow: var(--shadow); border-color: var(--line-strong);
}
.card-thumb, .feature-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16/10;
  max-height: min(40vh, 340px);
  overflow: hidden;
  background: #dbe6ff;
}
.card-thumb img, .feature-thumb img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .28s ease;
}
.card:hover .card-thumb img, .feature-card:hover .feature-thumb img { transform: scale(1.03); }
.card-body, .feature-body { padding: 20px; }
.category-card {
  padding: 20px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.category-card h3,
.category-card p,
.category-card .card-meta {
  margin: 0;
}
.feature-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}
.feature-body {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}
.card-kicker {
  display: inline-block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800;
}
.card h3, .feature-body h3 {
  margin: 12px 0 10px; font-size: 1.28rem; line-height: 1.3; letter-spacing: -.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.card h3 a, .feature-body h3 a { color: var(--text); }
.card h3 a:hover, .feature-body h3 a:hover { color: var(--primary); }
.card p, .feature-body p {
  margin: 0 0 12px; color: #4c5d79;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { color: var(--muted); font-size: .93rem; }
.article-shell { margin-top: 8px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(265px, .72fr); gap: 28px; }
.article-main, .page-content { min-width: 0; }
.article-header {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 32px; margin-bottom: 20px;
}
.article-header h1 { font-size: clamp(2.1rem, 4vw, 3.15rem); margin-bottom: 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--muted); font-size: .95rem; }
.article-excerpt { color: #445574; font-size: 1.04rem; margin: 14px 0 0; }
.article-cover { margin: 0 0 20px; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.prose {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 32px;
  max-width: min(76ch, 100%);
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2, .prose h3 { scroll-margin-top: calc(var(--header-height) + 20px); letter-spacing: -.02em; }
.prose h2 { font-size: 1.85rem; margin-top: 2rem; }
.prose h3 { font-size: 1.3rem; margin-top: 1.3rem; }
.prose p, .prose li { color: #24344f; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose table th, .prose table td { border: 1px solid var(--line); padding: 10px 12px; }
.prose iframe, .prose video, .prose embed { max-width: 100%; }
.prose pre, .prose code { white-space: pre-wrap; overflow-wrap: anywhere; }
.side-card {
  padding: 20px; margin-bottom: 16px; position: sticky; top: calc(var(--header-height) + 16px);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.side-title { font-weight: 800; margin-bottom: 10px; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li + li { margin-top: 8px; }
.toc-list a { color: #324765; }
.toc-list a:hover { color: var(--primary); }
.toc-h3 { padding-left: 12px; font-size: .96rem; }
.page-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 28px; }
.page-side .side-card { position: sticky; top: calc(var(--header-height) + 16px); }
.empty-box, .simple-center { padding: 30px; text-align: center; }
.simple-center h1 { font-size: 2rem; }
.site-footer {
  padding: 46px 0 18px; border-top: 1px solid var(--line); background:
  linear-gradient(180deg, rgba(255,255,255,.95), rgba(249,251,255,.98));
}
.footer-grid { display: grid; grid-template-columns: 1.3fr .9fr .9fr; gap: 24px; }
.footer-title { font-size: 1.18rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -.02em; }
.footer-text { color: var(--muted); margin: 0; max-width: 42ch; }
.footer-heading { font-weight: 800; margin-bottom: 10px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: 8px; }
.footer-links a { color: #304564; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { padding-top: 18px; color: var(--muted); font-size: .95rem; }

.style-review { --primary: #0e6dfd; --primary-strong: #0a59d5; }
.style-editorial { --primary: #8a3ffc; --primary-strong: #6e2ed0; }

@media (max-width: 1200px) {
  .header-row { grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); gap: 20px; }
  .nav-link { padding-inline: 11px; font-size: .95rem; }
}

@media (max-width: 1080px) {
  .hero-grid, .article-layout, .page-layout { grid-template-columns: 1fr; }
  .feature-grid, .category-grid, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-card, .page-side .side-card { position: static; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  :root { --header-height: 80px; }
  .header-row { grid-template-columns: minmax(0,1fr) auto; gap: 12px; min-height: var(--header-height); }
  .brand-tagline { display: none; }
  .nav-toggle { display: inline-grid; }
  .primary-nav {
    position: fixed; inset: calc(var(--header-height) + 8px) 12px auto 12px; max-height: calc(100dvh - var(--header-height) - 24px);
    overflow: auto; padding: 12px; background: rgba(255,255,255,.98); border: 1px solid var(--line);
    border-radius: 20px; box-shadow: var(--shadow-lg); display: none;
  }
  .primary-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 6px; overflow: visible; }
  .nav-item { width: 100%; }
  .nav-item-row { justify-content: space-between; }
  .nav-link { width: 100%; padding: 12px 14px; }
  .sub-menu {
    position: static; display: none; box-shadow: none; border: 0; background: #f6f8fc; margin-top: 6px;
  }
  .nav-item.is-open .sub-menu { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --wrap: min(100% - 22px, 100vw - 22px); --header-height: 74px; }
  .site-main { padding-top: 12px; }
  .brand-logo, .brand-mark { width: 46px; height: 46px; flex-basis: 46px; }
  .brand-name { font-size: 1.08rem; }
  .hero-copy, .hero-panel, .compact-hero .wrap, .article-header, .prose, .side-card { padding: 22px; border-radius: 20px; }
  h1 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .section-head { margin-bottom: 16px; }
  .feature-grid, .category-grid, .post-grid, .hero-stats { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .breadcrumbs { padding-top: 10px; }
  .card-body, .feature-body { padding: 18px; }
}
