/* The API synthesis section: a grid of approved drugs, and one page per drug with its routes
   drawn out. Structures size themselves so a wide molecule gets a wide frame and no dead space. */

.ap-hero { padding-bottom: 30px; }
.ap-hero .w-kicker a { color: inherit; text-decoration: none; }
.ap-hero .w-kicker a:hover { text-decoration: underline; }
.ap-brand { font-weight: 600; color: var(--teal, #0e9fa2); }

.ap-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.ap-pills li { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; background: #eef4fb; color: #1b3763; border: 1px solid #dbe5f3; }
.ap-pills li svg { width: 15px; height: 15px; }

/* ---------- the grid of drugs ---------- */
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 18px; }
.ap-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #dce7f5; border-radius: 20px;
  overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 10px 28px rgba(11, 27, 63, .07);
  transition: transform .16s ease, box-shadow .2s ease, border-color .16s ease; }
.ap-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(11, 27, 63, .14); border-color: #b9c6dc; }
.ap-card-soon { opacity: .92; }
.ap-card-soon:hover { transform: none; box-shadow: 0 10px 28px rgba(11, 27, 63, .07); border-color: #dce7f5; }
.ap-card-struct { padding: 6px 6px 0; border-bottom: 1px solid #e8eef8; background: #fff; }
.ap-card-struct img { display: block; width: 100%; height: auto; }
.ap-card-body { padding: 11px 15px 14px; display: grid; gap: 5px; }
.ap-card-body h2 { margin: 0; font-size: 1.18rem; letter-spacing: -.01em; }
.ap-card-body h2 small { display: block; margin-top: 2px; font-size: .76rem; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; color: #12776C; }
.ap-use { margin: 0; font-size: .86rem; line-height: 1.5; color: #56627a; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ap-chip { font-size: .73rem; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  background: #eaf5f3; color: #12776C; white-space: nowrap; }
.ap-chip-amber { background: #fdf4e3; color: #9a5f05; }
.ap-chip-grey { background: #eef1f6; color: #56627a; }
.ap-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; font-size: .84rem;
  font-weight: 800; color: #0b1b3f; }
.ap-go svg { width: 16px; height: 16px; transition: transform .16s ease; }
.ap-card:hover .ap-go svg { transform: translateX(3px); }
.ap-soon { display: inline-flex; align-items: center; gap: 6px; color: #7b8699; font-weight: 700; }

.ap-howto { display: flex; gap: 9px; align-items: flex-start; margin: 22px 0 0; padding: 12px 15px;
  border: 1px solid #dce7f5; border-radius: 14px; background: #fff; color: #56627a; font-size: .9rem; }
.ap-howto svg { flex: none; width: 17px; height: 17px; margin-top: 2px; color: #12776C; }
.ap-empty { color: #56627a; }

/* ---------- one route ---------- */
.ap-route { background: #fff; border: 1px solid #dce7f5; border-radius: 20px; padding: 18px 20px 22px;
  margin-bottom: 20px; box-shadow: 0 10px 28px rgba(11, 27, 63, .05); }
.ap-route-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.ap-route-head h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.01em; }
.ap-route-tag { font-size: .85rem; font-weight: 800; color: #12776C; }
.ap-route-sum { margin: 0 0 10px; color: #56627a; font-size: .93rem; line-height: 1.55; max-width: 78ch; }
.ap-route-scale { display: flex; align-items: center; gap: 7px; margin: 0 0 14px; font-size: .88rem; color: #56627a; }
.ap-route-scale svg { width: 16px; height: 16px; color: #12776C; }
.ap-route-scale strong { color: #0b1b3f; }

.ap-step { display: grid; grid-template-columns: minmax(0, 1.25fr) auto minmax(0, 1fr); gap: 10px;
  align-items: center; padding: 10px; border: 1px solid #e4ebf6; border-radius: 18px; background: #fcfdff;
  margin-bottom: 10px; }
.ap-side { display: flex; align-items: stretch; justify-content: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ap-plus { align-self: center; font-size: 1.3rem; font-weight: 800; color: #8d99ad; }

.ap-mol { flex: 1 1 230px; max-width: 340px; min-width: 0; border: 1px solid #e4ebf6; border-radius: 14px;
  background: #fff; padding: 4px 6px 7px; text-align: center; }
.ap-mol-api { border-color: #12776C; background: #f3faf8; }
.ap-mol-img { display: block; width: 100%; height: auto; }
/* the SMILES is the useful thing on the page: readable, and one tap to copy into a vendor search */
.ap-smiles { display: flex; align-items: flex-start; gap: 5px; width: 100%; margin: 4px 0 0; padding: 5px 6px;
  border: 1px solid #e4ebf6; border-radius: 9px; background: #f7fafc; cursor: pointer; font: inherit;
  text-align: left; line-height: 1.35; }
.ap-smiles code { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem;
  word-break: break-all; color: #15324f; }
.ap-smiles svg { flex: none; width: 14px; height: 14px; margin-top: 2px; color: #7b8699; }
.ap-smiles:hover { border-color: #12776C; background: #eef7f6; }
.ap-smiles:hover svg { color: #12776C; }
.ap-cas { display: inline-block; margin-top: 5px; padding: 3px 9px; border: 0; border-radius: 999px;
  background: #eef1f6; color: #56627a; font: inherit; font-size: .71rem; font-weight: 800; cursor: pointer; }
.ap-cas:hover { background: #eaf5f3; color: #12776C; }
.ap-cas-none { background: transparent; color: #9aa6b8; cursor: default; font-weight: 700; }
.ap-copied { font-size: .72rem; font-weight: 800; color: #12776C; }

.ap-arrow { min-width: 164px; max-width: 230px; text-align: center; }
.ap-badges { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; flex-wrap: wrap; }
.ap-step-no { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #56627a; background: #eef1f6; padding: 3px 8px; border-radius: 999px; }
.ap-yield { font-size: .72rem; font-weight: 800; color: #0f6b53; background: #e6f6ef; padding: 3px 9px; border-radius: 999px; }
.ap-cond { font-size: .79rem; font-weight: 700; color: #0b1b3f; line-height: 1.45; }
.ap-line { position: relative; height: 2px; background: #0b1b3f; margin: 7px 0; }
.ap-line::after { content: ""; position: absolute; right: -1px; top: -5px; border: 6px solid transparent;
  border-left-color: #0b1b3f; border-right: 0; }
.ap-note { font-size: .73rem; color: #56627a; line-height: 1.4; }

.ap-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.ap-metric { font-size: .79rem; color: #56627a; background: #fff; border: 1px solid #e4ebf6;
  border-radius: 999px; padding: 5px 12px; }
.ap-metric b { color: #12776C; font-size: .93rem; }
.ap-metric i { font-style: normal; color: #9aa6b8; }
.ap-metrics-note { margin: 4px 0 0; font-size: .8rem; color: #7b8699; }

.ap-ref { margin-top: 16px; padding: 13px 16px; border: 1px solid #e4ebf6; border-left: 4px solid #D98A16;
  border-radius: 12px; background: #fffdf8; font-size: .88rem; }
.ap-ref-authors { font-weight: 700; }
.ap-ref-where { color: #7b8699; }
.ap-ref p { margin: 8px 0 0; }
.ap-ref-links { display: flex; flex-wrap: wrap; gap: 14px; }
.ap-ref a { display: inline-flex; align-items: center; gap: 6px; }
.ap-ref a svg { width: 15px; height: 15px; }

.ap-back a { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.ap-back svg { width: 16px; height: 16px; }

@media (max-width: 760px) {
  .ap-step { grid-template-columns: 1fr; padding: 8px; }
  .ap-mol { flex: 1 1 100%; max-width: none; }
  .ap-smiles code { font-size: .76rem; }
  .ap-arrow { max-width: none; }
  .ap-line { width: 2px; height: 26px; margin: 8px auto; }
  .ap-line::after { right: auto; left: -5px; top: auto; bottom: -1px;
    border: 6px solid transparent; border-top-color: #0b1b3f; border-bottom: 0; }
  .ap-route { padding: 14px 12px 18px; }
}
@media (prefers-reduced-motion: reduce) { .ap-card, .ap-go svg { transition: none; } }

/* Further reading: a paper that explains the chemistry of a step without being the route's own source,
   so it is marked off from the reference above it with a quieter bar. */
.ap-further-head { margin: 22px 0 0; font-size: 1rem; color: #56627a; }
.ap-ref-further { border-left-color: #1B998B; margin-top: 10px; }
.ap-ref-why { margin: 0 0 10px !important; color: #3b4860; }
.ap-ref-licence { color: #7b8699; font-size: 0.86rem; }
