/* Model portfolio landing */
.mp-page {
    max-width: 1220px;
    margin: 0 auto;
    padding: 30px 18px 60px;
}

.mp-title-row {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
}

.mp-title-row h1 {
    margin: 0 0 8px;
    color: #07152c;
    font-size: 34px;
}

.mp-title-row p {
    margin: 0;
    max-width: 680px;
    color: #53657f;
    line-height: 1.55;
}

.mp-flow {
    margin: 28px 0 0;
    padding: 16px;
    background: #fff;
    border: 1px solid #dce5ee;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(14, 32, 52, .05);
}

.mp-flow img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.mp-professional-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin: 22px 0 0;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #dce5ee;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(14, 32, 52, .05);
}

.mp-professional-cta h2 {
    margin: 4px 0 7px;
    color: #07152c;
    font-size: 23px;
    line-height: 1.25;
}

.mp-professional-cta p {
    max-width: 760px;
    margin: 0;
    color: #53657f;
    line-height: 1.55;
}

.mp-contact-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 5px 9px;
    color: #195eaa;
    background: #eef6ff;
    border: 1px solid #c9ddf5;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.mp-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 11px 16px;
    background: #07152c;
    color: #fff;
    border-radius: 6px;
    font-weight: 800;
}

.mp-contact-btn:hover,
.mp-contact-btn:focus {
    color: #fff;
    background: #10284c;
}

.mp-unavailable {
    max-width: 980px;
    margin: 42px auto;
    padding: 36px;
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(15, 35, 55, .08);
}

.mp-unavailable h1 {
    margin: 0 0 10px;
    font-size: 32px;
    color: #06142b;
}

.mp-unavailable p {
    max-width: 700px;
    color: #617089;
    line-height: 1.6;
}

.mp-missing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    margin-top: 22px;
}

.mp-missing span {
    padding: 9px 12px;
    background: #f5f8fb;
    border: 1px solid #dfe7ef;
    border-radius: 6px;
    color: #29405c;
    font-family: monospace;
}

.mp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.mp-card {
    display: flex;
    flex-direction: column;
    min-height: 540px;
    background: #fff;
    border: 1px solid #dce5ee;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 10px 26px rgba(14, 32, 52, .06);
}

.mp-card-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 11px;
    min-height: 58px;
    margin-bottom: 12px;
}

.mp-card-name {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    gap: 11px;
}

.mp-card-title h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    color: #08162d;
}

.mp-access-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 24px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.mp-access-free {
    color: #087a43;
    background: #e9f9ef;
    border: 1px solid #bfeccd;
}

.mp-access-registered {
    color: #195eaa;
    background: #eef6ff;
    border: 1px solid #c9ddf5;
}

.mp-access-subscription {
    color: #c23c18;
    background: #fff1ec;
    border: 1px solid #ffd0bf;
}

.mp-description {
    min-height: 66px;
    margin: 0 0 16px;
    color: #53657f;
    line-height: 1.55;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.mp-market-flag {
    width: 30px;
    height: 22px;
    flex: 0 0 30px;
    margin-top: 2px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(7, 21, 44, .12);
}

.mp-market-flag-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 24px;
    flex: 0 0 34px;
    margin-top: 1px;
    border-radius: 4px;
    background: #eef4fb;
    color: #254469;
    font-size: 10px;
    font-weight: 900;
}

.mp-return-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 14px;
    padding: 16px;
    border: 1px solid #dcebe3;
    border-radius: 8px;
    background: linear-gradient(180deg, #f5fff9 0%, #eefaf3 100%);
}

.mp-return-hero.mp-negative {
    border-color: #f3d4d0;
    background: linear-gradient(180deg, #fff7f6 0%, #fdf0ee 100%);
}

.mp-return-label {
    display: block;
    margin-bottom: 4px;
    color: #60738d;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.mp-return-value {
    display: block;
    color: #0f9f53;
    font-size: 34px;
    line-height: 1;
    font-weight: 950;
}

.mp-return-hero.mp-negative .mp-return-value {
    color: #df4437;
}

.mp-return-period {
    color: #60738d;
    font-size: 12px;
    font-weight: 750;
    text-align: right;
    white-space: nowrap;
}

.mp-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 18px;
}

.mp-metrics div {
    padding: 10px;
    background: #f6f9fc;
    border-radius: 6px;
}

.mp-metrics small {
    display: block;
    color: #71839c;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 700;
}

.mp-metrics strong {
    color: #07152c;
    font-size: 17px;
    overflow-wrap: anywhere;
}

.mp-metric-holdings {
    text-align: center;
}

.mp-card-chart {
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid #e1eaf3;
    border-radius: 7px;
    background: #fbfdff;
}

.mp-card-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.mp-card-chart-head small {
    color: #71839c;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.mp-card-chart-head strong {
    color: #18a45b;
    font-size: 13px;
    font-weight: 900;
}

.mp-card-chart-head strong.mp-negative {
    color: #df4437;
}

.mp-card-chart-svg {
    display: block;
    width: 100%;
    height: 116px;
}

.mp-chart-grid-line {
    stroke: #d9e3ee;
    stroke-width: 1;
}

.mp-chart-benchmark {
    fill: none;
    stroke: #e34a66;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .9;
}

.mp-chart-portfolio {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mp-chart-empty {
    height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #71839c;
    font-size: 12px;
    font-weight: 800;
}

.mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    margin-top: auto;
    padding: 10px 14px;
    background: #ff4f2f;
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
}

/* Model portfolio detail */
.mp-detail {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 18px 70px;
    color: #06162d;
}

.mp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    gap: 26px;
    align-items: end;
    margin-bottom: 22px;
}

.mp-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.mp-portfolio-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
}

.mp-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #cfdbe8;
    border-radius: 7px;
    background: #fff;
    color: #254469;
    font-weight: 800;
}

.mp-back:hover,
.mp-back:focus {
    color: #06162d;
    border-color: #9eb1c8;
    text-decoration: none;
}

.mp-kicker {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 5px;
    background: #fff1ea;
    color: #ff4f2f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.mp-market-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid #dce6f0;
    border-radius: 7px;
    background: #fff;
    color: #254469;
    font-weight: 800;
}

.mp-market-flag {
    width: 22px;
    height: 16px;
    flex: 0 0 22px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(7, 21, 44, .12);
}

.mp-market-flag-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 18px;
    border-radius: 4px;
    background: #eef4fb;
    color: #254469;
    font-size: 10px;
    font-weight: 900;
}

.mp-market-copy {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.mp-market-copy strong {
    color: #06162d;
    font-size: 12px;
}

.mp-market-copy small {
    color: #6c7f99;
    font-size: 11px;
    font-weight: 850;
}

.mp-market-profile {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    vertical-align: middle;
}

.mp-market-profile-admin {
    align-items: flex-start;
}

.mp-market-profile-admin .mp-market-copy {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.mp-market-profile-admin .mp-market-copy strong {
    font-size: 12px;
    line-height: 1.2;
}

.mp-market-profile-admin .mp-market-copy small {
    font-size: 11px;
    line-height: 1.2;
}

.mp-hero h1 {
    margin: 0 0 10px;
    color: #07152c;
    font-size: 38px;
    line-height: 1.1;
}

.mp-hero p {
    margin: 0;
    max-width: 690px;
    color: #52657f;
    font-size: 16px;
    line-height: 1.55;
}

.mp-hero-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mp-metric-card,
.mp-panel {
    background: #fff;
    border: 1px solid #dce6f0;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(18, 37, 63, .06);
}

.mp-metric-card {
    padding: 18px;
}

.mp-label {
    display: block;
    margin-bottom: 8px;
    color: #6d7f98;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mp-value {
    color: #06162d;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.12;
}

.mp-positive {
    color: #18a45b;
}

.mp-negative {
    color: #df4437;
}

.mp-muted {
    color: #6c7f99;
}

.mp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 18px;
    border-bottom: 1px solid #dce6f0;
}

.mp-tab {
    position: relative;
    appearance: none;
    border: 0;
    border-radius: 7px 7px 0 0;
    background: transparent;
    padding: 13px 18px;
    color: #52657f;
    font-weight: 800;
    cursor: pointer;
}

.mp-tab[aria-selected="true"] {
    background: #fff;
    color: #06162d;
    box-shadow: inset 0 0 0 1px #dce6f0;
}

.mp-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    right: 14px;
    bottom: -1px;
    left: 14px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #ff4f2f;
}

.mp-tab-panel {
    display: none;
}

.mp-tab-panel.is-active {
    display: block;
}

.mp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.mp-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mp-grid.two {
    grid-template-columns: 1.1fr .9fr;
}

.mp-overview-section {
    margin-top: 18px;
}

.mp-panel {
    padding: 24px;
}

.mp-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.mp-panel h2 {
    margin: 0;
    color: #06162d;
    font-size: 20px;
    line-height: 1.2;
}

.mp-panel-subtitle {
    margin-top: 6px;
    color: #6c7f99;
}

.mp-card-note {
    margin-top: 10px;
    color: #6c7f99;
    font-size: 13px;
}

.mp-card-note .mp-positive,
.mp-card-note .mp-negative {
    font-weight: 800;
}

.mp-chart-shell {
    min-height: 420px;
}

.mp-chart {
    width: 100%;
    height: 360px;
}

.mp-overview-chart {
    margin-top: 18px;
}

.mp-chart-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mp-chart-stat {
    min-width: 132px;
    padding: 10px 12px;
    border: 1px solid #e0e8f1;
    border-radius: 7px;
    background: #f8fbfe;
}

.mp-empty {
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd8e6;
    border-radius: 8px;
    background: #f8fbfe;
    color: #6c7f99;
    font-weight: 700;
}

.mp-locked {
    padding: 16px;
    border: 1px solid #ffd7c8;
    border-radius: 8px;
    border-color: #ffd7c8;
    background: #fff8f4;
}

.mp-locked strong {
    display: block;
    margin-bottom: 6px;
    color: #ff4f2f;
}

.mp-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.mp-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.mp-table th,
.mp-table td {
    padding: 13px 10px;
    border-bottom: 1px solid #e2ebf4;
    text-align: left;
    vertical-align: middle;
}

.mp-table th {
    color: #6c7f99;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.mp-table td {
    color: #1a2b44;
    font-weight: 650;
}

.mp-table td.mp-positive,
.mp-table td .mp-positive {
    color: #18a45b;
}

.mp-table td.mp-negative,
.mp-table td .mp-negative {
    color: #df4437;
}

.mp-symbol {
    color: #0d56c9;
    font-weight: 800;
}

.mp-ticker-symbol {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #0d56c9;
    font-weight: 850;
    line-height: 1.1;
}

.mp-ticker-link,
.mp-ticker-link:visited {
    color: #0d56c9;
    text-decoration: none;
}

.mp-ticker-link:hover,
.mp-ticker-link:focus {
    color: #08459f;
    text-decoration: none;
}

.mp-ticker-logo {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 6px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #dce6f0;
}

.mp-ticker-logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4fb;
    color: #52657f;
    font-size: 12px;
    font-weight: 900;
}

.mp-ticker-text {
    overflow-wrap: anywhere;
}

.mp-ticker-symbol-lg {
    gap: 12px;
    color: #06162d;
}

.mp-ticker-symbol-lg .mp-ticker-logo {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 8px;
}

.mp-ticker-symbol-lg .mp-ticker-text {
    font-size: 42px;
    font-weight: 900;
}

.mp-holdings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 16px;
}

.mp-holding-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    border: 1px solid #dce6f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(18, 37, 63, .05);
}

.mp-holding-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.mp-holding-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef4fb;
    color: #52657f;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    white-space: nowrap;
}

.mp-holding-state.mp-positive {
    background: #e8f7ef;
    color: #16854d;
}

.mp-holding-state.mp-negative {
    background: #fff0ed;
    color: #df4437;
}

.mp-holding-price-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.mp-holding-price {
    color: #06162d;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.mp-holding-date {
    color: #6c7f99;
    font-size: 12px;
    font-weight: 700;
}

.mp-holding-return {
    text-align: right;
}

.mp-holding-return strong {
    display: block;
    font-size: 18px;
    line-height: 1.1;
}

.mp-holding-return span {
    color: #6c7f99;
    font-size: 12px;
    font-weight: 750;
}

.mp-holding-chart-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mp-holding-chart {
    width: 100%;
    height: 152px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2ebf4;
    border-radius: 7px;
    background: #fbfdff;
}

.mp-holding-chart.is-ready {
    border-color: transparent;
    background: transparent;
}

.mp-holding-chart-status {
    color: #6c7f99;
    font-size: 12px;
    font-weight: 750;
}

.mp-holding-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #52657f;
    font-size: 11px;
    font-weight: 800;
}

.mp-holding-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mp-holding-chart-legend span::before {
    content: "";
    width: 18px;
    height: 0;
    border-top: 2px solid #2f7df6;
}

.mp-holding-chart-legend .buy::before {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 50%;
    background: #18a45b;
}

.mp-holding-chart-legend .current::before {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 50%;
    background: #06162d;
}

.mp-holding-chart-legend .stop::before {
    border-top-color: #df4437;
    border-top-style: dashed;
}

.mp-holding-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.mp-holding-stat {
    min-width: 0;
    padding: 10px;
    border: 1px solid #edf2f7;
    border-radius: 7px;
    background: #fbfdff;
}

.mp-holding-stat span {
    display: block;
    margin-bottom: 5px;
    color: #6c7f99;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.mp-holding-stat strong {
    display: block;
    color: #06162d;
    font-size: 13px;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.mp-holding-stat small {
    display: block;
    margin-top: 5px;
    color: #6c7f99;
    font-size: 11px;
    font-weight: 700;
}

.mp-holding-price.mp-positive,
.mp-holding-return strong.mp-positive,
.mp-holding-stat strong.mp-positive {
    color: #18a45b;
}

.mp-holding-price.mp-negative,
.mp-holding-return strong.mp-negative,
.mp-holding-stat strong.mp-negative {
    color: #df4437;
}

.mp-action-pill {
    display: inline-flex;
    align-items: center;
    min-width: 54px;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.mp-action-pill.buy {
    background: #e8f7ef;
    color: #16854d;
}

.mp-action-pill.sell {
    background: #fff0ea;
    color: #d84228;
}

.mp-candidate-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 22px;
    align-items: stretch;
}

.mp-candidate-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: 26px;
    border: 1px solid #ffd6c7;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff7f2 0%, #fff 72%);
}

.mp-candidate-symbol {
    display: flex;
    align-items: center;
    margin: 10px 0;
    color: #06162d;
    font-weight: 900;
    line-height: 1;
}

.mp-candidate-chart {
    min-width: 0;
    margin-top: 22px;
    padding: 12px;
    border: 1px solid #e2ebf4;
    border-radius: 8px;
    background: #fff;
}

.mp-candidate-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.mp-candidate-chart-head span {
    display: block;
    color: #6c7f99;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.mp-candidate-chart-head small {
    display: block;
    margin-top: 3px;
    color: #7a8ca4;
    font-size: 11px;
    font-weight: 700;
}

.mp-candidate-chart-head strong {
    flex: 0 0 auto;
    color: #06162d;
    font-size: 14px;
    font-weight: 900;
}

.mp-candidate-chart-head strong.mp-positive {
    color: #18a45b;
}

.mp-candidate-chart-head strong.mp-negative {
    color: #df4437;
}

.mp-candidate-chart-svg {
    display: block;
    width: 100%;
    height: 178px;
    overflow: visible;
}

.mp-candidate-chart-grid {
    stroke: #dce6f0;
    stroke-width: 1;
}

.mp-candidate-chart-line {
    fill: none;
    stroke: #2f7df6;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mp-candidate-chart-marker {
    fill: #18a45b;
    stroke: #fff;
    stroke-width: 4;
}

.mp-candidate-chart-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: #6c7f99;
    font-size: 12px;
    font-weight: 750;
}

.mp-candidate-chart-meta strong {
    color: #06162d;
}

.mp-candidate-chart-empty {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c7f99;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.mp-candidate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mp-api-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 18px;
    align-items: start;
}

.mp-api-endpoint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #dce6f0;
    border-radius: 8px;
    background: #f8fbfe;
}

.mp-api-method {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 6px;
    background: #eaf4ff;
    color: #0d56c9;
    font-size: 12px;
    font-weight: 900;
}

.mp-api-endpoint code {
    min-width: 0;
    color: #06162d;
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.mp-api-code {
    margin: 0;
    max-height: 520px;
    overflow: auto;
    padding: 16px;
    border: 1px solid #dce6f0;
    border-radius: 8px;
    background: #071326;
    color: #dceeff;
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-color: transparent !important;
    text-decoration-style: solid !important;
    text-decoration-thickness: 0 !important;
    text-underline-offset: 0 !important;
    text-shadow: none !important;
}

.mp-api-code,
.mp-api-code code,
.mp-api-code *,
.mp-api-code::before,
.mp-api-code::after {
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-color: transparent !important;
    text-decoration-style: solid !important;
    text-decoration-thickness: 0 !important;
    text-underline-offset: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
    text-shadow: none !important;
}

.mp-api-code code {
    color: inherit;
    background: transparent;
    font: inherit;
}

.mp-api-feature-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.mp-api-feature {
    padding: 14px;
    border: 1px solid #e0e8f1;
    border-radius: 8px;
    background: #fff;
}

.mp-api-feature strong {
    display: block;
    margin-bottom: 5px;
    color: #06162d;
}

.mp-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.mp-meta-chip {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f1f5fa;
    color: #52657f;
    font-size: 12px;
    font-weight: 800;
}

.mp-year-list {
    display: grid;
    gap: 10px;
}

.mp-year-row {
    width: 100%;
    display: grid;
    grid-template-columns: 90px repeat(5, minmax(110px, 1fr)) 28px;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #dce6f0;
    border-radius: 8px;
    background: #fff;
    color: #1a2b44;
    text-align: left;
    cursor: pointer;
}

.mp-year-row[aria-expanded="true"] {
    border-color: #ffb49f;
    box-shadow: 0 8px 22px rgba(255, 79, 47, .08);
}

.mp-year-row strong {
    color: #06162d;
    font-size: 17px;
}

.mp-year-row strong.mp-positive {
    color: #18a45b;
}

.mp-year-row strong.mp-negative {
    color: #df4437;
}

.mp-year-cell {
    min-width: 0;
}

.mp-year-cell .mp-label {
    margin-bottom: 4px;
}

.mp-year-toggle {
    color: #ff4f2f;
    font-size: 20px;
    font-weight: 900;
    text-align: right;
}

.mp-month-panel {
    display: none;
    margin: -4px 0 8px;
    padding: 14px;
    border: 1px solid #e2ebf4;
    border-radius: 8px;
    background: #f8fbfe;
}

.mp-month-panel.is-active {
    display: block;
}

.mp-control-row {
    margin-bottom: 18px;
}

.mp-year-tabs,
.mp-month-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mp-month-tabs {
    margin-top: 10px;
}

.mp-year-tab,
.mp-month-tab {
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid #d6e1ed;
    border-radius: 7px;
    background: #fff;
    color: #52657f;
    font-weight: 800;
    cursor: pointer;
}

.mp-month-tab {
    min-width: 88px;
}

.mp-year-tab.is-active,
.mp-month-tab.is-active {
    border-color: #ff4f2f;
    color: #ff4f2f;
    background: #fff5ef;
}

.mp-history-status {
    margin-bottom: 12px;
    color: #6c7f99;
    font-weight: 750;
}

.mp-day-list {
    display: grid;
    gap: 14px;
}

.mp-day-card {
    border: 1px solid #dce6f0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.mp-day-head {
    display: grid;
    grid-template-columns: minmax(150px, 1.1fr) repeat(4, minmax(110px, 1fr));
    gap: 10px;
    align-items: center;
    padding: 16px;
    background: #f8fbfe;
    border-bottom: 1px solid #e2ebf4;
}

.mp-day-date {
    color: #06162d;
    font-size: 16px;
    font-weight: 900;
}

.mp-trade-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px 16px 0;
}

.mp-trade-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border-radius: 999px;
    border: 1px solid #dce6f0;
    background: #fff;
    color: #1a2b44;
    font-size: 12px;
    font-weight: 850;
}

.mp-trade-chip.buy {
    border-color: #bce8d1;
    background: #eaf8f0;
    color: #16854d;
}

.mp-trade-chip.sell {
    border-color: #ffc9b8;
    background: #fff0ea;
    color: #d84228;
}

.mp-day-section {
    padding: 14px 16px 16px;
}

.mp-day-section + .mp-day-section {
    border-top: 1px solid #edf2f7;
}

.mp-day-section h3 {
    margin: 0 0 10px;
    color: #06162d;
    font-size: 15px;
}

.mp-mini-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.mp-mini-table th,
.mp-mini-table td {
    padding: 9px 8px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: middle;
}

.mp-mini-table th {
    color: #6c7f99;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

@media (max-width: 1050px) {
    .mp-hero,
    .mp-grid.two,
    .mp-candidate-card,
    .mp-api-layout {
        grid-template-columns: 1fr;
    }

    .mp-hero-metrics,
    .mp-grid,
    .mp-grid.four,
    .mp-day-head {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mp-year-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) 28px;
    }
}

@media (max-width: 720px) {
    .mp-professional-cta {
        display: block;
        padding: 18px;
    }

    .mp-professional-cta h2 {
        font-size: 20px;
    }

    .mp-contact-btn {
        width: 100%;
        margin-top: 16px;
    }

    .mp-detail {
        padding: 18px 12px 54px;
    }

    .mp-hero h1 {
        font-size: 30px;
    }

    .mp-hero-metrics,
    .mp-grid,
    .mp-grid.four,
    .mp-candidate-grid,
    .mp-api-endpoint,
    .mp-day-head,
    .mp-year-row {
        grid-template-columns: 1fr;
    }

    .mp-api-endpoint {
        display: grid;
        align-items: start;
    }

    .mp-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0;
    }

    .mp-tab {
        flex: 0 0 auto;
        padding: 12px 14px;
    }

    .mp-panel {
        padding: 18px;
    }

    .mp-holdings-grid {
        grid-template-columns: 1fr;
    }

    .mp-holding-card {
        padding: 16px;
    }

    .mp-holding-price-row {
        grid-template-columns: 1fr;
    }

    .mp-holding-return {
        text-align: left;
    }

    .mp-holding-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mp-panel-header {
        display: block;
    }

    .mp-chart-shell {
        min-height: 340px;
    }

    .mp-chart {
        height: 300px;
    }

    .mp-candidate-symbol {
        align-items: flex-start;
    }

    .mp-ticker-symbol-lg .mp-ticker-text {
        font-size: 36px;
    }

    .mp-year-tabs,
    .mp-month-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-bottom: 10px;
        padding-bottom: 2px;
    }
}

/* Model portfolio admin */
.mp-admin-inline-form {
    display: inline-block;
    margin-right: 8px;
}

.mp-admin-form-gap {
    margin-bottom: 10px;
}

.mp-admin-notice {
    margin: 10px 0 0;
}

.mp-prewrap {
    margin: 0;
    white-space: pre-wrap;
}
