/* REVISE project page — custom styles layered on top of Bulma */

body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: #2c2c2c;
}

/* ---------- Hero / title ---------- */
.hero-body {
  padding-top: 3.5rem;
  padding-bottom: 2rem;
}

.publication-title {
  font-weight: 700;
  line-height: 1.15;
}

.revise-mark {
  color: #d24d3f;
  letter-spacing: 0.02em;
}

.venue-badge {
  display: inline-block;
  margin-top: 0.7rem;
  background: #2563a8;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.25rem 1.05rem;
}

.publication-authors {
  margin-top: 1.25rem;
  font-size: 1.15rem;
  line-height: 1.9;
}

.author-block {
  display: inline-block;
  margin: 0 0.35rem;
}

.author-block a {
  color: #2563a8;
}

.affiliation-row {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #555;
}

.sup {
  font-size: 0.7em;
  vertical-align: super;
  color: #d24d3f;
}

/* ---------- Link buttons ---------- */
.link-buttons {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #363636;
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.link-button:hover {
  background: #d24d3f;
  color: #fff;
  transform: translateY(-1px);
}

.link-button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

/* ---------- Reproducibility note ---------- */
.repro-note {
  max-width: 760px;
  margin: 1.9rem auto 0;
  text-align: left;
  background: #fdf6e7;
  border: 1px solid #e7cf93;
  border-left: 4px solid #d99a16;
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
}

.repro-note-title {
  font-weight: 800;
  color: #9a6a16;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.repro-note p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #5e4c24;
  margin: 0;
}

.repro-note a { color: #b5651d; font-weight: 700; }
.repro-note a:hover { text-decoration: underline; }

/* ---------- Sections ---------- */
.section-title {
  font-weight: 700;
  margin-bottom: 1.25rem !important;
}

.content-narrow {
  max-width: 880px;
  margin: 0 auto;
}

.abstract-text {
  font-size: 1.08rem;
  line-height: 1.7;
  text-align: justify;
}

.figure-block {
  margin: 1.5rem auto;
  text-align: center;
}

.figure-block img {
  border-radius: 6px;
  max-width: 100%;
  height: auto;
}

.figure-caption {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: #666;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* alternating section background */
.section-tint {
  background: #f7f8fa;
}

/* ---------- POHR table ---------- */
.pohr-table td:first-child {
  white-space: nowrap;
  font-weight: 700;
  color: #d24d3f;
}

.pohr-key {
  display: inline-block;
  width: 1.4rem;
  font-weight: 800;
}

/* ---------- Modes ---------- */
.mode-card {
  height: 100%;
  border-radius: 10px;
  border: 1px solid #e6e6e6;
  padding: 1.5rem;
  background: #fff;
}

.mode-card h4 {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.eager-list {
  margin-top: 0.5rem;
}

.eager-list li {
  margin-bottom: 0.4rem;
}

.eager-term {
  font-weight: 700;
  color: #2563a8;
}

/* ---------- Results table ---------- */
.results-table thead th {
  background: #363636;
  color: #fff !important;   /* beat Bulma's .table thead th color */
  border-color: #4a4a4a;
}

.results-table td, .results-table th {
  text-align: center;
  vertical-align: middle;
}

.results-table tr.highlight-row td {
  background: #fff5f3;
  font-weight: 600;
}

/* collapsible result tables */
.result-acc {
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  margin-bottom: 0.7rem;
  background: #fff;
}

.result-acc > summary {
  cursor: pointer;
  padding: 0.75rem 1.05rem;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.result-acc > summary::-webkit-details-marker { display: none; }
.result-acc > summary::before {
  content: "\25B8";
  color: #d24d3f;
  font-size: 0.85rem;
  align-self: center;
}
.result-acc[open] > summary::before { content: "\25BE"; }

.result-acc .ra-bench { font-size: 1rem; }
.result-acc .ra-tease { font-weight: 500; font-size: 0.85rem; color: #888; }
.result-acc .rac-body { padding: 0 1.05rem 1rem; overflow-x: auto; }
.result-acc .rac-body .table-cap { margin-top: 0.3rem; }

.delta-pill {
  display: inline-block;
  background: #d24d3f;
  color: #fff;
  border-radius: 6px;
  padding: 0.1rem 0.55rem;
  font-weight: 700;
}

/* ---------- Video embed ---------- */
.video-wrap {
  position: relative;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Interactive qualitative example ---------- */
.qual-card {
  max-width: 920px;
  margin: 1.5rem auto 0;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 1.6rem 1.8rem 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.qual-sub {
  color: #666;
  max-width: 720px;
  margin: 0.4rem auto 0;
}

.qual-question {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
}

.qual-q-label {
  flex: 0 0 auto;
  background: #2563a8;
  color: #fff;
  font-weight: 800;
  border-radius: 6px;
  padding: 0.05rem 0.6rem;
}

.qual-meta-chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #555;
  background: #eef1f5;
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.qual-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0 1.3rem;
}

.qual-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.qual-opt-key {
  font-weight: 800;
  color: #888;
}

.qual-opt.is-answer {
  border-color: #2e9e5b;
  background: #eafaf0;
  font-weight: 600;
}

.qual-opt.is-answer .qual-opt-key {
  color: #2e9e5b;
}

.qual-check {
  margin-left: auto;
  color: #2e9e5b;
  font-weight: 800;
}

/* controls */
.qual-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.qual-tab {
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #444;
  border-radius: 999px;
  padding: 0.4rem 1.05rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qual-tab:hover {
  border-color: #d24d3f;
  color: #d24d3f;
}

.qual-tab.is-active {
  background: #d24d3f;
  border-color: #d24d3f;
  color: #fff;
}

.qual-play {
  margin-left: auto;
  border: none;
  background: #363636;
  color: #fff;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.qual-play:hover,
.qual-play.is-playing {
  background: #d24d3f;
}

.qual-seen {
  font-size: 0.82rem;
  font-weight: 600;
  color: #777;
}

.qual-progress {
  height: 5px;
  background: #ececec;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.5rem 0 1.1rem;
}

.qual-progress-bar {
  height: 100%;
  width: 33%;
  background: linear-gradient(90deg, #d24d3f, #f08a4b);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.qual-note {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d24d3f;
  margin-bottom: 0.5rem;
}

/* frames */
.qual-frames {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.qual-frame {
  margin: 0;
  animation: qualFade 0.4s ease;
}

.qual-frame img {
  width: 100%;
  border-radius: 8px;
  display: block;
  border: 1px solid #e0e0e0;
}

.qual-frame figcaption {
  font-size: 0.74rem;
  color: #888;
  text-align: center;
  margin-top: 0.25rem;
}

@keyframes qualFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* POHR summary */
.qual-pohr {
  background: #f7f8fa;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
}

.pohr-row {
  display: grid;
  grid-template-columns: 1.7rem 9rem 1fr;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.32rem 0;
  border-bottom: 1px solid #ececec;
  font-size: 0.93rem;
}

.pohr-row:last-child { border-bottom: none; }

.pohr-badge {
  font-weight: 800;
  color: #fff;
  border-radius: 5px;
  text-align: center;
  font-size: 0.8rem;
  padding: 0.05rem 0;
}

.pohr-P { background: #6b7280; }
.pohr-O { background: #2563a8; }
.pohr-H { background: #7c4dbd; }
.pohr-U { background: #c98a16; }
.pohr-R { background: #d24d3f; }

.pohr-label {
  font-weight: 700;
  color: #555;
}

.pohr-val { color: #333; }

/* ---- example switcher ---- */
.qual-examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 1.3rem;
}

.qual-ex {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #ddd;
  background: #fff;
  color: #444;
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qual-ex:hover { border-color: #d24d3f; color: #d24d3f; }

.qual-ex.is-active {
  border-color: #d24d3f;
  background: #d24d3f;
  color: #fff;
  box-shadow: 0 4px 14px rgba(210, 77, 63, 0.25);
}

.qual-ex-tag {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 5px;
  padding: 0.1rem 0.4rem;
}

.qual-ex.is-active .qual-ex-tag { background: rgba(255, 255, 255, 0.25); }

/* ---- top: video + Q/A ---- */
.qual-top {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.qual-video-col { flex: 0 0 45%; max-width: 45%; }

.qual-video {
  width: 100%;
  border-radius: 10px;
  background: #000;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.qual-video-cap { font-size: 0.78rem; color: #999; text-align: center; margin-top: 0.35rem; }

.qual-qa-col { flex: 1 1 auto; min-width: 0; }

.qual-qa-col .qual-question { font-size: 1.08rem; }

.qual-qa-col .qual-meta-chip { display: block; width: fit-content; margin: 0.55rem 0 0.9rem; }

.tag-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #d24d3f;
  background: #fff5f3;
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
}

@media (max-width: 760px) {
  .qual-top { flex-direction: column; }
  .qual-video-col { max-width: 100%; flex-basis: auto; width: 100%; }
}

.qual-controls-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #888;
}

.qual-tabs { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; }

.qual-ex-rounds {
  font-size: 0.64rem;
  font-weight: 700;
  opacity: 0.7;
  margin-left: 0.15rem;
}

/* verbatim prompt/response blocks */
.raw-block {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f4f5f7;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin: 0.2rem 0 0.3rem;
  color: #333;
  overflow-x: auto;
}

.turn-agent .raw-block { background: #fbf3f1; border-color: #ecd9d4; }

.turn-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  margin: 0.8rem 0 0.4rem;
}

.qual-sys-wrap {
  margin: 0 0 1.1rem;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fafafa;
  padding: 0.5rem 0.8rem;
}

.qual-sys-wrap summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; color: #555; }
.qual-sys-note { font-weight: 400; color: #999; font-size: 0.82rem; }
.qual-sys-wrap .raw-block { margin-top: 0.7rem; max-height: 340px; overflow: auto; }

/* ---- structured prompt fields ---- */
.pfield { margin: 0 0 0.9rem; }

.pfield-h {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9a9a9a;
  margin-bottom: 0.35rem;
}

.pfield-sub { font-weight: 600; text-transform: none; letter-spacing: 0; color: #bbb; }

.pfield-q { font-size: 1.02rem; font-weight: 600; color: #2c2c2c; margin-bottom: 0.5rem; }

.opt-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.opt-chip {
  font-size: 0.84rem;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 7px;
  padding: 0.25rem 0.6rem;
  color: #444;
}

.opt-chip b { color: #999; margin-right: 0.2rem; }

.budget-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.4rem; }

.kv {
  font-size: 0.85rem;
  background: #eef1f5;
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  color: #444;
  font-family: "SFMono-Regular", Menlo, monospace;
}

.kv-k {
  font-weight: 800;
  color: #8a93a0;
  margin-right: 0.3rem;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.ranges {
  font-size: 0.82rem;
  color: #777;
  font-family: "SFMono-Regular", Menlo, monospace;
  word-break: break-word;
}

.placeholder-note {
  font-size: 0.9rem;
  color: #9a6a16;
  background: #fdf6e7;
  border: 1px dashed #e3c98b;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

.act-tag { font-family: "SFMono-Regular", Menlo, monospace; font-weight: 700; opacity: 0.8; margin-right: 0.3rem; }

.raw-toggle { margin-top: 0.7rem; }
.raw-toggle summary { cursor: pointer; font-size: 0.8rem; font-weight: 600; color: #9a9a9a; }
.raw-toggle summary:hover { color: #d24d3f; }
.raw-toggle .raw-block { margin-top: 0.5rem; }

/* answer-round <think> block */
.think-block {
  background: #eef4fb;
  border: 1px solid #d3e2f2;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #27405e;
  margin: 0.2rem 0 0.55rem;
}

.tag-lab {
  font-family: "SFMono-Regular", Menlo, monospace;
  font-weight: 700;
  color: #2563a8;
  opacity: 0.85;
  margin-right: 0.3rem;
}

.qual-credit {
  max-width: 820px;
  margin: 1.1rem auto 0;
  text-align: center;
  font-size: 0.84rem;
  color: #8a8a8a;
}

.qual-credit a { color: #2563a8; }

/* ---- conversation transcript ---- */
.qual-convo {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: 0.4rem;
}

.qual-round {
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 0.9rem 1rem 1.1rem;
  background: #fff;
  animation: qualFade 0.4s ease;
}

.qual-round.is-current {
  border-color: #f0b9b1;
  box-shadow: 0 4px 18px rgba(210, 77, 63, 0.1);
}

.round-label {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #d24d3f;
  background: #fff5f3;
  border-radius: 6px;
  padding: 0.18rem 0.6rem;
  margin-bottom: 0.7rem;
}

.turn {
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
}

.turn-arrow {
  text-align: center;
  color: #d0a59f;
  font-size: 1.2rem;
  line-height: 1;
  margin: 0.45rem 0;
}

.turn-user { background: #f5f6f8; }

.turn-agent {
  background: #fff;
  border: 1px solid #ead6d3;
}

.turn-head {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 0.55rem;
}

.turn-who {
  font-weight: 800;
  border-radius: 6px;
  padding: 0.08rem 0.5rem;
  margin-right: 0.4rem;
  color: #fff;
}

.who-prompt { background: #6b7280; }
.who-agent { background: #d24d3f; }

.turn-q {
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.4rem;
}

.turn-note {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.6rem;
}

.carried {
  margin-top: 0.7rem;
  border: 1px dashed #c9b3b0;
  border-radius: 9px;
  background: #fbf6f5;
  padding: 0.6rem 0.8rem;
}

.carried-head {
  font-size: 0.8rem;
  font-weight: 700;
  color: #a85248;
  margin-bottom: 0.4rem;
}

.pohr.is-compact .pohr-row {
  font-size: 0.85rem;
  padding: 0.18rem 0;
}

.raw-tag {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.86rem;
  color: #555;
  padding: 0.1rem 0;
}

.raw-tag.is-answer,
.raw-tag.is-request {
  margin-top: 0.5rem;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-weight: 700;
}

.raw-tag.is-answer { background: #eafaf0; color: #1f7a45; }
.raw-tag.is-request { background: #fff5f3; color: #b23a2e; }

.raw-gloss {
  font-family: "Noto Sans", sans-serif;
  font-weight: 500;
  color: inherit;
  opacity: 0.85;
  margin-left: 0.4rem;
}

.qual-convo .pohr { margin: 0.3rem 0; }

/* action line (legacy) */
.qual-action {
  margin-top: 1rem;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 1rem;
}

.qual-action.is-request {
  background: #fff5f3;
  color: #b23a2e;
}

.qual-action.is-answer {
  background: #eafaf0;
  color: #1f7a45;
}

.qual-correct {
  font-weight: 700;
  margin-left: 0.4rem;
}

@media (max-width: 560px) {
  .pohr-row { grid-template-columns: 1.5rem 1fr; }
  .pohr-label { display: none; }
}

/* ---------- BibTeX ---------- */
/* ---------- Results comparison tables ---------- */
.results-table td:first-child { text-align: left; font-weight: 600; }
.results-table a { color: #2563a8; }
.results-table a:hover { text-decoration: underline; }
.cap-no { color: #2e9e5b; font-weight: 700; }
.cap-yes { color: #999; }
.rac-subhead { font-weight: 700; font-size: 0.95rem; color: #444; margin: 1.3rem 0 0.55rem; }
.rac-body > .rac-subhead:first-child { margin-top: 0.2rem; }
.caption-table { min-width: 620px; }
.caption-table td, .caption-table th { white-space: nowrap; }

.results-sub {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 1.8rem 0 0.6rem;
  color: #2c2c2c;
}

.results-sub:first-of-type { margin-top: 0; }

.results-sub-note { font-weight: 500; font-size: 0.85rem; color: #999; }

.table-cap { font-size: 0.86rem; color: #777; margin: -0.05rem 0 0.5rem; }

.bibtex-wrap {
  position: relative;
}

pre.bibtex {
  background: #2b2b2b;
  color: #f1f1f1;
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  font-size: 0.9rem;
  overflow-x: auto;
}

.bibtex-copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #d6d6d6;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s ease;
}

.bibtex-copy svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

.bibtex-copy .ic-check { display: none; }

.bibtex-copy:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.bibtex-copy.is-copied {
  color: #6ee7a0;
  border-color: rgba(110, 231, 160, 0.4);
  background: rgba(110, 231, 160, 0.12);
}

.bibtex-copy.is-copied .ic-copy { display: none; }
.bibtex-copy.is-copied .ic-check { display: inline; }

/* keep code clear of the button on narrow blocks */
pre.bibtex { padding-top: 2.4rem; }

/* ---------- Footer ---------- */
.footer {
  background: #fff;
  border-top: 1px solid #ececec;
  font-size: 0.9rem;
  color: #777;
}

.footer a {
  color: #2563a8;
}
