:root {
  --v5-panel: #0c1829;
  --v5-panel-soft: #0a1524;
  --v5-line: rgba(104, 139, 184, 0.24);
  --v5-blue: #62a8f7;
  --v5-red: #ff687d;
  --v5-green: #41d4a4;
  --v5-orange: #ff9a4d;
}

.v5-launcher-grid [data-v5-open="pattern"] {
  background: linear-gradient(145deg, rgba(35, 67, 112, 0.74), rgba(13, 29, 51, 0.94));
  border-color: rgba(98, 168, 247, 0.48);
}

.v5-research-launcher {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 16px;
}

.v5-research-launcher h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 4px 0 12px;
}

.v5-launcher-head {
  align-items: flex-start;
}

.v5-launcher-head .section-info-button {
  margin-top: 2px;
}

.v5-launcher-grid {
  display: grid;
  gap: 8px;
  grid-auto-columns: minmax(120px, 30vw);
  grid-auto-flow: column;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-bottom: 4px;
  scroll-snap-type: inline proximity;
  scrollbar-width: none;
}

html[data-market="us"] .v5-launcher-grid {
  grid-auto-flow: initial;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow-x: visible;
}

.v5-launcher-grid::-webkit-scrollbar,
.v5-workspace-tabs::-webkit-scrollbar,
.v5-etf-picker::-webkit-scrollbar,
.v5-etf-date-picker::-webkit-scrollbar {
  display: none;
}

.v5-launcher-grid button {
  background: var(--v5-panel-soft);
  border: 1px solid var(--v5-line);
  border-radius: 12px;
  color: var(--text-primary, #e9f0fa);
  min-width: 0;
  padding: 12px 4px;
  scroll-snap-align: start;
}

.v5-launcher-grid span,
.v5-launcher-grid small {
  display: block;
  font-weight: 400;
}

.v5-launcher-grid .v5-launcher-label {
  align-items: baseline;
  display: flex;
  gap: 5px;
  justify-content: center;
  min-width: 0;
}

.v5-launcher-label em {
  color: var(--text-muted, #71839d);
  font-size: 9px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.v5-launcher-label em::before {
  background: #71839d;
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 5px;
  margin-right: 3px;
  vertical-align: 1px;
  width: 5px;
}

.v5-launcher-label em.current {
  color: var(--v5-green);
}

.v5-launcher-label em.current::before {
  background: var(--v5-green);
}

.v5-launcher-label em.stale {
  color: var(--v5-orange);
}

.v5-launcher-label em.stale::before {
  background: var(--v5-orange);
}

.v5-launcher-grid span {
  font-size: 13px;
}

.v5-launcher-grid small {
  color: var(--text-muted, #71839d);
  font-size: 10px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.v5-workspace-open {
  overflow: hidden;
}

html.v5-pattern-standalone .market-app > :not(#v5Workspace) {
  display: none !important;
}

html.v5-pattern-standalone body {
  background: #07111e;
}

.v5-pattern-intro,
.v5-pattern-login {
  background:
    radial-gradient(circle at 100% 0, rgba(73, 137, 226, 0.2), transparent 38%),
    linear-gradient(150deg, #102641, #0b192b 72%);
  border: 1px solid rgba(98, 168, 247, 0.3);
  border-radius: 18px;
  margin: 14px 0 12px;
  padding: 20px;
}

.v5-pattern-login {
  display: grid;
  gap: 14px;
}

.v5-pattern-intro h2,
.v5-pattern-login h2 {
  font-size: 24px;
  font-weight: 620;
  letter-spacing: -0.03em;
  margin: 5px 0 8px;
}

.v5-pattern-intro > p:last-child,
.v5-pattern-login > p:not(.eyebrow):not(.v5-pattern-error) {
  color: #a7b8cc;
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

.v5-pattern-form {
  background: var(--v5-panel-soft);
  border: 1px solid var(--v5-line);
  border-radius: 18px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.v5-pattern-upload {
  align-items: center;
  aspect-ratio: 16 / 10;
  background: #07111e;
  border: 1px dashed rgba(98, 168, 247, 0.54);
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.v5-pattern-upload.has-image,
.v5-pattern-upload.has-examples {
  border-style: solid;
}

.v5-pattern-upload.has-examples {
  aspect-ratio: auto;
  min-height: 66px;
}

.v5-pattern-upload.has-examples .v5-pattern-upload-placeholder {
  flex-direction: row;
  gap: 9px;
}

.v5-pattern-upload.has-examples .v5-pattern-upload-placeholder b {
  font-size: 16px;
  height: 30px;
  margin-bottom: 0;
  width: 30px;
}

.v5-pattern-upload.has-examples .v5-pattern-upload-placeholder strong {
  font-size: 13px;
}

.v5-pattern-upload.has-examples .v5-pattern-upload-placeholder small {
  display: none;
}

.v5-pattern-upload input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.v5-pattern-upload img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.v5-pattern-upload-placeholder {
  align-items: center;
  color: #dce9f8;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: center;
}

.v5-pattern-upload-placeholder b {
  align-items: center;
  background: rgba(98, 168, 247, 0.14);
  border: 1px solid rgba(98, 168, 247, 0.36);
  border-radius: 50%;
  color: var(--v5-blue);
  display: inline-flex;
  font-size: 24px;
  font-weight: 300;
  height: 48px;
  justify-content: center;
  margin-bottom: 5px;
  width: 48px;
}

.v5-pattern-upload-placeholder strong {
  font-size: 15px;
  font-weight: 580;
}

.v5-pattern-upload-placeholder small,
.v5-pattern-file-name,
.v5-pattern-privacy {
  color: #71839d;
  font-size: 11px;
}

.v5-pattern-file-name {
  overflow: hidden;
  padding: 0 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-pattern-example-grid,
.v5-pattern-seed-list {
  display: grid;
  gap: 9px;
}

.v5-pattern-example {
  align-items: start;
  background: #07111e;
  border: 1px solid rgba(104, 139, 184, 0.22);
  border-radius: 13px;
  display: grid;
  gap: 10px;
  grid-template-columns: 82px minmax(0, 1fr) 24px;
  padding: 9px;
}

.v5-pattern-example.is-ready {
  border-color: rgba(48, 196, 152, 0.34);
}

.v5-pattern-example.has-error,
.v5-pattern-example.needs-stock {
  border-color: rgba(229, 168, 92, 0.34);
}

.v5-pattern-example-image {
  aspect-ratio: 4 / 3;
  background: #030912;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.v5-pattern-example-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.v5-pattern-example-image span {
  align-items: center;
  background: rgba(7, 17, 30, 0.88);
  border-radius: 50%;
  color: #dce9f8;
  display: flex;
  font-size: 10px;
  height: 20px;
  justify-content: center;
  left: 5px;
  position: absolute;
  top: 5px;
  width: 20px;
}

.v5-pattern-example-body,
.v5-pattern-example-title,
.v5-pattern-example-stock {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.v5-pattern-example-title b {
  color: #dce9f8;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-pattern-example-title small,
.v5-pattern-example-stock span,
.v5-pattern-example-stock small,
.v5-pattern-example-status {
  color: #71839d;
  font-size: 9.5px;
  margin: 0;
}

.v5-pattern-example-stock strong {
  color: #67d5b3;
  font-size: 13px;
}

.v5-pattern-example-stock button {
  background: transparent;
  border: 0;
  color: var(--v5-blue);
  font: inherit;
  font-size: 9.5px;
  justify-self: start;
  padding: 3px 0 0;
}

.v5-pattern-example .v5-pattern-stock-fallback {
  border-radius: 8px;
  gap: 5px;
  padding: 7px;
}

.v5-pattern-example .v5-pattern-stock-field > span {
  font-size: 9.5px;
}

.v5-pattern-example .v5-pattern-stock-field input {
  border-radius: 8px;
  font-size: 14px;
  min-height: 36px;
  padding: 0 9px;
}

.v5-pattern-example-remove {
  background: transparent;
  border: 0;
  color: #71839d;
  font: inherit;
  font-size: 19px;
  line-height: 1;
  padding: 0;
}

.v5-pattern-example-error {
  color: #ff8798;
  font-size: 9.5px;
  line-height: 1.45;
  margin: 3px 0 0;
}

.v5-pattern-stock-field {
  display: grid;
  gap: 8px;
}

.v5-pattern-stock-field > span {
  align-items: center;
  color: #dce9f8;
  display: flex;
  font-size: 13px;
  gap: 7px;
}

.v5-pattern-stock-field > span b {
  align-items: center;
  background: rgba(98, 168, 247, 0.16);
  border-radius: 50%;
  color: var(--v5-blue);
  display: inline-flex;
  font-size: 11px;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.v5-pattern-stock-field input {
  background: #07111e;
  border: 1px solid rgba(104, 139, 184, 0.38);
  border-radius: 12px;
  color: #eef5ff;
  font: inherit;
  font-size: 16px;
  min-height: 48px;
  outline: none;
  padding: 0 14px;
  width: 100%;
}

.v5-pattern-stock-field input:focus {
  border-color: var(--v5-blue);
  box-shadow: 0 0 0 3px rgba(98, 168, 247, 0.12);
}

.v5-pattern-submit,
.v5-pattern-secondary {
  border: 0;
  border-radius: 12px;
  color: white;
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  min-height: 48px;
  padding: 0 16px;
}

.v5-pattern-submit {
  background: linear-gradient(135deg, #347ed5, #2458a4);
  box-shadow: 0 8px 22px rgba(30, 91, 165, 0.24);
}

.v5-pattern-submit:disabled {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.4;
}

.v5-pattern-secondary {
  background: rgba(98, 168, 247, 0.12);
  border: 1px solid rgba(98, 168, 247, 0.3);
  color: var(--v5-blue);
  width: 100%;
}

.v5-pattern-privacy {
  line-height: 1.5;
  margin: 0;
  text-align: center;
}

.v5-pattern-error {
  background: rgba(255, 104, 125, 0.1);
  border: 1px solid rgba(255, 104, 125, 0.25);
  border-radius: 10px;
  color: #ff9bab;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  padding: 10px 12px;
}

.v5-pattern-result {
  background: var(--v5-panel-soft);
  border: 1px solid var(--v5-line);
  border-radius: 18px;
  margin-top: 12px;
  padding: 15px;
}

.v5-pattern-result-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.v5-pattern-result-head h2 {
  font-size: 20px;
  margin: 4px 0 0;
}

.v5-pattern-result-head > span {
  color: #71839d;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  padding-top: 3px;
}

.v5-pattern-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
}

.v5-pattern-steps {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.v5-pattern-steps li {
  display: grid;
  gap: 10px;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 54px;
  position: relative;
}

.v5-pattern-steps li:not(:last-child)::after {
  background: rgba(104, 139, 184, 0.24);
  content: "";
  height: calc(100% - 18px);
  left: 8px;
  position: absolute;
  top: 17px;
  width: 1px;
}

.v5-pattern-steps li > i {
  background: #26384f;
  border: 2px solid #647892;
  border-radius: 50%;
  height: 17px;
  margin-top: 1px;
  width: 17px;
}

.v5-pattern-steps li.done > i {
  background: var(--v5-green);
  border-color: var(--v5-green);
  box-shadow: inset 0 0 0 4px #0a1b23;
}

.v5-pattern-steps li.current > i {
  background: var(--v5-blue);
  border-color: var(--v5-blue);
  box-shadow: 0 0 0 4px rgba(98, 168, 247, 0.12);
}

.v5-pattern-steps li.warning > i {
  background: var(--v5-orange);
  border-color: var(--v5-orange);
}

.v5-pattern-steps li.locked {
  opacity: 0.48;
}

.v5-pattern-steps strong,
.v5-pattern-steps small {
  display: block;
}

.v5-pattern-steps strong {
  color: #dce9f8;
  font-size: 13px;
  font-weight: 560;
}

.v5-pattern-steps small {
  color: #7f92aa;
  font-size: 10.5px;
  line-height: 1.45;
  margin-top: 3px;
}

.v5-pattern-blocker {
  background: rgba(255, 154, 77, 0.08);
  border: 1px solid rgba(255, 154, 77, 0.24);
  border-radius: 12px;
  margin: 4px 0 12px;
  padding: 13px;
}

.v5-pattern-blocker span,
.v5-pattern-blocker strong {
  display: block;
}

.v5-pattern-blocker span {
  color: var(--v5-orange);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.v5-pattern-blocker strong {
  color: #f3dfca;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 5px;
}

.v5-pattern-blocker p {
  color: #9b8e82;
  font-size: 11px;
  line-height: 1.55;
  margin: 7px 0 0;
}

.v5-pattern-analysis-card {
  background: #091728;
  border: 1px solid rgba(104, 139, 184, 0.2);
  border-radius: 14px;
  margin: 12px 0;
  padding: 13px;
}

.v5-pattern-section-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 11px;
}

.v5-pattern-section-head span,
.v5-pattern-section-head small {
  color: #71839d;
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.v5-pattern-section-head h3 {
  color: #e7f0fb;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 3px 0 0;
}

.v5-pattern-section-head small {
  letter-spacing: 0;
  line-height: 1.4;
  max-width: 36%;
  text-align: right;
}

.v5-pattern-choice-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v5-pattern-choice {
  background: #07111e;
  border: 1px solid rgba(104, 139, 184, 0.28);
  border-radius: 11px;
  color: #a7b8cc;
  display: grid;
  font: inherit;
  gap: 4px;
  min-width: 0;
  padding: 9px 7px;
  text-align: left;
}

.v5-pattern-choice.selected {
  background: rgba(61, 132, 222, 0.12);
  border-color: var(--v5-blue);
  box-shadow: inset 0 0 0 1px rgba(98, 168, 247, 0.18);
}

.v5-pattern-choice b {
  color: #dce9f8;
  font-size: 11px;
  font-weight: 560;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.v5-pattern-choice span {
  font-size: 10.5px;
  line-height: 1.35;
}

.v5-pattern-choice strong {
  color: var(--v5-blue);
  font-size: 15px;
  font-weight: 650;
}

.v5-pattern-auto-result {
  align-items: center;
  background: rgba(61, 132, 222, 0.1);
  border: 1px solid rgba(98, 168, 247, 0.48);
  border-radius: 11px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 11px;
}

.v5-pattern-auto-result > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.v5-pattern-auto-result b {
  color: #e7f0fb;
  font-size: 12px;
  line-height: 1.4;
}

.v5-pattern-auto-result span {
  color: #8fa4bd;
  font-size: 10px;
  line-height: 1.5;
}

.v5-pattern-auto-result strong {
  color: var(--v5-blue);
  font-size: 18px;
}

.v5-pattern-adjust {
  border-top: 1px solid rgba(104, 139, 184, 0.14);
  margin-top: 11px;
  padding-top: 9px;
}

.v5-pattern-adjust summary {
  color: #7faee4;
  cursor: pointer;
  font-size: 11.5px;
  line-height: 1.5;
}

.v5-pattern-adjust[open] summary {
  margin-bottom: 9px;
}

.v5-pattern-detected-stock {
  align-items: center;
  background: rgba(71, 208, 166, 0.08);
  border: 1px solid rgba(71, 208, 166, 0.32);
  border-radius: 13px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 13px;
}

.v5-pattern-detected-stock > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.v5-pattern-detected-stock small,
.v5-pattern-detected-stock span {
  color: #86a69f;
  font-size: 10px;
}

.v5-pattern-detected-stock strong {
  color: #dffcf3;
  font-size: 15px;
}

.v5-pattern-detected-stock button {
  background: transparent;
  border: 0;
  color: var(--v5-blue);
  flex: 0 0 auto;
  font: inherit;
  font-size: 12px;
  padding: 8px 0 8px 8px;
}

.v5-pattern-stock-fallback {
  background: rgba(229, 168, 92, 0.07);
  border: 1px solid rgba(229, 168, 92, 0.25);
  border-radius: 13px;
  padding: 12px;
}

.v5-pattern-stock-fallback > span {
  color: #f4c985;
}

.v5-pattern-advanced-note {
  background: rgba(104, 139, 184, 0.07);
  border-radius: 8px;
  color: #8295ad;
  font-size: 11px;
  line-height: 1.55;
  margin: 0 0 10px;
  padding: 8px 9px;
}

.v5-pattern-sync-state {
  color: var(--v5-blue);
  font-size: 10px;
  line-height: 1.5;
  margin: 8px 0 0;
}

.v5-pattern-sync-state[hidden] {
  display: none;
}

.v5-pattern-window-rule {
  align-items: start;
  background: rgba(98, 168, 247, 0.07);
  border-radius: 9px;
  display: grid;
  gap: 3px;
  margin: 10px 0 0;
  padding: 9px 10px;
}

.v5-pattern-window-rule b {
  color: #cfe3fa;
  font-size: 11px;
}

.v5-pattern-window-rule span {
  color: #7f93ad;
  font-size: 10.5px;
  line-height: 1.5;
}

.v5-pattern-apply-point {
  background: #215fcf;
  border: 0;
  border-radius: 9px;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  margin-top: 8px;
  min-height: 40px;
  padding: 8px 12px;
  width: 100%;
}

.v5-pattern-apply-point:disabled {
  background: rgba(104, 139, 184, 0.14);
  color: #71839d;
}

.v5-pattern-batch-apply {
  border-top: 1px solid rgba(104, 139, 184, 0.2);
  margin-top: 12px;
  padding-top: 11px;
}

.v5-pattern-batch-apply > p:first-child {
  color: #91a5bf;
  font-size: 11px;
  line-height: 1.55;
  margin: 0;
}

.v5-pattern-strategy-update {
  background: rgba(48, 196, 152, 0.09);
  border: 1px solid rgba(48, 196, 152, 0.24);
  border-radius: 9px;
  color: #72daba;
  font-size: 10.5px;
  line-height: 1.55;
  margin: 0 0 11px;
  padding: 8px 9px;
}

.v5-pattern-method {
  color: #71839d;
  font-size: 11px;
  line-height: 1.55;
  margin: 10px 0 0;
}

.v5-pattern-kline {
  background: #07111e;
  border: 1px solid rgba(104, 139, 184, 0.18);
  border-radius: 11px;
  display: block;
  height: auto;
  overflow: visible;
  width: 100%;
}

.v5-pattern-feature-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v5-pattern-feature-grid > div {
  background: #07111e;
  border-radius: 10px;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
}

.v5-pattern-feature-grid span {
  color: #71839d;
  font-size: 9.5px;
}

.v5-pattern-feature-grid strong {
  color: #e7f0fb;
  font-size: 15px;
  font-weight: 620;
}

.v5-pattern-conditions {
  color: #9eb0c5;
  display: grid;
  font-size: 10.5px;
  gap: 5px;
  line-height: 1.45;
  margin: 11px 0 0;
  padding-left: 17px;
}

.v5-pattern-manual-date {
  border-top: 1px solid rgba(104, 139, 184, 0.16);
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
}

.v5-pattern-manual-date label,
.v5-pattern-blocks-title span {
  color: #71839d;
  font-size: 10px;
  line-height: 1.45;
}

.v5-pattern-manual-date > div {
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.v5-pattern-manual-date input,
.v5-pattern-manual-date button {
  border: 1px solid rgba(104, 139, 184, 0.28);
  border-radius: 9px;
  color: #dce9f8;
  font: inherit;
  min-height: 40px;
}

.v5-pattern-manual-date input {
  background: #07111e;
  color-scheme: dark;
  min-width: 0;
  padding: 0 10px;
}

.v5-pattern-manual-date button {
  background: rgba(61, 132, 222, 0.18);
  border-color: rgba(98, 168, 247, 0.46);
  padding: 0 13px;
}

.v5-pattern-blocks {
  border-top: 1px solid rgba(104, 139, 184, 0.16);
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
}

.v5-pattern-blocks-title {
  align-items: baseline;
  display: flex;
  gap: 7px;
  justify-content: space-between;
}

.v5-pattern-blocks-title b {
  color: #dce9f8;
  font-size: 12px;
}

.v5-pattern-block {
  align-items: center;
  background: #07111e;
  border: 1px solid rgba(104, 139, 184, 0.14);
  border-radius: 9px;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) 58px 33px;
  padding: 8px 9px;
}

.v5-pattern-block.active {
  border-color: rgba(98, 168, 247, 0.34);
}

.v5-pattern-block > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.v5-pattern-block b,
.v5-pattern-block span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-pattern-block b {
  color: #c9d8ea;
  font-size: 11.5px;
}

.v5-pattern-block span {
  color: #657a95;
  font-size: 10.5px;
}

.v5-pattern-block > i {
  background: rgba(104, 139, 184, 0.16);
  border-radius: 99px;
  height: 4px;
  overflow: hidden;
}

.v5-pattern-block > i em {
  background: #526c8d;
  border-radius: inherit;
  display: block;
  height: 100%;
}

.v5-pattern-block.active > i em {
  background: var(--v5-blue);
}

.v5-pattern-block > strong {
  color: #7890ac;
  font-size: 11px;
  text-align: right;
}

.v5-pattern-block.active > strong {
  color: var(--v5-blue);
}

.v5-pattern-block > button {
  background: rgba(104, 139, 184, 0.08);
  border: 1px solid rgba(104, 139, 184, 0.2);
  border-radius: 7px;
  color: #8295ad;
  font: inherit;
  font-size: 9.5px;
  grid-column: 1 / -1;
  min-height: 30px;
}

.v5-pattern-block.selected-filter {
  background: rgba(61, 132, 222, 0.1);
  border-color: var(--v5-blue);
}

.v5-pattern-block.selected-filter > button {
  background: rgba(61, 132, 222, 0.18);
  border-color: rgba(98, 168, 247, 0.5);
  color: #90c5ff;
}

.v5-pattern-system-blocks .v5-pattern-block {
  grid-template-columns: minmax(0, 1fr) 72px 36px;
}

.v5-pattern-system-blocks .v5-pattern-block span {
  line-height: 1.4;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.v5-pattern-strategy-advanced {
  margin-top: 12px;
}

.v5-pattern-filter-blocks {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.v5-pattern-market-filters {
  background: rgba(104, 139, 184, 0.06);
  border: 1px solid rgba(104, 139, 184, 0.16);
  border-radius: 10px;
  margin-bottom: 11px;
  padding: 10px;
}

.v5-pattern-filter-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 9px;
}

.v5-pattern-filter-fields label {
  color: #8295ad;
  display: grid;
  font-size: 10.5px;
  gap: 5px;
}

.v5-pattern-filter-fields label.wide {
  grid-column: 1 / -1;
}

.v5-pattern-filter-fields input,
.v5-pattern-filter-fields select {
  background: #07111e;
  border: 1px solid rgba(104, 139, 184, 0.28);
  border-radius: 8px;
  color: #dce9f8;
  font: inherit;
  min-height: 38px;
  min-width: 0;
  padding: 0 9px;
  width: 100%;
}

.v5-pattern-filter-fields label.check {
  align-items: center;
  display: flex;
  gap: 8px;
}

.v5-pattern-filter-fields label.check input {
  accent-color: #62a8f7;
  min-height: 18px;
  width: 18px;
}

.v5-pattern-block.chip b em {
  background: rgba(229, 168, 92, 0.14);
  border-radius: 4px;
  color: #efbb77;
  font-size: 9px;
  font-style: normal;
  margin-right: 5px;
  padding: 2px 4px;
}

.v5-pattern-chip-status {
  color: #8295ad;
  font-size: 10.5px;
  line-height: 1.5;
  margin: 10px 0;
}

.v5-pattern-apply-filters {
  background: #215fcf;
  border: 0;
  border-radius: 9px;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  min-height: 42px;
  width: 100%;
}

.v5-pattern-choice.pending {
  border-color: #8bc5ff;
  box-shadow: inset 0 0 0 1px rgba(139, 197, 255, 0.3), 0 0 0 2px rgba(61, 132, 222, 0.08);
}

.v5-pattern-block-import {
  background: rgba(104, 139, 184, 0.05);
  border: 1px solid rgba(104, 139, 184, 0.16);
  border-radius: 10px;
  margin: 10px 0;
  padding: 9px 10px;
}

.v5-pattern-block-import summary {
  color: #9dc9fa;
  cursor: pointer;
  font-size: 11.5px;
}

.v5-pattern-block-import p,
.v5-pattern-block-transfer-status {
  color: #8295ad;
  font-size: 10.5px;
  line-height: 1.5;
  margin: 8px 0;
}

.v5-pattern-block-import code {
  color: #a9d1ff;
  font-size: 10px;
}

.v5-pattern-block-import textarea {
  background: #07111e;
  border: 1px solid rgba(104, 139, 184, 0.3);
  border-radius: 8px;
  color: #cbd9ea;
  font: 10px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  min-height: 112px;
  padding: 8px;
  resize: vertical;
  width: 100%;
}

.v5-pattern-block-import button {
  background: rgba(61, 132, 222, 0.16);
  border: 1px solid rgba(98, 168, 247, 0.4);
  border-radius: 8px;
  color: #9dc9fa;
  font: inherit;
  font-size: 11px;
  min-height: 36px;
  margin-top: 7px;
  width: 100%;
}

.v5-pattern-block-transfer-status {
  background: rgba(48, 196, 152, 0.07);
  border-radius: 7px;
  color: #8fd7c1;
  padding: 7px 8px;
}

.v5-pattern-scan-filter-summary {
  background: rgba(48, 196, 152, 0.07);
  border: 1px solid rgba(48, 196, 152, 0.18);
  border-radius: 9px;
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
  padding: 9px 10px;
}

.v5-pattern-scan-filter-summary b {
  color: #bcebdc;
  font-size: 11px;
}

.v5-pattern-scan-filter-summary span {
  color: #7fa597;
  font-size: 10.5px;
  line-height: 1.45;
}

.v5-pattern-step4-blocks {
  background: rgba(61, 132, 222, 0.07);
  border: 1px solid rgba(98, 168, 247, 0.2);
  border-radius: 10px;
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
  padding: 10px;
}

.v5-pattern-step4-blocks-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.v5-pattern-step4-blocks-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.v5-pattern-step4-blocks-head b {
  color: #dce9f8;
  font-size: 11.5px;
}

.v5-pattern-step4-blocks-head span {
  color: #71839d;
  font-size: 10px;
}

.v5-pattern-step4-blocks-head button {
  background: rgba(61, 132, 222, 0.16);
  border: 1px solid rgba(98, 168, 247, 0.42);
  border-radius: 8px;
  color: #9dc9fa;
  flex: 0 0 auto;
  font: inherit;
  font-size: 10.5px;
  min-height: 34px;
  padding: 0 9px;
}

.v5-pattern-step4-block-groups {
  display: grid;
  gap: 6px;
}

.v5-pattern-step4-block-groups p {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.v5-pattern-step4-block-groups p > span {
  color: #71839d;
  flex: 0 0 58px;
  font-size: 10px;
}

.v5-pattern-step4-block-groups em {
  background: rgba(98, 168, 247, 0.12);
  border-radius: 999px;
  color: #a9d1ff;
  font-size: 10px;
  font-style: normal;
  padding: 4px 7px;
}

.v5-pattern-step4-block-groups em.required {
  background: rgba(48, 196, 152, 0.12);
  color: #8de0c6;
}

.v5-pattern-step4-block-groups small {
  color: #71839d;
  font-size: 10px;
}

.v5-pattern-advanced,
.v5-pattern-learned {
  border-top: 1px solid rgba(104, 139, 184, 0.16);
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
}

.v5-pattern-advanced-item {
  align-items: center;
  background: #07111e;
  border: 1px solid rgba(104, 139, 184, 0.14);
  border-radius: 9px;
  display: grid;
  gap: 3px 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px;
}

.v5-pattern-advanced-item.strong {
  border-color: rgba(48, 196, 152, 0.38);
}

.v5-pattern-advanced-item > div {
  display: grid;
  gap: 2px;
  grid-row: 1 / 3;
  min-width: 0;
}

.v5-pattern-advanced-item b {
  color: #dce9f8;
  font-size: 11.5px;
}

.v5-pattern-advanced-item span,
.v5-pattern-advanced-item small {
  color: #71839d;
  font-size: 10.5px;
  line-height: 1.4;
}

.v5-pattern-advanced-item small {
  color: #526983;
}

.v5-pattern-advanced-item > strong {
  color: var(--v5-blue);
  font-size: 13px;
  text-align: right;
}

.v5-pattern-advanced-item > em {
  color: #71839d;
  font-size: 10px;
  font-style: normal;
  text-align: right;
}

.v5-pattern-verification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid rgba(64, 204, 164, 0.35);
  border-radius: 14px;
  background: rgba(35, 137, 112, 0.08);
}
.v5-pattern-verification.blocked {
  border-color: rgba(255, 104, 125, 0.42);
  background: rgba(148, 48, 67, 0.12);
}
.v5-pattern-verification div {
  display: grid;
  gap: 4px;
}
.v5-pattern-verification span {
  color: #8ea0b7;
  font-size: 12px;
  line-height: 1.5;
}
.v5-pattern-verification strong {
  color: #67d5b3;
  white-space: nowrap;
}
.v5-pattern-verification.blocked strong {
  color: #ff7f93;
}
.v5-pattern-indicators {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-top: 6px;
}
.v5-pattern-indicators span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(83, 112, 150, 0.13);
  color: #91a5bf;
  font-size: 10px;
}

.v5-pattern-seed-item {
  background: #07111e;
  border: 1px solid rgba(104, 139, 184, 0.2);
  border-radius: 11px;
  overflow: hidden;
}

.v5-pattern-seed-item.is-outlier {
  border-color: rgba(229, 168, 92, 0.4);
  border-style: dashed;
  opacity: 0.82;
}

.v5-pattern-seed-item > summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  list-style: none;
  padding: 10px;
}

.v5-pattern-seed-item > summary::-webkit-details-marker {
  display: none;
}

.v5-pattern-seed-item > summary i {
  align-items: center;
  background: rgba(98, 168, 247, 0.14);
  border-radius: 50%;
  color: var(--v5-blue);
  display: flex;
  font-size: 10px;
  font-style: normal;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.v5-pattern-seed-item > summary div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.v5-pattern-seed-item > summary b {
  color: #dce9f8;
  font-size: 12px;
}

.v5-pattern-seed-item > summary span {
  color: #71839d;
  font-size: 10.5px;
  line-height: 1.4;
}

.v5-pattern-seed-item > summary .v5-pattern-seed-status {
  border-radius: 999px;
  font-size: 9.5px;
  font-style: normal;
  justify-self: start;
  line-height: 1;
  padding: 4px 7px;
}

.v5-pattern-seed-status.core {
  background: rgba(48, 196, 152, 0.11);
  color: #57d6af;
}

.v5-pattern-seed-status.outlier {
  background: rgba(229, 168, 92, 0.12);
  color: #efbb77;
}

.v5-pattern-seed-item > summary > strong {
  color: var(--v5-blue);
  display: grid;
  font-size: 12px;
  gap: 2px;
  text-align: right;
}

.v5-pattern-adaptive-weights {
  background: rgba(46, 117, 213, 0.07);
  border: 1px solid rgba(98, 168, 247, 0.2);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  margin-top: 10px;
  padding: 9px 10px;
}

.v5-pattern-adaptive-weights b,
.v5-pattern-adaptive-weights small {
  flex: 1 0 100%;
}

.v5-pattern-adaptive-weights b {
  color: #dce9f8;
  font-size: 10.5px;
}

.v5-pattern-adaptive-weights span,
.v5-pattern-adaptive-weights small {
  color: #8195ae;
  font-size: 10.5px;
  line-height: 1.45;
}

.v5-pattern-adaptive-weights span {
  color: #62a8f7;
}

.v5-pattern-seed-item > summary > strong small {
  color: #71839d;
  font-size: 9.5px;
  font-weight: 500;
}

.v5-pattern-seed-chart {
  border-top: 1px solid rgba(104, 139, 184, 0.14);
  padding: 9px;
}

.v5-pattern-seed-chart p {
  color: #8295ad;
  font-size: 10px;
  margin: 7px 0 0;
}

.v5-pattern-seed-chart .v5-pattern-date-lock {
  color: #57d6af;
}

.v5-pattern-cohesion {
  align-items: center;
  background: rgba(46, 117, 213, 0.08);
  border: 1px solid rgba(98, 168, 247, 0.3);
  border-radius: 13px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.v5-pattern-cohesion > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.v5-pattern-cohesion span,
.v5-pattern-cohesion small {
  color: #7f93ad;
  font-size: 10.5px;
  line-height: 1.45;
}

.v5-pattern-cohesion b {
  color: #dce9f8;
  font-size: 11.5px;
}

.v5-pattern-cohesion > strong {
  color: var(--v5-blue);
  flex: 0 0 auto;
  font-size: 18px;
}

.v5-pattern-cohesion.low {
  border-color: rgba(229, 168, 92, 0.4);
}

.v5-pattern-cohesion.low > strong {
  color: #efbb77;
}
.v5-pattern-timing {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 10px;
}
.v5-pattern-timing span {
  color: #8294ac;
  font-size: 11px;
}
.v5-pattern-timing button {
  border: 1px solid rgba(96, 128, 170, 0.28);
  border-radius: 8px;
  background: rgba(35, 53, 77, 0.5);
  color: #91a5bf;
  padding: 6px 10px;
}
.v5-pattern-timing button.active {
  border-color: #62a8f7;
  color: #d9ebff;
  background: rgba(48, 112, 205, 0.25);
}
.v5-pattern-feedback button.uncertain {
  border-color: #e5a85c;
  color: #f4c985;
}
.v5-pattern-replay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.v5-pattern-replay-grid div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 11px;
  background: rgba(30, 49, 74, 0.55);
}
.v5-pattern-replay-grid span,
.v5-pattern-replay-grid small {
  color: #8194ae;
  font-size: 10.5px;
  line-height: 1.45;
}
.v5-pattern-replay-grid b {
  color: #dbe7f5;
  font-size: 12px;
  line-height: 1.4;
}

.v5-pattern-replay-origin {
  background: rgba(98, 168, 247, 0.07);
  border: 1px solid rgba(98, 168, 247, 0.22);
  border-radius: 11px;
  margin-top: 11px;
  padding: 11px;
}

.v5-pattern-replay-origin > strong {
  color: #dcecff;
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

.v5-pattern-replay-origin > p,
.v5-pattern-replay-origin > small {
  color: #8da2bd;
  display: block;
  font-size: 10.5px;
  line-height: 1.55;
  margin: 5px 0 0;
}

.v5-pattern-replay-origin > small {
  border-top: 1px solid rgba(104, 139, 184, 0.16);
  margin-top: 8px;
  padding-top: 7px;
}

.v5-pattern-replay-origin ol {
  display: grid;
  gap: 5px;
  list-style: none;
  margin: 9px 0 0;
  padding: 0;
}

.v5-pattern-replay-origin li {
  align-items: start;
  color: #b8c8dc;
  display: grid;
  font-size: 10.5px;
  gap: 7px;
  grid-template-columns: 18px minmax(0, 1fr);
  line-height: 1.45;
}

.v5-pattern-replay-origin li i {
  align-items: center;
  background: rgba(98, 168, 247, 0.15);
  border-radius: 50%;
  color: #71b3ff;
  display: flex;
  font-size: 9px;
  font-style: normal;
  height: 18px;
  justify-content: center;
  width: 18px;
}

.replay-card > p,
.replay-card > small,
.replay-card details,
.v5-pattern-replay-summary {
  color: #8194ae;
  font-size: 10.5px;
  line-height: 1.55;
}

.v5-pattern-replay-running {
  align-items: center;
  background: rgba(98, 168, 247, 0.08);
  border: 1px solid rgba(98, 168, 247, 0.22);
  border-radius: 11px;
  display: grid;
  gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr);
  margin: 10px 0;
  padding: 11px;
}

.v5-pattern-replay-running i {
  animation: v5-pattern-spin 0.9s linear infinite;
  border: 2px solid rgba(98, 168, 247, 0.2);
  border-radius: 50%;
  border-top-color: #62a8f7;
  height: 20px;
  width: 20px;
}

.v5-pattern-replay-running div {
  display: grid;
  gap: 2px;
}

.v5-pattern-replay-running b {
  color: #dce9f8;
  font-size: 11.5px;
}

.v5-pattern-replay-running span,
.v5-pattern-replay-running small {
  color: #8194ae;
  font-size: 10.5px;
  line-height: 1.45;
}

@keyframes v5-pattern-spin {
  to { transform: rotate(360deg); }
}
.v5-pattern-replay-events {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  max-height: 260px;
  overflow: auto;
}
.v5-pattern-replay-events span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #b8c6d9;
  font-size: 11px;
}
.v5-pattern-replay-events em.up {
  color: #ff7f93;
}
.v5-pattern-replay-events em.down {
  color: #50d4ae;
}

.v5-pattern-refine-panel {
  background: rgba(61, 132, 222, 0.08);
  border: 1px solid rgba(98, 168, 247, 0.28);
  border-radius: 11px;
  display: grid;
  gap: 8px;
  margin-bottom: 11px;
  padding: 10px;
}

.v5-pattern-seed-adjust {
  border-top: 1px solid rgba(104, 139, 184, 0.14);
  margin-top: 10px;
  padding-top: 8px;
}

.v5-pattern-seed-adjust > summary {
  color: var(--v5-blue);
  cursor: pointer;
  font-size: 10px;
  list-style: none;
  padding: 3px 0;
}

.v5-pattern-seed-adjust > summary::before {
  content: "＋";
  display: inline-block;
  margin-right: 5px;
}

.v5-pattern-seed-adjust[open] > summary::before {
  content: "−";
}

.v5-pattern-seed-adjust-body {
  display: grid;
  gap: 8px;
  padding-top: 6px;
}

.v5-pattern-seed-adjust-body > p {
  margin: 0;
}

.v5-pattern-replay-scope {
  color: #71839d;
  font-size: 10.5px;
  line-height: 1.5;
}

.v5-pattern-refine-footer {
  margin: 11px 0 0;
}

.v5-pattern-refine-panel > div {
  display: grid;
  gap: 2px;
}

.v5-pattern-refine-panel b {
  color: #dce9f8;
  font-size: 11px;
}

.v5-pattern-refine-panel span,
.v5-pattern-refine-panel p {
  color: #71839d;
  font-size: 9.5px;
  line-height: 1.45;
  margin: 0;
}

.v5-pattern-refine-panel button {
  background: #215fcf;
  border: 0;
  border-radius: 9px;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  min-height: 40px;
}

.v5-pattern-refine-panel button:disabled {
  background: rgba(104, 139, 184, 0.16);
  color: #687c95;
}

.v5-pattern-learned {
  border: 0;
  margin: 0 0 11px;
  padding: 0;
}

.v5-pattern-learned > span {
  background: rgba(104, 139, 184, 0.08);
  border-radius: 7px;
  color: #8295ad;
  font-size: 9.5px;
  padding: 6px 8px;
}

.v5-pattern-learned > span.include {
  color: var(--v5-green);
}

.v5-pattern-learned > span.avoid {
  color: #ff8798;
}

.v5-pattern-match-list {
  display: grid;
  gap: 7px;
}

.v5-pattern-match-wrap {
  background: #07111e;
  border: 1px solid rgba(104, 139, 184, 0.18);
  border-radius: 11px;
  overflow: hidden;
  scroll-margin-top: 92px;
}

.v5-pattern-round-summary {
  background: rgba(42, 105, 184, 0.09);
  border: 1px solid rgba(98, 168, 247, 0.24);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  margin: 0 0 11px;
  padding: 10px;
}

.v5-pattern-round-summary > div {
  display: grid;
  gap: 3px;
}

.v5-pattern-round-summary b {
  color: #dce9f8;
  font-size: 12px;
}

.v5-pattern-round-summary span {
  color: #8ca0b8;
  font-size: 10.5px;
  line-height: 1.45;
}

.v5-pattern-round-summary p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.v5-pattern-round-summary p span {
  background: rgba(104, 139, 184, 0.1);
  border-radius: 999px;
  padding: 4px 7px;
}

.v5-pattern-match {
  align-items: start;
  background: #07111e;
  border: 0;
  border-radius: 11px;
  display: grid;
  gap: 8px;
  grid-template-columns: 22px minmax(0, 1fr);
  padding: 9px;
}

.v5-pattern-phase-counts {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 6px;
}

.v5-pattern-phase-counts span {
  background: rgba(104, 139, 184, 0.08);
  border: 1px solid rgba(104, 139, 184, 0.15);
  border-radius: 9px;
  color: #8ca0b8;
  display: grid;
  font-size: 10.5px;
  gap: 2px;
  padding: 8px;
  text-align: center;
}

.v5-pattern-phase-counts b {
  color: #dce9f8;
  font-size: 13px;
}

.v5-pattern-stage-note {
  color: #71839d;
  font-size: 10.5px;
  line-height: 1.45;
  margin: 0 0 11px;
}

.v5-pattern-chart-toggle {
  background: transparent;
  border: 0;
  color: #62a8f7;
  font: inherit;
  font-size: 10.5px;
  justify-self: start;
  padding: 2px 0 0;
}

.v5-pattern-match-chart {
  border-top: 1px solid rgba(104, 139, 184, 0.14);
  padding: 9px;
}

.v5-pattern-match-chart .v5-pattern-kline {
  max-height: 230px;
}

.v5-pattern-match-chart p {
  color: #71839d;
  font-size: 10px;
  margin: 8px;
  text-align: center;
}

.v5-pattern-match > i {
  color: #586d87;
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.v5-pattern-match-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.v5-pattern-match-title {
  align-items: baseline;
  display: flex;
  gap: 9px;
  justify-content: space-between;
  min-width: 0;
}

.v5-pattern-match-title b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.v5-pattern-match-title strong {
  color: var(--v5-blue);
  flex: 0 0 auto;
  font-size: 14px;
}

.v5-pattern-match-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.v5-pattern-match-meta > span:not(.v5-pattern-phase) {
  color: #71839d;
  font-size: 10.5px;
}

.v5-pattern-phase {
  border-radius: 999px;
  display: inline-flex;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
  padding: 4px 7px;
}

.v5-pattern-phase.forming {
  background: rgba(98, 168, 247, 0.12);
  color: #82baf8;
}

.v5-pattern-phase.ready {
  background: rgba(229, 168, 92, 0.13);
  color: #efbb77;
}

.v5-pattern-phase.triggered {
  background: rgba(48, 196, 152, 0.13);
  color: #57d6af;
}

.v5-pattern-match b {
  color: #dce9f8;
  font-size: 12px;
  font-weight: 580;
}

.v5-pattern-match-reasons,
.v5-pattern-match-block-line {
  font-size: 10.5px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.v5-pattern-match-reasons {
  color: #8ca0b8;
}

.v5-pattern-match-block-line.good {
  color: #56cba9;
}

.v5-pattern-match-block-line.warning {
  color: #ff8798;
}

.v5-pattern-match-block-line.muted {
  color: #71839d;
}

.v5-pattern-feedback {
  display: flex;
  gap: 4px;
  grid-column: 2;
  justify-self: end;
}

.v5-pattern-score-parts {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.v5-pattern-score-parts span {
  background: rgba(104, 139, 184, 0.09);
  border-radius: 7px;
  color: #91a5bd;
  font-size: 10.5px;
  padding: 6px 7px;
}

.v5-pattern-feedback button {
  align-items: center;
  background: rgba(104, 139, 184, 0.12);
  border: 1px solid rgba(104, 139, 184, 0.22);
  border-radius: 8px;
  color: #8295ad;
  display: inline-flex;
  font: inherit;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.v5-pattern-feedback button.active:first-child {
  background: rgba(48, 196, 152, 0.14);
  border-color: var(--v5-green);
  color: var(--v5-green);
}

.v5-pattern-feedback button.active:nth-child(2) {
  background: rgba(255, 104, 125, 0.12);
  border-color: #ff687d;
  color: #ff8798;
}

.v5-pattern-feedback button.active.uncertain {
  background: rgba(229, 168, 92, 0.12);
  border-color: #e5a85c;
  color: #f4c985;
}

.scan-card .v5-pattern-secondary {
  margin-top: 9px;
  min-height: 40px;
}

@media (max-width: 390px) {
  .v5-pattern-match {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .v5-pattern-match-main {
    grid-column: 2 / -1;
  }

  .v5-pattern-feedback {
    grid-column: 2 / -1;
  }
}

.v5-pattern-example-scores {
  border-top: 1px solid rgba(104, 139, 184, 0.12);
  display: grid;
  gap: 5px;
  margin-top: 9px;
  padding-top: 9px;
}

.v5-pattern-example-scores > b {
  color: #9fb0c6;
  font-size: 10.5px;
}

.v5-pattern-example-scores > span {
  align-items: center;
  color: #7f93ad;
  display: flex;
  font-size: 10.5px;
  gap: 8px;
  justify-content: space-between;
}

.v5-pattern-example-scores em {
  font-style: normal;
  overflow-wrap: anywhere;
}

.v5-pattern-example-scores strong {
  color: var(--v5-blue);
  flex: 0 0 auto;
}

@media (min-width: 760px) {
  .v5-pattern-intro,
  .v5-pattern-form,
  .v5-pattern-result,
  .v5-pattern-login {
    margin-left: auto;
    margin-right: auto;
    max-width: 720px;
  }

  .v5-pattern-form {
    padding: 18px;
  }
}

.v5-workspace[hidden] {
  display: none;
}

.v5-workspace {
  background: #07111e;
  color: var(--text-primary, #e9f0fa);
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  position: fixed;
  z-index: 80;
}

.v5-workspace-head {
  align-items: center;
  background: rgba(7, 17, 30, 0.94);
  display: grid;
  gap: 8px;
  grid-template-columns: 36px minmax(0, 1fr) auto 32px;
  margin: -12px -12px 0;
  padding: max(12px, env(safe-area-inset-top)) 12px 12px;
  position: sticky;
  top: -12px;
  z-index: 4;
}

.v5-share-button {
  align-items: center;
  background: rgba(20, 52, 91, 0.46);
  border: 1px solid rgba(98, 168, 247, 0.42);
  border-radius: 10px;
  color: var(--v5-blue);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  justify-self: end;
  padding: 0;
  width: 32px;
}

.v5-share-button svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 16px;
}

.v5-share-button:disabled {
  opacity: 0.55;
}

.v5-share-button[hidden] {
  display: none !important;
}

.v5-back {
  background: transparent;
  border: 0;
  color: var(--text-primary, #e9f0fa);
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
  padding: 0;
}

.v5-workspace-head h1 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  margin: 2px 0 0;
}

.v5-workspace-head > span {
  align-items: flex-end;
  color: var(--text-muted, #71839d);
  display: flex;
  flex-direction: column;
  font-size: 11px;
  line-height: 1.35;
  max-width: 112px;
  min-width: 0;
  text-align: right;
}

.v5-workspace-head > span > span {
  display: block;
  white-space: nowrap;
}

.v5-page-time {
  color: var(--text-muted, #71839d);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
  margin: 8px 0 0;
}

.v5-page-time strong {
  color: var(--text-secondary, #aab8cb);
  font-weight: 400;
}

.v5-source-state.stale {
  color: var(--v5-orange);
}

.v5-etf-freshness-state {
  margin: 8px 0 0;
}

.v5-warning {
  color: var(--v5-orange) !important;
}

.v5-share-exporting {
  --text-muted: #8496af;
  --text-primary: #f1f5fb;
  --text-secondary: #b8c6d8;
  --v5-line: rgba(120, 154, 198, 0.3);
  --v5-panel: #102039;
  --v5-panel-soft: #0e1c30;
  animation: none !important;
  background: #07111e !important;
  filter: none !important;
  height: auto !important;
  inset: auto !important;
  opacity: 1 !important;
  overflow: visible !important;
  position: relative !important;
  transform: none !important;
}

.v5-share-exporting .v5-workspace-head,
.v5-share-exporting .v5-workspace-tabs {
  position: static !important;
}

.v5-share-exporting .v5-workspace-head {
  background: #07111e !important;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  margin-top: 0;
}

.v5-share-exporting .v5-workspace-tabs {
  background: #102139 !important;
}

.v5-share-exporting [data-html2canvas-ignore="true"] {
  display: none !important;
}

.v5-workspace-tabs {
  background: rgba(12, 24, 41, 0.96);
  border: 1px solid var(--v5-line);
  border-radius: 12px;
  display: flex;
  gap: 2px;
  margin: 8px auto 16px;
  max-width: 720px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 3px;
  position: sticky;
  scroll-snap-type: inline proximity;
  scrollbar-width: none;
  top: 66px;
  z-index: 3;
}

.v5-workspace-tabs button {
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--text-secondary, #aab8cb);
  flex: 0 0 82px;
  font-size: 13px;
  font-weight: 400;
  padding: 9px 4px;
  scroll-snap-align: center;
}

.v5-workspace-tabs button.active {
  background: #2453d4;
  color: #eef5ff;
  font-weight: 500;
}

html[data-market="us"] .v5-workspace-tabs button:not([hidden]) {
  flex: 1 1 50%;
}

.v5-workspace-body {
  margin: 0 auto;
  max-width: 720px;
  padding-bottom: 24px;
}

html.v5-pattern-standalone .v5-workspace {
  padding-top: max(8px, env(safe-area-inset-top));
}

html.v5-pattern-standalone .v5-workspace-head {
  background: #07111e;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  margin-top: -8px;
  padding-top: max(14px, env(safe-area-inset-top));
  top: -8px;
}

html.v5-pattern-standalone .v5-share-button {
  border-radius: 8px;
  height: 28px;
  width: 28px;
}

html.v5-pattern-standalone .v5-back,
html.v5-pattern-standalone .v5-workspace-tabs {
  display: none !important;
}

html.v5-pattern-standalone .v5-workspace-body {
  padding-top: 8px;
}

html.v5-pattern-standalone .v5-pattern-result,
html.v5-pattern-standalone .v5-pattern-form,
html.v5-pattern-standalone .v5-pattern-login,
html.v5-pattern-standalone .v5-pattern-intro {
  max-width: 680px;
}

.v5-loading,
.v5-empty {
  color: var(--text-muted, #71839d);
  font-size: 13px;
  line-height: 1.6;
  padding: 40px 12px;
  text-align: center;
}

.v5-section {
  border-top: 1px solid var(--v5-line);
  margin-top: 20px;
  padding-top: 16px;
  position: relative;
}

.v5-section:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.v5-section-head {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.v5-section-head h2,
.v5-section-head h3 {
  font-size: 18px;
  font-weight: 500;
  margin: 3px 0 0;
}

.v5-section-head > span,
.v5-section-note {
  color: var(--text-muted, #71839d);
  font-size: 11px;
  line-height: 1.6;
}

.v5-section-head > span {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
}

.v5-section-status-dot {
  background: #64748b;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
  display: inline-block;
  flex: 0 0 auto;
  height: 6px;
  width: 6px;
}

.v5-section-status-dot.current {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

.v5-section-status-dot.stale {
  background: #fb923c;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

.v5-section-status-dot.corner {
  position: absolute;
  right: 3px;
  top: 3px;
}

.v5-metric-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.v5-metric {
  background: var(--v5-panel);
  min-width: 0;
  padding: 12px 8px;
}

.v5-metric:first-child {
  border-radius: 12px 0 0 12px;
}

.v5-metric:last-child {
  border-radius: 0 12px 12px 0;
}

.v5-metric span,
.v5-metric small {
  color: var(--text-secondary, #aab8cb);
  display: block;
  font-size: 11px;
  font-weight: 400;
}

.v5-metric strong {
  display: block;
  font-size: clamp(15px, 4.2vw, 18px);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-stock-metric-grid {
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v5-stock-metric-grid .v5-metric {
  padding-left: 12px;
  padding-right: 12px;
}

.v5-stock-metric-grid .v5-metric:nth-child(1) {
  border-radius: 12px 0 0 0;
}

.v5-stock-metric-grid .v5-metric:nth-child(2) {
  border-radius: 0 12px 0 0;
}

.v5-stock-metric-grid .v5-metric:nth-child(3) {
  border-radius: 0 0 0 12px;
}

.v5-stock-metric-grid .v5-metric:nth-child(4) {
  border-radius: 0 0 12px 0;
}

.v5-stock-metric-grid .v5-metric strong {
  overflow: visible;
  text-overflow: clip;
}

.v5-up {
  color: var(--v5-red) !important;
}

.v5-down {
  color: var(--v5-green) !important;
}

.v5-neutral {
  color: var(--text-primary, #e9f0fa) !important;
}

.v5-bar-list,
.v5-rank-list,
.v5-data-list {
  background: var(--v5-panel-soft);
  border: 1px solid var(--v5-line);
  border-radius: 14px;
  overflow: hidden;
}

.v5-bar-row,
.v5-rank-row,
.v5-data-row {
  align-items: center;
  border-bottom: 1px solid var(--v5-line);
  display: grid;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
}

.v5-bar-row:last-child,
.v5-rank-row:last-child,
.v5-data-row:last-child {
  border-bottom: 0;
}

.v5-bar-row {
  grid-template-columns: minmax(82px, 1fr) minmax(72px, 1.8fr) auto;
}

.v5-bar-row > span:first-child,
.v5-rank-name,
.v5-data-row > span:first-child {
  color: var(--text-secondary, #aab8cb);
  font-size: 13px;
  min-width: 0;
}

.v5-bar-track {
  background: #15263d;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.v5-bar-track i {
  background: var(--v5-blue);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.v5-bar-row strong,
.v5-rank-row strong,
.v5-data-row strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

a.v5-news-row {
  color: inherit;
  text-decoration: none;
}

.v5-news-row > span:first-child {
  display: grid;
  gap: 4px;
}

.v5-news-row > span:first-child b {
  color: var(--text-primary, #e9f0fa);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.v5-news-row > span:first-child small {
  color: var(--text-muted, #71839d);
  font-size: 11px;
}

.v5-news-row > strong {
  color: var(--v5-blue);
}

.v5-rank-row {
  grid-template-columns: 22px minmax(0, 1fr) auto;
}

button.v5-rank-row {
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: inherit;
  text-align: left;
  width: 100%;
}

.v5-rank-number {
  color: var(--v5-blue);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.v5-rank-name small {
  color: var(--text-muted, #71839d);
  display: block;
  font-size: 10px;
  margin-top: 2px;
}

.v5-segments {
  display: grid;
  gap: 4px;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  margin-bottom: 12px;
}

.v5-segments button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--v5-line);
  color: var(--text-secondary, #aab8cb);
  font-size: 12px;
  font-weight: 400;
  padding: 8px 4px;
}

.v5-segments button.active {
  border-bottom-color: var(--v5-blue);
  color: var(--v5-blue);
}

.v5-hero-number {
  color: var(--v5-red);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  margin: 4px 0 12px;
}

.v5-trend {
  height: 92px;
  margin: 8px 0 16px;
  width: 100%;
}

.v5-trend svg {
  height: 100%;
  overflow: visible;
  width: 100%;
}

.v5-trend .grid {
  stroke: rgba(104, 139, 184, 0.16);
  stroke-width: 1;
}

.v5-trend .line {
  fill: none;
  stroke: var(--v5-red);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.v5-heatmap {
  background: var(--v5-line);
  border-radius: 8px;
  height: var(--v5-heat-height, 320px);
  overflow: hidden;
  position: relative;
}

.v5-heat-tile {
  align-items: center;
  border: 1px solid rgba(5, 16, 29, 0.86);
  border-radius: 5px;
  box-sizing: border-box;
  color: #f3f7fc;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-weight: 400;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  position: absolute;
  padding: 6px;
  text-align: center;
}

.v5-heat-tile.compact {
  font-size: 9px;
  padding: 3px;
}

.v5-heat-tile strong {
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}

.v5-heat-tile.compact strong {
  font-size: 10px;
  margin-top: 2px;
}

.v5-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v5-chip {
  border: 1px solid var(--v5-line);
  border-radius: 999px;
  color: var(--text-secondary, #aab8cb);
  font-size: 11px;
  padding: 6px 10px;
}

.v5-ai-insight {
  background: rgba(40, 83, 137, 0.18);
  border-left: 2px solid var(--v5-blue);
  color: var(--text-secondary, #aab8cb);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 16px;
  padding: 10px 12px;
}

.v5-ai-insight span {
  color: var(--v5-blue);
}

.v5-primary-action {
  background: transparent;
  border: 1px solid rgba(98, 168, 247, 0.7);
  border-radius: 10px;
  color: var(--v5-blue);
  display: block;
  font-size: 13px;
  font-weight: 400;
  margin-top: 16px;
  padding: 11px 12px;
  text-align: center;
  width: 100%;
}

.v5-expand-action {
  background: transparent;
  border: 0;
  color: var(--v5-blue);
  display: block;
  font-size: 13px;
  font-weight: 400;
  margin-top: 8px;
  min-height: 40px;
  padding: 8px 12px;
  text-align: center;
  width: 100%;
}

.v5-stock-search {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
}

.v5-stock-search input {
  background: var(--v5-panel);
  border: 1px solid var(--v5-line);
  border-radius: 10px;
  color: var(--text-primary, #e9f0fa);
  font-size: 14px;
  font-weight: 400;
  min-width: 0;
  padding: 10px 12px;
}

.v5-stock-search button {
  background: #2453d4;
  border: 0;
  border-radius: 10px;
  color: #eef5ff;
  font-size: 13px;
  padding: 0 16px;
}

.v5-stock-hero {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.v5-stock-hero h2 {
  font-size: 22px;
  font-weight: 500;
  margin: 0;
}

.v5-stock-hero p {
  color: var(--text-muted, #71839d);
  font-size: 11px;
  margin: 4px 0 0;
}

.v5-stock-industry-link {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--v5-blue);
  display: inline-flex;
  font-size: 12px;
  font-weight: 400;
  gap: 4px;
  margin: 2px 0 0;
  min-height: 28px;
  padding: 2px 0;
}

.v5-stock-industry-link span {
  font-size: 16px;
  line-height: 1;
}

.v5-stock-hero strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.v5-shareholding-note {
  margin: 8px 4px 0;
}

.v5-holder-row {
  align-items: start;
  min-height: 64px;
  padding-bottom: 8px;
  padding-top: 8px;
}

button.v5-holder-row {
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.v5-holder-meta,
.v5-holder-reading {
  display: flex;
  flex-direction: column;
}

.v5-holder-meta {
  gap: 3px;
}

.v5-holder-meta > span {
  color: var(--text-secondary, #aab8cb);
  font-size: 13px;
}

.v5-holder-meta small,
.v5-holder-reading small {
  color: var(--text-muted, #71839d);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}

.v5-holder-meta small {
  white-space: nowrap;
}

.v5-holder-reading {
  align-items: flex-end;
  gap: 4px;
}

.v5-holder-reading > span {
  font-size: 14px;
}

.v5-chip-history-trigger {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
  width: 100%;
  min-height: 48px;
}

.v5-chip-history-meta {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.25;
  white-space: nowrap;
}

.v5-chip-history-meta small {
  color: var(--text-muted, #71839d);
  font-size: 10px;
  font-weight: 400;
}

.v5-chip-history-meta b {
  color: var(--v5-blue);
  font-size: 11px;
  font-weight: 400;
}

.v5-chip-history {
  margin-top: 12px;
}

.v5-chip-history[hidden] {
  display: none;
}

.v5-chip-history-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.v5-chip-history-head h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 3px 0 0;
}

.v5-chip-history-head > span {
  color: var(--text-muted, #71839d);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.v5-chip-chart {
  background: var(--v5-panel-soft);
  border: 1px solid var(--v5-line);
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  padding: 10px 8px 0;
}

.v5-chip-chart-legend {
  color: var(--text-muted, #71839d);
  display: flex;
  font-size: 10px;
  gap: 14px;
  justify-content: flex-end;
}

.v5-chip-chart-legend span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.v5-chip-chart-legend i {
  background: var(--v5-red);
  display: inline-block;
  height: 7px;
  width: 10px;
}

.v5-chip-chart-legend span:last-child i {
  background: #8b98aa;
  height: 2px;
}

.v5-chip-chart svg {
  display: block;
  height: 180px;
  width: 100%;
}

.v5-chip-chart .zero {
  stroke: rgba(145, 161, 184, 0.5);
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.v5-chip-chart rect.positive {
  fill: var(--v5-red);
}

.v5-chip-chart rect.negative {
  fill: var(--v5-green);
}

.v5-chip-chart rect.flat {
  fill: #536177;
}

.v5-chip-chart .price {
  fill: none;
  stroke: #a8b2c0;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.v5-holder-chart .holding {
  fill: none;
  stroke: var(--v5-blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.v5-holder-chart .holding-dots circle {
  fill: var(--v5-blue);
  stroke: var(--v5-panel-soft);
  stroke-width: 1.2;
}

.v5-holder-chart .v5-chip-chart-legend i {
  background: var(--v5-blue);
  border-radius: 999px;
  height: 2px;
  width: 12px;
}

.v5-chip-chart .dates text {
  fill: var(--text-muted, #71839d);
  font-size: 9px;
  text-anchor: middle;
}

.v5-chip-table-wrap {
  border: 1px solid var(--v5-line);
  border-radius: 0 0 14px 14px;
  overflow-x: auto;
}

.v5-chip-table {
  border-collapse: collapse;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  table-layout: fixed;
  width: 100%;
}

.v5-chip-table th,
.v5-chip-table td {
  border-bottom: 1px solid var(--v5-line);
  padding: 9px 4px;
  text-align: right;
  white-space: nowrap;
}

.v5-chip-table th {
  color: var(--text-secondary, #aab8cb);
  font-weight: 400;
}

.v5-chip-table th:first-child,
.v5-chip-table td:first-child {
  text-align: left;
  width: 48px;
}

.v5-chip-table tbody tr:last-child td {
  border-bottom: 0;
}

.v5-data-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.v5-etf-picker {
  display: flex;
  gap: 8px;
  margin: 0 -12px 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0 12px 4px;
  scroll-padding-inline: 12px;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.v5-etf-picker button {
  background: var(--v5-panel-soft);
  border: 1px solid var(--v5-line);
  border-radius: 12px;
  color: var(--text-secondary, #aab8cb);
  flex: 0 0 132px;
  min-height: 58px;
  padding: 9px 10px;
  scroll-snap-align: start;
  text-align: left;
}

.v5-etf-picker button[aria-selected="true"] {
  background: rgba(36, 83, 212, 0.22);
  border-color: rgba(98, 168, 247, 0.72);
  color: var(--text-primary, #e9f0fa);
}

.v5-etf-picker span,
.v5-etf-picker small {
  display: block;
  font-weight: 400;
}

.v5-etf-picker span {
  color: var(--v5-blue);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.v5-etf-picker small {
  font-size: 11px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-etf-hero {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.v5-etf-hero h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
}

.v5-etf-hero p,
.v5-etf-hero > span {
  color: var(--text-muted, #71839d);
  font-size: 11px;
  line-height: 1.5;
  margin: 4px 0 0;
}

.v5-etf-hero > span {
  flex: 0 0 auto;
  text-align: right;
}

.v5-etf-row {
  align-items: center;
  border-bottom: 1px solid var(--v5-line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 8px 12px;
}

.v5-etf-row:last-child {
  border-bottom: 0;
}

.v5-etf-row > span,
.v5-etf-row > strong {
  font-size: 13px;
  font-weight: 400;
  min-width: 0;
}

.v5-etf-row > span {
  color: var(--text-secondary, #aab8cb);
}

.v5-etf-row > strong {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.v5-etf-row small {
  color: var(--text-muted, #71839d);
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 2px;
}

.v5-consensus-list {
  background: var(--v5-panel-soft);
  border: 1px solid var(--v5-line);
  border-radius: 12px;
  overflow: hidden;
}

.v5-consensus-row {
  align-items: center;
  border-bottom: 1px solid var(--v5-line);
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(120px, 1fr) auto minmax(150px, 0.8fr);
  min-height: 58px;
  padding: 9px 12px;
}

.v5-consensus-row:last-child {
  border-bottom: 0;
}

.v5-consensus-row > strong {
  font-weight: 400;
  text-align: right;
}

.v5-consensus-row > strong small {
  color: var(--text-muted, #71839d);
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
}

.v5-consensus-etfs {
  color: var(--text-muted, #71839d);
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}

.v5-etf-change-columns {
  display: grid;
  gap: 12px;
}

.v5-etf-date-picker {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.v5-etf-date-picker button {
  background: transparent;
  border: 1px solid var(--v5-line);
  border-radius: 10px;
  color: var(--text-secondary, #aab8cb);
  flex: 1 0 88px;
  min-height: 46px;
  padding: 7px 10px;
}

.v5-etf-date-picker button[aria-selected="true"] {
  background: rgba(36, 83, 212, 0.18);
  border-color: rgba(98, 168, 247, 0.72);
  color: var(--text-primary, #e9f0fa);
}

.v5-etf-date-picker span,
.v5-etf-date-picker small {
  display: block;
  font-weight: 400;
}

.v5-etf-date-picker span {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.v5-etf-date-picker small {
  color: var(--text-muted, #71839d);
  font-size: 11px;
  margin-top: 2px;
}

.v5-etf-change-state {
  margin: 0 0 12px;
}

.v5-etf-change-state.verified {
  color: var(--text-secondary, #aab8cb);
}

.v5-etf-change-group h3 {
  color: var(--text-secondary, #aab8cb);
  font-size: 13px;
  font-weight: 400;
  margin: 0 0 8px;
}

.v5-source-state {
  background: rgba(113, 131, 157, 0.08);
  border-radius: 10px;
  color: var(--text-muted, #71839d);
  font-size: 11px;
  line-height: 1.6;
  margin-top: 12px;
  padding: 10px 12px;
}

.v5-futu-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v5-futu-period-row span,
.v5-futu-period-row strong {
  min-width: 0;
}

.v5-futu-period-row b,
.v5-futu-period-row small,
.v5-futu-grid small {
  display: block;
}

.v5-futu-period-row b {
  color: var(--text-primary, #e9f0fa);
  font-size: 13px;
  font-weight: 500;
}

.v5-futu-period-row small,
.v5-futu-grid small {
  color: var(--text-muted, #71839d);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5;
  margin-top: 3px;
}

@media (max-width: 719px) {
  .v5-futu-grid {
    grid-template-columns: 1fr;
  }

  .v5-consensus-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }

  .v5-consensus-etfs {
    display: none;
  }
}

@media (max-width: 380px) {
  .v5-workspace {
    padding-left: 8px;
    padding-right: 8px;
  }

  .v5-workspace-head {
    gap: 6px;
    grid-template-columns: 32px minmax(78px, 1fr) minmax(0, 88px) 30px;
    margin-left: -8px;
    margin-right: -8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  html.v5-pattern-standalone .v5-workspace-head {
    grid-template-columns: minmax(0, 1fr) auto 28px;
  }

  .v5-workspace-head > span {
    font-size: 10px;
    max-width: 88px;
  }

  .v5-share-button {
    height: 30px;
    width: 30px;
  }

  .v5-launcher-grid small {
    display: none;
  }

  .v5-metric strong {
    font-size: 16px;
  }

  .v5-metric {
    padding-left: 5px;
    padding-right: 5px;
  }

  .v5-stock-metric-grid .v5-metric {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .v5-workspace {
    animation: v5-workspace-enter 180ms ease-out;
  }
}

@keyframes v5-workspace-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
