.structured-inputs { min-width:0; --si-line:#cbd5e1; }
.structured-inputs * { box-sizing:border-box; }
.structured-intro,.structured-message { font-size:.9rem; line-height:1.5; color:#42566b; }
.structured-inputs .form2 { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem; }
.structured-field { display:flex;flex-direction:column;gap:.3rem;min-width:0;margin-bottom:.8rem; }
.structured-field .f-label { font-weight:600;line-height:1.4; }
.structured-inputs input,.structured-inputs select { min-width:0;width:100%;max-width:100%;padding:.65rem;border:1px solid #9cabbc;border-radius:6px;font:inherit;background:white;color:#142d46; }
.structured-inputs input[aria-invalid=true] { outline:2px solid #b42318; }
.structured-omit { align-self:flex-start;background:none;border:0;padding:.2rem 0;font-size:.78rem;text-decoration:underline;color:#50667c;cursor:pointer; }
.structured-nested { padding:.65rem;border:1px solid var(--si-line);border-radius:8px;margin:.7rem 0;background:#fff; }
.structured-nested>summary { padding:.25rem 0;font-weight:650;cursor:pointer;overflow-wrap:anywhere; }
.structured-nested[open]>.structured-collection { margin-top:.75rem; }
.structured-row-tools { display:flex;gap:.5rem;flex-wrap:wrap;align-items:center; }
.structured-row-tools select { flex:1 1 140px; }
.structured-add { margin:.6rem 0;border-top:1px dashed var(--si-line);padding-top:.6rem; }
.structured-add>summary,.structured-custom>summary { cursor:pointer;color:#245681;font-size:.9rem; }
.structured-add>select,.structured-custom>input,.structured-custom>select { margin:.5rem 0; }
.structured-custom { margin:.6rem 0; }
.structured-save { display:none; }
.structured-message:empty { display:none; }
.app-guide { border:1px solid #bed1e2;border-radius:12px;background:#f4f8fc;padding:1rem 1.2rem;margin:1rem 0; }
.app-guide>summary { cursor:pointer;font-weight:650;color:#143b61; }
.app-guide ol { padding-left:1.2rem;line-height:1.65; }
@media(max-width:560px){.structured-inputs .form2 {grid-template-columns:minmax(0,1fr);}.structured-nested{padding:.55rem;}.structured-inputs .btn{max-width:100%;white-space:normal;}.app-guide{padding:.8rem;}}
/* p2-polish-fix: the Guide sits inside the single intro card on pages that have one */
.intro .app-guide { border:0;border-top:1px solid #dbe6f0;border-radius:0;background:none;padding:.6rem 0 0;margin:.6rem 0 0; }

/* simplify-1110: plain calculator surface + in-page "How to use" card */
#app details.app-guide,#app p.example-banner,#app .m-empty,#app .intro,#app > p.m-note,#app .m-left > p.units-note,#app .m-left > p.m-note,.structured-panel .structured-intro{display:none!important}
.howto-row{margin:.4rem 0 .9rem;position:relative}
.howto-btn{font-weight:600}
.howto-card{margin-top:.6rem;max-width:640px;background:#fff;border:1px solid #cbd5e1;border-left:4px solid #1d6fb8;border-radius:12px;padding:1rem 1.2rem;box-shadow:0 4px 14px rgba(3,35,69,.08);font-size:1rem;line-height:1.5;color:#1f2d3d}
.howto-card[hidden]{display:none}
.howto-head{display:flex;justify-content:space-between;align-items:center;gap:.8rem;margin-bottom:.4rem}
.howto-card h2{font-size:1.15rem;margin:0;outline:none}
.howto-card h3{font-size:1rem;margin:.9rem 0 .25rem}
.howto-card p{margin:0}
.howto-card ol,.howto-card ul{margin:.3rem 0 0;padding-left:1.4rem}
.howto-card li{margin:.2rem 0}
.howto-steps li{font-weight:500}

/* fit-1110: repeating-row tables fit inside the input card. Wide tables switch to stacked rows (form.js adds .stacked). */
.m-left .rows .tablewrap .rowtable{width:100%;min-width:0;table-layout:auto}
.m-left .rows .rowtable th{white-space:normal;vertical-align:bottom;color:#fff;line-height:1.2}
.m-left .rows .rowtable input,.m-left .rows .rowtable select{min-width:64px;width:100%;box-sizing:border-box}
.m-left .rows .rowtable td.rt-rm{width:1%;white-space:nowrap}
.m-left .rows .tablewrap.rows-stacked{overflow:visible;background:transparent;border-color:transparent;box-shadow:none}
.rowtable.stacked,.rowtable.stacked tbody{display:block;width:100%}
.rowtable.stacked tr:first-child{display:none}
.rowtable.stacked tr{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px 10px;padding:10px;margin:0 0 10px;border:1px solid var(--line,#d6e0ea);border-radius:10px;background:#fff}
.rowtable.stacked td{display:block;padding:0;border:0;text-align:left;white-space:normal;min-width:0}
.rowtable.stacked td::before{content:attr(data-label);display:block;font-size:.76rem;font-weight:600;color:var(--muted,#4a5b6e);margin:0 0 3px;line-height:1.2}
.m-left .rows .rowtable.stacked td.rt-rm{grid-column:1/-1;width:auto;text-align:right;white-space:nowrap}
.rowtable.stacked td.rt-rm::before{content:none}
.rowtable.stacked td.muted{grid-column:1/-1}
.rowtable.stacked input,.rowtable.stacked select{min-width:0;width:100%}
/* fit-1110: fit.js helpers */
.fit-span{grid-column:1/-1!important;flex-basis:100%!important;max-width:100%}
.fit-full{font-size:.8rem;line-height:1.3;color:var(--ink,#0b2540);background:#f3f7fb;border:1px solid var(--line,#d6e0ea);border-top:0;border-radius:0 0 8px 8px;padding:4px 8px;margin:-2px 0 2px;overflow-wrap:anywhere;white-space:normal}
.structured-add>select,.structured-custom>input,.structured-custom>select{display:block;width:100%;max-width:100%;box-sizing:border-box}
@media(max-width:560px){.structured-nested .structured-nested{padding:.4rem .3rem}.m-left details.structured-add,.m-left details.structured-custom{padding-left:0;padding-right:0}}
.m-left .rows .rowtable td.rt-rm .btn{white-space:nowrap;min-width:max-content}