:root {
  --primary: #0284c7;
  --secondary: #0f766e;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  min-height: 100vh;
  background: linear-gradient(120deg, #f0f9ff 0%, #dcfce7 100%);
  background-attachment: fixed;
  padding: 2rem 1rem 6rem;
  line-height: 1.6;
}

.header,
.container {
  width: min(1200px, 94vw);
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1.5rem 1rem 0.5rem;
}

.header h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0284c7 0%, #14b8a6 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.header p {
  color: var(--text-muted);
  font-weight: 500;
  max-width: 46rem;
  margin: 0 auto;
}

.toolbar,
.panel,
.preview-frame,
.prompt-box {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px -10px rgba(14, 165, 233, 0.25);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.pair-info {
  flex: 1 1 420px;
  min-width: 0;
}

.pair-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.pair-names > div {
  display: flex;
  flex-direction: column;
}

.pair-role {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pair-names strong {
  font-size: 1.6rem;
  line-height: 1.2;
}

.pair-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pair-note {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: #334155;
}

.toolbar-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
}

.step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.counter {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.copy-btn,
.primary-btn,
.ghost-btn {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: none;
}

.primary-btn {
  background: var(--secondary);
  color: white;
  font-size: 1.05rem;
  padding: 0.9rem 1.6rem;
}

.copy-btn {
  background: var(--primary);
  color: white;
}

.ghost-btn {
  background: white;
  color: var(--text-main);
  border: 1px solid #e2e8f0;
}

.copy-btn:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -8px rgba(15, 23, 42, 0.35);
}

.copy-btn:active,
.primary-btn:active,
.ghost-btn:active {
  transform: translateY(0);
}

.filter-row {
  margin: 1rem 0 0.75rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 0.45rem 0.9rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.chip.is-active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: white;
}

.copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.select-input {
  padding: 0.65rem 0.9rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: white;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-main);
}

.select-input:focus {
  outline: none;
  border-color: var(--primary);
}

.prompt-box {
  margin: 0.9rem 0 1.25rem;
  padding: 0.8rem 1.2rem;
}

.prompt-box summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.prompt-box pre {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 1rem;
  user-select: all;
}

/* Beispielseite: nutzt nur die Variablen, die fontpair.js je Paar setzt */
.preview-frame {
  overflow: hidden;
  padding: 0;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.browser-bar span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #cbd5e1;
}

.browser-bar em {
  margin-left: 0.8rem;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: white;
  border-radius: 6px;
  padding: 0.15rem 0.8rem;
}

.lp {
  --lp-ink: #1c1917;
  --lp-muted: #57534e;
  --lp-accent: #1d4ed8;
  --lp-bg: #fffdf8;
  --lp-soft: #f3efe6;
  font-family: var(--lp-body);
  color: var(--lp-ink);
  background: var(--lp-bg);
  font-size: 1.05rem;
  line-height: 1.65;
}

.lp h1,
.lp h2,
.lp h3,
.lp-logo {
  font-family: var(--lp-heading);
  font-weight: var(--lp-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.lp a {
  color: inherit;
  text-decoration: none;
}

.lp [contenteditable]:focus {
  outline: 2px dashed #93c5fd;
  outline-offset: 4px;
}

.lp-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.2rem clamp(1rem, 5vw, 4rem);
  border-bottom: 1px solid #ece7dc;
}

.lp-logo {
  font-size: 1.35rem;
}

.lp-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.95rem;
  color: var(--lp-muted);
}

.lp-btn {
  display: inline-block;
  background: var(--lp-ink);
  color: white !important;
  font-weight: var(--lp-body-bold);
  font-size: 0.98rem;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  cursor: default;
}

.lp-btn-small {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.lp-btn-ghost {
  background: transparent;
  color: var(--lp-ink) !important;
  border: 1px solid #d6d0c4;
}

.lp-hero {
  padding: clamp(3rem, 9vw, 7rem) clamp(1rem, 5vw, 4rem) clamp(2.5rem, 7vw, 5rem);
  max-width: 62rem;
}

.lp-kicker {
  font-size: 0.95rem;
  color: var(--lp-accent);
  font-weight: var(--lp-body-bold);
  margin-bottom: 1rem;
}

.lp-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4.4rem);
  margin-bottom: 1.4rem;
}

.lp-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--lp-muted);
  max-width: 40rem;
  margin-bottom: 2rem;
}

.lp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lp-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 3rem clamp(1rem, 5vw, 4rem);
  background: var(--lp-soft);
}

.lp-features h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.lp-features p {
  color: var(--lp-muted);
}

.lp-split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 5vw, 4rem);
}

.lp-split h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 1rem;
}

.lp-split p + p {
  margin-top: 1rem;
}

.lp-split blockquote {
  border-left: 3px solid var(--lp-accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
}

.lp-split blockquote p {
  font-family: var(--lp-heading);
  font-weight: var(--lp-heading-weight);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.35;
}

.lp-split cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: 0.92rem;
  color: var(--lp-muted);
}

.lp-cta {
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 5vw, 4rem);
  background: var(--lp-ink);
  color: #f5f5f4;
}

.lp-cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.8rem;
}

.lp-cta p {
  color: #d6d3d1;
  max-width: 34rem;
  margin: 0 auto 1.8rem;
}

.lp-cta .lp-btn {
  background: white;
  color: var(--lp-ink) !important;
}

.lp-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.5rem clamp(1rem, 5vw, 4rem);
  font-size: 0.85rem;
  color: var(--lp-muted);
}

/* Alle Paare */
.panel {
  padding: 1.5rem;
}

.all-panel {
  margin-top: 1.5rem;
}

.panel h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.1rem;
}

.pair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.75rem;
}

.pair-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  cursor: pointer;
  color: var(--text-main);
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.pair-card:hover {
  border-color: #99f6e4;
  transform: translateY(-2px);
}

.pair-card.is-active {
  border-color: var(--secondary);
}

.pair-card-heading {
  font-size: 1.45rem;
  line-height: 1.2;
}

.pair-card-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 1rem);
  background: var(--text-main);
  color: white;
  padding: 0.7rem 1.3rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 120;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.upscaler {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  padding: 0.7rem 1.3rem;
  background: white;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 110;
}

.upscaler:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

@media (max-width: 760px) {
  body {
    padding: 1rem 0.5rem 5rem;
  }

  .header,
  .container {
    width: 100%;
  }

  .header h1 {
    font-size: 2rem;
  }

  .toolbar-actions {
    width: 100%;
  }

  .lp-links {
    display: none;
  }

  .lp-nav {
    justify-content: space-between;
  }

  .lp-split {
    grid-template-columns: 1fr;
  }

  .copy-row > * {
    flex: 1 1 calc(50% - 0.6rem);
  }

  .upscaler {
    left: 50%;
    transform: translateX(-50%);
    bottom: 0.8rem;
  }

  .upscaler:hover {
    transform: translateX(-50%) translateY(-3px);
  }
}
