:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #151b24;
  background: #f1f3f6;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
.page-shell { position: relative; width: min(1480px, calc(100% - 40px)); margin: 44px auto 80px; }
.intro { max-width: 720px; margin-bottom: 26px; }
.language-switch { position: absolute; top: 0; right: 0; display: inline-flex; gap: 3px; padding: 4px; border: 1px solid #cbd2dc; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgb(27 38 53 / 8%); }
.language-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 38px; padding: 0 10px; border-radius: 8px; color: #5c6878; background: transparent; font-weight: 750; text-decoration: none; }
.language-switch a:hover { background: #f1f3f6; }
.language-switch a:focus-visible { outline: 3px solid rgb(79 117 209 / 22%); }
.language-switch a[aria-current="page"] { color: #fff; background: #151b24; }
.eyebrow { margin: 0 0 8px; color: #d92d4a; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(34px, 4vw, 58px); line-height: 1.04; letter-spacing: -.04em; }
.intro > p:last-child { color: #596474; font-size: 17px; line-height: 1.55; }
.chart-form { position: relative; z-index: 3; display: grid; gap: 20px; padding: 24px; border: 1px solid #cbd2dc; border-radius: 20px; background: #fff; box-shadow: 0 16px 42px rgb(27 38 53 / 9%); }
.field, .field label { display: grid; gap: 8px; }
.field label, legend { font-weight: 700; }
.field small { color: #687485; }
.field-row { display: grid; grid-template-columns: minmax(330px, 1.5fr) minmax(280px, 1fr); gap: 18px; max-width: 1000px; }
.birth-date-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.birth-date-field legend { margin-bottom: 8px; padding: 0; }
.date-parts { display: grid; grid-template-columns: minmax(74px, .7fr) minmax(142px, 1.45fr) minmax(96px, 1fr); gap: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
input, select { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid #aeb8c6; border-radius: 11px; color: #151b24; background: #fff; }
input:focus, select:focus { outline: 3px solid rgb(79 117 209 / 22%); border-color: #4f75d1; }
.city-field { position: relative; }
.birth-time-field { align-content: start; }
.time-parts { display: flex; align-items: center; gap: 8px; }
.time-parts select { min-width: 72px; }
.city-results { position: absolute; z-index: 20; top: 78px; right: 0; left: 0; max-height: 300px; margin: 0; padding: 6px; overflow: auto; list-style: none; border: 1px solid #abb6c5; border-radius: 12px; background: #fff; box-shadow: 0 18px 35px rgb(22 32 47 / 16%); }
.city-results li { padding: 11px 12px; border-radius: 8px; cursor: pointer; }
.city-results li:hover, .city-results li[aria-selected="true"] { background: #edf2ff; }
select[hidden] { display: none; }
.offset-choice { margin: 0; padding: 14px; border: 1px solid #e3a933; border-radius: 12px; background: #fff9e8; }
.offset-choice > div { display: flex; gap: 20px; margin-top: 10px; }
.offset-choice label { display: flex; align-items: center; gap: 7px; }
.offset-choice input { width: auto; min-height: auto; }
button[type="submit"] { justify-self: start; min-height: 50px; padding: 0 24px; border: 0; border-radius: 12px; color: #fff; background: #151b24; font-weight: 750; cursor: pointer; }
button[disabled] { opacity: .55; cursor: wait; }
.form-status { min-height: 22px; margin: 0; color: #4d5b6d; }
.form-status.is-error { color: #aa1831; }
.result { margin-top: 34px; scroll-margin-top: 20px; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 1px; margin: 0 0 16px; overflow: hidden; border: 1px solid #cbd2dc; border-radius: 14px; background: #cbd2dc; }
.summary > * { margin: 0; padding: 11px 14px; background: #fff; }
.summary dt { color: #667284; font-size: 12px; text-transform: uppercase; }
.summary dd { font-weight: 700; }
.chart-shell { min-width: 1120px; overflow: hidden; border: 1px solid #cbd2dc; border-radius: 20px; background: #fff; box-shadow: 0 16px 42px rgb(27 38 53 / 9%); }
.result { overflow-x: auto; }
.chart-shell > svg { display: block; width: 100%; height: auto; }
.chart-shell > svg .hover-entity { cursor: help; transition: opacity 140ms ease, filter 140ms ease; }
.chart-shell > svg [data-channel] > path[stroke-opacity="0"] { pointer-events: stroke; }
.chart-shell > svg [data-integration-spoke] { pointer-events: none; }
.chart-shell > svg .integration-spoke-visual { transition: opacity 140ms ease, filter 140ms ease; }
.chart-shell > svg.is-exploring .integration-spoke-visual { opacity: .16; }
.chart-shell > svg.is-exploring .integration-spoke-visual.is-related-integration { opacity: 1; }
.chart-shell > svg.is-exploring .hover-entity { opacity: .16; }
.chart-shell > svg.is-exploring .hover-entity.is-related { opacity: 1; }
.chart-shell > svg.is-exploring .hover-entity.is-related-channel { opacity: .48; }
.chart-shell > svg.is-exploring .hover-entity[data-center-state]:not(.is-related-center):not(.is-primary) { opacity: 1; filter: saturate(.22) brightness(1.1); }
.chart-shell > svg.is-exploring .hover-entity.is-related-center { opacity: 1; filter: drop-shadow(0 0 7px rgb(66 133 244 / 58%)); }
.chart-shell > svg.is-exploring .hover-entity.is-primary { opacity: 1; filter: drop-shadow(0 0 5px rgb(255 184 0 / 90%)); }
.chart-tooltip { position: fixed; z-index: 50; width: max-content; max-width: 320px; padding: 10px 13px; border: 1px solid rgb(255 255 255 / 30%); border-radius: 10px; color: #fff; background: rgb(16 23 34 / 94%); box-shadow: 0 10px 30px rgb(16 23 34 / 28%); pointer-events: none; }
.chart-tooltip[hidden] { display: none; }
.chart-tooltip strong, .chart-tooltip span { display: block; }
.chart-tooltip strong { margin-bottom: 3px; }
.chart-tooltip span { color: #d9e0ea; font-size: 13px; }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 24px, 1480px); margin-top: 24px; }
  .language-switch { position: static; width: max-content; margin: 0 0 20px auto; }
  .field-row, .summary { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .date-parts { grid-template-columns: minmax(66px, .7fr) minmax(126px, 1.4fr) minmax(88px, 1fr); }
}
