/* ==========================================================================
   轻签 QingQian 1.0 — 暖宣纸与墨色 Mac 编辑器视觉样式
   Zero external dependencies · Responsive 320px+ · Prefers Reduced Motion
   ========================================================================== */

:root {
  /* Paper surfaces */
  --paper-bg: #f8f5ef;
  --paper-surface: #fdfcf9;
  --paper-well: #f1ece2;
  --paper-bar: #f4f0e8;
  --paper-hover: #ebe4d8;

  /* Warm ink */
  --ink-strong: #1e1a16;
  --ink-body: #3c352e;
  --ink-muted: #665d53;
  --ink-faint: #786e63;

  /* Signature terracotta accent (from 暖宣纸 theme) */
  --accent: #d46f4d;
  --accent-text: #a94c2d;
  --accent-soft: rgba(212, 111, 77, 0.12);
  --accent-border: rgba(169, 76, 45, 0.28);

  /* Lines & elevation */
  --line-subtle: rgba(30, 26, 22, 0.08);
  --line-strong: rgba(30, 26, 22, 0.14);
  --shadow-card:
    0 18px 40px -22px rgba(30, 26, 22, 0.18),
    0 2px 8px -2px rgba(30, 26, 22, 0.06);
  --shadow-float:
    0 26px 56px -22px rgba(30, 26, 22, 0.24),
    0 4px 14px -4px rgba(30, 26, 22, 0.08);
  --shadow-pinned:
    0 32px 68px -20px rgba(30, 26, 22, 0.30),
    0 0 0 1px rgba(212, 111, 77, 0.36);

  /* Typography */
  --font-serif:
    "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC",
    "Source Han Serif CN", "SimSun", Georgia, "Times New Roman", serif;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans CJK SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-mono:
    ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Radii & layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --container-max: 1080px;
  --doc-max: 760px;
  --gutter: clamp(16px, 4vw, 36px);
  --header-height: 60px;

  /* Interactive note demo defaults (暖宣纸) */
  --note-bg: #fdfcf9;
  --note-bar: #f3f0ea;
  --note-ink: #1e1a16;
  --note-muted: #665d53;
  --note-border: rgba(30, 26, 22, 0.12);
  --note-dot: #d46f4d;
  --note-accent: #a94c2d;
  --note-veil: rgba(248, 245, 239, 0.88);
}

/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--paper-bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  color: var(--ink-body);
  background-color: var(--paper-bg);
  background-image: radial-gradient(
    ellipse 90% 520px at 50% -120px,
    rgba(255, 253, 248, 0.92),
    rgba(248, 245, 239, 0)
  );
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--ink-strong);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  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 */
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink-strong);
  color: var(--paper-surface);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.skip-link:focus {
  top: 12px;
}

/* Layout containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--doc {
  max-width: var(--doc-max);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(248, 245, 239, 0.92);
  border-bottom: 1px solid var(--line-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-strong);
  text-decoration: none;
  flex-shrink: 0;
  min-height: 44px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 111, 77, 0.16);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand-en {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  line-height: 1;
}

/* Mobile toggle button */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-surface);
  color: var(--ink-strong);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.nav-toggle:hover {
  background: var(--paper-well);
}

.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 3.5px;
  width: 14px;
}

.nav-toggle-icon span {
  display: block;
  height: 1.5px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  color: var(--ink-body);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background-color 150ms ease, color 150ms ease;
}

.nav-link:hover {
  background: var(--paper-well);
  color: var(--ink-strong);
}

.nav-link[aria-current="page"] {
  color: var(--accent-text);
  background: var(--accent-soft);
  font-weight: 500;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: clamp(36px, 6vw, 72px);
  padding-bottom: clamp(36px, 5vw, 60px);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-surface);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5.2vw, 3.375rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
  text-wrap: balance;
}

.hero-rule {
  width: 38px;
  height: 2px;
  margin: 22px 0 20px;
  border-radius: 2px;
  background: var(--accent);
}

.hero-lead {
  margin: 0;
  max-width: 60ch;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.75;
  color: var(--ink-body);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.btn--primary {
  background: var(--ink-strong);
  color: var(--paper-surface);
}

.btn--primary:hover {
  background: #342d26;
  color: var(--paper-surface);
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--paper-surface);
  border-color: var(--line-strong);
  color: var(--ink-strong);
}

.btn--secondary:hover {
  background: var(--paper-well);
  border-color: rgba(30, 26, 22, 0.24);
  color: var(--ink-strong);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-meta li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-faint);
  opacity: 0.65;
}

.hero-meta li:first-child::before {
  display: none;
}

/* ==========================================================================
   Section Common Structure
   ========================================================================== */

.section {
  padding-block: clamp(44px, 7vw, 84px);
  border-top: 1px solid var(--line-subtle);
  scroll-margin-top: calc(var(--header-height) + 18px);
}

.section--tight-top {
  padding-top: clamp(20px, 3vw, 36px);
  border-top: none;
}

.section-header {
  max-width: 660px;
  margin-bottom: clamp(24px, 4vw, 38px);
}

.section-kicker {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-text);
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  font-weight: 600;
  line-height: 1.28;
  color: var(--ink-strong);
  text-wrap: balance;
}

.section-desc {
  margin: 12px 0 0;
  font-size: 0.9875rem;
  line-height: 1.72;
  color: var(--ink-muted);
}

/* ==========================================================================
   App Preview Gallery (#preview)
   ========================================================================== */

.preview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.preview-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-surface);
  color: var(--ink-body);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.preview-tab:hover {
  background: var(--paper-well);
  color: var(--ink-strong);
}

.preview-tab[aria-selected="true"] {
  background: var(--ink-strong);
  border-color: var(--ink-strong);
  color: var(--paper-surface);
}

.preview-tab-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.7;
}

.preview-stage {
  display: grid;
  gap: 20px;
}

.preview-panel {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #faf9f5;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Without JS, show all three previews cleanly stacked */
html.js .preview-panel[hidden],
html.js .preview-panel[data-panel-inactive] {
  display: none;
}

.preview-frame {
  background: #faf9f5;
  overflow: hidden;
}

.preview-frame img {
  width: 100%;
  height: auto;
}

.preview-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 14px clamp(16px, 2.5vw, 24px);
  border-top: 1px solid var(--line-subtle);
  background: var(--paper-surface);
}

.preview-caption strong {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-strong);
}

.preview-caption span {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Interactive 18–72pt Large-Text Demo (#type-demo)
   ========================================================================== */

.demo-shell {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.demo-controls {
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-surface);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 18px;
}

.control-group {
  display: grid;
  gap: 10px;
}

.control-group + .control-group {
  padding-top: 16px;
  border-top: 1px solid var(--line-subtle);
}

.control-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.control-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-strong);
}

.size-readout {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.stepper-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper-bg);
  color: var(--ink-strong);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.step-btn:hover:not(:disabled) {
  background: var(--paper-hover);
  border-color: rgba(30, 26, 22, 0.25);
}

.step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.size-slider {
  width: 100%;
  min-width: 0;
  margin: 0;
  height: 36px;
  accent-color: var(--accent-text);
  cursor: pointer;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  background: var(--paper-bg);
  color: var(--ink-body);
  text-align: left;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.preset-btn:hover {
  background: var(--paper-well);
  border-color: var(--line-strong);
}

.preset-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--ink-strong);
}

.preset-pt {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-text);
}

.preset-name {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.preset-btn[aria-pressed="true"] .preset-name {
  color: var(--ink-strong);
}

.reset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-strong);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background-color 140ms ease;
}

.text-btn:hover:not(:disabled) {
  background: var(--paper-well);
}

.text-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shortcut-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* Theme swatches (matching overview.png 5 themes) */
.theme-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 10px;
  border: 1px solid var(--line-subtle);
  border-radius: 999px;
  background: var(--paper-bg);
  color: var(--ink-body);
  font-size: 0.8125rem;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.theme-chip:hover {
  background: var(--paper-well);
}

.theme-chip[aria-checked="true"] {
  background: var(--paper-surface);
  border-color: var(--ink-strong);
  color: var(--ink-strong);
  font-weight: 500;
}

.theme-swatch {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(30, 26, 22, 0.16);
  flex-shrink: 0;
}

/* Sample snippet selector */
.sample-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sample-btn {
  min-height: 36px;
  padding: 5px 10px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  background: var(--paper-bg);
  color: var(--ink-body);
  font-size: 0.8125rem;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.sample-btn:hover {
  background: var(--paper-well);
}

.sample-btn[aria-pressed="true"] {
  border-color: var(--ink-strong);
  background: var(--ink-strong);
  color: var(--paper-surface);
}

/* Simulated Mac Note Window */
.note-stage {
  min-width: 0;
}

.mac-note {
  position: relative;
  border: 1px solid var(--note-border);
  border-radius: var(--radius-lg);
  background: var(--note-bg);
  color: var(--note-ink);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.mac-note.is-pinned {
  box-shadow: var(--shadow-pinned);
}

/* Five Authentic Note Themes */
.mac-note[data-theme="xuan"] {
  --note-bg: #fdfcf9;
  --note-bar: #f3f0ea;
  --note-ink: #1e1a16;
  --note-muted: #665d53;
  --note-border: rgba(30, 26, 22, 0.13);
  --note-dot: #d46f4d;
  --note-accent: #a94c2d;
  --note-veil: rgba(253, 252, 249, 0.92);
}

.mac-note[data-theme="plum"] {
  --note-bg: #fdf7f8;
  --note-bar: #f6eaed;
  --note-ink: #271b1f;
  --note-muted: #6c535b;
  --note-border: rgba(122, 62, 82, 0.16);
  --note-dot: #c96a88;
  --note-accent: #9c3f5e;
  --note-veil: rgba(253, 247, 248, 0.92);
}

.mac-note[data-theme="moss"] {
  --note-bg: #f7faf3;
  --note-bar: #ecf1e6;
  --note-ink: #1d2419;
  --note-muted: #53604c;
  --note-border: rgba(74, 96, 56, 0.16);
  --note-dot: #738a58;
  --note-accent: #4c6234;
  --note-veil: rgba(247, 250, 243, 0.92);
}

.mac-note[data-theme="mist"] {
  --note-bg: #f5f8fc;
  --note-bar: #e8eef6;
  --note-ink: #18222d;
  --note-muted: #4f6073;
  --note-border: rgba(65, 102, 140, 0.16);
  --note-dot: #5d8bb8;
  --note-accent: #35608a;
  --note-veil: rgba(245, 248, 252, 0.92);
}

.mac-note[data-theme="obsidian"] {
  --note-bg: #22211f;
  --note-bar: #2b2927;
  --note-ink: #f3efe9;
  --note-muted: #b5aca2;
  --note-border: rgba(255, 248, 238, 0.14);
  --note-dot: #e0896a;
  --note-accent: #f0a184;
  --note-veil: rgba(34, 33, 31, 0.93);
}

.mac-note-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--note-bar);
  border-bottom: 1px solid var(--note-border);
}

.mac-note-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.mac-note-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--note-dot);
  flex-shrink: 0;
}

.mac-note-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--note-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mac-note-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.note-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--note-border);
  border-radius: 999px;
  background: transparent;
  color: var(--note-muted);
  font-size: 0.75rem;
  font-weight: 500;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.note-tool-btn:hover {
  color: var(--note-ink);
  background: rgba(128, 120, 110, 0.12);
}

.note-tool-btn[aria-pressed="true"] {
  border-color: var(--note-dot);
  color: var(--note-accent);
  background: rgba(212, 111, 77, 0.12);
}

.mac-note-body-wrap {
  position: relative;
  min-height: 310px;
  padding: clamp(18px, 3vw, 28px);
}

.note-editor {
  display: block;
  width: 100%;
  min-height: 254px;
  max-height: 460px;
  padding: 0;
  margin: 0;
  border: 0;
  resize: vertical;
  background: transparent;
  color: var(--note-ink);
  font-family: var(--font-serif);
  font-size: var(--demo-size, 18pt);
  line-height: var(--demo-leading, 1.68);
  letter-spacing: var(--demo-tracking, 0em);
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: hidden;
  overflow-y: auto;
  transition: font-size 120ms ease, line-height 120ms ease;
}

.note-editor:focus {
  outline: none;
}

.note-editor:focus-visible {
  outline: 2px dashed var(--note-dot);
  outline-offset: 6px;
  border-radius: 6px;
}

.mac-note.is-locked .note-editor {
  filter: blur(11px);
  user-select: none;
  pointer-events: none;
}

.note-lock-veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: var(--note-veil);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.note-lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--note-border);
  background: var(--note-bar);
  color: var(--note-accent);
}

.note-lock-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--note-ink);
}

.note-lock-desc {
  margin: 0;
  max-width: 30ch;
  font-size: 0.875rem;
  color: var(--note-muted);
}

.note-unlock-btn {
  margin-top: 4px;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--note-ink);
  border-radius: 999px;
  background: var(--note-ink);
  color: var(--note-bg);
  font-size: 0.875rem;
  font-weight: 500;
}

.mac-note-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--note-border);
  background: var(--note-bar);
  font-size: 0.8125rem;
  color: var(--note-muted);
}

.note-footer-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.note-footer-stats {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.demo-footnote {
  margin: 12px 2px 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Feature Grid (#features)
   ========================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2.2vw, 22px);
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(18px, 2.5vw, 24px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--paper-surface);
}

.feature-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-text);
  letter-spacing: 0.06em;
}

.feature-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-strong);
}

.feature-desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.72;
  color: var(--ink-muted);
}

/* ==========================================================================
   Keyboard Shortcuts (#shortcuts)
   ========================================================================== */

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  background: var(--paper-surface);
}

.shortcut-action {
  font-size: 0.9375rem;
  color: var(--ink-body);
}

.shortcut-keys {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--paper-bg);
  color: var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.35;
}

/* ==========================================================================
   Release Status & Specs (#release)
   ========================================================================== */

.release-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 44px);
  padding: clamp(22px, 3.5vw, 36px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-surface);
  box-shadow: var(--shadow-card);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.8125rem;
  font-weight: 600;
}

.release-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.8vw, 1.875rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-strong);
}

.release-note {
  margin: 12px 0 0;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-muted);
}

.release-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 20px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.spec-list {
  margin: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.spec-row {
  display: grid;
  gap: 3px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-subtle);
}

.spec-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.spec-row dt {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.spec-row dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-strong);
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Document Pages (Support & Privacy)
   ========================================================================== */

.doc-main {
  padding-block: clamp(32px, 5vw, 56px);
}

.doc-sheet {
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-surface);
  box-shadow: var(--shadow-card);
}

.doc-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line-subtle);
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.doc-lang-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-bg);
  color: var(--ink-strong);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
}

.doc-lang-link:hover {
  background: var(--paper-well);
}

.doc-sheet h1 {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(1.625rem, 3.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-strong);
}

.doc-sheet h2 {
  margin: 2rem 0 0.7rem;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-strong);
}

.doc-sheet h3 {
  margin: 1.65rem 0 0.55rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-strong);
}

.doc-sheet p {
  margin: 0 0 1rem;
  line-height: 1.78;
}

.doc-sheet ul {
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
}

.doc-sheet li {
  margin: 0.55rem 0;
  line-height: 1.72;
}

.doc-sheet a {
  overflow-wrap: anywhere;
}

.doc-english {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-strong);
  scroll-margin-top: calc(var(--header-height) + 18px);
}

.doc-english h2 {
  margin-top: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line-subtle);
  padding-block: 28px 36px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink-strong);
  text-decoration: underline;
}

/* ==========================================================================
   Responsive Breakpoints (Desktop -> Tablet -> 320px Mobile)
   ========================================================================== */

@media (max-width: 960px) {
  .demo-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .release-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
    padding-block: 8px;
  }

  html.js .nav-toggle {
    display: inline-flex;
  }

  html.js .site-nav {
    display: none;
    width: 100%;
    padding: 8px 0 6px;
    border-top: 1px solid var(--line-subtle);
  }

  html.js .site-nav.is-open {
    display: block;
  }

  html.js .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  html.js .nav-link {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
  }

  .feature-grid,
  .shortcut-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .shortcut-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .shortcut-keys {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .brand-en {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .preview-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .preview-tab {
    width: 100%;
    justify-content: flex-start;
  }

  .preset-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mac-note-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .mac-note-body-wrap {
    min-height: 250px;
    padding: 16px;
  }

  .note-editor {
    min-height: 210px;
  }
}

/* ==========================================================================
   Reduced Motion Preference
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn--primary:hover {
    transform: none;
  }
}

.hero > .container { display:grid;grid-template-columns:minmax(0,1.17fr) minmax(0,.83fr);gap:clamp(1.75rem,5vw,4.5rem);align-items:center }
.hero-note-preview { width:100%;height:auto;border-radius:4.4%;box-shadow:0 20px 44px -18px rgb(55 46 35 / 29%),0 3px 8px rgb(55 46 35 / 7%);transform:rotate(1deg); }
@media(max-width:720px){ .hero > .container { grid-template-columns:minmax(0,1fr);gap:2rem } .hero-note-preview { width:min(85%,24rem);justify-self:center; } }
