/* HG-0108 step 36: chart of accounts page. Loads after tools.css. */
html body .hs-coa { display: grid; gap: 1rem; }

/* Search and filters (same look as the glossary tools panel). */
html body .hs-coa-tools { display: grid; gap: .875rem; padding: 1.125rem; background: #f7f5fa; border: 1px solid #e3deea; border-radius: 12px; }
html body .hs-coa-search { position: relative; display: block; margin: 0; }
html body .hs-coa-search svg { position: absolute; inset-inline-start: 1rem; inset-block-start: 50%; transform: translateY(-50%); color: #6b6378; pointer-events: none; }
html body .hs-coa-search input { inline-size: 100%; font: inherit; font-size: 1rem; padding: .8125rem 1rem .8125rem 2.75rem; border: 1px solid #cfc6dc; border-radius: 10px; background: #fff; color: #20182b; }
html body .hs-coa-search input:focus { outline: 2px solid #351b62; outline-offset: 0; border-color: #351b62; }
html body .hs-coa-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
html body .hs-coa-chip { appearance: none; font: inherit; font-size: .875rem; font-weight: 600; padding: .4375rem .875rem; border-radius: 999px; border: 1px solid #d9d1e4; background: #fff; color: #351b62; cursor: pointer; line-height: 1.3; }
html body .hs-coa-chip b { display: inline-grid; place-items: center; min-inline-size: 1.25rem; block-size: 1.25rem; margin-inline-end: .125rem; border-radius: 6px; background: #f4c84a; color: #351b62; font-size: .75rem; }
html body .hs-coa-chip:hover { border-color: #351b62; }
html body .hs-coa-chip[aria-pressed="true"] { background: #351b62; border-color: #351b62; color: #fff; }
html body .hs-coa-chip:focus-visible { outline: 2px solid #f4c84a; outline-offset: 2px; }
html body .hs-coa-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; }
html body .hs-coa-extra { align-items: center; }
html body .hs-coa-extra input { margin-block-start: 0; }
html body .hs-coa-count { margin: 0; font-size: .875rem; color: #6b6378; }

/* Legend. */
html body .hs-coa-legend { border: 1px solid #e3deea; border-radius: 12px; background: #fff; }
html body .hs-coa-legend summary, html body .hs-coa-source summary { padding: .75rem 1.125rem; font-weight: 600; font-size: .9375rem; color: #351b62; cursor: pointer; }
html body .hs-coa-legend summary:focus-visible, html body .hs-coa-source summary:focus-visible { outline: 2px solid #f4c84a; outline-offset: 2px; border-radius: 8px; }
html body .hs-coa-legend ul { display: grid; gap: .5rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); margin: 0; padding: 0 1.125rem 1rem; list-style: none; font-size: .875rem; color: #4a4257; }
html body .hs-coa-legend li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: .625rem; }
html body .hs-coa-legend li > span { justify-self: start; }

/* Badges. Colours follow the trainer: active (asset) blue, passive (liability) amber. */
html body .hs-coa-ap, html body .hs-coa-tag { display: inline-block; padding: .125rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
html body .hs-coa-ap.is-a { background: #e6f0fa; color: #1d4f7a; }
html body .hs-coa-ap.is-p { background: #fdf0dc; color: #8a4b08; }
html body .hs-coa-ap.is-ap { background: #ece7f3; color: #351b62; }
html body .hs-coa-tag.is-contra { background: #fbeaea; color: #8a2f2f; }
html body .hs-coa-tag.is-extra { background: #fff; color: #6b6378; border: 1px dashed #cfc6dc; padding-block: calc(.125rem - 1px); }

/* Classes. */
html body .hs-coa-list { display: grid; gap: 1.75rem; margin-block-start: .5rem; }
html body .hs-coa-class { scroll-margin-top: 8rem; }
html body .hs-coa-class[hidden], html body .hs-coa-group[hidden], html body .hs-coa-items li[hidden] { display: none; }
html body .hs-coa-class-h { display: flex; align-items: center; gap: .875rem; margin: 0 0 .875rem; font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); line-height: 1.3; color: #351b62; }
html body .hs-coa-digit { flex: none; display: inline-grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem; border-radius: 10px; background: #f4c84a; color: #351b62; font-size: 1.5rem; line-height: 1; }
html body .hs-coa-class-name { display: grid; gap: .125rem; min-inline-size: 0; }
html body .hs-coa-class-name small { font-size: .8125rem; font-weight: 500; font-style: italic; color: #6b6378; }
html body .hs-coa-class-code { margin-inline-start: auto; padding-inline-start: .75rem; font-size: .875rem; font-weight: 600; color: #8a8296; font-variant-numeric: tabular-nums; }

/* Groups: a card with the group row as its header. */
html body .hs-coa-group { margin-block-end: .875rem; border: 1px solid #e3deea; border-radius: 12px; background: #fff; overflow: hidden; }
html body .hs-coa-items { margin: 0; padding: 0; list-style: none; }
html body .hs-coa-items li { margin: 0; border-block-start: 1px solid #efebf4; }

/* A row: code | names | badges. */
html body .hs-coa-row { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; align-items: start; gap: .25rem 1rem; padding: .625rem 1.125rem; scroll-margin-top: 8rem; transition: background-color .3s ease; }
html body .hs-coa-row.is-group { background: #f7f5fa; padding-block: .75rem; }
html body .hs-coa-row.is-extra { padding-inline-start: 2.125rem; grid-template-columns: 3rem minmax(0, 1fr) auto; }
html body .hs-coa-row.is-target { background: #fff4d6; box-shadow: inset 3px 0 0 #f4c84a; }
html body .hs-coa-code { align-self: start; padding-block-start: .0625rem; font-weight: 700; font-size: .9375rem; color: #351b62; text-decoration: none; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
html body .hs-coa-row.is-extra .hs-coa-code { font-weight: 600; color: #6b6378; }
html body .hs-coa-code:hover { text-decoration: underline; text-underline-offset: 3px; }
html body .hs-coa-code:focus-visible, html body .hs-coa-note a:focus-visible { outline: 2px solid #f4c84a; outline-offset: 2px; border-radius: 4px; }
html body .hs-coa-names { display: grid; gap: .0625rem; min-inline-size: 0; }
html body .hs-coa-name { margin: 0; font-size: .9375rem; font-weight: 500; line-height: 1.45; color: #20182b; overflow-wrap: anywhere; }
html body .hs-coa-row.is-group .hs-coa-name { font-size: 1rem; font-weight: 700; color: #351b62; }
html body .hs-coa-alt { font-size: .8125rem; line-height: 1.4; font-style: italic; color: #6b6378; overflow-wrap: anywhere; }
html body .hs-coa-note { font-size: .8125rem; line-height: 1.4; color: #4a4257; }
html body .hs-coa-note a { color: #351b62; font-weight: 600; text-underline-offset: 2px; }
html body .hs-coa-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .375rem; padding-block-start: .0625rem; }
html body .hs-coa mark { background: #fff1b8; color: inherit; border-radius: 2px; padding: 0; }

html body .hs-coa-empty { padding: 1.25rem; text-align: center; border: 1px dashed #cfc6dc; border-radius: 12px; color: #4a4257; }
html body .hs-coa-empty p { margin: 0 0 .5rem; max-inline-size: none; }

/* Learn, source. */
html body .hs-coa-learn { margin-block-start: 1.75rem; padding: clamp(1.25rem, 1rem + 1vw, 2rem); border: 1px solid #e3deea; border-radius: 12px; background: #fff; }
html body .hs-coa-learn h2 { margin: 0 0 .5rem; font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem); color: #351b62; }
html body .hs-coa-learn h3 { margin: 0 0 .375rem; font-size: 1.0625rem; color: #351b62; }
html body .hs-coa-learn p { margin: 0; max-inline-size: 60rem; color: #4a4257; font-size: .9375rem; line-height: 1.65; }
html body .hs-coa-learn > p { margin-block-end: 1.25rem; }
html body .hs-coa-learn-grid { display: grid; gap: 1.25rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
html body .hs-coa-practice { margin-block-start: 1.25rem !important; }
html body .hs-coa-source { margin-block-start: 1.5rem; padding: 1.125rem 1.25rem; border-radius: 12px; background: #f7f5fa; font-size: .875rem; color: #4a4257; }
html body .hs-coa-source h2 { margin: 0 0 .375rem; font-size: 1rem; color: #351b62; }
html body .hs-coa-source p { margin: 0; max-inline-size: none; line-height: 1.6; }
html body .hs-coa-source a { color: #351b62; font-weight: 600; text-underline-offset: 2px; }
html body .hs-coa-source details { margin-block-start: .5rem; }
html body .hs-coa-source summary { padding: .25rem 0; font-size: .875rem; }
html body .hs-coa-source ul { margin: .25rem 0 0; padding-inline-start: 1.25rem; line-height: 1.6; }

@media (max-width: 47.99em) {
	html body .hs-coa-tools { padding: .875rem; }
	html body .hs-coa-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -.875rem; padding-inline: .875rem; -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
	html body .hs-coa-chips::-webkit-scrollbar { display: none; }
	html body .hs-coa-chips::after { content: ""; flex: 0 0 1.5rem; }
	html body .hs-coa-chip { flex: none; white-space: nowrap; font-size: .8125rem; padding: .375rem .75rem; }
	html body .hs-coa-bar .hs-coa-xlsx { inline-size: 100%; }
	html body .hs-coa-class-code { display: none; }
	html body .hs-coa-row, html body .hs-coa-row.is-extra { grid-template-columns: 3.25rem minmax(0, 1fr); padding-inline: .875rem; column-gap: .75rem; }
	html body .hs-coa-row.is-extra { padding-inline-start: 1.5rem; grid-template-columns: 2.75rem minmax(0, 1fr); }
	html body .hs-coa-tags { grid-column: 2; justify-content: flex-start; padding-block-start: .25rem; }
	html body .hs-calc-note .hs-button { inline-size: 100%; justify-content: center; text-align: center; }
}

@media print {
	html body .hs-coa-tools, html body .hs-coa-legend, html body .hs-coa-learn, html body .hs-calc-note, html body .hs-coa-practice { display: none; }
	html body .hs-coa-group { break-inside: avoid; }
}
