/* Original webfont files supplied by Xiaomi. See fonts/MiSans-License.pdf. */
@font-face {
  font-family: MiSans;
  src: url("/fonts/MiSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: MiSans;
  src: url("/fonts/MiSans-Heavy.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #0e0d18;
  --ink: #f9f6ef;
  --muted: #c5bace;
  --lime: #ceff36;
  --violet: #d288ff;
  --line: #4f365d;
  font-family: MiSans, sans-serif;
  color: var(--ink);
  background: var(--background);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.page { max-width: 1320px; margin: auto; padding: 0 clamp(16px, 4vw, 55px); }
.masthead, .masthead nav, .languages, .actions, footer { display: flex; align-items: center; }
.masthead { justify-content: space-between; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.brand { font-size: 20px; font-weight: 900; line-height: .85; letter-spacing: -.055em; text-decoration: none; }
.masthead nav { gap: clamp(12px, 3vw, 40px); }
.masthead nav a, footer a { color: var(--muted); text-decoration: none; }
.masthead nav a:hover, footer a:hover { color: var(--lime); }
.languages { gap: 6px; }
.languages button {
  min-height: 40px; min-width: 49px; padding: 0 10px; border-radius: 99px;
  border: 1px solid #9a8a9f; background: transparent; color: var(--ink); font-weight: 800;
}
.languages button[aria-pressed="true"] { background: var(--lime); color: #12140a; border-color: var(--lime); }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; min-height: clamp(420px, 40vw, 570px); overflow: clip; }
.intro { position: relative; z-index: 1; padding: 35px 0; }
h1, h2 { font-weight: 900; letter-spacing: -.065em; }
h1 { font-style: italic; line-height: .82; font-size: clamp(96px, 15vw, 218px); }
.tagline { margin: 20px 0 17px; display: inline-block; padding: 7px 13px; background: var(--lime); color: #14150a; transform: rotate(-2deg); font-size: clamp(20px, 2.75vw, 38px); font-weight: 900; }
.lede, .section-intro { max-width: 48ch; color: var(--muted); line-height: 1.65; font-size: clamp(16px, 1.45vw, 20px); }
.actions { gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; min-height: 46px; justify-content: center; padding: 8px 17px; border-radius: 11px; font-weight: 850; text-decoration: none; border: 1px solid transparent; }
.primary { color: #101207; background: var(--lime); }
.primary:hover { background: #e4ff91; }
.secondary { border-color: var(--violet); color: var(--ink); }
.secondary:hover { background: #351848; }
.hero-art { position: relative; min-width: 0; width: 100%; padding: 15%; background: radial-gradient(ellipse, #67209382, transparent 70%); }
.hero-art::before { content: ""; position: absolute; inset: -10%; background: radial-gradient(circle, #a644e5 1px, transparent 2px) 0 0 / 10px 10px; mask-image: radial-gradient(ellipse, #000, transparent 67%); }
.cartridge { position: relative; width: 100%; transform: rotate(-13deg) skewY(-6deg); }
.shell { position: relative; aspect-ratio: 1.15; border: 3px solid #e8a7ff; border-radius: 14%; background: linear-gradient(135deg, #dd9bff, #7536b3 26%, #32184f 58%, #b251f1 88%, #fabaff); box-shadow: inset 0 0 0 8px #e9a8ff70, 9px 12px 0 #4e236c, 12px 15px 0 #a858cf, 18px 25px 44px #1c0729; }
.label { position: absolute; inset: 14% 13% 21%; display: grid; align-content: center; justify-items: center; gap: 4%; background: linear-gradient(145deg, #42125d, #170b2a); border: 1px solid var(--violet); border-radius: 8px; font-size: clamp(30px, 5vw, 72px); font-weight: 900; font-style: italic; letter-spacing: -.06em; }
.label small { font-size: clamp(8px, 1vw, 13px); letter-spacing: .1em; font-style: normal; color: #e4bcf4; }
.folder { width: 24%; aspect-ratio: 1.55; background: var(--violet); clip-path: polygon(0 0, 38% 0, 51% 22%, 100% 22%, 100% 100%, 0 100%); }
.contacts { position: absolute; inset: auto 21% 4%; height: 8%; border: 2px solid #2e133f; background: repeating-linear-gradient(90deg, #f9d98b 0 6%, #3b194e 6% 9%); }
.section { padding: clamp(26px, 4vw, 54px) 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(35px, 5.3vw, 76px); line-height: 1.04; }
.section-intro { margin-top: 10px; }
.demo { margin-top: 24px; border: 2px solid #ac55e0; border-radius: 16px; overflow: hidden; background: #171022; }
.demo-bar { display: flex; align-items: center; gap: 9px; padding: 12px 16px; font-weight: 850; background: #271337; border-bottom: 1px solid var(--line); }
.demo-bar span { margin-left: auto; color: var(--muted); font-weight: 500; font-size: .875rem; }
.demo-grid { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 2fr); min-height: 335px; }
.sidebar { padding: 14px; border-right: 1px solid var(--line); }
.sidebar label { display: block; margin-bottom: 8px; }
.sidebar input { width: 100%; border: 1px solid #826298; border-radius: 8px; background: #100a19; color: var(--ink); padding: 9px 10px; }
.files { display: grid; gap: 7px; margin-top: 12px; }
.files button { overflow-wrap: anywhere; text-align: left; background: #261834; color: var(--ink); border: 1px solid transparent; border-radius: 7px; padding: 9px; }
.files button:hover { border-color: #a660bc; }
.files button[aria-pressed="true"] { color: var(--lime); border-color: #807947; }
.files .empty { color: var(--muted); padding: 7px 0; }
.preview { padding: clamp(16px, 3vw, 36px); }
.preview-path { color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; overflow-wrap: anywhere; }
.file-type { color: #f0c5ff; border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; }
.preview h3 { font-size: clamp(26px, 3.5vw, 50px); margin-top: 14px; }
.file-intro { color: var(--muted); margin-top: 9px; line-height: 1.5; }
.file-content { margin-top: 14px; }
.file-content ul { padding-left: 22px; line-height: 1.7; }
.file-content a { color: var(--lime); }
.features, .install-grid { display: grid; gap: 12px; margin-top: 18px; }
.features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.install-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.features article, .install-grid article { padding: clamp(14px, 2vw, 24px); border: 1px solid var(--line); border-radius: 13px; background: #1d1129; }
.features h3, .install-grid h3 { color: var(--violet); font-size: clamp(19px, 2.2vw, 28px); }
.features p, .install-grid p { margin-top: 7px; color: var(--muted); line-height: 1.55; }
.install-grid .button, .command { margin-top: 14px; }
.command { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; background: #100a19; border: 1px solid var(--line); padding: 5px 8px; border-radius: 8px; }
.command code { font-family: inherit; color: var(--lime); overflow-wrap: anywhere; font-size: .95rem; }
.command button { background: #392249; color: var(--ink); border: 1px solid #926dae; border-radius: 5px; min-height: 38px; padding: 4px 8px; }
.copy-status:empty { display: none; }
.text-link { display: inline-block; margin-top: 12px; color: var(--violet); }
footer { flex-wrap: wrap; border-top: 1px solid var(--line); gap: 20px; padding: 20px 0 30px; }
@media (max-width: 720px) {
  .masthead nav { gap: 10px; font-size: .88rem; }
  .masthead nav a:last-child { display: none; }
  .hero { min-height: 0; grid-template-columns: 1fr; }
  .hero-art { grid-row: 1; grid-column: 1; justify-self: end; align-self: start; width: 54%; margin-top: 24px; padding: 8%; opacity: .85; }
  .intro { grid-row: 1; grid-column: 1; padding: 56px 0 35px; }
  h1 { font-size: clamp(73px, 16vw, 120px); }
  .tagline { max-width: 90%; }
  .lede { max-width: 35ch; }
  .demo-grid, .features, .install-grid { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.font-credit {
  color: #91889e;
  font-size: .75rem;
  text-decoration: none;
}
.font-credit:hover, .font-credit:focus-visible { text-decoration: underline; }
footer .font-credit { margin-inline-start: auto; }
