/* Alert Routes help page: sections + illustrative mockups (Telegram chat, dashboard card). */
:root {
  --rrt-gold: #d7a441;
  --rrt-blue: #2f8cff;
  --rrt-text: rgba(244, 247, 255, 0.82);
  --rrt-muted: rgba(244, 247, 255, 0.58);
  --rrt-line: rgba(167, 189, 255, 0.16);
  --rrt-card: rgba(255, 255, 255, 0.06);
  --rrt-tg-bg: #0e1621;
  --rrt-tg-side: #17212b;
  --rrt-tg-me: #2b5278;
  --rrt-tg-bot: #182533;
}

.rrt-back {
  color: rgba(244, 247, 255, 0.84);
  text-decoration: none;
}

.rrt-back:hover {
  border-color: rgba(47, 140, 255, 0.78);
}

.rrt-panel {
  padding: clamp(16px, 3vw, 32px);
}

.rrt-section + .rrt-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--rrt-line);
}

.rrt-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: #ffffff;
  font-family: "Dela Gothic One", Impact, sans-serif;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
}

.rrt-sub {
  margin: 34px 0 12px;
  color: var(--rrt-gold);
  font-size: 18px;
}

.rrt-lead,
.rrt-text p,
.rrt-steps li,
.rrt-note,
.rrt-faq p {
  color: var(--rrt-text);
  font-size: 16px;
  line-height: 1.6;
}

.rrt-lead {
  max-width: 820px;
  margin: 0 0 22px;
}

.rrt-lead strong,
.rrt-steps b,
.rrt-note b {
  color: #ffffff;
}

.rrt-muted {
  color: var(--rrt-muted);
  font-size: 14px;
}

.rrt-section code,
.rrt-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: #ffe2a3;
  background: rgba(215, 164, 65, 0.12);
  border: 1px solid rgba(215, 164, 65, 0.24);
  border-radius: 6px;
  padding: 1px 6px;
  overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.rrt-code {
  display: block;
  margin: 10px 0 14px;
  padding: 12px 14px;
  font-size: 15px;
  white-space: pre-wrap;
}

.rrt-tag {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: #0b0f1c;
  font-size: 18px;
  background: var(--rrt-gold);
  border-radius: 10px;
}

/* Figures */
.rrt-figure {
  margin: 0;
  min-width: 0;
}

.rrt-figure figcaption {
  margin-top: 10px;
  color: var(--rrt-muted);
  font-size: 13px;
  text-align: center;
}

.rrt-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: start;
}

/* Flow diagram */
.rrt-flow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
  background: var(--rrt-card);
  border: 1px solid var(--rrt-line);
  border-radius: 12px;
}

.rrt-flow-src {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 18px 16px;
  background: rgba(215, 164, 65, 0.12);
  border: 1px solid rgba(215, 164, 65, 0.4);
  border-radius: 12px;
}

.rrt-flow-token {
  color: var(--rrt-gold);
  font-family: "Dela Gothic One", Impact, sans-serif;
  font-size: 22px;
}

.rrt-flow-src small {
  color: var(--rrt-muted);
}

.rrt-flow-lines {
  display: grid;
  gap: 10px;
}

.rrt-flow-row {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(24px, 1fr) minmax(130px, auto);
  align-items: center;
  gap: 10px;
}

.rrt-flow-row i {
  height: 2px;
  background: linear-gradient(90deg, rgba(167, 189, 255, 0.2), rgba(167, 189, 255, 0.7));
  position: relative;
}

.rrt-flow-row i::after {
  position: absolute;
  right: -2px;
  top: -5px;
  content: "";
  border: 6px solid transparent;
  border-left-color: rgba(167, 189, 255, 0.7);
}

.rrt-flow-row.is-route i {
  background: linear-gradient(90deg, rgba(47, 140, 255, 0.3), var(--rrt-blue));
}

.rrt-flow-row.is-route i::after {
  border-left-color: var(--rrt-blue);
}

.rrt-flow-row.is-fallback i {
  background: repeating-linear-gradient(90deg, rgba(167, 189, 255, 0.5) 0 6px, transparent 6px 11px);
}

.rrt-chip,
.rrt-dest {
  padding: 8px 12px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--rrt-line);
  border-radius: 8px;
}

.rrt-flow-row.is-route .rrt-dest {
  background: rgba(47, 140, 255, 0.18);
  border-color: rgba(47, 140, 255, 0.6);
}

.rrt-dest small {
  color: var(--rrt-muted);
  font-weight: 500;
}

.rrt-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.rrt-kinds span {
  padding: 6px 12px;
  color: var(--rrt-text);
  font-size: 14px;
  background: var(--rrt-card);
  border: 1px solid var(--rrt-line);
  border-radius: 999px;
}

.rrt-kinds b {
  margin-right: 4px;
  color: #ffe2a3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Two ways */
.rrt-ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rrt-way {
  display: grid;
  gap: 6px;
  padding: 18px;
  color: var(--rrt-text);
  text-decoration: none;
  background: var(--rrt-card);
  border: 1px solid var(--rrt-line);
  border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
}

.rrt-way:hover,
.rrt-way:focus-visible {
  background: rgba(47, 140, 255, 0.12);
  border-color: rgba(47, 140, 255, 0.7);
  outline: none;
}

.rrt-way strong {
  color: #ffffff;
  font-size: 18px;
}

.rrt-way-num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #0b0f1c;
  font-weight: 900;
  background: var(--rrt-gold);
  border-radius: 8px;
}

/* Steps */
.rrt-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rrt-step;
}

.rrt-steps li {
  position: relative;
  padding: 14px 16px 14px 56px;
  background: var(--rrt-card);
  border: 1px solid var(--rrt-line);
  border-radius: 10px;
  counter-increment: rrt-step;
}

.rrt-steps li::before {
  position: absolute;
  left: 14px;
  top: 13px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  font-weight: 900;
  content: counter(rrt-step);
  background: var(--rrt-blue);
  border-radius: 50%;
}

.rrt-note {
  margin-top: 22px;
  padding: 16px 18px;
  background: rgba(215, 164, 65, 0.08);
  border: 1px solid rgba(215, 164, 65, 0.34);
  border-radius: 10px;
}

/* Mockups */
.rrt-mock {
  overflow: hidden;
  font-family: "Golos Text", system-ui, sans-serif;
  border: 1px solid rgba(167, 189, 255, 0.24);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* Dashboard card mockup */
.rrt-card-mock {
  padding: 18px;
  background: #11131f;
}

.rrt-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 17px;
}

.rrt-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(34, 197, 94, 0.22);
  border: 1px solid rgba(34, 197, 94, 0.7);
  border-radius: 999px;
}

.rrt-switch i {
  width: 18px;
  height: 18px;
  background: #22c55e;
  border-radius: 50%;
}

.rrt-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  align-items: start;
  gap: 12px;
}

.rrt-field {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rrt-field label {
  color: var(--rrt-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rrt-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  overflow: hidden;
  color: #ffffff;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(167, 189, 255, 0.24);
  border-radius: 8px;
}

.rrt-select.is-open {
  border-color: var(--rrt-blue);
  box-shadow: 0 0 0 3px rgba(47, 140, 255, 0.25);
}

.rrt-dropdown {
  padding: 6px;
  background: #1a1d2c;
  border: 1px solid rgba(167, 189, 255, 0.3);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

.rrt-opt {
  padding: 7px 10px;
  color: rgba(244, 247, 255, 0.86);
  font-size: 14px;
  border-radius: 6px;
}

.rrt-opt.is-selected {
  color: #ffffff;
  font-weight: 800;
  background: var(--rrt-blue);
}

.rrt-opt-muted {
  color: var(--rrt-muted);
  font-style: italic;
}

.rrt-optgroup {
  padding: 8px 10px 3px;
  color: var(--rrt-gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Telegram mockup */
.rrt-tg {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-height: 300px;
  background: var(--rrt-tg-bg);
}

.rrt-tg-single {
  grid-template-columns: minmax(0, 1fr);
}

.rrt-tg-topics {
  padding: 10px 8px;
  background: var(--rrt-tg-side);
  border-right: 1px solid rgba(0, 0, 0, 0.4);
}

.rrt-tg-group {
  padding: 6px 8px 12px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.rrt-tg-topic {
  padding: 8px 10px;
  color: rgba(244, 247, 255, 0.78);
  font-size: 14px;
  border-radius: 8px;
}

.rrt-tg-topic.is-active {
  color: #ffffff;
  background: var(--rrt-tg-me);
}

.rrt-tg-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rrt-tg-title {
  padding: 12px 16px;
  color: #ffffff;
  font-weight: 800;
  background: var(--rrt-tg-side);
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}

.rrt-tg-msgs {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.rrt-bubble {
  max-width: 88%;
  padding: 9px 12px;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.45;
  border-radius: 12px;
}

.rrt-bubble.is-me {
  align-self: flex-end;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--rrt-tg-me);
  border-bottom-right-radius: 4px;
}

.rrt-bubble.is-bot {
  align-self: flex-start;
  background: var(--rrt-tg-bot);
  border-bottom-left-radius: 4px;
}

.rrt-bubble small {
  display: block;
  margin-top: 6px;
  color: rgba(244, 247, 255, 0.6);
}

.rrt-bubble code {
  font-size: 0.85em;
}

.rrt-bot-name {
  display: block;
  margin-bottom: 2px;
  color: #6fb5ff;
  font-size: 13px;
}

.rrt-tg-buttons {
  display: grid;
  gap: 6px;
  max-width: 88%;
}

.rrt-tg-buttons span {
  padding: 9px 12px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  background: rgba(43, 82, 120, 0.7);
  border-radius: 8px;
}

.rrt-tg-buttons span:first-child {
  outline: 2px solid var(--rrt-gold);
  outline-offset: 1px;
}

.rrt-tg-input {
  margin: 0 12px 12px;
  padding: 10px 14px;
  color: rgba(244, 247, 255, 0.4);
  font-size: 14px;
  background: var(--rrt-tg-side);
  border-radius: 10px;
}

/* Reference table */
.rrt-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rrt-line);
  border-radius: 10px;
}

.rrt-table {
  width: 100%;
  border-collapse: collapse;
}

.rrt-table th,
.rrt-table td {
  padding: 12px 14px;
  color: var(--rrt-text);
  font-size: 15px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rrt-line);
}

.rrt-table th {
  color: var(--rrt-gold);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.04);
}

.rrt-table tr:last-child td {
  border-bottom: 0;
}

.rrt-table td:first-child {
  width: 46%;
}

/* FAQ */
.rrt-faq {
  display: grid;
  gap: 8px;
}

.rrt-faq details {
  background: var(--rrt-card);
  border: 1px solid var(--rrt-line);
  border-radius: 10px;
}

.rrt-faq summary {
  padding: 14px 16px;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.rrt-faq details[open] summary {
  border-bottom: 1px solid var(--rrt-line);
}

.rrt-faq p {
  margin: 0;
  padding: 12px 16px 16px;
}

@media (max-width: 900px) {
  .rrt-split,
  .rrt-ways {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .rrt-flow {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .rrt-flow-row {
    grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
    gap: 6px;
  }

  .rrt-chip,
  .rrt-dest {
    padding: 7px 8px;
    font-size: 12px;
    white-space: normal;
  }

  .rrt-tg {
    grid-template-columns: 1fr;
  }

  .rrt-tg-topics {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
  }

  .rrt-tg-group {
    display: none;
  }

  .rrt-tg-topic {
    flex: 0 0 auto;
  }

  .rrt-card-grid {
    grid-template-columns: 1fr;
  }

  .rrt-table td:first-child {
    width: auto;
  }
}
