/* 投資判断レポート（RevoDecisionReport）の紙面。見本の帳票（sample-papers.css）と同じ紺の色づかい。画面と印刷の両方で使う */
.dr-wrap { max-width: 820px; margin: 0 auto; }
.dr-paper { box-sizing: border-box; width: 100%; padding: 28px 30px 24px; border: 1px solid #a8b6c7; background: #fff; color: #25374a; font-family: "REVO Sans JP", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif; font-size: 14px; line-height: 1.7; letter-spacing: .01em; overflow-wrap: anywhere; --dr-navy: #172d48; --dr-teal: #176861; --dr-rust: #8a3c32; --dr-ochre: #76591e; }
.dr-header { margin: 0 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--dr-navy); }
.dr-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 14px; color: #4d5f73; font-size: 11px; letter-spacing: .08em; }
.dr-title { margin: 8px 0 4px; font-family: "REVO Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 26px; font-weight: 600; line-height: 1.4; color: var(--dr-navy); }
.dr-sub { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.dr-name { margin: 0; color: #4d5f73; font-size: 12.5px; }
.dr-outline { margin: 0 0 18px; }
.dr-outline h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 6px; padding: 0 0 4px; border-bottom: 1px solid #415b78; color: var(--dr-navy); font-size: 13.5px; font-weight: 700; }
.dr-outline h3 small { color: #4d5f73; font-size: 10.5px; font-weight: 400; }
.dr-outline dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid #8193a8; border-right: 0; border-bottom: 0; }
.dr-outline dl > div { display: grid; grid-template-columns: 124px minmax(0, 1fr); min-width: 0; border-right: 1px solid #8193a8; border-bottom: 1px solid #8193a8; }
.dr-outline dt { padding: 6px 8px; background: #e9eef5; color: var(--dr-navy); font-size: 11px; font-weight: 700; line-height: 1.5; }
.dr-outline dd { margin: 0; padding: 6px 9px; font-size: 12.5px; line-height: 1.55; }
.dr-section { margin: 18px 0 0; }
.dr-section h3 { display: flex; align-items: baseline; gap: 9px; margin: 0 0 10px; padding: 0 0 6px; border-bottom: 1px solid #415b78; color: var(--dr-navy); font-size: 16px; font-weight: 700; }
.dr-section h3 > span:first-child { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; min-height: 22px; border: 1px solid var(--dr-navy); font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.dr-section h4 { margin: 14px 0 6px; color: var(--dr-navy); font-size: 13.5px; }
.dr-section p { margin: 6px 0 10px; }
.dr-verdict { margin: 0 0 10px; padding: 10px 14px; border-left: 5px solid var(--dr-teal); background: #eef5f3; font-size: 17px; font-weight: 700; line-height: 1.6; color: var(--dr-navy); }
.dr-verdict[data-level="conditional"], .dr-verdict[data-level="even"] { border-color: var(--dr-ochre); background: #faf4e6; }
.dr-verdict[data-level="stop"], .dr-verdict[data-level="sell"] { border-color: var(--dr-rust); background: #fbf1ef; }
.dr-advice { margin: 0 0 8px; padding-left: 22px; }
.dr-advice li { margin: 5px 0; line-height: 1.75; }
.dr-table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
.dr-table { width: 100%; margin: 8px 0; border-collapse: collapse; border: 1px solid #8193a8; font-size: 13px; font-variant-numeric: tabular-nums; }
.dr-table th, .dr-table td { padding: 7px 9px; border: 1px solid #b8c4d1; vertical-align: top; text-align: left; }
.dr-table thead th { background: var(--dr-navy); color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.dr-table tbody th { background: #f1f4f8; color: var(--dr-navy); font-weight: 600; }
.dr-table small { display: block; color: #4d5f73; font-size: 11px; font-weight: 400; }
.dr-table strong { color: var(--dr-navy); }
.dr-compare td { white-space: nowrap; }
.dr-best, .dr-big, .dr-whatif { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 3px; background: var(--dr-navy); color: #fff; font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.dr-big { background: var(--dr-ochre); }
.dr-whatif { background: #fff; color: #4d5f73; border: 1px solid #8193a8; }
.dr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.dr-kpi { padding: 10px 12px; border: 1px solid #b8c4d1; background: #f8fafc; }
.dr-kpi-label { display: block; color: #4d5f73; font-size: 11.5px; }
.dr-kpi strong { display: block; margin: 2px 0; font-size: 19px; color: var(--dr-navy); font-variant-numeric: tabular-nums; }
.dr-kpi small { display: block; color: #4d5f73; font-size: 11px; line-height: 1.5; }
.dr-note, .dr-warning { padding: 8px 12px; margin: 8px 0; border: 1px solid #bdc8d5; background: #f6f8fb; color: #3d5169; font-size: 12px; line-height: 1.7; }
.dr-warning { border-color: #c3a099; background: #fbf5f3; color: #79372f; }
.dr-limits, .dr-assumed { margin: 4px 0 8px; padding-left: 22px; font-size: 13.5px; line-height: 1.75; }
.dr-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; margin: 0; font-size: 12.5px; }
.dr-inputs > div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dotted #b8c4d1; }
.dr-inputs dt { color: #4d5f73; }
.dr-inputs dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.dr-muted { color: #8a949f; }
.dr-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; margin-top: 22px; padding-top: 8px; border-top: 1px solid #415b78; color: #4d5f73; font-size: 11px; }
.dr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* 図 */
.dr-chart { display: block; width: 100%; height: auto; max-width: 640px; margin: 6px 0; }
.dr-chart .dr-bar-pos { fill: #2f6b8f; }
.dr-chart .dr-bar-neg { fill: #b5564a; }
.dr-chart .dr-bar-big { fill: #b58a2e; }
.dr-chart .dr-bar-range { fill: #d7e0ea; }
.dr-chart .dr-axis { stroke: #415b78; stroke-width: 1; }
.dr-chart .dr-zero { stroke: #8c8c8c; stroke-width: 1; stroke-dasharray: 3 3; }
.dr-chart .dr-mark { stroke: #4d5f73; stroke-width: 1; stroke-dasharray: 2 2; }
.dr-chart .dr-mark-mid { stroke: #172d48; stroke-width: 2; }
.dr-chart .dr-tick { fill: #4d5f73; font-size: 10.5px; }
.dr-chart .dr-val { fill: #25374a; font-size: 10.5px; font-weight: 600; }
.dr-chart .dr-label { fill: #25374a; font-size: 11px; }
.dr-range { display: block; width: 100%; max-width: 300px; height: 24px; }
.dr-range .dr-range-line { stroke: #9fb3c8; stroke-width: 6; stroke-linecap: round; }
.dr-range .dr-range-mid { fill: #172d48; }
.dr-range .dr-zero { stroke: #8c8c8c; stroke-width: 1; stroke-dasharray: 3 3; }
.dr-paper .ai-card { margin: 12px 0 0; }
/* 月次レポート */
.mr-form textarea { box-sizing: border-box; width: 100%; min-height: 72px; padding: 8px 10px; border: 1px solid #cfc4c8; border-radius: 8px; font: inherit; font-size: 16px; }
.mr-form .dec-grid + .dec-grid { margin-top: 10px; }
.dr-table td.mr-up { color: #2f5d43; }
.dr-table td.mr-down { color: #8a3c32; }
.dr-chart .mr-forecast { stroke: #172d48; stroke-width: 2; }
.mr-paper .dr-table th, .mr-paper .dr-table td { white-space: nowrap; }
.mr-paper .dr-table td.mr-wrap, .mr-paper .dr-table .dr-limits { white-space: normal; }
.mr-paper .dr-table td small { white-space: normal; }
.dec-report-link { display: flex; flex-wrap: wrap; gap: 8px; }
/* 改修工事レポート */
.rr-urg { display: inline-block; padding: 1px 8px; border-radius: 3px; background: #8193a8; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.rr-urg.rr-high { background: var(--dr-rust); }
.rr-urg.rr-mid { background: var(--dr-ochre); }
.rr-urg.rr-low { background: var(--dr-teal); }
.rr-bar { display: block; width: 150px; height: 14px; margin-top: 4px; }
.rr-bar .rr-bar-track { stroke: #d7e0ea; stroke-width: 4; }
.rr-bar .rr-bar-range { stroke: #2f6b8f; stroke-width: 6; stroke-linecap: round; }
.rr-bar .rr-bar-mid { fill: #172d48; }
.rr-works td:nth-child(4), .rr-works td:nth-child(2), .rr-works td:nth-child(3) { white-space: nowrap; }
.rr-works th[scope="row"] small { display: block; color: #4d5f73; font-size: 11px; font-weight: 400; }
.rr-inspect td, .rr-inspect th[scope="row"] { font-size: 12.5px; }
.rr-inspect td:nth-child(3) { white-space: nowrap; }
.rr-works th[scope="row"] { min-width: 170px; }
.rr-gantt .rr-gantt-bar { fill: #2f6b8f; }
.rr-gantt .rr-gantt-mark { fill: #b58a2e; }
.rr-path { stroke-width: 2.5; fill: none; }
.rr-path-0 { stroke: #b5564a; }
.rr-path-1 { stroke: #2f6b8f; }
.rr-path-2 { stroke: #176861; }
.rr-path-dot { fill: #172d48; }
.rr-path-dot.rr-path-0 { fill: #b5564a; }
.rr-path-dot.rr-path-1 { fill: #2f6b8f; }
.rr-path-dot.rr-path-2 { fill: #176861; }
.rr-path-band { stroke: #8193a8; stroke-width: 2; }
.rr-inspect th[scope="row"] { min-width: 84px; }
.rr-paper .dr-compare th[scope="row"] { min-width: 200px; white-space: normal; }
@media (max-width: 600px) {
  .dr-paper { padding: 18px 14px; font-size: 14px; }
  .dr-title { font-size: 22px; }
  .dr-outline dl { grid-template-columns: minmax(0, 1fr); }
  .dr-outline dl > div { grid-template-columns: 112px minmax(0, 1fr); }
  .dr-inputs { grid-template-columns: 1fr; }
}
@media print {
  .dr-wrap { max-width: none; }
  .dr-paper { border: 0; padding: 0; font-size: 11.5px; }
  .dr-section { break-inside: auto; }
  .dr-section h3, .dr-outline h3 { break-after: avoid; }
  .dr-table, .dr-chart, .dr-kpis, .dr-outline dl, .dr-verdict { break-inside: avoid; }
  .dr-section.dr-page { break-before: page; }
  .dr-paper .ai-card .ai-actions, .dr-paper .ai-qa { display: none !important; }
  .dr-table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Local review fix: fit comparison tables within printable A4 width. */
@media print {
 .rr-paper .dr-table-wrap { overflow:visible; }
 .rr-paper .dr-table { width:100%; table-layout:fixed; }
 .rr-paper .dr-table th, .rr-paper .dr-table td { min-width:0 !important; white-space:normal !important; overflow-wrap:anywhere; }
}

@media print { .rr-paper .rr-bar { max-width:100%; height:auto; } }
