:root {
  --board: #103A1A;
  --rail: #3F6E48;
  --rail-lit: #C7E26E;
  --paper: #F4F1EA;
  --ink: #14110D;
  --ink-2: #4A4439;
  --line: #D8D2C4;
  --forest: #1B5E20;
  --page: 1120px;
  --gutter: 24px;
  /* Левый край содержимого на широком экране. */
  --edge: max(var(--gutter), calc((100vw - var(--page)) / 2));
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.55 'Onest', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
}

.board button:focus-visible { outline-color: var(--rail-lit); }

.top,
.intro,
.content,
.bottom {
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
}

.top img { display: block; width: 190px; height: auto; }

.login { font-weight: 500; text-underline-offset: 4px; }

.intro { padding-top: 56px; padding-bottom: 32px; }

h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.intro p { margin: 16px 0 0; color: var(--ink-2); font-size: 20px; }

/* Табло: пути уходят за левый край окна, кнопки стоят в конце веток. */
.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  height: 208px;
  padding-right: var(--edge);
  background: var(--board);
}

.tracks { display: block; width: 100%; height: 100%; }

.rail {
  fill: none;
  stroke: var(--rail);
  stroke-width: 7;
  stroke-dasharray: 64 7;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.25s ease;
}

.rail-main,
.board[data-active='customers'] .rail-customers,
.board[data-active='specialists'] .rail-specialists {
  stroke: var(--rail-lit);
}

.routes { display: grid; grid-template-rows: 1fr 1fr; }

.routes button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0 0 0 16px;
  border: 0;
  background: none;
  color: #BFD0BB;
  font: 600 24px/1.2 'Onest', system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}

.routes button:hover { color: #fff; }
.routes button[aria-pressed='true'] { color: #fff; }

.lamp {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--board);
  box-shadow: inset 0 0 0 2px var(--rail);
  transition: background 0.25s ease;
}

[aria-pressed='true'] .lamp {
  background: var(--rail-lit);
  box-shadow: inset 0 0 0 2px var(--rail-lit);
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 64px;
}

[data-panel] h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; }

.items { margin: 0; padding: 0; list-style: none; }

.items li { border-bottom: 1px solid var(--line); }

.items a { display: block; padding: 16px 0; text-decoration: none; }

.items strong { display: block; font-size: 20px; font-weight: 600; line-height: 1.3; }

.items span { display: block; margin-top: 2px; color: var(--ink-2); font-size: 16px; }

.items a:hover strong {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.film { margin: 0; }

.film video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--board);
  border-radius: 8px;
}

.film figcaption { margin-top: 14px; }

.film strong { display: block; font-size: 20px; font-weight: 600; line-height: 1.3; }

.film span { display: block; margin-top: 2px; color: var(--ink-2); font-size: 16px; }

.bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 16px;
}

@media (max-width: 860px) {
  .content { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .intro { padding-top: 40px; padding-bottom: 24px; }
  .intro p { font-size: 18px; }
  .board { height: 160px; }
  .routes button { font-size: 19px; gap: 10px; padding-left: 10px; }
  .top img { width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .rail,
  .lamp { transition: none; }
}
