nav { font-family: monospace; font-size: 0.85em; padding: 12px 20px; }
nav a { color: inherit; text-decoration: none; }
nav a:hover { text-decoration: underline; }

body { margin: 0; font-family: monospace; background: #f8f8f8; }

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
}

h1 { font-size: 1.4em; margin: 0 0 12px; }
p { color: #555; font-size: 0.9em; line-height: 1.6; margin: 0 0 40px; }
kbd {
  background: #e0e0e0;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.9em;
}

.demo {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.trigger {
  font-family: monospace;
  font-size: 0.85em;
  padding: 9px 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  color: #222;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s;
}
.trigger:hover { border-color: #aaa; }
.dropdown.open .trigger { border-color: #222; }

.chevron {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.8em;
}
.dropdown.open .chevron { transform: rotate(-180deg); }

.menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 50;
  animation: menu-in 0.15s ease forwards;
}

.dropdown.open .menu { display: block; }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.item {
  padding: 8px 16px;
  font-size: 0.85em;
  cursor: pointer;
  color: #222;
  transition: background 0.1s;
  outline: none;
}
.item:hover,
.item:focus { background: #f0f0f0; }
.item--danger { color: #c0392b; }
.item--danger:hover { background: #fef2f2; }
.item--checked::before {
  content: '✓ ';
  color: #222;
}

.separator {
  height: 1px;
  background: #e0e0e0;
  margin: 4px 0;
}
