/* ==========================================================================
   太原SEO (www.tyseo.org) 主样式表
   品牌色源自原站 Logo：深蓝 #0B4F8A / 天蓝 #229FD9 / 活力橙 #E06D06
   100% 本地静态资源 · 无外部 CDN · 严格适配 375px 移动端无横向滚动
   ========================================================================== */

:root {
  --brand-primary: #0b4f8a;
  --brand-primary-dark: #083b68;
  --brand-blue: #1366ae;
  --brand-cyan: #229fd9;
  --brand-orange: #e06d06;
  --brand-orange-hover: #c55d03;
  --navy-deep: #0b1b2e;
  --navy-mid: #132842;

  --text-main: #182334;
  --text-secondary: #4a5b73;
  --text-muted: #6c7d95;

  --bg-page: #f6f9fc;
  --bg-white: #ffffff;
  --bg-soft: #edf4fb;
  --bg-warm: #fff7ed;

  --border-light: #dfe8f2;
  --border-mid: #c8d7e8;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 2px 8px rgba(11, 27, 46, 0.05);
  --shadow-md: 0 8px 24px rgba(11, 27, 46, 0.08);
  --shadow-lg: 0 16px 38px rgba(11, 27, 46, 0.12);

  --container-max: 1200px;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-page);
  line-height: 1.72;
  overflow-x: hidden;
}

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

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

a:hover {
  color: var(--brand-orange);
}

h1, h2, h3, h4 {
  margin: 0 0 0.65em;
  line-height: 1.32;
  color: var(--navy-deep);
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 12px rgba(11, 27, 46, 0.04);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--brand-primary);
  background: var(--bg-soft);
}

.main-nav a.active {
  color: var(--brand-primary);
  background: #e5f0fb;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--navy-deep);
  cursor: pointer;
  padding: 0;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

/* ---------- Announcement Banner (Homepage Below Nav) ---------- */
.announce-bar {
  background: linear-gradient(90deg, #0b4f8a 0%, #1366ae 62%, #0e4a7d 100%);
  color: #ffffff;
  border-bottom: 2px solid var(--brand-orange);
}

.announce-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  font-size: 14px;
  flex-wrap: wrap;
}

.announce-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.announce-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--brand-orange);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.announce-text {
  font-weight: 600;
  letter-spacing: 0.2px;
  word-break: break-word;
}

.announce-link {
  color: #ffe4c4;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.announce-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.btn-primary {
  background: var(--brand-orange);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(224, 109, 6, 0.28);
}

.btn-primary:hover {
  background: var(--brand-orange-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--brand-primary);
  color: #ffffff;
}

.btn-secondary:hover {
  background: var(--brand-primary-dark);
  color: #ffffff;
}

.btn-outline {
  background: #ffffff;
  color: var(--brand-primary);
  border-color: var(--border-mid);
}

.btn-outline:hover {
  border-color: var(--brand-primary);
  background: var(--bg-soft);
  color: var(--brand-primary-dark);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.32);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13.5px;
}

/* ---------- Hero Section ---------- */
.hero-section {
  background: linear-gradient(135deg, #0b1b2e 0%, #0d3258 55%, #0b4f8a 100%);
  color: #ffffff;
  padding: 58px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 159, 217, 0.22) 0%, rgba(34, 159, 217, 0) 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(34, 159, 217, 0.18);
  border: 1px solid rgba(147, 197, 253, 0.35);
  color: #bae6fd;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-title {
  font-size: 38px;
  line-height: 1.24;
  color: #ffffff;
  margin-bottom: 18px;
  letter-spacing: -0.3px;
}

.hero-title .accent {
  color: #ffb35c;
}

.hero-desc {
  font-size: 16px;
  color: #d7e6f7;
  margin-bottom: 26px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item strong {
  display: block;
  font-size: 24px;
  color: #ffffff;
  line-height: 1.2;
}

.stat-item span {
  font-size: 12.5px;
  color: #a9c6e4;
}

/* Hero Right Panel */
.hero-board {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.board-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.board-tag {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(224, 109, 6, 0.25);
  color: #ffd099;
  font-weight: 600;
}

.engine-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.engine-row {
  background: rgba(11, 27, 46, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 13px 15px;
}

.engine-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.engine-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.engine-metric {
  font-size: 12.5px;
  font-weight: 700;
  color: #7dd3fc;
}

.engine-note {
  font-size: 12.5px;
  color: #bdd3ea;
  margin: 0;
  line-height: 1.5;
}

/* ---------- Sections ---------- */
.section {
  padding: 58px 0;
}

.section-white {
  background: var(--bg-white);
}

.section-soft {
  background: var(--bg-soft);
}

.section-dark {
  background: var(--navy-deep);
  color: #e2ecf8;
}

.section-dark h2, .section-dark h3 {
  color: #ffffff;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.section-kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--brand-orange);
  margin-bottom: 6px;
}

.section-title {
  font-size: 28px;
  margin-bottom: 6px;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0;
  max-width: 680px;
}

.section-dark .section-sub {
  color: #b5cbe3;
}

/* ---------- Grids & Cards ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-width: 0;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-mid);
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 800;
}

.service-icon.orange {
  background: var(--bg-warm);
  color: var(--brand-orange);
}

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-secondary);
  font-size: 14.5px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--brand-primary);
}

.tag-orange {
  background: var(--bg-warm);
  color: var(--brand-orange);
}

/* ---------- Article Cards ---------- */
.article-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.article-cover {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--navy-deep);
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-cover img {
  transform: scale(1.03);
}

.article-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.cat-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 4px;
  background: #e5f1fc;
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 12px;
}

.article-title {
  font-size: 17.5px;
  line-height: 1.42;
  margin-bottom: 10px;
}

.article-title a {
  color: var(--navy-deep);
}

.article-title a:hover {
  color: var(--brand-primary);
}

.article-summary {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  flex: 1;
}

.article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Case Cards ---------- */
.case-card {
  display: flex;
  flex-direction: column;
}

.case-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 14px 0;
}

.metric-box {
  text-align: center;
  min-width: 0;
}

.metric-val {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: var(--brand-orange);
  line-height: 1.2;
}

.metric-lbl {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ---------- Dual Engine Matrix Band ---------- */
.dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.dual-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 28px;
}

.dual-card.highlight {
  border-color: rgba(224, 109, 6, 0.6);
  background: linear-gradient(180deg, rgba(224, 109, 6, 0.14) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.dual-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.dual-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 14.5px;
  color: #d6e4f4;
}

.dual-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #ffb35c;
  font-weight: 800;
}

/* ---------- Page Header / Breadcrumb ---------- */
.page-banner {
  background: linear-gradient(125deg, #0b1b2e 0%, #0b4f8a 100%);
  color: #ffffff;
  padding: 36px 0 40px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #b7d3ee;
  margin-bottom: 14px;
}

.breadcrumb a {
  color: #d6e8fb;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.page-banner h1 {
  color: #ffffff;
  font-size: 30px;
  margin-bottom: 10px;
}

.page-banner p {
  color: #d5e5f7;
  font-size: 15.5px;
  max-width: 780px;
  margin: 0;
}

/* ---------- Article Detail Layout ---------- */
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px;
  align-items: start;
}

.article-main {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 34px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.takeaway-box {
  background: var(--bg-soft);
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 20px;
  margin: 22px 0 28px;
}

.takeaway-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

.prose {
  font-size: 16px;
  line-height: 1.85;
  color: #1f2d3d;
  word-wrap: break-word;
}

.prose h2 {
  font-size: 22px;
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bg-soft);
  scroll-margin-top: 90px;
}

.prose h3 {
  font-size: 18px;
  margin: 22px 0 10px;
  color: var(--brand-primary);
}

.prose ul, .prose ol {
  margin-bottom: 16px;
}

.prose li {
  margin-bottom: 7px;
}

.prose blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--bg-warm);
  border-left: 4px solid var(--brand-orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #5a3210;
}

.prose pre {
  background: #0f1f33;
  color: #e2e8f0;
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  -webkit-overflow-scrolling: touch;
}

.prose table, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 480px;
}

.prose th, .prose td, .data-table th, .data-table td {
  border: 1px solid var(--border-light);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.prose th, .data-table th {
  background: var(--bg-soft);
  color: var(--navy-deep);
  font-weight: 700;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.widget {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 16px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--bg-soft);
  position: relative;
}

.widget-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 42px;
  height: 2px;
  background: var(--brand-orange);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 8px;
}

.toc-list a {
  display: block;
  font-size: 13.5px;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
}

.toc-list a:hover, .toc-list a.active {
  color: var(--brand-primary);
  background: var(--bg-soft);
  border-left-color: var(--brand-orange);
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  padding: 9px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 14px;
}

.sidebar-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.pn-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
}

.pn-card:hover {
  border-color: var(--brand-primary);
  background: var(--bg-soft);
}

.pn-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pn-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy-deep);
}

/* ---------- FAQ Accordion ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 20px;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: inherit;
}

.faq-q .icon {
  font-size: 20px;
  color: var(--brand-orange);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item.open .faq-q .icon {
  transform: rotate(45deg);
}

.faq-a {
  padding: 0 20px 18px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.75;
  display: none;
}

.faq-item.open .faq-a {
  display: block;
}

/* ---------- Interactive SEO/GEO Tools ---------- */
.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.tool-tab {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
  background: var(--bg-white);
  color: var(--text-main);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.tool-tab.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

.tool-panel {
  display: none;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.tool-panel.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.12);
}

.serp-preview {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-top: 16px;
}

.serp-url {
  font-size: 12.5px;
  color: #1a7f37;
  margin-bottom: 4px;
  word-break: break-all;
}

.serp-title {
  font-size: 18px;
  color: #1a0dab;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.35;
}

.serp-desc {
  font-size: 13.5px;
  color: #4d5156;
  line-height: 1.6;
  margin: 0;
}

.score-bar {
  height: 10px;
  background: #e2ecf5;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0;
}

.score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-orange));
  transition: width 0.25s ease;
}

.code-output {
  background: #0f1f33;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  white-space: pre;
  margin: 14px 0;
  max-height: 380px;
}

.result-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.kpi-box {
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

.kpi-box strong {
  display: block;
  font-size: 22px;
  color: var(--brand-primary);
}

.kpi-box span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Search & Filter Bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-tab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-mid);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
}

.cat-tab.active, .cat-tab:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

.search-form {
  display: flex;
  gap: 8px;
  max-width: 320px;
  width: 100%;
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.page-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
  background: var(--bg-white);
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
}

.page-item.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

/* ---------- CTA Strip ---------- */
.cta-strip {
  background: linear-gradient(120deg, #0b4f8a 0%, #1366ae 60%, #e06d06 140%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-strip h2 {
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 8px;
}

.cta-strip p {
  color: #e4f0fb;
  margin: 0;
  max-width: 620px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #a9bfd8;
  padding: 50px 0 26px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand img {
  height: 40px;
  background: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 13.5px;
  line-height: 1.7;
  color: #a9bfd8;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 15px;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 9px;
  font-size: 13.5px;
}

.footer-links a {
  color: #a9bfd8;
}

.footer-links a:hover {
  color: #ffb35c;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 22px;
  font-size: 13px;
  color: #8ba5c4;
}

.footer-bottom a {
  color: #c9ddf2;
}

.footer-bottom a:hover {
  color: #ffb35c;
}

/* ---------- Responsive (Tablet & 375px Mobile Safe) ---------- */
@media (max-width: 1024px) {
  .hero-grid,
  .content-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 18px;
    gap: 4px;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 11px 12px;
    font-size: 15px;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 15px;
  }

  .hero-section {
    padding: 36px 0 42px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-desc {
    font-size: 14.5px;
  }

  .hero-stats {
    gap: 10px;
  }

  .stat-item strong {
    font-size: 20px;
  }

  .section {
    padding: 38px 0;
  }

  .section-title {
    font-size: 22px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .dual-grid,
  .form-grid,
  .prev-next {
    grid-template-columns: 1fr;
  }

  .result-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-main,
  .tool-panel {
    padding: 20px 16px;
  }

  .cta-strip {
    padding: 26px 20px;
  }

  .page-banner {
    padding: 28px 0 30px;
  }

  .page-banner h1 {
    font-size: 23px;
  }

  .brand-logo img {
    height: 36px;
  }

  .announce-inner {
    padding: 9px 0;
    font-size: 13px;
  }

  .tool-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-tab {
    padding: 9px 10px;
    font-size: 13px;
    text-align: center;
  }
}
