:root {
  color-scheme: light;
  --page: #fafafa;
  --card: #ffffff;
  --foreground: #09090b;
  --muted-page: #71717a;
  --border-page: #e4e4e7;
  --border-strong: #d4d4d8;
  --primary: #18181b;
  --surface: #131313;
  --surface-2: #1a1a1a;
  --ink: var(--foreground);
  --muted: var(--muted-page);
  --dim: #4f5964;
  --line: #252c34;
  --line-soft: #171b20;
  --accent: #8b5cf6;
  --green: #10b981;
  --pin: #f59e0b;
  --blue: #7dd3fc;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--page);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px max(18px, calc((100vw - 1120px) / 2));
  background: rgba(250, 250, 250, .88);
  border-bottom: 1px solid var(--border-page);
  backdrop-filter: blur(16px);
}
.brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
}
nav { display: flex; align-items: center; gap: 10px; }
nav a:not(.github-button) {
  color: var(--muted-page);
  font-size: 13px;
}
nav a:not(.github-button):hover { color: var(--foreground); }
.github-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  color: #fafafa;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
}
.github-button:hover { background: #27272a; border-color: #27272a; }
.github-button svg { width: 16px; height: 16px; fill: currentColor; }

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.hero {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(500px, 1.1fr);
  gap: 56px;
  align-items: center;
  padding: 64px 0 54px;
}
.hero-copy { min-width: 0; }
.eyebrow {
  width: fit-content;
  margin: 0 0 14px;
  padding: 4px 9px;
  color: #52525b;
  background: #f4f4f5;
  border: 1px solid var(--border-page);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
}
h1 {
  margin: 0;
  max-width: 560px;
  color: var(--foreground);
  font-size: clamp(42px, 4.8vw, 64px);
  font-weight: 760;
  line-height: .98;
  letter-spacing: -.04em;
}
.lede {
  max-width: 570px;
  margin: 18px 0 0;
  color: var(--muted-page);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.48;
}

.install-card {
  margin-top: 28px;
  background: var(--card);
  border: 1px solid var(--border-page);
  border-radius: var(--radius);
  padding: 16px;
}
.install-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.mini-label {
  margin: 0 0 3px;
  color: var(--muted-page);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
h2 { margin: 0; color: var(--foreground); font-size: clamp(20px, 2vw, 28px); letter-spacing: -.02em; }
.install-card h2 { font-size: 24px; line-height: 1.12; }
.os-tabs {
  display: inline-flex;
  padding: 3px;
  background: #f4f4f5;
  border: 1px solid var(--border-page);
  border-radius: var(--radius);
  flex-shrink: 0;
}
.os-tab {
  height: 28px;
  padding: 0 10px;
  color: var(--muted-page);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.os-tab.active {
  color: #fafafa;
  background: var(--primary);
  font-weight: 800;
}
.command-wrap {
  position: relative;
  margin: 14px 0 10px;
}
.command-line {
  overflow: auto;
  max-width: 100%;
  margin: 0;
  padding: 13px 14px;
  padding-right: 72px;
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: var(--radius);
  cursor: pointer;
}
.command-line:focus {
  outline: 2px solid rgba(139, 92, 246, .35);
  outline-offset: 2px;
}
.command-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  height: 26px;
  padding: 0 9px;
  color: #d7dee8;
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.command-copy:hover {
  color: #fafafa;
  background: #27272a;
  border-color: #52525b;
}
code {
  color: #edf5ff;
  font: 13px/1.45 "Cascadia Code", Consolas, monospace;
}
.note {
  margin: 0;
  color: var(--muted-page);
  font-size: 12px;
  line-height: 1.45;
}

.demo {
  min-width: 0;
  position: relative;
}
.demo-foot button {
  min-height: 30px;
  padding: 0 10px;
  color: #c7d0da;
  background: #11151a;
  border: 1px solid #2a333d;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.demo-foot button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.demo-window {
  --ink: #e6edf3;
  --muted: #6f7a86;
  height: min(620px, calc(100vh - 128px));
  min-height: 500px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid #27272a;
  border-radius: 10px;
  box-shadow: 0 22px 60px rgba(24, 24, 27, .24);
  overflow: hidden;
}
.window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 4px;
  color: var(--dim);
  font-size: 11px;
}
.icon-settings {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--dim);
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.icon-settings:hover,
.icon-settings.active {
  color: var(--accent);
  background: rgba(255,255,255,.06);
}
.icon-settings svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.search-row {
  display: flex;
  align-items: stretch;
  margin: 8px 14px 4px;
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 4px;
  transition: border-color .15s;
}
.search-row:focus-within { border-color: var(--accent); }
#demo-search {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 7px 4px 7px 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
  font-family: inherit;
}
#demo-search::placeholder { color: #65707d; }
.search-actions {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding-right: 4px;
}
.search-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--dim);
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
}
.search-icon:hover,
.search-icon.active {
  color: var(--accent);
  background: rgba(255,255,255,.06);
}
.clear-search {
  display: none;
  font: 700 18px/1 system-ui, sans-serif;
}
.clear-search.show { display: flex; }
.rx-btn {
  font: 700 12px/1 "Cascadia Code", Consolas, monospace;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 14px 8px;
}
.chip {
  height: 22px;
  padding: 0 8px;
  color: var(--dim);
  background: transparent;
  border: 1px dashed #343840;
  border-radius: 10px;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
}
.chip:hover { color: var(--ink); border-color: var(--accent); }
.chip.active {
  color: #060608;
  background: var(--accent);
  border-color: var(--accent);
  border-style: solid;
}
.chip.icon-chip {
  min-width: 22px;
  padding: 0 5px;
  font-size: 15px;
  font-weight: 800;
  border-color: transparent;
  border-radius: 4px;
}
.chip.icon-chip.active {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
}
.settings-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 0 14px 8px;
  padding: 10px 12px;
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 6px;
}
.settings-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid #181c21;
}
.settings-title strong {
  color: #d5dde6;
  font-size: 12px;
}
.settings-title span,
.settings-section-mini > span {
  color: var(--dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
  color: #b5bec8;
  font-size: 11px;
}
.setting-row code {
  padding: 2px 6px;
  color: #dfe6ef;
  background: #11151a;
  border: 1px solid #20262d;
  border-radius: 4px;
  font-size: 11px;
}
.toggle {
  width: 28px;
  height: 16px;
  position: relative;
  display: inline-block;
  border-radius: 999px;
  background: #252a31;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8995a1;
}
.toggle.on {
  background: rgba(167, 139, 250, .32);
}
.toggle.on::after {
  left: 15px;
  background: var(--accent);
}
.settings-section-mini {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-top: 2px;
}
.slot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.slot-row b {
  color: var(--green);
  font: 700 11px/1 "Cascadia Code", Consolas, monospace;
}
.slot-row em {
  overflow: hidden;
  color: var(--muted);
  font: normal 10px/1.3 "Cascadia Code", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sync-account-demo {
  overflow: hidden;
  color: #b5bec8;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clip-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.clip-list::-webkit-scrollbar { width: 0; }
.clip {
  width: 100%;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 8px 14px;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #111;
  cursor: pointer;
  text-align: left;
  transition: background .1s;
}
.clip:hover,
.clip.selected { background: var(--surface-2); }
.clip.is-pinned { border-left: 2px solid var(--pin); padding-left: 12px; }
.clip-star {
  color: #505965;
  font-size: 16px;
  line-height: 1;
  padding-top: 2px;
}
.clip.is-pinned .clip-star { color: var(--pin); }
.clip-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.clip-text {
  overflow: hidden;
  color: #f1f7ff;
  font: 700 12px/1.42 "Cascadia Code", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thumb-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.thumb {
  width: 104px;
  height: 58px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #242a31;
  background: #0a0a0a;
}
.clip-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-size: 10px;
}
.clip-meta em {
  padding: 1px 5px;
  color: #84909d;
  font-style: normal;
  background: #0b0d10;
  border: 1px solid #20252c;
  border-radius: 8px;
}
.clip-meta .numpad-chip {
  color: var(--green);
  border-style: dashed;
}
.empty {
  padding: 54px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.demo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  color: var(--dim);
  border-top: 1px solid #171b20;
  font-size: 11px;
}
.demo-guide {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition: transform 1.55s cubic-bezier(.2, .8, .2, 1), opacity .35s ease;
}
.demo-guide.show { opacity: 1; }
.demo-guide-cursor {
  width: 24px;
  height: 32px;
  display: block;
  fill: #ffffff;
  stroke: #18181b;
  stroke-width: 2.25px;
  stroke-linejoin: round;
  filter: drop-shadow(0 10px 18px rgba(24, 24, 27, .22));
}
.demo-guide-tip {
  margin-top: 18px;
  padding: 7px 10px;
  color: #18181b;
  background: #ffffff;
  border: 1px solid var(--border-page);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(24, 24, 27, .1);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .demo-guide { display: none; }
}

section {
  padding: 64px 0;
}
.features h2,
.update h2 { margin-bottom: 18px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
article {
  min-height: 144px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border-page);
  border-radius: var(--radius);
}
article h3 { margin: 0 0 10px; color: var(--foreground); font-size: 15px; letter-spacing: -.01em; }
article p { margin: 0; color: var(--muted-page); font-size: 14px; line-height: 1.55; }
footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 38px;
  color: var(--muted-page);
  font-size: 13px;
}
footer a { color: var(--foreground); }

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 38px;
  }
  .demo-window {
    height: 620px;
  }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  main,
  footer { width: min(100% - 24px, 1240px); }
  .topbar { padding-inline: 12px; }
  nav a:not(.github-button) { display: none; }
  .hero { gap: 18px; }
  h1 { font-size: 46px; }
  .install-head { flex-direction: column; }
  .os-tabs { width: 100%; }
  .os-tab { flex: 1; }
  .demo-window { min-height: 560px; height: 72vh; }
  .settings-panel { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .command-line { white-space: pre-wrap; word-break: break-word; }
  .clip { grid-template-columns: 18px minmax(0, 1fr); padding-inline: 10px; }
  .thumb { width: 78px; height: 50px; }
  .demo-foot span { display: none; }
}
