/* One compact list and the same item editor for defaults and each lesson. */
.ifm-manager,.ifm-editor { display:grid; gap:14px; min-width:0; }
.ifm-list-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.ifm-list-heading > h4 { margin:0; color:var(--text); font-size:15px; line-height:1.6; }
.ifm-list-heading > span { flex:none; color:var(--muted); font-size:12px; }
.ifm-help { margin:0; color:var(--muted); font-size:12px; line-height:1.75; overflow-wrap:anywhere; }
.ifm-add-types { display:flex; flex-wrap:wrap; gap:8px; }
.ifm-add-types > button { display:flex; justify-content:center; align-items:center; gap:5px; min-width:0; min-height:44px; padding:10px 12px; border:1px solid var(--accent); border-radius:10px; color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,var(--surface)); font:inherit; font-size:12px; line-height:1.6; white-space:nowrap; cursor:pointer; }
.ifm-add-types svg { width:15px; height:15px; flex:none; }
.ifm-add-types button:disabled { opacity:.5; cursor:default; }
.ifm-list { display:grid; gap:10px; min-width:0; }
.ifm-row { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; min-height:76px; min-width:0; padding:12px 14px; border:1px solid var(--line); border-radius:13px; color:var(--text); background:var(--surface); font:inherit; text-align:left; cursor:pointer; }
.ifm-row-copy { display:grid; gap:4px; min-width:0; }
.ifm-row-copy > strong { color:var(--text); font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.ifm-row-copy > small,.ifm-summary { color:var(--muted); font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.ifm-row-end { display:flex; align-items:center; gap:4px; flex:none; color:var(--accent); font-size:12px; }
.ifm-row-end svg { width:15px; height:15px; }
.ifm-warning { color:var(--accent); font-size:11px; line-height:1.6; }
.ifm-empty { margin:0; padding:16px; border:1px dashed var(--line); border-radius:12px; color:var(--muted); font-size:12px; line-height:1.7; }
.ifm-reuse { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; min-height:44px; padding:10px 0; border:0; background:transparent; color:var(--accent); font:inherit; font-size:12px; text-align:left; cursor:pointer; }
.ifm-reuse svg { width:16px; height:16px; flex:none; }
.ifm-fieldset { min-width:0; margin:0; padding:0; border:0; }
.ifm-fieldset > legend { padding:0; margin-bottom:9px; color:var(--text); font-size:13px; line-height:1.6; }
.ifm-fieldset > .ifm-help { margin-top:8px; }
.ifm-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; min-width:0; }
.ifm-choices > button { position:relative; min-width:0; min-height:44px; padding:10px 24px 10px 8px; border:1px solid var(--line); border-radius:10px; color:var(--text); background:var(--surface); font:inherit; font-size:12px; line-height:1.6; cursor:pointer; overflow-wrap:anywhere; }
.ifm-choices > [aria-pressed=true] { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 8%,var(--surface)); color:var(--accent); }
.ifm-choices > [aria-pressed=true]::after { content:'✓'; position:absolute; right:8px; top:50%; transform:translateY(-50%); }
.ifm-choices > button:disabled { opacity:1; cursor:default; }
.ifm-amount-field,.ifm-name-field { margin:0; }
.ifm-money-input { display:block; position:relative; min-width:0; }
.ifm-money-input > input { min-height:52px; padding-right:38px; font-size:18px; font-variant-numeric:tabular-nums; }
.ifm-money-input > span { position:absolute; top:50%; right:14px; transform:translateY(-50%); color:var(--muted); font-size:13px; pointer-events:none; }
.ifm-rate { min-width:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.ifm-rate-toggle { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; min-height:48px; padding:12px; border:0; background:var(--surface); color:var(--text); font:inherit; font-size:13px; line-height:1.6; text-align:left; cursor:pointer; }
.ifm-rate-toggle > span:first-child { min-width:0; overflow-wrap:anywhere; }
.ifm-rate-toggle small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.ifm-rate-toggle > span:last-child,.ifm-type-toggle > span { display:flex; align-items:center; gap:4px; flex:none; color:var(--accent); font-size:12px; }
.ifm-rate-toggle svg,.ifm-type-toggle svg { width:14px; height:14px; flex:none; }
.ifm-rate-toggle[aria-expanded=true] svg,.ifm-type-toggle[aria-expanded=true] svg { transform:rotate(90deg); }
.ifm-rate-fields { display:grid; gap:14px; min-width:0; padding:0 12px 12px; }
.ifm-rate-fields legend { font-size:12px; }
.ifm-included { margin:0; padding:12px 14px; border-radius:12px; background:color-mix(in srgb,var(--accent) 7%,var(--surface)); color:var(--accent); font-size:13px; line-height:1.7; }
.ifm-preview { display:grid; gap:5px; min-width:0; padding:12px 14px; border-radius:12px; background:color-mix(in srgb,var(--accent) 6%,var(--surface)); }
.ifm-preview > small { color:var(--muted); font-size:11px; line-height:1.6; }
.ifm-preview > strong { color:var(--text); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.ifm-preview > p { margin:0; color:var(--muted); font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.ifm-name { min-width:0; }
.ifm-name > summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; padding:10px 0; color:var(--accent); font-size:12px; line-height:1.6; list-style:none; cursor:pointer; }
.ifm-name > summary::after { content:'⌄'; }
.ifm-name[open] > summary::after { content:'⌃'; }
.ifm-name > summary::-webkit-details-marker { display:none; }
.ifm-type { display:grid; gap:8px; min-width:0; border-top:1px solid var(--line); }
.ifm-type-toggle { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; min-height:44px; padding:10px 0; border:0; background:transparent; color:var(--muted); font:inherit; font-size:12px; line-height:1.6; text-align:left; cursor:pointer; }
.ifm-issue { margin:12px 0 0; color:var(--accent); font-size:12px; line-height:1.75; overflow-wrap:anywhere; }
.ifm-issue:empty { display:none; }
:is(.ifm-manager,.ifm-editor) button:focus-visible,.ifm-name > summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@media(max-width:359px) { .ifm-add-types { gap:6px; } .ifm-add-types > button { padding-inline:9px; } .ifm-row { padding:12px; gap:8px; } .ifm-row-copy > strong { font-size:13px; } .ifm-choices { gap:6px; } .ifm-preview { padding:12px; } }

@media(min-width:600px) { .ifm-add-types > button { padding-inline:8px; } }
