/* NodeShore — one stylesheet, no framework. */
:root {
  --paper: #f7f6f2;
  --ink: #1b1d1f;
  --ink-2: #4a4f55;
  --ink-3: #7a8087;
  --rule: #dcd9d1;
  --rule-2: #ebe8e1;
  --accent: #1f4f7a;
  --accent-ink: #163a5a;
  --mark: #b4432e;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}
body.zh { line-height: 1.75; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-ink); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; z-index: 10; }
.dim { color: var(--ink-3); }

/* header */
.top { border-bottom: 1px solid var(--rule); background: var(--paper); }
.top .wrap { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 24px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 650;
  font-size: 17px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand .mark { width: 20px; height: 20px; color: var(--accent); }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; }
.top nav a { color: var(--ink-2); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.top nav .lang { color: var(--ink-3); }

/* type */
h1, h2, h3 { line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: 34px; font-weight: 680; margin: 0 0 16px; max-width: 20em; }
h2 { font-size: 22px; font-weight: 650; margin: 0 0 12px; }
h3 { font-size: 17px; font-weight: 650; margin: 24px 0 6px; }
body.zh h1 { letter-spacing: 0; font-size: 32px; }
body.zh h2, body.zh h3 { letter-spacing: 0; }
p { margin: 0 0 14px; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 40em; }
code, .mono { font-family: var(--mono); font-size: .92em; }

section { padding: 44px 0; border-top: 1px solid var(--rule-2); }
section:first-child { border-top: 0; }
.intro { padding: 56px 0 40px; }
.intro .meta { font-family: var(--mono); font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.button {
  display: inline-block; background: var(--ink); color: var(--paper);
  padding: 9px 18px; border-radius: 3px; text-decoration: none; font-weight: 550; font-size: 15px;
}
.button:hover { background: var(--accent-ink); color: #fff; }

.prose { max-width: 42em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

/* tables */
.table-wrap { overflow-x: auto; margin: 6px 0 12px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
thead th { font-weight: 550; color: var(--ink-3); font-size: 13px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
tbody th { font-weight: 650; white-space: nowrap; }
td.num, th.num { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
thead th.num { font-family: var(--sans); font-size: 13px; }
td.price { font-weight: 650; color: var(--ink); }
.unit { color: var(--ink-3); font-weight: 400; }
td.buy { text-align: right; padding-right: 0; white-space: nowrap; }
td.buy a { font-weight: 550; }
.note { font-size: 14px; color: var(--ink-2); max-width: 46em; }
table.route td:first-child { white-space: nowrap; }

/* facts list */
dl.facts { display: grid; grid-template-columns: 11em 1fr; gap: 0; margin: 0; max-width: 46em; }
dl.facts dt, dl.facts dd { padding: 10px 0; border-bottom: 1px solid var(--rule-2); margin: 0; }
dl.facts dt { color: var(--ink-3); font-size: 14px; padding-right: 16px; }
@media (max-width: 600px) {
  dl.facts { grid-template-columns: 1fr; }
  dl.facts dt { border-bottom: 0; padding-bottom: 0; }
}

pre.trace {
  font-family: var(--mono); font-size: 13px; line-height: 1.5;
  background: #efede7; border: 1px solid var(--rule); padding: 12px 14px;
  overflow-x: auto; margin: 8px 0 16px; color: #2b2f33;
}
.caveat { border-left: 3px solid var(--mark); padding: 2px 0 2px 14px; color: var(--ink-2); max-width: 44em; }

/* legal */
.legal { max-width: 46em; }
.legal h2 { font-size: 19px; margin-top: 32px; }
.legal .meta { font-size: 13px; color: var(--ink-3); }
.legal-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; margin-bottom: 20px; }
.legal-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: none; }
.toc { font-size: 14px; border: 1px solid var(--rule); padding: 12px 16px; margin: 16px 0 8px; background: #fbfaf7; }
.toc ol { margin: 6px 0 0; padding-left: 1.4em; columns: 2; column-gap: 32px; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.notice { border: 1px solid var(--rule); background: #fbfaf7; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }

/* footer */
.foot { border-top: 1px solid var(--rule); margin-top: 24px; padding: 28px 0 40px; font-size: 13px; color: var(--ink-2); }
.foot address { font-style: normal; line-height: 1.7; }
.foot-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px 48px; }
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr; } }
.foot a { color: var(--ink-2); }

@media (max-width: 600px) {
  body { font-size: 15.5px; }
  h1, body.zh h1 { font-size: 27px; }
  .intro { padding: 36px 0 28px; }
  .lead { font-size: 16.5px; }
}

/* plan table becomes stacked rows on phones */
@media (max-width: 640px) {
  table.plans thead { display: none; }
  table.plans, table.plans tbody, table.plans tr { display: block; width: 100%; }
  table.plans tr { border-bottom: 1px solid var(--ink); padding: 14px 0 10px; }
  table.plans tr:first-child { border-top: 1px solid var(--ink); }
  table.plans th[scope="row"] { display: block; border: 0; padding: 0 0 6px; font-size: 17px; }
  table.plans td { display: flex; justify-content: space-between; border: 0; padding: 3px 0; }
  table.plans td::before { content: attr(data-label); color: var(--ink-3); font-family: var(--sans); font-size: 13px; }
  table.plans td.buy { justify-content: flex-start; padding-top: 8px; }
  table.plans td.buy a { display: inline-block; background: var(--ink); color: var(--paper);
    padding: 7px 16px; border-radius: 3px; text-decoration: none; }
  table.route { font-size: 14px; }
}

.wrap.prose { max-width: 980px; }
.wrap.prose > * { max-width: 42em; }
