/* The portal wordmark, navigation and reading surfaces are shared by all three products. */
:root {
  --mv-scheme: light;
  --mv-bg: #fff;
  --mv-ink: #141414;
  --mv-muted: #606062;
  --mv-secondary: #414143;
  --mv-rule: #d9d9da;
  --mv-wash: #f6f6f6;
  --mv-border: #acacae;
  --mv-loss: #753f42;
  --mv-loss-fill: #faf6f6;
  --mv-focus: #565658;
  --mv-font: "Avenir Next", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
}
html[data-theme="dark"] {
  --mv-scheme: dark;
  --mv-bg: #141416;
  --mv-ink: #f4f4f5;
  --mv-muted: #b4b4b8;
  --mv-secondary: #d3d3d5;
  --mv-rule: #3c3c41;
  --mv-wash: #202023;
  --mv-border: #626269;
  --mv-loss: #f2acb1;
  --mv-loss-fill: #302427;
  --mv-focus: #dadade;
}
html.mv-product[data-theme] {
  color-scheme: var(--mv-scheme);
  --mv-gutter: clamp(18px, 4.5vw, 70px);
  --mv-header: 70px;
  --mv-tools: 49px;
  --mv-width: 1380px;
  --font-body: var(--mv-font);
  --font-display: var(--mv-font);
  --font-sans: var(--mv-font);
  --font-serif: var(--mv-font);
  --font-mono: var(--mv-font);
  --bg-canvas: var(--mv-bg);
  --bg-surface: var(--mv-wash);
  --bg-elevated: var(--mv-bg);
  --card-bg: var(--mv-bg);
  --text-primary: var(--mv-ink);
  --text-secondary: var(--mv-secondary);
  --text-caption: var(--mv-muted);
  --color-primary: var(--mv-ink);
  --color-primary-fg: var(--mv-bg);
  --color-gold-300: var(--mv-focus);
  --text-danger: var(--mv-loss);
  --negative: var(--mv-loss);
  --loss-text: var(--text-danger);
  --profit-text: var(--mv-ink);
  --profit-fill: var(--mv-wash);
  --loss-fill: var(--mv-loss-fill);
  --flat-fill: var(--mv-wash);
  --border-default: var(--mv-rule);
  --border-strong: var(--mv-border);
  --border-gold: var(--mv-rule);
  --button-primary-bg: var(--mv-ink);
  --button-primary-bg-hover: var(--mv-secondary);
  --button-primary-bg-active: var(--mv-ink);
  --button-primary-fg: var(--mv-bg);
  --button-secondary-fg: var(--mv-ink);
  --button-secondary-border: var(--mv-border);
  --button-secondary-bg-hover: var(--mv-wash);
  --input-fg: var(--mv-ink);
  --input-border: var(--mv-rule);
  --input-bg: var(--mv-bg);
  --paper: var(--mv-bg);
  --bright: var(--mv-bg);
  --aluminum: var(--mv-rule);
  --soft: var(--mv-wash);
  --carbon: var(--mv-ink);
  --graphite: var(--mv-muted);
  --orange: var(--mv-ink);
  --orange-text: var(--mv-secondary);
  --line: var(--mv-rule);
  --wash: var(--mv-wash);
  --page-max: var(--mv-width);
  scroll-padding-top: calc(var(--mv-header) + var(--mv-tools) + 12px);
}
.mv-product body {background:var(--mv-bg);color:var(--mv-ink);font-family:var(--mv-font);font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased;}
.mv-product h1, .mv-product h2, .mv-product h3 {font-family:var(--mv-font);letter-spacing:-.018em;}
.mv-product :focus-visible {outline:2px solid var(--mv-focus);outline-offset:3px;}
.mv-bar {display:block;position:sticky;top:0;z-index:45;background:var(--mv-bg);border-bottom:1px solid var(--mv-rule);}
.mv-bar-inner {box-sizing:border-box;max-width:var(--mv-width);height:var(--mv-header);padding:0 var(--mv-gutter);margin:auto;display:flex;align-items:center;justify-content:space-between;gap:16px;}
.mv-home {display:grid;place-items:center;min-height:44px;text-decoration:none;}
.mv-wordmark {width:132px;aspect-ratio:4/1;background:url("./metraven.png") center 50.96% / 180% auto no-repeat;display:block;}
.mv-product .site-header {position:sticky;top:var(--mv-header);z-index:30;background:var(--mv-bg);border-bottom:1px solid var(--mv-rule);}
.mv-product .wrap, .mv-max .shell {max-width:var(--mv-width);padding-inline:var(--mv-gutter);}
.mv-product .section-title h2, .mv-product .group h2 {font-weight:600;}
.mv-product dialog {border:1px solid var(--mv-border);background:var(--mv-bg);color:var(--mv-ink);box-shadow:0 16px 55px rgb(0 0 0 / .09);}
.mv-product dialog::backdrop {background:rgb(15 15 16 / .38);}
.mv-product select {background-color:var(--mv-bg);border:1px solid var(--mv-border);border-radius:3px;}

/* Product toolbars sit below the same wordmark across the archive, guide and ranking. */
.mv-auto .header-inner {min-height:var(--mv-tools);max-width:var(--mv-width);padding:0 var(--mv-gutter);gap:12px;}
.mv-auto .site-header .brand, .mv-aurion .site-header .brand {font:600 14px/1.3 var(--mv-font);letter-spacing:.025em;gap:6px;}
.mv-auto .site-header .brand span, .mv-aurion .brand-version {font:inherit;letter-spacing:inherit;}
.mv-auto .site-header nav {width:auto;display:flex;justify-content:flex-start;gap:clamp(14px,2vw,28px);}
.mv-auto .site-header nav a, .mv-aurion .header-nav a {font-size:14px;min-height:40px;display:inline-flex;align-items:center;padding:0;}
.mv-auto .pnl-section {padding-top:clamp(26px,3.6vw,52px);}
.mv-auto .pnl-section h1, .mv-max .hero h1 {font-size:clamp(28px,3.2vw,44px);font-weight:600;line-height:1.24;}
.mv-auto .pnl-intro, .mv-max .hero p {color:var(--mv-muted);line-height:1.7;}
.mv-auto .pnl-controls {margin-top:22px;}
.mv-auto .pnl-table thead th, .mv-aurion .financial thead th {color:var(--mv-secondary);background:var(--mv-wash);font-weight:600;}
.mv-auto .site-footer {border-top-color:var(--mv-rule);}
.mv-auto .section-index {color:var(--mv-muted);}
.mv-aurion .site-header {height:var(--mv-tools);padding-inline:max(var(--mv-gutter),calc((100% - var(--mv-width)) / 2 + var(--mv-gutter)));gap:24px;}
.mv-aurion .brand-mark {display:none;}
.mv-aurion .search-trigger {min-height:34px;height:34px;border-radius:3px;}
.mv-aurion .reading-progress {top:calc(var(--mv-header) + var(--mv-tools) - 1px);height:1px;}
.mv-aurion .guide-layout {max-width:var(--mv-width);padding-inline:var(--mv-gutter);gap:clamp(30px,5vw,80px);}
.mv-aurion .toc {top:calc(var(--mv-header) + var(--mv-tools) + 10px);max-height:calc(100dvh - var(--mv-header) - var(--mv-tools) - 20px);}
.mv-aurion .chapter {border-bottom-color:var(--mv-rule);padding-top:clamp(25px,3.1vw,48px);}
.mv-aurion .chapter h2 {font-size:clamp(24px,3.2vw,43px);font-weight:600;line-height:1.3;}
.mv-aurion .chapter-top {margin-bottom:10px;}
.mv-aurion .chapter-anchor {border:0;}
.mv-aurion .performance-basis {display:block;margin-top:9px;font:400 clamp(15px,1.4vw,19px)/1.6 var(--mv-font);letter-spacing:0;color:var(--mv-muted);}
.mv-aurion .version-plate {border-color:var(--mv-rule);background:var(--mv-bg);}
.mv-aurion .version-plate::before {width:2px;}
.mv-aurion .risk-strip {background:var(--mv-wash);color:var(--mv-ink);border-block:1px solid var(--mv-rule);}
.mv-aurion .risk-marker, .mv-aurion .button-dark:hover {background:var(--mv-ink);color:var(--mv-bg);}
.mv-aurion .back-top:hover {color:var(--mv-bg);background:var(--mv-ink);}
.mv-aurion .site-footer {border-color:var(--mv-rule);background:var(--mv-bg);}
.mv-max .hero {padding-top:clamp(26px,3.6vw,52px);}
.mv-max .overline {color:var(--mv-muted);font-weight:600;}
.mv-max .engine-guide {border-color:var(--mv-rule);border-radius:2px;}
.mv-max .group {border:0;}
.mv-max .group h2 {padding:14px 0 12px;border-top:1px solid var(--mv-rule);}
.mv-max .overview td {font-variant-numeric:tabular-nums;}
@media(max-width:960px) {
  .mv-aurion .toc {position:static;max-height:none;}
  .mv-aurion .guide-layout {row-gap:0;}
}
@media(max-width:760px) {
  html.mv-product {--mv-header:56px;--mv-tools:44px;}
  .mv-auto .header-inner {min-height:var(--mv-tools);flex-wrap:nowrap;}
  .mv-auto .site-header .brand {display:none;}
  .mv-auto .site-header nav {width:100%;justify-content:space-between;gap:6px;}
  .mv-auto .site-header nav a {font-size:13px;min-height:44px;}
  .mv-aurion .financial tbody td {font-size:15px;}
}
@media(max-width:560px) {
  .mv-wordmark {width:100px;}
  .mv-bar-inner {gap:10px;}
}

@media print {.mv-bar,.mv-product .site-header {display:none;}}

/* The switch describes the mode it opens. */
.mv-theme-toggle {
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  flex:none;min-height:44px;padding:0 11px;border:0;border-radius:4px;
  color:var(--mv-ink);background:transparent;cursor:pointer;
  font:600 13px/1 var(--mv-font);white-space:nowrap;
}
.mv-theme-toggle::before {
  content:"";width:15px;height:15px;box-sizing:border-box;
  border:1.5px solid currentColor;border-radius:50%;
  background:linear-gradient(90deg,currentColor 50%,transparent 50%);
}
.mv-theme-toggle:hover {background:var(--mv-wash);color:var(--mv-ink);}
.mv-theme-toggle:focus-visible {outline:2px solid var(--mv-focus);outline-offset:2px;}
.mv-bar-inner .mv-product-name {margin-right:auto;border-left:1px solid var(--mv-rule);padding-left:clamp(12px,2vw,24px);font:600 clamp(12px,1vw,15px)/1.4 var(--mv-font);letter-spacing:.045em;color:var(--mv-ink);}
.mv-landing .mv-theme-toggle {position:absolute;top:clamp(12px,3vw,32px);right:clamp(14px,4vw,60px);}
html[data-theme="dark"] .mv-wordmark,
html[data-theme="dark"].mv-landing h1 img {filter:invert(1);mix-blend-mode:screen;}
.mv-landing[data-theme="dark"] h1 {mix-blend-mode:screen;}
.mv-aurion .copy-section p, .mv-aurion .question p {color:var(--mv-secondary);}
@media(max-width:560px) {
  .mv-bar-inner .mv-theme-toggle {padding-inline:4px;gap:4px;}
  .mv-bar-inner {gap:8px;}
}
@media(max-width:370px) {
  .mv-bar-inner .mv-wordmark {width:80px;}
}
@media print {.mv-theme-toggle {display:none;}}

html.mv-product.mv-direct-entry { scroll-behavior: auto; }

/* Local adaptation of the grid, spotlight and click feedback from Digital Serenity.
   https://21st.dev/@minhxthanh/components/digital-serenity-animated-landing-page */
:root { --mv-ease: cubic-bezier(.2,.75,.25,1); }
.mv-landing .mv-theme-toggle { z-index: 2; }
.mv-landing .mesh-field::after {
  background-color: color-mix(in srgb, var(--mv-ink) 4%, transparent);
}
.mv-choices a {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.mv-choices a::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
}
.mv-choices a:focus-visible::before, .mv-choices a:active::before { transform: scaleX(1); }
.mv-choices a:active { background: var(--mv-wash); }
.mv-choices .arrow, .rank-destinations a > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-inline-end: 2px;
  border: 1px solid var(--mv-rule);
  border-radius: 50%;
  color: var(--mv-ink);
  line-height: 1;
}
.mv-choices .arrow::before { top: 15px; right: 8px; width: 14px; }
.mv-choices .arrow::after { top: 12px; right: 8px; width: 7px; height: 7px; }
.mv-choices .arrow { rotate: -45deg; }
.mv-choices a:focus-visible :is(.arrow, span[aria-hidden="true"]),
.mv-choices a:active :is(.arrow, span[aria-hidden="true"]) {
  background: var(--mv-ink);
  border-color: var(--mv-ink);
  color: var(--mv-bg);
}
@media (hover: hover) {
  .mv-choices a:hover::before { transform: scaleX(1); }
  .mv-choices a:hover :is(.arrow, span[aria-hidden="true"]) {
    background: var(--mv-ink);
    border-color: var(--mv-ink);
    color: var(--mv-bg);
  }
}
.mv-ripple {
  position: absolute;
  pointer-events: none;
  width: 104px;
  height: 104px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0;
}
@keyframes mv-ripple-out {
  from { transform: translate(-50%,-50%) scale(.15); opacity: .24; }
  to { transform: translate(-50%,-50%) scale(1.7); opacity: 0; }
}
@keyframes mv-arrive {
  from { opacity: .25; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
@keyframes mv-theme-fade { to { opacity: 0; } }
@view-transition { navigation: auto; }
@keyframes mv-header-float {
  0%, 100% { transform: translateY(1px); }
  50% { transform: translateY(-2.5px); }
}
@keyframes mv-shadow-breathe {
  0%, 100% { scale: 1; opacity: .11; }
  50% { scale: .8; opacity: .055; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  .mv-product .mv-wordmark { animation: mv-header-float 6.4s ease-in-out infinite; }
  .mv-landing .brand-stage::after {
    content: "";
    position: absolute;
    top: calc(50% + clamp(53px, 7vw, 85px));
    width: min(40%, 245px);
    height: 7px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(ellipse, var(--mv-ink), transparent 72%);
    filter: blur(3px);
    animation: mv-shadow-breathe 6.4s ease-in-out .68s infinite backwards;
  }
  .mv-choices a {
    animation: mv-arrive .48s var(--mv-ease) backwards;
    animation-delay: calc(var(--entry-start, 0ms) + var(--entry-step, 0ms));
    transition: background-color .15s ease;
  }
  .mv-choices a:nth-child(2) { --entry-step: 55ms; }
  .mv-choices a:nth-child(3) { --entry-step: 110ms; }
  .mv-landing .mv-choices { --entry-start: 260ms; }
  .mv-landing .mv-choices a:nth-child(2) { --entry-step: 95ms; }
  .mv-landing .mv-choices a:nth-child(3) { --entry-step: 190ms; }
  .mv-choices a::before { transition: transform .32s var(--mv-ease); }
  .mv-choices .arrow, .rank-destinations a > span {
    transition: background-color .2s, border-color .2s, color .2s;
  }
  .mv-ripple { animation: mv-ripple-out .44s var(--mv-ease) both; }
  .mv-product .mv-product-name,
  .mv-max .hero h1, .mv-max .detailhead h1,
  .mv-auto #page-title, .mv-aurion #performance:target h2, .mv-aurion .hero h1,
  .mv-product main > h1 {
    animation: mv-arrive .38s var(--mv-ease) backwards;
  }
  .mv-product dialog[open] { animation: mv-arrive .2s var(--mv-ease); }
  ::view-transition { pointer-events: none; }
  ::view-transition-old(root) {
    z-index: 1;
    mix-blend-mode: normal;
    animation: mv-theme-fade .2s ease-out both;
  }
  ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .mv-choices .arrow, .mv-choices a::before { transition: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
}
@media print { .mesh-field, .registration { display: none; } }
