:root { --ink: #1b1f24; --muted: #5f6b7a; --line: #dde2e8; --accent: #1d4f91; --navy: #0b1f3a;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: #fff;
  line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.topbar { border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; }
.brand { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); white-space: nowrap; padding: 13px 0; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.nav a { color: var(--muted); font-size: 14px; white-space: nowrap; padding: 16px 0 13px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.current { color: var(--ink); border-bottom-color: var(--ink); }
.paper { max-width: 880px; margin: 0 auto; padding: 52px 20px 0; }
.paper h1 { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 38px); font-weight: 600; line-height: 1.2; margin: 0 0 12px; }
.paper h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 40px 0 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line); }
.paper p { font-family: var(--serif); font-size: 17px; line-height: 1.65; margin: 0 0 14px; }
.paper .subtitle { font-size: 19px; line-height: 1.5; color: #3b4450; }
.paper .links { display: flex; gap: 6px 24px; flex-wrap: wrap; font-family: inherit; font-size: 15px; }
.facts { width: 100%; border-collapse: collapse; font-size: 15px; }
.facts tr { border-top: 1px solid var(--line); }
.facts tr:last-child { border-bottom: 1px solid var(--line); }
.facts th { width: 1%; padding: 8px 22px 8px 0; text-align: left; font-weight: 600; white-space: nowrap; vertical-align: top; }
.facts td { padding: 8px 0; }
.figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px 24px; margin-top: 20px; }
.figure { display: block; color: var(--ink); font-size: 14px; line-height: 1.45; }
.figure:hover { text-decoration: none; }
.figure img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center;
  border: 1px solid var(--line); margin-bottom: 9px; }
.figure:hover img { border-color: #98a3b3; }
.figure:hover span { text-decoration: underline; }
.figure small { display: block; margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.page-head { max-width: 920px; padding: 34px 0 0; }
.page-head h1 { font-family: var(--serif); font-size: clamp(24px, 3vw, 30px); font-weight: 600; line-height: 1.25; margin: 0 0 10px; }
.caption { font-family: var(--serif); font-size: 17px; line-height: 1.6; color: #2b323b; margin: 0; }
.tips { font-size: 13.5px; color: var(--muted); margin: 10px 0 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.plot { padding: 10px; }
.pager { display: flex; justify-content: space-between; gap: 20px; margin: 30px 0 0; padding-top: 16px;
  border-top: 1px solid var(--line); font-size: 15px; }
.pager a.next { text-align: right; }
.pager small { display: block; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 20px 0 40px; margin-top: 40px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { font: inherit; font-size: 15px; color: var(--muted); background: none; border: 0;
  border-bottom: 2px solid transparent; padding: 8px 0; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tab-note { font-size: 14px; color: #3b4450; margin: 10px 0 16px; min-height: 22px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); background: #eef3ff;
  border-radius: 999px; padding: 2px 10px; }
.molecules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mol-head { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px 2px; flex-wrap: wrap; }
.letter { font-weight: 700; font-size: 18px; }
.formula { font-weight: 600; font-size: 18px; }
.rid { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); }
.viewer { position: relative; height: 330px; margin: 0 8px; }
.controls { display: flex; gap: 6px; padding: 8px 16px; flex-wrap: wrap; align-items: center; }
.controls button { font: inherit; font-size: 13px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.controls button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.controls .play { margin-left: auto; }
.errors { display: grid; grid-template-columns: max-content 1fr 1fr; gap: 8px 16px; padding: 10px 16px 14px;
  font-size: 14px; align-items: center; border-top: 1px solid var(--line); margin-top: 4px; }
.errors .head { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.errors .row { display: contents; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.who i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.meter b { font-variant-numeric: tabular-nums; }
.meter div { height: 6px; background: #eef1f5; border-radius: 999px; margin-top: 4px; overflow: hidden; }
.meter div span { display: block; height: 100%; border-radius: 999px; }
.dft { padding: 0 16px 14px; color: var(--muted); font-size: 13px; }
.contacts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; min-height: 30px; }
.contacts span { font-size: 13px; color: #7a4d12; background: #fff4e5; border: 1px solid #f3d3a5; border-radius: 999px;
  padding: 2px 10px; font-variant-numeric: tabular-nums; }
.legend-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin: 0 0 18px; color: #334155; font-size: 14px; }
.legend-row i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px;
  border: 1px solid #4f535a; }
.legend-row i.dash { width: 26px; height: 0; border: 0; border-top: 3px dotted #e08a1e; border-radius: 0; vertical-align: 3px; }
.legend-row .controls { padding: 0; margin-left: auto; }
@media (max-width: 900px) { .molecules { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .paper { padding: 36px 16px 0; }
  .topbar .wrap { flex-wrap: wrap; gap: 0; }
  .nav { margin-left: 0; width: 100%; }
  .nav a { padding: 4px 0 10px; }
}
