/* Embed offer — on-page disclosure and the /embed/ gallery.
   Uses the site tokens from style.css. Loaded only where an embed is offered. */

.ac-embed-offer {
  margin: -0.35rem 0 1.75rem;
}

.ac-embed-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ochre);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.ac-embed-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  border-radius: var(--radius-lg);
}

.ac-embed-summary::-webkit-details-marker { display: none; }

.ac-embed-summary:hover { background: var(--surface-alt); }

.ac-embed-summary:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
}

.ac-embed-details[open] .ac-embed-summary {
  border-bottom: 1px solid var(--line);
  border-radius: 11px 11px 0 0;
}

.ac-embed-details[open] .ac-embed-summary:hover { background: transparent; }

.ac-embed-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 0.15rem;
}

.ac-embed-heading {
  display: block;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
  line-height: 1.3;
}

.ac-embed-summary-action {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.ac-embed-when-open { display: none; }

.ac-embed-details[open] .ac-embed-when-closed { display: none; }

.ac-embed-details[open] .ac-embed-when-open { display: inline; }

.ac-embed-panel { padding: 1.05rem 1.15rem 1.2rem; }

.ac-embed-lead {
  margin: 0 0 1.05rem;
  max-width: 68ch;
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.ac-embed-lead strong { font-weight: 700; }

.ac-embed-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 1.1rem;
}

.ac-embed-field {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.ac-embed-field legend {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  margin-bottom: 0.4rem;
}

.ac-embed-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ac-embed-pills button {
  appearance: none;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  min-height: 44px;
  cursor: pointer;
}

.ac-embed-pills button:hover { border-color: var(--navy); }

.ac-embed-pills button[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.ac-embed-pills button:focus-visible,
.ac-embed-copy:focus-visible,
.ac-embed-textlink:focus-visible,
.ac-embed-card h3 a:focus-visible,
.ac-embed-jump a:focus-visible,
.ac-embed-card-details summary:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.ac-embed-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.45rem;
}

.ac-embed-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-bottom: 1.1rem;
}

.ac-embed-preview iframe {
  display: block;
  margin: 0 auto;
  width: 100%;
  background: #FBF8F1;
}

.ac-embed-snippet {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  resize: vertical;
  min-height: 8.5rem;
}

.ac-embed-snippet:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.10);
}

.ac-embed-code-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.15rem;
  margin-top: 0.75rem;
}

.ac-embed-copy {
  appearance: none;
  border: none;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  padding: 0.7rem 1.15rem;
  min-height: 44px;
  cursor: pointer;
}

.ac-embed-copy:hover { background: var(--navy-light); }

.ac-embed-copy[data-copied] { background: var(--leaf); }

.ac-embed-textlink {
  color: var(--navy);
  font-weight: 700;
  font-size: 0.875rem;
  text-underline-offset: 3px;
  text-decoration-color: var(--ochre);
}

.ac-embed-textlink:hover { text-decoration-color: var(--navy); }

.ac-embed-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Gallery at /embed/ */
.ac-embed-intro { max-width: 68ch; }

.ac-embed-intro p { line-height: 1.6; }

.ac-embed-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.25rem 0 2rem;
}

.ac-embed-jump a {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.ac-embed-jump a:hover { border-color: var(--navy); }

.ac-embed-suite { margin: 0 0 2rem; }

.ac-embed-suite h2 {
  font-size: 1.35rem;
  margin: 0 0 0.8rem;
}

.ac-embed-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 0.75rem;
}

.ac-embed-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ochre);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.05rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.ac-embed-card h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.ac-embed-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.ac-embed-card h3 a:hover { color: var(--navy); }

.ac-embed-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.9rem;
  margin-top: auto;
}

.ac-embed-card .ac-embed-copy {
  padding: 0.45rem 0.85rem;
  min-height: 40px;
  font-size: 0.8125rem;
}

.ac-embed-card-details { width: 100%; }

.ac-embed-card-details summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--ochre);
  text-underline-offset: 3px;
}

.ac-embed-card-details summary::-webkit-details-marker { display: none; }

.ac-embed-card-details .ac-embed-snippet { margin-top: 0.7rem; }

@media (max-width: 640px) {
  .ac-embed-summary {
    align-items: flex-start;
    padding: 0.85rem 0.95rem;
  }

  .ac-embed-panel { padding: 0.95rem 0.95rem 1.05rem; }

  .ac-embed-code-actions { align-items: stretch; }

  .ac-embed-offer .ac-embed-copy { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ac-embed-copy,
  .ac-embed-pills button,
  .ac-embed-summary { transition: none; }
}
