:root {
  --bg: #f7f7f8;
  --bg-band: #ffffff;
  --card: #ffffff;
  --text: #16161a;
  --muted: #5f6068;
  --line: rgba(0, 0, 0, 0.09);
  --accent: #e8590c;
  --accent-hover: #d14d06;
  --on-accent: #ffffff;
  --code-bg: #efeff2;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111114;
    --bg-band: #18181c;
    --card: #1c1c21;
    --text: #ececf0;
    --muted: #9c9ca6;
    --line: rgba(255, 255, 255, 0.09);
    --accent: #ff7a2e;
    --accent-hover: #ff8f4f;
    --on-accent: #1a0d04;
    --code-bg: #24242a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 5px; }
kbd {
  display: inline-block;
  padding: 0.05em 0.4em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--card);
  font-family: inherit;
  white-space: nowrap;
}
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 6px; }
.nav nav { display: flex; gap: 24px; font-size: 0.94rem; }
.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero { text-align: center; padding-top: 72px; }
.hero-icon { margin: 0 auto 24px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.18)); }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.9rem); font-weight: 750; max-width: 15em; margin: 0 auto 18px; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--muted); max-width: 34em; margin: 0 auto 32px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  transition: background 0.15s;
}
.button:hover { background: var(--accent-hover); text-decoration: none; }
.button.secondary { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.button.secondary:hover { background: var(--code-bg); }
.fine { font-size: 0.86rem; color: var(--muted); margin-top: 18px; }
.oss {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 650;
}
.oss:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* Hero: a MacBook drawn in CSS, everything inside sized in container units */
.hero-shot { max-width: 1100px; margin: 56px auto 0; padding: 0 24px; }
.hero-shot > figcaption { text-align: center; color: var(--muted); font-size: 0.92rem; margin-top: 22px; }
.mac { --bezel: #0b0b0d; filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.16)); }
.mac-lid {
  width: 88%;
  margin: 0 auto;
  padding: 1.3% 1.3% 1.1%;
  background: var(--bezel);
  border-radius: 2.6% / 4%;
  box-shadow: inset 0 0 0 1px #2c2c30;
}
.mac-screen {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 1512 / 982;
  overflow: hidden;
  border-radius: 0.9cqw 0.9cqw 0 0;
  background:
    radial-gradient(60% 80% at 15% 10%, #bcd3f6 0%, transparent 70%),
    radial-gradient(60% 80% at 90% 90%, #f5cfd8 0%, transparent 70%),
    linear-gradient(135deg, #d4def5, #e9dcef 55%, #f3d9e0);
  font: 1.05cqw/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #1d1d22;
}
.mac-screen::before { /* camera housing */
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 12cqw;
  height: 2.5cqw;
  transform: translateX(-50%);
  background: var(--bezel);
  border-radius: 0 0 1cqw 1cqw;
  z-index: 3;
}
.menubar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  height: 2.5cqw;
  padding: 0 1.4cqw;
  font-weight: 500;
}
.menu-app { font-weight: 700; }
.menu-right { margin-left: auto; display: flex; align-items: center; gap: 1.4cqw; }
.menu-right { gap: 1.2cqw; }
.menu-right img { width: 1.25cqw; height: 1.25cqw; }
.menu-right .sym { width: auto; height: 1.15cqw; }
.window {
  position: absolute;
  top: 6cqw;
  left: 12%;
  width: 62%;
  height: 30cqw;
  border-radius: 1cqw;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1.5cqw 4cqw rgba(30, 20, 60, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.window-bar { display: flex; align-items: center; gap: 0.55cqw; height: 2.6cqw; padding: 0 1cqw; border-bottom: 1px solid rgba(0, 0, 0, 0.07); }
.window-bar i { width: 0.85cqw; height: 0.85cqw; border-radius: 50%; background: #ff5f57; }
.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }
.menus { position: relative; align-self: stretch; flex: 1; }
.menu-set { position: absolute; inset: 0 auto 0 0; display: flex; align-items: center; gap: 1.6cqw; white-space: nowrap; }
.m-mail { opacity: 0; }
.window-bar span { flex: 1; text-align: center; margin-right: 3.4cqw; color: #6b6b74; font-weight: 600; }
.mail { left: 2cqw; top: 5cqw; width: 39cqw; height: 32cqw; z-index: 1; }
.browser { left: 43cqw; top: 4cqw; width: 45cqw; height: 34cqw; }
.window-bar em.send { margin-left: auto; color: #8e8e93; display: grid; }
.window-bar .send svg { width: 1.4cqw; height: 1.4cqw; }
.mail .window-bar span { margin-right: 0; }
.field { padding: 0.75cqw 1.4cqw; border-bottom: 1px solid rgba(0, 0, 0, 0.08); font-size: 1.05cqw; }
.field span { color: #8e8e93; margin-right: 0.4cqw; }
.mail-body { padding: 1.2cqw 1.4cqw; font-size: 1.1cqw; line-height: 1.45; }
.mail-body p { margin: 0 0 0.8cqw; }
.browser .window-bar { gap: 0.55cqw; }
.browser .nav { flex: none; margin: 0 0.8cqw; color: #8e8e93; font-size: 1.4cqw; letter-spacing: 0.4cqw; }
.browser .url { flex: none; margin: 0 auto; transform: translateX(-3cqw); padding: 0.35cqw 3cqw; border-radius: 0.8cqw; background: rgba(0, 0, 0, 0.06); color: #3c3c43; font-weight: 500; font-size: 0.95cqw; }
.wiki-shot { position: relative; aspect-ratio: 760 / 528; overflow: hidden; background: #fff; }
.wiki-shot img { width: 100%; height: auto; }
/* Selection frames captured from the real page; positions from the capture (760 × 528 viewport). */
.wiki-shot .ws { position: absolute; left: 2.632%; top: 47.31%; width: 56.05%; opacity: 0; }
.pasted { opacity: 0; }
.caret { display: inline-block; width: 1px; height: 1.2em; margin-left: 1px; background: currentColor; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.panel { position: absolute; left: 0.8cqw; right: 0.8cqw; bottom: 7cqw; z-index: 2; } /* above the Dock, as macOS's visibleFrame */
.desktop { position: absolute; top: 4.2cqw; right: 1.6cqw; display: grid; gap: 1.4cqw; justify-items: center; }
.desktop figure { margin: 0; width: 8cqw; display: flex; flex-direction: column; align-items: center; gap: 0.4cqw; }
.desktop img { width: 4.6cqw; height: 4.6cqw; object-fit: contain; filter: drop-shadow(0 0.15cqw 0.3cqw rgba(0, 0, 0, 0.18)); }
.desktop .thumb { height: 3.2cqw; margin: 0.7cqw 0; object-fit: cover; border: 0.2cqw solid #fff; border-radius: 0.2cqw; }
.desktop figcaption { max-width: 8cqw; font-size: 0.9cqw; line-height: 1.2; font-weight: 500; text-align: center; color: #1d1d22; text-shadow: 0 0 0.4cqw rgba(255, 255, 255, 0.8); }
.dock {
  position: absolute;
  left: 50%;
  bottom: 0.6cqw;
  z-index: 1;
  transform: translateX(-50%);
  width: max-content;
  display: flex;
  align-items: center;
  gap: 0.7cqw;
  height: 5.8cqw;
  padding: 0 0.8cqw;
  border-radius: 2.2cqw;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(1.2cqw) saturate(160%);
  -webkit-backdrop-filter: blur(1.2cqw) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0.6cqw 2cqw rgba(30, 20, 60, 0.15);
}
.dock img { position: relative; width: 4.4cqw; height: 4.4cqw; }
.dock .on { box-sizing: content-box; padding-bottom: 0.9cqw; margin-bottom: -0.9cqw; background: radial-gradient(circle at 50% calc(100% - 0.25cqw), currentColor 0.2cqw, transparent 0.24cqw) no-repeat; }
.dock b { width: 1px; height: 3.8cqw; margin: 0 0.2cqw; background: rgba(0, 0, 0, 0.15); }
.panel picture { display: block; }
.panel img { width: 100%; filter: drop-shadow(0 1cqw 2.5cqw rgba(20, 10, 50, 0.3)); }

.keys { position: absolute; left: 50%; top: 40%; z-index: 4; transform: translate(-50%, -50%); }
.keys span {
  position: absolute;
  left: 50%;
  top: 0;
  padding: 0.9cqw 1.6cqw;
  border-radius: 1.1cqw;
  background: rgba(20, 20, 26, 0.72);
  backdrop-filter: blur(1cqw);
  -webkit-backdrop-filter: blur(1cqw);
  color: #fff;
  font-size: 2.4cqw;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
}
@media (prefers-reduced-motion: no-preference) {
  .panel { animation: panel 10s cubic-bezier(0.22, 1, 0.36, 1) infinite; }
  .ws0 { animation: ws0 10s steps(1) infinite; }
  .ws1 { animation: ws1 10s steps(1) infinite; }
  .ws2 { animation: ws2 10s steps(1) infinite; }
  .ws3 { animation: ws3 10s steps(1) infinite; }
  .ws4 { animation: ws4 10s steps(1) infinite; }
  .ws5 { animation: ws5 10s steps(1) infinite; }
  .pasted { animation: pasted 10s infinite; }
  .m-safari { animation: m-safari 10s steps(1) infinite; }
  .m-mail { animation: m-mail 10s steps(1) infinite; }
  .mail .window-bar i { animation: unfocus 10s steps(1) infinite; }
  .browser .window-bar i { animation: unfocus-b 10s steps(1) infinite; }
  .k0 { animation: key0 10s ease-out infinite; }
  .k1 { animation: key1 10s ease-out infinite; }
  .k4 { animation: key4 10s ease-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .ws5 { opacity: 1; }
  .pasted { opacity: 1; }
  .m-safari { opacity: 0; }
  .m-mail { opacity: 1; }
  .browser .window-bar i { filter: saturate(0) opacity(0.4); }
}
/* A 10 s loop: select a sentence in Safari → ⌘C → focus moves to Mail → ⌘⇧V → Return pastes it. */
@keyframes panel {
  0%, 30% { transform: translateY(115%); opacity: 0; }
  37%, 48% { transform: none; opacity: 1; }
  54%, 100% { transform: translateY(115%); opacity: 0; }
}
@keyframes ws0 { 0% { opacity: 0; } 5% { opacity: 1; } 96% { opacity: 0; } }
@keyframes ws1 { 0% { opacity: 0; } 7% { opacity: 1; } 96% { opacity: 0; } }
@keyframes ws2 { 0% { opacity: 0; } 9% { opacity: 1; } 96% { opacity: 0; } }
@keyframes ws3 { 0% { opacity: 0; } 11% { opacity: 1; } 96% { opacity: 0; } }
@keyframes ws4 { 0% { opacity: 0; } 13% { opacity: 1; } 96% { opacity: 0; } }
@keyframes ws5 { 0% { opacity: 0; } 23% { opacity: 1; } 96% { opacity: 0; } }
@keyframes pasted { 0%, 51% { opacity: 0; } 51.1%, 95% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes m-safari { 0% { opacity: 1; } 24% { opacity: 0; } }
@keyframes m-mail { 0% { opacity: 0; } 24% { opacity: 1; } }
@keyframes unfocus { 0% { filter: saturate(0) opacity(0.4); } 24% { filter: none; } }
@keyframes unfocus-b { 0% { filter: none; } 24% { filter: saturate(0) opacity(0.4); } }
@keyframes key0 {
  0%, 14% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  15.5%, 20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  23%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
@keyframes key1 {
  0%, 26% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  27.5%, 33% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  36%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
@keyframes key4 {
  0%, 40% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  41.5%, 46% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  49%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

@media (prefers-color-scheme: dark) {
  .mac { filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.5)); }
  .mac-screen {
    background:
      radial-gradient(60% 80% at 15% 10%, #2b2f6b 0%, transparent 70%),
      radial-gradient(60% 80% at 90% 90%, #5a2463 0%, transparent 70%),
      linear-gradient(135deg, #1b1d3d, #2a1d47 55%, #3b1d4c);
    color: #ececf0;
  }
  .menu-right img { filter: invert(1); }
  .field { border-bottom-color: rgba(255, 255, 255, 0.1); }
  .browser .url { background: rgba(255, 255, 255, 0.1); color: #ebebf5; }
  .wiki-shot { background: #101418; }
  .menubar { text-shadow: 0 0 0.3cqw rgba(0, 0, 0, 0.3); }
  .desktop figcaption { color: #fff; text-shadow: 0 0.1cqw 0.4cqw rgba(0, 0, 0, 0.6); }
  .dock { background: rgba(40, 40, 50, 0.45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0.6cqw 2cqw rgba(0, 0, 0, 0.35); }
  .dock b { background: rgba(255, 255, 255, 0.2); }
  .window { background: rgba(28, 28, 34, 0.94); box-shadow: 0 1.5cqw 4cqw rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08); }
  .window-bar { border-bottom-color: rgba(255, 255, 255, 0.07); }
  .window-bar span { color: #9c9ca6; }
  .mac-base { background: linear-gradient(#4a4a50, #2e2e33 70%, #1f1f23); box-shadow: inset 0 1px 0 #66666d; }
  .mac-base::before { background: linear-gradient(#1f1f23, #3a3a40); }
}

/* Why */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-top: 88px; padding-bottom: 24px; }
.why h2 { font-size: 1.25rem; margin: 0 0 8px; }
.why p { margin: 0; color: var(--muted); }

/* Sections */
section[id] { padding-top: 88px; padding-bottom: 8px; }
.section-title { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin: 0 0 32px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card img { width: 100%; aspect-ratio: 25 / 16; object-fit: cover; }
.card figcaption { padding: 16px 20px 20px; color: var(--muted); font-size: 0.95rem; }
.card figcaption b { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }

.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.minis b { display: block; margin-bottom: 6px; }
.minis p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.7; }

/* Agents band */
.band { background: var(--bg-band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 88px; padding-bottom: 88px !important; }
.two { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }
.two > * { min-width: 0; }
.two p { margin: 0 0 16px; }
pre {
  margin: 0 0 12px;
  padding: 14px 18px;
  background: var(--code-bg);
  border-radius: 12px;
  overflow-x: auto;
  user-select: all;
}
pre code { background: none; padding: 0; font-size: 0.86rem; }
.prompt { color: var(--muted); user-select: none; margin-right: 0.6em; }

.tools { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-bottom: 12px; }
.tools caption { text-align: left; font-weight: 650; margin-bottom: 10px; }
.tools td { padding: 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.tools td:first-child { padding-right: 16px; white-space: nowrap; }
.tools td:last-child { color: var(--muted); }

/* Privacy */
.privacy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.privacy > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.privacy h3 { font-size: 1.05rem; margin: 0 0 8px; }
.privacy p { margin: 0; color: var(--muted); font-size: 0.95rem; overflow-wrap: anywhere; }

/* Install */
.install { text-align: center; padding-top: 0; }
.install img { margin: 0 auto 16px; }
.install h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin: 0 0 20px; }
.install ol { list-style: none; counter-reset: step; padding: 0; margin: 0 auto 28px; display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.install li { counter-increment: step; color: var(--muted); }
.install li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 1.6em;
  height: 1.6em;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.85em;
  font-weight: 650;
}

/* Footer */
.footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 40px; font-size: 0.9rem; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer nav a { color: var(--muted); }
.credit { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 0.78rem; }
.credit a { color: inherit; text-decoration: underline; }

/* Narrow screens */
@media (max-width: 900px) {
  .why, .minis, .privacy { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav nav { gap: 16px; }
  .nav nav a:nth-child(-n+2) { display: none; }
  .hero { padding-top: 48px; }
  .hero-icon { width: 72px; height: 72px; }
  .cta .button { width: 100%; justify-content: center; }
  .hero-shot { padding: 0 12px; margin-top: 40px; }
  .mac-lid { width: 92%; }
  .why, .minis, .privacy, .grid { grid-template-columns: 1fr; }
  .why { gap: 28px; padding-top: 56px; }
  section[id] { padding-top: 64px; }
  .band { margin-top: 64px; padding-bottom: 64px !important; }
  .tools td:first-child { white-space: normal; overflow-wrap: anywhere; width: 42%; }
  .install ol { flex-direction: column; gap: 10px; align-items: center; }
  .footer { flex-direction: column; align-items: flex-start; }
}
