/* Continuous Reasoning — minimalist project page (Apple-inspired restraint). */

/* Self-hosted Inter (OFL) */
@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/inter-700.woff2') format('woff2'); }

:root {
  --ink:    #1d1d1f;   /* primary text */
  --ink-2:  #6e6e73;   /* secondary text */
  --line:   #d2d2d7;   /* hairline */
  --bg:     #ffffff;
  --bg-2:   #f5f5f7;   /* neutral light section */
  --dark:   #1d1d1f;   /* dark sections (flat) */
  --accent: #ff874f;   /* used sparingly */
  --accent-ink: #d9531a;
}

* {
  box-sizing: border-box;
  min-width: 0;
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html, body { max-width: 100%; overflow-x: hidden; }
body {
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container.is-max-desktop {
  width: min(100% - 2rem, 960px);
  max-width: 960px !important;
}

/* ---------- Rhythm ---------- */
section.section {
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  padding-bottom: clamp(3.5rem, 8vw, 6.5rem);
}
section.section.section-alt { background: var(--bg-2); }

.section .title {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin-bottom: 1.25rem;
}

/* ---------- Hero (flat dark) ---------- */
.hero-dark { background: var(--dark); color: #f5f5f7; }
.hero-dark .hero-body { padding-top: clamp(4rem, 10vw, 7rem); padding-bottom: clamp(4rem, 10vw, 7rem); }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr clamp(210px, 30%, 300px);
  gap: 2.5rem; align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
}

.hero-inner { text-align: left; }

.hero-media { display: flex; flex-direction: column; align-items: center; }
.hero-media-cap {
  margin-top: 0.9rem; font-size: 0.85rem; color: #a1a1a6;
  text-align: center; line-height: 1.6; text-wrap: balance;
}
.hero-media-cap .cap-lead { display: block; margin-bottom: 0.15rem; }
.hero-media-cap .cap-seq { display: block; white-space: normal; }
.hero-media-cap b { font-weight: 600; }
.hero-media-cap .t-green  { color: #6ec98a; }
.hero-media-cap .t-blue   { color: #6aa9e0; }
.hero-media-cap .t-yellow { color: #e3b84a; }
.hero-media video {
  height: clamp(360px, 58vh, 580px); width: auto; max-width: 100%;
  display: block; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
@media (max-width: 860px) {
  .hero-media video { height: auto; width: 72%; max-height: 70vh; }
}
@media (max-width: 540px) {
  .hero-media video { width: 100%; }
}

.hero-kicker {
  font-size: 0.8rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: #86868b; margin-bottom: 1.5rem;
}

.publication-title {
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 2.7rem) !important;
  line-height: 1.1; letter-spacing: -0.03em;
  margin-bottom: 1.75rem !important;
}
.publication-title .title-method   { color: var(--accent); }
.publication-title .title-connector{ font-weight: 400; color: #86868b; }
.publication-title .title-domain   { color: #f5f5f7; }
.mobile-title-break { display: none; }

.hero-tagline {
  max-width: 660px; margin: 0 0 2.25rem;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 400; line-height: 1.5; color: #c7c7cc;
}
.hero-tagline .hl { color: #f5f5f7; font-weight: 600; }

.hero-authors { font-size: 1.02rem; color: #c7c7cc; margin-bottom: 2rem; }
.hero-authors a { color: #f5f5f7 !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #6e6e73; }
.hero-authors a:hover { text-decoration-color: #f5f5f7; }
.hero-authors .hero-affil { display: block; margin-top: 0.45rem; font-size: 0.85rem; color: #86868b; }

/* ---------- Buttons ---------- */
.publication-links { margin-top: 0; display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 0.6rem; }
.link-block a { margin: 4px 0; }

.hero-btn {
  background: #f5f5f7; color: #1d1d1f; border: none; font-weight: 500;
  transition: background 0.15s ease;
}
.hero-btn:hover { background: #fff; color: #1d1d1f; }
.hero-btn-ghost { background: transparent; color: #c7c7cc; border: 1px solid #48484a; }
.hero-btn-ghost:hover { background: rgba(255,255,255,0.06); color: #f5f5f7; border-color: #6e6e73; }
.hero-btn-disabled,
.hero-btn-disabled:hover {
  background: rgba(245,245,247,0.16);
  color: #c7c7cc;
  cursor: default;
}

/* ---------- Teaser ---------- */
.teaser .hero-body { padding-top: 0; padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.teaser video, .teaser img { width: 100%; display: block; border-radius: 12px; }
.teaser .subtitle { color: var(--ink-2); font-size: 1rem; line-height: 1.6; max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------- Lead statement (was .callout.big) ---------- */
.callout.big {
  max-width: 820px; margin: 0 auto; padding: 0;
  border: none; background: none; border-radius: 0;
  text-align: center;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.2;
  color: var(--ink);
}
.callout.big em { font-style: normal; color: var(--accent); }

/* inline callout → clean statement, no box */
.callout {
  border: none; background: none; padding: 0;
  margin: 1.75rem auto; max-width: 760px;
  font-size: 1.15rem; line-height: 1.55; color: var(--ink);
}
.callout strong { color: var(--ink); font-weight: 600; }

/* ---------- Motivation rows ---------- */
.motiv { max-width: 760px; margin: 2.5rem auto 0; }
.motiv-row {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1.5rem;
  padding: 1.5rem 0; border-top: 1px solid var(--line);
}
.motiv-row:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .motiv-row { grid-template-columns: 1fr; gap: 0.5rem; } }
.motiv-step {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent-ink); padding-top: 0.2rem;
}
.motiv-row p { margin: 0; font-size: 1.05rem; line-height: 1.6; color: var(--ink-2); }
.motiv-row p strong { color: var(--ink); font-weight: 600; }
.motiv-row p em { font-style: normal; color: var(--ink); font-weight: 500; }

/* ---------- Section intro ---------- */
.section-intro {
  max-width: 700px; margin: 0 auto 2.25rem;
  font-size: 1.1rem; line-height: 1.6; color: var(--ink-2);
  text-align: center;
}
.section-intro.left { text-align: left; }

/* ---------- Three properties (borderless columns) ---------- */
.idea-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin: 2rem 0 0; }
@media (max-width: 820px) { .idea-cards { grid-template-columns: 1fr; gap: 2rem; } }

.idea-card { padding: 1.5rem 0 0; background: none; border: none; border-top: 1px solid var(--line); }
.idea-card .idea-label {
  font-size: 0.8rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-2); margin-bottom: 0.6rem;
}
.idea-card h3 { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.6rem; color: var(--ink); }
.idea-card p { font-size: 1rem; line-height: 1.6; color: var(--ink-2); margin: 0; }
.idea-card .maps-to {
  margin-top: 1rem; padding-top: 0; border: none;
  font-size: 0.95rem; color: var(--ink);
}
.idea-card .maps-to strong { color: var(--accent-ink); font-weight: 600; }

/* ---------- Figures ---------- */
.figure-block { margin: 2rem auto; max-width: 100%; }
.figure-block.narrow { max-width: 720px; }
.figure-block img, .figure-block video { width: 100%; display: block; border-radius: 12px; }
.figure-caption { font-size: 0.92rem; color: var(--ink-2); margin-top: 0.9rem; line-height: 1.55; max-width: 760px; margin-left: auto; margin-right: auto; text-align: center; }
.figure-caption strong { color: var(--ink); font-weight: 600; }

/* ---------- Result headline numbers (was gradient banner) ---------- */
.tldr-banner { background: none; color: inherit; padding: 0; margin: 0 auto 2.5rem; max-width: 820px; text-align: center; }
.tldr-stat {
  font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5em 2.5em;
  margin-bottom: 1rem;
}
.tldr-stat .gain { color: var(--accent); }
.tldr-stat .unit { display: block; font-size: 0.26em; font-weight: 500; letter-spacing: 0; color: var(--ink-2); margin-top: 0.6em; }
.tldr-caption { font-size: 1rem; color: var(--ink-2); max-width: 620px; margin: 0 auto; line-height: 1.55; }

/* ---------- Collapsible numbers table ---------- */
.num-details { max-width: 560px; margin: 0 auto 0.5rem; }
.num-details > summary {
  cursor: pointer; list-style: none; display: block; text-align: center;
  font-size: 0.92rem; font-weight: 500; color: var(--accent-ink);
  padding: 0.5rem 0;
}
.num-details > summary::-webkit-details-marker { display: none; }
.num-details > summary::after {
  content: " ›"; display: inline-block; margin-left: 0.35em;
  transition: transform 0.2s ease; transform: rotate(90deg);
}
.num-details[open] > summary::after { transform: rotate(-90deg); }

.num-details { max-width: 820px; }
.num-table-scroll { overflow-x: auto; margin: 0.75rem 0 0; }
.num-table {
  border-collapse: collapse; margin: 0 auto;
  font-size: 0.92rem; min-width: 600px; width: 100%;
}
.num-table th, .num-table td {
  padding: 0.5rem 0.55rem; text-align: center; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.num-table thead th { color: var(--ink-2); font-weight: 500; font-size: 0.8rem; }
.num-table thead .grp-h {
  color: var(--ink); font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}
.num-table .lcol { text-align: left; color: var(--ink); font-weight: 500; }
.num-table .sd { color: var(--ink-2); font-size: 0.72em; margin-left: 0.15em; }
.num-table .cr-row { background: rgba(255,135,79,0.07); }
.num-table .cr-row td { color: var(--ink); font-weight: 600; }
.num-table .cr-row .lcol { color: var(--accent-ink); }
.num-table .cr-row .sd { color: var(--accent-ink); opacity: 0.7; font-weight: 400; }
.num-foot { text-align: center; font-size: 0.82rem; color: var(--ink-2); margin-top: 0.75rem; }

/* ---------- Stat row (borderless) ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 2rem 0; }
@media (max-width: 640px) { .stat-row { grid-template-columns: 1fr; } }
.stat-cell { text-align: center; padding: 0.5rem 1rem; background: none; border: none; border-left: 1px solid var(--line); }
.stat-cell:first-child { border-left: none; }
@media (max-width: 640px) { .stat-cell { border-left: none; border-top: 1px solid var(--line); padding: 1.25rem 0; } .stat-cell:first-child { border-top: none; } }
.stat-cell .stat-num { font-weight: 700; font-size: 2.2rem; letter-spacing: -0.02em; color: var(--ink); line-height: 1; }
.stat-cell .stat-num .baseline { color: var(--ink-2); font-weight: 400; font-size: 1.3rem; }
.stat-cell .stat-label { margin-top: 0.6rem; font-size: 0.9rem; color: var(--ink-2); line-height: 1.4; }

/* ---------- How it works ---------- */
.method-lead {
  max-width: 660px; margin: 1.5rem auto 0;
  padding-left: 1.5rem; border-left: 3px solid var(--accent);
  text-align: left;
}
.method-lead-k {
  display: block; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent-ink); margin-bottom: 0.9rem;
}
.method-lead p {
  margin: 0; font-size: clamp(1.4rem, 3vw, 2.05rem);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; color: var(--ink);
}
.method-lead .setup { color: var(--ink-2); font-weight: 400; }
.method-lead em { font-style: normal; color: var(--accent-ink); }

.method-figure {
  margin: 2.25rem auto 0; max-width: 940px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 1.75rem 1.75rem 1.25rem; box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}
.method-figure img { width: 100%; display: block; }
.method-figure figcaption {
  margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--line);
  font-size: 0.9rem; line-height: 1.5; color: var(--ink-2); text-align: center;
}
.method-figure figcaption em { font-style: normal; color: var(--ink); font-weight: 500; }

.method-grid {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem;
  max-width: 880px; margin: 2.75rem auto 0;
}
@media (max-width: 760px) { .method-grid { grid-template-columns: 1fr; gap: 2rem; } }

.method-kicker {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent-ink); margin-bottom: 0.9rem;
}
.method-col > p {
  margin: 0; font-size: 1.05rem; line-height: 1.65; color: var(--ink-2);
}
.method-col > p strong { color: var(--ink); font-weight: 600; }
.method-col > p em { font-style: normal; color: var(--ink); font-weight: 500; }

.specs { margin: 0; }
.specs .spec {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line);
}
.specs .spec:first-child { border-top: 1px solid var(--line); }
.specs dt {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-2); flex-shrink: 0;
}
.specs dd { margin: 0; font-size: 0.95rem; font-weight: 500; color: var(--ink); text-align: right; }
.specs .dim { color: #a1a1a6; font-weight: 400; }

/* ---------- Ablation bar chart ---------- */
.bars {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem;
  max-width: 880px; margin: 2.5rem auto 0;
}
@media (max-width: 760px) { .bars { grid-template-columns: 1fr; gap: 2rem; } }

.bar-panel-head {
  font-size: 0.85rem; font-weight: 600; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding-bottom: 0.75rem; margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.bar-row {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; column-gap: 0.75rem; row-gap: 0.3rem;
  margin-bottom: 0.9rem;
}
.bar-label { grid-column: 1 / -1; font-size: 0.85rem; color: var(--ink-2); }
.bar-row.cr .bar-label { color: var(--accent-ink); font-weight: 600; }

.bar-track { display: flex; align-items: center; }
.bar-fill { height: 12px; border-radius: 6px; background: #c7c7cc; transition: width 0.6s ease; }
.bar-row.cr .bar-fill { background: var(--accent); }

.bar-val { font-size: 0.9rem; font-weight: 600; color: var(--ink-2); min-width: 2.6em; text-align: right; }
.bar-row.cr .bar-val { color: var(--accent-ink); }

/* ---------- Robot platform sub-blocks ---------- */
.platform-head {
  text-align: center; font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem); letter-spacing: -0.01em;
  color: var(--ink); margin: 2.5rem 0 0.6rem;
}
.platform-note {
  text-align: center; max-width: 680px; margin: 0 auto 1.5rem;
  font-size: 1rem; line-height: 1.6; color: var(--ink-2);
}
.platform-note strong { color: var(--ink); font-weight: 600; }

/* ---------- Task grid ---------- */
.task-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin: 1.25rem 0; }
@media (max-width: 640px) { .task-grid { grid-template-columns: repeat(2, 1fr); } }
.task-grid figure { margin: 0; }
.task-grid img { width: 100%; display: block; border-radius: 8px; border: none; }
.task-grid figcaption { text-align: center; font-size: 0.85rem; color: var(--ink-2); margin-top: 0.45rem; }

/* ---------- Autonomous rollouts showcase (flat dark) ---------- */
.rollout-showcase { background: var(--dark); color: #f5f5f7; }
.rollout-kicker { text-align: center; font-size: 0.8rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.18em; color: #86868b; margin-bottom: 1rem; }
.rollout-title {
  text-align: center; font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.15;
  color: #f5f5f7; max-width: 760px; margin: 0 auto 1.75rem;
}
.rollout-title .hl { color: var(--accent); }

.order-chips { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.9rem; margin: 0 auto 1.75rem; }
.order-chips .chip { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; font-weight: 500; color: #d6d6da; }
.order-chips .chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.chip-green::before  { background: #4caf72; }
.chip-blue::before   { background: #4a8fd6; }
.chip-yellow::before { background: #e3b84a; }
.order-chips .chip-arrow { color: #6e6e73; }

.rollout-intro { text-align: center; max-width: 700px; margin: 0 auto 2.5rem; font-size: 1.05rem; line-height: 1.6; color: #a1a1a6; }
.rollout-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0 auto; }
.rollout-grid video { width: 100%; display: block; border-radius: 12px; background: #000; }
@media (max-width: 720px) { .rollout-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; } }
.rollout-foot { text-align: center; margin-top: 1.75rem; font-size: 0.85rem; color: #86868b; }

/* ---------- BibTeX ---------- */
#BibTeX .title { color: var(--ink); }
#BibTeX pre {
  font-size: 0.9rem; background: var(--bg-2); border: none;
  border-radius: 12px; padding: 1.5rem; overflow-x: auto; color: var(--ink);
}

/* ---------- Footer ---------- */
footer.footer { padding-top: 2.5rem; padding-bottom: 2.5rem; background: var(--bg-2); }
footer.footer .content p { color: var(--ink-2); }

@media (max-width: 640px) {
  .container.is-max-desktop { width: min(100% - 1.5rem, 100%); }

  section.section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero-dark .hero-body {
    padding-top: 3rem;
    padding-bottom: 3.25rem;
  }

  .hero-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    margin-bottom: 1rem;
  }

  .publication-title {
    font-size: clamp(1.55rem, 8vw, 2rem) !important;
    line-height: 1.08;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
  }

  .publication-title .title-domain {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .mobile-title-break {
    display: block;
  }

  .hero-tagline {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.45;
    overflow-wrap: break-word;
  }

  .hero-authors {
    font-size: 0.9rem;
    overflow-wrap: break-word;
  }

  .publication-links {
    gap: 0.45rem;
  }

  .hero-btn {
    font-size: 0.86rem;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .hero-media video {
    width: min(100%, 300px);
    max-height: 62vh;
  }

  .hero-media-cap {
    font-size: 0.72rem;
  }

  .teaser .hero-body {
    padding-bottom: 2rem;
  }

  .callout.big {
    font-size: clamp(1.45rem, 7vw, 1.95rem);
    line-height: 1.15;
    overflow-wrap: break-word;
  }

  .section .title {
    font-size: clamp(1.45rem, 7vw, 1.85rem);
    line-height: 1.15;
    overflow-wrap: break-word;
  }

  .section-intro,
  .figure-caption,
  .platform-note,
  .rollout-intro {
    font-size: 0.95rem;
    text-align: left;
  }

  .figure-caption {
    text-align: center;
  }

  .idea-card .maps-to {
    font-size: 0.9rem;
  }

  .tldr-stat {
    font-size: clamp(2.4rem, 13vw, 3.2rem);
    gap: 0.6em;
  }

  .stat-cell .stat-num {
    font-size: 1.9rem;
  }

  .method-lead {
    padding-left: 1rem;
    margin-top: 1.25rem;
  }

  .method-lead p {
    font-size: 1.15rem;
    line-height: 1.38;
    letter-spacing: 0;
  }

  .method-figure {
    padding: 0.75rem;
    border-radius: 12px;
  }

  .method-figure figcaption {
    font-size: 0.78rem;
    text-align: left;
  }

  .specs .spec {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .specs dd {
    text-align: left;
  }

  .content.has-text-justified {
    text-align: left !important;
  }
}
