:root {
  color-scheme: light;
  --page: #f3f1eb;
  --surface: #fffefb;
  --surface-subtle: #ebe8df;
  --ink: #191b18;
  --ink-soft: #575b53;
  --ink-faint: #767a71;
  --line: #d8d4ca;
  --line-strong: #bdb8ad;
  --header: rgba(243, 241, 235, 0.9);
  --button: #1f211e;
  --button-hover: #373a34;
  --button-ink: #fffefb;
  --coral: #e4573d;
  --teal: #1d7163;
  --wine: #6f2231;
  --gold: #c59d4e;
  --keylens-stage: #eee1e0;
  --seo-stage: #dfece7;
  --shadow: 0 18px 50px rgba(36, 34, 27, 0.08);
  --focus: #1d7163;
  font-family:
    "Avenir Next", Avenir, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #171916;
  --surface: #20231f;
  --surface-subtle: #292c27;
  --ink: #f5f2e9;
  --ink-soft: #b9bcb3;
  --ink-faint: #91968c;
  --line: #383c35;
  --line-strong: #52574e;
  --header: rgba(23, 25, 22, 0.9);
  --button: #f1eee5;
  --button-hover: #ffffff;
  --button-ink: #1b1d1a;
  --coral: #ff745b;
  --teal: #5cc0ad;
  --wine: #df8293;
  --gold: #e7bd68;
  --keylens-stage: #322326;
  --seo-stage: #1d302b;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  --focus: #78d5c2;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 96px,
    var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 0 45%, var(--page) 78%);
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--button);
  color: var(--button-ink);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  width: min(1240px, calc(100% - 48px));
  height: 68px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  min-height: 38px;
  padding: 0 12px;
  align-items: center;
  gap: 9px;
  border-radius: 5px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.nav-link:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.nav-count {
  display: grid;
  min-width: 23px;
  height: 21px;
  padding: 0 5px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-faint);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.icon-button:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.language-target {
  display: block;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1;
}

.icon-button::after {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  padding: 6px 8px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--surface);
  content: attr(data-tooltip);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  white-space: nowrap;
}

.icon-button:hover::after,
.icon-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.theme-icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-icon--sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon--moon {
  display: block;
}

main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.intro {
  display: grid;
  padding: 76px 0 50px;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
}

.eyebrow {
  display: flex;
  margin: 0 0 18px;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 14px 0 0 var(--gold);
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 5.3vw, 74px);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 0.98;
  overflow-wrap: anywhere;
  word-break: normal;
}

:root[data-language="en"] h1 {
  max-width: 900px;
  font-size: clamp(42px, 4.7vw, 66px);
  line-height: 1;
}

.intro-description {
  max-width: 620px;
  margin: 25px 0 0;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.8;
}

.collection-stats {
  display: grid;
  min-width: 300px;
  margin: 0;
  border-top: 1px solid var(--line-strong);
  grid-template-columns: repeat(3, 1fr);
}

.collection-stats div {
  padding: 16px 16px 0;
  border-left: 1px solid var(--line);
}

.collection-stats div:first-child {
  padding-left: 0;
  border-left: 0;
}

.collection-stats dt {
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.collection-stats dd {
  margin: 6px 0 0;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 650;
}

.extensions {
  display: grid;
  padding-bottom: 48px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.extension-card {
  position: relative;
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  animation: card-enter 600ms cubic-bezier(0.2, 0.75, 0.2, 1) var(--delay) forwards;
}

.extension-card--keylens {
  --card-accent: var(--wine);
}

.extension-card--seo {
  --card-accent: var(--teal);
}

.extension-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 38%, var(--line));
  box-shadow: 0 22px 58px rgba(36, 34, 27, 0.12);
}

.card-hit-area {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 7px;
}

.card-hit-area:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -4px;
}

@keyframes card-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preview {
  position: relative;
  height: 322px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.preview::after {
  position: absolute;
  inset: auto 0 0;
  height: 54px;
  background: linear-gradient(transparent, var(--surface));
  content: "";
  pointer-events: none;
}

.preview--keylens {
  background: var(--keylens-stage);
}

.preview--seo {
  background: var(--seo-stage);
}

.browser-bar {
  display: flex;
  height: 38px;
  padding: 0 16px;
  align-items: center;
  border-bottom: 1px solid rgba(90, 83, 72, 0.16);
  background: rgba(255, 255, 255, 0.56);
  color: #6f6d66;
  backdrop-filter: blur(10px);
}

:root[data-theme="dark"] .browser-bar {
  background: rgba(18, 20, 18, 0.5);
  color: #b9b9b0;
}

.browser-dots {
  display: flex;
  gap: 5px;
}

.browser-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.36;
}

.browser-address {
  max-width: 68%;
  margin: 0 auto;
  padding: 5px 16px;
  overflow: hidden;
  border: 1px solid rgba(90, 83, 72, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-menu {
  width: 14px;
  height: 2px;
  border-radius: 4px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
  opacity: 0.32;
}

.preview-canvas {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  top: 38px;
  display: flex;
  justify-content: center;
}

.preview-canvas img {
  display: block;
  height: auto;
  box-shadow: 0 14px 32px rgba(32, 25, 23, 0.16);
}

.preview-canvas--portrait {
  padding: 22px 20px 0;
  align-items: flex-start;
}

.preview-canvas--portrait img {
  width: 176px;
  border: 1px solid rgba(84, 74, 66, 0.14);
  border-radius: 8px 8px 0 0;
}

.preview-canvas--landscape {
  align-items: flex-end;
}

.preview-canvas--top {
  align-items: flex-start;
}

.preview-canvas--landscape img {
  width: calc(100% - 44px);
  border: 1px solid rgba(55, 73, 67, 0.16);
  border-radius: 7px 7px 0 0;
}

.card-index {
  position: absolute;
  top: 54px;
  right: 19px;
  z-index: 2;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(44, 44, 38, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  color: #33352f;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

:root[data-theme="dark"] .card-index {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(20, 22, 20, 0.45);
  color: #ece9e0;
}

.card-content {
  display: flex;
  flex: 1;
  padding: 28px;
  flex-direction: column;
}

.card-heading {
  display: grid;
  align-items: center;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
}

.card-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card-title-group {
  min-width: 0;
}

.card-category {
  margin: 0 0 4px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-title-group h3 {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 680;
  letter-spacing: 0;
  line-height: 1;
}

.status-pill {
  display: inline-flex;
  height: 27px;
  padding: 0 10px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.status-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 14%, transparent);
}

.extension-card--keylens .status-dot {
  background: var(--wine);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wine) 14%, transparent);
}

.card-description {
  min-height: 74px;
  margin: 24px 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.feature-list {
  display: grid;
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 11px;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 550;
}

.feature-list svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--teal);
  stroke-width: 1.8;
}

.extension-card--keylens .feature-list svg {
  color: var(--wine);
}

.tag-list {
  display: flex;
  margin: 18px 0 24px;
  padding: 0;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
}

.tag-list li {
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.card-footer {
  display: flex;
  margin-top: auto;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.card-meta {
  display: grid;
  gap: 5px;
}

.version {
  margin: 0;
  color: var(--ink-faint);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
}

.version span {
  margin: 0 5px;
}

.details-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease;
}

.details-link:hover {
  color: var(--card-accent);
}

.details-link svg {
  width: 12px;
  height: 12px;
  transition: transform 160ms ease;
}

.extension-card:hover .details-link svg {
  transform: translate(2px, -2px);
}

.download-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  min-height: 44px;
  padding: 0 16px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--button);
  border-radius: 5px;
  background: var(--button);
  color: var(--button-ink);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.download-button:hover {
  background: var(--button-hover);
  box-shadow: 0 6px 16px rgba(21, 22, 19, 0.16);
  transform: translateY(-1px);
}

.download-button svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.install-note {
  display: grid;
  margin-bottom: 64px;
  padding: 24px 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
}

.install-note-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--teal);
}

.install-note-icon svg {
  width: 19px;
  height: 19px;
}

.install-note h2 {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 680;
}

.install-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.install-note code {
  margin: 0 4px;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--surface-subtle);
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.text-link {
  display: inline-flex;
  min-height: 40px;
  padding: 0 4px;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.text-link svg {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.text-link:hover svg {
  transform: translate(2px, -2px);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  width: min(1240px, calc(100% - 48px));
  min-height: 86px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--ink-faint);
  font-size: 10px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner span {
  margin: 0 6px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 960px) {
  .intro {
    padding-top: 58px;
    align-items: start;
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .collection-stats {
    width: min(100%, 430px);
  }

  .extension-card .preview {
    height: 292px;
  }

  .card-content {
    padding: 24px;
  }

  .status-pill {
    display: none;
  }

  .card-heading {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .card-description {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  body {
    background-size: 100% 84px;
  }

  .header-inner,
  main,
  .footer-inner {
    width: min(100% - 32px, 620px);
  }

  .header-inner {
    height: 62px;
  }

  .brand-name,
  .nav-link {
    display: none;
  }

  .intro {
    padding: 48px 0 36px;
  }

  h1 {
    max-width: 560px;
    font-size: clamp(40px, 11.5vw, 60px);
    line-height: 1.04;
  }

  :root[data-language="en"] h1 {
    max-width: 620px;
    font-size: clamp(40px, 10vw, 58px);
    line-height: 1.04;
  }

  .intro-description {
    margin-top: 20px;
    font-size: 14px;
  }

  .collection-stats {
    width: 100%;
  }

  .collection-stats div {
    padding: 13px 10px 0;
  }

  .collection-stats dt {
    font-size: 9px;
  }

  .collection-stats dd {
    font-size: 11px;
  }

  .extensions {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .preview {
    height: 300px !important;
  }

  .card-content {
    padding: 22px;
  }

  .install-note {
    margin-bottom: 48px;
    padding: 22px;
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .text-link {
    grid-column: 2;
    justify-self: start;
  }

  .footer-inner {
    min-height: 104px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .header-inner,
  main,
  .footer-inner {
    width: calc(100% - 24px);
  }

  .intro {
    padding-top: 42px;
  }

  h1 {
    font-size: clamp(36px, 11.5vw, 46px);
  }

  :root[data-language="en"] h1 {
    font-size: clamp(38px, 10.5vw, 44px);
  }

  .preview {
    height: 260px !important;
  }

  .preview-canvas--portrait img {
    width: 150px;
  }

  .preview-canvas--landscape img {
    width: calc(100% - 24px);
  }

  .card-content {
    padding: 20px;
  }

  .card-heading {
    gap: 12px;
  }

  .card-description {
    margin: 20px 0 17px;
    font-size: 13px;
  }

  .card-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .download-button {
    justify-content: center;
  }

  .install-note {
    grid-template-columns: 1fr;
  }

  .text-link {
    grid-column: 1;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .extension-card {
    opacity: 1;
    transform: none;
  }
}
