/*
 * rikus.rocks — HQP Studio website. Same language as the app's new UI: flat, solid colour,
 * a black "rail", one pop colour, no gradients or blur.
 */
:root {
  --rail: #000000;
  --rail-ink: #ffffff;
  --rail-sub: #b5b5b5;
  --bg: #ffffff;
  --surface: #f1f1f1;
  --line: #e2e2e2;
  --text: #111111;
  --text-2: #4a4a4a;
  --pop: #1b2cc1;
  --pop-ink: #ffffff;
  --hot: #ff4a1c;
  --ok: #0b7a4a;
  --warn: #a14a00;
  --code-bg: #f1f1f1;
  --radius: 14px;
  --max: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171717;
    --surface: #242424;
    --line: #333333;
    --text: #ffffff;
    --text-2: #bdbdbd;
    --pop: #4f63ff;
    --ok: #2fd08a;
    --warn: #ffa92e;
    --code-bg: #242424;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    400 17px/1.6 'Inter',
    system-ui,
    -apple-system,
    'Segoe UI',
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
}
code,
kbd {
  font:
    500 0.88em/1.4 ui-monospace,
    'SF Mono',
    Menlo,
    Consolas,
    monospace;
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
h1,
h2,
h3,
h4 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 800;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
}
p {
  margin: 0 0 1em;
}
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 600px) {
  .wrap {
    padding: 0 16px;
  }
}

/* language switch: <span data-l="en"> / <span data-l="zh"> */
html[lang^='zh'] [data-l='en'],
html:not([lang^='zh']) [data-l='zh'] {
  display: none !important;
}

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--rail);
  color: var(--rail-ink);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.brand small {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: var(--rail-ink);
  color: var(--rail);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav a,
.lang {
  color: var(--rail-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
}
.nav a:hover,
.lang:hover {
  background: #262626;
}
.nav a[aria-current='page'] {
  background: var(--rail-ink);
  color: var(--rail);
}
.lang {
  border: 2px solid #3a3a3a;
  padding: 6px 12px;
}
@media (max-width: 720px) {
  .nav .hide-sm {
    display: none;
  }
  .brand span.name {
    display: none;
  }
  .nav a,
  .lang {
    padding: 7px 10px;
    font-size: 0.9rem;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 1rem/1 inherit;
  font-family: inherit;
  padding: 16px 24px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.btn-primary {
  background: var(--hot);
  color: #1a0a00;
}
.btn-primary:hover {
  background: #ff6a42;
}
.btn-ghost {
  border-color: currentColor;
}
.btn-ghost:hover {
  background: rgba(127, 127, 127, 0.12);
}

/* ---------- hero ---------- */
.hero {
  background: var(--rail);
  color: var(--rail-ink);
  padding: 64px 0 0;
  overflow: hidden;
}
.hero .eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rail-sub);
  margin-bottom: 18px;
}
.hero h1 {
  max-width: 15ch;
}
.hero .lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--rail-sub);
  max-width: 46ch;
}
.hero .lede strong {
  color: var(--rail-ink);
}
.hero .ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 14px;
}
.hero .meta {
  color: var(--rail-sub);
  font-size: 0.9rem;
}
.hero .shot {
  margin-top: 48px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  border: 3px solid #2e2e2e;
  border-bottom: 0;
  background: #171717;
}

/* ---------- sections ---------- */
section.band {
  padding: 96px 0;
}
section.band.alt {
  background: var(--surface);
}
.section-head {
  max-width: 760px;
  margin-bottom: 44px;
}
.section-head p {
  color: var(--text-2);
  font-size: 1.12rem;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.alt .card {
  border-color: transparent;
}
.card .ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--pop);
  color: var(--pop-ink);
  margin-bottom: 18px;
}
.card .ico svg {
  width: 24px;
  height: 24px;
}
.card p {
  color: var(--text-2);
  margin: 0;
  font-size: 0.98rem;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.split.rev {
  grid-template-columns: 1fr 1.05fr;
}
.split.rev > :first-child {
  order: 2;
}
@media (max-width: 900px) {
  .split,
  .split.rev {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .split.rev > :first-child {
    order: 0;
  }
}
.frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid var(--rail);
  background: var(--rail);
}
.ticks {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}
.ticks li {
  padding: 8px 0 8px 34px;
  position: relative;
  color: var(--text-2);
}
.ticks li strong {
  color: var(--text);
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--pop)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center/12px no-repeat;
}

.themes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}
@media (max-width: 700px) {
  .themes {
    grid-template-columns: 1fr;
  }
}
.swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.swatches span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--line);
}

.phone {
  max-width: 300px;
  margin: 0 auto;
  border-radius: 40px;
  border: 10px solid #000;
  overflow: hidden;
  background: #000;
}

/* how it fits together */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
}
.flow .node {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 22px;
  border: 2px solid var(--line);
}
.flow .node.you {
  background: var(--pop);
  color: var(--pop-ink);
  border-color: var(--pop);
}
.flow .node.you p {
  color: #dfe3ff;
}
.flow .node h3 {
  margin-bottom: 6px;
}
.flow .node p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
}
.flow .arrow {
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-2);
}
@media (max-width: 900px) {
  .flow {
    grid-template-columns: 1fr;
  }
  .flow .arrow {
    transform: rotate(90deg);
    padding: 2px 0;
  }
}

/* ---------- download ---------- */
.download {
  background: var(--rail);
  color: var(--rail-ink);
}
.download .section-head p {
  color: var(--rail-sub);
}
.release-box {
  background: #171717;
  border-radius: 18px;
  padding: 30px;
  border: 2px solid #2b2b2b;
}
.release-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.release-top .ver {
  font-size: 1.5rem;
  font-weight: 800;
}
.release-top .ver .tag {
  font-size: 0.7rem;
  vertical-align: middle;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #ffd60a;
  color: #14110f;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.release-top .when {
  color: var(--rail-sub);
  font-size: 0.92rem;
}
.files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.files a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 12px;
  background: #242424;
  text-decoration: none;
  border: 2px solid transparent;
}
.files a:hover {
  border-color: #fff;
}
.files a.main {
  background: var(--hot);
  color: #1a0a00;
}
.files a.main .sub {
  color: #3d1608;
}
.files .k {
  font-weight: 800;
}
.files .sub {
  display: block;
  color: var(--rail-sub);
  font-size: 0.88rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.files .size {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
.files svg {
  width: 22px;
  height: 22px;
}
.release-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 20px;
  font-size: 0.92rem;
  color: var(--rail-sub);
}
.release-foot a {
  color: var(--rail-ink);
}
.notice {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 2px dashed #3a3a3a;
  color: var(--rail-sub);
  font-size: 0.95rem;
}
.notice strong {
  color: var(--rail-ink);
}
.req {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 26px;
}
@media (max-width: 900px) {
  .req {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .req {
    grid-template-columns: 1fr;
  }
}
.req div {
  padding: 16px;
  border-radius: 12px;
  background: #242424;
  font-size: 0.93rem;
  color: var(--rail-sub);
}
.req div strong {
  display: block;
  color: var(--rail-ink);
  margin-bottom: 2px;
}

/* ---------- footer ---------- */
footer {
  padding: 44px 0 56px;
  color: var(--text-2);
  font-size: 0.92rem;
  border-top: 2px solid var(--line);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  justify-content: space-between;
}
footer a {
  color: var(--text);
}

/* ---------- guide page ---------- */
.page-head {
  background: var(--rail);
  color: var(--rail-ink);
  padding: 56px 0 48px;
}
.page-head p {
  color: var(--rail-sub);
  font-size: 1.15rem;
  max-width: 60ch;
  margin: 0;
}
.guide {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  padding-top: 48px;
  padding-bottom: 80px;
}
@media (max-width: 960px) {
  .guide {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  font-size: 0.93rem;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}
.toc li {
  counter-increment: toc;
}
.toc a {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-2);
  font-weight: 600;
}
.toc a::before {
  content: counter(toc) '. ';
  color: var(--text-2);
  opacity: 0.6;
}
.toc a:hover,
.toc a.on {
  background: var(--surface);
  color: var(--text);
}
@media (max-width: 960px) {
  .toc {
    position: static;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 12px;
  }
  .toc ol {
    columns: 2;
  }
}
@media (max-width: 520px) {
  .toc ol {
    columns: 1;
  }
}
.doc h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  padding-top: 22px;
  margin-top: 36px;
  border-top: 2px solid var(--line);
}
.doc section:first-child h2 {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}
.doc h3 {
  margin-top: 28px;
}
.doc p,
.doc li {
  color: var(--text-2);
}
.doc strong {
  color: var(--text);
}
.doc ol,
.doc ul {
  padding-left: 1.3em;
}
.doc li {
  margin: 6px 0;
}
.doc figure {
  margin: 22px 0;
}
.doc figcaption {
  font-size: 0.88rem;
  color: var(--text-2);
  margin-top: 8px;
}
.tbl {
  overflow-x: auto;
  margin: 16px 0 22px;
  border: 2px solid var(--line);
  border-radius: 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}
th,
td {
  text-align: left;
  padding: 11px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--surface);
  font-weight: 700;
}
tr:last-child td {
  border-bottom: 0;
}
td:first-child {
  font-weight: 600;
  color: var(--text);
  min-width: 150px;
}
td {
  color: var(--text-2);
}
.callout {
  border-radius: 12px;
  padding: 16px 18px;
  margin: 18px 0;
  background: var(--surface);
  border-left: 6px solid var(--pop);
}
.callout.warn {
  border-left-color: var(--hot);
}
.callout p:last-child {
  margin: 0;
}
.steps {
  counter-reset: s;
  list-style: none;
  padding: 0 !important;
}
.steps > li {
  counter-increment: s;
  position: relative;
  padding-left: 46px;
  margin: 14px 0;
}
.steps > li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -1px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
}
