.inventory-wrap { width: min(64rem, 100% - 2.5rem); margin-inline: auto; }
.inventory-header { border-bottom: 1px solid var(--line); }
.inventory-header .inventory-wrap, .inventory-footer { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; padding-block: 1rem; }
.inventory-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 750; }
.inventory-brand img { border-radius: .25rem; }
.inventory-header a:last-child, .inventory-footer a { text-decoration: underline; text-underline-offset: .2em; }
.inventory-main { padding-block: clamp(2rem, 6vw, 4rem); }
.inventory-intro { max-width: 42rem; margin-bottom: 2rem; }
.inventory-intro h1 { font-size: clamp(2.65rem, 6vw, 4.6rem); margin: .35rem 0 .7rem; }
.inventory-intro > p:last-child { font-size: 1.1rem; }
.inventory-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.25rem; }
.inventory-exercise, .inventory-ledger { min-width: 0; border: 1px solid var(--line); padding: clamp(1rem, 3vw, 2rem); border-radius: .5rem; background: #fffdf8; }
.inventory-grid h2, .inventory-next h2 { font-size: 2rem; margin-bottom: .4rem; }
.inventory-steps { margin: 1rem 0; padding-left: 1.25rem; }
.inventory-case { background: #eef1e7; border-left: .2rem solid #5a7859; padding: .85rem 1rem; margin: 1rem 0; }
.inventory-exercise label { display: block; font-weight: 700; margin-bottom: .4rem; }
.inventory-input { display: flex; flex-wrap: wrap; gap: .7rem; }
.inventory-input input { width: 7rem; border: 1px solid #64746a; border-radius: .25rem; padding: .5rem .7rem; font: inherit; }
.inventory-exercise select { max-width: 100%; width: 100%; border: 1px solid #64746a; border-radius: .25rem; padding: .5rem .7rem; margin-bottom: 1rem; font: inherit; background: white; }
.inventory-input button, .inventory-reset { background: #1b3328; color: #fff; border: 1px solid #1b3328; border-radius: .25rem; padding: .5rem .85rem; font: inherit; }
#inventory-help { margin-top: .6rem; font-size: .9rem; }
.inventory-feedback { min-height: 1.5em; color: #264834; margin-top: .8rem; font-weight: 650; }
.inventory-feedback[data-outcome="retry"] { color: #6b2224; }
.inventory-balance { display: flex; align-items: baseline; gap: .5rem; margin: .75rem 0; }
.inventory-balance span:first-child { font-size: 3.5rem; line-height: 1; font-weight: 750; }
.inventory-state { display: inline-block; background: #e0ebdd; color: #183b27; padding: .25rem .75rem; border-radius: .3rem; font-weight: 650; }
.inventory-state[data-low="true"] { background: #f3e2bf; color: #553410; }
.inventory-ledger table { width: 100%; border-collapse: collapse; margin-top: 1.25rem; font-size: .94rem; }
.inventory-ledger caption { text-align: left; font-weight: 700; padding-bottom: .35rem; }
.inventory-ledger th, .inventory-ledger td { text-align: left; border-bottom: 1px solid #d9ded3; padding: .5rem .25rem; }
.inventory-next { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; margin-top: 1.25rem; padding: clamp(1rem, 3vw, 2rem); background: #e5ebdc; border-radius: .5rem; }
.inventory-next p { margin: 0; }
.inventory-next a { flex-shrink: 0; }
.inventory-footer { border-top: 1px solid var(--line); }
@media (max-width: 48rem) { .inventory-grid { grid-template-columns: 1fr; } .inventory-next { align-items: start; flex-direction: column; } }
