* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  line-height: 1.65;
}
.reaction-layout {
  width: min(1120px, 94vw);
  margin: 0 auto;
  padding: 24px 0 46px;
}
.top-links, .related-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.top-link, .editor-btn, .related-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.editor-btn {
  background: #2C7A7B;
  border-color: #2C7A7B;
  color: #fff;
}
.hero, .panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
}
.eyebrow {
  color: #2C7A7B;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.14;
  margin-bottom: 10px;
}
h2 {
  font-size: 21px;
  margin-bottom: 10px;
}
p, li {
  color: #334155;
}
.summary {
  max-width: 850px;
  color: #475569;
}
.meta, .note {
  color: #64748b;
  font-size: 13px;
  margin-top: 10px;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 14px;
  align-items: start;
}
.scheme {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 18px;
  text-align: center;
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 800;
  color: #0f172a;
  overflow-wrap: anywhere;
}
.scheme small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}
.reaction-rendered-scheme {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 4px 0 8px;
  background: transparent;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.reaction-side {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
}
.reaction-molecule-tile {
  width: 128px;
  flex: 0 0 128px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  text-align: center;
}
.reaction-molecule-tile img {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: contain;
}
.reaction-molecule-tile code {
  display: block;
  margin-top: 2px;
  color: #475569;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.reaction-molecule-fallback {
  background: #f8fafc;
}
.reaction-plus,
.reaction-arrow {
  color: #0f172a;
  font-weight: 900;
  font-size: 17px;
  flex: 0 0 auto;
}
.reaction-arrow {
  min-width: 34px;
  text-align: center;
  color: #2C7A7B;
}
.reaction-smiles-note code {
  overflow-wrap: anywhere;
}
.reaction-example-edit {
  width: fit-content;
  margin-top: 8px;
}
.facts {
  display: grid;
  gap: 10px;
}
.fact {
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}
.fact dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fact dd {
  color: #0f172a;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.examples {
  display: grid;
  gap: 10px;
}
.example {
  border: 0;
  border-radius: 0;
  padding: 8px 0 12px;
  background: transparent;
}
.example strong {
  display: block;
  margin-bottom: 4px;
}
ul {
  margin-left: 20px;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .reaction-molecule-tile {
    width: 112px;
    flex-basis: 112px;
  }
  .reaction-molecule-tile img {
    height: 84px;
  }
}
