/* Redundancy Check plugin introduction */
:root {
  color-scheme: light;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --raised: #eef3f6;
  --line: #d6e0e5;
  --line-strong: #bac9d2;
  --text: #1c2b35;
  --muted: #52616d;
  --subtle: #687681;
  --accent: #17634d;
  --accent-hover: #114c3b;
  --accent-soft: #edf7f2;
  --accent-line: #b6d4c7;
  --code-bg: #f8fafc;
  --shadow: 0 12px 40px rgb(38 61 82 / 5%);
  --site-header-height: 69px;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: var(--sans);
  font-size: 100%;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  scroll-behavior: smooth;
  scroll-padding-top: 126px;
}

/* Score-specific content */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.feature-grid article { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.feature-index { display: inline-flex; margin-bottom: 12px; color: var(--accent); font: 600 .6875rem/1.5 var(--mono); letter-spacing: .08em; }
.feature-grid h3 { margin: 0 0 8px; font-size: 1.0625rem; }
.feature-grid p { margin: 0; font-size: .9375rem; line-height: 1.75; }
.comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.comparison-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.comparison-card.after { border-color: var(--accent-line); }
.comparison-card h3 { margin: 0 0 12px; font-size: 1.0625rem; }
.comparison-card ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: .9375rem; }
.comparison-card li + li { margin-top: 7px; }
.dial-closeup { width: min(100%, 320px); margin: 20px auto 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.dial-closeup img { display: block; width: 100%; height: auto; border-radius: 7px; }
.dial-closeup figcaption { margin-top: 10px; color: var(--muted); font-size: .875rem; text-align: center; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; min-height: 44px; padding: 16px 0; font-size: 1.0625rem; }
.faq-list summary > span { flex: none; color: var(--accent); }
.faq-list details[open] summary > span { transform: rotate(45deg); }
.faq-list p { margin: 0 28px 20px 0; color: var(--muted); }
.video-demo { margin: 22px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.video-demo video { display: block; width: 100%; height: auto; background: #0f1720; }
.video-demo figcaption { padding: 18px 20px; color: var(--muted); font-size: .9375rem; }
.video-demo figcaption strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 1.0625rem; }
.steps { display: grid; gap: 14px; margin: 22px 0 30px; padding: 0; list-style: none; }
.steps > li { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 14px; min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: .9375rem; line-height: 1.75; }
.steps h3 { margin: 0 0 5px; color: var(--text); font-size: 1rem; }
.steps p { margin: 0; }
.step-index { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 700 .8125rem/1 var(--mono); }
.state-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 999px; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.state-badge.pass, .state-badge.warn, .state-badge.unknown { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
@media (max-width: 920px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid article:last-child { grid-column: 1 / -1; }
  .comparison-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article:last-child { grid-column: auto; }
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 1.0625rem; line-height: 1.8; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.4; letter-spacing: -.02em; }
h1 { margin-bottom: 24px; font-size: clamp(3.5rem, 6vw, 5.25rem); line-height: 1.08; letter-spacing: -.045em; }
h2 { margin: 52px 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 2rem; }
h3 { margin: 32px 0 12px; font-size: 1.25rem; }
p { margin-bottom: 18px; color: var(--muted); }
ul, ol { color: var(--muted); }
pre, code { font-family: var(--mono); }
pre { margin: 0 0 20px; padding: 18px 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--code-bg); }
[hidden] { display: none !important; }

.wrap { width: min(1280px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 20px; z-index: 30; transform: translateY(-160%); padding: 10px 20px; background: var(--accent); color: var(--bg); }
.skip-link:focus { transform: none; }

/* Market header */
.site-header { position: sticky; top: 0; z-index: 20; }
.market-banner { padding-block: 12px; border-bottom: 1px solid var(--accent-line); background: var(--accent-soft); }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; min-height: 44px; }
.market-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; min-width: 0; }
.market-location { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.market-separator { color: var(--muted); }
.market-brand, .market-current { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-size: 1.0625rem; font-weight: 600; line-height: 1.5; }
.market-brand:hover, .market-current:hover { color: var(--accent); }
.section-nav { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: .9375rem; }
.section-nav a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
.section-nav a:hover { color: var(--accent); }
.section-nav .nav-npm { padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); }

/* Hero */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: 60px; padding-block: 64px 56px; }
.hero-copy, .hero-visual { min-width: 0; }
.hero-title { display: flex; align-items: center; gap: 18px; }
.hero-title img { flex: none; width: 64px; height: 64px; border-radius: 12px; box-shadow: 0 8px 24px rgb(38 61 82 / 12%); }
.eyebrow { margin-bottom: 4px; color: var(--accent); font: 600 .8125rem/1.7 var(--mono); letter-spacing: .1em; }
.hero-title h1 { margin: 0; }
.lede { max-width: 39em; margin: 28px 0 0; color: var(--muted); font-size: 1.125rem; line-height: 1.9; }
.lede strong { color: var(--text); }
.meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 30px 0 0; }
.meta > div { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.meta dt { color: var(--subtle); font-size: .8125rem; line-height: 1.5; }
.meta dd { min-width: 0; margin: 4px 0 0; color: var(--text); font-size: .875rem; }
.meta code { padding: 0; background: transparent; }
.hero-visual { margin: 0; padding: 8px; overflow: hidden; border: 1px solid #c7dbd2; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.hero-visual img { display: block; width: 100%; height: auto; border-radius: 5px; }

/* Document shell */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 216px; align-items: start; gap: 56px; padding-block: 28px 88px; }
.doc { min-width: 0; }
.toc { position: sticky; top: 104px; align-self: start; display: flex; flex-direction: column; gap: 4px; padding: 4px 0 4px 18px; border-left: 1px solid var(--line); font-size: .875rem; line-height: 1.6; }
.toc strong { margin-bottom: 7px; color: var(--text); font-size: .9375rem; }
.toc a { padding: 5px 0; color: var(--subtle); }
.toc > div { display: flex; flex-direction: column; gap: 3px; }
.toc a:hover { color: var(--accent); }

/* Tabs stay visually consistent with the compact demo tabs on other market pages. */
.js .tab-panel { display: none; }
.js .tab-panel:not([hidden]) { display: block; }
.tabbar { position: sticky; top: calc(var(--site-header-height) + 15px); z-index: 8; display: flex; width: fit-content; max-width: 100%; gap: 4px; margin: 0 0 8px; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); box-shadow: 0 8px 24px rgb(38 61 82 / 5%); backdrop-filter: blur(12px); scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar button { flex: none; min-height: 42px; padding: 9px 18px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: 600 .9375rem/1.4 var(--sans); cursor: pointer; }
.tabbar button:hover { color: var(--text); background: var(--raised); }
.tabbar button[aria-selected="true"] { color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tabbar button:focus-visible { outline-offset: 0; }

/* Content rhythm */
.tab-panel > section { scroll-margin-top: 152px; }
.tab-panel > section:first-child h2 { margin-top: 30px; }
.tab-panel > section + section { margin-top: 12px; }
code { padding: 2px 6px; border-radius: 4px; background: var(--raised); color: #243745; font-size: .875em; overflow-wrap: anywhere; }
pre code { padding: 0; background: none; color: #243745; font-size: .9375rem; line-height: 1.75; }
p code, td code, li code { white-space: nowrap; }
p code { white-space: normal; }
table { width: 100%; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 8px; border-spacing: 0; border-collapse: separate; overflow: hidden; background: var(--surface); font-size: .9375rem; line-height: 1.7; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th + th, td + td { border-left: 1px solid var(--line); }
th { background: var(--accent-soft); color: var(--text); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.relationship-table td:first-child { width: 29%; }
.relationship-table strong, .relationship-table small { display: block; }
.relationship-table small { margin-top: 3px; color: var(--subtle); font-size: .75rem; font-weight: 500; line-height: 1.5; }
.quick-facts th { width: 145px; white-space: nowrap; }
.command-table td:first-child { width: 40%; }
.command-table code { white-space: nowrap; }

.scenario-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 22px 0 26px; padding: 0; list-style: none; }
.scenario-list li { position: relative; min-width: 0; margin: 0; padding: 20px 22px 20px 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: .9375rem; line-height: 1.75; }
.scenario-list li::before { content: ""; position: absolute; top: 28px; left: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.scenario-list strong { color: var(--text); }

.npm-callout { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; margin: 22px 0; padding: 17px 20px; border: 1px solid var(--accent-line); border-radius: 7px; background: var(--accent-soft); }
.npm-callout > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
.npm-callout strong { color: var(--text); }
.npm-callout a { flex: none; color: var(--accent); font-size: .9375rem; }
.npm-callout a:hover, .links a:hover, .footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

.state-list { display: grid; gap: 20px; margin: 22px 0 30px; }
.state-list > article { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.state-list > article > strong { display: block; margin-bottom: 6px; color: var(--text); font-size: 1.0625rem; }
.state-list > article > p { margin-bottom: 0; font-size: 1rem; line-height: 1.75; }
.shot { margin: 20px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: 13px 16px; border-top: 1px solid var(--line); color: var(--subtle); font-size: .9375rem; line-height: 1.65; }
.shot figcaption strong { color: var(--text); }

.trouble-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 22px 0 30px; }
.trouble-list article { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.trouble-list h3 { margin: 0 0 8px; font-size: 1.0625rem; }
.trouble-list p { margin: 0; font-size: .9375rem; line-height: 1.75; }
.trouble-list pre { margin: 14px 0 0; }
.links { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.links li { margin: 0; }
.links a { display: block; padding: 15px 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--accent); font-size: .9375rem; }
.links a:hover { border-color: var(--accent-line); background: var(--accent-soft); }

.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px; padding-block: 28px 40px; border-top: 1px solid var(--line); color: var(--subtle); font-size: .9375rem; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 1100px) {
  .hero { gap: 40px; }
  .layout { grid-template-columns: minmax(0, 1fr) 190px; gap: 36px; }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .wrap { width: calc(100% - 56px); }
  .hero { grid-template-columns: 1fr; padding-block: 48px 44px; }
  .hero-visual { width: min(100%, 760px); }
  .layout { grid-template-columns: 1fr; padding-top: 22px; }
  .toc { display: none; }
  .section-nav a:not(.nav-npm) { display: none; }
  .scenario-list, .trouble-list { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 36px); }
  body { font-size: 1rem; }
  .market-banner { padding-block: 8px; }
  .market-brand, .market-current { font-size: .9375rem; }
  .section-nav { gap: 0; }
  .site-header { position: sticky; }
  .header-inner { gap: 8px 12px; }
  .market-location { flex-wrap: wrap; }
  .tabbar { top: calc(var(--site-header-height) + 8px); }
  .hero { gap: 30px; padding-block: 42px 36px; }
  .hero-title { align-items: flex-start; gap: 14px; }
  .hero-title img { width: 52px; height: 52px; }
  .eyebrow { font-size: .72rem; letter-spacing: .06em; }
  h1 { font-size: 3.25rem; }
  h2 { margin-top: 42px; font-size: 1.625rem; }
  h3 { margin-top: 28px; }
  .lede { margin-top: 24px; font-size: 1.0625rem; }
  .meta { grid-template-columns: 1fr; }
  .meta > div:last-child { grid-column: auto; }
  .hero-visual { padding: 5px; }
  .layout { padding-bottom: 64px; }
  .tabbar { width: calc(100% + 36px); margin: 0 -18px 8px; padding: 6px 14px; border-right: 0; border-left: 0; border-radius: 0; }
  .tabbar button { padding-inline: 14px; }
  .tab-panel > section { scroll-margin-top: calc(var(--site-header-height) + 68px); }
  .tab-panel > section:first-child h2 { margin-top: 26px; }
  .scenario-list li { padding: 18px 18px 18px 30px; }
  .scenario-list li::before { left: 14px; }
  .npm-callout { align-items: flex-start; padding: 16px 18px; }
  .state-list > article { padding: 18px; }
  .trouble-list article { padding: 18px; }
  .command-table td:first-child { width: auto; }
  .command-table code { white-space: normal; }
  .quick-facts th { width: 112px; white-space: normal; }
  .relationship-table { table-layout: fixed; font-size: .875rem; }
  .relationship-table th, .relationship-table td { padding: 10px 8px; }
  .relationship-table th:first-child, .relationship-table td:first-child { width: 28%; }
  .relationship-table th:nth-child(2), .relationship-table td:nth-child(2) { width: 24%; }
  .relationship-table td code { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  .relationship-table .version-short { white-space: nowrap; }
  .footer { display: block; }
  .footer a { margin-top: 4px; }
}

@media (max-width: 380px) {
  .hero-title img { width: 46px; height: 46px; }
  h1 { font-size: 2.9rem; }
  .tabbar button { padding-inline: 12px; font-size: .875rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}

/* Hero screenshot carousel */
.hero-carousel { padding: 8px; }
.carousel-viewport { overflow: hidden; border-radius: 5px; background: #f3f6f8; }
.carousel-track { display: flex; transition: transform 900ms cubic-bezier(.16, 1, .3, 1); will-change: transform; backface-visibility: hidden; }
.carousel-slide { position: relative; flex: 0 0 100%; min-width: 0; margin: 0; }
.carousel-slide img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; }
.carousel-slide figcaption { position: absolute; right: 14px; bottom: 14px; left: 14px; padding: 10px 12px; border-radius: 6px; background: rgb(28 43 53 / 84%); color: #fff; font-size: .875rem; line-height: 1.65; }
.carousel-slide figcaption strong { color: #fff; }
.carousel-controls { display: flex; justify-content: flex-end; padding: 8px 4px 2px; }
.carousel-toggle { min-height: 44px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--muted); font-size: .875rem; cursor: pointer; }
.carousel-toggle:hover, .carousel-toggle[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
@media (max-width: 620px) {
  .carousel-slide figcaption { position: static; border-radius: 0; background: var(--bg); color: var(--muted); font-size: .8125rem; }
  .carousel-slide figcaption strong { color: var(--text); }
  .carousel-controls { justify-content: stretch; }
  .carousel-toggle { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-carousel .carousel-viewport { overflow: visible; }
  .hero-carousel .carousel-track { display: block; transform: none !important; transition: none; }
  .hero-carousel .carousel-slide + .carousel-slide { margin-top: 16px; }
}

/* Copyable install command */
.profile-note { margin: -8px 0 20px; color: var(--muted); font-size: .9375rem; }
.install-command { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0 0 20px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--code-bg); }
.install-command pre { margin: 0; padding: 10px 6px; overflow: hidden; border: 0; background: transparent; }
.install-command pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-button { min-height: 44px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--muted); font-size: .9375rem; white-space: nowrap; cursor: pointer; }
.copy-button:hover, .copy-button.is-copied { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.copy-fallback::backdrop { background: #263d5266; }
.copy-fallback { position: fixed; inset: 15vh 20px auto; z-index: 50; width: min(640px, calc(100% - 40px)); max-height: 80vh; overflow: auto; margin-inline: auto; padding: 24px; border: 1px solid var(--accent); border-radius: 8px; background: var(--surface); }
.copy-fallback textarea { width: 100%; min-height: 180px; padding: 12px; border: 1px solid var(--line); background: var(--bg); font: .9375rem/1.8 var(--mono); }
.copy-fallback button { margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 620px) {
  .install-command { grid-template-columns: 1fr; padding-bottom: 6px; }
  .copy-button { justify-self: end; margin: 0 4px 4px; }
}
