/* wtcy.org lookup pages, rev2, 22 Nov 2026: tables of flags and values that the page decodes against.
   Rev2: a name in a cell marked nm breaks only where the page marks a break (between the words of the name),
   so its column is never narrower than one word; a laid-out filter breaks a long line at the edge of the box,
   so the line keeps its indent. */
.lookup { margin: 1rem 0 0; }
.lookup input[type="text"] { max-width: 28rem; }
.lookup-out .signal { margin-top: 0; }
.flagset { list-style: none; margin: 0.9rem 0 0; padding: 0; }
.flagset li { padding: 0.3rem 0 0.3rem 0.8rem; border-left: 4px solid var(--go); margin: 0 0 0.35rem; max-width: 80ch; }
.flagset code { font-weight: 600; }

/* A table of flags: the first column ticks a flag, and a ticked or decoded row is lit. */
table.flags td.tick { width: 2.2rem; padding-right: 0.4rem; }
table.flags td.tick input { width: 1.1rem; height: 1.1rem; margin: 0.15rem 0 0; accent-color: var(--link); }
table.flags label { display: inline; font-weight: 400; margin: 0; }
table.flags tr.on td, table.codes tr.hit td { background: var(--hit); }
table.flags td code, table.codes td code { white-space: normal; overflow-wrap: anywhere; }
table.codes td.nm code { overflow-wrap: break-word; }
pre.laid { word-break: break-all; }
table.common a { font-family: var(--mono); }

/* Below 40rem a row becomes a block: the name and the numbers on one line, the meaning under them. */
@media (max-width: 40rem) {
  table.flags thead, table.codes thead, table.common thead { display: none; }
  table.flags tr, table.codes tr, table.common tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.9rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
  table.flags td, table.codes td, table.common td { border: 0; padding: 0; }
  table.flags td:last-child, table.codes td:last-child, table.common td:last-child { flex-basis: 100%; }
  table.flags td.tick { width: auto; }
  td.num, th.num { text-align: left; }
}
