/* ============================================================
   NunX-Tec Blog Redesign — design system
   Tokens aligned with the official site landing (5RT page)
   ============================================================ */
:root {
  --ink: #132119;
  --deep: #0a2318;
  --deep-2: #0e2f21;
  --forest: #14503a;
  --signal: #2fe673;
  --signal-soft: #b9f5c9;
  --signal-pale: #e6f7e4;
  --paper: #f5f4ee;
  --paper-2: #edeee4;
  --white: #ffffff;
  --line: #dbdbd0;
  --line-dark: rgba(255, 255, 255, 0.14);
  --muted: #57665c;
  --muted-dark: #9fb0a4;
  --blue: #1a4a8a;
  --blue-pale: #eef4fb;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --font: "Manrope", "Noto Sans", "Noto Sans SC", "Noto Sans TC", system-ui, sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
  --topbar-h: 68px;
  --fs-body: 17px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow-sm: 0 1px 2px rgba(10, 35, 24, 0.06), 0 2px 8px rgba(10, 35, 24, 0.05);
  --shadow-md: 0 4px 12px rgba(10, 35, 24, 0.08), 0 12px 32px rgba(10, 35, 24, 0.10);
  --shadow-lg: 0 8px 24px rgba(10, 35, 24, 0.12), 0 24px 56px rgba(10, 35, 24, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--forest); }
button { font-family: inherit; cursor: pointer; }
.wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

::selection { background: var(--signal); color: var(--deep); }

/* ---------- reading progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--signal), #7ef0a8);
  z-index: 100; transition: width 0.1s linear;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(245, 244, 238, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; height: var(--topbar-h); min-width: 0; }
.topbar .wrap { max-width: 100%; overflow: visible; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background:
    radial-gradient(circle at 70% 30%, var(--signal) 0 22%, transparent 23%),
    linear-gradient(135deg, var(--forest), var(--deep));
  flex: none;
}
.brand { flex: none; min-width: 0; }
.brand-name { font-size: 17px; letter-spacing: 0.2px; display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-name > span:first-child, .brand-text { white-space: nowrap; }
.brand-sub { font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: 2px; }
.topnav { display: flex; gap: 4px; margin-inline: auto; }
.topnav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--muted);
  transition: all 0.25s var(--ease);
}
.topnav a:hover { color: var(--ink); background: var(--paper-2); }
.topnav a.active { color: var(--deep); background: var(--signal-pale); box-shadow: inset 0 0 0 1px var(--signal); }
.topbar-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.topbar-wa .wa-short { display: none; }
.topbar-wa .wa-full { display: inline; }
.lang-switch { position: relative; flex: none; }
.lang-switch-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper-2); font-size: 12.5px; font-weight: 700; color: var(--ink);
  cursor: pointer; white-space: nowrap; max-width: 120px;
}
.lang-switch-toggle .caret {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--muted); flex: none;
}
.lang-switch.open .lang-switch-toggle .caret { transform: rotate(180deg); }
.lang-switch-menu {
  display: none; position: absolute; top: calc(100% + 6px); inset-inline-end: 0;
  min-width: 168px; max-height: min(70vh, 360px); overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 6px; z-index: 80;
}
.lang-switch.open .lang-switch-menu { display: block; }
.lang-switch-menu button {
  display: block; width: 100%; text-align: start; border: 0; background: transparent;
  padding: 9px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
.lang-switch-menu button:hover { background: var(--paper-2); }
.lang-switch-menu button.active { background: var(--signal-pale); color: var(--deep); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-weight: 700; border: 1.5px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-lg { padding: 14px 26px; font-size: 15.5px; }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--deep); color: var(--signal); box-shadow: var(--shadow-md); }
.btn-signal { background: var(--signal); color: var(--deep); }
.btn-signal:hover { color: var(--deep); box-shadow: 0 6px 20px rgba(47, 230, 115, 0.4); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--forest); color: var(--forest); }
.btn-ghost-light { background: transparent; color: #fff; border-color: var(--line-dark); }
.btn-ghost-light:hover { border-color: var(--signal); color: var(--signal); }

/* ---------- eyebrow ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--forest);
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--signal); }
.eyebrow.light { color: var(--signal-soft); }

/* ---------- hero band (dark) ---------- */
.hero-band, .art-hero {
  position: relative; background: var(--deep); color: #fff; overflow: clip;
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 30%, transparent 75%);
}
.hero-band::after, .art-hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--line-dark);
}
.hero-inner { position: relative; padding: 84px 0 72px; max-width: 820px; }
.hero-title {
  font-size: clamp(34px, 5.2vw, 56px); line-height: 1.12; font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 20px; text-wrap: balance;
}
.hero-lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted-dark); max-width: 560px; margin-bottom: 34px; }

.hero-search {
  position: relative; display: flex; align-items: center; max-width: 560px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-dark); border-radius: 999px;
  padding: 4px 8px 4px 20px; transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.hero-search:focus-within { border-color: var(--signal); background: rgba(255, 255, 255, 0.1); }
.search-icon { width: 18px; height: 18px; color: var(--muted-dark); flex: none; margin-right: 12px; }
.hero-search input {
  flex: 1; background: transparent; border: 0; outline: 0; color: #fff;
  font: inherit; font-size: 15px; padding: 10px 0; min-width: 0;
}
.hero-search input::placeholder { color: var(--muted-dark); }
.hero-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-kbd {
  font-family: var(--mono); font-size: 12px; color: var(--muted-dark);
  border: 1px solid var(--line-dark); border-radius: 6px; padding: 2px 8px; flex: none;
}
.hero-stats {
  display: flex; align-items: center; gap: 16px; margin-top: 26px;
  font-size: 13.5px; color: var(--muted-dark);
}
.hero-stats strong { color: var(--signal); font-family: var(--mono); font-weight: 700; }
.hero-stats .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-dark); }

/* ---------- featured article ---------- */
.featured-wrap { margin-top: 52px; }
.featured {
  display: grid; grid-template-columns: 1.15fr 1fr; border-radius: var(--r-lg);
  background: var(--white); border: 1px solid var(--line); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.featured:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.featured-media {
  position: relative; overflow: hidden; min-height: 340px;
  background: linear-gradient(135deg, #0a2318, #14503a);
}
.featured-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.6s var(--ease);
}
.featured:hover .featured-media img { transform: scale(1.035); }
.featured-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(200deg, transparent 55%, rgba(10, 35, 24, 0.35));
}
.featured-badge {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  background: var(--signal); color: var(--deep);
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: 1.5px;
  padding: 6px 12px; border-radius: 999px; text-transform: uppercase;
}
.featured-body { padding: 36px 36px 32px; display: flex; flex-direction: column; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  color: var(--forest); background: var(--signal-pale);
  border: 1px solid rgba(20, 80, 58, 0.18);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.featured-title {
  font-size: clamp(21px, 2.4vw, 27px); line-height: 1.3; font-weight: 800;
  letter-spacing: -0.01em; margin-bottom: 14px; text-wrap: balance;
}
.featured:hover .featured-title, .card:hover .card-title { color: var(--forest); }
.featured-excerpt { color: var(--muted); font-size: 15px; margin-bottom: 22px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta {
  display: flex; align-items: center; gap: 14px; margin-top: auto;
  font-size: 13px; color: var(--muted);
}
.card-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }
.read-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  font-weight: 700; font-size: 14.5px; color: var(--forest);
}
.read-link svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.featured:hover .read-link svg, .card:hover .read-link svg { transform: translateX(5px); }

/* ---------- filter bar ---------- */
.filterbar {
  position: sticky; top: var(--topbar-h); z-index: 50;
  background: rgba(245, 244, 238, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-block: 1px solid var(--line); margin-top: 48px;
}
.filterbar-inner { display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1.5px solid var(--line); background: var(--white); color: var(--muted);
  border-radius: 999px; padding: 7px 16px; font-size: 13.5px; font-weight: 700;
  white-space: nowrap; transition: all 0.22s var(--ease);
}
.chip:hover { border-color: var(--forest); color: var(--forest); }
.chip.active { background: var(--deep); border-color: var(--deep); color: var(--signal); }
.chip .count { font-family: var(--mono); font-size: 11px; opacity: 0.65; margin-left: 5px; }
.result-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ---------- article grid ---------- */
main.wrap { padding: 40px 0 24px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), opacity 0.4s var(--ease);
  opacity: 0; transform: translateY(14px);
}
.card.in { opacity: 1; transform: none; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media .cat-chip {
  position: absolute; top: 12px; left: 12px; margin: 0;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px);
}
.card-body { padding: 20px 20px 18px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 17.5px; line-height: 1.38; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 10px; transition: color 0.22s var(--ease); text-wrap: balance; }
.card-excerpt {
  font-size: 14px; color: var(--muted); margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .read-link { margin-top: auto; font-size: 13.5px; }
.card .read-link svg { width: 14px; height: 14px; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 72px 0; }
.empty-icon { font-size: 44px; color: var(--line); margin-bottom: 12px; }
.empty-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.empty-lead { color: var(--muted); margin-bottom: 22px; }
.loadmore-wrap { text-align: center; padding: 28px 0 8px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--deep); color: #fff; margin-top: 64px; position: relative; overflow: clip; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 120% at 85% 50%, rgba(47, 230, 115, 0.13), transparent 60%);
}
.cta-inner {
  position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px;
  align-items: center; padding: 72px 0;
}
.cta-copy h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 12px; text-wrap: balance; }
.cta-copy p:not(.eyebrow) { color: var(--muted-dark); font-size: 15.5px; }
.cta-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.cta-form input {
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line-dark);
  border-radius: 999px; padding: 14px 22px; color: #fff; font: inherit; font-size: 15px;
  outline: none; transition: border-color 0.25s var(--ease); min-width: 0;
}
.cta-form input:focus { border-color: var(--signal); }
.cta-form input::placeholder { color: var(--muted-dark); }
.cta-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted-dark); }
.cta-note.ok { color: var(--signal); font-weight: 700; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }

/* ---------- footer ---------- */
.footer { background: var(--deep-2); color: var(--muted-dark); }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 26px 0; font-size: 13px;
}

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 70;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--white); color: var(--forest); box-shadow: var(--shadow-md);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: all 0.3s var(--ease);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top svg { width: 20px; height: 20px; }
.to-top:hover { background: var(--deep); color: var(--signal); }

/* ============================================================
   Article page
   ============================================================ */
.art-hero-inner { position: relative; padding: 56px 0 52px; max-width: 860px; }
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted-dark); margin-bottom: 26px; }
.crumbs a:hover { color: var(--signal); }
.crumb-sep { opacity: 0.5; }
.crumb-cat { color: var(--signal); font-weight: 700; }
.art-title { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.18; font-weight: 800; letter-spacing: -0.015em; margin-bottom: 18px; text-wrap: balance; }
.art-standfirst { font-size: clamp(15.5px, 1.5vw, 18px); color: var(--muted-dark); max-width: 680px; margin-bottom: 28px; }
.art-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; font-size: 13.5px; color: var(--muted-dark); }
.meta-item { display: inline-flex; align-items: center; gap: 7px; }
.meta-item svg { width: 16px; height: 16px; }
.share-row { display: flex; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-dark);
  background: transparent; color: var(--muted-dark); display: grid; place-items: center;
  transition: all 0.22s var(--ease);
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { border-color: var(--signal); color: var(--signal); transform: translateY(-2px); }

/* ---------- layout: TOC + body ---------- */
.art-layout {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px;
  padding: 56px 0 8px; align-items: start;
}
.toc { position: sticky; top: calc(var(--topbar-h) + 32px); }
.toc-title { font-size: 12px; letter-spacing: 2.5px; color: var(--muted); margin-bottom: 14px; }
.toc nav { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--line); }
.toc a {
  font-size: 13.5px; color: var(--muted); padding: 6px 14px; margin-left: -2px;
  border-left: 2px solid transparent; line-height: 1.45; transition: all 0.2s var(--ease);
}
.toc a:hover { color: var(--forest); }
.toc a.active { color: var(--forest); font-weight: 700; border-left-color: var(--signal); }
.toc-cta {
  margin-top: 26px; display: flex; align-items: center; gap: 8px;
  background: var(--signal-pale); border: 1px solid rgba(20, 80, 58, 0.2);
  color: var(--forest); font-size: 13px; font-weight: 700;
  padding: 12px 14px; border-radius: var(--r-sm); transition: all 0.22s var(--ease);
}
.toc-cta svg { width: 15px; height: 15px; flex: none; }
.toc-cta:hover { background: var(--signal); color: var(--deep); }

/* ---------- article typography ---------- */
.art-body { max-width: 740px; }
.art-cover { margin-bottom: 36px; }
.art-cover img { border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.art-cover figcaption { font-size: 12.5px; color: var(--muted); margin-top: 10px; text-align: center; }
.art-body p { margin-bottom: 20px; }
.art-body .lead-para { font-size: 19px; line-height: 1.7; color: var(--ink); font-weight: 500; }
.art-body .lead-para::first-letter { font-weight: 900; }
.art-body h2 {
  font-size: 26px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.3;
  margin: 44px 0 16px; scroll-margin-top: calc(var(--topbar-h) + 24px);
  display: flex; align-items: baseline; gap: 12px;
}
.art-body h2::before {
  content: attr(data-index); font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--signal); background: var(--deep); border-radius: 6px; padding: 3px 8px; flex: none;
  transform: translateY(-2px);
}
.art-body h3 { font-size: 19px; font-weight: 800; margin: 30px 0 12px; scroll-margin-top: calc(var(--topbar-h) + 24px); }
.art-body strong { color: var(--deep); font-weight: 800; }
.art-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.art-body a:hover { color: var(--forest); }

.compare-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0 26px; }
.compare-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 18px; box-shadow: var(--shadow-sm); }
.cc-tag { font-size: 11px; letter-spacing: 2px; color: var(--signal); background: var(--deep); display: inline-block; padding: 3px 9px; border-radius: 5px; margin-bottom: 12px; }
.compare-card h3 { font-size: 16px; margin: 0 0 8px; }
.compare-card p:last-child { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.6; }

.callout {
  background: var(--deep); color: #fff; border-radius: var(--r-md);
  padding: 26px 28px; margin: 32px 0; position: relative; overflow: hidden;
}
.callout::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--signal);
}
.callout-tag { font-size: 11px; letter-spacing: 2.5px; color: var(--signal); margin-bottom: 10px; }
.callout-text { font-size: 15.5px; line-height: 1.7; color: #e8f0ea; }
.callout-text strong { color: var(--signal); }

.table-wrap { overflow-x: auto; margin: 24px 0 28px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); box-shadow: var(--shadow-sm); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.spec-table th {
  text-align: left; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); background: var(--paper-2); padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.spec-table td { padding: 13px 16px; border-bottom: 1px solid var(--paper-2); vertical-align: top; line-height: 1.55; }
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table td:first-child { font-weight: 700; white-space: nowrap; }
.spec-table td:last-child { color: #a03d2e; }

.qa-list { margin: 18px 0 28px; padding-left: 0; list-style: none; counter-reset: qa; }
.qa-list li {
  counter-increment: qa; position: relative; padding: 14px 18px 14px 58px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm);
  margin-bottom: 10px; font-size: 15px; box-shadow: var(--shadow-sm);
}
.qa-list li::before {
  content: "Q" counter(qa); position: absolute; left: 16px; top: 14px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--signal);
  background: var(--deep); border-radius: 6px; padding: 3px 7px;
}
.qa-list strong { color: var(--deep); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0; }
.tag {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: var(--white);
  transition: all 0.2s var(--ease); cursor: default;
}
.tag:hover { color: var(--forest); border-color: var(--forest); }

.prev-next {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  border-top: 1px solid var(--line); padding-top: 28px; margin-top: 8px;
}
.pn-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 6px;
  transition: all 0.22s var(--ease);
}
.pn-item:hover { border-color: var(--forest); box-shadow: var(--shadow-md); color: inherit; transform: translateY(-2px); }
.pn-item.next { text-align: right; }
.pn-dir { font-size: 11px; letter-spacing: 2px; color: var(--muted); }
.pn-title { font-weight: 700; font-size: 14.5px; line-height: 1.45; color: var(--ink); }

/* ---------- related ---------- */
.related-wrap { padding: 64px 0 8px; }
.section-head { margin-bottom: 30px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.01em; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1020px) {
  .grid, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .art-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; margin-bottom: 36px; }
  .toc nav { flex-direction: row; flex-wrap: wrap; border-left: 0; gap: 8px; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin: 0; background: var(--white); }
  .toc a.active { border-color: var(--forest); color: var(--forest); }
  .cta-inner { grid-template-columns: 1fr; gap: 28px; }
  .cta-actions { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .topnav { display: none; }
  .hero-inner { padding: 60px 0 52px; }
  .featured { grid-template-columns: 1fr; }
  .featured-media { min-height: 220px; }
  .featured-body { padding: 26px 22px; }
  .grid, .grid-3 { grid-template-columns: 1fr; }
  .compare-cards { grid-template-columns: 1fr; }
  .prev-next { grid-template-columns: 1fr; }
  .pn-item.next { text-align: left; }
  .filterbar-inner { flex-wrap: wrap; gap: 10px; }
  .share-row { margin-left: 0; width: 100%; }
  .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
  .brand-sub { display: none; }

  .topbar .wrap { width: calc(100% - 24px); max-width: none; }
  .topbar-inner {
    width: 100%; box-sizing: border-box; gap: 8px; padding-inline: 0;
    justify-content: space-between;
  }
  .topbar-actions { gap: 6px; margin-inline-start: 0; flex: none; }
  .lang-switch-toggle { padding: 6px 10px; font-size: 12px; max-width: 76px; }
  .topbar .btn-sm { padding: 7px 12px; font-size: 12px; }
  .topbar-wa .wa-full { display: none !important; }
  .topbar-wa .wa-short { display: inline !important; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-name { font-size: 14px; }
  body { overflow-x: hidden; }

  .cta-form { grid-template-columns: 1fr; }
  .cta-form .btn { width: 100%; }
  .art-body h2::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---- HTML body from Django (sanitized) ---- */
.art-html {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #1a1a1a;
  max-width: 740px;
}
.art-html > *:first-child { margin-top: 0; }
.art-html h2 {
  position: relative;
  margin: 2.4rem 0 1rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--deep, #0a2318);
  scroll-margin-top: 96px;
}
.art-html h3 {
  margin: 1.6rem 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--deep, #0a2318);
  scroll-margin-top: 96px;
}
.art-html p { margin: 0 0 1.05rem; }
.art-html a { color: var(--blue, #1a4a8a); text-decoration: underline; text-underline-offset: 2px; }
.art-html a:hover { color: var(--forest, #14503a); }
.art-html ul, .art-html ol { margin: 0 0 1.2rem 1.25rem; padding: 0; }
.art-html li { margin: 0.35rem 0; }
.art-html blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--signal, #2fe673);
  background: var(--deep, #0a2318);
  color: #e8f5ef;
  border-radius: 0 12px 12px 0;
}
.art-html table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.95rem;
}
.art-html th, .art-html td {
  border: 1px solid #e2e0d8;
  padding: 0.65rem 0.75rem;
  text-align: start;
  vertical-align: top;
}
.art-html th { background: #f0efe8; font-weight: 700; }
.art-html img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1rem 0;
}
.art-html figure { margin: 1.2rem 0; }
.art-html figcaption { font-size: 0.85rem; color: #666; margin-top: 0.4rem; }
.art-cover { margin: 0 0 1.6rem; }
.art-cover img { width: 100%; border-radius: 16px; display: block; }
.pn-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e0d8;
}
.pn-link { display: flex; flex-direction: column; gap: 0.25rem; text-decoration: none; color: var(--forest, #14503a); max-width: 45%; }
.pn-next { text-align: end; align-items: flex-end; }
.pn-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; }
.pn-title { font-weight: 700; }
.card-ph {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #0a2318, #14503a);
  border-radius: 12px;
}
/* language is a compact dropdown — see .lang-switch above */
.noscript-preview { opacity: 0.92; }
.toc-h3 { padding-inline-start: 0.75rem; font-size: 0.85rem; opacity: 0.85; }
[dir="rtl"] .art-html blockquote { border-left: none; border-right: 4px solid var(--signal, #2fe673); border-radius: 12px 0 0 12px; }
[dir="rtl"] .pn-next { text-align: start; align-items: flex-start; }
/* subscribe CTA intentionally omitted this phase */
