.hero { max-width: 760px; padding: 55px 0 64px; }
.hero h1 {
  max-width: 740px;
  margin: 8px 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -.055em;
}
.hero-copy { max-width: 620px; margin: 0; color: var(--muted); font-size: 15px; }
.hero-actions { margin-top: 26px; }
.primary-link, .secondary-link, .primary-button, .secondary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.primary-link, .primary-button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}
.primary-link:hover, .primary-button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
.secondary-link, .secondary-button {
  border: 1px solid #d5d0e2;
  background: var(--surface);
  color: var(--text);
}
.secondary-link:hover, .secondary-button:hover:not(:disabled) {
  border-color: #ba9df4;
  background: var(--surface-soft);
}
.secondary-button:disabled { cursor: not-allowed; opacity: .52; }
.security-note {
  width: fit-content;
  max-width: 100%;
  margin: 26px 0 0;
  padding: 10px 13px;
  border: 1px solid #e9cc82;
  border-radius: 10px;
  background: #fff9e9;
  color: #604818;
  font-size: 12px;
}

.catalog-section { padding: 0 0 72px; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -.035em;
}
.section-heading > p { max-width: 380px; margin: 0; color: var(--muted); font-size: 13px; }
.page-status { margin-bottom: 16px; color: var(--muted); }
.bookmarklet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.bookmarklet-card {
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
}
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.card-heading h3 { margin: 5px 0 0; font-size: 18px; line-height: 1.25; letter-spacing: -.025em; }
.screenshot-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.screenshot-comparison[hidden] { display: none; }
.screenshot-item { min-width: 0; margin: 0; }
.screenshot-item figcaption { margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 750; }
.screenshot-item a {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f5f4f9;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.screenshot-item a:hover { border-color: #ba9df4; box-shadow: 0 4px 15px rgba(33, 28, 58, .1); }
.screenshot-item img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card-description, .card-message { color: var(--muted); }
.card-description { min-height: 3em; margin: 18px 0; font-size: 13px; }
.works-on { margin: 18px 0; }
.pattern-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.pattern {
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fdfcff;
  color: var(--muted);
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.card-copy-button { width: 100%; margin-top: 4px; }
.card-help-link { display: inline-block; margin-top: 12px; color: var(--primary-dark); font-size: 12px; font-weight: 750; text-decoration: underline; text-underline-offset: 2px; }
.card-help-link:hover { color: var(--primary); }
.card-message { min-height: 1.5em; margin: 14px 0 0; font-size: 12px; }
.card-message.is-success { color: var(--success); }
.card-message.is-error { color: var(--danger); }
.retry-button { margin-top: 10px; }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 35px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.site-footer p { margin: 0; }
.copy-dialog {
  width: min(700px, calc(100% - 28px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: 0 25px 70px rgba(33, 28, 58, .2);
  color: var(--text);
}
.copy-dialog::backdrop { background: rgba(33, 28, 58, .6); }
.copy-dialog form { padding: 24px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
}
.icon-button:hover { background: var(--surface-soft); }
.copy-dialog textarea {
  width: 100%;
  max-width: 100%;
  margin: 14px 0;
  padding: 12px;
  resize: vertical;
  border: 1px solid #d5d0e2;
  border-radius: 9px;
  background: #fdfcff;
  color: var(--text);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.dialog-actions { justify-content: flex-end; }
@media (max-width: 800px) {
  .bookmarklet-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .site-header, .section-heading, .site-footer { align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; }
  .hero { padding: 42px 0 54px; }
}
@media (max-width: 560px) {
  .site-header, main, .site-footer { width: min(100% - 28px, 1120px); }
  .site-header { padding-top: 20px; }
  .hero h1 { font-size: clamp(32px, 10vw, 43px); }
  .hero-actions > a { width: 100%; }
  .bookmarklet-card { padding: 19px; }
  .card-heading { flex-direction: column; }
  .screenshot-comparison { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
