/* 内製と外注。style.css・flow.css・br.css の上に重ねる（接頭辞 ih-） */
.ih-h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.ih-tips { margin-top: 12px; }
.ih-box { padding: 12px 14px; min-width: 0; }
.ih-tbl { font-size: 12.5px; }
.ih-tbl th, .ih-tbl td { padding: 6px 8px; }
.ih-tbl tbody th { font-weight: 700; }
.ih-tnote { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.ih-nl { display: block; margin-top: 6px; font-weight: 700; }
.ih-nl a { color: #1d4ed8; text-decoration: none; }
.ih-nl a:hover { text-decoration: underline; }
.ih-a { color: #1d4ed8; text-underline-offset: 2px; }
.ih-a:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
#ihCase { margin-top: 12px; }

/* 3 つの比べ */
.ih-cmp { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 10px; align-items: stretch; }
.ih-cmptbl { min-width: 620px; }
.ih-cmptbl tbody th { min-width: 7.5em; }
.ih-cmpside { display: grid; min-width: 0; }

/* 練習 */
.ih-prac { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.ih-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ih-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--paper); min-width: 0; display: flex; flex-direction: column; }
.ih-item.ih-r-same { border-color: #86efac; background: #f7fef9; }
.ih-item.ih-r-also { border-color: #93c5fd; background: #f8fbff; }
.ih-item.ih-r-no { border-color: #fca5a5; background: #fffafa; }
.ih-ih { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.ih-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--line2); color: var(--ink2); font: 600 11.5px/22px var(--latin); text-align: center; }
.ih-what { margin: 6px 0 8px; font-size: 12.5px; color: var(--ink2); }
.ih-kbtns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.ih-kbtn { appearance: none; font: inherit; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line); background: var(--paper); color: var(--ink2); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.ih-kbtn:hover { border-color: #94a3b8; color: var(--ink); }
.ih-kbtn[aria-pressed="true"].ih-k-in { background: #15803d; border-color: #15803d; color: #fff; }
.ih-kbtn[aria-pressed="true"].ih-k-out { background: #b45309; border-color: #b45309; color: #fff; }
.ih-kbtn[aria-pressed="true"].ih-k-saas { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.ih-ans { margin-top: 8px; font-size: 12.5px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 7px 10px; }
.ih-ans p { margin: 0 0 4px; }
.ih-ans p:last-child { margin-bottom: 0; }
.ih-ans .br-go { margin: 4px 0 0; font-size: 12.5px; }
.ih-jl b { display: inline-block; font-size: 11.5px; border-radius: 6px; padding: 0 7px; margin-right: 6px; }
.ih-jl.ih-j-same b { background: #dcfce7; color: #14532d; }
.ih-jl.ih-j-also b { background: #dbeafe; color: #1e3a8a; }
.ih-jl.ih-j-no b { background: #fee2e2; color: #991b1b; }
.ih-jl.ih-j-none b { background: #e2e8f0; color: #334155; }
.ih-keep b { display: block; font-size: 11.5px; color: #15803d; }
.ih-side { display: grid; gap: 10px; min-width: 0; position: sticky; top: 12px; }
.ih-res { padding: 12px 14px; min-width: 0; }
.ih-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ih-bars { display: grid; gap: 6px; }
.ih-bar { display: grid; grid-template-columns: 3.6em minmax(0, 1fr) 2em; gap: 8px; align-items: center; font-size: 12.5px; }
.ih-bn { font-weight: 700; color: var(--ink2); }
.ih-bt { height: 12px; background: var(--line2); border-radius: 6px; overflow: hidden; }
.ih-bt i { display: block; height: 100%; border-radius: 6px; }
.ih-bt i.ih-k-in { background: #15803d; }
.ih-bt i.ih-k-out { background: #b45309; }
.ih-bt i.ih-k-saas { background: #1d4ed8; }
.ih-bv { font: 600 12.5px var(--latin); text-align: right; }
.ih-sc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.ih-sci { border-radius: 10px; padding: 6px 4px; text-align: center; background: var(--line2); }
.ih-sci b { display: block; font: 700 20px/1.2 var(--latin); }
.ih-sci span { font-size: 11px; font-weight: 700; color: var(--ink2); }
.ih-sci.ih-j-same b { color: #15803d; }
.ih-sci.ih-j-also b { color: #1d4ed8; }
.ih-sci.ih-j-no b { color: #b91c1c; }
.ih-lesson { margin: 10px 0 0; font-size: 13px; color: var(--ink2); }

/* 残す形 */
.ih-tpls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ih-tpl { padding: 12px 14px; min-width: 0; }
.ih-tplh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ih-tplh .ih-h4 { margin: 0; }
.ih-pre { margin: 0; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 10px 12px; font: 500 12px/1.6 var(--latin); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; }
.ih-plantbl { min-width: 1250px; }
.ih-plantbl td:nth-child(4) { min-width: 22em; }
.ih-plantbl td:nth-child(5) { min-width: 14em; }
.ih-powtbl { min-width: 1000px; }
.ih-powtbl td { min-width: 9em; }

.ih-kbtn:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .ih-prac, .ih-cmp { grid-template-columns: minmax(0, 1fr); }
  .ih-side { position: static; }
}
@media (max-width: 760px) {
  .ih-items { grid-template-columns: minmax(0, 1fr); }
  .ih-sc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
