:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-rgb: 37, 99, 235;
  --accent: #0ea5e9;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --text: #1e293b;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --green: #059669;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .07), 0 10px 28px rgba(15, 23, 42, .07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff; padding: 8px 16px; border-radius: 0 0 8px 0; z-index: 999;
}
.skip-link:focus { left: 0; color: #fff; }

.page-wrap { min-height: calc(100vh - 300px); }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 23, 42, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff; font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  letter-spacing: .5px; flex: none;
}
.brand-text { color: #fff; font-weight: 700; font-size: 17px; }
.brand-light .brand-text { color: #e2e8f0; }

.nav ul { list-style: none; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: #cbd5e1; font-weight: 500; font-size: 14.5px;
  padding: 8px 13px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a.active { color: #fff; background: rgba(var(--primary-rgb), .35); }
.nav a.nav-notes { border: 1px solid rgba(148, 163, 184, .35); }

.nav li.has-sub { position: relative; display: inline-flex; align-items: center; }
.nav-caret {
  background: none; border: 0; cursor: pointer; color: #cbd5e1;
  display: inline-flex; align-items: center; padding: 6px 4px; border-radius: 6px;
}
.nav-caret:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-caret svg { transition: transform .2s ease; }
.nav li.sub-open > .nav-caret svg { transform: rotate(180deg); }
.nav ul.nav-sub {
  list-style: none; position: absolute; top: 100%; left: 0; min-width: 210px;
  background: #0f172a; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px;
  padding: 6px; display: none; flex-direction: column; gap: 2px; z-index: 60;
  box-shadow: 0 18px 40px rgba(2, 6, 23, .5);
}
.nav li.has-sub:hover > ul.nav-sub, .nav li.sub-open > ul.nav-sub { display: flex; }
.nav ul.nav-sub a { display: flex; padding: 9px 12px; border-radius: 8px; white-space: nowrap; }

.burger {
  display: none; background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px; position: relative;
}
.burger span {
  display: block; width: 22px; height: 2.5px; background: #e2e8f0;
  margin: 4.5px auto; border-radius: 2px; transition: transform .2s, opacity .2s;
}
body.nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.lang-switch { display: flex; align-items: center; gap: 2px; border: 1px solid rgba(148, 163, 184, .35); border-radius: 999px; padding: 3px; flex: none; position: relative; }
.lang-switch a {
  color: #cbd5e1; font-weight: 700; font-size: 12px; letter-spacing: .5px;
  padding: 4px 10px; border-radius: 999px; transition: color .15s, background .15s;
  position: relative; z-index: 1;
}
.lang-switch a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.lang-switch a.active { color: #fff; background: rgba(var(--primary-rgb), .45); }
.lang-switch-2::before {
  content: ''; position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 6px); background: #fff; border-radius: 999px;
  transition: left .22s ease; z-index: 0;
}
.lang-switch-2.lang-en::before { left: calc(50% + 3px); }
.lang-switch-2 a.active { color: #0f172a; background: transparent; }

.hero {
  background:
    radial-gradient(700px 340px at 85% -60px, rgba(var(--primary-rgb), .35), transparent 65%),
    radial-gradient(500px 300px at 8% 110%, rgba(14, 165, 233, .22), transparent 60%),
    linear-gradient(160deg, #0f172a 15%, #1e293b 100%);
  color: #e2e8f0;
  padding: 96px 0 88px;
}
.hero-hello { color: var(--accent); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; }
.hero-name { font-size: clamp(34px, 6vw, 54px); color: #fff; line-height: 1.15; margin: 8px 0 4px; letter-spacing: -.5px; }
.hero-title { font-size: clamp(17px, 3vw, 22px); color: #93c5fd; font-weight: 600; }
.hero-desc { max-width: 640px; margin: 18px 0 28px; color: #cbd5e1; font-size: 16.5px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-socials a {
  color: #cbd5e1; border: 1px solid rgba(148, 163, 184, .3);
  padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  transition: border-color .15s, color .15s;
}
.hero-socials a:hover { color: #fff; border-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1.5px solid transparent; cursor: pointer; transition: all .15s; line-height: 1.2;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: rgba(148, 163, 184, .5); color: #e2e8f0; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #047857; color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13.5px; border-radius: 8px; }
.w100 { width: 100%; }

.section { padding: 72px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 36px; }
.eyebrow { color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 12.5px; }
.section-head h2 { font-size: clamp(24px, 4vw, 32px); letter-spacing: -.4px; margin-top: 6px; }
.section-head .section-link { margin-top: 6px; font-weight: 600; font-size: 14.5px; display: inline-block; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.grid { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(15, 23, 42, .08), 0 16px 40px rgba(15, 23, 42, .12); }
.card.pad { padding: 26px; }
.card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #e2e8f0; }
.card-img-ph {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #94a3b8; font-weight: 800; font-size: 30px; letter-spacing: 2px;
}
.card h3 { font-size: 18.5px; line-height: 1.35; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--primary); }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; padding: 3.5px 10px;
  border-radius: 999px; background: #eef2ff; color: var(--primary);
}
.badge-green { background: #ecfdf5; color: var(--green); }
.badge-amber { background: #fffbeb; color: var(--amber); }
.badge-gray { background: #f1f5f9; color: var(--muted); }
.badge-red { background: #fef2f2; color: var(--red); }
.badge-dark { background: var(--dark); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12.5px; font-weight: 500; color: var(--dark-2);
  background: #f1f5f9; border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 999px;
}
.chip-lg { font-size: 14px; padding: 6px 16px; }

.muted { color: var(--muted); }
.muted-light { color: var(--muted-light); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.flex-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

.about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; align-items: start; }
.info-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.info-list li { display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; }
.info-list .k { color: var(--muted); min-width: 90px; font-weight: 600; }

.list-rows { display: flex; flex-direction: column; gap: 12px; }
.row-item {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow);
  transition: transform .15s;
}
.row-item:hover { transform: translateX(3px); }
.row-icon {
  width: 52px; height: 52px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff; font-weight: 800; font-size: 12px; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; letter-spacing: .5px;
}
.row-main { flex: 1; min-width: 220px; }
.row-main h3 { font-size: 17px; }
.row-main h3 a { color: var(--text); }
.row-main h3 a:hover { color: var(--primary); }
.row-stats { display: flex; flex-direction: column; gap: 2px; text-align: right; font-size: 13px; color: var(--muted); }
.row-stats strong { color: var(--text); font-size: 15px; }
.row-thumb { flex: none; width: 88px; height: 62px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }

.attach-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.attach-item {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 18px; box-shadow: var(--shadow);
}
.attach-icon {
  width: 44px; height: 44px; border-radius: 11px; flex: none;
  background: rgba(var(--primary-rgb), .12); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.attach-main { flex: 1; min-width: 180px; }
.attach-main b { display: block; font-size: 15px; color: var(--text); }
.attach-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--muted); }

.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.filter-chips a {
  padding: 7px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: #fff; color: var(--muted); border: 1px solid var(--border);
}
.filter-chips a:hover { border-color: var(--primary); color: var(--primary); }
.filter-chips a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.article-head { margin-bottom: 26px; }
.article-head h1 { font-size: clamp(24px, 4.5vw, 36px); line-height: 1.25; letter-spacing: -.5px; margin: 8px 0 12px; }
.article-content { font-size: 16.5px; }
.article-content h2, .article-content h3 { margin: 26px 0 10px; line-height: 1.3; }
.article-content p { margin-bottom: 14px; }
.article-content ul, .article-content ol { margin: 0 0 14px 22px; }
.article-content li { margin-bottom: 6px; }
.article-content code { background: #eef2f7; border: 1px solid var(--border); border-radius: 6px; padding: 1.5px 6px; font-size: 14px; font-family: Consolas, "Courier New", monospace; }
.article-content pre { background: var(--dark); color: #e2e8f0; border-radius: 10px; padding: 18px; overflow-x: auto; margin-bottom: 16px; }
.article-content pre code { background: none; border: 0; color: inherit; padding: 0; }
.article-content blockquote { border-left: 3px solid var(--primary); margin: 0 0 14px; padding: 6px 18px; background: #f8fafc; border-radius: 0 8px 8px 0; color: var(--muted); }
.article-content table { border-collapse: collapse; width: 100%; margin-bottom: 16px; font-size: 14.5px; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.article-content th { background: #f8fafc; }

.detail-banner { border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; border: 1px solid var(--border); }
.detail-banner img { width: 100%; max-height: 380px; object-fit: cover; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0; }
.stat-box { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; text-align: center; }
.stat-box b { display: block; font-size: 20px; color: var(--primary); }
.stat-box span { font-size: 12.5px; color: var(--muted); font-weight: 600; }

.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 12px 16px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--border); }
.table th { background: #f8fafc; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }

.search-form { display: flex; gap: 10px; margin-bottom: 22px; }
.search-form input {
  flex: 1; padding: 12px 18px; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 15px; background: #fff; outline: none; font-family: inherit;
}
.search-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }

.gate-wrap { max-width: 460px; margin: 70px auto; }
.gate-icon {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: flex; align-items: center; justify-content: center; color: #fff;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 14px; }
.field input[type="text"], .field input[type="password"], .field input[type="email"], .field input[type="url"], .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 15px; font-family: inherit; background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
.field .hint { font-size: 12.5px; color: var(--muted); }

.captcha-wrap {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  padding: 10px 14px; background: var(--bg, #f8fafc); border: 1.5px solid var(--border);
  border-radius: 10px;
}
.captcha-q {
  font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums;
  white-space: nowrap; min-width: 60px; text-align: center; color: #0f172a;
}
.captcha-wrap input[type="text"] {
  width: 80px; padding: 8px 10px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 16px; font-family: inherit;
  text-align: center; outline: none; background: #fff;
}
.captcha-wrap input[type="text"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--primary); }

.flash { max-width: 1120px; margin: 16px auto 0; padding: 13px 20px; border-radius: 10px; font-weight: 500; font-size: 14.5px; border: 1px solid transparent; }
main .flash:first-child { margin-top: 20px; }
.flash-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.flash-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.flash-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.flash.fade-out { opacity: 0; transition: opacity .6s; }

.notfound h1 { font-size: 64px; color: var(--primary); }
.notfound p { margin: 10px 0 22px; }

.site-footer { background: var(--dark); color: #cbd5e1; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; padding: 52px 20px 40px; }
.footer-desc { margin-top: 14px; font-size: 14.5px; color: #94a3b8; max-width: 340px; }
.site-footer h3 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: .3px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #94a3b8; font-size: 14.5px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13.5px; }
.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: #fff; }

@media (max-width: 980px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .burger { display: block; margin-left: auto; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; background: var(--dark); display: none; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  body.nav-open .nav { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 20px 18px; }
  .nav a { display: flex; padding: 11px 10px; }
  .nav li.has-sub { display: flex; flex-wrap: wrap; align-items: center; }
  .nav li.has-sub > a { flex: 1 1 auto; }
  .nav-caret { margin-left: auto; padding: 11px 10px; }
  .nav ul.nav-sub {
    position: static; display: none; width: 100%; min-width: 0;
    background: transparent; border: 0; border-radius: 0; padding: 0 0 4px 16px;
    box-shadow: none;
  }
  .nav li.sub-open > ul.nav-sub { display: flex; }
  .nav ul.nav-sub a { padding: 9px 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 620px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .hero { padding: 68px 0 60px; }
  .section { padding: 52px 0; }
  .row-stats { text-align: left; flex-direction: row; gap: 16px; }
  .table { display: block; overflow-x: auto; }
  .row-thumb { width: 68px; height: 50px; }
  .attach-item { padding: 11px 14px; gap: 10px; }
  .attach-icon { width: 38px; height: 38px; border-radius: 9px; }
  .detail-banner img { max-height: 220px; }
}
