/* Solvir 视觉 (同 packages/ui/src/tokens/solvir-preset.ts)：底 #F6F7FA / 墨 #1B2133 / 次要 #667085；
   卡片大圆角、阴影带色、主按钮是墨色胶囊。本站强调色 #5B4BC4。 */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/assets/manrope.a30ddcd349.woff2") format("woff2");
}

:root {
  --ink: #1b2133;
  --ground: #f6f7fa;
  --mist: #667085;
  --slate2: #3f4a66;
  --chip: #eef1f7;
  --line: #e2e6ef;
  --accent: #5b4bc4;
  --accent-soft: #eeebfa;
  --ok: #1f9d62;
  --ok-soft: #e6f4ed;
  --warn: #b7791f;
  --warn-soft: #fbf2e2;
  --fail: #d2413a;
  --fail-soft: #fbeae9;
  --card: #fff;
  --shadow: 0 1px 2px rgb(40 36 90 / 5%), 0 12px 32px -12px rgb(60 50 140 / 18%);
  --radius: 24px;
  --font: "Manrope", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui,
    sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.narrow {
  max-width: 760px;
}

/* 头部 */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(246 247 250 / 85%);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgb(27 33 51 / 6%);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

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

.lockup .word {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.lockup .bar {
  width: 1px;
  height: 14px;
  background: rgb(27 33 51 / 15%);
}

.lockup .product {
  color: var(--mist);
  font-size: 14px;
  font-weight: 500;
}

.switch {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.switch:hover {
  border-color: var(--ink);
}

/* 首屏 */
.hero {
  padding: 56px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--fail-soft);
  color: var(--fail);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 800;
}

.lead-text {
  margin-top: 18px;
  max-width: 34em;
  color: var(--slate2);
  font-size: 18px;
}

/* 表单 */
.lead {
  margin-top: 28px;
  max-width: 520px;
}

.field-row {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.field-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow);
}

.field-row input {
  flex: 1;
  min-width: 0;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.field-row input::placeholder {
  color: #98a2b3;
}

.btn {
  flex: none;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: #2b3350;
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-quiet {
  background: var(--chip);
  color: var(--ink);
}

.btn-quiet:hover {
  background: #e3e7f0;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-note {
  margin-top: 10px;
  padding-left: 20px;
  color: var(--mist);
  font-size: 13px;
}

.form-error {
  margin-top: 10px;
  padding-left: 20px;
  color: var(--fail);
  font-size: 14px;
  font-weight: 600;
}

.lead-done {
  padding: 20px;
  border-radius: 20px;
  background: var(--ok-soft);
}

.done-msg {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #13603d;
  font-weight: 700;
}

.tick {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 13px;
}

.site-form {
  margin-top: 16px;
}

.site-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--slate2);
  font-size: 14px;
}

.site-form .field-row {
  box-shadow: none;
}

.site-done {
  margin-top: 12px;
  color: #13603d;
  font-size: 14px;
}

/* 卡片 */
.card {
  padding: 24px;
  border: 1px solid rgb(27 33 51 / 5%);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--mist);
}

.versions table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 15px;
}

.versions th {
  padding: 0 0 8px;
  color: var(--mist);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.versions td {
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.versions td:last-child,
.versions th:last-child {
  text-align: right;
}

.ver {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.ver-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.ver-bad {
  background: var(--fail-soft);
  color: var(--fail);
}

.source {
  margin-top: 14px;
  color: var(--mist);
  font-size: 12px;
  line-height: 1.7;
}

/* 区块 */
.section {
  padding: 56px 0;
}

.section-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
}

.section-lead {
  margin-top: 12px;
  max-width: 40em;
  color: var(--slate2);
}

.grid-3,
.grid-2,
.steps {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

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

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

.card h3 {
  font-size: 18px;
  font-weight: 700;
}

.card p {
  color: var(--slate2);
}

.risk h3 {
  margin: 14px 0 8px;
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.pill-fail {
  background: var(--fail-soft);
  color: var(--fail);
}

.pill-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.footnote {
  margin-top: 18px;
  color: var(--mist);
  font-size: 14px;
}

.path .fit {
  margin-top: 6px;
  color: var(--mist);
  font-size: 14px;
}

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

.path li {
  position: relative;
  margin-top: 10px;
  padding-left: 22px;
  color: var(--slate2);
}

.path li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--mist);
}

.path-main {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
}

.path-main li::before {
  background: var(--accent);
}

.steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
  list-style: none;
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  font-size: 15px;
}

.faq {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.qa {
  padding: 0;
}

.qa summary {
  padding: 18px 24px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary::after {
  content: "+";
  float: right;
  color: var(--mist);
  font-weight: 500;
}

.qa[open] summary::after {
  content: "−";
}

.qa p {
  padding: 0 24px 20px;
}

.cta-card {
  padding: 40px;
  text-align: left;
}

.foot {
  padding: 32px 0 48px;
  color: var(--mist);
  font-size: 14px;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.foot nav {
  display: flex;
  gap: 20px;
}

.foot a,
.linklike {
  color: var(--mist);
}

.linklike {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* 同意横幅 (只对欧洲时区显示) */
.consent {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 40px -8px rgb(27 33 51 / 30%);
  font-size: 14px;
}

.consent-actions {
  display: flex;
  gap: 8px;
}

.consent .btn {
  padding: 8px 16px;
  font-size: 14px;
}

.notfound {
  display: grid;
  gap: 12px;
  place-items: center;
  min-height: 100vh;
  padding: 16px;
  text-align: center;
}

.notfound h1 {
  font-size: 48px;
}

.versions .more {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
}

/* 漏洞说明文章页 */
.article-main {
  padding: 32px 0 24px;
}

.article {
  font-size: 17px;
  line-height: 1.75;
}

.article h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
}

.article > section {
  margin-top: 40px;
}

.article h2 {
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 800;
  scroll-margin-top: 76px;
}

.article h3 {
  margin: 22px 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.article p + p,
.article p + ul,
.article p + ol,
.article p + table,
.article p + .table-wrap,
.article table + p,
.article .table-wrap + p {
  margin-top: 14px;
}

.article ul,
.article ol {
  margin: 0;
  padding-left: 22px;
}

.article li + li {
  margin-top: 8px;
}

.article code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--chip);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  word-break: break-word;
}

.crumbs {
  margin-bottom: 14px;
  color: var(--mist);
  font-size: 14px;
}

.crumbs a {
  color: var(--mist);
}

.updated {
  margin-top: 10px;
  color: var(--mist);
  font-size: 14px;
}

.article .summary {
  margin-top: 28px;
}

.summary h2 {
  font-size: 15px;
  color: var(--mist);
}

.summary dl {
  margin: 0;
}

.summary dl > div {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.summary dt {
  color: var(--mist);
  font-weight: 600;
}

.summary dd {
  margin: 0;
}

.toc {
  margin-top: 28px;
}

.toc h2 {
  font-size: 15px;
  color: var(--mist);
}

.toc ol {
  font-size: 15px;
}

.table-wrap {
  overflow-x: auto;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.article th,
.article td {
  padding: 10px 12px 10px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article thead th {
  border-top: 0;
  color: var(--mist);
  font-size: 13px;
  font-weight: 600;
}

.article tbody th {
  white-space: nowrap;
  font-weight: 700;
}

.article .vtable {
  max-width: 420px;
}

.article .vtable td:last-child,
.article .vtable th:last-child {
  text-align: right;
}

.refs {
  font-size: 15px;
  word-break: break-all;
}

.article .cta-card {
  margin-top: 48px;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

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

@media (max-width: 640px) {
  .hero {
    padding: 32px 0 40px;
  }

  .article {
    font-size: 16px;
  }

  .summary dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .article tbody th {
    white-space: normal;
  }

  .lead-text {
    font-size: 16px;
  }

  .field-row {
    flex-direction: column;
    padding: 6px;
    border-radius: 20px;
  }

  .field-row input {
    padding: 12px 14px;
  }

  .form-note,
  .form-error {
    padding-left: 4px;
  }

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

  .section {
    padding: 40px 0;
  }

  .cta-card {
    padding: 24px;
  }

  .lockup .product {
    display: none;
  }

  .lockup .bar {
    display: none;
  }
}

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