:root {
  --ink: #15171a;
  --body: #3a3f45;
  --muted: #6b7076;
  --rule: #d4d8de;
  --rule-soft: #e7eaee;
  --accent: #3b5bc4;      /* the blue of the paper's own figures */
  --copper: #b16c4a;      /* the metal ion in those figures */
  --paper: #ffffff;
  --tint: #f6f7f9;        /* the only non-white surface */
  --max: 880px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv05' 1, 'cv11' 1;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.hero, .hero-body, .section, .footer { display: block; }
.has-text-centered { text-align: center; }
.title { margin: 0; }
h1, h2, h3, p, figure, pre { margin: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; }

/* ---------------------------------------------------------------- header */

.hero-body { padding: 5rem 0 3.2rem; }

.pub-title {
  font-size: 2.6rem; font-weight: 800;
  line-height: 1.14; letter-spacing: -0.03em;
  text-align: center; color: var(--ink);
  margin-bottom: 2rem;
}

.authors { text-align: center; line-height: 2.1; margin-bottom: 1rem; }
.author { font-size: 1rem; font-weight: 500; white-space: nowrap; color: var(--ink); }
.author:not(:last-child)::after { content: ','; margin-right: 0.4em; color: var(--muted); }
.author a { border-bottom: 1px solid transparent; transition: border-color .18s, color .18s; }
.author a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.author sup { color: var(--muted); font-size: 0.7em; font-weight: 400; }

.affils { text-align: center; color: var(--muted); font-size: 0.85rem; line-height: 1.9; }
.affils span { white-space: nowrap; }
.affils span:not(:last-child)::after { content: '\00a0\00b7\00a0'; }

.marks { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 0.8rem; }

.buttons-row { display: flex; justify-content: center; gap: 0; margin-top: 2.4rem; }

.pub-button {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.7em 1.5em;
  border: 1px solid var(--ink);
  font-size: 0.92rem; font-weight: 500; color: var(--ink);
  background: transparent;
  transition: background .18s, color .18s;
}
.pub-button + .pub-button { border-left: none; }
.pub-button:hover { background: var(--ink); color: #fff; }

/* --------------------------------------------------------------- content */

.section { padding: 2.6rem 0; }
.section.pt-0 { padding-top: 0; }

.sec-title {
  font-size: 1.12rem; font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.9rem;
}

.lead { font-size: 1.02rem; line-height: 1.75; color: var(--body); margin-bottom: 0.9rem; }
.lead b { color: var(--ink); }

.fig { margin: 2.2rem 0; }
.fig img { display: block; width: 100%; height: auto; }
.fig figcaption {
  margin-top: 0.9rem;
  font-size: 0.86rem; line-height: 1.65; color: var(--muted);
}
.fig figcaption b { color: var(--ink); font-weight: 600; }

pre.code {
  background: var(--tint);
  border: 1px solid var(--rule-soft);
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  font-size: 0.85rem; line-height: 1.65;
}
pre.code code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; color: #2b3036; background: none; padding: 0; }

.footer {
  padding: 2.6rem 0; margin-top: 2.4rem;
  color: var(--muted); font-size: 0.84rem;
}
.footer a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .18s; }
.footer a:hover { border-bottom-color: var(--accent); }

/* ------------------------------------------------------------- animation */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .62s cubic-bezier(.2,.6,.3,1), transform .62s cubic-bezier(.2,.6,.3,1); }

.hero .pub-title, .hero .authors, .hero .affils, .hero .marks, .hero .buttons-row { animation: rise .7s cubic-bezier(.2,.6,.3,1) both; }
.hero .authors { animation-delay: .06s; }
.hero .affils { animation-delay: .12s; }
.hero .marks { animation-delay: .16s; }
.hero .buttons-row { animation-delay: .2s; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .hero .pub-title, .hero .authors, .hero .affils, .hero .marks, .hero .buttons-row { animation: none; }
}

/* ----------------------------------------------------------------- small */

@media (max-width: 768px) {
  .hero-body { padding: 3rem 0 2.2rem; }
  .pub-title { font-size: 1.85rem; overflow-wrap: break-word; }
  .affils span, .author { white-space: normal; }
  .affils { font-size: 0.8rem; }
  .section { padding: 2.4rem 0; }
  .buttons-row { flex-direction: column; align-items: stretch; }
  .pub-button { justify-content: center; }
  .pub-button + .pub-button { border-left: 1px solid var(--ink); border-top: none; }
}

/* ------------------------------------------------------- generation demo */

.flowdemo { padding: 0.2rem 0 0; margin-top: 1.7rem; }

.flow-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.9rem; margin-bottom: 1.1rem; font-size: 0.8rem; color: var(--muted); }
.flow-t b { color: var(--ink); font-variant-numeric: tabular-nums; }
.flow-stat b { color: var(--ink); font-variant-numeric: tabular-nums; }

.flow-split { display: grid; grid-template-columns: 330px 1fr; gap: 1.5rem; align-items: start; }
.flow-struct { position: relative; aspect-ratio: 620 / 538; }
.flow-struct img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity .34s ease;
}
.flow-struct img.on { opacity: 1; }


.flow-row { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.5rem; }
.flow-label { width: 3.4rem; flex: none; padding-top: 2px; font-size: 0.76rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; }
.flow-cells { display: flex; gap: 1px; flex-wrap: wrap; }

.flow-cells b {
  width: 14px; height: 17px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.6rem; font-weight: 500;
  border: 1px solid var(--rule-soft); background: #fff; color: transparent;
  transition: background .28s ease, border-color .28s ease;
}
.flow-cells b.set { background: #fff; border-color: #c6cfe8; color: var(--ink); }
.flow-cells b.new { background: var(--accent); border-color: var(--accent); color: #fff; }
.flow-cells b.re  { background: #f4e2d8; border-color: var(--copper); color: var(--copper); }

.flow-key { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 1.1rem;
  font-size: 0.75rem; color: var(--muted); }
.flow-key span { display: inline-flex; align-items: center; gap: 0.35em; }
.flow-key i { width: 10px; height: 10px; display: inline-block; border: 1px solid var(--rule-soft); }
.flow-key .k-mask { background: #fff; }
.flow-key .k-new { background: var(--accent); border-color: var(--accent); }
.flow-key .k-set { background: #fff; border-color: #c6cfe8; }
.flow-key .k-re { background: #f4e2d8; border-color: var(--copper); }
.flow-key .k-ion { background: var(--copper); border-color: var(--copper); border-radius: 50%; }

@media (max-width: 768px) {
  .flow-split { grid-template-columns: 1fr; gap: 1rem; }
  .flow-cells b { width: 12px; height: 15px; font-size: 0.54rem; }
  .flow-label { width: 2.9rem; font-size: 0.68rem; }
  .flow-head { font-size: 0.72rem; gap: 0.6rem; }
}
