/* ============================================================
   4%ルールと取り崩しの方式（money/withdrawal-rule.html）だけの見た目
   共通は ../assets/css/ek.css（v2 層）と money.css。色は変数だけを使う
   ============================================================ */

/* タブ */
.wr-tabs { display: flex; gap: 6px; margin: 18px 0 14px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.wr-tabs button {
  appearance: none; border: 1px solid var(--line); border-bottom: 0; background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: 15px; font-weight: 700; padding: 10px 16px; border-radius: 8px 8px 0 0; cursor: pointer;
  margin-bottom: -2px; min-height: 44px;
}
.wr-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wr-tabs button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wr-tabs small { font-weight: 400; font-size: 12px; margin-left: 4px; }
@media (max-width: 420px) {
  .wr-tabs button { flex: 1 1 0; padding: 10px 8px; font-size: 14px; }
  .wr-tabs small { display: block; margin: 0; }
}
main form .wr-only[hidden] { display: none !important; }
.wr-group { margin: 6px 0 4px; padding-top: 10px; border-top: 1px dashed var(--line); }
.wr-group > .wr-gh { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px; }

/* 貼り付けの欄 */
html[data-ui="v2"] textarea.wr-paste {
  width: 100%; min-height: 130px; box-sizing: border-box; font-family: ui-monospace, Consolas, monospace; font-size: 13px;
  line-height: 1.5; padding: 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink);
  resize: vertical;
}
html[data-ui="v2"] textarea.wr-paste:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
html[data-ui="v2"] textarea.wr-paste.bad { border-color: var(--s2, #B4442C); border-width: 2px; }
.wr-file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.wr-file input[type="file"] { max-width: 100%; font-size: 13px; }
.wr-file button, .wr-switch button {
  font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); cursor: pointer; min-height: 36px;
}
.wr-file button:hover { border-color: var(--accent); }

/* 結果のすぐ上の注意 */
.wr-caution { margin: 0 0 12px; padding: 8px 12px; border-left: 4px solid var(--accent); background: var(--accent-soft); font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.6; }

/* 比較の表 */
.wr-cmp { margin-top: 18px; }
.wr-cmp h3, .wr-seq h3 { font-size: 15px; margin: 0 0 6px; }
table.wr-tbl { font-size: 13.5px; }
table.wr-tbl th[scope="row"] { text-align: left; white-space: nowrap; }
table.wr-tbl td .sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; white-space: normal; }
table.wr-tbl td.bad { color: var(--tint-warn-ink); font-weight: 700; }
.wr-key { display: inline-block; width: 18px; height: 0; border-top: 3px solid var(--accent); vertical-align: middle; margin-right: 6px; }
.wr-key.pct { border-top: 3px dashed var(--s2, #D97A2B); }
.wr-key.guard { border-top: 3px dotted var(--s4, #C99A00); }

/* グラフ */
.wr-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; }
.wr-switch button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.mo-chart .wr-l { fill: none; stroke-width: 2.5; }
.mo-chart .wr-l.fixed { stroke: var(--accent); }
.mo-chart .wr-l.pct { stroke: var(--s2, #D97A2B); stroke-dasharray: 7 4; }
.mo-chart .wr-l.guard { stroke: var(--s4, #C99A00); stroke-dasharray: 2 4; stroke-linecap: round; }
.mo-chart .wr-l.rev { stroke: var(--s2, #D97A2B); stroke-dasharray: 7 4; }
.mo-chart .wr-ref { stroke: color-mix(in srgb, var(--ink) 40%, var(--surface)); stroke-width: 1; stroke-dasharray: 4 3; }
.mo-chart .wr-ref-t { fill: var(--ink-2); font-size: 11px; }
.mo-legend i.pct { border-top: 2.5px dashed var(--s2, #D97A2B); }
.mo-legend i.guard { border-top: 3px dotted var(--s4, #C99A00); }

/* 順番のリスク */
.wr-seq { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.wr-seq p { font-size: 13.5px; line-height: 1.8; margin: 6px 0; }
