/* Account pages (/start, sign-in, the portal), set in stratafinance.ai's editorial design: ink
   page, paper text, pewter secondary text, hairline rules, mono labels and pill buttons. The
   palette, fonts, buttons, header and footer come from shared/ui/public-page-theme.js. */
.portal-page { background: var(--background); }
.page-shell { width: 100%; max-width: calc(1280px + 2 * clamp(20px, 5vw, 72px)); margin: 0 auto; padding: 0 clamp(20px, 5vw, 72px); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { flex-shrink: 0; border-radius: 5px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(38px, 4vw, 62px); line-height: 1.06; letter-spacing: -0.03em; margin-bottom: 24px; }
h2 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; letter-spacing: -0.025em; margin-bottom: 12px; }
h3 { font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; font-weight: 600; margin-bottom: 10px; }
p { color: var(--muted); margin-bottom: 20px; text-wrap: pretty; }
.eyebrow { margin: 0 0 18px; color: var(--muted); font-family: var(--font-mono); font-size: 11px; font-weight: 400; line-height: 1.5; text-transform: uppercase; letter-spacing: 0.08em; }
.muted { color: var(--muted); }
.quiet { margin: 18px 0 0; font-size: 13px; line-height: 1.6; color: var(--faint); }
.small-label { color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button:disabled:hover { background: transparent; }
.button:not(.secondary):disabled:hover { background: var(--primary); }
.full-width { width: 100%; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; text-decoration: none; padding: 9px 0; }
.text-link:hover { text-decoration: underline; text-decoration-color: var(--faint); }
.text-button { padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; cursor: pointer; }
.text-button:hover { color: var(--foreground); }
.badge { flex-shrink: 0; padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.5; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 20px; background: var(--foreground); color: var(--background); padding: 12px 18px; border-radius: 999px; }
.skip-link:focus { top: 12px; }
.tile-icon { display: inline-grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; color: var(--foreground); font-size: 17px; }

/* /start */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(40px, 6vw, 96px); padding: clamp(72px, 8vw, 120px) 0; }
.hero h1 { font-size: clamp(42px, 5vw, 72px); }
.hero-intro { max-width: 30em; color: var(--foreground); font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; margin-bottom: 32px; }
.hero .quiet { max-width: 425px; }
.public-section { padding: clamp(56px, 6vw, 88px) 0; border-top: 1px solid var(--border); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 32px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading .eyebrow { margin-bottom: 14px; }
.section-heading > p { max-width: 320px; margin: 0; font-size: 14px; line-height: 1.6; }
.capability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); }
.capability { padding: 24px 0 0; border-top: 1px solid var(--border); }
.capability .tile-icon { margin-bottom: 26px; }
.capability h3 { font-family: var(--font-display); font-size: 20px; font-weight: 500; letter-spacing: -0.015em; }
.capability p { font-size: 15px; line-height: 1.55; min-height: 70px; }
.tag-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--body-copy); }
.path-grid, .client-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.path-card { padding: clamp(26px, 3vw, 36px); border: 1px solid var(--border); border-radius: 28px; background: var(--surface); }
.path-card h3 { font-family: var(--font-display); font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.path-card p:not(.eyebrow) { font-size: 15px; line-height: 1.6; }
.portfolio-feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(40px, 6vw, 96px); padding: clamp(56px, 6vw, 88px) 0; border-top: 1px solid var(--border); }
.portfolio-feature p:not(.eyebrow) { font-size: 15px; line-height: 1.6; margin: 0; }
.portfolio-feature ul { list-style: none; margin: 28px 0 0; padding: 0; display: grid; font-size: 15px; color: var(--foreground); }
.portfolio-feature > div li { padding: 16px 0 16px 28px; position: relative; border-top: 1px solid var(--border); }
.portfolio-feature > div li:last-child { border-bottom: 1px solid var(--border); }
.portfolio-feature > div li::before { content: '✓'; position: absolute; left: 0; color: var(--positive); }
.getting-started { display: flex; justify-content: space-between; align-items: center; gap: 36px; padding: clamp(28px, 4vw, 48px); margin: 0 0 clamp(56px, 6vw, 88px); border: 1px solid var(--border); border-radius: 28px; background: var(--surface); }
.getting-started p:not(.eyebrow) { margin: 0; max-width: 640px; font-size: 15px; line-height: 1.6; }
.getting-started .button { flex-shrink: 0; }

/* sign-in, sign-up and single-card pages */
.auth-layout { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(40px, 6vw, 96px); padding: clamp(56px, 6vw, 96px) 0; min-height: calc(100svh - 260px); }
.auth-intro h1 { font-size: clamp(38px, 4.4vw, 60px); }
.auth-intro > p:not(.eyebrow) { max-width: 30em; color: var(--foreground); font-size: 17px; line-height: 1.55; }
.auth-points { margin-top: 36px; border-top: 1px solid var(--border); max-width: 30em; }
.auth-points p { display: flex; align-items: center; gap: 14px; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--body-copy); }
.auth-points span { color: var(--muted); font-size: 18px; width: 24px; }
.auth-card { padding: clamp(26px, 3vw, 40px); background: var(--surface); border: 1px solid var(--border); border-radius: 28px; min-width: 0; }
.auth-card h2 { font-size: 30px; }
.auth-card > p { font-size: 14px; line-height: 1.6; }
.provider-grid { display: grid; gap: 10px; margin-top: 26px; }
.provider-grid form { margin: 0; }
.provider-button { width: 100%; }
.provider-note { display: block; font-size: 12px; color: var(--faint); margin-top: 6px; text-align: center; }
.form-divider { display: flex; align-items: center; gap: 14px; color: var(--faint); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; margin: 26px 0; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.field-label { display: block; margin-bottom: 8px; color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.text-input { width: 100%; min-height: 52px; border: 1px solid #2e3239; background: var(--background); border-radius: 14px; padding: 12px 16px; margin-bottom: 20px; color: var(--foreground); font-size: 15px; transition: border-color 160ms ease; }
.text-input:hover { border-color: #3a3f47; }
.text-input:focus { border-color: var(--muted); outline: none; }
.text-input::placeholder { color: var(--faint); }
.password-field { position: relative; }
.password-field input { padding-right: 76px; }
.password-toggle { position: absolute; top: 9px; right: 9px; min-height: 34px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--foreground); background: var(--surface-raised); font-size: 12px; cursor: pointer; }
.password-toggle[hidden] { display: none; }
.field-help { font-size: 12px; color: var(--faint); margin: -10px 0 20px; }
.forgot-link { display: inline-block; font-size: 13px; color: var(--muted); margin: -2px 0 22px; }
.auth-footnote { font-size: 13px; color: var(--muted); text-align: center; margin: 24px 0 0; }
.legal-note { text-align: center; font-size: 12px; margin: 16px 0 0; color: var(--faint); }
.single-card { width: min(480px, 100%); margin: clamp(48px, 6vw, 96px) auto; }
.single-card h1 { font-size: clamp(32px, 3.4vw, 42px); line-height: 1.08; }
.single-card .tile-icon { margin-bottom: 26px; }
.single-card form { margin-top: 26px; }
.single-card > .button { margin-top: 24px; }
.notice { padding: 14px 18px; border: 1px solid var(--border); background: var(--surface-raised); border-radius: 14px; color: var(--foreground); font-size: 14px; margin-bottom: 22px; overflow-wrap: anywhere; }
.notice.error { color: #ffc2a6; border-color: #4a2a1d; background: #1d1310; }

/* the portal */
.portal-heading { margin-bottom: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.portal-heading h1 { margin-bottom: 16px; }
.portal-heading > p:not(.eyebrow) { font-size: clamp(16px, 1.2vw, 18px); color: var(--foreground); margin-bottom: 0; }
.continue-card { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 24px 28px; margin-bottom: 28px; border: 1px solid var(--faint); border-radius: 20px; background: var(--surface-raised); }
.continue-card h2 { font-size: 24px; }
.continue-card .eyebrow { margin-bottom: 10px; }
.continue-card p:not(.eyebrow) { font-size: 14px; margin: 0; }
.continue-card .button { flex-shrink: 0; }
.sec + .continue-card { margin-top: clamp(32px, 3vw, 44px); }
.portal-section { padding-top: clamp(44px, 5vw, 64px); scroll-margin-top: 24px; }
.portal-section h2 { font-size: clamp(26px, 2.2vw, 32px); }
.panel { padding: clamp(22px, 2.5vw, 30px); border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.panel p { font-size: 14px; line-height: 1.65; }
.api-key { display: block; padding: 18px; margin: 20px 0; border: 1px solid var(--border); background: var(--background); color: var(--foreground); border-radius: 12px; font: 13px/1.9 var(--font-mono); overflow-wrap: anywhere; user-select: all; }
.account-disclosure { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 24px; }
summary { cursor: pointer; }
.account-disclosure > summary { font-size: 14px; color: var(--muted); }
.account-disclosure > summary:hover { color: var(--foreground); }
.account-disclosure > div { padding-top: 18px; }
.account-disclosure p { font-size: 14px; line-height: 1.65; }
.account-disclosure h3 { font-size: 16px; }
.account-disclosure .button { font-size: 14px; min-height: 44px; }
.danger-zone { border-top: 1px solid #3a2a24; margin-top: 24px; padding-top: 22px; }
.usage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-card { padding: 22px 22px 24px 0; }
.stat-card + .stat-card { padding-left: 22px; border-left: 1px solid var(--border); }
.stat-card > span { color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.stat-card strong { display: block; font-family: var(--font-display); font-size: clamp(30px, 3vw, 44px); line-height: 1.1; font-weight: 500; letter-spacing: -0.03em; margin-top: 14px; overflow-wrap: anywhere; }
.usage-limits { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.usage-limits strong { color: var(--foreground); font-weight: 600; }
.usage-limits p { flex-basis: 100%; font-size: 13px; color: var(--faint); margin: -2px 0 0; }
.connection-list { display: grid; gap: 14px; }
.connection-card { padding: 24px; border: 1px solid var(--border); background: var(--surface); border-radius: 20px; }
.connection-heading { display: flex; align-items: center; gap: 14px; }
.connection-heading > div { min-width: 0; flex: 1; }
.connection-heading h3 { margin-bottom: 3px; font-size: 17px; overflow-wrap: anywhere; }
.connection-heading p { font-size: 13px; color: var(--muted); margin: 0; }
.connection-icon { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: var(--muted); }
.connection-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; color: var(--muted); margin-top: 18px; }
.connection-card .quiet { font-size: 13px; }
.connection-card .account-disclosure { margin-top: 18px; padding-top: 16px; }
.empty-state { text-align: center; border: 1px dashed #30343b; border-radius: 20px; padding: 36px 25px; }
.empty-state .tile-icon { margin: 0 auto 18px; }
.empty-state p { font-size: 14px; margin-bottom: 10px; }
.portfolio-card { display: flex; align-items: center; gap: 28px; margin-top: 24px; padding: 24px 0 0; border-top: 1px solid var(--border); }
.portfolio-card h3 { font-size: 16px; margin-bottom: 8px; }
.portfolio-card p { font-size: 14px; line-height: 1.6; margin: 0; }
.portfolio-card .button { flex-shrink: 0; font-size: 14px; }
.client-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.client-card { display: flex; flex-direction: column; align-items: flex-start; }
.client-card .small-label { margin-bottom: 12px; }
.client-card h3 { font-family: var(--font-display); font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.client-card .quiet { font-size: 13px; margin: 0 0 22px; }
.client-card > .button { margin-top: auto; }
.server-address { margin-top: 26px; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 12px 12px 18px; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; }
.copy-row code { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.small-button { flex-shrink: 0; min-height: 32px; padding: 6px 14px; font-size: 12px; font-weight: 600; color: var(--foreground); border: 1px solid var(--border); background: var(--surface-raised); border-radius: 999px; cursor: pointer; }
.small-button:hover { border-color: var(--faint); }
.setup-details { margin-top: 16px; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--surface); scroll-margin-top: 24px; }
.setup-details > summary { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; font-size: 15px; font-weight: 600; color: var(--foreground); list-style: none; gap: 18px; }
.setup-details > summary::-webkit-details-marker { display: none; }
.setup-details > summary > span { font-size: 22px; font-weight: 300; color: var(--muted); transition: transform 200ms var(--ease); }
.setup-details[open] > summary > span { transform: rotate(45deg); }
.setup-details > div { padding: 24px; border-top: 1px solid var(--border); }
.setup-details p { font-size: 14px; line-height: 1.65; }
.setup-details .quiet { font-size: 13px; }
.code-card { background: var(--background); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin: 20px 0; }
.code-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border); color: var(--faint); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
pre { margin: 0; padding: 18px; overflow-x: auto; color: var(--foreground); font: 12.5px/1.8 var(--font-mono); tab-size: 2; }
.action-status { position: fixed; z-index: 20; bottom: 22px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); background: var(--foreground); color: var(--background); border-radius: 999px; font-size: 13px; font-weight: 600; padding: 12px 20px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); }
.action-status:empty { display: none; }
@media (max-width: 1000px) {
  .hero { gap: 40px; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
  .capability p { min-height: 0; }
  .auth-layout { gap: 40px; }
  .client-grid { grid-template-columns: 1fr; }
  .portfolio-card { align-items: flex-start; flex-direction: column; gap: 16px; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 48px 0 56px; }
  .hero h1 { font-size: clamp(40px, 11vw, 52px); }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .section-heading > p { max-width: 450px; }
  .path-grid, .portfolio-feature { grid-template-columns: 1fr; gap: 16px; }
  .portfolio-feature { gap: 28px; }
  .getting-started { align-items: flex-start; flex-direction: column; gap: 24px; border-radius: 22px; }
  .path-card, .auth-card { border-radius: 22px; }
  .auth-layout { grid-template-columns: 1fr; padding: 40px 0 56px; gap: 32px; min-height: 0; }
  .auth-intro > p:not(.eyebrow) { font-size: 16px; margin: 0; }
  .auth-points { display: none; }
  .auth-card { width: 100%; max-width: 520px; }
  .continue-card { flex-direction: column; align-items: flex-start; padding: 22px; gap: 16px; }
  .portal-section .section-heading { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
  .usage-grid { grid-template-columns: 1fr; }
  .stat-card, .stat-card + .stat-card { padding: 18px 0; border-left: 0; }
  .stat-card + .stat-card { border-top: 1px solid var(--border); }
  .connection-heading { flex-wrap: wrap; }
  .connection-heading > div { flex-basis: calc(100% - 52px); }
  .connection-heading .badge { margin-left: 52px; }
  .client-card .button { margin-top: 0; }
  .setup-details > div { padding: 20px; }
}
@media (max-width: 390px) {
  .capability-grid { grid-template-columns: 1fr; }
  .key-panel .actions { align-items: stretch; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* /start data widgets, as on the website: the hero window, the Market Map table and the account picker */
.page-start { --accent: #e8c27a; --api: #4f8cff; --mcp: #f0b44c; --help: #3fc27f; --hurt: #e8695c; --mix: #c9a25a; --rule-strong: rgba(200, 215, 235, 0.14); }
.page-start main { position: relative; isolation: isolate; overflow-x: clip; }
.page-start main::before { content: ""; position: absolute; z-index: -1; top: -120px; right: -10%; width: 70%; height: 760px; pointer-events: none; background: radial-gradient(closest-side, rgba(79, 140, 255, 0.16), rgba(79, 140, 255, 0) 70%), radial-gradient(closest-side at 30% 70%, rgba(240, 180, 76, 0.08), rgba(240, 180, 76, 0) 70%); }

.sw-hero { position: relative; min-width: 0; }
.sw-tabs { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; margin-bottom: 14px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: rgba(19, 21, 25, 0.7); }
.sw-tabs button { position: relative; z-index: 1; min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: color 300ms var(--ease); }
.sw-tabs button.is-on { color: var(--background); }
.sw-tabs-bar { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--foreground); transition: transform 450ms var(--ease); }
.sw-hero[data-at="1"] .sw-tabs-bar { transform: translateX(100%); }
.sw-pane { margin: 0; min-height: 392px; border: 1px solid var(--border); border-radius: 20px; background: #0d0f12; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5); overflow: hidden; }
.sw-pane.is-on { animation: sw-in 500ms var(--ease) both; }
.sw-pane[hidden] { display: none; }
@keyframes sw-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sw-chat { display: grid; align-content: start; gap: 16px; padding: 22px; }
.sw-chat figcaption, .sw-window figcaption { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.sw-chat-ask { justify-self: end; max-width: 88%; margin: 0; padding: 14px 16px; border-radius: 16px 16px 4px 16px; background: var(--surface-raised); font-size: 15.5px; line-height: 1.5; color: var(--foreground); }
.sw-chat-tools { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sw-chat-tools li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; }
.sw-chat-tools span { font-size: 10px; color: var(--mcp); }
.sw-chat-tools code { font-size: 13px; color: var(--foreground); }
.sw-chat-tools i { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--help); box-shadow: 0 0 0 4px rgba(63, 194, 127, 0.14); }
.sw-pane.is-on .sw-chat-tools li { animation: sw-call 520ms var(--ease) both; }
.sw-pane.is-on .sw-chat-tools li:nth-child(2) { animation-delay: 380ms; }
.sw-pane.is-on .sw-chat-tools li:nth-child(3) { animation-delay: 760ms; }
.sw-pane.is-on .sw-chat-tools li:nth-child(4) { animation-delay: 1140ms; }
@keyframes sw-call { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.sw-chat-note { margin: 0; font-size: 13px; color: var(--faint); }
.sw-window figcaption { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); letter-spacing: 0; text-transform: none; }
.sw-window figcaption i { width: 10px; height: 10px; border-radius: 50%; background: #2a2d33; }
.sw-window figcaption span { margin-left: 10px; }
.sw-window pre { padding: 20px; font-size: 12px; line-height: 1.65; }
.sw-window code { white-space: pre; color: var(--foreground); }
.sw-window .t-dim { color: var(--api); }

.mm-pf { --i: 1; --row: 56px; position: relative; display: grid; grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); gap: clamp(32px, 4vw, 56px); align-items: start; margin: 8px 0 clamp(48px, 5vw, 72px); padding: clamp(24px, 3vw, 36px); border: 1px solid var(--border); border-radius: 28px; background: linear-gradient(180deg, rgba(23, 51, 88, 0.22), rgba(19, 21, 25, 0.6) 60%); }
.mm-pf-list { min-width: 0; }
.mm-pf-head, .mm-movers button { display: grid; grid-template-columns: 50px minmax(0, 1fr) 80px 44px 56px; align-items: center; gap: 12px; padding: 0 12px 0 16px; }
.mm-pf-head { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--rule-strong); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.mm-pf-head span:nth-child(1) { grid-column: 1 / 3; }
.mm-pf-head span:nth-child(n + 3) { text-align: right; }
.mm-movers { position: relative; list-style: none; margin: 0; padding: 0; }
.mm-movers li:not(.mm-sel) { border-bottom: 1px solid var(--border); }
.mm-movers button { position: relative; z-index: 1; width: 100%; height: var(--row); border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.mm-sel { position: absolute; left: 0; right: 0; top: 0; height: var(--row); background: linear-gradient(90deg, rgba(232, 194, 122, 0.1), rgba(232, 194, 122, 0)); border-left: 2px solid var(--accent); transform: translateY(calc(var(--i) * (var(--row) + 1px))); transition: transform 550ms var(--ease); overflow: hidden; pointer-events: none; }
.mm-sel-progress { position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--accent); opacity: 0.6; transform: scaleX(0); transform-origin: left; }
.mm-sel-progress.is-running { animation: mm-progress 6s linear both; }
@keyframes mm-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.mm-tk { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted); transition: color 300ms; }
.mm-nm { font-size: 15px; color: var(--body-copy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-movers button.is-on .mm-nm { color: #fff; font-weight: 600; }
.mm-movers button.is-on .mm-tk { color: var(--accent); }
.mm-spark { width: 100%; height: 22px; }
.mm-spark path { fill: none; stroke: #9aa8bc; stroke-width: 1.1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mm-movers button.is-on .mm-spark path { stroke: #eef0f3; }
.mm-spark-base { stroke: rgba(200, 215, 235, 0.18); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.mm-wt, .mm-chg { text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.mm-wt { color: var(--body-copy); }
.mm-chg.is-up { color: var(--help); }
.mm-chg.is-down { color: var(--hurt); }
.mm-pf-note { margin: 14px 0 0 16px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.mm-pf-map { min-width: 0; }
.mm-prof.is-on { animation: sw-in 500ms var(--ease) both; }
.mm-prof[hidden] { display: none; }
.mm-prof-name { margin: 0; display: flex; align-items: baseline; gap: 14px; font-family: var(--font-display); font-size: clamp(28px, 2.6vw, 38px); font-weight: 500; letter-spacing: -0.02em; color: #fff; }
.mm-prof-name span { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; color: var(--accent); }
.mm-prof-grid { margin-top: 20px; border-top: 1px solid var(--rule-strong); }
.mm-prof-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; border-bottom: 1px solid var(--border); }
.mm-prof-row > span { padding: 11px 0; font-size: 14px; line-height: 1.35; color: var(--body-copy); }
.mm-prof-row.is-head { border-bottom-color: var(--rule-strong); }
.mm-prof-row.is-head > span { padding: 14px 0 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.mm-prof-row i { font-style: normal; font-size: 9px; margin-right: 8px; vertical-align: 1px; }
.mm-prof-row i.is-up { color: var(--help); }
.mm-prof-row i.is-down { color: var(--hurt); }
.mm-prof-row i.is-mix { color: var(--mix); }
.mm-prof-row i.is-none { color: var(--faint); }
.mm-prof-row > span.is-sel { color: #fff; font-weight: 600; box-shadow: inset 0 -1px 0 var(--accent); }
.mm-pf-quote { margin: 32px 0 0; padding: 2px 0 2px 22px; border-left: 1px solid var(--accent); }
.mm-quote-k { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.mm-quote-k b { color: var(--foreground); font-weight: 600; }
.mm-pf-quote blockquote { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; letter-spacing: -0.01em; color: #eef0f3; text-wrap: balance; }
.mm-pf-quote figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); }

.sw-share { margin: 0; padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: #0d0f12; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45); }
.sw-share figcaption { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-family: var(--font-display); font-size: 20px; letter-spacing: -0.015em; }
.sw-share-tag { padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sw-share ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sw-share li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; }
.sw-share li.is-on { border-color: #3a3f47; background: var(--surface-raised); }
.sw-check { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--faint); border-radius: 5px; }
.sw-share li.is-on .sw-check { border-color: var(--foreground); background: var(--foreground); }
.sw-share li.is-on .sw-check::after { content: ""; width: 8px; height: 4px; margin-top: -2px; border-left: 2px solid var(--background); border-bottom: 2px solid var(--background); transform: rotate(-45deg); }
.sw-acct { display: grid; min-width: 0; }
.sw-acct strong { font-size: 15px; font-weight: 600; }
.sw-acct small { font-size: 13px; color: var(--muted); }
.sw-count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.sw-share-foot { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; font-size: 13.5px; color: var(--body-copy); }
.sw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--help); box-shadow: 0 0 0 4px rgba(63, 194, 127, 0.14); }

@media (max-width: 1000px) {
  .mm-pf { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .page-start main::before { width: 100%; right: -30%; }
  .sw-pane { min-height: 0; }
  .sw-window pre { font-size: 11px; }
  .mm-pf { padding: 18px 14px; border-radius: 22px; }
  .mm-pf-head, .mm-movers button { grid-template-columns: 44px minmax(0, 1fr) 54px 36px 50px; gap: 8px; padding: 0 6px 0 10px; }
  .mm-pf-head { font-size: 9px; letter-spacing: 0.02em; }
  .mm-prof-row { gap: 10px; }
  .mm-prof-row > span { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .sw-pane.is-on, .sw-pane.is-on .sw-chat-tools li, .mm-prof.is-on, .mm-sel-progress.is-running { animation: none; }
  .mm-sel, .sw-tabs-bar { transition: none; }
}

.portfolio-api-consent { margin: 24px 0; padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-raised); }
.portfolio-consent-choice { display: flex; align-items: flex-start; gap: 12px; margin: 18px 0; cursor: pointer; font-weight: 600; }
.portfolio-consent-choice input { width: 20px; height: 20px; margin-top: 3px; flex: 0 0 auto; accent-color: var(--foreground); }

.page-assistant main { padding: clamp(40px, 5vw, 72px) 0 clamp(56px, 6vw, 96px); }
.assistant-choice { width: min(600px, calc(100% - 40px)); max-height: 90vh; overflow: auto; margin: auto; padding: 32px; border: 1px solid var(--border); border-radius: 28px; color: var(--foreground); background: var(--surface); }
.assistant-choice::backdrop { background: rgba(0, 0, 0, 0.72); }
.assistant-choice p { color: var(--muted); line-height: 1.6; }
.assistant-choice .actions { margin: 24px 0; }
