:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f0f2f5;
  --text: #171a21;
  --muted: #687080;
  --line: #e2e6ec;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf1ff;
  --success: #15803d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 35px rgba(17, 24, 39, .07);
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; }
img { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
button, input { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #93b4ff; outline-offset: 3px; }

.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; padding: 28px 0 52px; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 1000;
  padding: 10px 14px; border-radius: 8px; background: var(--text); color: #fff;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky; top: 0; z-index: 80;
  background: #ffffff;
  border-bottom: 1px solid rgba(226,230,236,.9);
}
.header-inner { min-height: 66px; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; background: var(--text); color: #fff;
  font-size: 17px; font-weight: 800; box-shadow: 0 6px 18px rgba(17,24,39,.16);
}
.brand-copy { display: grid; min-width: 0; }
.brand-name { max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; letter-spacing: -.02em; }
.brand-tagline { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.main-nav a { min-height: 40px; padding: 8px 10px; border-radius: 8px; display: inline-flex; align-items: center; color: #3f4653; font-size: 13px; font-weight: 650; }
.main-nav a:hover { background: var(--surface-soft); color: var(--text); }
.nav-toggle {
  display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--text);
}
.nav-toggle svg { width: 20px; height: 20px; }
.header-search { width: min(280px, 27vw); }
.search-form { position: relative; display: flex; }
.search-input {
  width: 100%; min-height: 40px; padding: 9px 42px 9px 13px;
  border: 1px solid var(--line); border-radius: 10px; outline: none;
  background: var(--surface-soft); color: var(--text);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.search-input:focus { border-color: #9bb9ff; background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.search-button {
  position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; border: 0;
  border-radius: 8px; display: grid; place-items: center; background: transparent; color: var(--muted);
}
.search-button:hover { background: #fff; color: var(--accent); }
.search-button svg { width: 17px; height: 17px; }

.hero {
  padding: 32px; border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(145deg, #ffffff 0%, #f4f7ff 100%); box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: 34px; align-items: center;
}
.eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(30px, 5vw, 50px); line-height: 1.08; letter-spacing: -.045em; }
.hero p { margin: 14px 0 0; color: var(--muted); max-width: 680px; font-size: 16px; }
.hero-search { margin-top: 22px; max-width: 590px; }
.hero-search .search-input { min-height: 48px; padding-left: 16px; padding-right: 54px; background: #fff; }
.hero-search .search-button { width: 40px; height: 40px; }
.hero-panel { padding: 22px; border-radius: 16px; background: var(--text); color: #fff; }
.hero-panel strong { display: block; font-size: 36px; line-height: 1; letter-spacing: -.04em; }
.hero-panel span { color: #aeb7c7; font-size: 13px; }
.hero-panel p { margin-top: 18px; color: #d3dae6; font-size: 13px; }

.section-head { margin: 32px 0 16px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.section-head h2 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.025em; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.text-link { font-size: 13px; font-weight: 700; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.card {
  min-width: 0; contain: paint; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: 0 4px 18px rgba(17,24,39,.035);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: #cbd4e2; box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: linear-gradient(135deg,#e8edf5,#f7f8fa); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.025); }
.card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #95a0b2; }
.card-placeholder svg { width: 42px; height: 42px; }
.card-badge { position: absolute; left: 10px; top: 10px; padding: 5px 8px; border-radius: 999px; background: rgba(17,24,39,.82); color:#fff; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; backdrop-filter: blur(8px); }
.card-body { padding: 15px; }
.card-title { margin: 0; font-size: 17px; line-height: 1.35; letter-spacing: -.015em; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-excerpt { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.card-meta { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #5f6878; font-size: 11px; }
.card-meta a { min-height: 32px; padding: 6px 0; display: inline-flex; align-items: center; font-weight: 700; }

.sidebar { display: grid; gap: 16px; position: sticky; top: 86px; }
.widget { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.widget-title { margin: 0 0 12px; font-size: 14px; letter-spacing: -.01em; }
.mini-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mini-item a { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 10px; align-items: center; padding: 7px; border-radius: 9px; color: var(--text); }
.mini-item a:hover { background: var(--surface-soft); color: var(--accent); }
.mini-number { width: 42px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; }
.mini-copy { min-width: 0; }
.mini-title { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; font-weight: 700; line-height: 1.35; }
.mini-date { color: var(--muted); font-size: 10px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { min-height: 32px; padding: 6px 9px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #4f5868; font-size: 11px; }
.tag:hover { border-color: #a8bfff; background: var(--accent-soft); color: var(--accent); }

.breadcrumb { margin-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.article { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 5px 24px rgba(17,24,39,.04); }
.article-cover { aspect-ratio: 16/8.5; overflow: hidden; background: var(--surface-soft); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-header { padding: 26px 28px 22px; border-bottom: 1px solid var(--line); }
.article-title { margin: 0; font-size: clamp(28px, 4.6vw, 45px); line-height: 1.12; letter-spacing: -.04em; }
.article-lead { margin: 13px 0 0; color: var(--muted); font-size: 16px; }
.article-meta { margin-top: 17px; display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 12px; }
.article-body { padding: 26px 28px 32px; }
.article-body p { margin: 0 0 18px; }
.article-body h2 { margin: 32px 0 14px; font-size: 25px; line-height: 1.25; letter-spacing: -.025em; scroll-margin-top: 86px; }
.article-body h3 { margin: 24px 0 10px; font-size: 19px; }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body blockquote { margin: 22px 0; padding: 15px 18px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); }
.article-body hr { margin: 30px 0; border: 0; border-top: 1px solid var(--line); }
.toc { margin: 0 0 26px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fafbfc; }
.toc strong { display: block; margin-bottom: 8px; font-size: 13px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; font-size: 13px; }

.image-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.image-card { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.image-card a { display: block; aspect-ratio: 4/3; overflow: hidden; }
.image-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.image-card:hover img { transform: scale(1.025); }
.image-caption { padding: 9px 10px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.video-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.video-card { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.video-frame { aspect-ratio: 16/9; background: #111; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-facade { position: relative; overflow: hidden; }
.video-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #111; overflow: hidden; }
.video-play img { width: 100%; height: 100%; object-fit: cover; }
.video-play::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.25)); }
.video-play-icon { position: absolute; left: 50%; top: 50%; z-index: 1; width: 58px; height: 42px; border-radius: 12px; display: grid; place-items: center; transform: translate(-50%,-50%); background: rgba(17,24,39,.9); color: #fff; font-size: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.video-play:hover .video-play-icon, .video-play:focus-visible .video-play-icon { background: #dc2626; }
.video-copy { padding: 11px; }
.video-title { margin: 0; font-size: 13px; line-height: 1.4; }
.video-meta { margin-top: 5px; color: var(--muted); font-size: 10px; }

.search-hero { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.search-hero h1 { margin: 0; font-size: clamp(26px,4vw,38px); letter-spacing: -.035em; }
.search-hero p { margin: 7px 0 0; color: var(--muted); }
.search-page-form { margin-top: 16px; max-width: 680px; }
.search-results { display: grid; gap: 14px; }
.result-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.result-card h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.result-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.result-meta { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 10px; color: #8a93a3; font-size: 11px; }
.feature-video { margin-top: 18px; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(230px,.75fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.feature-video-frame { aspect-ratio: 16/9; background: #111; }
.feature-video-frame iframe { width: 100%; height: 100%; border: 0; }
.feature-video-copy { padding: 20px; }
.feature-video-copy h2 { margin: 0; font-size: 19px; }
.feature-video-copy p { color: var(--muted); font-size: 13px; }

.page-card { max-width: 840px; margin: 0 auto; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.page-card h1 { margin: 0 0 14px; font-size: clamp(28px,4vw,42px); letter-spacing: -.035em; }
.page-card h2 { margin-top: 28px; font-size: 21px; }
.page-card p, .page-card li { color: #4f5868; }
.page-card .search-form { max-width: 620px; }
.empty-state { padding: 42px 24px; border: 1px dashed #c8cfda; border-radius: 16px; background: rgba(255,255,255,.55); text-align: center; }
.empty-state svg { width: 46px; height: 46px; color: #94a0b2; }
.empty-state h2 { margin: 10px 0 5px; font-size: 20px; }
.empty-state p { margin: 0; color: var(--muted); }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: #fff; }
.footer-top { padding: 30px 0 22px; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(220px,.8fr); gap: 30px; }
.footer-title { margin: 0; font-size: 18px; }
.footer-description { margin: 8px 0 0; max-width: 600px; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: start; gap: 8px 14px; }
.footer-links a { min-height: 32px; padding: 6px 0; display: inline-flex; align-items: center; color: #596273; font-size: 12px; }
.footer-bottom { padding: 15px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; color: #5f6878; font-size: 11px; }
.back-to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 11px; display: grid; place-items: center;
  background: rgba(255,255,255,.94); color: var(--text); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top svg { width: 18px; height: 18px; }

@media (max-width: 980px) {
  .header-search { display: none; }
  .content-layout, .article-layout { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-panel { display: none; }
}
@media (max-width: 760px) {
  .container { width: min(calc(100% - 22px), var(--container)); }
  .site-main { padding-top: 18px; }
  .header-inner { min-height: 60px; }
  .brand-tagline { display: none; }
  .main-nav {
    position: fixed; left: 11px; right: 11px; top: 68px; display: none; margin: 0; padding: 10px;
    border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: grid; }
  .main-nav a { padding: 10px 12px; }
  .nav-toggle { display: grid; place-items: center; }
  .hero { padding: 23px; border-radius: 16px; }
  .site-header { position: static; }
  .post-grid, .image-grid, .video-grid, .sidebar { grid-template-columns: 1fr; }
  .article-header, .article-body { padding-left: 19px; padding-right: 19px; }
  .feature-video { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 440px) {
  .brand-name { max-width: 190px; }
  .card-body { padding: 13px; }
  .article-title { font-size: 31px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
