/* The guide's pages (https://evebox.pro/help/). The paper of the CLI page by
   day, the homepage's green by night: the reader's system decides. */
:root {
  color-scheme: light dark;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --serif: 'Songti SC', 'Noto Serif CJK SC', 'STSong', SimSun, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #f4f5ef;
  --glass: rgba(244, 245, 239, 0.9);
  --paper: #fbfcf7;
  --ink: #1e2b22;
  --text: #34423a;
  --muted: #5f6c64;
  --line: #dde3d9;
  --accent: #6a8558;
  --accent-soft: #e6eedb;
  --link: #47633c;
  --hover: rgba(30, 43, 34, 0.05);
  --code-bg: #e6ece1;
  --code-ink: #44603a;
  --block: #223128;
  --block-ink: #e7f2df;
  --mark: #f1e39a;
  --warn: #b9872b;
  --shadow: 0 18px 50px rgba(24, 36, 27, 0.16);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d261f;
    --glass: rgba(29, 38, 31, 0.9);
    --paper: #242e26;
    --ink: #f0f2e6;
    --text: #d3d9ca;
    --muted: #9ea99b;
    --line: rgba(227, 234, 211, 0.15);
    --accent: #b9c98f;
    --accent-soft: rgba(201, 214, 163, 0.13);
    --link: #cbd9a6;
    --hover: rgba(227, 234, 211, 0.07);
    --code-bg: rgba(227, 234, 211, 0.11);
    --code-ink: #d4dcad;
    --block: #151c17;
    --block-ink: #dfe8d6;
    --mark: rgba(232, 216, 117, 0.34);
    --warn: #d8b25c;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
p,
h1,
h2,
h3 {
  margin: 0;
}
img {
  display: block;
}
[hidden] {
  display: none !important;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-180%);
}
.skip-link:focus {
  transform: none;
}

/* The header: the site's name, 指南, the search, and the way back. */
.help-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.header-inner {
  width: min(1280px, calc(100% - 64px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.4px;
}
.brand img {
  border-radius: 8px;
}
.brand-guide {
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.2;
}
.brand-guide:hover {
  color: var(--ink);
}
.site-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.site-links a:hover {
  color: var(--ink);
}
.site-links .open-app {
  padding: 9px 15px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
}
.site-links .open-app:hover {
  color: var(--bg);
  opacity: 0.88;
}
.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  place-content: center;
  gap: 5px;
  border-radius: 8px;
}
.menu-button span {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
}

/* The search: a field, and what it found under it. */
.help-search {
  position: relative;
  flex: 1;
  max-width: 320px;
  margin-left: 18px;
}
.help-search > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}
.help-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}
.help-search input::placeholder {
  color: var(--muted);
}
.help-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.help-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  width: max(100%, 440px);
  max-width: calc(100vw - 32px);
  max-height: min(70vh, 540px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: left;
}
.search-results a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
}
.search-results a:hover,
.search-results a[aria-selected='true'] {
  background: var(--accent-soft);
}
.result-title {
  display: block;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}
.result-where {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}
.result-text {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.search-results mark {
  border-radius: 2px;
  background: var(--mark);
  color: inherit;
}
.search-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

/* An article's page: the list of articles, the article, its sections. */
.help-layout {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.help-nav {
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 30px 4px 56px 0;
  font-size: 14px;
  scrollbar-width: thin;
}
.nav-search {
  display: none;
}
.help-nav a {
  display: block;
  margin-left: -12px;
  padding: 7px 12px;
  border-radius: 7px;
  color: var(--text);
  line-height: 1.5;
}
.help-nav a:hover {
  background: var(--hover);
}
.help-nav a[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}
.nav-title {
  margin: 22px 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.help-main {
  display: grid;
  grid-template-columns: minmax(0, 740px) 190px;
  gap: 64px;
  justify-content: space-between;
  align-items: start;
  padding: 44px 0 88px;
}
.article {
  min-width: 0;
}
.crumb {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.crumb a:hover {
  color: var(--ink);
}
.article h1,
.home-hero h1 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.5px;
}
.article h1 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.35;
}
.lead {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.platforms li {
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.on-page {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 2px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  font-size: 13px;
}
.on-page p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.on-page a {
  padding: 4px 0;
  color: var(--muted);
  line-height: 1.5;
}
.on-page a:hover,
.on-page a.active {
  color: var(--link);
}

/* What an article is written in (web/help/markup.mjs). */
.prose {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  line-height: 1.9;
  overflow-wrap: break-word;
}
.prose > :first-child {
  margin-top: 0;
}
.prose h2 {
  margin: 52px 0 14px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.2px;
}
.prose h3 {
  margin: 32px 0 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}
.prose p {
  margin: 0 0 14px;
}
.prose a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.prose a:hover {
  text-decoration-thickness: 2px;
}
.prose strong {
  color: var(--ink);
  font-weight: 600;
}
.ui {
  color: var(--ink);
  font-weight: 500;
}
.prose ul {
  margin: 0 0 16px;
  padding-left: 1.3em;
}
.prose ul > li::marker {
  color: var(--accent);
}
.prose li {
  margin: 6px 0;
}
.prose li > p {
  margin: 0 0 8px;
}
.prose li > :last-child {
  margin-bottom: 0;
}
.prose li > ul,
.prose li > ol {
  margin-top: 6px;
}
.prose ol {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.prose ol > li {
  position: relative;
  margin: 12px 0;
  padding-left: 40px;
  counter-increment: step;
}
.prose ol > li::before {
  content: counter(step);
  position: absolute;
  top: 3px;
  left: 0;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--link);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
kbd {
  display: inline-block;
  padding: 3px 6px 2px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font:
    600 0.8em/1.2 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  white-space: nowrap;
  vertical-align: 1px;
}
code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--code-ink);
  font: 0.88em var(--mono);
  overflow-wrap: anywhere;
}
.code-block {
  position: relative;
  margin: 0 0 18px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--block);
  color: var(--block-ink);
}
.code-block pre {
  margin: 0;
  padding: 16px 64px 16px 18px;
  overflow-x: auto;
  font: 13px/1.75 var(--mono);
}
.code-block code {
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  overflow-wrap: normal;
}
.copy-button {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  color: #bdd0b5;
  font-size: 12px;
}
.copy-button:hover {
  background: rgba(255, 255, 255, 0.18);
}
.callout {
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px 10px 10px 4px;
  background: var(--paper);
  font-size: 15px;
  line-height: 1.85;
}
.callout-note {
  border-left-color: var(--muted);
}
.callout-warn {
  border-left-color: var(--warn);
}
.callout-title {
  margin-bottom: 4px !important;
  color: var(--ink);
  font-weight: 600;
}
.callout > :last-child {
  margin-bottom: 0;
}
.table-wrap {
  margin: 0 0 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.7;
}
th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--paper);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
td:first-child {
  min-width: 5.5em;
  color: var(--ink);
  font-weight: 500;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 56px;
}
.pager a {
  display: grid;
  gap: 3px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 15px;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.pager a:hover {
  border-color: var(--accent);
  background: var(--paper);
}
.pager small {
  color: var(--muted);
  font-size: 12px;
}
.pager-next {
  text-align: right;
}
.contact {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.85;
}
.contact a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The guide's own front page. */
.help-home {
  width: min(1200px, calc(100% - 64px));
  margin: 0 auto;
  padding: 76px 0 88px;
}
.home-hero {
  max-width: 680px;
  margin: 0 auto 60px;
  text-align: center;
}
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.home-hero h1 {
  margin: 14px 0 14px;
  font-size: clamp(36px, 5.4vw, 54px);
  line-height: 1.3;
}
.home-hero .help-search {
  max-width: 520px;
  margin: 30px auto 0;
}
.home-hero .help-search input {
  height: 52px;
  padding-left: 44px;
  border-radius: 12px;
  font-size: 16px;
}
.home-hero .help-search > svg {
  left: 16px;
  width: 18px;
  height: 18px;
}
.home-hero .search-results {
  width: 100%;
}
.home-quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13.5px;
}
.home-quick a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}
.home-quick a:hover {
  text-decoration-color: var(--accent);
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.home-card {
  padding: 24px 24px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  scroll-margin-top: 88px;
}
.home-card h2 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}
.home-card > p {
  min-height: 3.4em;
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}
.home-card ul {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.home-card li + li {
  border-top: 1px solid var(--line);
}
.home-card li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 0;
  color: var(--text);
  font-size: 14.5px;
}
.home-card li a::after {
  content: '→';
  color: var(--muted);
  transition: transform 0.2s;
}
.home-card li a:hover {
  color: var(--link);
}
.home-card li a:hover::after {
  transform: translateX(3px);
  color: var(--link);
}
.help-home > .contact {
  max-width: 680px;
  margin: 44px auto 0;
  text-align: center;
}

.help-footer {
  border-top: 1px solid var(--line);
}
.footer-inner {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  padding: 26px 0 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  color: var(--muted);
  font-size: 12.5px;
}
.footer-inner > p > span {
  margin-left: 10px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.footer-links a:hover {
  color: var(--ink);
}

@media (max-width: 1180px) {
  .help-main {
    grid-template-columns: minmax(0, 740px);
  }
  .on-page {
    display: none;
  }
  .help-layout {
    gap: 48px;
  }
}
@media (max-width: 1080px) {
  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-card > p {
    min-height: 0;
  }
}
@media (max-width: 980px) {
  .site-links {
    gap: 16px;
  }
}
/* A phone: the list of articles is a drawer the header's button opens;
   without JavaScript it follows the article. */
@media (max-width: 860px) {
  html {
    scroll-padding-top: 76px;
  }
  .help-header {
    height: 58px;
  }
  .header-inner,
  .help-layout,
  .footer-inner {
    width: calc(100% - 40px);
  }
  .help-home {
    width: calc(100% - 40px);
    padding: 48px 0 64px;
  }
  .help-header .help-search,
  .site-links a:not(.open-app) {
    display: none;
  }
  .home .help-header .site-links {
    margin-left: auto;
  }
  .site-links {
    margin-left: auto;
  }
  .js .menu-button {
    display: grid;
  }
  .help-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .help-main {
    order: 1;
    width: 100%;
    padding: 28px 0 56px;
  }
  .help-nav {
    position: static;
    order: 2;
    width: 100%;
    max-height: none;
    padding: 8px 0 40px;
    border-top: 1px solid var(--line);
  }
  .help-nav a {
    padding: 10px 12px;
  }
  .js .help-nav {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    width: min(320px, 86vw);
    padding: 18px 20px 40px 24px;
    border-top: 0;
    border-right: 1px solid var(--line);
    background: var(--bg);
    box-shadow: var(--shadow);
    transform: translateX(-104%);
    visibility: hidden;
    transition:
      transform 0.25s ease,
      visibility 0s 0.25s;
  }
  .js .nav-open .help-nav {
    transform: none;
    visibility: visible;
    transition: transform 0.25s ease;
  }
  .js .nav-search {
    display: block;
    margin: 0 0 14px -8px;
  }
  .nav-search .help-search {
    max-width: none;
    margin: 0;
  }
  .nav-search .help-search input {
    height: 44px;
    font-size: 16px;
  }
  .nav-search .search-results {
    width: 100%;
  }
  .nav-scrim {
    position: fixed;
    z-index: 35;
    inset: 0;
    background: rgba(12, 18, 14, 0.42);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.25s,
      visibility 0s 0.25s;
  }
  .nav-open .nav-scrim {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s;
  }
  .lead {
    font-size: 16px;
  }
  .prose h2 {
    margin-top: 44px;
    font-size: 20px;
  }
  .home-hero {
    margin-bottom: 40px;
  }
  .home-hero .help-search input {
    height: 48px;
  }
  .pager a {
    padding: 12px 14px;
    font-size: 14px;
  }
}
@media (max-width: 620px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-card > p {
    min-height: 0;
  }
  .footer-inner > p > span {
    display: none;
  }
  .prose ol > li {
    padding-left: 36px;
  }
  th,
  td {
    padding: 9px 11px;
  }
  table {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
@media print {
  .help-header,
  .help-nav,
  .on-page,
  .pager,
  .help-footer,
  .copy-button {
    display: none !important;
  }
  .help-layout,
  .help-main {
    display: block;
    width: auto;
    padding: 0;
  }
}
