/* Existing calculator primitives live in _calc-base-css.ejs; additions are scoped. */
.wp { --wp-accent: #327580; --wp-line: #ddd; --wp-muted: #555; --wp-surface: #f9f7f4; }
.wp [hidden] { display: none !important; }
.wp .calc-wrapper { padding-bottom: 48px; }
.wp .calc-subtitle { margin-bottom: 16px; }
.wp a { color: var(--wp-accent); text-underline-offset: 3px; }
.wp .wp-intro { color: var(--wp-muted); font-size: 14px; margin-bottom: 24px; }
.wp fieldset { border: 0; min-width: 0; margin-bottom: 24px; }
.wp legend { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.wp h2 { font-size: 22px; line-height: 1.35; margin: 24px 0 12px; }
.wp h3 { font-size: 18px; line-height: 1.4; margin: 16px 0 8px; }
.wp p { margin-bottom: 12px; }
.wp .wp-help { color: var(--wp-muted); font-size: 13px; line-height: 1.55; margin: 6px 0 12px; }
.wp .wp-field { min-width: 0; }
.wp .wp-field-error { color: #a02d1b; font-size: 14px; margin-top: 6px; }
.wp .form-input[aria-invalid=true] { border-color: #a02d1b; }
.wp .form-label { margin-top: 12px; }
.wp .form-row2 .form-label { margin-top: 0; }
.wp .form-row2 { margin-top: 16px; }
.wp button, .wp summary, .wp select, .wp-check { cursor: pointer; }
.wp button { min-height: 44px; font: inherit; line-height: 1.4; }
.wp button:disabled { opacity: .55; cursor: default; }
.wp .wp-primary, .wp .wp-secondary { padding: 11px 16px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.wp .wp-primary { border: 1px solid var(--wp-accent); background: var(--wp-accent); color: #fff; }
.wp .wp-secondary { border: 1px solid var(--wp-line); background: #fff; color: #333; }
.wp .wp-primary:hover { background: #285d66; }
.wp .wp-secondary:hover { background: #f0eeea; }
.wp :is(button,input,select,summary,a,[tabindex]):focus-visible { outline: 3px solid var(--wp-accent); outline-offset: 3px; }
.wp .wp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0 10px; }
.wp .wp-example { margin-top: 0; }
.wp .wp-check { display: flex; gap: 10px; align-items: center; min-height: 44px; margin: 12px 0; line-height: 1.5; }
.wp input[type=checkbox] { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--wp-accent); }
.wp details { border-top: 1px solid var(--wp-line); padding: 12px 0; }
.wp summary { font-size: 16px; font-weight: 600; min-height: 44px; padding: 8px 0; }
.wp details[open] > summary { margin-bottom: 12px; }
.wp .wp-pal select { margin-bottom: 12px; }
.wp .wp-baseline { background: #fff; padding: 14px 16px; border-radius: 10px; margin-top: 16px; }
.wp .wp-notice { padding: 16px; border: 1px solid #c8a47f; border-radius: 10px; background: #fff9ef; margin: 16px 0; }
.wp .wp-error { border-color: #a02d1b; }
.wp .wp-notice ul { padding-left: 18px; }
.wp .wp-disclaimer { font-size: 14px; color: var(--wp-muted); }
.wp .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
.wp .stat-main .stat-value { color: var(--wp-accent); font-size: 34px; }
.wp .wp-chart { position: relative; height: 300px; margin: 24px 0 12px; }
.wp figcaption { font-size: 14px; color: var(--wp-muted); }
.wp .wp-explanation { margin: 24px 0; }
.wp .wp-data { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 16px; margin-bottom: 16px; font-size: 15px; }
.wp .wp-data dd { text-align: right; font-variant-numeric: tabular-nums; }
.wp .wp-table-wrap { overflow-x: auto; margin: 12px 0 20px; border: 1px solid var(--wp-line); border-radius: 10px; }
.wp table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.wp caption { text-align: left; padding: 12px; font-size: 13px; color: var(--wp-muted); }
.wp th, .wp td { padding: 10px 8px; text-align: right; border-top: 1px solid #eee; }
.wp th { font-size: 12px; font-weight: 600; line-height: 1.4; background: var(--wp-surface); }
.wp th:first-child, .wp td:first-child { text-align: left; }
.wp :is(th, td) small { display: block; color: var(--wp-muted); }
.wp .wp-results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.wp .wp-method { margin-top: 40px; border-top: 1px solid var(--wp-line); }
.wp .wp-method ul { padding-left: 22px; }
.wp code { overflow-wrap: anywhere; }
.wp .wp-zoya { margin-top: 24px; }
.wp .wp-print-only { display: none; }
@media (max-width: 600px) {
  .wp.container { padding: 0 16px; }
  .wp .calc-wrapper h1 { font-size: 24px; }
  .wp .calc-form, .wp .summary { padding: 20px 16px; }
  .wp .stat-main .stat-value { font-size: 28px; }
  .wp .form-row2 { grid-template-columns: 1fr; gap: 12px; }
  .wp .sex-toggle { gap: 8px; }
  .wp .sex-btn { padding: 12px 8px; font-size: 14px; }
  .wp .wp-chart { height: 260px; }
  .wp table { font-size: 12px; }
  .wp th, .wp td { padding: 8px 5px; }
}
@media (prefers-reduced-motion: reduce) { .wp *, .wp *::before, .wp *::after { transition: none !important; animation: none !important; } }
@media print {
  .zh-header, .zh-side-menu, .zh-side-overlay, .wp .calc-form, .wp .wp-actions, .wp .wp-intro, .wp .wp-results-head .wp-check, .wp .wp-zoya { display: none !important; }
  .wp.container { max-width: none; padding: 0; }
  .wp .calc-wrapper { padding: 0; }
  .wp .wp-table-wrap { overflow: visible; }
  .wp .wp-chart { height: 240px; }
  .wp .summary, .wp .wp-explanation { break-inside: avoid; }
  .wp th { background: #fff; }
  .wp a { color: inherit; }
  .wp .wp-method { font-size: 12px; }
}
