/* Company ratio lookup (includes/CompanyLookup.php, assets/js/company-lookup.js).
   Builds on the statement analyzer's report styles (analyzer.css). 1rem = 10px on this site. */

/* The search box and its suggestions. */
.frg-cl__form { display: grid; gap: 1rem; padding: 2.4rem; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); }
html body .frg-cl__label { color: var(--ink); font-family: var(--font-display); font-size: 2rem; line-height: 1.3; font-weight: 600; }
.frg-cl__row { display: flex; flex-wrap: wrap; gap: 1rem; }
.frg-cl__combo { position: relative; flex: 1 1 28rem; min-width: 0; }
.frg-cl__input { width: 100%; box-sizing: border-box; min-height: 4.8rem; padding: 0.6rem 1.2rem; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); font: inherit; font-size: 1.8rem; }
.frg-cl__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.frg-cl__row .fr-btn { min-height: 4.8rem; }
html body .frg-cl__options { position: absolute; z-index: 20; top: calc(100% + 0.4rem); left: 0; right: 0; max-height: 36rem; overflow-y: auto; margin: 0; padding: 0.4rem 0; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--paper); box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); list-style: none; }
.frg-cl__options[hidden] { display: none; }
html body .frg-cl__options li { display: flex; align-items: baseline; gap: 1rem; margin: 0; padding: 0.8rem 1.2rem; border: 0; background: none; color: var(--ink); font-size: 1.5rem; line-height: 1.4; cursor: pointer; }
html body .frg-cl__options li::before { content: none; }
.frg-cl__options li strong { flex: none; min-width: 6rem; font-variant-numeric: tabular-nums; }
.frg-cl__options li span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frg-cl__exchange { flex: none; color: var(--ink-muted); font-size: 1.3rem; }
html body .frg-cl__options li[aria-selected="true"], html body .frg-cl__options li:hover { background: var(--surface-muted, #eef5f0); }
.frg-cl__help, .frg-cl__try { color: var(--ink-muted); font-size: 1.45rem; line-height: 1.5; }
.frg-cl__status:empty { display: none; }
.frg-cl__status { color: var(--ink-muted); font-size: 1.45rem; }

/* The report. */
.frg-cl__report { display: grid; gap: 2.8rem; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.frg-cl__report[hidden] { display: none; }
.frg-cl__report[aria-busy="true"] { opacity: 0.55; }
.frg-cl__body { display: grid; gap: 2.8rem; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.frg-cl__head { display: grid; gap: 0.6rem; }
html body .frg-cl__head h2 { margin: 0; }
.frg-cl__head h2:focus { outline: none; }
.frg-cl__meta { color: var(--ink-muted); font-size: 1.5rem; line-height: 1.5; }
.frg-cl__others { font-size: 1.45rem; }
.frg-cl__error { padding: 2rem 2.4rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-s); background: var(--paper); }
.frg-cl__error p + p { margin-top: 0.8rem; }

.frg-cl__filings { padding: 2rem 2.4rem; border-radius: var(--radius-s); background: var(--ledger, var(--surface-muted)); }
html body .frg-cl__filings ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr)); gap: 0.4rem 2.4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
html body .frg-cl__filings li { margin: 0; padding: 0.4rem 0; border: 0; border-bottom: 1px solid var(--ledger-rule, var(--line)); background: none; font-size: 1.45rem; line-height: 1.5; }
html body .frg-cl__filings li::before { content: none; }
.frg-cl__filings li a { font-weight: 600; }
.frg-cl__filings li span { color: var(--ink-muted); }
.frg-cl__filings p { font-size: 1.45rem; }
.frg-cl__tools { justify-content: flex-start; }

/* Year-by-year tables: the first column stays in view while the rest scroll. The scroll box holds
   the visually hidden reasons in dash cells, which otherwise widen the page on phones. */
.frg-cl .frg-an__scroll { position: relative; }
.frg-cl .frg-cl__table th, .frg-cl .frg-cl__table td { padding-left: 0.8rem; padding-right: 0.8rem; }
.frg-cl .frg-cl__table thead th.frg-cl__year, .frg-cl .frg-cl__table thead th.frg-cl__num { text-align: right; white-space: nowrap; }
.frg-cl .frg-cl__table thead th.frg-cl__year span { display: block; color: var(--ink-muted); font-size: 1.2rem; font-weight: 400; }
.frg-cl .frg-cl__table tbody th[scope="row"], .frg-cl .frg-cl__table thead th:first-child { position: sticky; left: 0; z-index: 1; min-width: 14rem; background: var(--paper); }
.frg-cl .frg-cl__table tbody th[scope="row"] { font-size: 1.45rem; }
.frg-cl .frg-cl__table tr.frg-cl__group th { padding-top: 1.6rem; color: var(--ink-muted); font-size: 1.2rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.frg-cl__none { color: var(--ink-muted); }
.frg-cl__pos { flex-direction: column; align-items: flex-start; gap: 0.6rem; font-size: 1.3rem; white-space: normal; }
.frg-cl .frg-cl__table td:last-child { min-width: 13rem; }
.frg-cl .frg-cl__table td:last-child .frg-an__muted { display: block; font-size: 1.3rem; line-height: 1.4; }
.frg-cl__dupont > p + p { margin-top: -0.4rem; }

/* Scores: each year's result with the band it falls in, then the bands and each score's parts. */
.frg-cl__scores { display: grid; gap: 1.2rem; grid-template-columns: minmax(0, 1fr); }
html body .frg-cl__scores > * { margin: 0; }
.frg-cl__scores > p { max-width: 76ch; }
.frg-cl .frg-cl__table td.frg-cl__score { vertical-align: top; }
.frg-cl__zone { display: block; min-width: 8rem; color: var(--ink-muted); font-size: 1.25rem; line-height: 1.4; white-space: normal; }
.frg-cl__nowrap { white-space: nowrap; }
.frg-cl .frg-cl__table td.frg-cl__na { color: var(--ink-muted); font-size: 1.4rem; }
html body .frg-cl__zones { display: grid; gap: 0.4rem; margin: 0; padding-left: 2rem; color: var(--ink-muted); font-size: 1.4rem; line-height: 1.5; }
html body .frg-cl__zones li { margin: 0; }
.frg-cl__parts { font-size: 1.4rem; }
.frg-cl__parts summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.frg-cl__parts > .frg-an__scroll { margin-top: 1rem; }

.frg-cl__concepts { margin-top: 1.2rem; font-size: 1.4rem; }
.frg-cl__concepts summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.frg-cl__concepts dl { display: grid; gap: 0.6rem; margin: 1.2rem 0 0; }
.frg-cl__concepts dl > div { display: grid; grid-template-columns: minmax(12rem, 22rem) minmax(0, 1fr); gap: 1.2rem; }
.frg-cl__concepts dt { color: var(--ink); }
.frg-cl__concepts dd { margin: 0; color: var(--ink-muted); font-family: var(--font-mono, ui-monospace, monospace); font-size: 1.3rem; overflow-wrap: anywhere; }
.frg-cl__method { display: grid; gap: 1rem; max-width: 76ch; }

@media (max-width: 640px) {
	.frg-cl__form, .frg-cl__filings, .frg-cl__error { padding: 1.6rem; }
	.frg-cl__row .fr-btn { flex: 1 1 100%; }
	.frg-cl .frg-cl__table tbody th[scope="row"], .frg-cl .frg-cl__table thead th:first-child { min-width: 11rem; max-width: 13rem; }
	.frg-cl__concepts dl > div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
}

/* The figures table: even year columns. */
.frg-cl .frg-cl__figures .frg-cl__table thead th:first-child { width: 28%; }
.frg-cl .frg-cl__figures .frg-cl__table thead th.frg-cl__year { width: 14.4%; }
