/**
 * Help Center — shared by the customer guide (/help) and staff guide (/admin/help).
 *
 * Blocks are rendered by frontend/templates/macros/help_blocks.html from data in
 * app/services/help_center. All colour comes from tokens.css so every brand and
 * theme follows automatically.
 *
 * Naming: mt-help-center (shell), mt-h* (one prefix per block type).
 */

/* ------------------------------------------------------------------ */
/* Shell — contents rail beside the guide                             */
/* ------------------------------------------------------------------ */

.mt-main--help {
    width: min(96vw, 1520px);
}

.mt-hero--help .mt-hero__subtitle {
    max-width: 68ch;
}

.mt-help-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

.mt-help-hero__hint {
    margin: 0.85rem 0 0;
    font-size: 0.875rem;
    color: var(--portal-text-muted);
    max-width: 62ch;
}

.mt-help-center {
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    padding: 1.75rem 0 3rem;
}

.mt-help-center__side-inner {
    position: sticky;
    top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: calc(100vh - 2.5rem);
    padding: 1.1rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius-lg);
    background: var(--portal-surface);
    overflow: hidden;
}

.mt-help-center__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.mt-help-center__reading-note {
    margin: 0;
    padding: 0.95rem 1.15rem;
    border: 1px solid var(--portal-border);
    border-left: 3px solid var(--manning-red);
    border-radius: var(--radius);
    background: var(--portal-surface);
    color: var(--portal-text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.mt-help-center__empty {
    margin: 0;
    padding: 1.5rem;
    border: 1px dashed var(--portal-border);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--portal-text-muted);
}

/* ------------------------------------------------------------------ */
/* Search + contents                                                  */
/* ------------------------------------------------------------------ */

.mt-help-search {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.mt-help-search__icon {
    position: absolute;
    left: 0.7rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.mt-help-search__input {
    width: 100%;
    padding: 0.6rem 2rem 0.6rem 2.1rem;
    border: 1px solid var(--portal-border);
    border-radius: 999px;
    background: var(--portal-bg-elevated);
    color: var(--portal-text);
    font: inherit;
    font-size: 0.9375rem;
}

.mt-help-search__input:focus {
    outline: none;
    border-color: var(--manning-red);
    box-shadow: 0 0 0 3px var(--manning-red-glow);
}

.mt-help-search__clear {
    position: absolute;
    right: 0.55rem;
    width: 1.35rem;
    height: 1.35rem;
    border: none;
    border-radius: 50%;
    background: var(--portal-surface-hover);
    color: var(--portal-text);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.mt-help-search__status {
    flex-shrink: 0;
    margin: -0.35rem 0 0;
    font-size: 0.8125rem;
    color: var(--portal-text-muted);
}

.mt-help-contents {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.35rem;
}

.mt-help-contents__title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 0 0.6rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.mt-help-contents__count {
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
}

.mt-help-contents__group + .mt-help-contents__group {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--portal-border);
}

.mt-help-contents__group[hidden] {
    display: none;
}

.mt-help-contents__group-label {
    margin: 0 0 0.35rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--portal-text);
}

.mt-help-contents__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.mt-help-contents__link {
    display: block;
    padding: 0.32rem 0.55rem;
    border-left: 2px solid transparent;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--portal-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.35;
}

.mt-help-contents__link:hover {
    background: var(--portal-surface-hover);
    color: var(--portal-text);
}

.mt-help-contents__link[hidden] {
    display: none;
}

.mt-help-contents__link.is-active {
    border-left-color: var(--manning-red);
    background: var(--portal-surface-hover);
    color: var(--portal-text);
    font-weight: 600;
}

.mt-help-center__side-actions {
    flex-shrink: 0;
    padding-top: 0.35rem;
    border-top: 1px solid var(--portal-border);
}

/* ------------------------------------------------------------------ */
/* Chapters and topics                                                */
/* ------------------------------------------------------------------ */

.mt-help-chapter {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-margin-top: 1.5rem;
}

.mt-help-chapter[hidden] {
    display: none;
}

.mt-help-chapter__header {
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--manning-red);
}

.mt-help-chapter__title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--portal-text);
    letter-spacing: -0.01em;
}

.mt-help-chapter__summary {
    margin: 0.35rem 0 0;
    color: var(--portal-text-muted);
    font-size: 0.9375rem;
}

.mt-help-topic {
    padding: 1.5rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius-lg);
    background: var(--portal-surface);
    scroll-margin-top: 1.25rem;
}

.mt-help-topic[hidden] {
    display: none;
}

.mt-help-topic:target,
.mt-help-topic.is-highlighted {
    border-color: var(--manning-red);
    box-shadow: 0 0 0 3px var(--manning-red-glow);
}

.mt-help-topic__header {
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--portal-border);
}

.mt-help-topic__title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--portal-text);
}

.mt-help-topic__tagline {
    margin: 0.25rem 0 0;
    color: var(--manning-red-hover);
    font-size: 1rem;
    font-weight: 500;
}

.mt-help-topic__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    margin: 0.9rem 0 0;
}

.mt-help-topic__meta-item dt {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
}

.mt-help-topic__meta-item dd {
    margin: 0.1rem 0 0;
    font-size: 0.875rem;
    color: var(--portal-text-muted);
    max-width: 46ch;
}

.mt-help-topic__body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mt-help-topic__top {
    margin: 1.5rem 0 0;
    text-align: right;
}

.mt-help-topic__top-link {
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-decoration: none;
}

.mt-help-topic__top-link:hover {
    color: var(--manning-red-hover);
    text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Shared block furniture                                             */
/* ------------------------------------------------------------------ */

.mt-hblock {
    margin: 0;
}

.mt-hblock__title {
    margin: 0 0 0.6rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--portal-text);
}

.mt-hblock__lead {
    margin: 0 0 0.9rem;
    color: var(--portal-text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.mt-hblock__note {
    margin: 0.9rem 0 0;
    padding-left: 0.75rem;
    border-left: 2px solid var(--portal-border);
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.55;
}

.mt-htext__p {
    margin: 0 0 0.85rem;
    color: var(--portal-text);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 82ch;
}

.mt-htext__p:last-child {
    margin-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Flow chart — boxes with arrows, plus labelled decision branches    */
/* ------------------------------------------------------------------ */

.mt-hflow {
    padding: 1.35rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius-lg);
    background: var(--portal-bg-elevated);
}

.mt-hflow__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.mt-hflow__node {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 640px;
}

.mt-hflow__box {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    padding: 0.8rem 1.1rem;
    border: 2px solid var(--portal-border);
    border-radius: var(--radius);
    background: var(--portal-surface);
    text-align: center;
}

.mt-hflow__label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--portal-text);
    line-height: 1.4;
}

.mt-hflow__detail {
    font-size: 0.8125rem;
    color: var(--portal-text-muted);
    line-height: 1.5;
}

/* Node shapes tell you what kind of step it is at a glance */
.mt-hflow__node--start > .mt-hflow__box {
    border-radius: 999px;
    border-color: var(--info);
    background: var(--info-bg);
}

.mt-hflow__node--done > .mt-hflow__box {
    border-radius: 999px;
    border-color: var(--success);
    background: var(--success-bg);
}

.mt-hflow__node--choice > .mt-hflow__box {
    border-color: var(--warn);
    background: var(--warn-bg);
    border-style: dashed;
}

.mt-hflow__node--data > .mt-hflow__box {
    border-color: var(--manning-red);
    background: var(--manning-red-soft);
    border-left-width: 6px;
}

.mt-hflow__node--alert > .mt-hflow__box {
    border-color: var(--danger);
    background: var(--danger-bg);
}

/* The connecting arrow between boxes */
.mt-hflow__arrow {
    position: relative;
    display: block;
    width: 2px;
    height: 2rem;
    background: var(--border-strong);
}

.mt-hflow__arrow::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid var(--border-strong);
}

/* Decision branches fan out sideways with their own labelled arrows */
.mt-hflow__branches {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.mt-hflow__branch {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.7rem 0.85rem 0.7rem 1.9rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius);
    background: var(--portal-surface);
}

.mt-hflow__branch::before {
    content: "\2192";
    position: absolute;
    top: 0.62rem;
    left: 0.7rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1;
}

.mt-hflow__branch--ok {
    border-left: 3px solid var(--success);
}

.mt-hflow__branch--warn {
    border-left: 3px solid var(--warn);
}

.mt-hflow__branch--stop {
    border-left: 3px solid var(--danger);
}

.mt-hflow__branch-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.mt-hflow__branch-outcome {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--portal-text);
    line-height: 1.45;
}

.mt-hflow__branch-detail {
    font-size: 0.8125rem;
    color: var(--portal-text-muted);
    line-height: 1.5;
}

/* Left-to-right variant, for short chains that read better in a row */
.mt-hflow--across .mt-hflow__list {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    row-gap: 1.5rem;
}

.mt-hflow--across .mt-hflow__node {
    flex: 1 1 180px;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.mt-hflow--across .mt-hflow__box {
    grid-column: 1;
    grid-row: 1;
    height: 100%;
    justify-content: center;
}

.mt-hflow--across .mt-hflow__branches {
    grid-column: 1;
    grid-row: 2;
}

.mt-hflow--across .mt-hflow__arrow {
    grid-column: 2;
    grid-row: 1 / -1;
    width: 2rem;
    height: 2px;
    margin: 0 0.4rem;
    align-self: center;
}

.mt-hflow--across .mt-hflow__arrow::after {
    top: 50%;
    right: 0;
    left: auto;
    bottom: auto;
    transform: translate(0, -50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--border-strong);
}

/* ------------------------------------------------------------------ */
/* Swimlanes — who does what, arrows left to right                    */
/* ------------------------------------------------------------------ */

.mt-hlanes {
    padding: 1.35rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius-lg);
    background: var(--portal-bg-elevated);
}

.mt-hlanes__grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    overflow-x: auto;
}

.mt-hlanes__row {
    display: grid;
    grid-template-columns: 150px minmax(560px, 1fr);
    gap: 0.85rem;
    align-items: center;
}

.mt-hlanes__role {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius);
    background: var(--portal-surface-hover);
    border-left: 3px solid var(--manning-red);
}

.mt-hlanes__role-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--portal-text);
}

.mt-hlanes__role-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mt-hlanes__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    gap: 0;
}

.mt-hlanes__step {
    position: relative;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    min-width: 120px;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius);
    background: var(--portal-surface);
    color: var(--portal-text);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.mt-hlanes__step + .mt-hlanes__step {
    margin-left: 1.5rem;
}

.mt-hlanes__step + .mt-hlanes__step::before {
    content: "\2192";
    position: absolute;
    left: -1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--border-strong);
    font-size: 1rem;
    line-height: 1;
}

/* ------------------------------------------------------------------ */
/* Bar graph                                                          */
/* ------------------------------------------------------------------ */

.mt-hbars {
    padding: 1.35rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius-lg);
    background: var(--portal-bg-elevated);
}

.mt-hbars__grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.mt-hbars__row {
    display: grid;
    grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) minmax(70px, auto);
    gap: 0.85rem;
    align-items: center;
}

.mt-hbars__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--portal-text);
}

.mt-hbars__track {
    display: block;
    height: 1.35rem;
    border-radius: 999px;
    background: var(--portal-surface-hover);
    overflow: hidden;
}

.mt-hbars__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--manning-red-dark), var(--manning-red-hover));
}

.mt-hbars__fill--ok {
    background: linear-gradient(90deg, #12833f, var(--success));
}

.mt-hbars__fill--warn {
    background: linear-gradient(90deg, #a86b06, var(--warn));
}

.mt-hbars__value {
    font-size: 0.8125rem;
    color: var(--portal-text-muted);
    text-align: right;
}

/* ------------------------------------------------------------------ */
/* Timeline                                                           */
/* ------------------------------------------------------------------ */

.mt-htime {
    padding: 1.35rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius-lg);
    background: var(--portal-bg-elevated);
}

.mt-htime__list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.35rem;
    border-left: 2px solid var(--border-strong);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.mt-htime__item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mt-htime__dot {
    position: absolute;
    left: -1.82rem;
    top: 0.3rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--manning-red);
    box-shadow: 0 0 0 3px var(--portal-bg-elevated);
}

.mt-htime__when {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.mt-htime__label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--portal-text);
}

.mt-htime__detail {
    font-size: 0.875rem;
    color: var(--portal-text-muted);
    line-height: 1.55;
    max-width: 72ch;
}

/* ------------------------------------------------------------------ */
/* Cycle — a repeating loop                                           */
/* ------------------------------------------------------------------ */

.mt-hcycle {
    padding: 1.35rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius-lg);
    background: var(--portal-bg-elevated);
}

.mt-hcycle__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.mt-hcycle__item {
    position: relative;
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius);
    background: var(--portal-surface);
}

.mt-hcycle__item + .mt-hcycle__item::before {
    content: "\2192";
    position: absolute;
    left: -1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--border-strong);
    font-size: 1rem;
    line-height: 1;
}

.mt-hcycle__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: var(--manning-red);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
}

.mt-hcycle__label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--portal-text);
}

.mt-hcycle__detail {
    font-size: 0.8125rem;
    color: var(--portal-text-muted);
    line-height: 1.5;
}

.mt-hcycle__loop {
    margin: 0.9rem 0 0;
    padding-top: 0.7rem;
    border-top: 1px dashed var(--portal-border);
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-align: center;
}

.mt-hcycle__loop::before {
    content: "\21BB\00a0";
}

/* ------------------------------------------------------------------ */
/* Numbered steps                                                     */
/* ------------------------------------------------------------------ */

.mt-hsteps__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.mt-hsteps__item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius);
    background: var(--portal-bg-elevated);
}

.mt-hsteps__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--manning-red);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 700;
}

.mt-hsteps__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.2rem;
}

.mt-hsteps__text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--portal-text);
    line-height: 1.5;
}

.mt-hsteps__detail {
    font-size: 0.875rem;
    color: var(--portal-text-muted);
    line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/* Checklist                                                          */
/* ------------------------------------------------------------------ */

.mt-hcheck__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mt-hcheck__item {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
}

.mt-hcheck__mark {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--manning-red);
    border-radius: 5px;
    color: var(--manning-red);
    font-size: 0.9rem;
    line-height: 1;
}

.mt-hcheck__mark::before {
    content: "\2713";
}

.mt-hcheck__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mt-hcheck__text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--portal-text);
    line-height: 1.5;
}

.mt-hcheck__detail {
    font-size: 0.875rem;
    color: var(--portal-text-muted);
    line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/* Setup field table                                                  */
/* ------------------------------------------------------------------ */

.mt-hfields__grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.mt-hfields__row {
    display: grid;
    grid-template-columns: minmax(150px, 230px) minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 0.9rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius);
    background: var(--portal-bg-elevated);
}

.mt-hfields__name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--portal-text);
}

.mt-hfields__req {
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: var(--manning-red-soft);
    color: var(--manning-red-dark);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mt-hfields__what,
.mt-hfields__where {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.875rem;
    color: var(--portal-text-muted);
    line-height: 1.55;
}

.mt-hfields__cell-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
}

/* ------------------------------------------------------------------ */
/* Legend                                                             */
/* ------------------------------------------------------------------ */

.mt-hlegend__list {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.6rem;
}

.mt-hlegend__item {
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--portal-border);
    border-left: 3px solid var(--manning-red);
    border-radius: var(--radius);
    background: var(--portal-bg-elevated);
}

.mt-hlegend__item dt {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--portal-text);
}

.mt-hlegend__item dd {
    margin: 0.2rem 0 0;
    font-size: 0.875rem;
    color: var(--portal-text-muted);
    line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/* Cards                                                              */
/* ------------------------------------------------------------------ */

.mt-hcards__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.mt-hcards__card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--portal-border);
    border-radius: var(--radius);
    background: var(--portal-bg-elevated);
}

.mt-hcards__label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--portal-text);
}

.mt-hcards__text {
    font-size: 0.875rem;
    color: var(--portal-text-muted);
    line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/* Callout                                                            */
/* ------------------------------------------------------------------ */

.mt-hnote {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--portal-border);
    border-left: 4px solid var(--info);
    border-radius: var(--radius);
    background: var(--info-bg);
}

.mt-hnote__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--info);
    color: #06080f;
    font-size: 1.05rem;
    font-weight: 700;
}

.mt-hnote__badge::before {
    content: "i";
}

.mt-hnote--tip {
    border-left-color: var(--info);
    background: var(--info-bg);
}

.mt-hnote--good {
    border-left-color: var(--success);
    background: var(--success-bg);
}

.mt-hnote--good .mt-hnote__badge {
    background: var(--success);
}

.mt-hnote--good .mt-hnote__badge::before {
    content: "\2713";
}

.mt-hnote--warn {
    border-left-color: var(--warn);
    background: var(--warn-bg);
}

.mt-hnote--warn .mt-hnote__badge {
    background: var(--warn);
}

.mt-hnote--warn .mt-hnote__badge::before {
    content: "!";
}

.mt-hnote--stop {
    border-left-color: var(--danger);
    background: var(--danger-bg);
}

.mt-hnote--stop .mt-hnote__badge {
    background: var(--danger);
    color: #ffffff;
}

.mt-hnote--stop .mt-hnote__badge::before {
    content: "\00d7";
}

.mt-hnote__title {
    margin: 0 0 0.3rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--portal-text);
}

.mt-hnote__text {
    margin: 0 0 0.45rem;
    font-size: 0.9375rem;
    color: var(--portal-text);
    line-height: 1.65;
    max-width: 80ch;
}

.mt-hnote__text:last-child {
    margin-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* FAQ                                                                */
/* ------------------------------------------------------------------ */

.mt-hfaq__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mt-hfaq__item {
    border: 1px solid var(--portal-border);
    border-radius: var(--radius);
    background: var(--portal-bg-elevated);
}

.mt-hfaq__q {
    padding: 0.75rem 0.95rem;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--portal-text);
    list-style: none;
}

.mt-hfaq__q::marker,
.mt-hfaq__q::-webkit-details-marker {
    display: none;
}

.mt-hfaq__q::before {
    content: "\002B\00a0\00a0";
    color: var(--manning-red);
    font-weight: 700;
}

.mt-hfaq__item[open] > .mt-hfaq__q::before {
    content: "\2212\00a0\00a0";
}

.mt-hfaq__a {
    margin: 0;
    padding: 0 0.95rem 0.9rem 2.05rem;
    font-size: 0.9375rem;
    color: var(--portal-text-muted);
    line-height: 1.65;
    max-width: 84ch;
}

/* ------------------------------------------------------------------ */
/* Light chrome (public pages that are not on the dark portal shell)  */
/* ------------------------------------------------------------------ */

body:not(.mt-body--futuristic) .mt-help-center__side-inner,
body:not(.mt-body--futuristic) .mt-help-topic,
body:not(.mt-body--futuristic) .mt-help-center__reading-note {
    background: var(--surface);
    border-color: var(--border);
}

body:not(.mt-body--futuristic) .mt-help-chapter__title,
body:not(.mt-body--futuristic) .mt-help-topic__title,
body:not(.mt-body--futuristic) .mt-hblock__title,
body:not(.mt-body--futuristic) .mt-htext__p {
    color: var(--text-primary);
}

body:not(.mt-body--futuristic) .mt-help-search__input,
body:not(.mt-body--futuristic) .mt-hflow,
body:not(.mt-body--futuristic) .mt-hlanes,
body:not(.mt-body--futuristic) .mt-hbars,
body:not(.mt-body--futuristic) .mt-htime,
body:not(.mt-body--futuristic) .mt-hcycle {
    background: var(--surface-alt);
    border-color: var(--border);
    color: var(--text-primary);
}

/* ------------------------------------------------------------------ */
/* Narrow screens                                                     */
/* ------------------------------------------------------------------ */

@media (max-width: 1080px) {
    .mt-help-center {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .mt-help-center__side-inner {
        position: static;
        max-height: none;
    }

    .mt-help-contents {
        max-height: 320px;
    }

    .mt-hfields__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
    }

    .mt-hlanes__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 640px) {
    .mt-help-topic {
        padding: 1.1rem;
    }

    .mt-help-chapter__title {
        font-size: 1.35rem;
    }

    .mt-hbars__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.25rem;
    }

    .mt-hbars__value {
        text-align: left;
    }

    .mt-hcycle__item + .mt-hcycle__item::before,
    .mt-hlanes__step + .mt-hlanes__step::before {
        content: "\2193";
        left: 50%;
        top: -1.15rem;
        transform: translateX(-50%);
    }

    .mt-hcycle__list {
        flex-direction: column;
    }

    /* An "across" chart is unreadable on a phone, so stack it like the rest. */
    .mt-hflow--across .mt-hflow__list {
        flex-direction: column;
        row-gap: 0;
    }

    .mt-hflow--across .mt-hflow__node {
        display: flex;
        flex-direction: column;
    }

    .mt-hflow--across .mt-hflow__arrow {
        width: 2px;
        height: 2rem;
        margin: 0;
    }

    .mt-hflow--across .mt-hflow__arrow::after {
        top: auto;
        bottom: 0;
        left: 50%;
        right: auto;
        transform: translate(-50%, 0);
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid var(--border-strong);
        border-bottom: none;
    }

    .mt-hlanes__steps {
        flex-direction: column;
    }

    .mt-hlanes__step + .mt-hlanes__step {
        margin-left: 0;
        margin-top: 1.5rem;
    }
}

/* ------------------------------------------------------------------ */
/* Print — the whole guide as a handout                               */
/* ------------------------------------------------------------------ */

@media print {
    .mt-header,
    .mt-admin-toolbar,
    .mt-impersonation-banner,
    .mt-help-center__side,
    .mt-help-hero__actions,
    .mt-help-topic__top,
    .mt-help-button,
    .mt-pipeline-page-loader {
        display: none !important;
    }

    .mt-help-center {
        display: block;
        padding: 0;
    }

    .mt-help-topic,
    .mt-hflow,
    .mt-hlanes,
    .mt-hbars,
    .mt-htime,
    .mt-hcycle,
    .mt-hnote {
        break-inside: avoid;
        background: #ffffff !important;
        border-color: #d4d4d4 !important;
        color: #111111 !important;
    }

    .mt-help-chapter {
        break-before: page;
    }

    .mt-help-chapter:first-of-type {
        break-before: auto;
    }

    .mt-hfaq__item > .mt-hfaq__a {
        display: block !important;
    }

    .mt-help-center__main,
    .mt-help-chapter,
    .mt-help-topic__body {
        gap: 1rem;
    }
}
