/* =====================================================================
 *  52 · 化学计量计算器 —— 「石墨工作台」独立视觉
 *  石墨灰 × 信号橙；方程式写作区与计量表上下分层，AI 区独立抽屉。
 * ===================================================================== */

.s14-page.s14-st {
    --p-1: #d2691e; --p-2: #3d4956; --p-soft: #fce9d9; --p-ink: #a44b12;
    --a14-display: "Menlo", "Consolas", "PingFang SC", monospace;
    background:
        linear-gradient(180deg, rgba(61, 73, 86, .06), transparent 340px),
        var(--a14-paper);
}
:root[data-theme="dark"] .s14-page.s14-st {
    --p-1: #f0a05a; --p-2: #b6c0cc; --p-soft: #3a2a1c; --p-ink: #f5b883;
    background: linear-gradient(180deg, rgba(180, 195, 215, .05), transparent 340px), var(--a14-paper);
}
.s14-st .s14-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.s14-st h1 { font-family: var(--a14-sans); letter-spacing: -1.4px; }
.s14-st .s14-lede { max-width: 64ch; }
.st-badge-cap {
    display: inline-flex; align-items: center; gap: 7px; font-family: var(--a14-mono);
    font-size: var(--t-xs); color: var(--p-ink); background: var(--p-soft);
    border: 1px solid var(--p-1); border-radius: 999px; padding: 5px 12px;
}

.st-layout { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 18px; align-items: start; }
.st-editor { background: #232a33; color: #eef2f6; border: 1px solid #3a444f; border-radius: 14px; padding: 22px; box-shadow: var(--a14-shadow); }
:root[data-theme="dark"] .s14-st .st-editor { background: #141a21; }
.st-editor .s14-card__head { border-bottom-color: #3a444f; }
.st-editor .s14-card__title { color: #f6f8fa; font-family: var(--a14-sans); }
.st-editor .s14-card__hint { color: #9aa7b5; }
.st-editor .s14-label { color: #d5dde5; }
.st-editor .s14-textarea { background: #161c23; border-color: #3d4752; color: #ffd9ad; line-height: 1.85; }
.st-editor .s14-textarea::placeholder { color: #7c8b9a; }
.st-editor .s14-input, .st-editor .s14-select { background: #161c23; border-color: #3d4752; color: #f2f5f8; }
.st-editor .s14-select option { color: #1b1a17; }
.st-editor .s14-btn { background: #2c3540; border-color: #46515d; color: #e9eef3; }
.st-editor .s14-btn:hover { border-color: var(--p-1); color: #fff; }
.st-editor .s14-btn--primary { background: var(--p-1); border-color: var(--p-1); color: #241308; }
.st-editor .s14-btn--primary:hover { color: #241308; }
.st-demo { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.st-demo button { font-size: var(--t-xs); color: #ffd9ad; background: rgba(255, 217, 173, .08); border: 1px solid rgba(255, 217, 173, .3); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.st-demo button:hover { background: rgba(255, 217, 173, .18); }

.st-result { background: var(--a14-card); border: 1px solid var(--a14-line); border-radius: 14px; padding: 22px 24px; box-shadow: var(--a14-shadow-sm); min-height: 170px; }
.st-eq__label { font-size: var(--t-xs); letter-spacing: 1.6px; color: var(--a14-ink-3); text-transform: uppercase; font-family: var(--a14-mono); }
.st-eq__text { font-family: var(--a14-mono); font-size: clamp(19px, 2.4vw, 30px); font-weight: 700; color: var(--a14-ink); margin: 12px 0 9px; line-height: 1.5; word-break: break-word; }
.st-eq__coef { font-family: var(--a14-mono); font-size: var(--t-sm); color: var(--p-ink); }
.st-esc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--a14-line); }

.st-calc { margin-top: 16px; background: var(--a14-card); border: 1px solid var(--a14-line); border-radius: 14px; padding: 20px 22px; }
.st-calc__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.st-calc__grid .s14-field { margin: 0; }
.st-note { margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--p-1); background: var(--p-soft); border-radius: 0 8px 8px 0; font-size: var(--t-sm); line-height: 1.75; }
.st-ai { margin-top: 16px; background: var(--a14-card-2); border: 1px dashed var(--p-1); border-radius: 14px; padding: 18px 20px; }
.st-ai__head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.st-ai__head h3 { font-size: var(--t-lg); }
.st-ai__head p { font-size: var(--t-xs); color: var(--a14-ink-3); margin: 3px 0 0; }
.st-ai-text { font-size: var(--t-md); line-height: 1.9; color: var(--a14-ink-2); margin-top: 12px; }
.st-batch { margin-top: 18px; }
.st-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.st-cols .s14-prose { max-width: none; }

@media (max-width: 980px) {
    .s14-st .s14-hero { grid-template-columns: 1fr; }
    .st-layout, .st-cols { grid-template-columns: 1fr; }
    .st-calc__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .st-calc__grid { grid-template-columns: 1fr; }
}
