:root {
  color-scheme: light;
  --ink: rgba(0, 0, 0, 0.9);
  --muted: rgba(0, 0, 0, 0.5);
  --soft: rgba(0, 0, 0, 0.12);
  --line: rgba(0, 0, 0, 0.08);
  --link: #576b95;
  --brand: #07c160;
  --page: #ffffff;
  --bar: rgba(255, 255, 255, 0.94);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.dialog-open {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.page {
  width: 100%;
  min-height: 100svh;
  padding:
    max(28px, env(safe-area-inset-top))
    20px
    calc(104px + env(safe-area-inset-bottom));
}

.article {
  width: min(100%, 677px);
  margin: 0 auto;
}

.article-head {
  padding-top: 3px;
}

.article-title {
  min-height: 39px;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

.article-title:empty::before {
  content: "\00a0";
}

.article-meta {
  display: flex;
  min-height: 24px;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.publisher-link {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--link);
  text-decoration: none;
}

.article-body {
  padding-top: 19px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.95;
  overflow-wrap: anywhere;
}

.article-body p {
  margin: 0 0 24px;
}

.article-body h2 {
  margin: 34px 0 18px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.55;
}

.article-body blockquote {
  margin: 29px 0 32px;
  padding: 15px 18px;
  border-left: 3px solid #f0b90b;
  color: rgba(0, 0, 0, 0.72);
  background: #f7f7f7;
  font-size: 16px;
  line-height: 1.85;
}

.article-figure {
  width: min(100%, 520px);
  margin: 6px auto 30px;
}

.article-figure-featured {
  margin-top: 4px;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #f7f7f7;
}

.article-figure figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.risk-note {
  margin: 36px 0 40px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: rgba(0, 0, 0, 0.62);
  background: #fafafa;
  font-size: 14px;
  line-height: 1.85;
}

.risk-note strong {
  color: rgba(0, 0, 0, 0.76);
  font-weight: 600;
}

.publisher-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 86px;
  border-top: 1px solid var(--line);
}

.publisher-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.publisher-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid var(--soft);
  border-radius: 8px;
  object-fit: cover;
}

.publisher-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.publisher-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publisher-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.follow-button {
  width: 72px;
  height: 32px;
  flex: 0 0 72px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
}

.action-bar {
  position: fixed;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  min-height: 62px;
  padding: 7px max(10px, env(safe-area-inset-right))
    calc(7px + env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: var(--bar);
  backdrop-filter: blur(18px);
}

.action-button {
  display: grid;
  min-width: 0;
  min-height: 48px;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.action-button svg {
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-button span {
  font-size: 11px;
  line-height: 1.1;
}

.action-button:active,
.follow-button:active {
  opacity: 0.72;
}

.follow-dialog {
  position: fixed;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.follow-dialog[hidden] {
  display: none;
}

.follow-dialog-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.48);
}

.follow-dialog-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 320px);
  overflow: hidden;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.follow-dialog-panel h2 {
  margin: 0;
  padding: 25px 24px 7px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
}

.follow-dialog-panel p {
  margin: 0;
  padding: 0 28px 24px;
  color: rgba(0, 0, 0, 0.66);
  font-size: 15px;
  line-height: 1.7;
}

.follow-dialog-confirm {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-top: 1px solid var(--line);
  color: #576b95;
  background: #fff;
  cursor: pointer;
}

.follow-dialog-confirm:active {
  background: #f7f7f7;
}

@media (min-width: 768px) {
  body {
    background:
      linear-gradient(
        90deg,
        #f7f7f7 0,
        #f7f7f7 calc(50% - 420px),
        #fff calc(50% - 420px),
        #fff calc(50% + 420px),
        #f7f7f7 calc(50% + 420px),
        #f7f7f7 100%
      );
  }

  .page {
    padding-top: 44px;
    padding-bottom: 132px;
  }

  .article-head {
    padding-top: 0;
  }

  .article-title {
    min-height: 43px;
    margin-bottom: 12px;
    font-size: 24px;
    line-height: 1.4;
  }

  .article-body {
    padding-top: 24px;
  }

  .action-bar {
    right: auto;
    left: 50%;
    width: min(100%, 677px);
    min-height: 66px;
    padding-right: 0;
    padding-left: 0;
    transform: translateX(-50%);
  }
}

@media (max-width: 360px) {
  .page {
    padding-right: 16px;
    padding-left: 16px;
  }

  .publisher-copy strong {
    font-size: 15px;
  }

  .follow-button {
    width: 64px;
    flex-basis: 64px;
  }
}
