.model-guide .model-free-line {
    margin: 4px 0 0;
    color: var(--sandbox-accent);
    font-size: 1rem;
    font-weight: 700;
}

.model-guide .model-free-line strong {
    color: var(--text);
}

.model-contract,
.model-request {
    margin: 32px 0;
    overflow: hidden;
    border: 1px solid var(--feed-line-strong);
    border-radius: var(--radius);
    background: var(--surface);
}

.model-contract-head,
.model-request-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--feed-line);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.model-contract ol {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.model-contract li {
    display: grid;
    min-width: 0;
    gap: 10px;
    padding: 20px;
    border-right: 1px solid var(--feed-line);
}

.model-contract li:last-child {
    border-right: 0;
}

.model-contract li > span {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.model-contract li div {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.model-contract li strong {
    color: var(--text);
}

.model-contract code {
    color: var(--plan-value-accent);
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.model-contract > p {
    margin: 0;
    padding: 14px 20px;
    border-top: 1px solid var(--feed-line);
    color: var(--sandbox-accent);
    font-weight: 800;
}

.feed-prose h3 {
    margin: 36px 0 12px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1.18rem;
}

.model-type-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 32px 0;
    overflow: hidden;
    border: 1px solid var(--feed-line);
    border-radius: var(--radius);
    background: var(--feed-panel-soft);
}

.model-type-list article {
    padding: 22px;
    border-right: 1px solid var(--feed-line);
}

.model-type-list article:last-child {
    border-right: 0;
}

.model-type-list h3,
.model-type-list p,
.model-process h3,
.model-process p,
.model-score-list p,
.model-plan-table p {
    margin: 0;
}

.model-type-list h3,
.model-process h3 {
    margin-bottom: 8px;
}

.model-product-note {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
}

.model-product-note h3,
.model-product-note p {
    margin: 0;
}

.model-product-note h3 {
    margin-bottom: 6px;
}

.model-product-note > a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: var(--plan-value-accent);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
    white-space: nowrap;
}

.model-process li {
    align-items: start;
}

.model-process li > span {
    font-family: var(--font-mono);
}

.model-process h3 {
    font-size: 1.02rem;
}

.model-math {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 32px 0 20px;
    overflow: hidden;
    border: 1px solid var(--feed-line);
    border-radius: var(--radius);
    background: var(--feed-panel-soft);
}

.model-math div {
    display: grid;
    gap: 6px;
    padding: 20px;
    border-right: 1px solid var(--feed-line);
    border-bottom: 1px solid var(--feed-line);
}

.model-math div:nth-child(3n) {
    border-right: 0;
}

.model-math div:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.model-math span,
.model-edge-example span,
.model-plan-table span {
    color: var(--muted);
    font-size: 0.82rem;
}

.model-math strong,
.model-edge-example strong {
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 1.1rem;
}

.model-equations {
    margin: 20px 0 32px;
    overflow: hidden;
    border: 1px solid var(--feed-line-strong);
    border-radius: var(--radius);
    background: var(--surface);
}

.model-equations p {
    margin: 0;
    padding: 13px 18px;
    border-bottom: 1px solid var(--feed-line);
}

.model-equations p:last-child {
    border-bottom: 0;
}

.model-equations code {
    color: var(--plan-value-accent);
    overflow-wrap: anywhere;
}

.model-edge-example {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 32px 0;
    overflow: hidden;
    border: 1px solid var(--feed-line);
    border-radius: var(--radius);
    background: var(--feed-panel-soft);
}

.model-edge-example p {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 20px;
    border-right: 1px solid var(--feed-line);
}

.model-edge-example p:nth-child(3) {
    border-right: 0;
}

.model-edge-example p:nth-child(3) strong {
    color: var(--plan-value-accent);
}

.model-edge-example > code {
    grid-column: 1 / -1;
    padding: 15px 20px;
    border-top: 1px solid var(--feed-line);
    color: var(--plan-value-accent);
}

.model-rule {
    margin-top: 28px;
}

.model-rule strong {
    color: var(--text);
}

.model-score-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 28px 0;
}

.model-score-list div {
    padding: 20px;
    border: 1px solid var(--feed-line);
    border-radius: var(--radius);
    background: var(--feed-panel-soft);
}

.model-score-list strong,
.model-plan-table strong {
    color: var(--text);
    font-family: var(--font-heading);
}

.model-score-list p,
.model-plan-table p {
    margin-top: 8px;
}

.model-free-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: center;
    padding: 32px;
    border: 1px solid color-mix(in srgb, var(--plan-value-accent) 36%, transparent);
    border-radius: var(--radius);
    background: var(--glass-bg-teal);
}

.model-free-copy h2,
.model-free-copy > p {
    grid-column: 1;
}

.model-free-actions {
    display: grid;
    grid-column: 2;
    grid-row: 1 / span 3;
    gap: 12px;
    justify-items: stretch;
}

.model-free-actions .button {
    min-height: 44px;
    justify-content: center;
    white-space: nowrap;
}

.model-request pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    color: var(--text);
    font-size: 0.84rem;
    line-height: 1.65;
}

.model-request > p {
    margin: 0;
    padding: 16px 20px;
    border-top: 1px solid var(--feed-line);
}

.model-plan-table {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 30px 0 20px;
    overflow: hidden;
    border: 1px solid var(--feed-line);
    border-radius: var(--radius);
    background: var(--feed-panel-soft);
}

.model-plan-table > div {
    padding: 22px;
    border-right: 1px solid var(--feed-line);
}

.model-plan-table > div:last-child {
    border-right: 0;
}

.model-plan-table span {
    display: block;
    margin-top: 6px;
    color: var(--plan-value-accent);
}

.model-plan-note {
    font-size: 0.92rem;
}

.feed-prose > .model-close {
    margin-top: 64px;
    padding: 24px;
}

.model-close h2 {
    margin-top: 0;
}

.model-close p:last-child {
    margin-bottom: 0;
}

.model-method {
    padding-bottom: 0;
}

.model-method h2 {
    font-size: 1.35rem;
}

.model-method p,
.model-method li {
    font-size: 0.92rem;
}

.model-method ul {
    display: grid;
    gap: 8px;
    padding-left: 20px;
}

.model-method a {
    color: var(--plan-value-accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (max-width: 960px) {
    .model-contract ol {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .model-contract li:nth-child(2) {
        border-right: 0;
    }

    .model-contract li:nth-child(-n + 2) {
        border-bottom: 1px solid var(--feed-line);
    }

    .model-free-copy {
        grid-template-columns: 1fr;
    }

    .model-free-actions {
        grid-column: 1;
        grid-row: auto;
        justify-items: start;
    }
}

@media (max-width: 720px) {
    .model-type-list,
    .model-score-list,
    .model-plan-table {
        grid-template-columns: 1fr;
    }

    .model-type-list article,
    .model-plan-table > div {
        border-right: 0;
        border-bottom: 1px solid var(--feed-line);
    }

    .model-type-list article:last-child,
    .model-plan-table > div:last-child {
        border-bottom: 0;
    }

    .model-product-note {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .model-math {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .model-math div,
    .model-math div:nth-child(3n) {
        border-right: 1px solid var(--feed-line);
        border-bottom: 1px solid var(--feed-line);
    }

    .model-math div:nth-child(2n) {
        border-right: 0;
    }

    .model-math div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .model-free-copy {
        padding: 24px;
    }

    .model-free-actions {
        justify-items: stretch;
    }
}

@media (max-width: 480px) {
    .model-contract ol,
    .model-math,
    .model-edge-example {
        grid-template-columns: 1fr;
    }

    .model-contract li,
    .model-contract li:nth-child(2),
    .model-contract li:nth-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid var(--feed-line);
    }

    .model-contract li:last-child {
        border-bottom: 0;
    }

    .model-math div,
    .model-math div:nth-child(2n),
    .model-math div:nth-child(3n),
    .model-math div:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid var(--feed-line);
    }

    .model-math div:last-child {
        border-bottom: 0;
    }

    .model-edge-example p {
        border-right: 0;
        border-bottom: 1px solid var(--feed-line);
    }

    .model-edge-example > code {
        grid-column: 1;
    }

    .model-free-copy {
        padding: 20px;
    }
}
