  /* macEverything site — native macOS tokens.
     Type follows the app: SF Pro for UI, PingFang SC for Chinese, SF Mono for data.
     Accent follows the app's selection color (#5B6FD9), not a generic SaaS blue. */

  :root {
    /* Surfaces */
    --surface-primary: #FFFFFF;
    --surface-secondary: #F5F5F7;
    --surface-tertiary: #ECECF0;
    --surface-inverse: #1A1D22;
    --surface-inverse-raised: #202329;
    --surface-inverse-title: #191C21;

    /* Foreground */
    --foreground-primary: #1A1D22;
    --foreground-secondary: #5F6774;
    --foreground-subtle: #6B7280;
    --foreground-muted: #8B929A;
    --foreground-inverse: #F2F4F7;
    --foreground-inverse-muted: #A2AAB4;
    --foreground-inverse-faint: #8B929A;

    /* Borders */
    --border-subtle: rgba(0, 0, 0, 0.07);
    --border-strong: rgba(0, 0, 0, 0.12);
    --border-inverse: rgba(255, 255, 255, 0.09);
    --border-inverse-soft: rgba(255, 255, 255, 0.055);

    /* Accent — App selection indigo */
    --accent-primary: #5B6FD9;
    --accent-primary-strong: #4A5CC4;
    --accent-bright: #7A8BE6;
    --accent-tint: #EEF0FB;
    --accent-tint-strong: #DDE1F7;
    --accent-mark: rgba(91, 111, 217, 0.16);
    --accent-selection: rgba(91, 111, 217, 0.12);

    /* Status */
    --status-success: #28C840;
    --status-warning: #B45309;
    --status-warning-inverse: #F0B357;
    --status-red: #FF5F57;
    --status-yellow: #FEBC2E;
    --status-green: #28C840;

    /* Radii — App geometry: 12 panels, 8 rows/buttons, 6 chips, 4 keycaps */
    --radius-none: 0px;
    --radius-sm: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-3xl: 20px;
    --radius-full: 9999px;

    /* Elevation */
    --shadow-lg: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.07);
    --shadow-bar: 0 24px 64px -14px rgba(30, 41, 59, 0.22), 0 2px 8px rgba(30, 41, 59, 0.06);
    --shadow-window: 0 30px 70px -10px rgba(0, 0, 0, 0.55);

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 96px;

    /* Type scale */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    --text-4xl: 36px;
    --text-5xl: 48px;
    --text-6xl: 64px;

    /* Fonts — the app's actual stack */
    --font-heading: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-caption: var(--font-body);
    --font-data: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Layout */
    --container: 1120px;
    --copy-width: 700px;
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--surface-primary);
    color: var(--foreground-primary);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }
  img { max-width: 100%; display: block; }
  a { color: inherit; }
  button, input { font: inherit; }
  ::selection { background: var(--accent-tint-strong); }

  :focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
  }

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

  .skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    padding: 9px 14px;
    background: var(--surface-inverse);
    color: var(--foreground-inverse);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-size: var(--text-sm);
    transform: translateY(-160%);
    transition: transform 0.2s ease;
  }
  .skip-link:focus-visible { transform: translateY(0); }

  .container {
    width: min(var(--container), calc(100% - var(--space-7)));
    margin-inline: auto;
  }
  .copy {
    max-width: var(--copy-width);
    margin-inline: auto;
  }
  .section {
    padding: var(--space-9) 0;
    text-align: center;
  }
  .section-alt {
    background: var(--surface-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
  }

  .eyebrow {
    margin: 0;
    font-family: var(--font-data);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--foreground-subtle);
  }
  html[lang="en"] .eyebrow { text-transform: uppercase; }

  h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--foreground-primary);
    margin: 0;
  }
  h1 {
    margin-top: var(--space-4);
    font-size: clamp(2.75rem, 5.6vw, 4.25rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.04em;
    overflow-wrap: break-word;
    text-wrap: pretty;
  }
  h2 {
    margin-top: var(--space-4);
    font-size: clamp(1.9rem, 3.2vw, 2.5rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
    text-wrap: pretty;
  }
  .lede {
    margin: var(--space-5) auto 0;
    max-width: 640px;
    font-size: var(--text-lg);
    line-height: 1.65;
    color: var(--foreground-secondary);
    text-wrap: pretty;
  }
  .section-note {
    margin: var(--space-5) auto 0;
    max-width: 660px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--foreground-subtle);
  }

  /* Navigation — native toolbar feel */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    min-height: 44px;
  }
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--foreground-primary);
  }
  .brand img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
  }
  .nav-links a {
    font-size: 13px;
    color: var(--foreground-secondary);
    text-decoration: none;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
  }
  .nav-links a:hover {
    color: var(--foreground-primary);
    background: rgba(0, 0, 0, 0.045);
  }
  .nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }
  .lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    min-width: 38px;
    padding: 0 8px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--foreground-secondary);
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex: none;
    cursor: pointer;
    text-decoration: none;
  }
  .lang-toggle:hover { background: rgba(0, 0, 0, 0.05); color: var(--foreground-primary); }

  /* Buttons — native rounded-rectangle, not pills */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease;
  }
  .btn svg { width: 16px; height: 16px; flex: none; }
  .btn-primary {
    background: var(--accent-primary);
    color: var(--foreground-inverse);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(15, 23, 42, 0.12);
  }
  .btn-primary:hover { background: var(--accent-primary-strong); }
  .btn-primary:active { background: #4050B4; }
  .btn-secondary {
    background: var(--surface-primary);
    border-color: var(--border-strong);
    color: var(--foreground-primary);
  }
  .btn-secondary:hover { background: var(--surface-secondary); border-color: rgba(0, 0, 0, 0.18); }
  .btn-sm {
    height: 32px;
    padding: 0 14px;
    border-color: var(--border-strong);
    background: var(--surface-primary);
    color: var(--foreground-primary);
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
  }
  .btn-sm:hover { background: var(--surface-secondary); border-color: rgba(0, 0, 0, 0.18); }

  /* Footer */
  .site-footer {
    padding: var(--space-7) 0 calc(var(--space-7) + env(safe-area-inset-bottom));
    background: var(--surface-secondary);
    border-top: 1px solid var(--border-subtle);
  }
  .footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-5);
    flex-wrap: wrap;
  }
  .footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
  }
  .footer-brand img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }
  .footer-brand p {
    margin: 0;
    font-size: 13px;
    color: var(--foreground-secondary);
  }
  .footer-brand p strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--foreground-primary);
  }
  .footer-links {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    flex-wrap: wrap;
    font-size: 13px;
  }
  .footer-links a {
    color: var(--foreground-secondary);
    text-decoration: none;
    padding: 8px 0;
  }
  .footer-links a:hover { color: var(--foreground-primary); }
  .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.02em;
    color: var(--foreground-muted);
  }

  /* Shared responsive (used by article pages) */
  @media (max-width: 720px) {
    .section { padding: var(--space-8) 0; }
    .btn-sm { height: 40px; padding-inline: var(--space-4); }
    .lang-toggle { height: 40px; min-width: 44px; }
    .footer-links a { padding: 12px 0; }
    .container { width: calc(100% - var(--space-6)); }
    .lede { font-size: 17px; }
    .footer-inner { flex-direction: column; }
  }

  @media (max-width: 480px) {
    .nav { gap: var(--space-3); }
    .nav-actions { gap: 4px; }
    .btn-sm { padding-inline: 12px; }
    .lang-toggle { min-width: 38px; padding: 0 6px; }
    h1 { font-size: clamp(2.5rem, 12vw, 3rem); }
    h2 { font-size: 1.75rem; }
    .footer-links { gap: var(--space-4); }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .skip-link { transition: none; }
  }
