/* ==========================================================================
   工程问题应用题练习 /tool/olympic-engineering-drill
   视觉主题：葡萄工单 —— 葡萄紫 + 铜橙 + 暖灰白，工单徽章 + 进度条核心
   ========================================================================== */

.oed-page {
    --oed-warm: #f8f5f9;
    --oed-warm-2: #fdfcfe;
    --oed-warm-3: #efe8f1;
    --oed-ink: #332b3c;
    --oed-ink-2: #635a6e;
    --oed-ink-3: #948a9f;
    --oed-line: #ddd2e2;
    --oed-line-2: #e9e1ec;
    --oed-grape: #7c3aad;
    --oed-grape-2: #5e2a86;
    --oed-grape-soft: #efe4f8;
    --oed-copper: #c96a2b;
    --oed-copper-2: #a85318;
    --oed-copper-soft: #f9e8da;
    --oed-blue: #3a6fb7;
    --oed-ok: #3d8a5f;
    --oed-ok-soft: #e2f0e6;
    --oed-err: #bf4550;
    --oed-err-soft: #f8e2e4;
    --oed-shadow: 0 14px 30px rgba(124, 58, 173, .13);
    --oed-shadow-sm: 0 4px 14px rgba(124, 58, 173, .09);
    --oed-radius: 14px;
}

:root[data-theme="dark"] .oed-page {
    --oed-warm: #241f2a;
    --oed-warm-2: #2b2531;
    --oed-warm-3: #352d3d;
    --oed-ink: #ece6f1;
    --oed-ink-2: #b4a9bf;
    --oed-ink-3: #857a91;
    --oed-line: #42374d;
    --oed-line-2: #393043;
    --oed-grape: #b487d9;
    --oed-grape-2: #c9a3e8;
    --oed-grape-soft: #33253f;
    --oed-copper: #e09256;
    --oed-copper-2: #ecab7c;
    --oed-copper-soft: #3c2b1d;
    --oed-blue: #6f9bd8;
    --oed-ok: #6cb289;
    --oed-ok-soft: #233730;
    --oed-err: #e0838c;
    --oed-err-soft: #402328;
    --oed-shadow: 0 14px 30px rgba(0, 0, 0, .42);
    --oed-shadow-sm: 0 4px 14px rgba(0, 0, 0, .34);
}

.oed-page {
    color: var(--oed-ink);
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.74;
    font-variant-numeric: tabular-nums;
    padding-bottom: 40px;
}

.oed-page * { box-sizing: border-box; }

.oed-page h1,
.oed-page h2,
.oed-page h3 {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-weight: 700;
    margin: 0;
}

/* ===================== 首屏 ===================== */
.oed-hero {
    background:
        repeating-linear-gradient(-45deg, transparent 0 14px, var(--oed-warm-3) 14px 15px),
        linear-gradient(180deg, var(--oed-warm-2), var(--oed-warm));
    border: 1px solid var(--oed-line);
    border-radius: var(--oed-radius);
    box-shadow: var(--oed-shadow);
    padding: 28px 28px 20px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}
.oed-hero::before {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 5px;
    background: linear-gradient(90deg, var(--oed-grape), var(--oed-copper));
}

.oed-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    align-items: start;
}

.oed-kicker {
    display: inline-block;
    font-size: 12px; letter-spacing: 2px;
    color: var(--oed-grape-2);
    background: var(--oed-grape-soft);
    border-radius: 4px;
    padding: 4px 14px;
    margin-bottom: 10px;
    font-weight: 700;
}

.oed-hero-copy h1 { font-size: 30px; color: var(--oed-grape-2); margin-bottom: 8px; }

.oed-lead { margin: 0 0 12px; color: var(--oed-ink-2); font-size: 14.5px; max-width: 62ch; }
.oed-lead b { color: var(--oed-grape); }

.oed-tags { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.oed-tags li {
    font-size: 12px; color: var(--oed-ink-2);
    border: 1px solid var(--oed-line); background: var(--oed-warm-2);
    border-radius: 4px; padding: 2px 10px;
}

/* ---- 练习入口 ---- */
.oed-entry {
    background: var(--oed-warm-2);
    border: 1px solid var(--oed-line);
    border-radius: var(--oed-radius);
    box-shadow: var(--oed-shadow-sm);
    padding: 16px 18px 18px;
}
.oed-entry-head {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding-bottom: 10px; margin-bottom: 12px;
    border-bottom: 1px solid var(--oed-line-2);
}
.oed-entry-head b { font-size: 16px; }
.oed-entry-head > span:last-child { font-size: 12.5px; color: var(--oed-ink-3); }
.oed-sheet-no {
    font-size: 11px; letter-spacing: 1px; font-weight: 700;
    color: var(--oed-copper-2); background: var(--oed-copper-soft);
    border-radius: 4px; padding: 3px 10px;
}

.oed-type-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.oed-chip { position: relative; cursor: pointer; }
.oed-chip input { position: absolute; opacity: 0; inset: 0; }
.oed-chip span {
    display: inline-block; font-size: 13.5px; color: var(--oed-ink-2);
    border: 1px solid var(--oed-line); border-radius: 6px;
    padding: 6px 14px; background: var(--oed-warm);
    transition: all .15s;
}
.oed-chip input:checked + span {
    color: #fff; background: var(--oed-grape); border-color: var(--oed-grape);
    font-weight: 600;
}
:root[data-theme="dark"] .oed-chip input:checked + span { color: #1d1428; }
.oed-chip input:focus-visible + span { outline: 2px solid var(--oed-copper); outline-offset: 2px; }

.oed-entry-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.oed-select,
.oed-input {
    font: inherit; font-size: 14px; color: var(--oed-ink);
    background: var(--oed-warm); border: 1px solid var(--oed-line);
    border-radius: 8px; padding: 8px 12px; width: 100%;
}
.oed-select { width: auto; min-width: 180px; }
.oed-input:focus, .oed-select:focus { outline: 2px solid var(--oed-grape); border-color: var(--oed-grape); }

.oed-btn {
    font: inherit; font-size: 14px; font-weight: 600;
    border: 1px solid var(--oed-grape); border-radius: 8px;
    background: var(--oed-warm-2); color: var(--oed-grape);
    padding: 8px 18px; cursor: pointer; transition: all .15s;
}
.oed-btn:hover { transform: translateY(-1px); box-shadow: var(--oed-shadow-sm); }
.oed-btn--solid { background: var(--oed-grape); color: #fff; }
:root[data-theme="dark"] .oed-btn--solid { color: #1d1428; }
.oed-btn--copper { background: var(--oed-copper); border-color: var(--oed-copper); color: #fff; }
:root[data-theme="dark"] .oed-btn--copper { color: #2b1503; }
.oed-btn--ghost { border-color: var(--oed-line); color: var(--oed-ink-2); background: transparent; }

.oed-question {
    border: 1px solid var(--oed-line); border-left: 5px solid var(--oed-copper);
    background: var(--oed-warm); border-radius: 8px; padding: 12px 14px;
}
.oed-question-meta {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
    font-size: 12px; color: var(--oed-ink-3); margin-bottom: 6px;
}
.oed-question-meta #oedQTag {
    color: var(--oed-grape-2); font-weight: 700;
    background: var(--oed-grape-soft); border-radius: 4px; padding: 1px 10px;
}
.oed-question-text { margin: 0 0 10px; font-size: 15.5px; font-weight: 600; line-height: 1.8; }
.oed-answer-row { display: flex; gap: 8px; }
.oed-answer-row .oed-input { max-width: 300px; }
.oed-answer-hint { font-size: 12px; color: var(--oed-ink-3); margin-top: 6px; }

.oed-quiz-feedback { margin-top: 10px; border-radius: 8px; padding: 9px 14px; font-size: 14px; font-weight: 600; }
.oed-quiz-feedback.oed-ok { background: var(--oed-ok-soft); color: var(--oed-ok); border: 1px solid var(--oed-ok); }
.oed-quiz-feedback.oed-bad { background: var(--oed-err-soft); color: var(--oed-err); border: 1px solid var(--oed-err); }

.oed-explain {
    margin-top: 10px; background: var(--oed-grape-soft);
    border: 1px dashed var(--oed-grape); border-radius: 8px;
    padding: 12px 14px; font-size: 13.5px; line-height: 1.9;
}
.oed-explain h4 { margin: 0 0 6px; font-size: 13px; color: var(--oed-grape-2); letter-spacing: 2px; }
.oed-explain ol { margin: 0; padding-left: 20px; }
.oed-explain b { color: var(--oed-grape); }

/* ---- 进度条示意卡 ---- */
.oed-board {
    background: var(--oed-warm-2);
    border: 1px solid var(--oed-line);
    border-top: 5px solid var(--oed-grape);
    border-radius: var(--oed-radius);
    box-shadow: var(--oed-shadow-sm);
    overflow: hidden;
}
.oed-board-head {
    font-size: 12px; letter-spacing: 4px; font-weight: 700;
    color: var(--oed-grape-2); text-align: center;
    padding: 11px 0 9px; border-bottom: 1px dashed var(--oed-line);
}
.oed-board-body { padding: 14px 16px 16px; }
.oed-track-demo { margin-bottom: 12px; }
.oed-track-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--oed-ink-3); margin-bottom: 4px; }
.oed-track {
    display: flex; height: 26px; border-radius: 6px; overflow: hidden;
    background: var(--oed-warm-3); border: 1px solid var(--oed-line);
}
.oed-track-seg { height: 100%; transition: width .4s ease; }
.oed-track-seg--a { background: linear-gradient(180deg, var(--oed-blue), #2d5a96); }
.oed-track-seg--b { background: linear-gradient(180deg, var(--oed-copper), var(--oed-copper-2)); flex: 1; }
.oed-track-days { display: flex; justify-content: space-between; font-size: 11px; color: var(--oed-ink-3); margin-top: 4px; }
.oed-board-kv {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    font-size: 12.5px; border-top: 1px dashed var(--oed-line); padding-top: 10px;
}
.oed-board-kv div { display: flex; justify-content: space-between; gap: 6px; }
.oed-board-kv b { color: var(--oed-grape); }
.oed-board-note { font-size: 12px; color: var(--oed-ink-3); line-height: 1.7; margin: 10px 0 0; }

/* ---- 预置 ---- */
.oed-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.oed-presets--panel { margin-top: 0; }
.oed-presets-label { font-size: 12.5px; color: var(--oed-ink-3); font-weight: 600; }
.oed-presets button {
    font: inherit; font-size: 12.5px; color: var(--oed-ink-2);
    background: var(--oed-warm-2); border: 1px solid var(--oed-line);
    border-radius: 999px; padding: 4px 13px; cursor: pointer; transition: all .15s;
}
.oed-presets button:hover { border-color: var(--oed-grape); color: var(--oed-grape); }

/* ===================== 校验提示 ===================== */
.oed-errbar {
    background: var(--oed-err-soft); border: 1px solid var(--oed-err);
    color: var(--oed-err); border-radius: 8px;
    padding: 10px 14px; font-size: 14px; font-weight: 600; margin-bottom: 16px;
}

/* ===================== 面板 ===================== */
.oed-panel {
    background: var(--oed-warm-2);
    border: 1px solid var(--oed-line);
    border-radius: var(--oed-radius);
    box-shadow: var(--oed-shadow-sm);
    padding: 20px 22px;
    margin-bottom: 18px;
}
.oed-panel-head { margin-bottom: 14px; }
.oed-panel-kicker {
    display: inline-block; font-size: 11px; letter-spacing: 3px;
    color: var(--oed-copper-2); font-weight: 700; margin-bottom: 4px;
}
.oed-panel-head h2 { font-size: 21px; margin-bottom: 6px; }
.oed-panel-head p { margin: 0; font-size: 13.5px; color: var(--oed-ink-2); max-width: 78ch; }
.oed-panel-head p b { color: var(--oed-grape); }

/* ---- 方法讲解 ---- */
.oed-method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.oed-method-card {
    background: var(--oed-warm); border: 1px solid var(--oed-line);
    border-radius: 10px; padding: 14px 16px; position: relative;
}
.oed-method-card::before {
    content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
    width: 4px; border-radius: 4px; background: var(--oed-grape);
}
.oed-method-card:nth-child(2)::before { background: var(--oed-copper); }
.oed-method-card:nth-child(3)::before { background: var(--oed-blue); }
.oed-method-card h3 { font-size: 15px; margin-bottom: 6px; padding-left: 12px; }
.oed-method-card p { margin: 0; font-size: 13.5px; color: var(--oed-ink-2); padding-left: 12px; }
.oed-method-card b { color: var(--oed-grape); }

/* ---- 战绩 ---- */
.oed-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 12px; }
.oed-stat {
    background: var(--oed-warm); border: 1px solid var(--oed-line);
    border-radius: 10px; padding: 10px 14px;
    display: flex; flex-direction: column; gap: 2px;
}
.oed-stat span { font-size: 12px; color: var(--oed-ink-3); }
.oed-stat b { font-size: 22px; color: var(--oed-grape); }
.oed-stat-bar { height: 8px; background: var(--oed-warm-3); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.oed-stat-bar-fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--oed-grape), var(--oed-copper));
    transition: width .3s ease;
}

.oed-history-wrap { overflow-x: auto; }
.oed-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.oed-table th, .oed-table td {
    border: 1px solid var(--oed-line-2); padding: 7px 10px; text-align: left; white-space: nowrap;
}
.oed-table td.oed-wrap, .oed-table th.oed-wrap { white-space: normal; min-width: 200px; }
.oed-table th { background: var(--oed-grape-soft); color: var(--oed-grape-2); font-weight: 600; }
.oed-table .oed-empty td { text-align: center; color: var(--oed-ink-3); padding: 16px; }
.oed-mark-ok { color: var(--oed-ok); font-weight: 700; }
.oed-mark-bad { color: var(--oed-err); font-weight: 700; }

/* ---- 错题本 ---- */
.oed-batch-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.oed-batch-best { margin: 0; font-size: 13px; color: var(--oed-ink-2); }

/* ---- 导出 ---- */
.oed-pre {
    background: var(--oed-warm); border: 1px solid var(--oed-line);
    border-radius: 8px; padding: 12px 14px;
    font-family: Consolas, "Courier New", monospace; font-size: 12.5px;
    color: var(--oed-ink-2); overflow-x: auto; white-space: pre; margin: 0 0 12px;
    max-height: 220px;
}
.oed-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- FAQ ---- */
.oed-faq-item {
    border: 1px solid var(--oed-line); border-radius: 10px;
    background: var(--oed-warm); margin-bottom: 10px; overflow: hidden;
}
.oed-faq-item summary {
    cursor: pointer; font-weight: 600; font-size: 14.5px;
    padding: 11px 16px; list-style: none; position: relative; padding-right: 40px;
}
.oed-faq-item summary::-webkit-details-marker { display: none; }
.oed-faq-item summary::after {
    content: "+"; position: absolute; right: 16px; top: 50%;
    transform: translateY(-50%); color: var(--oed-grape); font-weight: 700;
}
.oed-faq-item[open] summary::after { content: "−"; }
.oed-faq-a { padding: 0 16px 13px; font-size: 13.5px; color: var(--oed-ink-2); line-height: 1.9; }
.oed-faq-a b { color: var(--oed-grape); }

.oed-comments { margin-bottom: 10px; }

/* ===================== 口径说明与常见误填 ===================== */
.oed-criteria-head {
    display: flex; justify-content: space-between; align-items: baseline;
    flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.oed-criteria-head h2 { font-size: 18px; }
.oed-criteria-head > span { font-size: 12.5px; color: var(--oed-ink-3); }
.oed-note-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.oed-note-table th, .oed-note-table td {
    border-bottom: 1px solid var(--oed-line-2);
    padding: 10px 12px; text-align: left; vertical-align: top; line-height: 1.8;
}
.oed-note-table tr:last-child th, .oed-note-table tr:last-child td { border-bottom: none; }
.oed-note-table th { width: 110px; font-weight: 700; white-space: nowrap; }
.oed-note-table td { color: var(--oed-ink-2); }
.oed-note-table td b { color: var(--oed-grape); }

/* ===================== 底部信息标签页 ===================== */
.oed-tabs {
    display: flex; flex-wrap: wrap; gap: 2px;
    border-bottom: 2px solid var(--oed-line);
    margin: 22px 0 0;
}
.oed-tab {
    font: inherit; font-size: 14px; font-weight: 600;
    color: var(--oed-ink-2); background: transparent;
    border: none; border-bottom: 2px solid transparent;
    padding: 10px 16px; margin-bottom: -2px; cursor: pointer; transition: all .15s;
}
.oed-tab:hover { color: var(--oed-grape); }
.oed-tab.active { color: var(--oed-grape-2); border-bottom-color: var(--oed-copper); }
.oed-tabpane {
    display: none;
    background: var(--oed-warm-2);
    border: 1px solid var(--oed-line); border-top: none;
    border-radius: 0 0 var(--oed-radius) var(--oed-radius);
    box-shadow: var(--oed-shadow-sm);
    padding: 20px 22px;
    margin-bottom: 18px;
}
.oed-tabpane.active { display: block; }
.oed-tabpane h2 { font-size: 17px; margin: 0 0 10px; }
.oed-tabpane h2:not(:first-child) { margin-top: 18px; }
.oed-tabpane p { margin: 0 0 6px; font-size: 14px; color: var(--oed-ink-2); line-height: 2; }
.oed-tabpane p b { color: var(--oed-grape); }
.oed-tabpane ol { margin: 0; padding-left: 22px; font-size: 14px; color: var(--oed-ink-2); line-height: 2.1; }
.oed-tabpane ol b { color: var(--oed-grape); }

.oed-timeline { list-style: none; margin: 0; padding: 0; }
.oed-timeline li {
    display: flex; gap: 10px; align-items: baseline;
    padding: 10px 0; border-bottom: 1px dashed var(--oed-line-2);
    font-size: 13.5px; color: var(--oed-ink-2); line-height: 1.9;
}
.oed-timeline li:last-child { border-bottom: none; }
.oed-timeline .ver {
    flex: 0 0 auto; font-size: 11.5px; font-weight: 700;
    color: #fff; background: var(--oed-copper);
    border-radius: 4px; padding: 1px 9px;
}
:root[data-theme="dark"] .oed-timeline .ver { color: #2b1503; }
.oed-timeline .date { flex: 0 0 auto; color: var(--oed-ink-3); font-size: 12.5px; }

/* ===================== 相关工具 ===================== */
.oed-related { margin-bottom: 10px; }
.oed-related h2 { font-size: 19px; margin: 0 0 12px; }
.oed-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.oed-rel {
    display: flex; align-items: center; gap: 10px;
    background: var(--oed-warm-2); border: 1px solid var(--oed-line);
    border-radius: 10px; padding: 12px 14px; text-decoration: none;
    transition: all .15s;
}
.oed-rel:hover { border-color: var(--oed-grape); box-shadow: var(--oed-shadow-sm); transform: translateY(-1px); }
.oed-rel .ri {
    flex: 0 0 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    background: var(--oed-grape-soft); border-radius: 8px; font-size: 17px;
}
.oed-rel b { display: block; font-size: 13.5px; }
.oed-rel small { display: block; font-size: 12px; color: var(--oed-ink-3); margin-top: 2px; }

/* ===================== A4 练习卷 ===================== */
.oed-sheet { display: none; }

/* ===================== 弹窗与 toast ===================== */
.oed-overlay[hidden] { display: none; }
.oed-overlay {
    position: fixed; inset: 0; z-index: 999;
    background: rgba(40, 26, 52, .5);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.oed-modal {
    background: var(--oed-warm-2); color: var(--oed-ink);
    border: 1px solid var(--oed-line); border-top: 5px solid var(--oed-copper);
    border-radius: 12px; box-shadow: var(--oed-shadow);
    max-width: 460px; width: 100%; padding: 22px 24px;
}
.oed-modal h3 { font-size: 19px; color: var(--oed-grape-2); margin-bottom: 8px; }
.oed-modal-sum { font-size: 14.5px; color: var(--oed-ink-2); line-height: 1.9; margin: 0 0 16px; }
.oed-modal-sum b { color: var(--oed-grape); }
.oed-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.oed-toast {
    position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(16px);
    background: var(--oed-grape-2); color: #fff;
    font-size: 14px; font-weight: 600; padding: 10px 22px;
    border-radius: 999px; box-shadow: var(--oed-shadow);
    opacity: 0; pointer-events: none; transition: all .25s; z-index: 1000;
}
:root[data-theme="dark"] .oed-toast { background: var(--oed-copper); color: #2b1503; }
.oed-toast.oed-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================== 响应式 ===================== */
@media (max-width: 960px) {
    .oed-hero-grid { grid-template-columns: 1fr; }
    .oed-hero { padding: 20px 16px 16px; }
    .oed-panel { padding: 16px; }
    .oed-hero-copy h1 { font-size: 25px; }
    .oed-answer-row { flex-wrap: wrap; }
    .oed-answer-row .oed-input { max-width: none; }
}

/* ===================== 打印 ===================== */
@media print {
    body * { visibility: hidden !important; }
    .oed-sheet, .oed-sheet * { visibility: visible !important; }
    .oed-sheet {
        display: block !important; position: absolute; inset: 0;
        background: #fff; color: #222; padding: 12mm; font-size: 13px;
    }
    .oed-sheet h2 { font-size: 18px; margin: 0 0 4px; }
    .oed-sheet .oed-sheet-sub { font-size: 12px; color: #555; margin-bottom: 10px; }
    .oed-sheet ol { padding-left: 22px; margin: 0; }
    .oed-sheet li { margin-bottom: 10px; line-height: 1.7; }
    .oed-sheet .oed-print-ans { color: #333; font-weight: 700; }
}
