/* SPF checker: the few things tools.css doesn't cover. Form sections that
   show for one mode at a time, the include tree's record text and counts,
   compact findings inside the term table, the check_host() step list, and
   the ranges' copy row. States are always spelt out in words beside any
   colour. */

.mode-group { display: grid; gap: 14px; min-width: 0; }
.mode-group[hidden] { display: none; }

/* Short figures: four fit on one row beside the rail, two on a phone. A
   term shown as a value (such as -all) is a little smaller than a number */
.summary.spf-summary { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.summary.spf-summary .stat-value.mono { font-size: 17px; overflow-wrap: break-word; }

.small { font-size: 13px; line-height: 1.5; }
p.small, .card-body > p.small { margin: 0; }
.card-body > details.more-detail { min-width: 0; }

/* The record, term by term */
table.data td.term-cell { min-width: 12ch; max-width: 28ch; overflow-wrap: anywhere; }
.term-meaning { display: grid; gap: 4px; min-width: 0; }
.term-meaning p { margin: 0; line-height: 1.5; }
.term-meaning .term-help { font-size: 12.5px; color: var(--ink-3); font-style: italic; }
.term-meaning .findings li { padding: 3px 0; font-size: 13px; border-top: 0; }
.term-meaning .findings li::before { margin-top: 6px; }
table.data .over { color: var(--fail); font-weight: 550; }
.table-wrap[tabindex]:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.cell-label { display: none; }
@media (max-width: 560px) {
  .card table.data th, .card table.data td { padding: 8px 9px; }
  /* The term table stacks: term, then its meaning, then its lookups */
  .term-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .term-table, .term-table tbody, .term-table tr, .term-table td { display: block; width: 100%; }
  .term-table tr { padding: 10px 12px; border-top: 1px solid var(--line); }
  .term-table tr:first-child { border-top: 0; }
  .card .term-table td { padding: 0; border: 0; min-width: 0; max-width: none; }
  .term-table td + td { margin-top: 4px; }
  .term-table td.term-cell { color: var(--ink); font-weight: 550; }
  table.data.term-table td.num { text-align: left; }
  .term-table .lookup-cell { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
  .term-table .lookup-cell > div { flex-basis: 100%; }
  .term-table .cell-label { display: inline; color: var(--ink-3); font-size: 12.5px; }
}

/* Includes and redirects */
.spf-tree .node, .spf-path .node { gap: 4px 8px; }
.spf-path .path-step { min-width: 0; overflow-wrap: anywhere; }
.tree .tree-target { min-width: 0; overflow-wrap: anywhere; }
.tree .tree-count { font-size: 12.5px; color: var(--ink-2); padding: 1px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.tree .tree-record { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); overflow-wrap: anywhere; }
.tree .tree-problem { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* check_host(), step by step */
.trace li { padding: 3px 0; }
.trace-step { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); min-width: 0; }
.trace-step > span { min-width: 0; overflow-wrap: anywhere; }
.trace-term { color: var(--ink); font-size: 12.5px; }

/* Authorised ranges */
.range-family + .range-family { padding-top: 14px; border-top: 1px solid var(--line); }
.range-family h3.sub-head { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.range-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.range-line > p { margin: 0; }
sup { font-size: .72em; line-height: 0; }
