/* IRR Organization Decider. Site palette only: ink, gold, the red warning card
   from Common Mistakes for flags. White cards, hairline borders, no tints. */
/* The tool's window, and the Part 2 window that leads to it, scroll inside themselves. The
   shared shell scrolls the dim backdrop instead, whose 40px padding let content show above
   the pinned title bar and below the pinned Back and Next (2026-09-22, "still really rough"). */
.modal[data-modal-id="m-irr-decider"],.modal[data-modal-id="m-bi-chooser"]{max-height:calc(100vh - 80px);max-height:calc(100dvh - 80px);overflow-y:auto;overscroll-behavior:contain}
.iod{font-size:.88rem;line-height:1.55;overflow-wrap:anywhere}   /* a pasted link or a long word wraps instead of pushing the window sideways */
.iod [hidden]{display:none!important}
.iod-promise{margin:0 0 12px;padding:8px 12px;border-left:3px solid var(--gold);background:var(--bg-soft);border-radius:0 8px 8px 0;font-size:.84rem;font-weight:700;max-width:68ch}
.iod-progress{margin:0 0 6px;font-size:.74rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#856800}
[data-theme="dark"] .iod-progress{color:var(--gold)}
.iod-bar{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin:0 0 14px}
.iod-bar span{height:4px;border-radius:2px;background:var(--line)}
.iod-bar span.is-on{background:var(--gold)}
.iod-step-h{margin:0 0 8px;font-size:1.05rem;line-height:1.35;color:var(--ink)}
.iod-step-h:focus,.iod-sub:focus{outline:none}
.iod-help{margin:0 0 10px;color:var(--ink-soft);max-width:68ch}
.iod-direction{margin:0 0 14px;padding:9px 12px;border:1px solid var(--gold);border-radius:8px;font-weight:700;max-width:68ch}
.iod-note{margin:8px 0 0;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-weight:700;max-width:68ch}
.iod-msg{font-size:.84rem;font-weight:800;align-self:center}
.iod-link{background:none;border:0;padding:0;font:inherit;font-size:.84rem;font-weight:700;color:var(--ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.iod-link:focus-visible,.iod-mv:focus-visible,.iod-opt-pick:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.iod-links{margin:10px 0 0;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.iod-dot{color:var(--ink-soft)}
.iod-field{display:block;margin:0 0 10px}
.iod-lab{display:block;font-size:.82rem;font-weight:800;margin-bottom:3px;color:var(--ink)}
.iod input[type=text],.iod textarea,.iod select{display:block;width:100%;font:inherit;font-size:.88rem;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink)}
.iod textarea{resize:vertical;min-height:52px}
/* A field that takes focus scrolls clear of the pinned Back and Next bar. */
.iod input,.iod textarea,.iod select,.iod button,.iod a{scroll-margin-bottom:76px}
/* Step 1 */
.iod-opts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.iod-opt{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--surface)}
.iod-opt{cursor:pointer}
.iod-opt:hover{border-color:var(--gold)}
.iod-opt.is-on{border:2px solid var(--gold);padding:11px 13px}
.iod-need{margin:0 0 12px;border-color:var(--gold);border-left:4px solid var(--gold)}
.iod-opt-pick{display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;margin:0 0 8px;padding:0;background:none;border:0;font:inherit;text-align:left;color:var(--ink);cursor:pointer}
.iod-opt-title{font-weight:800;font-size:1rem;line-height:1.3}
.iod-opt-state{font-size:.74rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:3px 8px;border-radius:999px;border:1px solid var(--line)}
.iod-opt.is-on .iod-opt-state{background:var(--gold);border-color:var(--gold);color:#1A1A1A}
.iod-opt-dl{margin:0}
.iod-opt-dl dt{margin:8px 0 1px;font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft)}
.iod-opt-dl dd{margin:0 0 3px;font-size:.84rem}
/* Step 2 */
.iod-bank{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;max-width:640px}
/* Step 3: a table on wide screens, one card per source on a phone. */
.iod-import{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:0 0 12px}
.iod-rows{display:flex;flex-direction:column;gap:8px;margin:0 0 10px}
.iod-row{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,2.2fr) minmax(0,1.2fr);gap:10px;align-items:start;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.iod-num{display:inline-flex;align-items:center;justify-content:center;justify-self:start;min-width:26px;height:26px;padding:0 6px;border-radius:999px;background:var(--gold);color:#1A1A1A;font-size:.78rem;font-weight:800;margin-top:6px}
.iod-row-ex .iod-num{background:var(--bg-soft);color:var(--ink-soft);border:1px solid var(--line);margin-top:0}
.iod-count{margin:0 0 10px;font-size:.84rem;font-weight:800;color:var(--ink)}
.iod input::placeholder,.iod textarea::placeholder{color:var(--ink-soft);opacity:.75}
.iod-row .iod-field{margin:0}
.iod-row-head{padding:0 12px;border:0;background:none;font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft)}
.iod-row:not(.iod-row-ex) .iod-lab{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.iod-row-ex{border-style:dashed;align-items:center}
.iod-cell-lab{display:none}
.iod-cell-val{display:block}
.iod-add{margin:0 0 4px}
@media (max-width:640px){
  .iod-opts{grid-template-columns:1fr}
  .iod-bank{grid-template-columns:1fr}
  .iod-row{grid-template-columns:1fr;gap:8px}
  .iod-num{margin-top:0}
  .iod-row-head{display:none}
  .iod-row:not(.iod-row-ex) .iod-lab{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}
  .iod-cell-lab{display:block;font-size:.78rem;font-weight:800;color:var(--ink-soft)}
}
/* Step 4 */
.iod-cats{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin:0 0 14px}
.iod-cat{border:1px solid var(--line);border-radius:10px;padding:10px 13px;background:var(--surface)}
.iod-cat.is-warn{border:1px solid var(--red);border-left:4px solid var(--red);background:var(--red-soft)}
.iod-cat.is-parked{border-style:dashed}
.iod-cat-h{margin:0 0 6px;font-size:.98rem;color:var(--ink)}
.iod-cat-list{margin:0;padding-left:18px}
.iod-cat-list li{margin:0 0 4px;font-size:.84rem}
.iod-warn-line,.iod-cat-note{margin:8px 0 0;font-size:.84rem;font-weight:700;color:var(--ink)}
.iod-checks{display:flex;flex-direction:column;gap:6px;margin:0 0 16px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.iod-status{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 10px;align-items:center}
.iod-yn{display:inline-block;min-width:4.6em;text-align:center;font-size:.74rem;font-weight:800;padding:3px 8px;border-radius:999px;border:1px solid var(--line)}
.iod-yn.is-yes{background:var(--gold);border-color:var(--gold);color:#1A1A1A}
.iod-status-t{font-weight:700}
.iod-check{cursor:pointer}
.iod-check input{width:16px;height:16px;vertical-align:-3px;accent-color:#1A1A1A}
.iod-status-help{grid-column:2;font-size:.8rem;color:var(--ink-soft)}
.iod-sub{margin:14px 0 8px;font-size:.98rem;color:var(--ink)}
.iod-dis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;max-width:640px}
.iod-dis-wide{grid-column:1 / -1}
@media (max-width:640px){.iod-dis{grid-template-columns:1fr}}
/* Step 5 */
.iod-verdict{margin:0 0 12px;padding:12px 14px;border:1px solid var(--red);border-left:4px solid var(--red);background:var(--red-soft);border-radius:10px}
.iod-verdict.is-yes{border:1px solid var(--gold);border-left:4px solid var(--gold);background:var(--surface)}
.iod-verdict-h{margin:0 0 4px;font-weight:800;font-size:1rem}
.iod-verdict-list{margin:4px 0 0;padding-left:18px}
.iod-verdict-list li{margin:0 0 3px}
.iod-choice{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}
/* A switch that would clear labels asks first. Gold rule, white card: a question, not a warning. */
.iod-ask{margin:0 0 12px;padding:12px 14px;border:1px solid var(--gold);border-left:4px solid var(--gold);border-radius:10px;background:var(--surface)}
.iod-ask-q{margin:0 0 10px;font-weight:800;max-width:68ch}
.iod-ask .iod-choice{margin:0}
.iod-sections{padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.iod-sections .iod-sub{margin-top:0}
/* Each item is a flex row, which drops the list's own numbers, so a counter draws them. */
.iod-order{margin:0 0 10px;padding-left:0;list-style:none;counter-reset:iodsec}
.iod-order-item{counter-increment:iodsec}
.iod-order-name::before{content:counter(iodsec) ". ";font-weight:800}
.iod-order-item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid var(--line)}
.iod-order-name{font-weight:800}
.iod-order-ctl{display:flex;gap:6px}
.iod-mv{font:inherit;font-size:.78rem;font-weight:700;padding:4px 10px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);cursor:pointer}
.iod-mv:disabled{opacity:.4;cursor:default}
.iod-copyrow{display:flex;gap:10px;align-items:center;margin:0 0 6px}
/* Nav */
/* Back and Next stay in reach at the bottom of the screen while a long step scrolls
   (a Chromebook shows about 650px of a window that is often 800px or more). */
.iod-nav{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:16px;padding:12px 0;border-top:1px solid var(--line);position:sticky;bottom:0;z-index:1;background:var(--surface)}
.iod-nav .btn:disabled{opacity:.5;cursor:default}
.iod-reset{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px}
.iod-reset-q{font-weight:700;font-size:.84rem}
/* iPhone Safari zooms the page when a field under 16px takes focus, and stays zoomed. */
@media (max-width:640px){.iod input[type=text],.iod textarea,.iod select{font-size:16px}}
