:root {
  color-scheme: light;
  background: #eef1ed;
  color: #17211d;
  font-family: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #eef1ed;
}

.paper {
  width: min(920px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.paper-header {
  padding: 0 0 34px;
  border-bottom: 1px solid #c8d1cb;
}

.kicker {
  margin: 0 0 12px;
  color: #66746d;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.98;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
}

p {
  max-width: 760px;
  font-size: 1.08rem;
  line-height: 1.72;
}

.abstract {
  max-width: 780px;
  margin-bottom: 0;
  color: #31423a;
  font-size: 1.2rem;
  line-height: 1.65;
}

.paper-section {
  padding: 42px 0 16px;
}

.math {
  font-style: italic;
  white-space: nowrap;
}

.note {
  margin: -8px 0 0;
  padding-left: 18px;
  border-left: 3px solid #0f766e;
  color: #3f5048;
  font-size: 0.98rem;
}

.conclusion {
  border-top: 1px solid #c8d1cb;
  margin-top: 26px;
}

calculus-figure {
  display: block;
  margin: 28px 0;
  color: #17211d;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.calculus-widget {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  margin: 0;
  border: 1px solid #cfd8d2;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.calculus-widget .plot {
  min-height: 360px;
  padding: 14px;
  border-right: 1px solid #dce3de;
}

.calculus-widget canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 332px;
  border: 1px solid #dce3de;
  border-radius: 4px;
  background: #fbfcf8;
}

.calculus-widget .side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  background: #f8faf7;
}

.calculus-widget .label {
  margin: 0 0 5px;
  color: #68746e;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.calculus-widget .title,
.calculus-widget .value {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.calculus-widget .title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.calculus-widget .value {
  color: #0f766e;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.calculus-widget .caption {
  margin: 0;
  color: #34423b;
  font-size: 0.95rem;
  line-height: 1.5;
}

.calculus-widget .controls {
  display: grid;
  gap: 14px;
  margin-top: auto;
}

.calculus-widget label {
  display: grid;
  gap: 7px;
  color: #52605a;
  font-size: 0.82rem;
  font-weight: 700;
}

.calculus-widget input[type="range"] {
  width: 100%;
  accent-color: #0f766e;
}

@media (max-width: 760px) {
  .paper {
    width: min(100% - 24px, 920px);
    padding-top: 32px;
  }

  .calculus-widget {
    grid-template-columns: 1fr;
  }

  .calculus-widget .plot {
    border-right: 0;
    border-bottom: 1px solid #dce3de;
  }
}
