/* ===========================================================
   合益资产 · 公告页面
   =========================================================== */

:root {
  --red: #d8232a;
  --red-dark: #b81b21;
  --ink: #1c1f23;
  --ink-2: #47505a;
  --ink-3: #8a929c;
  --line: #e5e8ec;
  --soft: #f6f7f9;
  --wrap: 1000px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ---------- 页头 ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 92px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  height: 52px;
  width: auto;
}

/* ---------- 页面标题 ---------- */

.page-head {
  margin: 44px 0 22px;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.page-title::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--red);
}

.page-desc {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
}

/* ---------- 列表容器 ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

/* ---------- 公告列表 ---------- */

.notice-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notice-item + .notice-item {
  border-top: 1px solid var(--line);
}

.notice-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 96px 16px;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}

.notice-row:hover {
  background: #fcfcfd;
}

.notice-date {
  color: var(--ink-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.notice-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  color: var(--ink);
  transition: color 0.15s;
}

.notice-row:hover .notice-title {
  color: var(--red);
}

.notice-meta {
  color: var(--ink-3);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.notice-arrow {
  color: #c6ccd4;
  font-size: 20px;
  line-height: 1;
  text-align: right;
  transition: color 0.15s, transform 0.15s;
}

.notice-row:hover .notice-arrow {
  color: var(--red);
  transform: translateX(2px);
}

.empty {
  margin: 0;
  padding: 44px 20px;
  color: var(--ink-3);
  font-size: 14px;
  text-align: center;
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: 56px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
  text-align: center;
}

.site-footer p {
  margin: 0 0 2px;
}

.footer-company {
  color: var(--ink-2);
  font-size: 14px;
}

.footer-meta {
  margin-top: 14px !important;
  color: #a2a9b3;
  font-size: 12px;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  color: var(--ink-2);
  border-bottom-color: var(--line);
}

/* ---------- 阅读器 ---------- */

.reader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 21, 26, 0.55);
}

.reader[hidden] {
  display: none;
}

.reader-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1080px;
  height: 100%;
  max-height: calc(100vh - 48px);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.reader-bar {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.reader-heading {
  flex: 1 1 240px;
  min-width: 0;
}

.reader-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-sub {
  margin: 3px 0 0;
  color: var(--ink-3);
  font-size: 12px;
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.rbtn:hover {
  border-color: #ccd2da;
  background: var(--soft);
  color: var(--ink);
}

.rbtn[disabled] {
  opacity: 0.35;
  cursor: default;
}

.rbtn-primary {
  padding: 0 14px;
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.rbtn-primary:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
  color: #fff;
}

.reader-zoom,
.reader-page {
  min-width: 52px;
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.reader-body {
  position: relative;
  flex: 1;
  overflow: auto;
  padding: 22px;
  background: #eef0f3;
  -webkit-overflow-scrolling: touch;
}

.reader-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.reader-pages canvas {
  display: block;
  background: #fff;
  box-shadow: 0 2px 10px rgba(20, 25, 33, 0.14);
}

.reader-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--ink-3);
  font-size: 14px;
  text-align: center;
  background: rgba(238, 240, 243, 0.85);
}

.reader-status[hidden] {
  display: none;
}

.reader-status.is-error {
  color: var(--ink-2);
  line-height: 2;
}

.reader-status a {
  color: var(--red);
}

/* ---------- 窄屏 ---------- */

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .header-inner {
    height: 68px;
  }

  .brand img {
    height: 38px;
  }

  .page-head {
    margin: 28px 0 16px;
  }

  .page-title {
    font-size: 21px;
  }

  .notice-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "date meta"
      "title title";
    gap: 4px 10px;
    padding: 13px 14px;
  }

  .notice-date {
    grid-area: date;
    font-size: 13px;
  }

  .notice-meta {
    grid-area: meta;
  }

  .notice-title {
    grid-area: title;
    font-size: 14.5px;
    line-height: 1.55;
  }

  .notice-arrow {
    display: none;
  }

  .reader {
    padding: 0;
  }

  .reader-dialog {
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
  }

  .reader-bar {
    padding: 10px 12px;
    gap: 10px;
  }

  .reader-actions {
    gap: 6px;
  }

  .reader-body {
    padding: 12px;
  }
}
