:root {
  --brand: #2770D4;
  --brand-2: #1e5ba8;
  --brand-light: #e8f1fb;
  --accent: #f59e0b;
  --red: #d23f3f;
  --green: #1d9d68;
  --text: #1a2332;
  --text-2: #4a5566;
  --text-3: #7b8696;
  --line: #e4e9f0;
  --line-2: #eef2f7;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --shadow-lg: 0 4px 16px rgba(16,24,40,0.08), 0 2px 6px rgba(16,24,40,0.04);
  --shadow-sm: 0 1px 3px rgba(16,24,40,0.06);
  --radius: 6px;
  --radius-lg: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: var(--font);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  font-family: var(--font); font-size: 14px; line-height: 1.55;
  color: var(--text); background: var(--bg-soft);
  -webkit-font-smoothing: antialiased; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; }

/* HEADER */
.header { height: 68px; flex-shrink: 0; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0; position: sticky; top: 0; z-index: 100; width: 100%; }
.logo { display: flex; align-items: center; padding: 0 20px; }
.logo img { width: 120px; height: auto; }
.header-spacer { flex: 1; }
.header-right { display: flex; align-items: center; gap: 0; padding-right: 10px; }
.header-hormuz a { display: inline-block; line-height: 0; }
.header-hormuz img { height: 52px; width: auto; }
.header-img-btn { position: relative; display: inline-block; line-height: 0; }
.header-img-btn img { display: block; }
.header-img-btn-text { position: absolute; top: 20px; left: 40px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; pointer-events: none; line-height: 1; font-family: "SF Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.header-user { display: inline-flex; align-items: center; margin-left: 6px; text-decoration: none; }
.header-user img { width: 40px; height: auto; }
.user-menu { position: relative; display: inline-flex; align-items: center; margin-left: 6px; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; background: #2770d4; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.user-avatar:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(39, 112, 212,.3); }
.user-dropdown { display: none; position: absolute; top: 100%; right: 0; min-width: 120px; background: #fff; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.15); padding: 4px 0; z-index: 100; margin-top: 4px; }
.user-dropdown.open { display: block; }
.user-dropdown a { display: block; padding: 8px 16px; font-size: 13px; color: #333; text-decoration: none; white-space: nowrap; }
.user-dropdown a:hover { background: #f5f5f5; }

/* MAIN */
.main { flex: 1; display: flex; flex-direction: column; width: 100%; }

/* ============ HERO ============ */
.hero { position: relative; background: linear-gradient(135deg, #2a78de 0%, var(--brand) 45%, var(--brand-2) 100%); overflow: visible; width: 100%; }
.hero-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 64px 24px 72px; width: 100%; text-align: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); padding: 6px 14px; border-radius: 100px; margin-bottom: 22px; animation: fadeUp 0.5s ease both; }
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,0.25); }
.hero h1 { font-size: 42px; font-weight: 800; color: #fff; letter-spacing: -0.8px; line-height: 1.15; margin-bottom: 12px; animation: fadeUp 0.5s ease 0.05s both; }
.hero-sub { font-size: 16px; color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 32px; animation: fadeUp 0.5s ease 0.1s both; }
.hero-search-wrap { position: relative; z-index: 50; max-width: 640px; margin: 0 auto; animation: fadeUp 0.5s ease 0.15s both; }
.hero-search { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 6px 6px 6px 18px; box-shadow: 0 12px 40px rgba(10,30,60,0.28); }
.hero-search svg { flex-shrink: 0; color: var(--text-3); }
.hero-search input { flex: 1; border: none; outline: none; font-size: 15px; color: var(--text); background: transparent; padding: 12px 0; font-family: inherit; }
.hero-search input::placeholder { color: var(--text-3); }
.hero-search button { background: var(--brand); color: #fff; border: none; padding: 11px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; transition: background 0.15s; }
.hero-search button:hover { background: var(--brand-2); }
.hero-chips { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; animation: fadeUp 0.5s ease 0.2s both; }
.hero-chips span { font-size: 13px; color: rgba(255,255,255,0.7); margin-right: 2px; }
.hero-chip { font-size: 12.5px; font-weight: 500; color: #fff; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.2); padding: 5px 12px; border-radius: 100px; transition: all 0.15s; cursor:pointer; }
.hero-chip:hover { background: rgba(255,255,255,0.26); transform: translateY(-1px); }

/* SEARCH DROPDOWN */
.search-results { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(10,30,60,0.18); overflow: hidden; z-index: 200; text-align: left; }
.search-results.show { display: block; }
.sr-head { padding: 10px 18px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); border-bottom: 1px solid var(--line-2); background: var(--bg-soft); }
.sr-item { display: flex; align-items: flex-start; gap: 12px; padding: 13px 18px; cursor: pointer; border-bottom: 1px solid var(--line-2); transition: background 0.12s; text-decoration: none; }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--brand-light); }
.sr-ic { width: 30px; height: 30px; flex-shrink: 0; border-radius: 7px; background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.sr-title { font-size: 14px; font-weight: 600; color: var(--text); }
.sr-cat { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.sr-empty { padding: 24px 18px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ============ SECTION SCAFFOLD ============ */
.section { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }
.section-head { margin: 52px 0 22px; }
.section-title { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.section-desc { font-size: 14px; color: var(--text-3); margin-top: 4px; }

/* CATEGORY GRID */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 20px 20px; transition: all 0.2s; display: flex; flex-direction: column; animation: fadeUp 0.4s ease both; text-decoration: none; }
.cat-card:hover { border-color: #cfdcf0; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.cat-ic { width: 46px; height: 46px; border-radius: 11px; background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; transition: all 0.2s; font-size: 22px; overflow: hidden; }
.cat-ic img { width: 100%; height: 100%; object-fit: cover; }
.cat-card:hover .cat-ic { background: var(--brand); color: #fff; }
.cat-name { font-size: 15.5px; font-weight: 700; color: var(--text); margin-bottom: 5px; letter-spacing: -0.1px; }
.cat-card:hover .cat-name { color: var(--brand); }
.cat-card-desc { font-size: 13px; color: var(--text-2); line-height: 1.5; flex: 1; }
.cat-count { font-size: 12px; color: var(--text-3); margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; }
.cat-count .arrow { color: var(--brand); font-weight: 600; opacity: 0; transform: translateX(-4px); transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px; }
.cat-card:hover .cat-count .arrow { opacity: 1; transform: translateX(0); }

/* GLOSSARY TAGS (homepage) */
.glossary-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.gloss-tags-wrap { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.gloss-tag { font-size: 13px; font-weight: 600; color: var(--brand); background: #fff; border: 1px solid var(--line); padding: 7px 14px; border-radius: 100px; cursor: pointer; transition: all 0.15s; text-decoration: none; }
.gloss-tag:hover { background: var(--brand); color: #fff; border-color: var(--brand); transform: translateY(-1px); }

/* FAQ ACCORDION */
.faq-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--line-2); }
.faq-item:last-child { border-bottom: none; }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 15px; font-weight: 600; color: var(--text); transition: color 0.15s; }
.faq-q:hover { color: var(--brand); }
.faq-icon { flex-shrink: 0; width: 22px; height: 22px; position: relative; transition: transform 0.25s; }
.faq-icon::before, .faq-icon::after { content: ''; position: absolute; background: var(--brand); border-radius: 2px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.faq-icon::before { width: 12px; height: 2px; }
.faq-icon::after { width: 2px; height: 12px; transition: transform 0.25s; }
.faq-item.open .faq-icon::after { transform: translate(-50%,-50%) scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 22px; font-size: 14px; color: var(--text-2); line-height: 1.65; }
.faq-item.open .faq-a { max-height: 1500px; padding: 0 22px 20px; }
.faq-a a { color: var(--brand); font-weight: 500; text-decoration: underline; }

/* CONTACT STRIP */
.contact-strip { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-radius: var(--radius-lg); padding: 36px 40px; color: #fff; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.contact-strip::before { content: ''; position: absolute; top: -60px; right: -30px; width: 220px; height: 220px; background: rgba(255,255,255,0.07); border-radius: 50%; }
.contact-strip::after { content: ''; position: absolute; bottom: -80px; right: 120px; width: 160px; height: 160px; background: rgba(255,255,255,0.05); border-radius: 50%; }
.contact-strip .cs-text { position: relative; z-index: 1; }
.contact-strip h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.contact-strip p { font-size: 14px; opacity: 0.9; max-width: 700px; }
.cs-actions { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; }
.cs-btn { padding: 11px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; transition: all 0.15s; display: inline-flex; align-items: center; gap: 8px; }
.cs-btn.primary { background: #fff; color: var(--brand); }
.cs-btn.primary:hover { background: #f0f5fc; }
.cs-btn.ghost { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.cs-btn.ghost:hover { background: rgba(255,255,255,0.24); }

/* ============ BREADCRUMB ============ */
.breadcrumb { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 24px 0; font-size: 13px; color: var(--text-3); display: flex; align-items: center; flex-wrap: wrap; }
/* Sticky breadcrumb on detail pages (the ones directly followed by .detail-wrap): full-width bar pinned under the 68px header, content aligned to the 1200px column */
.breadcrumb:has(+ .detail-wrap) { position: sticky; top: 68px; z-index: 90; max-width: none; margin: 0; padding: 14px max(24px, calc((100% - 1200px) / 2)); background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.breadcrumb a { color: var(--text-3); transition: color 0.15s; white-space: nowrap; display: inline-block; }
.breadcrumb a:hover { color: var(--brand) !important; }
.breadcrumb .sep { margin: 0 8px; opacity: 0.5; flex-shrink: 0; }
.breadcrumb .current { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ CATEGORY LIST PAGE ============ */
.listwrap { width: 100%; max-width: 1200px; margin: 22px auto 0; padding: 0 24px 56px; display: grid; grid-template-columns: 248px 1fr; gap: 40px; align-items: start; }
.side-nav { position: sticky; top: 80px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.side-nav-head { padding: 14px 18px; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--line-2); }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 11px 18px; font-size: 13.5px; color: var(--text-2); font-weight: 500; border-left: 2px solid transparent; transition: all 0.15s; text-decoration: none; }
.side-nav a:hover { background: var(--bg-soft); color: var(--text); }
.side-nav a.active { color: var(--brand); font-weight: 600; background: var(--brand-light); border-left-color: var(--brand); }
.side-nav a svg { flex-shrink: 0; }
.side-nav a span:first-child { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; overflow: hidden; }
.side-nav a span:first-child img { width: 100%; height: 100%; object-fit: cover; }

.list-header { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 8px; }
.list-header .lh-ic { width: 54px; height: 54px; border-radius: 13px; flex-shrink: 0; background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 24px; overflow: hidden; }
.list-header .lh-ic img { width: 100%; height: 100%; object-fit: cover; }
.list-title { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; line-height: 1.2; }
.list-subtitle { font-size: 14px; color: var(--text-3); margin-top: 5px; }

.article-rows { margin-top: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.article-row { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); transition: background 0.15s; text-decoration: none; }
.article-row:last-child { border-bottom: none; }
.article-row:hover { background: var(--bg-soft); }
.ar-ic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; background: var(--bg-soft); color: var(--text-3); display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.article-row:hover .ar-ic { background: var(--brand-light); color: var(--brand); }
.ar-body { flex: 1; min-width: 0; }
.ar-title { font-size: 15px; font-weight: 600; color: var(--text); transition: color 0.15s; }
.article-row:hover .ar-title { color: var(--brand); }
.ar-excerpt { font-size: 13px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-arrow { color: var(--text-3); flex-shrink: 0; transition: all 0.15s; }
.article-row:hover .ar-arrow { color: var(--brand); transform: translateX(3px); }

/* ============ ARTICLE DETAIL PAGE ============ */
.detail-wrap { width: 100%; max-width: 1200px; margin: 22px auto 0; padding: 0 24px 56px; display: grid; grid-template-columns: 1fr 300px; gap: 44px; align-items: start; }
.detail-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 38px 48px 44px; }
.detail-cat-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 14px; }
.detail-title { font-size: 30px; font-weight: 700; line-height: 1.22; letter-spacing: -0.5px; color: var(--text); margin-bottom: 16px; }
.detail-meta-row { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-3); padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.detail-meta-row .sep { opacity: 0.4; }
.detail-meta-row .av { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* 正文样式与 CMS 编辑器/预览 (.cms-rich) 保持一致 */
.article-body { font-size: 1rem; line-height: 1.7; color: #334155; font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
.article-body h1 { font-size: 1.75rem; font-weight: 800; color: #0F172A; margin: 1.75rem 0 0.875rem; line-height: 1.2; }
.article-body h2 { font-size: 1.35rem; font-weight: 700; color: #1E293B; margin: 1.5rem 0 0.75rem; line-height: 1.3; padding-bottom: 0.4rem; border-bottom: 1px solid #F1F5F9; scroll-margin-top: 80px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 1.15rem; font-weight: 600; color: #334155; margin: 1.25rem 0 0.6rem; }
.article-body p { margin-bottom: 1rem; color: #334155; line-height: 1.7; font-size: 1rem; }
.article-body a { color: #1D5BB0; text-decoration: underline; font-weight: 500; }
.article-body strong { font-weight: 600; color: #334155; }
.article-body ul, .article-body ol { margin: 0 0 1rem; padding-left: 1.5rem; color: #334155; line-height: 1.7; font-size: 1rem; }
.article-body ul { list-style-type: disc; }
.article-body ol { list-style-type: decimal; }
.article-body li { margin-bottom: 0.375rem; }
.article-body ul ul { list-style-type: circle; }
.article-body blockquote { border-left: 3px solid #2770D4; background: #F8FAFC; margin: 1.25rem 0; padding: 0.875rem 1.25rem; color: #475569; font-style: italic; border-radius: 0 0.375rem 0.375rem 0; font-size: 0.8125rem; }
.article-body code.cms-inline-code, .article-body .cms-inline-code { background: #F1F5F9; color: #D946EF; padding: 0.1rem 0.35rem; border-radius: 0.25rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.75rem; }
.article-body pre.cms-code, .article-body .cms-code { background: #0F172A; color: #F8FAFC; padding: 1rem 1.25rem; border-radius: 0.5rem; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; line-height: 1.6; margin: 1.25rem 0; white-space: pre-wrap; word-break: break-word; }
.article-body hr.cms-divider, .article-body .cms-divider { border: none; border-top: 1px solid #E2E8F0; margin: 2rem 0; }
.article-body table.cms-table, .article-body .cms-table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; font-size: 0.8125rem; }
.article-body table.cms-table th, .article-body table.cms-table td, .article-body .cms-table th, .article-body .cms-table td { border: 1px solid #E2E8F0; padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.article-body table.cms-table th, .article-body .cms-table th { background: #F8FAFC; font-weight: 600; color: #334155; }
.article-body img { max-width: 100%; height: auto; border-radius: 0.5rem; margin: 1.25rem 0; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); }

/* 富文本：提示标注框 (Callout) —— 与后台编辑器一致；图标用内嵌 SVG，不依赖 Font Awesome */
.article-body .cms-callout { display: flex; gap: 0.75rem; padding: 0.875rem 1rem; border-radius: 0.5rem; margin: 1.25rem 0; border: 1px solid transparent; font-style: normal; font-size: 0.8125rem; }
.article-body .cms-callout .cms-callout-icon { flex-shrink: 0; align-self: flex-start; width: 1.1rem; height: 1.4rem; background-repeat: no-repeat; background-position: center; background-size: 1.1rem 1.1rem; }
.article-body .cms-callout .cms-callout-icon i { display: none; } /* 旧内容中的 Font Awesome <i> 统一隐藏，图标由 SVG 背景渲染 */
.article-body .cms-callout .cms-callout-body { flex: 1; min-width: 0; }
.article-body .cms-callout .cms-callout-body p { color: inherit; }
.article-body .cms-callout .cms-callout-body p:first-child { margin-top: 0; }
.article-body .cms-callout .cms-callout-body p:last-child { margin-bottom: 0; }
.article-body .cms-callout-info { background: #F0F6FF; border-color: #D9E6FF; color: #1D5BB0; }
.article-body .cms-callout-info .cms-callout-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%232770D4'/%3E%3Ccircle cx='12' cy='7.6' r='1.4' fill='%23fff'/%3E%3Crect x='10.9' y='10.4' width='2.2' height='7' rx='1.1' fill='%23fff'/%3E%3C/svg%3E"); }
.article-body .cms-callout-tip { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }
.article-body .cms-callout-tip .cms-callout-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-4.9 11.9c.9.9 1.5 2 1.7 3.1h6.4c.2-1.1.8-2.2 1.7-3.1A7 7 0 0 0 12 2z' fill='%2322C55E'/%3E%3Cpath d='M9.5 18.2h5v1a1.8 1.8 0 0 1-1.8 1.8h-1.4a1.8 1.8 0 0 1-1.8-1.8z' fill='%2322C55E'/%3E%3C/svg%3E"); }
.article-body .cms-callout-warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.article-body .cms-callout-warning .cms-callout-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.3 3.1a1.5 1.5 0 0 0-2.6 0L1.9 19.2a1.5 1.5 0 0 0 1.3 2.3h17.6a1.5 1.5 0 0 0 1.3-2.3z' fill='%23F59E0B'/%3E%3Crect x='10.9' y='8.5' width='2.2' height='6.2' rx='1.1' fill='%23fff'/%3E%3Ccircle cx='12' cy='17.6' r='1.4' fill='%23fff'/%3E%3C/svg%3E"); }
.article-body .cms-callout-danger { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.article-body .cms-callout-danger .cms-callout-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23EF4444'/%3E%3Crect x='10.9' y='6.5' width='2.2' height='7' rx='1.1' fill='%23fff'/%3E%3Ccircle cx='12' cy='16.6' r='1.4' fill='%23fff'/%3E%3C/svg%3E"); }

/* HELPFUL VOTE */
.helpful { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.helpful-q { font-size: 14px; font-weight: 600; color: var(--text); }
.helpful-btns { display: flex; gap: 10px; }
.helpful-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 18px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: all 0.15s; }
.helpful-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.helpful-btn.voted { border-color: var(--green); color: var(--green); background: #e6f6ee; }
.helpful-thanks { font-size: 13px; color: var(--green); font-weight: 600; display: none; }

/* DETAIL SIDEBAR */
.detail-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 20px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.side-card-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.side-card-title { font-size: 12px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.4px; }
.side-card-body { padding: 8px 0; }

.toc a { display: block; padding: 8px 18px; font-size: 13px; color: var(--text-2); border-left: 2px solid transparent; transition: all 0.15s; line-height: 1.4; text-decoration: none; }
.toc a:hover { color: var(--brand); }
.toc a.active { color: var(--brand); font-weight: 600; border-left-color: var(--brand); background: var(--brand-light); }

.side-related { padding: 8px 18px 14px; }
.side-related .related-item { display: block; padding: 11px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; text-decoration: none; }
.side-related .related-item:last-child { border-bottom: none; }
.side-related .related-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; transition: color 0.15s; }
.side-related .related-item:hover .related-title { color: var(--brand); }
.side-related .related-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

.support-card { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; padding: 22px; position: relative; overflow: hidden; border: none; border-radius: var(--radius-lg); }
.support-card::before { content: ''; position: absolute; top: -40px; right: -40px; width: 130px; height: 130px; background: rgba(255,255,255,0.08); border-radius: 50%; }
.support-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; position: relative; }
.support-card p { font-size: 13px; opacity: 0.9; margin-bottom: 14px; position: relative; line-height: 1.5; }
.support-card .sc-btn { display: block; text-align: center; background: #fff; color: var(--brand); padding: 10px; border-radius: 7px; font-size: 13px; font-weight: 600; position: relative; transition: background 0.15s; text-decoration: none; }
.support-card .sc-btn:hover { background: #f0f5fc; }

/* ============ GLOSSARY PAGE ============ */
.gloss-page-title { font-size: 36px; letter-spacing: -0.8px; }
.gloss-intro { font-size: 15px; color: var(--text-2); max-width: 70ch; margin-bottom: 22px; line-height: 1.6; }

.az-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.az-bar a { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--brand); background: #fff; border: 1px solid var(--line); border-radius: 6px; transition: all 0.13s; }
.az-bar a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.az-bar a.off { color: var(--text-3); opacity: 0.4; pointer-events: none; }
.az-bar a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.gl-letter { display: flex; align-items: center; gap: 14px; margin: 30px 0 14px; scroll-margin-top: 76px; }
.gl-letter > span { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.gl-letter::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.term-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.term-link { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s; min-width: 0; }
.term-link:hover { border-color: #cfdcf0; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.term-link .tl-name { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-link:hover .tl-name { color: var(--brand); }
.term-link .tl-abbr { flex-shrink: 0; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--brand); background: var(--brand-light); padding: 2px 7px; border-radius: 5px; }
.term-link .tl-arrow { margin-left: auto; flex-shrink: 0; color: var(--text-3); opacity: 0; transform: translateX(-4px); transition: all 0.16s; }
.term-link:hover .tl-arrow { opacity: 1; transform: translateX(0); color: var(--brand); }

.glossary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gl-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; transition: border-color 0.18s, box-shadow 0.18s; scroll-margin-top: 80px; }
.gl-card:hover { border-color: #cfdcf0; box-shadow: var(--shadow-sm); }
.gl-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
.gl-term { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.gl-abbr { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--brand); background: var(--brand-light); padding: 2px 7px; border-radius: 5px; }
.gl-def { font-size: 13px; color: var(--text-2); line-height: 1.6; flex: 1; }
.gl-def a { color: var(--brand); font-weight: 500; }
.gl-tag { font-size: 11px; font-weight: 600; color: var(--text-3); margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line-2); }
.glossary-empty { text-align: center; padding: 40px 0; color: var(--text-3); font-size: 14px; }
.gl-empty { text-align: center; padding: 48px 0; color: var(--text-3); font-size: 14px; }

.detail-back { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--brand); margin-bottom: 18px; text-decoration: none; }
.detail-back:hover { text-decoration: underline; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 0; color: var(--text-3); }

/* FOOTER */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 18px 24px; margin-top: auto; width: 100%; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-3); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-3); transition: color 0.15s; }
.footer-links a:hover { color: var(--brand); }

/* ============ CONTACT MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10, 21, 48, 0.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-card {
  background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 544px;
  padding: 32px; position: relative; box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.95); transition: all 0.3s ease;
}
.modal-overlay.active .modal-card { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 16px; right: 16px; background: transparent; border: none;
  color: var(--text-3); padding: 8px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: var(--bg-soft); color: var(--text); }
.modal-card h3 { font-size: 22px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.modal-card p { color: var(--text-3); font-size: 14.5px; margin: 0 0 24px; }
.modal-card .form-group { margin-bottom: 16px; }
.modal-card .form-row { display: flex; gap: 16px; }
.modal-card .form-row .form-group { flex: 1; }
.modal-card .form-group label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.modal-card .form-group label span.req { color: var(--brand); margin-left: 2px; }
.modal-card .form-group input, .modal-card .form-group select, .modal-card .form-group textarea {
  width: 100%; font-family: inherit; font-size: 14.5px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); color: var(--text); transition: all 0.2s;
}
.modal-card .form-group input:focus, .modal-card .form-group select:focus, .modal-card .form-group textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(39, 112, 212, 0.15); background: #fff;
}
.modal-card .form-group select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238693ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px !important;
}
.modal-card .btn-primary {
  display: block; width: 100%; padding: 12px; border: none; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.modal-card .btn-primary:hover { background: var(--brand-2); }
.modal-card .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
@media (max-width: 500px) { .modal-card .form-row { flex-direction: column; gap: 0; } }

/* ============ TOAST NOTIFICATION ============ */
.toast-container { position: fixed; top: 24px; right: 24px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; min-width: 280px; max-width: 420px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: 14px; color: var(--text); border-left: 4px solid var(--brand);
  transform: translateX(120%); opacity: 0; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.toast-success { border-left-color: var(--green, #22c55e); }
.toast.toast-error { border-left-color: #ef4444; }
.toast-icon { flex-shrink: 0; width: 22px; height: 22px; }
.toast-msg { flex: 1; line-height: 1.4; }
.toast-close {
  flex-shrink: 0; background: none; border: none; padding: 4px; cursor: pointer;
  color: var(--text-3); border-radius: 50%; display: flex; transition: color 0.15s;
}
.toast-close:hover { color: var(--text); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .glossary-grid { grid-template-columns: repeat(2, 1fr); }
  .term-list { grid-template-columns: repeat(2, 1fr); }
  .detail-wrap { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .listwrap { grid-template-columns: 1fr; }
  .side-nav { display: none; }
}
@media (max-width: 680px) {
  .nav { display: none; }
  .cat-grid { grid-template-columns: 1fr; }
  .glossary-grid { grid-template-columns: 1fr; }
  .term-list { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .detail-main { padding: 28px 24px 32px; }
  .contact-strip { padding: 28px 24px; }
  .header-hormuz, .header-img-btn { display: none; }
}
