/* ==========================================================================
   Moore Typology 2.0 - interface styles (same system as the MooreMetrics Dive tools)
   .mt-page  : the standalone page served on mooretypology.com
   .mt-app   : the tool itself (shared by the standalone page and the shortcode)
   Palette: ink on white, a muslin-paper hero panel, and a slate indigo as the one
   accent (--mt-accent; change that one value to retune the whole page).
   The five dimensions each have a hue of their own (--mt-dim-*), used for the
   letters of a type and its score bars.
   ========================================================================== */

.mt-page,
.mt-app {
    --mt-ink: #17150F;
    --mt-ink-2: #5E5A52;
    --mt-ink-3: #8C877D;
    --mt-line: #E4E0D6;
    --mt-line-strong: #C9C3B6;
    --mt-ground: #FFFFFF;
    --mt-surface: #FAF9F6;
    --mt-paper: #E2DFD3;
    --mt-paper-dot: #CBC6B7;
    --mt-accent: #3E4C8C;
    --mt-accent-soft: rgba(62, 76, 140, 0.32);
    --mt-accent-deep: #B08600;
    --mt-accent-track: #F1E7C4;
    --mt-denim: #2E5FA3;
    --mt-denim-tint: #E7EEF8;
    --mt-warn-bg: #FBF3D6;
    --mt-warn-line: #E8D48A;
    --mt-warn-ink: #6B5200;
    --mt-error-bg: #FBE9E7;
    --mt-error-line: #E8B4AE;
    --mt-error-ink: #7A2E22;
    --mt-font-ui: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --mt-font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
    --mt-shadow: 0 10px 30px rgba(23, 21, 15, 0.12);
}

/* --- Page frame (standalone only) ------------------------------------------ */

.mt-page {
    margin: 0;
    background: var(--mt-ground);
    color: var(--mt-ink);
    font-family: var(--mt-font-ui);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    color-scheme: light;
}

.mt-page *,
.mt-page *::before,
.mt-page *::after,
.mt-app *,
.mt-app *::before,
.mt-app *::after {
    box-sizing: border-box;
}

:is(.mt-app, .mt-page) .mt-container {
    max-width: 1160px;
    margin: 0 auto;
    padding-inline: 24px;
}

:is(.mt-app, .mt-page) .mt-skip {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    background: var(--mt-ink);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}
:is(.mt-app, .mt-page) .mt-skip:focus { top: 12px; }

:is(.mt-app, .mt-page) .mt-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Type ------------------------------------------------------------------- */

.mt-app,
.mt-page {
    font-variation-settings: normal;
}

.mt-app {
    font-family: var(--mt-font-ui);
    color: var(--mt-ink);
    font-size: 16px;
    line-height: 1.5;
    container-type: inline-size;
    container-name: mt;
}

:where(.mt-app) :where(p) { margin: 0 0 1em; }

:is(.mt-app, .mt-page) .mt-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mt-ink-3);
    margin: 0;
    line-height: 1.4;
}

:is(.mt-app, .mt-page) .mt-h1 {
    font-size: clamp(44px, 6.4vw, 80px);
    font-weight: 700;
    font-stretch: 78%;
    letter-spacing: -0.02em;
    line-height: 0.98;
    margin: 14px 0 22px;
    text-wrap: balance;
    color: var(--mt-ink);
}
:is(.mt-app, .mt-page) .mt-h1 em {
    font-family: var(--mt-font-serif);
    font-style: italic;
    font-weight: 400;
    font-stretch: 100%;
    font-size: 1.14em;
    letter-spacing: 0;
}

:is(.mt-app, .mt-page) .mt-h2 {
    text-transform: none;
    font-family: var(--mt-font-ui);
    font-size: clamp(28px, 3.4vw, 38px);
    font-weight: 700;
    font-stretch: 82%;
    letter-spacing: -0.015em;
    line-height: 1.06;
    margin: 6px 0 0;
    text-wrap: balance;
    color: var(--mt-ink);
}

:is(.mt-app, .mt-page) .mt-h3 {
    text-transform: none;
    font-family: var(--mt-font-ui);
    font-size: 22px;
    font-weight: 700;
    font-stretch: 85%;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin: 0 0 6px;
    color: var(--mt-ink);
}

:is(.mt-app, .mt-page) .mt-h4 {
    text-transform: none;
    font-family: var(--mt-font-ui);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin: 8px 0;
    color: var(--mt-ink);
}

:is(.mt-app, .mt-page) .mt-lede {
    font-size: 18px;
    line-height: 1.55;
    color: var(--mt-ink-2);
    max-width: 54ch;
    margin: 0 0 24px;
}

:is(.mt-app, .mt-page) .mt-muted {
    color: var(--mt-ink-2);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 18px;
    max-width: 72ch;
}

:is(.mt-app, .mt-page) .mt-link {
    color: var(--mt-ink);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    text-decoration-color: var(--mt-accent-deep);
}
:is(.mt-app, .mt-page) .mt-link:hover { text-decoration-color: var(--mt-ink); }

:is(.mt-app, .mt-page) .mt-btn:focus-visible,
:is(.mt-app, .mt-page) .mt-link:focus-visible,
:is(.mt-app, .mt-page) .mt-tab:focus-visible,
:is(.mt-app, .mt-page) .mt-topnav a:focus-visible,
:is(.mt-app, .mt-page) .mt-menu summary:focus-visible,
:is(.mt-app, .mt-page) .mt-chips__remove:focus-visible {
    outline: 3px solid var(--mt-accent);
    outline-offset: 2px;
}

/* --- Top bar ---------------------------------------------------------------- */

:is(.mt-app, .mt-page) .mt-topbar {
    border-bottom: 1px solid var(--mt-line);
    background: var(--mt-ground);
}
:is(.mt-app, .mt-page) .mt-topbar__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 66px;
}

:is(.mt-app, .mt-page) .mt-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-stretch: 62%;
    font-size: 25px;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--mt-ink);
    text-decoration: none;
}
:is(.mt-app, .mt-page) .mt-wordmark::before {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--mt-accent);
    border-radius: 2px;
    flex-shrink: 0;
}
:is(.mt-app, .mt-page) .mt-wordmark__text { white-space: nowrap; }
:is(.mt-app, .mt-page) .mt-wordmark b { font-weight: 900; }

:is(.mt-app, .mt-page) .mt-topnav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    font-size: 14px;
    font-weight: 500;
}
:is(.mt-app, .mt-page) .mt-topnav > a {
    color: var(--mt-ink-2);
    text-decoration: none;
    white-space: nowrap;
}
:is(.mt-app, .mt-page) .mt-menu summary { white-space: nowrap; }
:is(.mt-app, .mt-page) .mt-topnav > a:hover { color: var(--mt-ink); }

:is(.mt-app, .mt-page) .mt-topbar__by {
    font-size: 13px;
    color: var(--mt-ink-3);
    text-decoration: none;
    white-space: nowrap;
}
:is(.mt-app, .mt-page) .mt-topbar__by:hover { color: var(--mt-ink); }

:is(.mt-app, .mt-page) .mt-menu { position: relative; }
:is(.mt-app, .mt-page) .mt-menu summary {
    list-style: none;
    cursor: pointer;
    color: var(--mt-ink-2);
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
:is(.mt-app, .mt-page) .mt-menu summary::-webkit-details-marker { display: none; }
:is(.mt-app, .mt-page) .mt-menu summary::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}
:is(.mt-app, .mt-page) .mt-menu[open] summary { color: var(--mt-ink); }
:is(.mt-app, .mt-page) .mt-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: 300px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid var(--mt-line-strong);
    border-radius: 10px;
    box-shadow: var(--mt-shadow);
    padding: 8px;
    z-index: 30;
    display: grid;
}
:is(.mt-app, .mt-page) .mt-menu__panel a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--mt-ink);
    text-decoration: none;
    font-weight: 600;
}
:is(.mt-app, .mt-page) .mt-menu__panel a span {
    color: var(--mt-ink-3);
    font-weight: 400;
    font-size: 12px;
    text-align: right;
}
:is(.mt-app, .mt-page) .mt-menu__panel a:hover { background: var(--mt-surface); }

/* --- Hero --------------------------------------------------------------------- */

:is(.mt-app, .mt-page) .mt-hero {
    padding-block: 56px 44px;
    border-bottom: 1px solid var(--mt-line);
}
:is(.mt-app, .mt-page) .mt-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px;
    align-items: center;
}
:is(.mt-app, .mt-page) .mt-hero__actions {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

:is(.mt-app, .mt-page) .mt-stats {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
    margin: 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--mt-line);
}
:is(.mt-app, .mt-page) .mt-stat dt {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mt-ink-3);
}
:is(.mt-app, .mt-page) .mt-stat dd {
    margin: 4px 0 0;
    font-size: 28px;
    font-weight: 700;
    font-stretch: 85%;
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: var(--mt-ink);
}

:is(.mt-app, .mt-page) .mt-hero__art,
:is(.mt-app, .mt-page) .mt-embed-hero__art {
    position: relative;
    background-color: var(--mt-paper);
    background-image: radial-gradient(circle, var(--mt-paper-dot) 1px, transparent 1.3px);
    background-size: 18px 18px;
    border-radius: 12px;
    overflow: hidden;
}
:is(.mt-app, .mt-page) .mt-hero__art img,
:is(.mt-app, .mt-page) .mt-embed-hero__art img {
    display: block;
    width: 100%;
    height: auto;
}
:is(.mt-app, .mt-page) .mt-hero__spec {
    padding: 22px 24px 6px;
}
:is(.mt-app, .mt-page) .mt-hero__dims {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 0;
    padding: 0;
}
:is(.mt-app, .mt-page) .mt-hero__dims li {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--mt-ink);
    border: 1px solid rgba(23, 21, 15, 0.22);
    border-radius: 999px;
    padding: 3px 9px;
    background: rgba(255, 255, 255, 0.4);
}

/* --- Embedded flavour (inside the MooreMetrics theme) --------------------------- */

:is(.mt-app, .mt-page) .mt-embed-hero { margin: 0 0 8px; }
:is(.mt-app, .mt-page) .mt-embed-hero__art { margin-bottom: 22px; }
.mt-app--embedded .mt-stats { margin-bottom: 8px; }

/* --- Notices ------------------------------------------------------------------ */

:is(.mt-app, .mt-page) .mt-notice {
    border: 1px solid var(--mt-line);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
    margin: 24px 0 0;
    background: var(--mt-surface);
    color: var(--mt-ink);
}
:is(.mt-app, .mt-page) .mt-notice--error {
    background: var(--mt-error-bg);
    border-color: var(--mt-error-line);
    color: var(--mt-error-ink);
}
:is(.mt-app, .mt-page) .mt-notice--warn {
    background: var(--mt-warn-bg);
    border-color: var(--mt-warn-line);
    color: var(--mt-warn-ink);
}
:is(.mt-app, .mt-page) .mt-notice--paywall { margin-top: 24px; }

/* --- Buttons --------------------------------------------------------------------- */

:is(.mt-app, .mt-page) .mt-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 8px;
    padding: 13px 22px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    box-shadow: none;
    margin: 0;
}
:is(.mt-app, .mt-page) .mt-btn--primary {
    background: var(--mt-ink);
    color: #fff;
    border-color: var(--mt-ink);
}
:is(.mt-app, .mt-page) .mt-btn--primary:hover {
    background: var(--mt-accent);
    color: #fff;
    border-color: var(--mt-accent);
}
:is(.mt-app, .mt-page) .mt-btn--primary:active { transform: translateY(1px); }
:is(.mt-app, .mt-page) .mt-btn--primary:disabled,
:is(.mt-app, .mt-page) .mt-btn--primary[aria-disabled="true"] {
    background: var(--mt-line);
    color: var(--mt-ink-3);
    border-color: var(--mt-line);
    cursor: not-allowed;
    transform: none;
}
:is(.mt-app, .mt-page) .mt-btn--ghost {
    background: transparent;
    color: var(--mt-ink);
    border-color: var(--mt-line-strong);
}
:is(.mt-app, .mt-page) .mt-btn--ghost:hover { background: var(--mt-surface); }

.mt-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: mt-spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes mt-spin { to { transform: rotate(360deg); } }

.mt-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: #17150F;
    color: #fff;
    padding: 12px 18px;
    border-radius: 999px;
    font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 60;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

/* --- How it works ------------------------------------------------------------------ */

:is(.mt-app, .mt-page) .mt-how {
    padding-block: 48px;
    border-top: 1px solid var(--mt-line);
}
:is(.mt-app, .mt-page) .mt-how--embedded { padding-block: 36px 8px; }
:is(.mt-app, .mt-page) .mt-how__steps {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
:is(.mt-app, .mt-page) .mt-how__step {
    border-top: 2px solid var(--mt-ink);
    padding-top: 16px;
    margin: 0;
}
:is(.mt-app, .mt-page) .mt-how__num {
    font-weight: 700;
    font-stretch: 75%;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--mt-ink-3);
}
:is(.mt-app, .mt-page) .mt-how__step p {
    margin: 0;
    color: var(--mt-ink-2);
    font-size: 15px;
    line-height: 1.55;
}
:is(.mt-app, .mt-page) .mt-how__api {
    margin: 28px 0 0;
    font-size: 15px;
    color: var(--mt-ink-2);
}

/* --- Footer / sister tools -------------------------------------------------------------- */

:is(.mt-app, .mt-page) .mt-footer {
    background: var(--mt-surface);
    border-top: 1px solid var(--mt-line);
    padding-block: 40px 28px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--mt-ink);
}
:is(.mt-app, .mt-page) .mt-sisters {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
}
:is(.mt-app, .mt-page) .mt-sisters--embedded {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--mt-line);
    font-size: 14px;
}
:is(.mt-app, .mt-page) .mt-sisters__list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
:is(.mt-app, .mt-page) .mt-sisters__list li { margin: 0; }
:is(.mt-app, .mt-page) .mt-sisters__list--columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(.mt-app, .mt-page) .mt-sisters a {
    color: var(--mt-ink);
    font-weight: 600;
    text-decoration: none;
}
:is(.mt-app, .mt-page) .mt-sisters a:hover { text-decoration: underline; text-underline-offset: 3px; }
:is(.mt-app, .mt-page) .mt-sisters .mt-muted {
    display: inline;
    margin: 0;
    font-size: 13px;
}
:is(.mt-app, .mt-page) .mt-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--mt-line);
    color: var(--mt-ink-2);
    font-size: 13px;
}
:is(.mt-app, .mt-page) .mt-footer__bottom p { margin: 0; }
:is(.mt-app, .mt-page) .mt-footer__bottom a {
    color: var(--mt-ink);
    font-weight: 500;
    text-decoration: none;
}
:is(.mt-app, .mt-page) .mt-footer__bottom a:hover { text-decoration: underline; }

/* --- Responsive: container queries for the tool, media queries for the page frame ---------- */

@container mt (min-width: 700px) {
    :is(.mt-app, .mt-page) .mt-dims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container mt (min-width: 940px) {
    :is(.mt-app, .mt-page) .mt-worksheet__grid {
        grid-template-columns: minmax(0, 1fr) 296px;
        gap: 32px;
        align-items: start;
    }
    :is(.mt-app, .mt-page) .mt-rail__inner {
        position: sticky;
        top: 24px;
    }
}

@container mt (max-width: 939px) {
    :is(.mt-app, .mt-page) .mt-resource { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    :is(.mt-app, .mt-page) .mt-rail__actions {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@container mt (max-width: 520px) {
    :is(.mt-app, .mt-page) .mt-cards { grid-template-columns: minmax(0, 1fr); }
    :is(.mt-app, .mt-page) .mt-charts__grid { grid-template-columns: minmax(0, 1fr); }
    :is(.mt-app, .mt-page) .mt-profile__row { grid-template-columns: 88px minmax(0, 1fr) 44px; }
    :is(.mt-app, .mt-page) .mt-sites__actions .mt-btn { width: 100%; }
}

@media (max-width: 900px) {
    :is(.mt-app, .mt-page) .mt-hero__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
    :is(.mt-app, .mt-page) .mt-hero { padding-block: 40px 36px; }
    :is(.mt-app, .mt-page) .mt-how__steps { grid-template-columns: minmax(0, 1fr); }
    :is(.mt-app, .mt-page) .mt-sisters { grid-template-columns: minmax(0, 1fr); }
    :is(.mt-app, .mt-page) .mt-resource { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 720px) {
    :is(.mt-app, .mt-page) .mt-topbar__by { display: none; }
    :is(.mt-app, .mt-page) .mt-topnav { gap: 16px; }
    :is(.mt-app, .mt-page) .mt-topnav > a:first-child { display: none; }
}

@media (max-width: 480px) {
    :is(.mt-app, .mt-page) .mt-topnav > a:nth-child(2) { display: none; }
    :is(.mt-app, .mt-page) .mt-wordmark { font-size: 22px; }
    :is(.mt-app, .mt-page) .mt-tab { font-size: 15px; gap: 8px; }
    :is(.mt-app, .mt-page) .mt-tabs { gap: 0 18px; }
}

@media (max-width: 640px) {
    :is(.mt-app, .mt-page) .mt-container { padding-inline: 16px; }
    :is(.mt-app, .mt-page) .mt-stats { gap: 24px; }
    :is(.mt-app, .mt-page) .mt-stat dd { font-size: 24px; }
    :is(.mt-app, .mt-page) .mt-sisters__list--columns { grid-template-columns: minmax(0, 1fr); }
    :is(.mt-app, .mt-page) .mt-tabs { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .mt-page *,
    .mt-app * {
        transition: none !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    .mt-spinner { display: none; }
}

/* --- Footer with a single group of links: use the whole width ------------------------- */
:is(.mt-app, .mt-page) .mt-sisters--solo { grid-template-columns: minmax(0, 1fr); }
:is(.mt-app, .mt-page) .mt-sisters--solo .mt-sisters__list--columns { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; }
@media (max-width: 900px) {
    :is(.mt-app, .mt-page) .mt-sisters--solo .mt-sisters__list--columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    :is(.mt-app, .mt-page) .mt-sisters--solo .mt-sisters__list--columns { grid-template-columns: minmax(0, 1fr); }
}


/* --- Footer with two groups (tools + regional) ------------------------------------------ */
:is(.mt-app, .mt-page) .mt-sisters--two { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
:is(.mt-app, .mt-page) .mt-sisters--two .mt-sisters__list--columns { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
@media (max-width: 900px) {
    :is(.mt-app, .mt-page) .mt-sisters--two { grid-template-columns: minmax(0, 1fr); }
    :is(.mt-app, .mt-page) .mt-sisters--two .mt-sisters__list--columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    :is(.mt-app, .mt-page) .mt-sisters--two .mt-sisters__list--columns { grid-template-columns: minmax(0, 1fr); }
}


/* ==========================================================================
   Moore Typology: the test, results, and type pages
   ========================================================================== */

/* --- Hero spec: the five pairs ------------------------------------------------- */

:is(.mt-app, .mt-page) .mt-hero__spec { padding: 22px 24px 20px; }
:is(.mt-app, .mt-page) .mt-hero__pairs {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
:is(.mt-app, .mt-page) .mt-hero__pairs li {
    margin: 0;
    display: grid;
    grid-template-columns: auto minmax(24px, 1fr) auto;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--mt-ink);
}
:is(.mt-app, .mt-page) .mt-hero__pairs li b {
    display: inline-block;
    min-width: 22px;
    text-align: center;
    font-weight: 800;
    font-stretch: 80%;
    color: #fff;
    background: var(--mt-dim);
    border-radius: 5px;
    padding: 1px 4px;
}
:is(.mt-app, .mt-page) .mt-hero__pairs-line {
    height: 2px;
    background: var(--mt-dim);
    opacity: 0.45;
    border-radius: 2px;
}
:is(.mt-app, .mt-page) .mt-hero__spec-note {
    margin: 16px 0 0;
    font-family: var(--mt-font-serif);
    font-style: italic;
    font-size: 18px;
    color: var(--mt-ink-2);
}
:is(.mt-app, .mt-page) .mt-embed-hero .mt-lede { margin-top: 0; }

/* --- The test ------------------------------------------------------------------ */

:is(.mt-app, .mt-page) .mt-test {
    padding-block: 44px 24px;
    scroll-margin-top: 16px;
}
:is(.mt-app, .mt-page) .mt-test__head { max-width: 70ch; }
:is(.mt-app, .mt-page) .mt-test__intro {
    margin: 12px 0 0;
    font-size: 17px;
    line-height: 1.55;
    color: var(--mt-ink-2);
}

:is(.mt-app, .mt-page) .mt-progress {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--mt-line);
    margin: 28px 0 8px;
    padding: 12px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px 18px;
}
:is(.mt-app, .mt-page) .mt-progress__bar {
    grid-column: 1 / -1;
    height: 6px;
    border-radius: 999px;
    background: var(--mt-line);
    overflow: hidden;
}
:is(.mt-app, .mt-page) .mt-progress__bar span {
    display: block;
    height: 100%;
    background: var(--mt-accent);
    border-radius: 999px;
    transition: width 0.25s ease;
}
:is(.mt-app, .mt-page) .mt-progress__text {
    margin: 0;
    font-size: 13px;
    color: var(--mt-ink-2);
    font-variant-numeric: tabular-nums;
}
:is(.mt-app, .mt-page) .mt-progress__text b { color: var(--mt-ink); font-weight: 700; }
:is(.mt-app, .mt-page) .mt-progress__next { font-size: 13px; justify-self: end; }
:is(.mt-app, .mt-page) .mt-progress__next[hidden] { display: none; }

:is(.mt-app, .mt-page) .mt-form { margin: 0; }
:is(.mt-app, .mt-page) .mt-honey {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

:is(.mt-app, .mt-page) .mt-part { padding-top: 28px; }
:is(.mt-app, .mt-page) .mt-part__label { margin-bottom: 4px; }
:is(.mt-app, .mt-page) .mt-part--extra {
    margin-top: 32px;
    padding: 28px 24px 8px;
    border: 1px solid var(--mt-line);
    border-radius: 12px;
    background: var(--mt-surface);
}
:is(.mt-app, .mt-page) .mt-part--extra .mt-h3 { margin: 4px 0 6px; }
:is(.mt-app, .mt-page) .mt-part--extra > .mt-muted { margin: 0 0 8px; max-width: 60ch; }

:is(.mt-app, .mt-page) .mt-q {
    border: 0;
    margin: 0;
    padding: 22px 0 24px;
    min-width: 0;
    border-bottom: 1px solid var(--mt-line);
    scroll-margin-top: 110px;
    transition: background 0.3s;
}
:is(.mt-app, .mt-page) .mt-part > .mt-q:last-child { border-bottom: 0; }
:is(.mt-app, .mt-page) .mt-q.is-flagged {
    background: var(--mt-warn-bg);
    box-shadow: 0 0 0 10px var(--mt-warn-bg);
    border-radius: 6px;
}
:is(.mt-app, .mt-page) .mt-q__text {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 0;
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--mt-ink);
    max-width: 72ch;
}
:is(.mt-app, .mt-page) .mt-q__num {
    flex: none;
    min-width: 28px;
    font-size: 12px;
    font-weight: 700;
    font-stretch: 80%;
    letter-spacing: 0.06em;
    color: var(--mt-ink-3);
    font-variant-numeric: tabular-nums;
}
:is(.mt-app, .mt-page) .mt-q.is-answered .mt-q__num { color: var(--mt-accent); }
:is(.mt-app, .mt-page) .mt-q__help {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--mt-ink-3);
}

:is(.mt-app, .mt-page) .mt-scale {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) 112px;
    align-items: center;
    gap: 14px;
    max-width: 680px;
}
:is(.mt-app, .mt-page) .mt-scale__end {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mt-ink-3);
    line-height: 1.3;
}
:is(.mt-app, .mt-page) .mt-scale__end--high { text-align: right; }
:is(.mt-app, .mt-page) .mt-scale__options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}
:is(.mt-app, .mt-page) .mt-scale__opt {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}
:is(.mt-app, .mt-page) .mt-scale__opt input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    scroll-margin-top: 110px;
}
:is(.mt-app, .mt-page) .mt-scale__dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--mt-line-strong);
    background: #fff;
    color: var(--mt-ink-3);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.12s;
}
:is(.mt-app, .mt-page) .mt-scale__opt:nth-child(1) .mt-scale__dot,
:is(.mt-app, .mt-page) .mt-scale__opt:nth-child(7) .mt-scale__dot { width: 46px; height: 46px; }
:is(.mt-app, .mt-page) .mt-scale__opt:nth-child(2) .mt-scale__dot,
:is(.mt-app, .mt-page) .mt-scale__opt:nth-child(6) .mt-scale__dot { width: 43px; height: 43px; }
:is(.mt-app, .mt-page) .mt-scale__opt:nth-child(4) .mt-scale__dot { border-style: dashed; }
:is(.mt-app, .mt-page) .mt-scale__opt:hover .mt-scale__dot {
    border-color: var(--mt-accent);
    color: var(--mt-accent);
}
:is(.mt-app, .mt-page) .mt-scale__opt input:checked + .mt-scale__dot {
    background: var(--mt-ink);
    border-color: var(--mt-ink);
    border-style: solid;
    color: #fff;
    transform: scale(1.06);
}
:is(.mt-app, .mt-page) .mt-scale__opt input:focus-visible + .mt-scale__dot {
    outline: 2px solid var(--mt-accent);
    outline-offset: 3px;
}

:is(.mt-app, .mt-page) .mt-segmented {
    display: inline-flex;
    border: 1px solid var(--mt-line-strong);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
:is(.mt-app, .mt-page) .mt-segmented__opt {
    position: relative;
    margin: 0;
    cursor: pointer;
}
:is(.mt-app, .mt-page) .mt-segmented__opt + .mt-segmented__opt { border-left: 1px solid var(--mt-line-strong); }
:is(.mt-app, .mt-page) .mt-segmented__opt input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    scroll-margin-top: 110px;
}
:is(.mt-app, .mt-page) .mt-segmented__opt span {
    display: block;
    padding: 11px 22px;
    font-size: 15px;
    font-weight: 600;
    color: var(--mt-ink-2);
    transition: background 0.12s, color 0.12s;
}
:is(.mt-app, .mt-page) .mt-segmented__opt:hover span { color: var(--mt-ink); background: var(--mt-surface); }
:is(.mt-app, .mt-page) .mt-segmented__opt input:checked + span { background: var(--mt-ink); color: #fff; }
:is(.mt-app, .mt-page) .mt-segmented__opt input:focus-visible + span { outline: 2px solid var(--mt-accent); outline-offset: -3px; }

:is(.mt-app, .mt-page) .mt-form__foot {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--mt-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
:is(.mt-app, .mt-page) .mt-form__privacy { margin: 0; max-width: 56ch; font-size: 13px; }
:is(.mt-app, .mt-page) .mt-btn--big { padding: 16px 34px; font-size: 17px; }
:is(.mt-app, .mt-page) .mt-form.is-submitting .mt-btn--big { opacity: 0.8; }

/* --- A result / a type ------------------------------------------------------------ */

:is(.mt-app, .mt-page) .mt-results {
    padding-block: 40px 16px;
    outline: none;
    scroll-margin-top: 16px;
}
:is(.mt-app, .mt-page) .mt-results__head { margin-bottom: 36px; }
:is(.mt-app, .mt-page) .mt-code {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 18px 0 14px;
}
:is(.mt-app, .mt-page) .mt-code__letter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 72px;
}
:is(.mt-app, .mt-page) .mt-code__letter b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 84px;
    border-radius: 12px;
    background: var(--mt-letter);
    color: #fff;
    font-size: 54px;
    font-weight: 900;
    font-stretch: 78%;
    line-height: 1;
    letter-spacing: -0.02em;
}
:is(.mt-app, .mt-page) .mt-code__letter small {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mt-ink-2);
    text-align: center;
}
:is(.mt-app, .mt-page) .mt-results__name {
    font-family: var(--mt-font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(36px, 5vw, 56px);
    letter-spacing: 0;
    line-height: 1.05;
    margin: 6px 0 0;
}
:is(.mt-app, .mt-page) .mt-results__full {
    margin: 12px 0 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--mt-ink-2);
}
:is(.mt-app, .mt-page) .mt-results__cta {
    margin: 22px 0 0;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

:is(.mt-app, .mt-page) .mt-profile {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    padding-top: 32px;
    border-top: 1px solid var(--mt-line);
}
:is(.mt-app, .mt-page) .mt-profile--no-image { grid-template-columns: minmax(0, 1fr); }
:is(.mt-app, .mt-page) .mt-profile__figure {
    margin: 0;
    position: sticky;
    top: 24px;
}
:is(.mt-app, .mt-page) .mt-profile__figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--mt-line);
    background: var(--mt-paper);
}
:is(.mt-app, .mt-page) .mt-profile__text { max-width: 68ch; }
:is(.mt-app, .mt-page) .mt-profile__text p {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--mt-ink-2);
}
:is(.mt-app, .mt-page) .mt-profile__intro {
    font-size: 18px !important;
    color: var(--mt-ink) !important;
}
:is(.mt-app, .mt-page) .mt-profile__heading { margin: 26px 0 10px; }
:is(.mt-app, .mt-page) .mt-profile__heading:first-child { margin-top: 0; }

:is(.mt-app, .mt-page) .mt-famous,
:is(.mt-app, .mt-page) .mt-scores,
:is(.mt-app, .mt-page) .mt-share {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--mt-line);
}
:is(.mt-app, .mt-page) .mt-chips {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
:is(.mt-app, .mt-page) .mt-chips li {
    margin: 0;
    border: 1px solid var(--mt-line-strong);
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 14px;
    font-weight: 500;
    background: var(--mt-surface);
}

:is(.mt-app, .mt-page) .mt-scores > .mt-muted { margin: 6px 0 0; }
:is(.mt-app, .mt-page) .mt-scores__list {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: grid;
    gap: 22px;
    max-width: 760px;
}
:is(.mt-app, .mt-page) .mt-score { margin: 0; }
:is(.mt-app, .mt-page) .mt-score__poles {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--mt-ink-3);
}
:is(.mt-app, .mt-page) .mt-score__pole b {
    display: inline-block;
    min-width: 20px;
    text-align: center;
    font-weight: 800;
    font-stretch: 80%;
    border-radius: 4px;
    border: 1px solid var(--mt-line-strong);
    padding: 0 3px;
    color: var(--mt-ink-3);
}
:is(.mt-app, .mt-page) .mt-score__pole--high { text-align: right; }
:is(.mt-app, .mt-page) .mt-score__pole.is-chosen { color: var(--mt-ink); font-weight: 700; }
:is(.mt-app, .mt-page) .mt-score__pole.is-chosen b { background: var(--mt-dim); border-color: var(--mt-dim); color: #fff; }
:is(.mt-app, .mt-page) .mt-score__name {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mt-ink-3);
}
:is(.mt-app, .mt-page) .mt-score__track {
    position: relative;
    height: 14px;
    border-radius: 999px;
    background: var(--mt-line);
    margin: 0 14px;
}
:is(.mt-app, .mt-page) .mt-score__mid {
    position: absolute;
    left: 50%;
    top: -5px;
    bottom: -5px;
    width: 2px;
    margin-left: -1px;
    background: var(--mt-ink-3);
    border-radius: 2px;
}
:is(.mt-app, .mt-page) .mt-score__fill {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--mt-dim);
    opacity: 0.85;
}
:is(.mt-app, .mt-page) .mt-score__marker {
    position: absolute;
    top: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--mt-dim);
    color: var(--mt-ink);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 6px rgba(23, 21, 15, 0.12);
}

:is(.mt-app, .mt-page) .mt-share__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
:is(.mt-app, .mt-page) .mt-share__note { margin: 12px 0 0; font-size: 13px; max-width: 64ch; }
:is(.mt-app, .mt-page) .mt-share__retake { margin: 26px 0 0; }

/* --- About: dimensions and the 32 types ------------------------------------------- */

:is(.mt-app, .mt-page) .mt-about {
    padding-block: 48px 40px;
    border-top: 1px solid var(--mt-line);
    scroll-margin-top: 16px;
}
:is(.mt-app, .mt-page) .mt-about--embedded { padding-block: 36px 8px; }
:is(.mt-app, .mt-page) .mt-about__head { max-width: 70ch; }
:is(.mt-app, .mt-page) .mt-about__intro { margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--mt-ink-2); }
:is(.mt-app, .mt-page) .mt-dims {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}
:is(.mt-app, .mt-page) .mt-dim {
    margin: 0;
    border-top: 3px solid var(--mt-dim);
    padding-top: 14px;
}
:is(.mt-app, .mt-page) .mt-dim__name {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mt-ink-3);
}
:is(.mt-app, .mt-page) .mt-dim__poles {
    margin: 8px 0 0;
    display: grid;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mt-ink);
}
:is(.mt-app, .mt-page) .mt-dim__poles > span { display: flex; align-items: center; gap: 8px; }
:is(.mt-app, .mt-page) .mt-dim__poles b {
    display: inline-block;
    min-width: 22px;
    text-align: center;
    font-weight: 800;
    font-stretch: 80%;
    background: var(--mt-dim);
    color: #fff;
    border-radius: 5px;
    padding: 1px 4px;
}
:is(.mt-app, .mt-page) .mt-dim__arrow { display: none; }
:is(.mt-app, .mt-page) .mt-dim__blurb { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--mt-ink-2); }

:is(.mt-app, .mt-page) .mt-types__title { margin: 40px 0 0; }
:is(.mt-app, .mt-page) .mt-types {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
:is(.mt-app, .mt-page) .mt-types li { margin: 0; }
:is(.mt-app, .mt-page) .mt-types a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--mt-line);
    border-radius: 10px;
    text-decoration: none;
    color: var(--mt-ink);
    background: #fff;
    transition: border-color 0.12s, background 0.12s;
}
:is(.mt-app, .mt-page) .mt-types a:hover { border-color: var(--mt-ink); background: var(--mt-surface); }
:is(.mt-app, .mt-page) .mt-types__code {
    font-size: 17px;
    font-weight: 900;
    font-stretch: 80%;
    letter-spacing: 0.08em;
}
:is(.mt-app, .mt-page) .mt-types__name { font-size: 13px; color: var(--mt-ink-2); }
:is(.mt-app, .mt-page) .mt-about__note { margin: 28px 0 0; font-size: 13px; max-width: 64ch; }

/* --- Responsive --------------------------------------------------------------------- */

@media (max-width: 900px) {
    :is(.mt-app, .mt-page) .mt-dims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    :is(.mt-app, .mt-page) .mt-types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    :is(.mt-app, .mt-page) .mt-profile { grid-template-columns: minmax(0, 1fr); }
    :is(.mt-app, .mt-page) .mt-profile__figure { position: static; max-width: 320px; }
}
@media (max-width: 640px) {
    :is(.mt-app, .mt-page) .mt-scale {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "low high" "opts opts";
        gap: 10px 8px;
    }
    :is(.mt-app, .mt-page) .mt-scale__end--low { grid-area: low; }
    :is(.mt-app, .mt-page) .mt-scale__end--high { grid-area: high; }
    :is(.mt-app, .mt-page) .mt-scale__options { grid-area: opts; }
    :is(.mt-app, .mt-page) .mt-scale__dot { width: 36px; height: 36px; font-size: 12px; }
    :is(.mt-app, .mt-page) .mt-scale__opt:nth-child(1) .mt-scale__dot,
    :is(.mt-app, .mt-page) .mt-scale__opt:nth-child(7) .mt-scale__dot { width: 40px; height: 40px; }
    :is(.mt-app, .mt-page) .mt-scale__opt:nth-child(2) .mt-scale__dot,
    :is(.mt-app, .mt-page) .mt-scale__opt:nth-child(6) .mt-scale__dot { width: 38px; height: 38px; }
    :is(.mt-app, .mt-page) .mt-code__letter { min-width: 52px; }
    :is(.mt-app, .mt-page) .mt-code__letter b { width: 52px; height: 62px; font-size: 38px; border-radius: 9px; }
    :is(.mt-app, .mt-page) .mt-code__letter { min-width: 0; flex: 0 1 auto; max-width: 70px; }
    :is(.mt-app, .mt-page) .mt-code__letter small { font-size: 8.5px; line-height: 1.25; letter-spacing: 0.02em; white-space: normal; }
    :is(.mt-app, .mt-page) .mt-code { gap: 6px; flex-wrap: nowrap; }
    :is(.mt-app, .mt-page) .mt-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    :is(.mt-app, .mt-page) .mt-dims { grid-template-columns: minmax(0, 1fr); }
    :is(.mt-app, .mt-page) .mt-score__poles { font-size: 13px; }
    :is(.mt-app, .mt-page) .mt-form__foot .mt-btn { width: 100%; }
    :is(.mt-app, .mt-page) .mt-part--extra { padding: 22px 16px 4px; }
    :is(.mt-app, .mt-page) .mt-segmented__opt span { padding: 10px 16px; }
}
@media (max-width: 400px) {
    :is(.mt-app, .mt-page) .mt-scale__dot { width: 32px; height: 32px; }
    :is(.mt-app, .mt-page) .mt-scale__opt:nth-child(1) .mt-scale__dot,
    :is(.mt-app, .mt-page) .mt-scale__opt:nth-child(7) .mt-scale__dot { width: 36px; height: 36px; }
    :is(.mt-app, .mt-page) .mt-scale__opt:nth-child(2) .mt-scale__dot,
    :is(.mt-app, .mt-page) .mt-scale__opt:nth-child(6) .mt-scale__dot { width: 34px; height: 34px; }
    :is(.mt-app, .mt-page) .mt-scale__options { gap: 4px; }
}
