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

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/outfit-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #08080a;
  --surface: #ffffff;
  --page: #f4f5f4;
  --line: #e2e4e2;
  --text: #1a1a1a;
  --muted: #5a5c5a;
  --faint: #8a8c8a;
  --signal: #24963f;
  --accent: #1f6feb;
  --on-ink: #f6f6f4;
  --font: "Outfit", "Segoe UI", sans-serif;
  --font-cjk-hans: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-cjk-hant: "Segoe UI", "Microsoft JhengHei UI", "PingFang TC", "Noto Sans TC", sans-serif;
  --font-ja: "Segoe UI", "Yu Gothic UI", "Meiryo", "Hiragino Sans", sans-serif;
  --font-ko: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font-ar: "Segoe UI", "Tahoma", "Noto Naskh Arabic", sans-serif;
  --font-he: "Segoe UI", "Gisha", "Arial", sans-serif;
  --font-th: "Segoe UI", "Leelawadee UI", "Tahoma", sans-serif;
  --font-hi: "Segoe UI", "Nirmala UI", "Mangal", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  --track: -0.055em;
  --nav-h: 56px;
  --radius: 2px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #161618;
    --page: #0e0e10;
    --line: #2a2a2e;
    --text: #f0f0ec;
    --muted: #9a9a94;
    --faint: #6e6e68;
    --on-ink: #f6f6f4;
  }
}

html {
  overflow-x: hidden;
}

html[lang="zh-Hans"] {
  --font: var(--font-cjk-hans);
}

html[lang="zh-Hant"] {
  --font: var(--font-cjk-hant);
}

html[lang="ja"] {
  --font: var(--font-ja);
}

html[lang="ko"] {
  --font: var(--font-ko);
}

html[lang="ar"] {
  --font: var(--font-ar);
}

html[lang="he"] {
  --font: var(--font-he);
}

html[lang="th"] {
  --font: var(--font-th);
}

html[lang="hi"] {
  --font: var(--font-hi);
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--page);
  display: flex;
  flex-direction: column;
}

body.home {
  min-height: 100svh;
}

body.home main.stage {
  flex: 1;
  width: min(44rem, calc(100% - 3rem));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem 0 2rem;
}

.mark {
  margin: 0;
  font-family: inherit;
  font-size: clamp(3rem, 10vw, 5.25rem);
  font-weight: 650;
  letter-spacing: var(--track);
  line-height: 0.95;
}

.tag {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 400;
}

body.home .product {
  margin-top: 2.75rem;
  text-align: start;
  width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  a:hover {
    color: #fff;
  }
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

body > nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--ink);
}

nav .logo {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: var(--track);
  color: var(--on-ink);
  text-decoration: none;
}

nav .logo:hover {
  color: var(--on-ink);
  opacity: 0.9;
}

nav .links {
  margin-inline-start: auto;
  display: flex;
  gap: 0.15rem;
}

nav .links a {
  color: rgba(246, 246, 244, 0.72);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0.55rem;
}

nav .links a:hover,
nav .links a[aria-current="page"] {
  color: var(--on-ink);
}

main {
  flex: 1;
  width: min(40rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 2.5rem 0 2.75rem;
}

.intro h1 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(2.1rem, 5vw, 2.8rem);
  font-weight: 650;
  letter-spacing: var(--track);
  line-height: 1.1;
}

.intro .meta {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 2.25rem 0;
}

.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.75rem 2rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.product:hover h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.product h2 {
  margin: 0;
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: var(--track);
}

.product p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.path {
  margin: 0.65rem 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
}

.peek {
  width: 16.25rem;
  max-width: 100%;
  padding: 0.55rem 0.55rem 0.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  direction: ltr;
  unicode-bidi: isolate;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .peek {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  }
}

.peek-row {
  display: grid;
  grid-template-columns: 2px 1.15rem 1fr;
  gap: 0.45rem;
  align-items: center;
  min-height: 1.45rem;
  font-size: 0.78rem;
  color: var(--text);
}

.peek-row .bar {
  align-self: stretch;
  width: 2px;
  border-radius: 1px;
  background: transparent;
}

.peek-row.is-now .bar {
  background: var(--accent);
}

.peek-row .ix {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.7rem;
}

.peek-row.is-now .ix {
  color: var(--text);
}

.peek-row .tx {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peek-row.is-files .tx {
  font-weight: 500;
}

.peek-legend {
  margin: 0.4rem 0.15rem 0.1rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  color: var(--faint);
  letter-spacing: 0;
  line-height: 1.35;
  white-space: normal;
  overflow: hidden;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.peek-lg {
  width: min(20rem, 100%);
  margin: 2rem 0 0;
}

.steps {
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin: 0;
  padding-block: 0.85rem;
  padding-inline: 2.1rem 0;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0.9rem;
  font-size: 0.72rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
}

.note {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

kbd {
  font-family: var(--mono);
  font-size: 0.84em;
  font-weight: 500;
  padding: 0.07em 0.38em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  margin-top: 1.5rem;
  padding: 0.55rem 1.15rem;
  background: var(--ink);
  color: var(--on-ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.button:hover {
  color: var(--on-ink);
  opacity: 0.92;
}

.button:active {
  transform: translateY(1px);
}

@media (prefers-color-scheme: dark) {
  .button {
    background: var(--text);
    color: var(--page);
    border-color: var(--text);
  }

  .button:hover {
    color: var(--page);
  }
}

.prose {
  max-width: 36rem;
}

.prose h1 {
  margin: 0 0 1rem;
  font-size: 1.7rem;
  letter-spacing: var(--track);
}

.prose h2 {
  margin: 1.85rem 0 0.55rem;
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: var(--track);
}

.prose p {
  margin: 0.7rem 0;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
}

.prose ul {
  margin: 0.4rem 0 1rem;
  padding-inline-start: 1.2rem;
}

.prose li {
  margin: 0.35rem 0;
}

.prose .updated {
  color: var(--muted);
  font-size: 0.92rem;
}

.crumb {
  margin: 0 0 1rem;
  font-size: 0.88rem;
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
}

.crumb a:hover {
  text-decoration: underline;
}

.page {
  width: min(40rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
  flex: 1;
}

footer {
  padding: 1.1rem 1.5rem;
  background: var(--ink);
  color: rgba(246, 246, 244, 0.62);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer a:hover {
  color: var(--on-ink);
}

footer .end {
  margin-inline-start: auto;
}

footer .lang-switch {
  display: inline-flex;
  align-items: center;
}

.lang-switch-select {
  appearance: none;
  background: #1c1c20;
  color: rgba(246, 246, 244, 0.86);
  border: 1px solid #3a3a40;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  max-width: 12.5rem;
  padding: 0.22rem 1.7rem 0.22rem 0.5rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23c8c8c4' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  cursor: pointer;
}

html[dir="rtl"] .lang-switch-select {
  padding: 0.22rem 0.5rem 0.22rem 1.7rem;
  background-position: left 0.45rem center;
}

.lang-switch-select:hover,
.lang-switch-select:focus-visible {
  color: var(--on-ink);
  border-color: #5a5a62;
}

@media (max-width: 40rem) {
  .product {
    grid-template-columns: 1fr;
  }

  .peek {
    width: min(16.25rem, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button:active {
    transform: none;
  }
}
