// SPDX-License-Identifier: AGPL-3.0-only
// Copyright (c) 2019-present Shigma and Koishijs contributors.
// Copyright (c) 2026-present Koishi-CE contributors.

body {
  margin: 0;
  min-height: 100vh;
  // 控制台是全 fixed 布局，body 级滚动没有正当消费者：
  // 关闭它以兜住悬浮弹层（挂 body 的 popper）瞬态溢出产生的滚动条
  // （贴边定位的亚像素取整溢出曾与悬停状态项形成滚动条闪烁循环）
  overflow: hidden;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--fg1);
  background-color: var(--k-page-bg);
  position: relative;
  transition: color 0.3s ease, background-color 0.3s ease;
}

code {
  font-family: var(--font-family-code);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

p, ul {
  margin: 1em 0;
  line-height: 1.7;
}

table {
  text-align: center;
  width: 100%;
  border-collapse: collapse;

  td, th {
    padding: .5em 1em;
  }

  tr {
    border-top: 1px solid var(--k-color-divider);
    transition: border-color 0.3s ease;
  }

  tr:last-child {
    border-bottom: 1px solid var(--k-color-divider);
  }
}

.markdown {
  a, code a {
    color: var(--k-text-active);

    &:hover {
      text-decoration: underline;
    }
  }

  code {
    color: var(--k-text-normal);
    padding: 0.25rem 0.5rem;
    background-color: var(--k-page-bg);
    border-radius: 3px;
    overflow-wrap: break-word;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
}
