/* ======================================================================
 * 06 · 肠易激综合征自查 —— 「七日肠道日记」
 * 配色：薄荷绿 × 靛蓝；字体：圆润无衬线 + 等宽日期；布局：首屏记录卡 + 日记表
 * ====================================================================== */
.hc13.ibs {
    --hc-ink: #16312e; --hc-muted: #64817c; --hc-paper: #ffffff;
    --hc-soft: #f0f9f6; --hc-line: #d9ebe5; --hc-accent: #0f8f7e;
    --hc-accent-2: #4f46e5; --hc-warn: #b23b2e; --hc-shadow: 0 14px 36px rgba(15, 90, 78, .10);
    background: linear-gradient(180deg, #f4fbf8 0%, #f7faf9 100%);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.82;
}
:root[data-theme="dark"] .hc13.ibs {
    --hc-ink: #e2f2ee; --hc-muted: #9dbbb4; --hc-paper: #121d1b;
    --hc-soft: #182724; --hc-line: #2b403c; --hc-accent: #6fd8c2;
    --hc-accent-2: #a5b4fc; --hc-warn: #ff9d8f; --hc-shadow: 0 14px 36px rgba(0, 0, 0, .44);
    background: linear-gradient(180deg, #0d1715 0%, #0b1312 100%);
}
.ibs .hc-wrap { padding-bottom: 56px; }
.ibs .hc-crumb { padding: 16px 0 10px; }
.ibs strong, .ibs b { color: var(--hc-accent); }
.ibs .hc-kw, .ibs .ibs-entry-label, .ibs .ibs-sec-head i, .ibs .ibs-console-head i,
.ibs .ibs-ai-head i, .ibs .ibs-stats b, .ibs .ibs-journal-head span { font-family: "SFMono-Regular", Consolas, monospace; }
.ibs h1, .ibs h2, .ibs h3 { letter-spacing: -.4px; }

/* ---- 首屏 ---- */
.ibs-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .9fr); gap: 36px; padding: 30px 0 28px; align-items: start; }
.ibs-hero .hc-kw { color: var(--hc-accent); font-size: 11px; letter-spacing: 2.6px; }
.ibs-hero h1 { margin: 14px 0 16px; font-size: clamp(31px, 3.9vw, 46px); line-height: 1.26; font-weight: 850; }
.ibs-hero h1 em { display: block; font-style: normal; font-size: .46em; font-weight: 600; color: var(--hc-accent-2); margin-top: 12px; letter-spacing: 0; }
.ibs-lede { margin: 0; max-width: 58ch; font-size: 15.5px; line-height: 1.94; }
.ibs-hero-ops { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 10px; }
.ibs-cta { padding: 12px 24px; border-radius: 12px; background: var(--hc-accent); color: #fff; font-size: 14.5px; font-weight: 750; }
.ibs-cta--ghost { background: transparent; color: var(--hc-accent); border: 1.5px solid var(--hc-accent); }
.ibs-hero-note { margin: 0; font-size: 12px; color: var(--hc-muted); }
.ibs-entry { padding: 20px 22px; background: var(--hc-paper); border: 1px solid var(--hc-line); border-radius: 20px; box-shadow: var(--hc-shadow); }
.ibs-entry-label { display: block; font-size: 10.5px; letter-spacing: 2.2px; color: var(--hc-muted); margin-bottom: 14px; }
.ibs-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ibs-entry-grid label { font-size: 12.5px; font-weight: 700; }
.ibs-entry-grid label small { font-weight: 400; color: var(--hc-muted); }
.ibs-entry-grid label:last-child { grid-column: 1 / -1; }
.ibs-entry-grid .hc-input, .ibs-entry-grid .hc-select { margin-top: 6px; }
.ibs-entry-rel { border: 0; padding: 14px 0 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ibs-entry-rel legend { width: 100%; padding-bottom: 8px; font-size: 12.5px; font-weight: 700; }
.ibs-entry-rel input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ibs-entry-rel label span { display: inline-block; padding: 6px 11px; border: 1px solid var(--hc-line); border-radius: 999px; font-size: 12px; cursor: pointer; }
.ibs-entry-rel input:checked + span { background: var(--hc-accent-2); border-color: var(--hc-accent-2); color: #fff; font-weight: 650; }
.ibs-entry-rel input:focus-visible + span { outline: 3px solid var(--hc-accent); outline-offset: 2px; }
.ibs-add-btn { width: 100%; margin-top: 16px; padding: 11px; border-radius: 10px; background: var(--hc-soft); color: var(--hc-accent); border: 1px dashed var(--hc-accent); font-size: 14px; font-weight: 700; }
.ibs-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.ibs-strip span { padding: 6px 13px; border-radius: 999px; background: var(--hc-paper); border: 1px solid var(--hc-line); font-size: 12px; color: var(--hc-muted); }
.ibs-strip span:first-child { background: var(--hc-accent); border-color: var(--hc-accent); color: #fff; font-weight: 700; }

/* ---- 控制台 ---- */
.ibs-console { background: var(--hc-paper); border: 1px solid var(--hc-line); border-radius: 20px; overflow: hidden; }
.ibs-console-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: baseline; padding: 18px 24px; border-bottom: 1px solid var(--hc-line); background: var(--hc-soft); }
.ibs-console-head h2 { margin: 0; font-size: 20px; }
.ibs-console-head i { font-style: normal; color: var(--hc-accent); font-size: 12px; margin-right: 8px; }
.ibs-console-head p { margin: 0; font-size: 12.5px; color: var(--hc-muted); }
.ibs-grid { display: grid; grid-template-columns: minmax(230px, .72fr) minmax(0, 1.6fr); }
.ibs-side { padding: 22px; border-right: 1px solid var(--hc-line); }
.ibs-fieldset { border: 0; padding: 0 0 16px; margin: 0 0 16px; border-bottom: 1px solid var(--hc-line); display: flex; flex-wrap: wrap; gap: 7px; }
.ibs-fieldset legend { width: 100%; padding-bottom: 8px; font-size: 13.5px; font-weight: 700; }
.ibs-fieldset input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ibs-fieldset label span { display: inline-block; padding: 7px 12px; border: 1px solid var(--hc-line); border-radius: 8px; font-size: 12.5px; cursor: pointer; }
.ibs-fieldset input:checked + span { background: var(--hc-accent); border-color: var(--hc-accent); color: #fff; font-weight: 650; }
.ibs-fieldset input:focus-visible + span { outline: 3px solid var(--hc-accent-2); outline-offset: 2px; }
.ibs-fieldset--alert { padding: 12px; border: 1px dashed color-mix(in srgb, var(--hc-warn) 45%, var(--hc-line)); border-radius: 10px; background: color-mix(in srgb, var(--hc-warn) 4%, transparent); }
.ibs-fieldset--alert input:checked + span { background: var(--hc-warn); border-color: var(--hc-warn); }
.ibs-stress { display: block; font-size: 13px; font-weight: 700; margin-bottom: 16px; }
.ibs-stress b { color: var(--hc-accent-2); font-size: 16px; }
.ibs-stress input { display: block; width: 100%; margin-top: 8px; accent-color: var(--hc-accent-2); }
.ibs-journal { padding: 22px 24px 24px; }
.ibs-journal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.ibs-journal-head b { font-size: 15px; }
.ibs-journal-head span { font-size: 11px; color: var(--hc-muted); }
.ibs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ibs-table th, .ibs-table td { padding: 9px 10px; border-bottom: 1px solid var(--hc-line); text-align: left; white-space: nowrap; }
.ibs-table th { color: var(--hc-muted); font-size: 11.5px; }
.ibs-table .ibs-del { color: var(--hc-warn); cursor: pointer; font-size: 12px; }
.ibs-journal-empty { padding: 16px; border: 1px dashed var(--hc-line); border-radius: 10px; color: var(--hc-muted); font-size: 13px; }
.ibs-batch { margin-top: 14px; border: 1px solid var(--hc-line); border-radius: 10px; padding: 0 14px; }
.ibs-batch summary { padding: 12px 0; cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--hc-accent); }
.ibs-batch summary span { font-size: 11.5px; font-weight: 400; color: var(--hc-muted); margin-left: 8px; }
.ibs-batch-in { padding-bottom: 14px; }
.ibs-batch-in > label { display: block; font-size: 12px; color: var(--hc-muted); margin-bottom: 8px; }
.ibs-batch-in .hc-actions { margin: 12px 0; }
.ibs-journal .hc-actions { margin-top: 14px; }

/* ---- 结果 ---- */
.ibs-result { margin-top: 42px; }
.ibs-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 2px solid var(--hc-accent); }
.ibs-sec-head i { font-style: normal; color: var(--hc-accent); font-size: 12px; }
.ibs-sec-head h2 { margin: 0; font-size: 22px; }
.ibs-sec-head small { margin-left: auto; color: var(--hc-muted); font-size: 12px; }
.ibs-empty { padding: 24px; border: 1px dashed var(--hc-line); border-radius: 12px; color: var(--hc-muted); background: var(--hc-paper); }
.ibs-verdict { padding: 16px 20px; margin-bottom: 16px; border-radius: 12px; background: var(--hc-soft); border-left: 5px solid var(--hc-accent); font-size: 14.5px; line-height: 1.88; }
.ibs-verdict.is-urgent { background: color-mix(in srgb, var(--hc-warn) 9%, var(--hc-paper)); border-left-color: var(--hc-warn); color: var(--hc-warn); }
.ibs-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.ibs-stats > div { padding: 15px; border: 1px solid var(--hc-line); border-radius: 12px; background: var(--hc-paper); }
.ibs-stats span { display: block; font-size: 11.5px; color: var(--hc-muted); }
.ibs-stats b { font-size: 25px; color: var(--hc-accent); }
.ibs-stats em { font-size: 11px; font-style: normal; color: var(--hc-muted); margin-left: 4px; }
.ibs-subh { margin: 22px 0 12px; font-size: 17px; }
.ibs-subh small { font-size: 12px; font-weight: 400; color: var(--hc-muted); }
.ibs-trend { display: flex; align-items: flex-end; gap: 10px; min-height: 130px; padding: 14px 16px 10px; border-radius: 12px; background: var(--hc-soft); overflow-x: auto; }
.ibs-bar { min-width: 56px; flex: 1; text-align: center; font: 11px "SFMono-Regular", Consolas, monospace; color: var(--hc-muted); }
.ibs-bar i { display: block; width: 100%; max-width: 46px; margin: 0 auto 6px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--hc-accent), var(--hc-accent-2)); }
.ibs-bar b { display: block; color: var(--hc-ink); font-size: 12px; }
.ibs-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.ibs-card { padding: 20px 22px; border: 1px solid var(--hc-line); border-radius: 12px; background: var(--hc-paper); }
.ibs-card h3 { margin: 0 0 10px; font-size: 16px; }
.ibs-card ol, .ibs-card ul { margin: 0; padding-left: 20px; }
.ibs-card li { margin-bottom: 8px; font-size: 13.5px; line-height: 1.85; }
.ibs-disclaim { margin: 18px 0 0; padding: 14px 18px; border-left: 3px solid var(--hc-line); color: var(--hc-muted); font-size: 13px; line-height: 1.88; }
.ibs-result .hc-actions { margin-top: 14px; }

/* ---- AI ---- */
.ibs-ai { margin-top: 40px; padding: 24px 26px; border: 1px solid var(--hc-line); border-radius: 16px; background: var(--hc-paper); }
.ibs-ai-head h2 { margin: 0 0 8px; font-size: 19px; }
.ibs-ai-head i { font-style: normal; color: var(--hc-accent); font-size: 12px; margin-right: 8px; }
.ibs-ai-head h2 small { font-size: 11.5px; font-weight: 400; color: var(--hc-muted); }
.ibs-ai-head p { margin: 0 0 16px; font-size: 13px; line-height: 1.8; color: var(--hc-muted); }
.ibs-ai-status { margin: 14px 0 0; font: 12.5px "SFMono-Regular", Consolas, monospace; color: var(--hc-muted); }
.ibs-ai-out { margin-top: 12px; padding: 16px 18px; white-space: pre-wrap; font-size: 14px; line-height: 1.9; background: var(--hc-soft); border-radius: 10px; }

/* ---- 阅读 ---- */
.ibs-reading { margin-top: 48px; }
.ibs-faq details { padding: 13px 0; border-bottom: 1px solid var(--hc-line); }
.ibs-faq summary { cursor: pointer; font-size: 15px; font-weight: 700; }
.ibs-faq details > div { padding: 10px 0 4px; font-size: 14px; line-height: 1.9; }
.ibs-related { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--hc-line); font-size: 13px; }
.ibs-related > span { color: var(--hc-muted); }
.ibs-related a { padding: 6px 14px; border: 1px solid var(--hc-line); border-radius: 999px; color: var(--hc-accent); }

@media (max-width: 900px) {
    .ibs-hero, .ibs-grid, .ibs-cols { grid-template-columns: 1fr; }
    .ibs-side { border-right: 0; border-bottom: 1px solid var(--hc-line); }
}
@media (max-width: 640px) {
    .ibs-entry-grid, .ibs-stats { grid-template-columns: repeat(2, 1fr); }
    .ibs-entry-grid label:last-child { grid-column: 1 / -1; }
    .ibs-console-head, .ibs-side, .ibs-journal, .ibs-ai { padding-inline: 16px; }
}
