@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --rm-ink: #172a35;
  --rm-muted: #40545f;
  --rm-accent: #145b68;
  --rm-accent-hover: #0c4450;
  --rm-paper: #f4f6f7;
  --rm-surface: #ffffff;
  --rm-line: #d2dde0;
  --rm-tint: #e4efed;
  --rm-focus: #087d91;
  --rm-error: #a72e37;
  --rm-font: "Instrument Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html { scroll-padding-top: 1.5rem; }
body { margin: 0; }
::selection { background: #c6e4e5; color: #102d35; }

@media screen {
  html { color-scheme: light; }
  body[data-page] { background: var(--rm-paper); color: var(--rm-ink); font-family: var(--rm-font); font-size: 16px; line-height: 1.55; }
  body[data-page] *, body[data-page] *::before, body[data-page] *::after { box-sizing: border-box; }
  body[data-page] :is(button, input, select, textarea) { font-family: inherit; caret-color: var(--rm-accent); }
  body[data-page] :is(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--rm-focus); outline-offset: 3px; }
  body[data-page] [hidden] { display: none !important; }
  body[data-page] h1, body[data-page] h2, body[data-page] h3 { text-wrap: balance; }
  body[data-page] a { text-underline-offset: .23em; }
  .rm-container { width: min(1320px, calc(100% - 64px)); margin-inline: auto; }
  .rm-skip { position: fixed; top: 10px; left: 16px; transform: translateY(-180%); z-index: 1000; padding: 12px 18px; background: white; color: var(--rm-ink); border: 2px solid var(--rm-accent); border-radius: 8px; }
  .rm-skip:focus { transform: none; }
  .rm-header { background: white; border-bottom: 1px solid var(--rm-line); }
  .rm-navigation { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
  .rm-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--rm-ink); font-size: 25px; font-weight: 700; letter-spacing: -.035em; text-decoration: none; white-space: nowrap; min-height: 44px; }
  .rm-brand img { flex: 0 0 28px; width: 28px; height: 28px; }
  .rm-tools-nav, .rm-languages { display: flex; align-items: center; gap: 8px; }
  .rm-tools-nav a, .rm-languages a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 15px; border-radius: 8px; color: var(--rm-muted); font-weight: 500; text-decoration: none; transition: background .18s, color .18s; }
  .rm-tools-nav a:hover, .rm-languages a:hover { background: var(--rm-paper); color: var(--rm-ink); }
  .rm-tools-nav a[aria-current="page"] { background: var(--rm-tint); color: var(--rm-accent); }
  .rm-languages { gap: 0; }
  .rm-languages a { font-size: 14px; min-width: 44px; padding: 9px; }
  .rm-languages a[aria-current="page"] { color: var(--rm-ink); text-decoration: underline; text-decoration-thickness: 2px; }
  .rm-footer { margin-top: 80px; background: white; border-top: 1px solid var(--rm-line); }
  .rm-footer-inner { padding-block: 40px 28px; display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 24px 56px; }
  .rm-footer-brand p { max-width: 38ch; color: var(--rm-muted); font-size: 15px; margin: 12px 0 0; }
  .rm-footer-links { display: flex; flex-wrap: wrap; justify-content: end; align-content: start; gap: 4px 12px; }
  .rm-footer-links a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px; color: var(--rm-ink); font-size: 15px; text-decoration: none; }
  .rm-footer-links a:hover { text-decoration: underline; }
  .rm-footer-bottom { grid-column: 1 / -1; border-top: 1px solid var(--rm-line); padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--rm-muted); }
  .rm-document { width: min(860px, calc(100% - 64px)); margin: 64px auto 100px; background: white; padding: clamp(24px, 5vw, 64px); border: 1px solid var(--rm-line); border-radius: 16px; }
  .rm-document h1 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1.15; letter-spacing: -.035em; margin: 0 0 32px; }
  .rm-document h2 { font-size: 24px; margin: 36px 0 14px; }
  .rm-document :is(p, li) { font-size: 17px; line-height: 1.8; max-width: 70ch; }
  .rm-document p { margin: 0 0 22px; }
  .rm-document a { color: var(--rm-accent); overflow-wrap: anywhere; }
  .rm-document pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .rm-document > :last-child { margin-bottom: 0; }
  body[data-page="article"] > header:not(.rm-header) { display: none; }
  @media (max-width: 900px) {
    .rm-navigation { flex-wrap: wrap; gap: 0 16px; padding-block: 12px; }
    .rm-tools-nav { order: 3; width: 100%; justify-content: space-between; border-top: 1px solid var(--rm-line); margin-top: 10px; padding-top: 8px; }
    .rm-tools-nav a { flex: 1; padding-inline: 8px; }
  }
  @media (max-width: 600px) {
    .rm-container { width: calc(100% - 32px); }
    .rm-brand { font-size: 23px; gap: 7px; }
    .rm-brand img { width: 24px; height: 24px; flex-basis: 24px; }
    .rm-navigation { gap: 0 4px; }
    .rm-tools-nav { gap: 2px; font-size: 14px; }
    .rm-footer-inner { grid-template-columns: 1fr; padding-top: 28px; gap: 24px; }
    .rm-footer-links { justify-content: start; margin-inline: -8px; }
    .rm-footer-bottom { flex-direction: column; gap: 6px; }
    .rm-document { width: calc(100% - 32px); margin-block: 28px 48px; padding: 24px 20px; }
    .rm-document :is(p, li) { font-size: 16px; }
    .rm-footer { margin-top: 48px; }
  }
}

@media print {
  .rm-header, .rm-footer, .rm-skip { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rm-tools-nav a, .rm-languages a { transition: none; }
}
