/* HG-0108 step 34: journal entry trainer. Loaded after assets/tools.css. */
html body .hs-trainer { --tr-asset: #2563a8; --tr-liability: #b45309; --tr-equity: #351b62; --tr-income: #1f7a4d; --tr-expense: #b42318; }
html body .hs-trainer .is-asset, html body .hs-trainer .is-contra, html body .hs-tr-ghost.is-asset, html body .hs-tr-ghost.is-contra { --c: var(--tr-asset); }
html body .hs-trainer .is-liability, html body .hs-tr-ghost.is-liability { --c: var(--tr-liability); }
html body .hs-trainer .is-equity, html body .hs-tr-ghost.is-equity { --c: var(--tr-equity); }
html body .hs-trainer .is-income, html body .hs-tr-ghost.is-income { --c: var(--tr-income); }
html body .hs-trainer .is-expense, html body .hs-tr-ghost.is-expense { --c: var(--tr-expense); }
html body .hs-tr-ghost { --tr-asset: #2563a8; --tr-liability: #b45309; --tr-equity: #351b62; --tr-income: #1f7a4d; --tr-expense: #b42318; }

html body .hs-tr { gap: 1.75rem; }
html body .hs-tr-intro { display: grid; gap: .75rem; }
html body .hs-tr-intro p { margin: 0; max-inline-size: 60rem; color: #4a4257; font-size: .9375rem; line-height: 1.6; }
html body .hs-tr-codes { font-size: .875rem; color: #4a4257; justify-self: start; }
html body .hs-tr-codes-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
html body .hs-tr-coa-link { font-size: .875rem; font-weight: 600; color: #351b62; text-underline-offset: 3px; }
html body .hs-tr-coa-link:hover { color: #20182b; }
html body .hs-tr-coa-link:focus-visible { outline: 2px solid #f4c84a; outline-offset: 2px; border-radius: 4px; }
html body .hs-trainer:not(.show-codes) .hs-tr-code, html body .hs-trainer:not(.show-codes) .hs-tr-codecol { display: none; }
html body .hs-tr-h { margin: 0 0 .75rem; font-size: 1.125rem; line-height: 1.35; color: #351b62; }
html body .hs-tr-h3 { margin: 1.25rem 0 .625rem; font-size: 1rem; color: #351b62; }

/* Work area */
html body .hs-tr-work { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
html body .hs-tr-main { display: grid; gap: 1rem; align-content: start; min-inline-size: 0; }
@media (min-width: 64em) {
	html body .hs-tr-work { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
}

/* Task card */
html body .hs-tr-task { display: grid; gap: .75rem; }
html body .hs-tr-progress { display: grid; gap: .5rem; }
html body .hs-tr-progress p { margin: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; font-size: .8125rem; font-weight: 600; color: #6b6378; max-inline-size: none; }
html body .hs-tr-progress-bar { block-size: 6px; border-radius: 999px; background: #ece7f3; overflow: hidden; }
html body .hs-tr-progress-bar span { display: block; block-size: 100%; inline-size: 0; background: #351b62; border-radius: inherit; transition: width .3s ease; }
html body .hs-tr-op { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem .875rem; padding: 1rem 1.125rem; border-radius: 12px; background: #f7f5fa; border: 1px solid #e3deea; }
html body .hs-tr-op[hidden] { display: none; }
html body .hs-tr-op-n { grid-row: 1 / span 2; display: inline-grid; place-items: center; min-inline-size: 2.5rem; block-size: 2.5rem; padding-inline: .375rem; border-radius: 10px; background: #351b62; color: #fff; font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; }
html body .hs-tr-op-text { margin: 0; font-size: 1.0625rem; line-height: 1.5; font-weight: 600; color: #20182b; max-inline-size: none; }
html body .hs-tr-op-amt { margin: 0; font-size: .875rem; color: #4a4257; max-inline-size: none; }
html body .hs-tr-op-amt b { color: #351b62; font-variant-numeric: tabular-nums; }

/* Drop zones */
html body .hs-tr-zones { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }
html body .hs-tr-zones[hidden] { display: none; }
html body .hs-tr-zone { display: grid; align-content: start; gap: .5rem; min-block-size: 8.5rem; padding: .75rem; border: 2px dashed #cfc6dc; border-radius: 12px; background: #fcfbfd; transition: border-color .15s, background-color .15s; min-inline-size: 0; }
html body .hs-tr-zone-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .5rem; font-weight: 700; color: #351b62; }
html body .hs-tr-zone-abbr { font-weight: 600; color: #6b6378; font-size: .8125rem; }
html body .hs-tr-zone-head output { font-variant-numeric: tabular-nums; color: #20182b; }
html body .hs-tr-zone-list { display: grid; gap: .5rem; }
html body .hs-tr-zone-ph { margin: 0; align-self: center; text-align: center; font-size: .8125rem; color: #8a7fa0; max-inline-size: none; }
html body .hs-tr-zone:not(.is-empty) .hs-tr-zone-ph { display: none; }
html body .hs-tr-ph-tap { display: none; }
@media (pointer: coarse) {
	html body .hs-tr-ph-drag { display: none; }
	html body .hs-tr-ph-tap { display: inline; }
}
html body .hs-trainer.is-dragging .hs-tr-zone, html body .hs-trainer.is-choosing .hs-tr-zone { border-color: #8a7fa0; }
html body .hs-trainer.is-choosing .hs-tr-zone { cursor: pointer; background: #f7f5fa; }
html body .hs-tr-zone.is-over { border-color: #351b62; border-style: solid; background: #efedff; }
html body .hs-trainer.is-dragging, html body .hs-trainer.is-dragging * { cursor: grabbing !important; }

/* Account chips */
html body .hs-tr-chip { --c: #8a7fa0; display: inline-flex; align-items: center; gap: .375rem; min-block-size: 2.5rem; margin: 0; padding: .375rem .75rem; border: 1px solid #e3deea; border-inline-start: 4px solid var(--c); border-radius: 8px; background: #fff; color: #20182b; font: inherit; font-size: .875rem; font-weight: 600; line-height: 1.3; text-align: start; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; transition: background-color .12s, opacity .12s, box-shadow .12s; }
html body .hs-tr-chip:hover { background: #f7f5fa; }
html body .hs-tr-chip:focus-visible { outline: 2px solid #f4c84a; outline-offset: 2px; }
html body .hs-tr-chip.is-contra { border-inline-start-style: dashed; }
html body .hs-tr-chip.is-selected, html body .hs-tr-chip.is-selected:hover { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 4px 12px rgba(32, 24, 43, .18); }
html body .hs-tr-chip.is-selected .hs-tr-code, html body .hs-tr-chip.is-selected .hs-tr-tag { background: rgba(255, 255, 255, .2); color: #fff; }
html body .hs-tr-palette .hs-tr-chip.is-placed { background: #f7f5fa; border-color: #cfc6dc; border-inline-start-color: var(--c); color: #4a4257; }
html body .hs-tr-side { flex: none; padding: .0625rem .375rem; border-radius: 4px; background: #351b62; color: #fff; font-size: .6875rem; font-weight: 700; }
html body .hs-tr-palette .hs-tr-chip:disabled { cursor: default; opacity: .45; }
html body .hs-tr-palette .hs-tr-chip:disabled:hover { background: #fff; }
html body .hs-tr-code { flex: none; padding: .0625rem .375rem; border-radius: 4px; background: #f0edf5; color: #4a4257; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
html body .hs-tr-tag { flex: none; padding: .0625rem .375rem; border-radius: 4px; background: #e7f1fb; color: #1d4f86; font-size: .6875rem; font-weight: 700; }
html body .hs-tr-name { min-inline-size: 0; overflow-wrap: break-word; }

/* Chip inside a zone */
html body .hs-tr-chip.is-in { display: flex; flex-wrap: nowrap; inline-size: 100%; padding-inline-end: .25rem; cursor: grab; }
html body .hs-trainer[data-mode="free"] .hs-tr-chip.is-in { flex-wrap: wrap; }
html body .hs-trainer[data-mode="free"] .hs-tr-chip.is-in .hs-tr-chip-label { flex-basis: 100%; }
html body .hs-trainer.is-locked .hs-tr-chip.is-in { cursor: default; padding-inline-end: .75rem; }
html body .hs-tr-chip-label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem .375rem; flex: 1 1 0; min-inline-size: 0; }
html body .hs-tr-chip-amt { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: #351b62; }
html body .hs-tr-chip.is-bad { border-color: #b42318; background: #fdeceb; box-shadow: 0 0 0 1px #b42318 inset; }
html body .hs-tr-amt { flex: 1 1 0; inline-size: 4rem; min-inline-size: 0; min-block-size: 2.25rem; margin: 0; padding: .375rem .5rem; border: 1px solid #cfc6dc; border-radius: 6px; font: inherit; font-size: .9375rem; font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; color: #20182b; background: #fff; }
html body .hs-tr-amt:focus { outline: 2px solid #351b62; outline-offset: 0; border-color: #351b62; }
html body .hs-tr-amt.is-invalid { border-color: #b42318; background: #fdeceb; }
html body .hs-tr-x { flex: none; display: inline-grid; place-items: center; inline-size: 2rem; block-size: 2rem; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #6b6378; cursor: pointer; }
html body .hs-tr-x:hover { background: #ece7f3; color: #b42318; }
html body .hs-tr-x:focus-visible { outline: 2px solid #f4c84a; outline-offset: 1px; }

/* Ghost while dragging */
html body .hs-tr-ghost { position: fixed; z-index: 1000; pointer-events: none; margin: 0; box-shadow: 0 10px 24px rgba(32, 24, 43, .25); transform: rotate(-2deg); max-inline-size: 18rem; }

/* Actions + feedback */
html body .hs-tr-actions .hs-tool-link { margin-inline-start: auto; }
html body .hs-tr-feedback:empty { display: none; }
html body .hs-tr-fb { display: grid; gap: .5rem; padding: .875rem 1rem; border-radius: 10px; border-inline-start: 4px solid; font-size: .9375rem; line-height: 1.55; }
html body .hs-tr-fb.is-ok, html body .hs-tr-fb.is-done { background: #e5f4ec; border-color: #1f7a4d; }
html body .hs-tr-fb.is-bad { background: #fdeceb; border-color: #b42318; }
html body .hs-tr-fb.is-shown { background: #fff3d1; border-color: #d9a21b; }
html body .hs-tr-fb-title { margin: 0; font-weight: 700; color: #20182b; max-inline-size: none; }
html body .hs-tr-fb.is-ok .hs-tr-fb-title, html body .hs-tr-fb.is-done .hs-tr-fb-title { color: #17603c; }
html body .hs-tr-fb.is-bad .hs-tr-fb-title { color: #9a1d14; }
html body .hs-tr-fb-list { margin: 0; padding-inline-start: 1.125rem; display: grid; gap: .25rem; color: #20182b; }
html body .hs-tr-why { padding: .625rem .75rem; border-radius: 8px; background: rgba(255, 255, 255, .7); }
html body .hs-tr-why p { margin: 0; color: #20182b; max-inline-size: none; }
html body .hs-tr-why-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6b6378 !important; margin-block-end: .125rem !important; }

/* Palette */
html body .hs-tr-palette { min-inline-size: 0; }
html body .hs-tr-groups { display: grid; gap: 1rem; }
html body .hs-tr-group h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #4a4257; }
html body .hs-tr-group h3::before { content: ""; inline-size: .625rem; block-size: .625rem; border-radius: 3px; background: var(--c); }
html body .hs-tr-chips { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Results */
html body .hs-tr-results { display: grid; gap: 2rem; padding-block-start: 1.5rem; border-block-start: 1px solid #e3deea; min-inline-size: 0; }
html body .hs-tr-block { min-inline-size: 0; }
html body .hs-tr-block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; }
html body .hs-tr-block-head .hs-tool-link { padding-block: 0; margin-block-end: .75rem; }
html body .hs-tool-link.is-armed { color: #b42318; }
html body .hs-tr-journal { min-inline-size: 40rem; }
html body .hs-tr-journal td { vertical-align: top; }
html body .hs-tr-journal .hs-tr-desc { white-space: normal; min-inline-size: 14rem; max-inline-size: 26rem; color: #4a4257; font-size: .875rem; line-height: 1.45; }
html body .hs-tr-journal .hs-tr-n { font-weight: 700; color: #351b62; }
html body .hs-tr-journal tbody tr:nth-child(even) td { background: #fff; }
html body .hs-tr-journal tbody tr:not(.is-first) td { border-block-start: 0; }
html body .hs-tr-journal tbody tr.is-first td { border-block-start: 1px solid #e3deea; }
html body .hs-tr-journal tbody td { border-block-end: 0; }
html body .hs-tr-journal tbody tr:hover td { background: #fff; }
html body .hs-tr-acc .hs-tr-code { margin-inline-end: .375rem; }
html body .hs-tr-acc.is-cr { padding-inline-start: 2.25rem; }
html body .hs-tr-del-col { inline-size: 2.5rem; text-align: center !important; padding-inline: .25rem !important; }
html body .hs-tr-journal th:first-child, html body .hs-tr-journal td:first-child { position: static; }
html body .hs-tr-journal tbody td:first-child, html body .hs-tr-journal tbody tr:nth-child(even) td:first-child { background: #fff; font-weight: inherit; }
html body .hs-tr-journal tbody td.hs-tr-n { font-weight: 700; }
html body .hs-tr-journal thead th:not(.is-num), html body .hs-tr-tb thead th:not(.is-num) { text-align: start; }

/* T-accounts */
html body .hs-tr-tgrid { display: grid; align-items: start; gap: .875rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); }
html body .hs-tr-t { --c: #8a7fa0; display: grid; align-content: start; padding: .75rem .875rem .625rem; border: 1px solid #e3deea; border-block-start: 4px solid var(--c); border-radius: 10px; background: #fff; min-inline-size: 0; }
html body .hs-tr-t.is-fresh { animation: hs-tr-flash 1.6s ease-out; }
@keyframes hs-tr-flash { 0%, 30% { box-shadow: 0 0 0 3px #f4c84a; } 100% { box-shadow: 0 0 0 0 rgba(244, 200, 74, 0); } }
@media (prefers-reduced-motion: reduce) { html body .hs-tr-t.is-fresh { animation: none; box-shadow: 0 0 0 2px #f4c84a; } html body .hs-tr-progress-bar span { transition: none; } }
html body .hs-tr-t-title { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .375rem; margin: 0 0 .5rem; padding-block-end: .5rem; border-block-end: 2px solid #20182b; font-size: .9375rem; line-height: 1.35; color: #20182b; text-align: center; justify-content: center; }
html body .hs-tr-t-body { display: grid; grid-template-columns: 1fr 1fr; min-block-size: 2rem; }
html body .hs-tr-t-col { display: grid; align-content: start; gap: .125rem; padding: 0 .5rem; min-inline-size: 0; }
html body .hs-tr-t-col.is-dr { border-inline-end: 2px solid #20182b; padding-inline-start: 0; }
html body .hs-tr-t-col.is-cr { padding-inline-end: 0; }
html body .hs-tr-t-side { margin: 0 0 .125rem; font-size: .6875rem; font-weight: 700; color: #8a7fa0; text-transform: uppercase; max-inline-size: none; }
html body .hs-tr-t-col.is-cr .hs-tr-t-side { text-align: end; }
html body .hs-tr-t-row { display: flex; justify-content: space-between; gap: .375rem; margin: 0; font-size: .875rem; font-variant-numeric: tabular-nums; max-inline-size: none; }
html body .hs-tr-t-ref { color: #8a7fa0; font-size: .75rem; }
html body .hs-tr-t-ref::before { content: "("; }
html body .hs-tr-t-ref::after { content: ")"; }
html body .hs-tr-t-v { color: #20182b; }
html body .hs-tr-t-foot { display: grid; grid-template-columns: 1fr 1fr; margin-block-start: .375rem; padding-block-start: .375rem; border-block-start: 1px solid #cfc6dc; font-size: .8125rem; font-weight: 700; color: #4a4257; font-variant-numeric: tabular-nums; }
html body .hs-tr-t-foot span:first-child { padding-inline-end: .5rem; text-align: end; }
html body .hs-tr-t-foot span:last-child { padding-inline-start: .5rem; text-align: end; }
html body .hs-tr-t-bal { display: flex; justify-content: space-between; gap: .5rem; margin: .375rem 0 0; padding: .375rem .5rem; border-radius: 6px; background: #f7f5fa; font-size: .8125rem; color: #4a4257; max-inline-size: none; }
html body .hs-tr-t-bal b { color: #351b62; font-variant-numeric: tabular-nums; }

/* Trial balance + equation */
html body .hs-tr-tb { min-inline-size: 28rem; }
html body .hs-tr-tb tbody td.hs-tr-acc { font-weight: 600; }
html body .hs-tr-tb tbody td:first-child { box-shadow: inset 3px 0 0 var(--c, transparent); }
html body .hs-tr-tb .hs-tr-codecol { inline-size: 4.5rem; color: #6b6378; font-variant-numeric: tabular-nums; }
html body .hs-tr-status { display: inline-flex; align-items: center; gap: .5rem; margin: .75rem 0 0; padding: .5rem .875rem; border-radius: 999px; font-size: .875rem; font-weight: 700; max-inline-size: none; }
html body .hs-tr-status.is-ok { background: #e5f4ec; color: #17603c; }
html body .hs-tr-status.is-ok::before { content: "✓"; }
html body .hs-tr-status.is-bad { background: #fdeceb; color: #9a1d14; }
html body .hs-tr-eq { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; }
html body .hs-tr-eq-box { --c: #8a7fa0; display: grid; gap: .125rem; flex: 1 1 8rem; padding: .625rem .875rem; border: 1px solid #e3deea; border-block-start: 3px solid var(--c); border-radius: 10px; background: #fff; min-inline-size: 0; }
html body .hs-tr-eq-box span { font-size: .75rem; font-weight: 700; color: #6b6378; }
html body .hs-tr-eq-box b { font-size: 1.25rem; color: #20182b; font-variant-numeric: tabular-nums; }
html body .hs-tr-eq-op { align-self: center; font-size: 1.25rem; font-weight: 700; color: #351b62; }
html body .hs-tr-result { margin: .75rem 0 .25rem; font-weight: 700; max-inline-size: none; }
html body .hs-tr-result.is-profit { color: #17603c; }
html body .hs-tr-result.is-loss { color: #9a1d14; }

/* Choose-a-side bar (tap and keyboard) */
html body .hs-tr-bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 999; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .625rem 1rem; padding: .875rem 1rem calc(.875rem + env(safe-area-inset-bottom, 0px)); background: #20182b; color: #fff; box-shadow: 0 -6px 20px rgba(32, 24, 43, .25); }
html body .hs-tr-bar[hidden] { display: none; }
html body .hs-tr-bar p { margin: 0; flex: 0 1 auto; font-size: .9375rem; font-weight: 600; color: #fff; max-inline-size: none; text-align: center; }
html body .hs-tr-bar-btns { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
html body .hs-tr-bar .hs-button--primary { background: #f4c84a; color: #20182b; }
html body .hs-tr-bar .hs-button--primary:hover { background: #ffd866; }
html body .hs-tr-bar .hs-tool-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
html body .hs-tr-bar .hs-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html body .hs-tr-toast { position: fixed; inset-inline: 1rem; inset-block-end: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 998; margin: 0 auto; max-inline-size: 26rem; padding: .75rem 1rem; border-radius: 10px; background: #20182b; color: #fff; font-size: .9375rem; font-weight: 600; text-align: center; box-shadow: 0 8px 24px rgba(32, 24, 43, .3); }
html body .hs-tr-toast[hidden] { display: none; }
html body .hs-tr-sr { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Learn section */
html body .hs-tr-learn { margin-block-start: 1.5rem; padding: clamp(1.25rem, 1rem + 1vw, 2rem); border: 1px solid #e3deea; border-radius: 12px; background: #fff; }
html body .hs-tr-learn h2 { margin: 0 0 .5rem; font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem); color: #351b62; }
html body .hs-tr-learn h3 { margin: 0 0 .375rem; font-size: 1.0625rem; color: #351b62; }
html body .hs-tr-learn p { margin: 0; max-inline-size: 60rem; color: #4a4257; font-size: .9375rem; line-height: 1.65; }
html body .hs-tr-rules { margin-block: 1rem 1.5rem; max-inline-size: 44rem; }
html body .hs-tr-rules .hs-tool-table { min-inline-size: 26rem; }
html body .hs-tr-rules tbody th { font-weight: 600; color: #20182b; background: #fff; text-align: start; white-space: normal; }
html body .hs-tr-learn-grid { display: grid; gap: 1.25rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }

@media (max-width: 35.99em) {
	html body .hs-tr-zones { gap: .5rem; }
	html body .hs-tr-zone { padding: .5rem; min-block-size: 7rem; }
	html body .hs-tr-op { padding: .875rem; gap: .25rem .625rem; }
	html body .hs-tr-op-n { min-inline-size: 2.25rem; block-size: 2.25rem; }
	html body .hs-tr-op-text { font-size: 1rem; }
	html body .hs-tr-chip { font-size: .8125rem; padding: .375rem .625rem; }
	html body .hs-tr-chip.is-in { padding-inline-start: .5rem; }
	html body .hs-tr-actions .hs-button { inline-size: 100%; justify-content: center; }
	html body .hs-tr-actions .hs-tool-link { margin-inline: auto; }
	html body .hs-tr-eq-op { flex: 0 0 auto; }
	html body .hs-tr-eq-box { flex-basis: 40%; }
	html body .hs-tr-bar-btns { inline-size: 100%; }
	html body .hs-tr-bar-btns .hs-button { flex: 1 1 0; justify-content: center; padding-inline: .5rem; }
}
html body .hs-trainer:not(.show-codes) .hs-tr-tb tbody td.hs-tr-acc { box-shadow: inset 3px 0 0 var(--c, transparent); }
html body .hs-tr-chip.is-in .hs-tr-name { overflow-wrap: anywhere; }
@media (max-width: 35.99em) {
	html body .hs-tr-chip.is-in { gap: .25rem; }
	html body .hs-tr-chip.is-in .hs-tr-x { inline-size: 1.75rem; block-size: 1.75rem; }
}
