/* ============================================================
   冬青 OS · 文章页（列表 / 详情）：旧报纸底色 + 适合长时间阅读的排版
   不依赖框架、字体文件和脚本，打开即读
   ============================================================ */
.ar-scope {
  --paper: #f4ecd8;
  --ink: #2b2418;
  --ink-2: #5c5142;
  --ink-3: #8f836f;
  --line: rgba(90, 64, 24, 0.16);
  --accent: #b4532a;
  /* 标题、引用也用苹方（不再用宋体）；Windows 上是微软雅黑，安卓上是思源黑体 */
  --serif: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.8;
}
.ar-scope a { color: inherit; }
.ar-scope img { max-width: 100%; }

/* ---------- 独立阅读页（手机访问文章网址时） ---------- */
html.ar-html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.ar-page {
  margin: 0;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .32 0 0 0 0 .25 0 0 0 0 .12 0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    linear-gradient(180deg, #f6efde, #efe4c9);
  background-size: 220px 220px, cover;
  background-attachment: fixed;
}
body.ar-page * { box-sizing: border-box; }
/* 跟后台「窗口主题」一致（旧报纸主题就是上面的默认纸色） */
body.ar-page.wt-white { --paper: #ffffff; --ink: #1d1d1f; --accent: #0a66d8; }
body.ar-page.wt-gray  { --paper: #f6f6f5; --ink: #262626; --accent: #2f6df6; }
body.ar-page.wt-green { --paper: #f8fbf8; --ink: #1f2d24; --accent: #1f8a5b; }
body.ar-page.wt-dark  { --paper: #1e1e21; --ink: #ececee; --accent: #5ea0ff; }
body.ar-page.wt-custom { --paper: var(--wt-bg); --ink: var(--wt-ink); --accent: var(--wt-accent); }
body.ar-page:not(.wt-paper) {
  --ink-2: color-mix(in srgb, var(--ink) 72%, var(--paper));
  --ink-3: color-mix(in srgb, var(--ink) 50%, var(--paper));
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  background: var(--paper);
}
body.ar-page:not(.wt-paper) .ar-top { background: color-mix(in srgb, var(--paper) 88%, transparent); }
body.ar-page:not(.wt-paper) .ar-author, body.ar-page:not(.wt-paper) .sw-card, body.ar-page:not(.wt-paper) .nv-card { background: color-mix(in srgb, var(--ink) 3%, var(--paper)); }
body.ar-page:not(.wt-paper) .ar-body code { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.ar-wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* ---------- 页头 / 页脚 ---------- */
.ar-top { border-bottom: 1px solid var(--line); background: rgba(246, 239, 222, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
.ar-top-in { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.ar-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; }
.ar-nav { display: flex; gap: 18px; font-size: 14px; }
.ar-nav a { text-decoration: none; color: var(--ink-2); }
.ar-nav a:hover { color: var(--accent); }
.ar-enter { color: var(--accent) !important; font-weight: 600; }
.ar-foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 22px 0 34px; font-size: 12px; color: var(--ink-3); }
.ar-foot .ar-wrap { display: flex; gap: 16px; flex-wrap: wrap; }
.ar-foot a { text-decoration: none; }

/* ---------- 列表 ---------- */
.ar-list-page { padding-top: 40px; }
.ar-list-title { font-family: var(--serif); font-size: 34px; margin: 0; letter-spacing: 0.04em; }
.ar-list-sub { color: var(--ink-3); font-size: 13px; margin: 4px 0 18px; }
.ar-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.ar-list li { border-bottom: 1px solid var(--line); }
.ar-item { display: flex; gap: 18px; padding: 22px 0; text-decoration: none; align-items: flex-start; }
.ar-item-text { flex: 1; min-width: 0; }
.ar-item time { font-size: 12px; color: var(--ink-3); font-family: var(--mono); }
.ar-item h2, .ar-item h3 { font-family: var(--serif); font-size: 21px; line-height: 1.45; margin: 4px 0 6px; }
.ar-item:hover h2, .ar-item:hover h3 { color: var(--accent); }
.ar-item p { margin: 0; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ar-item-cover { width: 150px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; flex: none; filter: sepia(0.12); }
.ar-empty { color: var(--ink-3); padding: 40px 0; }

/* ---------- 详情 ---------- */
.ar-article { padding-top: 42px; }
.ar-head h1 { font-family: var(--serif); font-size: 32px; font-weight: 700; line-height: 1.4; margin: 0; letter-spacing: 0.01em; }
.ar-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--ink-3); font-size: 13px; margin: 12px 0 0; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.ar-meta b { font-weight: 500; display: inline-block; min-width: 3ch; }   /* 阅读数变化不推挤 */
.ar-cover { display: block; width: 100%; margin: 26px 0 0; border-radius: 8px; filter: sepia(0.1); }
.ar-body { font-size: 17px; line-height: 1.95; margin-top: 26px; word-break: break-word; }
.ar-body h2 { font-family: var(--serif); font-size: 24px; font-weight: 700; margin: 1.8em 0 0.6em; line-height: 1.45; }
.ar-body h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 1.6em 0 0.5em; }
.ar-body p { margin: 0 0 1.1em; }
.ar-body a { color: var(--accent); text-underline-offset: 3px; }
.ar-body img { display: block; margin: 1.4em auto; border-radius: 6px; height: auto; }
.ar-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink-2); font-family: var(--serif); }
.ar-body blockquote p { margin: 0.3em 0; }
.ar-body ul, .ar-body ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.ar-body li { margin: 0.25em 0; }
.ar-body code { font-family: var(--mono); font-size: 0.88em; background: rgba(90, 64, 24, 0.08); padding: 2px 6px; border-radius: 4px; }
.ar-body pre { background: #2b2418; color: #f1e6cc; padding: 16px 18px; border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.7; }
.ar-body pre code { background: none; padding: 0; color: inherit; }
.ar-body hr { border: 0; border-top: 1px dashed var(--line); margin: 2em 0; }
.ar-body table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.ar-body th, .ar-body td { border: 1px solid var(--line); padding: 6px 10px; }

.ar-author { display: flex; gap: 14px; align-items: center; margin-top: 40px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 252, 244, 0.5); }
.ar-avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; background: linear-gradient(145deg, #2fbf7f, #127a55); }
.ar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ar-author b { font-size: 16px; }
.ar-author span { font-size: 12px; color: var(--ink-3); margin-left: 8px; }
.ar-author p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.ar-pn { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; }
.ar-pn a { flex: 1; text-decoration: none; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; line-height: 1.5; }
.ar-pn a:hover { border-color: var(--accent); color: var(--accent); }
.ar-pn small { display: block; font-size: 12px; color: var(--ink-3); }
.ar-pn-old { text-align: right; }
.ar-back { margin-top: 22px; font-size: 14px; }
.ar-back a { color: var(--ink-3); text-decoration: none; }


@media (max-width: 640px) {
  .ar-head h1 { font-size: 25px; }
  .ar-body { font-size: 16px; }
  .ar-item-cover { width: 96px; }
  .ar-item h2 { font-size: 18px; }
  .ar-pn { flex-direction: column; }
  .ar-pn-old { text-align: left; }
}

/* ---------- 软件 / 导航（介绍页与桌面窗口共用） ---------- */
.ar-scope .sw-icon { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; flex: none; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(90, 64, 24, 0.18); }
.ar-scope .sw-icon-sm { width: 52px; height: 52px; border-radius: 13px; }
.ar-scope .sw-icon-xs { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 6px rgba(90, 64, 24, 0.15); }
.ar-scope .sw-icon-ph { background: linear-gradient(160deg, #e9d9b4, #cdb27d); color: #fff; font-weight: 800; font-size: 0.45em; }
.ar-scope .sw-icon-sm.sw-icon-ph { font-size: 22px; }
.ar-scope .sw-icon-xs.sw-icon-ph { font-size: 15px; }
.ar-scope .sw-icon:not(.sw-icon-sm):not(.sw-icon-xs).sw-icon-ph { font-size: 30px; }
.sw-detail { padding-top: 6px; }
.sw-head { display: flex; gap: 18px; align-items: center; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.sw-head h1 { font-family: var(--serif); font-size: 30px; margin: 0; line-height: 1.3; }
.sw-head .ar-meta { border: 0; padding: 0; margin-top: 6px; }
.sw-tag { display: inline-block; font-style: normal; font-size: 12px; padding: 0 8px; border-radius: 999px; background: rgba(90, 64, 24, 0.08); color: var(--ink-2); margin-right: 4px; }
.sw-summary { font-size: 16px; color: var(--ink-2); margin: 18px 0 0; }
.sw-dl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 6px; }
.sw-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; background: var(--ink); color: var(--paper) !important; text-decoration: none; font-weight: 600; font-size: 14px; }
.sw-btn:hover { background: var(--accent); }
.sw-btn small { font-weight: 400; opacity: 0.75; }
.sw-btn-ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--line); }
.sw-btn-ghost:hover { background: rgba(90, 64, 24, 0.06); }
.sw-code { font-size: 13px; color: var(--ink-2); }
.sw-code b { font-family: var(--mono); color: var(--accent); user-select: all; -webkit-user-select: all; }
.sw-ver { font-family: var(--mono); font-size: 12px; color: var(--ink-3); font-weight: 400; }
.ar-item .sw-icon-sm { margin-top: 2px; }
.sw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sw-card { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; background: rgba(255, 252, 244, 0.5); }
.sw-card:hover { border-color: var(--accent); }
.sw-card b { display: block; font-size: 15px; }
.sw-card small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-top: 2px; }
.sw-card em { display: block; margin-top: 6px; font-style: normal; }
.nv-cat-title { font-family: var(--serif); font-size: 19px; margin: 26px 0 12px; }
.nv-cat-title:first-child { margin-top: 0; }
.nv-cat { font-family: var(--serif); font-size: 18px; margin: 26px 0 10px; }
.nv-cat a { text-decoration: none; }
.nv-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.nv-card { position: relative; display: flex; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 252, 244, 0.5); }
.nv-card:hover { border-color: var(--accent); }
.nv-card > a:first-child, .nv-go { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; }
.nv-card b { display: block; font-size: 14px; }
.nv-card small { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-card span { min-width: 0; }
.nv-info { display: grid; place-items: center; width: 34px; color: var(--ink-3); text-decoration: none; border-left: 1px solid var(--line); }
.nv-info:hover { color: var(--accent); }
.rd-back { display: inline-block; margin: 22px 0 6px; font-size: 13px; color: var(--ink-3) !important; text-decoration: none; }
.rd-back:hover { color: var(--accent) !important; }
.rd-home { padding-top: 30px; padding-bottom: 40px; }
.rd-wide { max-width: 1040px; }
