/* ==========================================================================
   EMF Mod — emfmod.com
   Design seed: S01 Clean SaaS
   Palette (picked from the EMF logo cubes): Blue (primary), Navy (ink),
   Ruby red (secondary), Gold (accent)
   ========================================================================== */

/* ---------- Fonts (self-hosted Poppins, works offline and on file://) ---------- */
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --blue: #0075AF;
  --blue-dark: #005A87;
  --blue-light: #2E9BD3;
  --blue-tint: #E6F3FA;
  --navy: #101820;
  --ruby: #A73E3E;
  --ruby-tint: #F9EDED;
  --gold: #C19A01;
  --gold-tint: #FBF6E2;
  --red: #B23A3A;
  --red-tint: #FBECEC;
  --ink: #101820;
  --text: #33404A;
  --muted: #5C6A75;
  --line: #DCE4EA;
  --mist: #F3F6F9;
  --white: #FFFFFF;

  --font: "Poppins", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 32, .06), 0 2px 8px rgba(16, 24, 32, .04);
  --shadow-md: 0 10px 30px -12px rgba(16, 24, 32, .18);
  --shadow-lg: 0 30px 60px -24px rgba(16, 24, 32, .28);

  --header-h: 76px;
  --container: 1200px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s var(--ease); }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.025em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; background: var(--mist); border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; color: var(--ink); }
:focus-visible { outline: 3px solid var(--ruby); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--blue-tint); color: var(--ink); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--navy); color: #FFFFFF; padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip-link:focus { top: 12px; color: #FFFFFF; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: inherit; font-weight: 500; font-size: 1rem; line-height: 1;
  padding: 1em 1.6em; border-radius: var(--r-pill);
  border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--blue); color: #FFFFFF; box-shadow: 0 8px 20px -8px rgba(0, 117, 175, .55); }
.btn-primary:hover { background: var(--blue-dark); color: #FFFFFF; transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(0, 117, 175, .6); }
.btn-ghost { background: #FFFFFF; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--blue-light); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-lg { font-size: 1.06rem; padding: 1.1em 1.9em; }
.btn-sm { font-size: .92rem; padding: .78em 1.25em; }
.text-link { font-weight: 500; text-decoration: none; border-bottom: 1.5px solid var(--blue-light); padding-bottom: 1px; }
.text-link:hover { border-color: var(--blue-dark); }

/* ---------- Header ---------- */
#site-header { position: sticky; top: 0; z-index: 100; }
.site-header {
  height: var(--header-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 24px -18px rgba(16, 24, 32, .35); background: rgba(255, 255, 255, .94); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; flex: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand span b { color: var(--blue); font-weight: 700; }
.brand:hover { color: var(--ink); }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.main-nav a {
  display: block; padding: .5em .8em; border-radius: var(--r-pill);
  font-size: .94rem; font-weight: 500; color: var(--muted); text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.main-nav a:hover { color: var(--ink); background: var(--mist); }
.main-nav a.is-active { color: var(--blue-dark); background: var(--blue-tint); }
.nav-cta-mobile { display: none; }
.header-cta { flex: none; }
.menu-toggle {
  display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #FFFFFF;
  cursor: pointer; position: relative; flex: none;
}
.menu-toggle span { position: absolute; left: 13px; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle span:nth-child(3) { top: 28px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Sections (shared rhythm) ---------- */
.section { padding: 104px 0; position: relative; }
.section-tint { background: var(--mist); }
.section-head { max-width: 680px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.06rem; margin: 0; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; color: var(--blue-dark); margin-bottom: 14px; }
.kicker::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--blue-light); }

/* ---------- Hero: split layout ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); z-index: 0; pointer-events: none; }
.hero::before { width: 520px; height: 520px; left: -160px; top: -120px; background: rgba(0, 117, 175, .18); animation: drift 18s ease-in-out infinite alternate; }
.hero::after { width: 420px; height: 420px; right: -160px; top: 18%; background: rgba(167, 62, 62, .12); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(60px, 40px); } }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: .45em 1em .45em .5em; border-radius: var(--r-pill);
  background: #FFFFFF; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .9rem; font-weight: 500; color: var(--ink); margin-bottom: 22px;
}
.hero-badge i { white-space: nowrap; font-style: normal; background: var(--blue-tint); color: var(--blue-dark); border-radius: var(--r-pill); padding: .15em .7em; font-size: .82rem; }
.hero h1 { margin-bottom: 20px; max-width: 17ch; font-size: clamp(2.1rem, 3.9vw, 3.15rem); }
.hero-lead { font-size: 1.12rem; color: var(--muted); max-width: 56ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; font-size: .93rem; color: var(--text); }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 18px; height: 18px; color: var(--blue); }
.hero-visual { position: relative; }
.hero-visual .frame { border-radius: 30px; box-shadow: var(--shadow-lg); background: #FFFFFF; }
.hero-visual .frame img { border-radius: 30px; width: 100%; }
.float-tag {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 14px; padding: .6em .95em; font-size: .88rem; font-weight: 500; color: var(--ink); box-shadow: var(--shadow-md);
  animation: bob 6s ease-in-out infinite;
}
.float-tag b { width: 10px; height: 10px; border-radius: 3px; background: var(--gold); }
.float-tag.t1 { left: -26px; top: 22%; }
.float-tag.t2 { right: -18px; top: 56%; animation-delay: -3s; }
.float-tag.t2 b { background: var(--ruby); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Hero load sequence (the one orchestrated moment) */
.hero .load { opacity: 0; transform: translateY(16px); animation: rise .8s var(--ease) forwards; }
.hero .load.d1 { animation-delay: .05s; } .hero .load.d2 { animation-delay: .15s; } .hero .load.d3 { animation-delay: .25s; }
.hero .load.d4 { animation-delay: .35s; } .hero .load.d5 { animation-delay: .45s; }
.hero-visual.load { transform: translateY(24px) scale(.98); animation-duration: 1s; animation-delay: .2s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- About: image-left split ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: var(--r-lg); box-shadow: var(--shadow-md); border: 1px solid var(--line); width: 100%; }
.about-note {
  position: absolute; right: -20px; bottom: -26px; background: var(--navy); color: #FFFFFF; border-radius: var(--r-md);
  padding: 16px 20px; max-width: 250px; font-size: .9rem; line-height: 1.5; box-shadow: var(--shadow-lg);
}
.about-note strong { display: block; color: var(--gold); font-weight: 500; margin-bottom: 2px; }
.check-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 7px; background: var(--blue-tint)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316694A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.about-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.about-facts div { background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.about-facts dt { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.about-facts dd { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.45; }

/* ---------- Features: bento grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 28px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #D2E0E7; }
.feature.wide { grid-column: span 2; display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; background: linear-gradient(135deg, #FFFFFF 40%, var(--blue-tint)); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; background: var(--blue-tint); color: var(--blue-dark); }
.feature.wide .feature-icon { margin-bottom: 0; }
.feature.wide.alt { background: linear-gradient(135deg, #FFFFFF 40%, var(--gold-tint)); }
.feature.wide.alt2 { background: linear-gradient(135deg, #FFFFFF 40%, var(--ruby-tint)); }
.feature-icon svg { width: 26px; height: 26px; }
.feature-icon.lapis { background: var(--ruby-tint); color: var(--ruby); }
.feature-icon.amber { background: var(--gold-tint); color: #907616; }
.feature h3 { margin-bottom: .45em; }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }

/* ---------- How it works: connected steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; counter-reset: step; }
.steps::before { content: ""; position: absolute; top: 27px; left: 12%; right: 12%; height: 2px; background: repeating-linear-gradient(90deg, var(--blue-light) 0 10px, transparent 10px 18px); }
.step { position: relative; text-align: center; padding: 0 8px; }
.step-num {
  position: relative; z-index: 1; width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center; background: #FFFFFF; border: 2px solid var(--blue); color: var(--blue-dark); font-weight: 700; font-size: 1.15rem;
  box-shadow: 0 0 0 8px var(--mist);
}
.step h3 { font-size: 1.08rem; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }
.steps-cta { text-align: center; margin-top: 48px; }

/* ---------- Compatibility ---------- */
.compat-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; align-items: start; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: #FFFFFF; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 15px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); font-weight: 500; background: var(--mist); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .pill { white-space: nowrap; }
.pill { display: inline-block; font-size: .8rem; font-weight: 500; padding: .2em .75em; border-radius: var(--r-pill); background: var(--blue-tint); color: var(--blue-dark); }
.pill.no { background: var(--red-tint); color: var(--red); }
.pill.maybe { background: var(--gold-tint); color: #7A630F; }
.loader-stack { display: grid; gap: 14px; }
.loader { display: flex; gap: 16px; align-items: flex-start; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.loader-dot { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; color: #FFFFFF; background: var(--blue); font-size: .95rem; }
.loader:nth-child(2) .loader-dot { background: var(--ruby); }
.loader:nth-child(3) .loader-dot { background: var(--gold); }
.loader h3 { font-size: 1rem; margin: 0 0 2px; }
.loader p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- Use cases ---------- */
.usecase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.usecase { border-radius: var(--r-lg); padding: 28px 24px; background: #FFFFFF; border: 1px solid var(--line); position: relative; overflow: hidden; }
.usecase::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--blue-light); }
.usecase:nth-child(2)::after { background: var(--ruby); }
.usecase:nth-child(3)::after { background: var(--gold); }
.usecase:nth-child(4)::after { background: var(--navy); }
.usecase h3 { font-size: 1.06rem; }
.usecase p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ---------- Installation ---------- */
.install-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
.install-aside { position: sticky; top: calc(var(--header-h) + 28px); }
.install-aside p { color: var(--muted); }
.tip { display: flex; gap: 14px; background: var(--ruby-tint); border: 1px solid #E8C8C8; border-radius: var(--r-md); padding: 18px 20px; margin: 24px 0; font-size: .94rem; }
.tip svg { flex: none; width: 22px; height: 22px; color: var(--ruby); margin-top: 2px; }
.tip p { margin: 0; color: var(--text); }
.install-list { list-style: none; margin: 0; padding: 0; counter-reset: ins; display: grid; gap: 14px; }
.install-list li { counter-increment: ins; position: relative; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px 20px 74px; }
.install-list li::before {
  content: counter(ins); position: absolute; left: 20px; top: 20px; width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center; background: var(--navy); color: #FFFFFF; font-weight: 700; font-size: .95rem;
}
.install-list h3 { font-size: 1.02rem; margin-bottom: 4px; }
.install-list p { margin: 0; font-size: .94rem; color: var(--muted); }

/* ---------- Download ---------- */
.download-card {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 0; border-radius: 32px; overflow: hidden;
  background: #FFFFFF; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.download-media { background: linear-gradient(160deg, var(--blue-tint), var(--ruby-tint)); display: grid; place-items: center; padding: 36px; }
.download-media img { border-radius: var(--r-lg); width: 100%; max-width: 480px; }
.download-body { padding: 52px 52px 48px; }
.download-body h2 { margin-bottom: 12px; }
.download-body > p { color: var(--muted); }
.dl-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin: 26px 0 30px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dl-meta div { display: flex; flex-direction: column; }
.dl-meta dt { font-size: .82rem; color: var(--muted); }
.dl-meta dd { margin: 0; font-weight: 500; color: var(--ink); }
.dl-note { font-size: .88rem; color: var(--muted); margin: 18px 0 0; }

/* ---------- Safety ---------- */
.safety { display: grid; grid-template-columns: auto 1fr; gap: 28px; background: var(--gold-tint); border: 1px solid #DBCFA4; border-radius: var(--r-lg); padding: 38px 40px; }
.safety-icon { width: 60px; height: 60px; border-radius: 18px; background: var(--gold); display: grid; place-items: center; color: #FFFFFF; }
.safety-icon svg { width: 30px; height: 30px; }
.safety h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.safety ul { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 32px; padding-left: 1.1em; }
.safety li::marker { color: #907616; }

/* ---------- Pros & cons ---------- */
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pc { border-radius: var(--r-lg); padding: 32px 32px 26px; background: #FFFFFF; border: 1px solid var(--line); }
.pc h3 { display: flex; align-items: center; gap: 10px; }
.pc h3 span { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #FFFFFF; font-size: 1.1rem; background: var(--blue); }
.pc.cons h3 span { background: var(--red); }
.pc ul { list-style: none; padding: 0; margin: 0; }
.pc li { padding: 12px 0; border-top: 1px dashed var(--line); font-size: .96rem; }

/* ---------- Release info ---------- */
.release-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.release-item { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; }
.release-item dt { font-size: .84rem; color: var(--muted); margin-bottom: 4px; }
.release-item dd { margin: 0; font-weight: 500; color: var(--ink); line-height: 1.45; }
.release-foot { margin: 22px 0 0; color: var(--muted); font-size: .94rem; }

/* ---------- Troubleshooting ---------- */
.trouble-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trouble { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; }
.trouble h3 { font-size: 1.02rem; display: flex; gap: 10px; align-items: flex-start; }
.trouble h3::before { content: "!"; flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--red-tint); color: var(--red); font-size: .85rem; margin-top: 1px; }
.trouble p { margin: 0; color: var(--muted); font-size: .94rem; }
.center-link { text-align: center; margin-top: 36px; }

/* ---------- Blog cards (guides preview + blog page) ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card {
  display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card .thumb { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--mist); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.post-card h2, .post-card h3 { font-size: 1.1rem; margin-bottom: .5em; letter-spacing: -0.01em; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--blue-dark); }
.post-card p { font-size: .94rem; color: var(--muted); margin: 0 0 16px; }
.post-card .text-link { margin-top: auto; align-self: flex-start; font-size: .94rem; }

/* ---------- FAQ: tabbed categories + intro column ---------- */
.faq-layout { display: grid; grid-template-columns: .8fr 1.6fr; gap: 56px; align-items: start; }
.faq-intro { position: sticky; top: calc(var(--header-h) + 28px); }
.faq-intro p { color: var(--muted); }
.faq-help { margin-top: 26px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; font-size: .94rem; }
.faq-help p { margin: 0 0 14px; }
.faq-tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: var(--r-pill); background: #FFFFFF; border: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.faq-tab {
  font-family: inherit; font-size: .93rem; font-weight: 500; color: var(--muted); background: transparent; border: 0;
  padding: .7em 1.2em; border-radius: var(--r-pill); cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease);
}
.faq-tab:hover { color: var(--ink); }
.faq-tab[aria-selected="true"] { background: var(--navy); color: #FFFFFF; }
.faq-tab .count { display: inline-block; margin-left: 6px; font-size: .78rem; opacity: .7; }
.faq-panel[hidden] { display: none; }
.faq-item { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 12px; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.faq-item.is-open { border-color: #CBE0EB; box-shadow: var(--shadow-md); }
.faq-item h3 { margin: 0; font-size: 1rem; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; text-align: left;
  font-family: inherit; font-size: 1rem; font-weight: 500; color: var(--ink); background: none; border: 0; padding: 20px 22px; cursor: pointer; border-radius: var(--r-md);
}
.faq-q .plus { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--mist); position: relative; transition: background-color .25s var(--ease), transform .35s var(--ease); }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--ink); border-radius: 2px; transform: translate(-50%, -50%); transition: background-color .25s; }
.faq-q .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.is-open .plus { background: var(--blue); transform: rotate(45deg); }
.faq-item.is-open .plus::before, .faq-item.is-open .plus::after { background: #FFFFFF; }
.faq-a { overflow: hidden; height: 0; transition: height .35s var(--ease); }
.faq-a-inner { padding: 0 22px 20px; color: var(--muted); font-size: .96rem; }
.faq-a-inner p:last-child { margin-bottom: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 64px 0 56px; background: linear-gradient(180deg, var(--blue-tint), #FFFFFF); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 3.8vw, 2.9rem); margin-bottom: 14px; max-width: 22ch; }
.page-hero p { color: var(--muted); max-width: 62ch; font-size: 1.06rem; margin: 0; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #A5B3BA; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue-dark); }

/* ---------- Prose (supporting pages + articles) ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin-top: 1.8em; }
.prose h3 { font-size: 1.18rem; margin-top: 1.5em; }
.prose p, .prose li { color: var(--text); }
.prose li { margin-bottom: .4em; }
.prose .callout { background: var(--mist); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--r-sm); padding: 18px 22px; margin: 1.6em 0; }
.prose .callout p:last-child { margin: 0; }
.prose .callout.warn { border-left-color: var(--gold); background: var(--gold-tint); border-color: #DBCFA4; }
.page-body { padding: 64px 0 96px; }
.info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0 0 48px; }
.info-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; }
.info-card h2 { font-size: 1.1rem; margin-bottom: .4em; }
.info-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.info-card .big { font-size: 1.12rem; font-weight: 500; color: var(--ink); word-break: break-word; user-select: all; }

/* ---------- Article layout ---------- */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; padding-top: 48px; padding-bottom: 96px; }
.article-hero-img { border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-md); margin: 0 0 36px; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; color: var(--muted); margin-top: 16px; }
.article .lead { font-size: 1.12rem; color: var(--ink); }
.toc { background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 24px; margin: 0 0 28px; }
.toc h2 { font-size: 1rem; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: .95rem; }
.toc a { text-decoration: none; }
.sidebar { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
.side-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.side-card h2 { font-size: 1.05rem; margin-bottom: 12px; }
.side-card.dl { background: var(--navy); border-color: var(--navy); color: #DBE4E9; }
.side-card.dl h2 { color: #FFFFFF; }
.side-card.dl p { font-size: .92rem; }
.side-card ul { list-style: none; padding: 0; margin: 0; }
.side-card li { border-top: 1px solid var(--line); }
.side-card li:first-child { border-top: 0; }
.side-card li a { display: block; padding: 11px 0; font-size: .92rem; color: var(--ink); text-decoration: none; line-height: 1.45; }
.side-card li a:hover { color: var(--blue-dark); }
.related { padding: 72px 0 96px; background: var(--mist); border-top: 1px solid var(--line); }

/* ---------- Blog page ---------- */
.blog-intro-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.blog-intro-strip span { font-size: .86rem; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-pill); padding: .35em .95em; color: var(--text); }
.featured-wrap { margin-bottom: 56px; }
.post-card.featured { flex-direction: row; align-items: stretch; }
.post-card.featured .thumb { flex: 0 0 56%; aspect-ratio: 1200 / 630; }
.post-card.featured .body { padding: 40px 44px; justify-content: center; }
.post-card.featured h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); letter-spacing: -0.02em; }
.post-card.featured p { font-size: 1rem; }
.blog-sub { font-size: 1.4rem; margin-bottom: 24px; }
.post-grid.four { grid-template-columns: repeat(4, 1fr); gap: 22px; }
.post-grid.four .post-card .body { padding: 20px 20px 24px; }
.post-grid.four .post-card h2 { font-size: 1.02rem; }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(180deg, var(--mist), #EEF3F6); border-top: 1px solid var(--line); padding: 72px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 40px; padding-bottom: 52px; }
.footer-brand p { color: var(--muted); margin: 16px 0 0; max-width: 34ch; }
.site-footer h2 { font-size: .98rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--blue-dark); text-decoration: none; }
.footer-contact p { margin: 0 0 6px; color: var(--muted); }
.footer-contact .email { color: var(--ink); font-weight: 500; user-select: all; }
.footer-bottom { border-top: 1px solid var(--line); padding: 22px 0 26px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .88rem; }
.footer-bottom a { color: var(--ink); font-weight: 500; }

/* ---------- Scroll to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 48px; height: 48px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--navy); color: #FFFFFF; display: grid; place-items: center; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, background-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--blue-dark); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.js .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .07s; }
.js .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .14s; }
.js .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .21s; }
.js .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .28s; }
.js .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .35s; }

/* ---------- Responsive ---------- */
@media (max-width: 1160px) {
  .main-nav a { padding: .5em .6em; font-size: .9rem; }
}
@media (max-width: 1040px) {
  :root { --header-h: 68px; }
  .menu-toggle { display: block; }
  .header-cta { margin-left: auto; }
  .main-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h); margin: 0; background: #FFFFFF; border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(16, 24, 32, .3); padding: 12px 24px 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { padding: .8em 1em; font-size: 1rem; border-radius: 12px; }
  .nav-cta-mobile { display: block; margin-top: 12px; }
  .main-nav .nav-cta-mobile .btn { display: flex; width: 100%; color: #FFFFFF; background: var(--blue); padding: 1em 1.4em; border-radius: var(--r-pill); }
  .main-nav .nav-cta-mobile .btn:hover { background: var(--blue-dark); color: #FFFFFF; }
  .hero-grid, .about-grid, .install-grid, .compat-grid, .faq-layout, .article-wrap { grid-template-columns: 1fr; }
  .hero-grid { gap: 48px; }
  .hero h1 { max-width: 18ch; }
  .hero-visual { max-width: 620px; }
  .install-aside, .faq-intro, .sidebar { position: static; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature:last-child { grid-column: span 2; }
  .usecase-grid, .release-grid { grid-template-columns: 1fr 1fr; }
  .trouble-grid, .post-grid { grid-template-columns: 1fr 1fr; }
  .post-grid.four { grid-template-columns: 1fr 1fr; }
  .post-card.featured .thumb { flex-basis: 50%; }
  .download-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-note { right: 12px; }
}
@media (max-width: 720px) {
  .section { padding: 76px 0; }
  .hero { padding: 40px 0 72px; }
  .header-cta { display: none; }
  .menu-toggle { margin-left: auto; }
  .feature-grid, .usecase-grid, .trouble-grid, .post-grid, .pc-grid, .info-cards { grid-template-columns: 1fr; }
  .feature.wide, .feature:last-child { grid-column: auto; }
  .feature.wide { grid-template-columns: 1fr; }
  .feature.wide .feature-icon { margin-bottom: 4px; }
  .post-grid.four { grid-template-columns: 1fr; }
  .post-card.featured { flex-direction: column; }
  .post-card.featured .thumb { flex-basis: auto; }
  .post-card.featured .body { padding: 22px 24px 26px; }
  .steps { grid-template-columns: 1fr; gap: 28px; text-align: left; }
  .steps::before { top: 10px; bottom: 10px; left: 27px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--blue-light) 0 10px, transparent 10px 18px); }
  .step { text-align: left; display: grid; grid-template-columns: 56px 1fr; gap: 0 18px; padding: 0; }
  .step-num { margin: 0; grid-row: span 2; }
  .about-facts { grid-template-columns: 1fr; }
  .about-note { position: static; margin-top: 16px; max-width: none; }
  .safety { grid-template-columns: 1fr; padding: 28px 24px; }
  .safety ul { grid-template-columns: 1fr; }
  .download-body { padding: 32px 24px; }
  .dl-meta { grid-template-columns: 1fr; }
  .release-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .float-tag.t1 { left: 8px; top: 10px; }
  .float-tag.t2 { right: 8px; top: auto; bottom: 14px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .faq-tabs { display: flex; border-radius: 18px; }
  .faq-tab { flex: 1 1 auto; border-radius: 14px; }
  th, td { padding: 12px 14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero .load { opacity: 1; transform: none; }
  .js .reveal, .js .reveal-stagger > * { opacity: 1; transform: none; }
}
@media (max-width: 480px) {
  .hero-badge { font-size: .8rem; }
}
