/* Minimal navigation, retaining the existing CMSPro light / dark palette. */
:root {
  color-scheme: dark;
  --page: #101114;
  --surface: #191a1f;
  --surface-soft: #24262d;
  --text: #f4f2ef;
  --muted: #a3a2a5;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --accent: #d5fa6b;
  --accent-ink: #16190d;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #fff;
  --surface: #fff;
  --surface-soft: #f4f4f4;
  --text: #17181b;
  --muted: #66696d;
  --line: rgba(16, 17, 20, .1);
  --line-strong: rgba(16, 17, 20, .2);
  --accent: #627f14;
  --accent-ink: #fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body { min-width: 280px; color: var(--text); background: var(--page); font: 14px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
h1, h2 { min-width: 0; overflow-wrap: anywhere; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button { transition: background-color .16s, border-color .16s, color .16s; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
#main:focus { outline: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
.skip-link { position: fixed; z-index: 2; top: 12px; left: 16px; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.page-shell { width: min(880px, 100%); min-height: 100dvh; margin-inline: auto; padding-inline: max(28px, env(safe-area-inset-left)) max(28px, env(safe-area-inset-right)); padding-bottom: env(safe-area-inset-bottom, 0px); display: flex; flex-direction: column; }
.site-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { min-width: 0; display: flex; align-items: center; gap: 11px; }
.brand strong { font-size: 22px; font-weight: 700; letter-spacing: -.6px; overflow-wrap: anywhere; line-height: 1.4; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 9px; background: var(--accent); }
.brand-mark::after { content: ""; width: 0; height: 0; margin-left: 3px; border-block: 7px solid transparent; border-left: 11px solid var(--accent-ink); }
.brand-logo { width: 34px; height: 34px; flex-shrink: 0; object-fit: contain; }
.theme-toggle { min-height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.theme-symbol { width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: 44px 64px; }
.intro { margin-bottom: 30px; }
h1 { font-size: clamp(28px, 3.4vw, 36px); font-weight: 650; letter-spacing: -1px; line-height: 1.4; }
.intro p { margin-top: 12px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.entry-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.entry { min-width: 0; display: flex; flex-direction: column; padding: 30px; }
.entry + .entry { border-left: 1px solid var(--line); }
.entry h2 { font-size: 20px; font-weight: 600; letter-spacing: -.5px; line-height: 1.5; }
.entry-description { min-height: 48px; margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; }
.entry-actions { padding-top: 24px; }
.button { min-width: 0; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 16px; border: 1px solid transparent; border-radius: 7px; font-size: 13px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.button > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.button > span:last-child { flex-shrink: 0; font-size: 18px; line-height: 1; }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-secondary { border-color: var(--line-strong); color: var(--text); background: transparent; }
.button[aria-disabled="true"] { background: var(--surface-soft); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.alternate-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 8px; }
.alternate-links a { min-width: 0; max-width: 100%; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.alternate-links a span { overflow: hidden; text-overflow: ellipsis; }
.download-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 10px; }
.download-links a { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.download-links.only-downloads { gap: 10px; margin-top: 0; }
.download-links.only-downloads a { flex: 1; justify-content: center; padding-inline: 12px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); }
footer { padding-block: 24px; color: var(--muted); font-size: 11px; }
.fallback-note { margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--muted); }
@media (hover: hover) {
  .theme-toggle:hover, .download-links a:hover, .alternate-links a:hover { color: var(--accent); }
  .button-secondary[href]:hover, .download-links.only-downloads a:hover { border-color: var(--accent); }
  .button-primary[href]:hover { filter: brightness(.94); }
}
@media (max-width: 600px) {
  .page-shell { padding-inline: max(22px, env(safe-area-inset-left)) max(22px, env(safe-area-inset-right)); }
  .site-header { min-height: 78px; }
  .brand strong { font-size: 21px; }
  main { padding-block: 28px 40px; }
  .intro { margin-bottom: 24px; }
  h1 { font-size: 28px; letter-spacing: -.8px; }
  .intro p { font-size: 13px; margin-top: 10px; }
  .entry-grid { grid-template-columns: minmax(0, 1fr); }
  .entry { padding: 24px; }
  .entry + .entry { border-left: 0; border-top: 1px solid var(--line); }
  .entry h2 { font-size: 19px; }
  .entry-description { min-height: 0; margin-top: 9px; }
  .entry-actions { padding-top: 18px; }
  footer { padding-block: 18px; }
}
@media (max-width: 360px) {
  .page-shell { padding-inline: 18px; }
  .entry { padding: 20px; }
  h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
