 :root {
  --bg: #f6f6f6;
  --panel: #ffffff;
  --text: #111111;
  --border: #cfcfcf;
  --link: #0033aa;
  --meta-bg-mobile: #f8f8f8;
  --meta-border-mobile: #d9d9d9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
}

.page {
  width: min(980px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.rfc-panel {
  border: 1px solid var(--border);
  background: var(--panel);
}

.rfc-title-block {
  display: block;
  width: 60ch;
  max-width: calc(100% - 3ch);
  margin-left: 3ch;
  text-align: center;
  font-size: 15px;
  line-height: 1.38;
}

.rfc-doc {
  margin: 0;
  padding: 1rem 1.25rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  line-height: 1.38;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: anywhere;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rfc-doc-mobile {
  display: none;
}

@media (max-width: 720px) {
  body {
    background: var(--panel);
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .rfc-panel {
    border: 0;
  }

  .rfc-title-block {
    width: auto;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    font-size: 13px;
    line-height: 1.42;
  }

  .rfc-doc {
    padding: 0.85rem 0.75rem 1rem;
    font-size: 13px;
    line-height: 1.42;
  }

  .rfc-doc-desktop {
    display: none;
  }

  .rfc-doc-mobile {
    display: block;
  }
}

@media (max-width: 480px) {
  .rfc-doc {
    padding: 0.7rem 0.65rem 0.9rem;
    font-size: 12px;
    line-height: 1.44;
  }

  .rfc-title-block {
    font-size: 12px;
    line-height: 1.44;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --panel: #181818;
    --text: #e8e8e8;
    --border: #4a4a4a;
    --link: #86aefc;
    --meta-bg-mobile: #151515;
    --meta-border-mobile: #333333;
  }
}
