/* ======================================================================
 *  备孕叶酸补充计划 /tool/folic-acid-planner
 *  风格：孕育关怀 —— 珊瑚粉 + 柔光 + 日历卡
 *  深色模式随站点 [data-theme="dark"]，本页变量作用域 .fap-page
 * ====================================================================== */

.fap-page {
    --fap-rose: #e11d63;
    --fap-rose-2: #fb7185;
    --fap-leaf: #16a34a;
    --fap-bg: #fff5f6;
    --fap-card: #ffffff;
    --fap-soft: #ffeef1;
    --fap-line: #f6d7dd;
    --fap-text: #3d1f2a;
    --fap-muted: #a37582;
    --fap-shadow: 0 12px 32px -16px rgba(225, 29, 99, .28);
    color: var(--fap-text);
    padding-bottom: 70px;
    background:
        radial-gradient(880px 400px at 8% -8%, rgba(251, 113, 133, .14), transparent 60%),
        radial-gradient(680px 340px at 94% 2%, rgba(244, 114, 182, .10), transparent 55%);
}
:root[data-theme="dark"] .fap-page {
    --fap-rose: #fb7185;
    --fap-rose-2: #fda4af;
    --fap-leaf: #4ade80;
    --fap-bg: #221016;
    --fap-card: #2b1720;
    --fap-soft: #351c27;
    --fap-line: #4a2c39;
    --fap-text: #f7e9ed;
    --fap-muted: #c294a2;
    --fap-shadow: 0 14px 34px -18px rgba(0, 0, 0, .7);
}

/* ---------- 面包屑 ---------- */
.fap-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--fap-muted);
    padding: 18px 0 0;
}
.fap-crumb a { color: var(--fap-muted); text-decoration: none; }
.fap-crumb a:hover { color: var(--fap-rose); }
.fap-crumb b { color: var(--fap-text); font-weight: 600; }

/* ---------- Hero ---------- */
.fap-hero { text-align: center; padding: 22px 0 26px; }
.fap-hero-ic {
    display: inline-grid;
    place-items: center;
    width: 62px;
    height: 62px;
    font-size: 30px;
    border-radius: 50% 50% 50% 8px;
    background: linear-gradient(135deg, var(--fap-rose-2), var(--fap-rose));
    box-shadow: var(--fap-shadow);
    margin-bottom: 12px;
    transform: rotate(3deg);
}
.fap-hero h1 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 900;
    letter-spacing: -.02em;
    margin: 0 0 10px;
}
.fap-hero p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.8;
    color: var(--fap-muted);
}
.fap-hero em { font-style: normal; font-weight: 800; color: var(--fap-rose); }

/* ---------- 布局 ---------- */
.fap-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 22px;
    align-items: start;
}
.fap-form-col { display: flex; flex-direction: column; gap: 16px; }

/* ---------- 表单 ---------- */
.fap-card {
    background: var(--fap-card);
    border: 1px solid var(--fap-line);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: var(--fap-shadow);
}
.fap-card-t {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 16px;
}
.fap-card-t i {
    font-style: normal;
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    font-size: 13px;
    border-radius: 50%;
    color: #fff;
    background: var(--fap-rose);
}
.fap-seg {
    display: flex;
    gap: 6px;
    background: var(--fap-soft);
    border-radius: 13px;
    padding: 4px;
    margin-bottom: 16px;
}
.fap-seg-btn {
    flex: 1;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--fap-muted);
    background: transparent;
    border: 0;
    border-radius: 10px;
    padding: 9px;
    cursor: pointer;
    transition: all .16s;
}
.fap-seg-btn.is-on {
    color: #fff;
    background: linear-gradient(135deg, var(--fap-rose-2), var(--fap-rose));
    box-shadow: 0 5px 14px -5px var(--fap-rose);
}
.fap-frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fap-field { display: block; margin-bottom: 12px; }
.fap-field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.fap-field input, .fap-field select {
    width: 100%;
    border: 1px solid var(--fap-line);
    border-radius: 10px;
    background: var(--fap-soft);
    color: var(--fap-text);
    font: inherit;
    font-size: 14px;
    padding: 9px 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.fap-field input:focus, .fap-field select:focus {
    border-color: var(--fap-rose-2);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--fap-rose-2) 20%, transparent);
}
.fap-hint {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--fap-muted);
    background: var(--fap-soft);
    border-radius: 10px;
    padding: 9px 12px;
}
.fap-hint b { color: var(--fap-rose); }

.fap-btns { display: flex; gap: 12px; }
.fap-btn {
    flex: 1;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--fap-rose-2), var(--fap-rose));
    box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--fap-rose) 70%, transparent);
    transition: transform .15s;
}
.fap-btn:hover { transform: translateY(-2px); }
.fap-btn-ghost {
    color: var(--fap-text);
    background: var(--fap-card);
    border: 1px solid var(--fap-line);
    box-shadow: none;
}
.fap-btn-ghost:hover { border-color: var(--fap-rose); }
.fap-disclaimer {
    margin: 14px 0 0;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--fap-muted);
    border: 1px dashed color-mix(in srgb, var(--fap-rose) 40%, transparent);
    border-radius: 10px;
    padding: 10px 12px;
}
.fap-disclaimer b { color: var(--fap-rose); }

/* ---------- 日历 ---------- */
.fap-result-col { display: flex; flex-direction: column; gap: 16px; }
.fap-calendar {
    background: var(--fap-card);
    border: 1px solid var(--fap-line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--fap-shadow);
}
.fap-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--fap-rose-2), var(--fap-rose));
    color: #fff;
}
.fap-cal-head b { display: block; font-size: 17px; font-weight: 900; }
.fap-cal-head span { font-size: 12.5px; opacity: .92; }
.fap-cal-week {
    flex: none;
    font-size: 14px;
    font-weight: 800;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    padding: 6px 14px;
}
.fap-cal-list { padding: 14px 16px 8px; display: grid; gap: 8px; }
.fap-cal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--fap-soft);
    border: 1px solid var(--fap-line);
    border-radius: 12px;
    padding: 11px 14px;
}
.fap-ci-date { font-size: 13.5px; font-weight: 600; }
.fap-ci-dose { font-size: 15px; font-weight: 900; color: var(--fap-rose); white-space: nowrap; }
.fap-cal-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 20px 16px;
    border-top: 1px dashed var(--fap-line);
}
.fap-cal-check label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.fap-cal-check input { width: 18px; height: 18px; accent-color: var(--fap-rose); }
.fap-cal-check span { font-size: 13px; font-weight: 700; color: var(--fap-rose); }

/* ---------- 产检节点 ---------- */
.fap-checkpoint, .fap-foodcard {
    background: var(--fap-card);
    border: 1px solid var(--fap-line);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: var(--fap-shadow);
}
.fap-checkpoint h2, .fap-foodcard h2 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 12px;
}
.fap-checkpoint h2 small, .fap-foodcard h2 small { font-size: 12px; font-weight: 500; color: var(--fap-muted); }
.fap-check-list { display: grid; gap: 8px; }
.fap-check-item {
    border: 1px solid var(--fap-line);
    border-radius: 12px;
    background: var(--fap-soft);
    padding: 0 14px;
}
.fap-check-item.is-now { border-color: var(--fap-rose); background: color-mix(in srgb, var(--fap-rose) 8%, var(--fap-soft)); }
.fap-check-item.is-passed { opacity: .62; }
.fap-check-item summary {
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 700;
    padding: 11px 0;
    list-style: none;
}
.fap-check-item summary::-webkit-details-marker { display: none; }
.fap-check-body {
    font-size: 13px;
    line-height: 1.75;
    color: var(--fap-muted);
    padding: 0 0 12px;
}

/* ---------- 食物表 ---------- */
.fap-food-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
}
.fap-food {
    text-align: center;
    background: var(--fap-soft);
    border: 1px solid var(--fap-line);
    border-radius: 12px;
    padding: 11px 6px;
}
.fap-food span { display: block; font-size: 22px; }
.fap-food b { display: block; font-size: 12px; margin: 4px 0 2px; }
.fap-food i { font-style: normal; font-size: 11px; color: var(--fap-muted); }
.fap-food-note {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--fap-muted);
}

/* ---------- 底部：口径说明表 ---------- */
.neo-note-table { width: 100%; border-collapse: collapse; }
.neo-note-table th,
.neo-note-table td {
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--fap-line) 70%, transparent);
    font-size: 13.5px;
    line-height: 1.75;
    vertical-align: top;
}
.neo-note-table th { width: 92px; font-weight: 800; color: var(--fap-rose); white-space: nowrap; }
.neo-note-table td { color: var(--fap-text); }
.neo-note-table td b { color: var(--fap-rose); }
.neo-usage { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.neo-usage li { font-size: 14px; line-height: 1.9; color: var(--fap-muted); }
.neo-usage li b { color: var(--fap-text); }

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
    .fap-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .fap-frow { grid-template-columns: 1fr; }
    .fap-food-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 打印：日历 + 产检节点 ---------- */
@media print {
    body * { visibility: hidden; }
    .fap-calendar, .fap-calendar *,
    .fap-checkpoint, .fap-checkpoint *,
    .fap-foodcard, .fap-foodcard * { visibility: visible; }
    .fap-calendar { position: absolute; inset: 0 auto auto 0; width: 100%; box-shadow: none; }
    .fap-checkpoint, .fap-foodcard { position: static; margin-top: 14px; box-shadow: none; }
    .fap-cal-check { display: none; }
}
