/* Data Center grids: the server table, the phone list, the AG Grid container, and the method box.
   AG Grid's own theme comes from grids.js (themeQuartz with the brand's custom properties). */

.dc-grid { height: min(76vh, 780px); min-height: 420px; margin: 0 0 12px; }
.dc-grid.dc-grid-auto { height: auto; min-height: 0; }
.dc-grid .num, .dc-grid .ag-right-aligned-cell { font-variant-numeric: tabular-nums; }
.dc-grid .ag-row-pinned { font-weight: 600; }
.dc-grid .ag-row-group { font-weight: 500; }
.dc-grid a { color: var(--link); }
/* Wrapped cells (long role and issue names) read as text, not one line per row height. */
.dc-grid .ag-cell-wrap-text { line-height: 1.45; padding-top: 7px; padding-bottom: 7px; word-break: normal; }
.dc-grid .ag-cell-wrap-text .ag-group-value { white-space: normal; }
/* Filters fit a 320 px screen: a long option never widens the page. */
.filters > div { min-width: 0; max-width: 100%; }
.filters select, .filters input { max-width: 100%; }

.skip-grid { position: absolute; left: -9999px; }
.skip-grid:focus { position: static; display: inline-block; margin: 0 0 8px; padding: 4px 8px; background: var(--accent); color: var(--ink); }
.grid-after:focus { outline: none; }

.grid-tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.grid-tabs a { padding: 8px 14px; color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.grid-tabs a:hover { color: var(--link); }
.grid-tabs a[aria-current="page"] { border-bottom-color: var(--primary); font-weight: 500; }

.link-button { font: inherit; font-size: .875rem; background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; }
.filters .link-button { background: none; color: var(--link); padding: 0; }
.filters .link-button:hover { background: none; color: var(--primary); }

table.data tbody tr:hover > * { background: rgba(14, 115, 149, 0.06); }
table.data tbody th[scope="row"] { background: transparent; font-weight: 400; }
table.data tfoot th, table.data tfoot td { font-weight: 600; border-top: 2px solid var(--line); background: #fff; }
/* Labels kept on one line where the table has room (par size bands); phone cards still wrap. */
table.data td.nowrap { white-space: nowrap; }

/* Participants: fees with no firm named, above the grid. */
.no-firm h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.no-firm ul { margin: 0 0 10px; padding-left: 1.2rem; }
.no-firm li { margin-bottom: 2px; }
.no-firm .table-scroll { margin: 0 0 6px; }
.no-firm .table-scroll table.data.compact { min-width: 520px; }
table.data.compact th, table.data.compact td { padding: 4px 8px; }
.no-firm table.data tbody th[scope="row"], .no-firm table.data td, .no-firm table.data tfoot th, .no-firm table.data tfoot td { background: transparent; }
@media (max-width: 767.98px) { .no-firm .stack-wrap table.data.compact { min-width: 0; } }

/* The phone list: one card a row, label: value. */
.grid-cards { display: none; list-style: none; margin: 0; padding: 0; }
.grid-cards > li { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin: 0 0 10px; background: #fff; }
.grid-cards .card-eyebrow { font-size: .85rem; margin: 0 0 2px; }
.grid-cards .card-title { font-weight: 500; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.grid-cards dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.grid-cards dl div { min-width: 0; }
.grid-cards dt { font-size: .78rem; color: var(--muted); }
.grid-cards dd { margin: 0; font-size: .925rem; overflow-wrap: anywhere; }
.grid-cards dd.num { font-variant-numeric: tabular-nums; }

@media (max-width: 767.98px) {
  .grid-server:not(.grid-keep-phone) .grid-table { display: none; }
  .grid-server:not(.grid-keep-phone) .grid-cards { display: block; }
  .dc-grid { display: none !important; }
  .grid-tabs a { padding: 8px 10px; }
}
@media (max-width: 300px) {
  .grid-cards dl { grid-template-columns: minmax(0, 1fr); }
}

/* Method boxes */
details.method { border: 1px solid var(--line); border-radius: 6px; padding: 10px 16px; margin: 24px 0 0; background: #fff; }
details.method summary { cursor: pointer; font-weight: 500; color: var(--ink); }
details.method[open] summary { margin-bottom: 10px; }
details.method h3 { font-size: 1.05rem; margin-top: 20px; }
details.method li { margin-bottom: 6px; }

/* Cost of issuance: chart beside the grid on wide screens. */
.cost-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 1200px) { .cost-layout:not(.cost-stacked) { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } }
/* No grid (no licence key): chart above, the table full width below it, at every width. */
.cost-stacked .cost-chart svg.grouped-bars { max-width: 760px; }
.cost-chart h2, .cost-grid h2 { font-size: 1.2rem; }
.chart-key { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0 0 6px; padding: 0; font-size: .875rem; color: var(--text); }
.chart-key .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
svg.grouped-bars { display: block; width: 100%; height: auto; }
svg.grouped-bars .grid { stroke: var(--line); stroke-width: 1; }
svg.grouped-bars .axis { stroke: var(--muted); stroke-width: 1; }
svg.grouped-bars text { fill: var(--muted); font-size: 13px; font-family: var(--font); }
.s1, svg.grouped-bars rect.s1 { fill: #0b7ba8; background: #0b7ba8; }
/* Sale types keep off the reserved colours: the primary colour is principal, gold and charcoal a pledge. */
.s2, svg.grouped-bars rect.s2 { fill: #5b4a9b; background: #5b4a9b; }
.s3, svg.grouped-bars rect.s3 { fill: #2f7d4f; background: #2f7d4f; }
svg.grouped-bars rect:hover { opacity: .85; }

@media print {
  .dc-grid, .skip-grid, .grid-tabs { display: none !important; }
  .grid-server { display: block !important; }
  .grid-server .grid-table { display: block !important; }
  .grid-cards { display: none !important; }
  details.method { border: 0; padding: 0; }
}
