/* CatPaw site. System fonts only; no external resources. */

:root {
  color-scheme: light dark;
  --bg: #f7f4ec;
  --bg-soft: #efebe1;
  --code-bg: #ece7db;
  --text: #1c1a16;
  --muted: #5a554b;
  --rule: #d9d1c1;
  --rule-strong: #b9af9b;
  --accent: #b0502b;
  --accent-ink: #8f3f20;
  --button-bg: #1c1a16;
  --button-text: #f7f4ec;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia,
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Cascadia Code", Menlo, Consolas,
    "Liberation Mono", monospace;
  --gutter: clamp(1rem, 5vw, 4.5rem);
  --wide: 76rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1916;
    --bg-soft: #23211d;
    --code-bg: #26231f;
    --text: #ece6da;
    --muted: #a8a092;
    --rule: #3a362f;
    --rule-strong: #575046;
    --accent: #e08b63;
    --accent-ink: #eda283;
    --button-bg: #ece6da;
    --button-text: #1b1916;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

:lang(zh) body,
body:lang(zh) {
  line-height: 1.8;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
}

h3 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 0.4em;
}

p,
ul,
ol,
dl,
pre,
table {
  margin: 0 0 1.1em;
}

ul,
ol {
  padding-left: 1.25em;
}

li + li {
  margin-top: 0.35em;
}

a {
  color: var(--accent-ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

code,
pre,
kbd {
  font-family: var(--mono);
  font-size: 0.88em;
}

:not(pre) > code {
  background: var(--code-bg);
  border-radius: 0.3em;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 0.6rem;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  line-height: 1.55;
  tab-size: 4;
}

pre code {
  font-size: 0.9rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--button-bg);
  color: var(--button-text);
  padding: 0.5rem 0.9rem;
  border-radius: 0.4rem;
  z-index: 10;
}

.skip:focus {
  left: 0.5rem;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

/* Hero */

.hero {
  padding: clamp(3.5rem, 10vw, 7.5rem) 0 clamp(3rem, 7vw, 5rem);
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

:lang(zh) .eyebrow {
  letter-spacing: 0.04em;
}

.hero h1 {
  max-width: 15em;
}

.lead {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.55;
  max-width: 38em;
  color: var(--text);
}

.hero-install {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
  max-width: 46rem;
}

.cmd-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--button-bg);
  background: var(--button-bg);
  color: var(--button-text);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.3;
}

.button:hover {
  background: transparent;
  color: var(--text);
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--rule-strong);
}

.button.secondary:hover {
  border-color: var(--text);
}

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

.preview {
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  max-width: 40rem;
}

/* Sections */

.section {
  border-top: 1px solid var(--rule);
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.section .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem 4rem;
}

.section-head .eyebrow {
  margin-bottom: 0.9rem;
}

.prose {
  max-width: 44rem;
}

@media (min-width: 62rem) {
  .section .wrap {
    grid-template-columns: 17rem minmax(0, 1fr);
  }

  .section-head {
    position: sticky;
    top: 2rem;
    align-self: start;
  }
}

.features {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 3rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 44rem) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.features li {
  border-top: 1px solid var(--rule);
  padding: 1.4rem 0 1.6rem;
  margin: 0;
}

.features p {
  margin: 0;
  color: var(--muted);
}

.features p code {
  color: var(--text);
}

.sample {
  margin-top: 2.5rem;
}

.sample figcaption {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.sample pre {
  margin: 0;
}

/* Install options and other lists of terms */

.options {
  margin: 1.5rem 0 2rem;
}

.options dt {
  font-weight: 600;
  margin-top: 1.4rem;
}

.options dd {
  margin: 0.35rem 0 0;
}

.options pre {
  margin: 0.4rem 0 0;
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 2.5rem;
}

@media (min-width: 52rem) {
  .cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.status-list {
  padding-left: 1.1em;
}

.status-list li::marker {
  color: var(--accent);
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.2rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  margin: 0;
}

caption {
  text-align: left;
  color: var(--muted);
  font-size: 0.9rem;
  padding-bottom: 0.6rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.9rem 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}

thead th {
  font-weight: 600;
  border-bottom-color: var(--rule-strong);
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Copy buttons (added by site.js) */

.cmd {
  position: relative;
  margin: 0 0 1.1rem;
}

.hero-install .cmd {
  margin: 0;
}

.options .cmd {
  margin: 0.5rem 0 0;
}

.cmd pre {
  margin: 0;
  padding-right: 4.75rem;
}

.copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0.45rem 0.65rem;
  border-radius: 0.4rem;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.copy:hover {
  border-color: var(--text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text);
}

/* Plain pages: 404 */

.plain {
  padding: clamp(4rem, 14vw, 9rem) 0;
}

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  pre code {
    font-size: 0.82rem;
  }

  .cmd pre {
    padding-right: 1.15rem;
    padding-top: 2.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-nav,
  .copy,
  .skip {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
