/* Industry benchmarks (includes/Benchmarks.php): range rows, the by-industry table and the
   calculator's comparison line. Ledger tokens throughout; 1rem = 10px on this site. */

.frg-bench { display: grid; gap: 1.6rem; margin: 0 0 2.4rem; }
.frg-bench p { margin: 0; }
.frg-bench__note { color: var(--ink-muted); font-size: 1.45rem; line-height: 1.6; }

/* Range rows: the band is the middle half of companies, the mark is the median. */
.frg-bench__figure { margin: 0.8rem 0 0; padding: 1.6rem 0 0; border-top: 1px solid var(--ink); box-shadow: inset 0 3px 0 var(--surface), inset 0 4px 0 var(--ink); }
.frg-bench__cap { margin: 0 0 1.2rem; text-align: left; color: var(--ink-muted); font-family: var(--font-sans); font-size: 1.2rem; line-height: 1.6rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
html body .frg-bench__rows { display: grid; gap: 1.2rem; margin: 0; padding: 0; list-style: none; }
html body .frg-bench__rows > li { margin: 0; padding: 0; }
.frg-bench__row { display: grid; grid-template-columns: minmax(0, 17em) minmax(0, 1fr) 9.5em; gap: 0.6rem 1.6rem; align-items: center; font-size: 1.5rem; line-height: 2rem; }
.frg-bench__name { min-width: 0; }
.frg-bench__n { display: block; color: var(--ink-muted); font-size: 1.3rem; line-height: 1.8rem; }
.frg-bench__vals { text-align: right; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.frg-bench__vals span { color: var(--ink-muted); font-size: 1.3rem; }
.frg-bench__row.is-total .frg-bench__name { font-weight: 600; }
.frg-bench__gap { height: 0; border-top: 1px dashed var(--line-strong); }

.frg-bench__track { position: relative; display: block; height: 1.2rem; border-radius: 3px; background: var(--ledger, var(--surface-muted)); }
.frg-bench__band { position: absolute; top: 0; bottom: 0; left: var(--lo); width: calc(var(--hi) - var(--lo)); min-width: 2px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 45%, transparent); }
.frg-bench__mid { position: absolute; top: -0.3rem; bottom: -0.3rem; left: var(--at); width: 3px; margin-left: -1.5px; border-radius: 1px; background: var(--ink); }
.frg-bench__row.is-total .frg-bench__band { background: var(--accent); }

@media (max-width: 640px) {
	.frg-bench__row { grid-template-columns: minmax(0, 1fr) auto; }
	.frg-bench__track { grid-column: 1 / -1; grid-row: 2; }
}

/* The by-industry table. */
.frg-bench__scroll { max-width: 100%; overflow-x: auto; }
.frg-bench__scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html body .frg-bench .frg-bench__table { display: table; width: 100%; margin: 0; }
.frg-bench .frg-bench__table thead th { padding-top: 0.6rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--ink); font-size: 1.3rem; line-height: 1.8rem; font-weight: 600; color: var(--ink-muted); vertical-align: bottom; }
.frg-bench .frg-bench__table thead th:not(:first-child),
.frg-bench .frg-bench__table td { text-align: right; }
.frg-bench .frg-bench__table td { width: auto; }
.frg-bench .frg-bench__table thead th:first-child { width: 36%; }
.frg-bench__sub { display: block; font-size: 1.15rem; line-height: 1.5rem; font-weight: 400; }
.frg-bench .frg-bench__table th[scope="row"] { font-weight: 400; }
.frg-bench__table thead button { padding: 0.4rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
.frg-bench__table thead button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.frg-bench__table th[aria-sort="ascending"] button::after { content: " \2191"; }
.frg-bench__table th[aria-sort="descending"] button::after { content: " \2193"; }
.frg-bench__table th[aria-sort="ascending"],
.frg-bench__table th[aria-sort="descending"] { color: var(--ink); }
.frg-bench .frg-bench__table .frg-bench__chart-col { width: 26%; min-width: 12rem; vertical-align: middle; }
.frg-bench__all th, .frg-bench__all td { font-weight: 600; }
@media (max-width: 720px) {
	.frg-bench .frg-bench__table .frg-bench__chart-col { display: none; }
	.frg-bench .frg-bench__table th, .frg-bench .frg-bench__table td { padding-left: 0.6rem; padding-right: 0.6rem; font-size: 1.4rem; }
	.frg-bench .frg-bench__table thead th { white-space: normal; }
}
.frg-bench__trend { margin: 0 0 2.4rem; }
html body .frg-bench__method li, .frg-bench__method code { overflow-wrap: anywhere; }
.frg-bench__method code { font-size: 0.9em; }

/* The calculator's comparison line, under the result. */
.frg-bench-line { display: grid; gap: 1rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.frg-bench-line[hidden] { display: none; }
.frg-bench-line__text { margin: 0; font-size: 1.6rem; line-height: 1.55; max-width: 46ch; }
.frg-bench-line__text strong { font-variant-numeric: lining-nums tabular-nums; }
.frg-bench-line__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; color: var(--ink-muted); font-size: 1.4rem; }
.frg-bench-line__tools select { min-width: 0; max-width: 100%; min-height: 4rem; padding: 0.4rem 0.8rem; border: 1px solid var(--line-strong); border-radius: 0.6rem; background: var(--paper); color: var(--ink); font: inherit; font-size: 1.5rem; }
.frg-bench-line__tools a { color: var(--accent-strong); }
.frg-bench__all .frg-bench__band { background: var(--accent); }
html body .frg-bench-line__tools label { color: var(--ink-muted); font-size: 1.4rem; }
.frg-bench__zero { position: absolute; top: -0.4rem; bottom: -0.4rem; left: var(--at); width: 1px; background: var(--ink-muted); }

/* "In a real 10-K" (includes/Filings.php). */
.frg-filing { display: grid; gap: 1.6rem; margin: 0 0 2.4rem; }
.frg-filing p { margin: 0; }
html body .frg-filing .frg-filing__table { display: table; width: 100%; margin: 0; }
.frg-filing .frg-filing__table td { width: auto; text-align: right; }
.frg-filing__none { color: var(--ink-muted); font-size: 0.9em; }

/* Practice answers: the core details block, closed until the reader asks. */
html body .frg-prose .wp-block-details { margin: 0 0 2.4rem; padding: 1.2rem 1.6rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); }
html body .frg-prose .wp-block-details summary { cursor: pointer; color: var(--accent-strong); font-weight: 600; }
html body .frg-prose .wp-block-details[open] summary { margin-bottom: 0.8rem; }
html body .frg-prose .wp-block-details p { margin: 0; }
