/* SourceTrail renewal 2026-10-18 (lf-sourcetrail-pulse).
   Layout responds to the width of the content area (main.workspace container), not the
   window, so the same screen holds inside the Hub workspace frame (≈600–1150px). */
.sourcetrail main.workspace{container:stmain/inline-size;min-width:0}
.sourcetrail .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Form controls: 16px minimum (directive A-8; avoids iOS zoom). */
.sourcetrail input:not([type=checkbox]):not([type=radio]):not([type=range]),.sourcetrail select,.sourcetrail textarea{font-size:16px}
.sourcetrail .topbar select{font-size:15px}

/* Shared building blocks for renewal panels */
.st-panel{padding:20px 22px;display:grid;gap:16px;align-content:start}
.st-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap}
.st-panel-head>div{min-width:0;flex:1 1 260px}
.st-panel-head h2{font-size:18px;line-height:1.4}
.st-panel-head p{margin-top:4px;color:var(--muted);font-size:14px;line-height:1.6}
.st-eyebrow{display:block;margin-bottom:2px;color:#3d78b7;font-size:13px;font-weight:700;letter-spacing:.06em}
.st-foot{color:var(--muted);font-size:13px;line-height:1.6}
.st-empty{display:grid;justify-items:start;gap:6px;padding:18px;border:1px dashed #d8e4f1;border-radius:8px;background:#fbfdff;color:var(--muted);font-size:14px}
.st-empty strong{color:var(--ink);font-size:15px}
.st-empty.is-large{justify-items:center;text-align:center;padding:42px 20px}
.st-empty .btn{margin-top:6px}
.st-select{display:grid;gap:5px;font-size:13px;font-weight:600;color:#4c6380;min-width:0}
.st-select select{min-width:200px;max-width:100%;width:auto}
.st-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(108px,1fr));gap:10px;margin:0}
.st-stats>div{border:1px solid var(--line);border-radius:8px;padding:10px 12px;background:#fbfdff;min-width:0}
.st-stats dt{color:var(--muted);font-size:13px}
.st-stats dd{margin:2px 0 0;font-size:16px;font-weight:650;overflow-wrap:anywhere}
.st-bar{display:block;height:10px;border-radius:99px;background:#eef3f9;overflow:hidden;min-width:40px}
.st-bar i{display:block;height:100%;border-radius:inherit;background:#3797ff}
.st-chip{display:inline-flex;align-items:center;max-width:100%;min-height:28px;padding:3px 9px;border:1px solid #d6e4f3;border-radius:6px;background:#f5f9ff;color:#1f4f80;font:inherit;font-size:13px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
button.st-chip:hover{border-color:#8bbcf0;background:#eaf3ff}
.st-chip.more{cursor:default;color:var(--muted);background:#f3f6f9}
.st-chip.goal{cursor:default;color:#167a4e;border-color:#c7e9d9;background:#f0fbf4}
.st-chip.exit{cursor:default;color:#8a4f1d;border-color:#f0dcc4;background:#fff8f0}
.st-path{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
.st-path-arrow{color:#9db3cb;font-size:13px}

/* 고객 여정 분석 */
.st-journey{display:grid;gap:16px}
.st-kpis .kpi small{color:var(--muted)}
.st-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.st-funnel,.st-next-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.st-next-list{margin-top:14px}
.st-funnel-row{display:grid;grid-template-columns:112px minmax(60px,1fr) 92px 64px;align-items:center;gap:12px;font-size:14px}
.st-funnel-num{display:flex;align-items:baseline;gap:6px;justify-content:flex-end}
.st-funnel-num small,.st-next small{color:var(--muted);font-size:13px}
.st-funnel-drop{color:#b4572c;font-size:13px;text-align:right}
.st-funnel-row.is-goal .st-bar i,.st-next.is-goal .st-bar i{background:#22a06b}
.st-next.is-exit .st-bar i{background:#e3a35c}
.st-next{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(60px,1fr) 48px 56px;align-items:center;gap:10px;font-size:14px}
.st-next b{text-align:right}
.st-next-label{min-width:0}
.st-table td{max-width:none;font-size:14px}
.st-table .num{text-align:right;white-space:nowrap}
.st-table .st-rank{color:var(--muted);width:36px}
.st-table td .btn.small{min-height:34px;white-space:nowrap}
.st-search{min-width:220px;flex:0 1 300px}
.st-more{display:flex;justify-content:center}
.st-pager{display:inline-flex;align-items:center;gap:8px;color:var(--ink)}
.st-pager .btn[disabled]{opacity:.45;cursor:default}

/* Timeline (visitor / session detail modal) */
.st-timeline{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:12px}
.st-tl-session{border:1px solid var(--line);border-radius:9px;padding:13px 15px;background:#fff}
.st-tl-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}
.st-tl-head strong{font-size:15px}
.st-tl-head small{margin-left:auto;color:var(--muted);font-size:13px}
.st-tl-pages{list-style:none;margin:10px 0 0;padding:0 0 0 14px;border-left:2px solid #d9e7f6;display:grid;gap:6px}
.st-tl-pages li{position:relative;font-size:14px;overflow-wrap:anywhere}
.st-tl-pages li:before{content:'';position:absolute;left:-20px;top:.55em;width:10px;height:10px;border-radius:50%;background:#fff;border:2px solid #3797ff}
.st-tl-pages li.is-goal{color:#167a4e;font-weight:650}
.st-tl-pages li.is-goal:before{background:#22a06b;border-color:#22a06b}

/* 사이트 추적 연결 · 설치 안내 */
.st-setup{padding:20px 22px;display:grid;gap:18px;margin-bottom:16px}
.st-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;counter-reset:none}
.st-step{display:flex;gap:12px;align-items:flex-start;padding:14px;border:1px solid var(--line);border-radius:9px;background:#fbfdff;min-width:0}
.st-step-num{flex:none;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:var(--soft);color:var(--accent);font-size:14px;font-weight:700}
.st-step.is-done{border-color:#c7e9d9;background:#f6fcf9}
.st-step.is-done .st-step-num{background:#22a06b;color:#fff}
.st-step h3{font-size:15px;line-height:1.45}
.st-step p{margin-top:4px;color:var(--muted);font-size:13px;line-height:1.65;overflow-wrap:anywhere}
.st-setup-body{display:grid;gap:14px}
.st-setup-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;justify-content:space-between}
.st-code{border:1px solid #1d2c3d;border-radius:9px;overflow:hidden;background:#0f1b29}
.st-code-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px 8px 14px;background:#16263a;color:#9fb6d0;font-size:13px}
.st-code-bar .btn{background:#21364f;border-color:#2e4a69;color:#e6f0fb;min-height:34px}
.st-code-bar .btn:hover{background:#2a4565}
.st-code pre{margin:0;padding:14px;color:#d9e8f7;font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto}

/* Help: manuals and video inside the help hero (was a separate unstyled bar) */
.st-help-resources{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;margin:18px auto 0;max-width:640px}
.st-help-resources>span{color:var(--muted);font-size:14px}
.st-help-resources .btn{background:#fff;min-height:42px;font-size:14px;font-weight:650}
.st-help-resources .btn svg{width:17px;height:17px}

/* Inside the Hub workspace frame */
html.in-hub .sourcetrail .quick-logout,html.in-hub .sourcetrail .public-header,html.in-hub .sourcetrail .site-footer,html.in-hub body.sourcetrail>footer{display:none!important}

/* Sidebar in short frames (Hub workspace iframe ≈700px tall): keep every menu item visible */
@media (max-height:820px){
 .sourcetrail .sidebar{gap:10px;padding-top:12px;padding-bottom:12px}
 .sourcetrail .sidebar nav{gap:2px}
 .sourcetrail .sidebar .nav-link{min-height:36px;padding-top:6px;padding-bottom:6px}
 .sourcetrail .sidebar-bottom{gap:2px;padding-top:10px}
 .sourcetrail .sidebar-status{padding:10px 12px}
 .sourcetrail .sidebar-status p+p{display:none}
}

/* ---- Container-width rules (content area, not window) ---- */
@container stmain (max-width:1250px){
 .sourcetrail .kpi .spark{position:static;display:block;width:100%;height:30px;margin-top:8px}
}
@container stmain (max-width:1100px){
 .sourcetrail .workspace-cols{grid-template-columns:minmax(0,1fr)}
 .sourcetrail .side-insights{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
 .st-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@container stmain (max-width:960px){
 .st-grid-2{grid-template-columns:minmax(0,1fr)}
 .sourcetrail .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 .sourcetrail .source-guide-grid{grid-template-columns:minmax(0,1fr)}
 .sourcetrail .workspace>header{flex-wrap:wrap}
 .sourcetrail .journey-chart{overflow-x:auto;grid-template-columns:repeat(5,minmax(130px,1fr))}
}
@container stmain (max-width:640px){
 .st-steps{grid-template-columns:minmax(0,1fr)}
 .st-panel,.st-setup{padding:16px}
 .st-funnel-row{grid-template-columns:88px minmax(40px,1fr) 78px;gap:8px}
 .st-funnel-drop{display:none}
 .st-next{grid-template-columns:minmax(0,1fr) 44px 52px}
 .st-next .st-bar{grid-column:1/-1;grid-row:2}
 .st-search{flex:1 1 100%;min-width:0}
 .st-select select{min-width:0;width:100%}
 .st-setup-row>*{flex:1 1 100%}
 .st-tl-head small{margin-left:0;width:100%}
 .st-paths-table th:nth-child(4),.st-paths-table td:nth-child(4),.st-paths-table th:nth-child(6),.st-paths-table td:nth-child(6){display:none}
 .st-visitors-table th:nth-child(3),.st-visitors-table td:nth-child(3),.st-visitors-table th:nth-child(5),.st-visitors-table td:nth-child(5),.st-visitors-table th:nth-child(7),.st-visitors-table td:nth-child(7){display:none}
 .st-table td,.st-table th{padding:10px 8px}
 .sourcetrail .st-kpis .kpi .value{font-size:22px}
}

/* Contrast (WCAG AA 4.5:1; audit 2026-10-18): muted text, chart axes, KPI notes, accent text on soft blue */
.sourcetrail{--muted:#586a80}
.sourcetrail .chart-axis{color:#5f7086}
.sourcetrail .kpi small{color:#0b7a43}
.sourcetrail .text-link,.sourcetrail .sidebar .nav-link.active{color:#0062d1}
/* Keyboard focus on chart points (the reference CSS removed the outline) */
.sourcetrail .trend-chart .live-trend-point:focus-visible{outline:none;stroke:#0b1725;stroke-width:3}

/* First run (A-10) */
.st-first-run{padding:20px 22px;display:grid;gap:16px;margin-bottom:16px;border-color:#b9d5ff}
.st-steps-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.st-step.is-current{border-color:#8bbcf0;background:#f5f9ff}
.st-step-action{margin-top:10px}
.st-field-msg{display:block;margin-top:6px;font-size:13px;color:#4c6380}
.st-field-msg.is-error{color:#b42318}
@container stmain (max-width:760px){.st-steps-3{grid-template-columns:minmax(0,1fr)}}

.st-empty-next{display:inline-block;margin-top:6px;font-weight:650}

/* Contrast round 2 (audit 2026-10-19): primary buttons, eyebrows, public menu */
.sourcetrail .btn.primary{background:#0062d1;border-color:#0062d1;color:#fff}
.sourcetrail .btn.primary:hover{background:#00509f;border-color:#00509f}
.sourcetrail .eyebrow{color:#0062d1}
.sourcetrail .public-header nav a{color:#3f5168}
/* Accent text everywhere (links, required marks) meets 4.5:1 on white */
.sourcetrail{--accent:#0062d1}
.sourcetrail .required{color:#c4262b}

/* Contrast round 3 (audit 2026-10-19 08:37): green badges, table headers, support footnote */
.sourcetrail .badge.green{color:#0b6b3d}
.sourcetrail .data-table th{color:#4d6380}
.sourcetrail .st-p47-footnote,.sourcetrail .st-p47-footnote a{color:#4f6178}

/* Contrast round 4 (audit 2026-10-19 09:3x, signed-in screens) */
.st-path-arrow{color:#5f7086}
.sourcetrail .source-notice-count:not([hidden]){background:#c4262b}
.sourcetrail .badge.amber{color:#8a5300}
.sourcetrail .badge.gray{color:#4f5b6a}
.sourcetrail .source-tab-guide{color:#4f6178}

/* R18: public headings keep one sentence and balance line breaks at 390/1440/2560. */
.hero h1,.feature-hero h1,.auth-visual h1,.public-copy h2,.cta-banner h2,.monitor-strip h3,.section-heading h2,.help-hero h1{text-wrap:balance;word-break:keep-all}
.hero h1,.feature-hero h1{font-size:clamp(34px,3.4vw,48px)}

/* Legal 2026-10-21: signup consent (one column, labels readable, 44px touch rows), REVAON legal body and business footer. */
.rv-consent{margin:20px 0 4px;padding:0;border:0;display:grid;gap:4px}
.rv-consent legend{font-size:13px;font-weight:700;margin-bottom:6px}
.rv-consent .check-label{min-height:44px;font-size:14px;gap:10px}
.rv-consent .check-label input{width:20px;height:20px;flex:0 0 20px}
.rv-consent a{text-decoration:underline;text-underline-offset:3px}
.rv-consent-error{margin:4px 0 0;font-size:13px;color:var(--danger,#c4262b)}
.rv-legal-layout>.rv-legal{background:#fff;border:1px solid var(--line);border-radius:4px;margin:0;max-width:none}
.public-footer .rv-biz{margin:0;flex:1 1 420px;min-width:0}
