:root {
  --brand: #2468f2;
  --brand-dark: #174fc7;
  --brand-soft: #eef4ff;
  --ink: #17233d;
  --muted: #5e6d89;
  --line: #dfe7f5;
  --surface: #ffffff;
  --surface-alt: #f6f9ff;
  --success: #167d5a;
  --shadow: 0 18px 48px rgba(35, 74, 145, 0.12);
  --radius: 22px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC",
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
}

button,
select {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 8px 14px;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(223, 231, 245, 0.85);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.header-row {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  width: 190px;
  height: 55px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(29%) sepia(94%) saturate(2114%)
    hue-rotate(213deg) brightness(99%) contrast(93%);
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 9px 13px;
  color: #34415e;
  font-weight: 600;
  border-radius: 10px;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-soft);
}

.language-menu {
  position: relative;
  flex: 0 0 auto;
}

.language-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 12px;
  color: #34415e;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.language-button::after {
  width: 7px;
  height: 7px;
  content: "";
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 150px;
  margin: 0;
  padding: 7px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: 0.18s ease;
}

.language-menu.is-open .language-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-options button {
  width: 100%;
  padding: 9px 11px;
  color: #34415e;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.language-options button:hover,
.language-options button[aria-checked="true"] {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 4px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 84px;
  background:
    radial-gradient(circle at 82% 26%, rgba(125, 90, 245, 0.18), transparent 30%),
    linear-gradient(135deg, #f9fbff 0%, #eff6ff 48%, #f8f2ff 100%);
}

.hero::before {
  position: absolute;
  top: -130px;
  right: -100px;
  width: 520px;
  height: 520px;
  content: "";
  background: linear-gradient(135deg, rgba(49, 148, 255, 0.14), rgba(151, 85, 245, 0.14));
  border-radius: 44% 56% 70% 30% / 44% 38% 62% 56%;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 68px;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(36, 104, 242, 0.1);
  border-radius: 999px;
}

.hero h1,
.page-hero h1 {
  max-width: 780px;
  margin: 20px 0 20px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero-copy {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 12px 26px rgba(36, 104, 242, 0.24);
}

.button-primary:hover {
  color: #fff;
  background: var(--brand-dark);
}

.button-secondary {
  color: var(--brand);
  background: #fff;
  border-color: #bcd0fa;
}

.hero-visual {
  position: relative;
  min-height: 430px;
}

.visual-card {
  position: absolute;
  overflow: hidden;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(218, 229, 248, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.visual-card:first-child {
  top: 0;
  left: 0;
  width: 78%;
  transform: rotate(-2deg);
}

.visual-card:last-child {
  right: 0;
  bottom: 0;
  width: 72%;
  transform: rotate(2deg);
}

.section {
  padding: 86px 0;
}

.section-alt {
  background: var(--surface-alt);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.2;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.info-card,
.support-card,
.policy-card {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(35, 74, 145, 0.07);
}

.info-card .icon,
.support-card .icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  place-items: center;
  background: linear-gradient(135deg, #2d8bff, #6558f5);
  border-radius: 14px;
}

.info-card h3,
.support-card h2 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.35;
}

.info-card p,
.support-card p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  padding: 76px 0 66px;
  text-align: center;
  background: linear-gradient(135deg, #f8fbff, #f0f5ff 55%, #f8f2ff);
}

.page-hero h1 {
  margin-inline: auto;
  font-size: clamp(36px, 5vw, 56px);
}

.page-hero p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 18px;
}

.device-layout,
.security-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.device-visual {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 520px;
  padding: 34px;
  background: linear-gradient(145deg, #eef5ff, #f7f1ff);
  border-radius: 36px;
}

.device-visual img {
  width: auto;
  max-height: 465px;
  filter: drop-shadow(0 24px 30px rgba(31, 49, 91, 0.18));
}

.device-visual img + img {
  margin-left: -120px;
}

.content-stack h2 {
  margin: 0 0 16px;
  font-size: 36px;
  line-height: 1.25;
}

.content-stack p {
  margin: 0 0 18px;
  color: var(--muted);
}

.check-list {
  display: grid;
  gap: 13px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
}

.check-list li::before {
  position: absolute;
  top: 0.35em;
  left: 0;
  display: grid;
  width: 20px;
  height: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  content: "✓";
  place-items: center;
  background: var(--success);
  border-radius: 50%;
}

.security-visual {
  padding: 30px;
  background: #f7f9ff;
  border: 1px solid var(--line);
  border-radius: 32px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.support-card a {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
}

.notice {
  margin-top: 32px;
  padding: 22px 24px;
  color: #27436f;
  background: #edf5ff;
  border-left: 4px solid var(--brand);
  border-radius: 12px;
}

.policy-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 34px;
}

.policy-nav {
  position: sticky;
  top: 100px;
  padding: 20px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.policy-nav strong {
  display: block;
  margin-bottom: 10px;
}

.policy-nav ol {
  margin: 0;
  padding-left: 22px;
}

.policy-nav a {
  display: block;
  padding: 5px 0;
  color: #4d5e7e;
}

.policy-nav a:hover {
  color: var(--brand);
}

.policy-article {
  min-width: 0;
}

.policy-article section {
  scroll-margin-top: 100px;
}

.policy-article h2 {
  margin: 44px 0 12px;
  padding-top: 4px;
  font-size: 27px;
  line-height: 1.35;
}

.policy-article h2:first-child {
  margin-top: 0;
}

.policy-article h3 {
  margin: 24px 0 8px;
  font-size: 20px;
}

.policy-article p,
.policy-article li {
  color: #4f5f7c;
}

.policy-article ul {
  padding-left: 22px;
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

[data-lang-panel] {
  display: none;
}

html[data-lang="zh-CN"] [data-lang-panel="zh-CN"],
html[data-lang="zh-TW"] [data-lang-panel="zh-TW"],
html[data-lang="en"] [data-lang-panel="en"] {
  display: block;
}

.site-footer {
  padding: 54px 0 28px;
  color: #cbd6ee;
  background: #13203a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 44px;
}

.footer-brand img {
  width: 160px;
  height: 50px;
  object-fit: contain;
}

.footer-brand p {
  max-width: 410px;
  margin: 14px 0 0;
  color: #9dafd0;
}

.footer-links h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 17px;
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding: 4px 0;
  color: #b7c6e3;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  color: #8295bb;
  font-size: 14px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 980px) {
  .header-row {
    gap: 14px;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: 74px;
    right: 20px;
    left: 20px;
    display: none;
    margin: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-list {
    display: grid;
  }

  .language-menu {
    margin-left: 0;
  }

  .hero-grid,
  .device-layout,
  .security-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .policy-layout {
    grid-template-columns: 1fr;
  }

  .policy-nav {
    position: static;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 28px, 1160px);
  }

  .brand img {
    width: 150px;
    height: auto;
  }

  .language-button {
    padding-inline: 10px;
  }

  .hero {
    padding: 64px 0;
  }

  .hero-grid {
    gap: 44px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero-copy,
  .page-hero p {
    font-size: 17px;
  }

  .hero-visual {
    min-height: 330px;
  }

  .section {
    padding: 64px 0;
  }

  .card-grid,
  .support-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .device-visual {
    min-height: 400px;
  }

  .device-visual img {
    max-height: 355px;
  }

  .device-visual img + img {
    margin-left: -90px;
  }

  .footer-grid {
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Privacy page: align the standalone policy with the original Midian theme. */
body[data-page="privacy"] {
  --brand: #20c5b8;
  --brand-dark: #12a99e;
  --brand-soft: #e9f9f7;
  --ink: #2f3338;
  --muted: #6b737c;
  --line: #e2e8e8;
  --surface-alt: #f6f9f9;
  --shadow: 0 8px 24px rgba(30, 77, 74, 0.08);
  --radius: 8px;
  color: var(--ink);
  background: #fff;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
  line-height: 1.8;
}

body[data-page="privacy"] .container {
  width: min(1140px, calc(100% - 40px));
}

body[data-page="privacy"] .site-header {
  position: relative;
  border-bottom: 1px solid #edf1f1;
  background: #fff;
  backdrop-filter: none;
}

body[data-page="privacy"] .header-row {
  min-height: 80px;
  gap: 22px;
}

body[data-page="privacy"] .brand img {
  width: 142px;
  height: 54px;
  object-fit: contain;
  filter: none;
}

body[data-page="privacy"] .nav-list {
  gap: 4px;
}

body[data-page="privacy"] .nav-list a {
  position: relative;
  padding: 27px 12px 24px;
  color: #333;
  font-size: 15px;
  font-weight: 400;
  border-radius: 0;
}

body[data-page="privacy"] .nav-list a:hover,
body[data-page="privacy"] .nav-list a[aria-current="page"] {
  color: var(--brand-dark);
  background: transparent;
}

body[data-page="privacy"] .nav-list a[aria-current="page"]::after {
  position: absolute;
  right: 12px;
  bottom: 15px;
  left: 12px;
  height: 2px;
  content: "";
  background: var(--brand);
}

body[data-page="privacy"] .language-button {
  min-height: auto;
  padding: 8px 4px 8px 10px;
  color: #333;
  background: transparent;
  border: 0;
  border-radius: 0;
}

body[data-page="privacy"] .language-options {
  border-color: #e8eded;
  border-radius: 4px;
  box-shadow: 0 8px 22px rgba(35, 62, 60, 0.12);
}

body[data-page="privacy"] .language-options button {
  border-radius: 3px;
}

body[data-page="privacy"] .page-hero {
  padding: 70px 0 62px;
  text-align: center;
  background: #eaf8f6;
  border-bottom: 1px solid #dcefed;
}

body[data-page="privacy"] .eyebrow {
  padding: 4px 11px;
  color: var(--brand-dark);
  font-size: 13px;
  background: rgba(32, 197, 184, 0.12);
}

body[data-page="privacy"] .page-hero h1 {
  max-width: 820px;
  margin: 18px auto 14px;
  color: #2f3338;
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

body[data-page="privacy"] .page-hero p {
  max-width: 760px;
  color: #68757a;
  font-size: 16px;
}

body[data-page="privacy"] .section {
  padding: 64px 0 80px;
}

body[data-page="privacy"] .policy-layout {
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 30px;
}

body[data-page="privacy"] .policy-nav {
  top: 24px;
  padding: 20px 18px;
  background: #f7faf9;
  border-color: #e1e9e8;
  border-radius: 6px;
}

body[data-page="privacy"] .policy-nav strong {
  color: #333;
  font-size: 16px;
}

body[data-page="privacy"] .policy-nav a {
  padding: 4px 0;
  color: #65706f;
}

body[data-page="privacy"] .policy-nav a:hover {
  color: var(--brand-dark);
}

body[data-page="privacy"] .policy-card {
  padding: 34px 38px 42px;
  border-color: #e3eaea;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(37, 72, 70, 0.06);
}

body[data-page="privacy"] .policy-meta {
  color: #75817f;
  border-color: #e4ebea;
}

body[data-page="privacy"] .policy-article h2 {
  color: #292e31;
  font-size: 25px;
  font-weight: 600;
}

body[data-page="privacy"] .policy-article h3 {
  color: #3a4144;
  font-size: 19px;
  font-weight: 600;
}

body[data-page="privacy"] .policy-article p,
body[data-page="privacy"] .policy-article li {
  color: #5f696d;
}

body[data-page="privacy"] .site-footer {
  padding: 44px 0 22px;
  color: rgba(255, 255, 255, 0.88);
  background: #20c5b8;
}

body[data-page="privacy"] .footer-grid {
  grid-template-columns: 1.5fr 0.8fr 0.8fr;
}

body[data-page="privacy"] .footer-brand img {
  width: 160px;
  height: 50px;
}

body[data-page="privacy"] .footer-brand p,
body[data-page="privacy"] .footer-links a,
body[data-page="privacy"] .footer-bottom {
  color: rgba(255, 255, 255, 0.82);
}

body[data-page="privacy"] .footer-links h2,
body[data-page="privacy"] .footer-links a:hover {
  color: #fff;
}

body[data-page="privacy"] .footer-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top-color: rgba(255, 255, 255, 0.22);
}

@media (max-width: 980px) {
  body[data-page="privacy"] .site-header {
    position: sticky;
  }

  body[data-page="privacy"] .nav-toggle {
    margin-left: auto;
    border-color: #dfe8e7;
    border-radius: 4px;
  }

  body[data-page="privacy"] .site-nav {
    top: 80px;
    border-color: #e1e9e8;
    border-radius: 5px;
    box-shadow: 0 10px 24px rgba(35, 62, 60, 0.12);
  }

  body[data-page="privacy"] .nav-list a {
    padding: 10px 12px;
  }

  body[data-page="privacy"] .nav-list a[aria-current="page"]::after {
    display: none;
  }

  body[data-page="privacy"] .policy-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body[data-page="privacy"] .container {
    width: min(100% - 28px, 1140px);
  }

  body[data-page="privacy"] .header-row {
    min-height: 68px;
  }

  body[data-page="privacy"] .brand img {
    width: 118px;
    height: 46px;
  }

  body[data-page="privacy"] .site-nav {
    top: 68px;
  }

  body[data-page="privacy"] .page-hero {
    padding: 52px 0 46px;
  }

  body[data-page="privacy"] .page-hero h1 {
    font-size: 32px;
  }

  body[data-page="privacy"] .section {
    padding: 44px 0 56px;
  }

  body[data-page="privacy"] .policy-card {
    padding: 24px 20px 30px;
  }

  body[data-page="privacy"] .footer-grid {
    grid-template-columns: 1fr;
  }
}
