:root {
  --brand: #ff6b1a;
  --brand-hover: #f05c0a;
  --ink: #171a1f;
  --dark: #0d1014;
  --dark-surface: #171c22;
  --dark-border: #303741;
  --dark-muted: #a9b0ba;
  --surface: #fff;
  --canvas: #f5f6f7;
  --border: #e1e4e8;
  --muted: #69717c;
  --selected: #fff1e8;
}

body.route-home,
body:has(.rustargo-home) {
  margin: 0;
  min-width: 320px;
  background: var(--dark);
  color: #f7f8fa;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body.rg-dialog-open { overflow: hidden; }

.home-shell:has(.rustargo-home) { width: 100%; max-width: none; margin: 0; padding: 0; }
.rustargo-home, .rustargo-home * { box-sizing: border-box; }
.rustargo-home { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; background: radial-gradient(circle at 19% 86%, rgba(255, 107, 26, .11), transparent 32rem), var(--dark); color: #f7f8fa; }
.rustargo-home button, .rustargo-home a { font: inherit; }
.rustargo-home button { color: inherit; }
.rustargo-home a { color: inherit; text-decoration: none; }

.rg-home-header,
.rg-home-main,
.rg-home-footer { width: min(1320px, calc(100% - 64px)); margin-inline: auto; }
.rg-home-header { min-height: 70px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--dark-border); }
.rg-logo { display: inline-flex; align-items: baseline; width: max-content; font-size: 23px; font-weight: 900; letter-spacing: .075em; line-height: 1; }
.rg-logo span { color: #fff; }
.rg-logo b { color: var(--brand); }
.rg-home-nav { display: flex; align-items: center; gap: 6px; }
.rg-home-nav a, .rg-home-nav button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--dark-muted); font-size: 14px; font-weight: 700; cursor: pointer; }
.rg-home-nav a:hover, .rg-home-nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.rg-home-auth { justify-self: end; display: flex; align-items: center; gap: 8px; color: var(--dark-muted); font-size: 13px; }
.rg-home-auth .rg-login,
.rg-home-auth > a,
.rg-home-auth > button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px; border: 1px solid var(--dark-border); border-radius: 9px; background: var(--dark-surface); color: #fff; font-weight: 800; cursor: pointer; }
.rg-home-auth > span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-home-auth .notif-bell { padding-inline: 11px; }

.rg-home-main { min-height: 0; display: grid; grid-template-columns: minmax(0, .96fr) minmax(500px, 1.04fr); gap: clamp(46px, 6vw, 96px); align-items: center; padding-block: clamp(24px, 4vh, 48px); }
.rg-kicker, .rg-section-label, .rg-dialog__eyebrow { margin: 0; color: var(--brand); font-size: 12px; line-height: 1.3; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.rg-hero h1 { display: grid; margin: 15px 0 18px; font-size: clamp(48px, 5vw, 76px); line-height: .88; letter-spacing: -.055em; font-weight: 900; }
.rg-hero h1 span, .rg-hero h1 em { display: block; font-style: normal; }
.rg-hero h1 em { color: var(--brand); }
.rg-lead { max-width: 540px; margin: 0; color: var(--dark-muted); font-size: clamp(16px, 1.35vw, 19px); line-height: 1.45; }
.rg-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.rg-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid var(--dark-border); border-radius: 9px; font-size: 14px; font-weight: 850; }
.rg-button--brand { border-color: var(--brand); background: var(--brand); color: var(--ink) !important; }
.rg-button--brand:hover { border-color: var(--brand-hover); background: var(--brand-hover); }
.rg-button--ghost { background: var(--dark-surface); }
.rg-button--ghost:hover { border-color: #5b6570; background: #20262e; }

.rg-route-art { max-width: 560px; margin-top: clamp(22px, 4vh, 36px); padding: 13px 16px 11px; overflow: hidden; border: 1px solid var(--dark-border); border-radius: 12px; background: linear-gradient(120deg, #151a20, #101318); }
.rg-route-art svg { display: block; width: 100%; height: 82px; }
.rg-route-art path, .rg-route-art circle { fill: none; stroke: #727b86; stroke-width: 2; vector-effect: non-scaling-stroke; }
.rg-route-art circle { fill: var(--brand); stroke: var(--brand); }
.rg-route-art .rg-route-art__box { stroke: var(--brand); opacity: .8; }
.rg-route-art > div { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; margin-top: -3px; color: var(--dark-muted); font-size: 11px; }
.rg-route-art strong { color: #fff; font-size: 12px; }
.rg-route-art span { text-align: center; }

.rg-services { min-width: 0; }
.rg-section-label { margin-bottom: 12px; color: var(--dark-muted); }
.rg-service-list { border-top: 1px solid var(--dark-border); }
.rg-service { position: relative; width: 100%; min-height: 77px; display: grid; grid-template-columns: 28px 46px minmax(0, 1fr) 30px; gap: 13px; align-items: center; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--dark-border); background: transparent; text-align: left; cursor: pointer; transition: background-color .16s ease, padding .16s ease; }
.rg-service:hover { padding-inline: 10px; background: rgba(255,255,255,.035); }
.rg-service__number { align-self: start; padding-top: 4px; color: #737b85; font-size: 10px; font-weight: 800; }
.rg-service__icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--dark-border); border-radius: 10px; background: var(--dark-surface); color: var(--brand); }
.rg-service__icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rg-service__copy { min-width: 0; display: grid; gap: 3px; }
.rg-service__copy strong { color: #fff; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.15; }
.rg-service__copy small { overflow: hidden; color: var(--dark-muted); font-size: 13px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.rg-service__arrow { color: var(--brand); font-size: 20px; text-align: right; }

.rg-home-footer { min-height: 45px; display: flex; align-items: center; gap: 24px; border-top: 1px solid var(--dark-border); color: #858e99; font-size: 12px; }
.rg-home-footer button { margin-left: auto; padding: 5px 0; border: 0; background: transparent; cursor: pointer; }
.rg-home-footer button:hover, .rg-home-footer a:hover { color: #fff; }

.rg-dialog[hidden] { display: none; }
.rg-dialog { position: fixed; z-index: 1400; inset: 0; display: grid; place-items: center; padding: 18px; }
.rg-dialog__backdrop { position: absolute; inset: 0; background: rgba(4, 6, 8, .76); backdrop-filter: blur(8px); }
.rg-dialog__panel { position: relative; width: min(620px, 100%); max-height: min(720px, calc(100svh - 36px)); overflow: auto; padding: 30px; border: 1px solid #3a424c; border-radius: 16px; outline: none; background: #171c22; box-shadow: 0 26px 90px rgba(0,0,0,.48); }
.rg-dialog__close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 1px solid var(--dark-border); border-radius: 9px; background: #20262d; color: #fff; font-size: 23px; cursor: pointer; }
.rg-dialog__panel h2 { max-width: calc(100% - 40px); margin: 9px 0 8px; color: #fff; font-size: clamp(27px, 4vw, 38px); line-height: 1.05; letter-spacing: -.035em; }
.rg-dialog__lead { margin: 0 0 20px; color: var(--dark-muted); font-size: 15px; }
.rg-dialog__panel ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rg-dialog__panel li { position: relative; padding: 11px 12px 11px 35px; border: 1px solid var(--dark-border); border-radius: 9px; background: #11151a; color: #e9ebee; font-size: 14px; }
.rg-dialog__panel li::before { content: '✓'; position: absolute; left: 13px; color: var(--brand); font-weight: 900; }
.rg-dialog__note { margin: 15px 0 0; padding: 12px; border-left: 2px solid var(--brand); background: rgba(255,107,26,.08); color: #d5d8dd; font-size: 13px; }
.rg-dialog__actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }

.rustargo-home :focus-visible { outline: 3px solid rgba(255, 107, 26, .72); outline-offset: 3px; }
.route-home .global-chat { right: 20px; bottom: 56px; }

@media (max-width: 760px) {
  .rg-home-header, .rg-home-main, .rg-home-footer { width: min(100% - 28px, 560px); }
  .rg-home-header { min-height: 56px; grid-template-columns: 1fr auto; }
  .rg-logo { font-size: 20px; }
  .rg-home-nav { display: none; }
  .rg-home-auth { font-size: 0; }
  .rg-home-auth > span, .rg-home-auth .notif-bell { display: none; }
  .rg-home-auth > a, .rg-home-auth > button { min-height: 34px; padding-inline: 11px; font-size: 12px; }
  .rg-home-main { display: block; padding-block: 17px 13px; }
  .rg-kicker { font-size: 9px; }
  .rg-hero h1 { margin: 9px 0 9px; font-size: clamp(36px, 10.6vw, 42px); line-height: .88; }
  .rg-lead { max-width: 350px; font-size: 14px; line-height: 1.32; }
  .rg-hero-actions { flex-wrap: nowrap; gap: 7px; margin-top: 13px; }
  .rg-button { min-height: 40px; flex: 1 1 0; padding-inline: 9px; font-size: 12px; }
  .rg-route-art { display: none; }
  .rg-services { margin-top: 18px; }
  .rg-section-label { margin-bottom: 6px; font-size: 9px; }
  .rg-service { min-height: 59px; grid-template-columns: 34px minmax(0, 1fr) 20px; gap: 10px; padding: 6px 2px; }
  .rg-service__number { display: none; }
  .rg-service__icon { width: 34px; height: 34px; border-radius: 8px; }
  .rg-service__icon svg { width: 20px; height: 20px; }
  .rg-service__copy strong { font-size: 15px; }
  .rg-service__copy small[data-mobile-copy] { font-size: 0; }
  .rg-service__copy small[data-mobile-copy]::after { content: attr(data-mobile-copy); font-size: 11.5px; }
  .rg-service__arrow { font-size: 17px; }
  .rg-home-footer { min-height: 38px; gap: 10px; font-size: 10px; }
  .rg-home-footer span { display: none; }
  .rg-home-footer button { margin-left: 0; }
  .rg-home-footer a { margin-left: auto; }
  .rg-dialog { align-items: end; padding: 0; }
  .rg-dialog__panel { width: 100%; max-height: min(82svh, 690px); padding: 24px 18px max(22px, env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
  .rg-dialog__panel h2 { font-size: 28px; }
  .rg-dialog__actions { display: grid; grid-template-columns: 1fr; }
  .route-home .global-chat { right: 14px; bottom: 48px; }
  .route-home .global-chat__launcher { min-width: 46px; width: 46px; height: 46px; padding: 0; }
  .route-home .global-chat__launcher em { display: none; }
}

@media (max-height: 770px) and (min-width: 761px) {
  .rg-home-header { min-height: 62px; }
  .rg-home-main { padding-block: 18px; }
  .rg-service { min-height: 67px; }
  .rg-route-art { margin-top: 19px; }
  .rg-route-art svg { height: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  .rg-service { transition: none; }
}
