:root {
  --text: #202124;
  --muted: #5f6368;
  --link: #2463b6;
  --accent: #3f7edb;
  --border: #dedede;
  --soft: #f6f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  color: var(--text);
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
}

.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 58px 24px 76px;
}

header {
  margin: 0 auto 54px;
  text-align: center;
}

h1,
h2 {
  line-height: 1.2;
}

h1 {
  max-width: 780px;
  margin: 0 auto 22px;
  font-size: clamp(2.15rem, 5vw, 3.45rem);
  font-weight: 720;
  letter-spacing: -0.055em;
}

h2 {
  margin: 56px 0 16px;
  font-size: 1.45rem;
  font-weight: 600;
  text-align: center;
}

p {
  margin: 0;
}

.venue {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 12px;
  border: 1px solid rgba(63, 126, 219, 0.18);
  border-radius: 999px;
  background: rgba(63, 126, 219, 0.045);
  color: #2d63ad;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

section p + figure,
section p + .danger-layout {
  margin-top: 22px;
}

.authors {
  max-width: 680px;
  margin: 0 auto 14px;
  color: #303134;
  font-size: 1.05rem;
  line-height: 1.7;
}

.affiliations {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.affiliations p + p {
  margin-top: 3px;
}

.affiliations sup {
  margin-right: 2px;
  color: #6f6f77;
}

.site-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  font-size: 1.05rem;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 16px;
  border: 1px solid rgba(36, 99, 182, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.links a:hover {
  border-color: rgba(36, 99, 182, 0.42);
  background: #ffffff;
  transform: translateY(-1px);
}

.links svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.example-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(320px, 1fr);
  gap: 40px;
  align-items: stretch;
  max-width: 820px;
  margin: 22px auto 0;
}

.video-block {
  display: flex;
  margin: 0;
}

.video-block video {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  background: #000000;
  object-fit: cover;
}

.video-caption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.abstract,
.section-description {
  max-width: 820px;
  margin: 0 auto;
  text-align: justify;
  text-align-last: left;
}

.ratings {
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.rating-control {
  display: grid;
  row-gap: 5px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--soft);
  text-align: center;
}

.rating-control span {
  font-size: 0.98rem;
}

.rating-control .rating-instruction {
  color: #777777;
  font-size: 0.86rem;
  line-height: 1.28;
}

.rating-control input {
  width: 100%;
  margin-top: 5px;
  appearance: none;
  height: 20px;
  background: transparent;
  cursor: pointer;
}

.rating-control input::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: #cfcfcf;
}

.rating-control input::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7.5px;
  border: 2px solid var(--link);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.rating-control input::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: #cfcfcf;
}

.rating-control input::-moz-range-progress {
  background: #cfcfcf;
}

.rating-control input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid var(--link);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.rating-control input:focus-visible {
  outline: none;
}

.rating-control input:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(26, 95, 180, 0.18);
}

.rating-control input:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(26, 95, 180, 0.18);
}

.media-block {
  margin: 0 auto;
}

.difficulty-video {
  margin-top: 32px;
}

.media-block video {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  background: #000000;
  -webkit-user-select: none;
  user-select: none;
}

.danger-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(400px, 1fr);
  gap: 40px;
  align-items: center;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.danger-graph {
  position: relative;
  min-height: 420px;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.danger-graph svg {
  display: block;
  width: 100%;
  height: 420px;
  -webkit-user-select: none;
  user-select: none;
}

.danger-graph:focus,
.danger-graph:focus-visible,
#danger-video:focus,
#danger-video:focus-visible {
  outline: none;
}

.danger-graph text {
  fill: var(--muted);
  font-size: 18px;
}

.danger-axis-label {
  fill: var(--text);
  font-size: 22px;
  font-weight: 600;
}

.danger-grid {
  stroke: #e4e4e4;
  stroke-width: 1;
}

.danger-line {
  fill: none;
  stroke: var(--link);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.danger-mean-line {
  stroke: #888888;
  stroke-dasharray: 5 5;
  stroke-width: 1.25;
  pointer-events: none;
}

.danger-mean-label {
  fill: #666666;
  font-size: 17px;
  font-weight: 600;
  pointer-events: none;
}

.danger-axis {
  stroke: #bbbbbb;
  stroke-width: 1;
}

.danger-marker {
  stroke: #222222;
  stroke-width: 1.25;
  pointer-events: none;
}

.danger-hover-line {
  stroke: #777777;
  stroke-dasharray: 3 4;
  stroke-width: 1;
  pointer-events: none;
}

.danger-hover-dot {
  fill: #ffffff;
  stroke: var(--link);
  stroke-width: 2;
  pointer-events: none;
}

.danger-hover-label {
  fill: var(--text);
  font-size: 16px;
  font-weight: 600;
  pointer-events: none;
}

.danger-hit-area {
  fill: transparent;
  pointer-events: all;
}

.graph-fallback {
  padding: 16px;
  color: var(--muted);
}

.result-panel {
  margin-top: 34px;
}

.result-text {
  max-width: 820px;
  margin: 0 auto 16px;
}

.result-figure {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.result-figure img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .page {
    padding-top: 28px;
  }

  body {
    font-size: 16px;
  }

  .example-layout {
    grid-template-columns: 1fr;
  }

  .danger-layout {
    grid-template-columns: 1fr;
  }

  .video-block {
    max-width: 360px;
    margin: 0 auto;
  }
}
