.rdch, .rdch-entry {
  --rdch-paper: #f3f4f6;
  --rdch-surface: #fff;
  --rdch-chip: #f9eaec;
  --rdch-ink: #22242b;
  --rdch-muted: #515664;
  --rdch-line: #cdd1da;
  --rdch-accent: #a51d2b;
  --rdch-focus: #1e5cac;
  --rdch-radius: 16px;
}
html:is([data-theme="dark"], [data-rx-theme="dark"]) :is(.rdch, .rdch-entry) {
  --rdch-paper: #1a1c21;
  --rdch-surface: #23262e;
  --rdch-chip: #3a252b;
  --rdch-ink: #f5f5f8;
  --rdch-muted: #bfc2cc;
  --rdch-line: #495061;
  --rdch-accent: #ffa2ab;
  --rdch-focus: #b5d2ff;
}
main :is(.rdch, .rdch-entry) {
  box-sizing: border-box;
  min-width: 0;
  margin: clamp(18px, 3.2vw, 36px) auto;
  color: var(--rdch-ink);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
main :is(.rdch, .rdch-entry) * { box-sizing: border-box; }
main .rdch {
  padding: clamp(14px, 3vw, 32px);
  border: 1px solid var(--rdch-line);
  border-radius: 22px;
  background: var(--rdch-paper);
}
.rdch [hidden] { display: none !important; }
.rdch :where([id]) { scroll-margin-top: 122px; }
.rdch-anchor { display: block; height: 0; }
main :is(.rdch, .rdch-entry) :is(h2,h3,h4,p,dl,dd,ul) { margin: 0; }
main :is(.rdch, .rdch-entry) h2 { color: var(--rdch-ink); font-size: clamp(24px, 3.6vw, 39px); line-height: 1.14; letter-spacing: -.025em; }
main .rdch h3 { color: var(--rdch-ink); font-size: clamp(21px, 2.6vw, 27px); line-height: 1.25; }
main .rdch h4 { color: var(--rdch-ink); font-size: clamp(17px, 1.9vw, 22px); line-height: 1.25; }
main .rdch p {
  margin-top: 7px;
  color: var(--rdch-muted);
  max-width: 78ch;
  line-height: 1.55;
}
main :is(.rdch, .rdch-entry) :is(a, button, input, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--rdch-focus) !important;
  outline-offset: 3px;
}
.rdch-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 15px 22px;
  align-items: start;
  background: var(--rdch-surface);
  border: 1px solid var(--rdch-line);
  border-inline-start: 4px solid var(--rdch-accent);
  border-radius: var(--rdch-radius);
  padding: clamp(16px, 2.6vw, 27px);
}
main .rdch .rdch-cta {
  min-height: 46px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 10px;
  background: #ac2431;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
  font-weight: 750;
  font-size: 15px;
  line-height: 1.3;
}
main .rdch .rdch-cta:hover { background: #872030; }
.rdch-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block: 12px;
}
main .rdch .rdch-quick a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 11px;
  border: 1px solid var(--rdch-line);
  border-radius: 9px;
  color: var(--rdch-ink) !important;
  -webkit-text-fill-color: var(--rdch-ink) !important;
  background: var(--rdch-surface);
  text-decoration: underline;
  text-underline-offset: .16em;
  font-weight: 620;
  font-size: 14px;
  line-height: 1.35;
}
main .rdch .rdch-quick a:hover { border-color: var(--rdch-accent); }
.rdch-catalog, .rdch-check, .rdch-related { margin-top: clamp(24px, 4vw, 39px); }
.rdch-search { margin-top: 13px; }
.rdch-search label { display: block; color: var(--rdch-ink); font-weight: 680; font-size: 15px; }
.rdch-search-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 5px; max-width: 600px; }
main .rdch .rdch-search input {
  flex: 1 1 250px;
  min-width: 0;
  max-width: 100%;
  min-height: 47px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--rdch-line);
  background: var(--rdch-surface) !important;
  color: var(--rdch-ink) !important;
  -webkit-text-fill-color: var(--rdch-ink) !important;
  font: inherit;
  font-size: 16px;
}
.rdch-search input::placeholder { color: var(--rdch-muted); -webkit-text-fill-color: var(--rdch-muted); opacity: 1; }
main .rdch .rdch-search button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--rdch-line);
  border-radius: 9px;
  background: var(--rdch-surface);
  color: var(--rdch-accent) !important;
  -webkit-text-fill-color: var(--rdch-accent) !important;
  font: inherit;
  cursor: pointer;
}
main .rdch .rdch-count { margin-top: 9px; font-size: 14px; font-variant-numeric: tabular-nums; }
.rdch-group {
  background: var(--rdch-surface);
  border: 1px solid var(--rdch-line);
  border-radius: var(--rdch-radius);
  padding: clamp(13px, 2.5vw, 20px);
  margin-top: 10px;
  min-width: 0;
}
main .rdch .rdch-group > p { margin-block-end: 12px; }
.rdch-cards, .rdch-routes {
  display: grid;
  list-style: none !important;
  padding: 0 !important;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 216px), 1fr));
}
.rdch-cards > li, .rdch-routes > li { min-width: 0; margin: 0 !important; padding: 0 !important; }
main :is(.rdch, .rdch-entry) :is(.rdch-card, .rdch-routes a) {
  position: relative;
  display: grid;
  justify-items: start;
  align-content: start;
  height: 100%;
  min-height: 52px;
  gap: 4px;
  padding: 10px 29px 10px 12px;
  border: 1px solid var(--rdch-line);
  border-radius: 10px;
  background: var(--rdch-paper);
  color: var(--rdch-ink) !important;
  -webkit-text-fill-color: var(--rdch-ink) !important;
  text-decoration: none !important;
  line-height: 1.4;
  font-size: 15px;
}
main :is(.rdch, .rdch-entry) :is(.rdch-card, .rdch-routes a):hover { border-color: var(--rdch-accent); }
.rdch-card strong, .rdch-routes strong { text-decoration: underline; text-decoration-color: var(--rdch-accent); text-underline-offset: .17em; }
.rdch-card span:not(.rdch-arrow), .rdch-routes span {
  color: var(--rdch-muted);
  -webkit-text-fill-color: var(--rdch-muted);
  font-size: 14px;
}
.rdch-card .rdch-arrow {
  position: absolute;
  inset: 11px 10px auto auto;
  color: var(--rdch-accent);
  -webkit-text-fill-color: var(--rdch-accent);
  transition: transform 150ms cubic-bezier(.23,1,.32,1);
}
@media (hover: hover) and (pointer: fine) {
  .rdch-card:hover .rdch-arrow { transform: translate(2px, -2px); }
}
.rdch-more summary, .rdch-sources summary {
  min-height: 44px;
  width: fit-content;
  padding: 9px 5px;
  cursor: pointer;
  font-weight: 630;
  color: var(--rdch-accent) !important;
  -webkit-text-fill-color: var(--rdch-accent) !important;
  text-underline-offset: .15em;
  text-decoration: underline;
}
.rdch-more .rdch-cards { margin-top: 3px; }
.rdch-empty { padding: 13px; background: var(--rdch-surface); border: 1px dashed var(--rdch-line); border-radius: 12px; }

.rdch-annex { margin-top: 15px; padding: clamp(13px, 2.5vw, 25px); background: var(--rdch-surface); border: 1px solid var(--rdch-line); border-radius: var(--rdch-radius); min-width: 0; }
.rdch-table-wrap { max-width: 100%; overflow-x: auto; margin-top: 13px; border: 1px solid var(--rdch-line); border-radius: 11px; }
main .rdch .rdch-table { width: 100%; min-width: 580px; margin: 0; border-collapse: collapse; table-layout: auto; }
main .rdch .rdch-table :is(td,th) {
  text-align: start;
  vertical-align: top;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--rdch-line);
  color: var(--rdch-ink);
  background: var(--rdch-surface);
  font-size: 14px;
}
main .rdch .rdch-table thead th { background: var(--rdch-paper); }
.rdch-table tbody td:first-child { font-variant-numeric: tabular-nums; }
.rdch-table tbody th { min-width: 160px; }
.rdch-scroll-hint { display: none; }
.rdch-check dl { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 12px !important; }
.rdch-check dl > div { padding: 14px; border: 1px solid var(--rdch-line); border-radius: 10px; background: var(--rdch-surface); }
.rdch-check dt { font-weight: 750; color: var(--rdch-ink); }
main .rdch-check dd { margin-top: 5px; color: var(--rdch-muted); font-size: 15px; line-height: 1.5; }
.rdch-tools { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none !important; padding: 0 !important; margin-top: 12px !important; }
main .rdch :is(.rdch-tools a, .rdch-inline-link, .rdch-empty a, .rdch-sources a) {
  color: var(--rdch-accent) !important;
  -webkit-text-fill-color: var(--rdch-accent) !important;
  text-decoration: underline !important;
}
main .rdch :is(.rdch-tools a, .rdch-inline-link) { display: inline-flex; min-height: 44px; align-items: center; }
.rdch-sources li { margin-bottom: 6px; }
main .rdch-related .rdch-routes { margin-top: 10px !important; }
.rdch-entry { padding: clamp(14px, 2.6vw, 23px); border: 1px solid var(--rdch-line); border-radius: var(--rdch-radius); background: var(--rdch-surface); }
main .rdch-entry h2 { margin-bottom: 10px !important; font-size: clamp(20px, 2.6vw, 27px); }

@layer redicoCompact.rdApprovedTemplates {
  html[data-rx-bento] main :is(.rdch, .rdch-entry) :is(h2,h3,h4) {
    color: var(--rdch-ink) !important;
    -webkit-text-fill-color: var(--rdch-ink) !important;
  }
  html[data-rx-bento] main .rdch .rdch-cta {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }
  html[data-rx-bento] main :is(.rdch, .rdch-entry) :is(.rdch-quick a, .rdch-card, .rdch-routes a) {
    color: var(--rdch-ink) !important;
    -webkit-text-fill-color: var(--rdch-ink) !important;
  }
}

@media (max-width: 760px) {
  .rdch :where([id]) { scroll-margin-top: 100px; }
  .rdch-header { grid-template-columns: minmax(0,1fr); }
  .rdch-header .rdch-cta { justify-self: start; }
  .rdch-check dl { grid-template-columns: minmax(0,1fr); }
  .rdch-scroll-hint { display: block; font-size: 14px; }
}
@media (max-width: 480px) {
  .rdch-search-row input { flex-basis: 100%; }
  .rdch-cards, .rdch-routes { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .rdch-card .rdch-arrow { transition: none !important; transform: none !important; }
}
