.meth-container {
    max-width: 1080px;
}

.meth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 22px;
}

.meth-main {
    display: block;
}

.meth-main .advanced-panel {
    margin-bottom: 16px;
}

.meth-lede {
    margin: 0;
    max-width: 820px;
    color: var(--ui-text-muted);
    line-height: 1.65;
}

.meth-lede + .meth-lede {
    margin-top: 14px;
}

.meth-lede a {
    color: var(--color-text-kicker);
}

.meth-lede code {
    font-size: 0.92em;
    color: var(--ui-text-main);
}

.meth-formula {
    margin: 18px 0 0;
    padding: 16px 18px;
    border: 1px solid var(--color-border-panel);
    border-radius: 12px;
    background: var(--color-surface-card-soft);
    color: var(--ui-text-main);
    text-align: center;
    font: 600 1.05rem/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.01em;
}

.meth-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.meth-card {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--color-border-panel);
    border-radius: 12px;
    background: var(--color-surface-card-soft);
}

.meth-card h3 {
    margin: 0 0 6px;
    font-size: var(--type-body);
    color: var(--ui-text-main);
}

.meth-card p {
    margin: 0;
    color: var(--ui-text-muted);
    font-size: var(--type-body-sm);
    line-height: 1.5;
}

.meth-note {
    margin: 14px 0 0;
    max-width: 820px;
    font-size: var(--type-caption);
    line-height: 1.55;
    color: var(--ui-text-muted);
}

/* Phase timeline */
.meth-steps {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}

.meth-step {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    padding-bottom: 18px;
}

.meth-step:last-child {
    padding-bottom: 0;
}

.meth-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 32px;
    bottom: 0;
    width: 1px;
    background: var(--color-border-panel);
}

.meth-step-marker {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--color-border-panel);
    border-radius: 50%;
    background: var(--color-surface-card-soft);
    color: var(--ui-text-main);
    font-size: var(--type-caption);
    font-weight: 700;
}

.meth-step-marker.is-calibration {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.5);
}

.meth-step-marker.is-scored {
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.5);
}

.meth-step-marker.is-diagnostic {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.5);
}

.meth-step-body {
    min-width: 0;
    padding-top: 3px;
}

.meth-step-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.meth-step-name {
    font-weight: 600;
    color: var(--ui-text-main);
}

.meth-step.is-scored .meth-step-name::after,
.meth-step.is-diagnostic .meth-step-name::after {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.meth-step.is-scored .meth-step-name::after {
    content: 'scored';
    color: #22c55e;
    background: rgba(34, 197, 94, 0.14);
}

.meth-step.is-diagnostic .meth-step-name::after {
    content: 'diagnostic';
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.14);
}

.meth-step-duration {
    font-size: var(--type-caption);
    color: var(--ui-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.meth-step-body p {
    margin: 6px 0 0;
    color: var(--ui-text-muted);
    font-size: var(--type-body-sm);
    line-height: 1.55;
}

/* Inline ordered list (latency model) */
.meth-inline-steps {
    display: grid;
    gap: 9px;
    margin: 16px 0 0;
    padding-left: 20px;
    color: var(--ui-text-muted);
    line-height: 1.6;
}

.meth-inline-steps strong {
    color: var(--ui-text-main);
}

.meth-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding-left: 20px;
    color: var(--ui-text-muted);
    line-height: 1.65;
}

.meth-list:not(:first-child) {
    margin-top: 16px;
}

.meth-list strong {
    color: var(--ui-text-main);
}

/* Details disclosures */
.meth-details {
    margin-top: 18px;
    border: 1px solid var(--color-border-panel);
    border-radius: 12px;
    background: var(--color-surface-card-soft);
    overflow: hidden;
}

.meth-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    list-style: none;
    cursor: pointer;
    font-size: var(--type-body-sm);
    font-weight: 600;
    color: var(--ui-text-main);
}

.meth-details > summary::-webkit-details-marker {
    display: none;
}

.meth-details > summary::after {
    content: '+';
    flex: none;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--ui-text-muted);
}

.meth-details[open] > summary::after {
    content: '\2212';
}

.meth-details > summary:focus-visible {
    outline: 2px solid var(--color-text-kicker);
    outline-offset: -2px;
}

.meth-details-body {
    padding: 0 16px 14px;
}

.meth-details-body p {
    margin: 0 0 10px;
    color: var(--ui-text-muted);
    font-size: var(--type-body-sm);
    line-height: 1.6;
}

.meth-details-body p:last-child {
    margin-bottom: 0;
}

/* Grade bands */
.meth-grades {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.meth-grade {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--color-border-panel);
    border-radius: 10px;
    background: var(--color-surface-card-soft);
}

.meth-grade strong {
    font-size: var(--type-body);
}

.meth-grade span {
    font-size: var(--type-caption);
    color: var(--ui-text-muted);
    white-space: nowrap;
}

.meth-grade.is-a-plus,
.meth-grade.is-a { color: #22c55e; }
.meth-grade.is-b { color: #a3e635; }
.meth-grade.is-c { color: #f59e0b; }
.meth-grade.is-d { color: #fb923c; }
.meth-grade.is-f { color: #ef4444; }

.meth-grade.is-a-plus span,
.meth-grade.is-a span,
.meth-grade.is-b span,
.meth-grade.is-c span,
.meth-grade.is-d span,
.meth-grade.is-f span {
    color: var(--ui-text-muted);
}

/* Tables */
.meth-table-wrap {
    margin-top: 18px;
    overflow-x: auto;
    border: 1px solid var(--color-border-panel);
    border-radius: 12px;
}

.meth-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--type-body-sm);
}

.meth-table-caption {
    padding: 12px 14px 2px;
    text-align: left;
    font-size: var(--type-caption);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-kicker);
}

.meth-table th,
.meth-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-panel);
    white-space: nowrap;
}

.meth-table thead th {
    font-size: var(--type-table-head);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-kicker);
    background: var(--color-surface-card-soft);
}

.meth-table tbody th {
    color: var(--ui-text-main);
    font-weight: 600;
}

.meth-table tbody td {
    color: var(--ui-text-muted);
}

.meth-table tbody tr:last-child th,
.meth-table tbody tr:last-child td {
    border-bottom: 0;
}

/* QoO tiers */
.meth-tiers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.meth-tier {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--color-border-panel);
    border-radius: 10px;
    background: var(--color-surface-card-soft);
}

.meth-tier strong {
    font-size: var(--type-body);
}

.meth-tier span {
    font-size: var(--type-caption);
    color: var(--ui-text-muted);
}

.meth-tier em {
    font-size: var(--type-caption);
    font-style: normal;
    color: var(--ui-text-muted);
    opacity: 0.85;
}

.meth-tier.is-excellent strong { color: #22c55e; }
.meth-tier.is-good strong { color: #38bdf8; }
.meth-tier.is-ok strong { color: #f59e0b; }
.meth-tier.is-poor strong { color: #ef4444; }

@media (max-width: 760px) {
    .meth-grid,
    .meth-tiers {
        grid-template-columns: 1fr 1fr;
    }

    .meth-grades {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .meth-grid,
    .meth-tiers,
    .meth-grades {
        grid-template-columns: 1fr;
    }

    .meth-actions .btn {
        width: 100%;
        text-align: center;
    }
}
