:root {
  color-scheme: light;
  --ink: #0b0d12;
  --muted: #6b707a;
  --line: #dfe1e5;
  --accent: #92ff4f;
  --page: #f4f5f6;
  --surface: #ffffff;
  --radius: 22px;
}

@font-face {
  font-family: "HYTiaoTiao";
  src: url("../font/HYTiaoTiao.ttf") format("truetype");
  font-display: swap;
}

* { box-sizing: border-box; }
html { min-width: 320px; }

body {
  margin: 0;
  min-height: 100svh;
  padding: 14px;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.page {
  width: min(1100px, 100%);
  min-height: calc(100svh - 28px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(11, 13, 18, .08);
  border-radius: var(--radius);
  box-shadow: 0 12px 38px rgba(16, 20, 28, .08);
}

.site-header {
  min-height: 88px;
  padding: 0 clamp(24px, 5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-size: 29px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  transition: transform .18s ease, background-color .18s ease;
}

.site-nav a:hover {
  transform: translateY(-2px);
  background: #f1f2f3;
}

.site-nav img {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
  flex: none;
}

main {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: clamp(54px, 9vh, 104px) clamp(24px, 6vw, 68px) clamp(38px, 6vh, 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.reading {
  margin: auto 0;
  padding: 0;
  border: 0;
}

article {
  margin: 0;
  font-family: "HYTiaoTiao", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(27px, 3.15vw, 46px);
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: .035em;
  text-align: left;
  text-wrap: pretty;
}

mark {
  color: inherit;
  background: linear-gradient(transparent 61%, var(--accent) 61%, var(--accent) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.actions {
  padding-top: clamp(48px, 8vh, 82px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.refresh-button {
  width: 88px;
  height: 88px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: transparent;
  background: #fff url("../images/refresh.gif") center / cover no-repeat;
  box-shadow: 0 9px 24px rgba(16, 20, 28, .16);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.refresh-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 30px rgba(16, 20, 28, .2);
}

.refresh-button:active { transform: translateY(0) scale(.98); }

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

:focus-visible {
  outline: 3px solid rgba(68, 176, 8, .42);
  outline-offset: 4px;
}

@media (max-width: 640px) {
  body { padding: 0; background: var(--surface); }

  .page {
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .site-header {
    min-height: 72px;
    padding: 0 24px;
  }

  .brand { font-size: 20px; letter-spacing: .04em; }
  .site-nav { gap: 4px; }
  .site-nav a { width: 44px; height: 44px; }
  .site-nav img { width: 31px; height: 31px; }

  main { padding: clamp(54px, 10vh, 92px) 28px 46px; }

  article {
    font-size: clamp(23px, 7vw, 30px);
    line-height: 1.82;
    letter-spacing: .025em;
  }

  .actions { padding-top: 54px; gap: 28px; }

  .refresh-button {
    width: 82px;
    height: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
