keyboard: prevent row key wrapping without hard widths
[sheet.git] / base.css
1 /* general */
2
3 body {
4         background: #FFF;
5         color: #000;
6         font-size: 90%;
7         text-align: center;
8 }
9 a, a:visited {
10         color: #000;
11         text-decoration: underline;
12 }
13 a:active, a:hover {
14         color: #00F;
15         text-decoration: none;
16 }
17
18 /* common sections */
19
20 h1, h2 {
21         font-size: 200%;
22         margin: 0;
23 }
24 h2, caption {
25         font-size: 110%;
26         font-weight: bold;
27 }
28 caption {
29         margin: 1ex;
30 }
31 caption aside {
32         position: absolute;
33         margin-left: 1ex;
34         font-weight: normal;
35         display: inline;
36         font-size: 91%; /* 100% */
37         margin-top: .3ex; /* align with 110% baseline */
38 }
39
40 hr {
41         clear: both;
42         visibility: hidden;
43         height: 2ex;
44         margin: 0;
45 }
46
47 .section ul {
48         margin-bottom: 1ex;
49 }
50 .section h2 {
51         margin: 0 1ex;
52         clear: both;
53 }
54 .section table {
55         float: left;
56         position: relative; /* prevents buggy hovering in table if caption present in gecko */
57         margin: 1ex 1ex 2ex;
58 }
59 .section .section {
60         float: left;
61 }
62 #charset .section table {
63         margin: -0.5ex 0 1ex; /* headers provide sufficient spacing already */
64 }
65
66 p {
67         margin: 1ex 0 1em;
68 }
69 p.aside {
70         font-size: 80%;
71 }
72 p.footer {
73         margin: 1em 0 0;
74         clear: both;
75 }
76 .help + .footer {
77         margin: 0;
78 }
79
80 .error {
81         background: #F00;
82         background: rgba(255, 0, 0, .8);
83         color: #FFF;
84         border: 2px solid #000;
85         border-width: 2px 0;
86         padding: 1em;
87         margin: 2ex auto;
88         clear: both;
89 }
90 .error > * {
91         margin-bottom: 1ex;
92 }
93 .error > *:last-child {
94         margin-bottom: 0;
95 }
96
97 ul {
98         margin: 0;
99         padding: 0;
100         list-style: none;
101 }
102
103 pre {
104         text-align: left;
105         margin: 2ex auto;
106         white-space: pre-wrap;
107         overflow-wrap: break-word;
108 }
109 body > pre {
110         width: 78ch;
111         tab-size: 4;
112         -moz-tab-size: 4;
113         padding: 0 1em;
114         border-width: 0 1px;
115         border-style: solid;
116         white-space: pre;
117         font-size: 1.9vmin; /* cover full width at most */
118 }
119 code {
120         white-space: nowrap;
121 }
122
123 h1 small,
124 h2 small {
125         position: absolute; /* side note; do not influence alignment */
126         margin-left: 1em;
127         font-weight: normal;
128         font-size: 50%; /* 1rem */
129         padding-top: 1.75ex; /* align baseline with container */
130 }
131 h2 small {
132         font-size: 90.9%;
133         padding-top: .17ex;
134 }
135
136 .section dl {
137         display: grid;
138         grid: auto-flow / 1fr 1fr;
139         clear: both;
140 }
141 @media (max-width: 42em) {
142         .section dl {
143                 grid: auto-flow / minmax(8em, 1fr) minmax(20em, 1fr);
144         }
145 }
146 .section dl > dt {
147         grid-column: 1;
148         text-align: right;
149 }
150 dt code {
151         white-space: normal;
152 }
153 dl > dd {
154         grid-column: 2;
155         text-align: left;
156         padding-left: 1em;
157         margin: 0;
158 }
159
160 /* "keyboard" (list of keys) */
161
162 .row0 {margin-top: -5ex} /* top (esc) row fits besides header */
163 .row2 {margin-left: 7em} /* row offsets relative to ~6em key width */
164 .row3 {margin-left: 8em}
165 .row4 {margin-left: 10em} /* should actually align to next key on row1 */
166         /* ...however rows>=1 are shifted a bit, to make space */
167
168 table.keys tr {
169         clear: both; /* start new row (screen row) */
170         display: block;
171 }
172 table.keys tbody {
173         /* start new row block (keyboard row) */
174         clear: both;
175         padding-top: 1ex;
176         display: block;
177 }
178
179 table.keys th,
180 h3      {display: none} /* semantic details (non-css/js) */
181 .keys .mode {display: none} /* initially hidden (only show interactively (js)) */
182
183 table.keys {
184         display: block;
185         border-spacing: 0;
186         border-collapse: collapse;
187         white-space: nowrap;
188         text-align: left;
189 }
190
191 /* individual keys */
192
193 dl.legend dt,
194 .keys td {
195         display: inline-block;
196         white-space: normal;
197         width: 6.2em;
198         line-height: 2.25ex; /* a little terser (seems to be gecko's default anyway) */
199         height: 4.5ex; /* 2 lines */
200         overflow: hidden;
201         margin: 0 2px -1px;
202         padding: 0;
203         text-align: center;
204         border: 1px solid #000;
205         border-radius: 4px;
206         -moz-border-radius: 4px;
207         text-transform-variation: text;
208 }
209 .keys td b {
210         float: left;
211         font-size: 200%;
212         line-height: 2.5ex; /* inherits otherwise */
213         padding-left: 2px;
214 }
215 .keys .row0 td { /* omni-present esc */
216         width: 8.5em;
217 }
218
219 /* fine tuning of special occurrences */
220
221 .keys td b[title] { /* mnemonic hover */
222         cursor: help;
223 }
224 .keys td[onclick]:hover { /* link */
225         cursor: pointer;
226 }
227 .keys td a { /* key link */
228         color: inherit;
229         text-decoration: none;
230         display: block;
231         height: 100%;
232 }
233
234 .keys .meta td b,
235 .keys .ctrl td b,
236 .keys .lead td b { /* char with ctrl or leading key */
237         font-size: 100%; /* space is too limited for 2+ double-sized chars */
238         line-height: 5ex; /* keep double height though */
239 }
240 .keys .meta td b small,
241 .keys .ctrl td b small { /* meta key indicator */
242         font-size: 70%;
243         font-weight: normal; /* nice and subtle */
244 }
245
246 /* tables */
247
248 table {
249         border-collapse: collapse;
250 }
251 th, td {
252         border-color: #778;
253         border: 1px solid #888;
254         background: #DDD;
255 }
256 thead th, td {
257         text-align: center;
258 }
259
260 td.joind {
261         border-bottom: none;
262 }
263 td.joinu {
264         /* first cell determines border width for entire row */
265         border-top-color: transparent;
266 }
267 td.joinr {
268         border-right: none;
269 }
270 td.joinl {
271         border-left: none;
272 }
273
274 thead {
275         position: sticky;
276         top: 0;
277         background: #DDD8;
278 }
279
280 /* character table */
281
282 .glyphs thead th, .glyphs td {
283         width: 1.6em; /* regular interval */
284 }
285 .glyphs tbody td {
286         font-size: 112%;
287 }
288 .glyphs.big tbody td {
289         font-size: 200%;
290 }
291 .glyphs .glyphs {
292         margin: 0.5ex 0; /* nested in legend */
293 }
294 .glyphs .glyphs td {
295         font-size: 100%;
296 }
297
298 .cover td {
299         min-width: 2.5ex; /* square cells */
300 }
301
302 /* table headers */
303
304 th,
305 tfoot td,
306 thead td {
307         border-width: 0;
308         background: transparent;
309 }
310 .glyphs thead td {
311         width: auto; /* no glyph cells in header */
312 }
313 .glyphs caption {
314         margin-left: 2.2em; /* 1ex + offset head column (1.6em + 0.4em) / 110% */
315                 /* adjusted insignificant -.2em to fit wide contents on /charset/mac */
316 }
317 th {
318         padding: 0 0.2em;
319 }
320 .diinfo th {
321         font-size: 50%; /* mostly insignificant here */
322         font-weight: normal;
323 }
324 .diinfo tbody th {
325         text-align: right; /* variable width so keep near cells */
326         padding: 0 0.5em;
327 }
328 .cat {
329         font-size: 70%;
330         text-transform: uppercase;
331 }
332 tfoot .cat th {
333         border-top: 1px solid #888;
334 }
335
336 /* colour map */
337
338 table.color td {
339         border: 1px solid #555;
340         font-weight: normal;
341         padding: 0 8px;
342 }
343 table.color td samp {
344         margin: 0 -8px 0 8px;
345         font-family: inherit;
346         float: right;
347 }
348 table.color td samp ~ samp {
349 }
350 table.color td samp small {
351         font: 100% monospace;
352         padding: 0 .5ex;
353 }
354
355 /* digraphs map */
356
357 table.dimap {
358         table-layout: fixed; /* prevent resizing, notably in msie6 */
359 }
360 .dimap thead th, .dimap td {
361         /* below-maximum size (but still average enough to be regular) so we can fit more */
362         width: 1.2em; /* msie only looks at the first row */
363         min-width: 1em; /* prevents gecko from restricting to page width */
364 }
365 .dimap th {
366         text-align: center; /* row headers are also glyph-sized */
367 }
368
369 .mapped tbody, .mapped colgroup,
370 .dimap tbody, .dimap colgroup {
371         border: 2px double #888; /* major character group grid */
372 }
373 .mapped tbody,
374 .dimap tbody {
375         border-width: 2px 0; /* horizontal group dividers */
376 }
377 .mapped colgroup,
378 .dimap colgroup {
379         border-width: 0 2px; /* vertical divides */
380 }
381
382 /* digraph selection */
383
384 .diinfo {
385         -moz-column-width: 24em;
386         -webkit-column-width: 24em;
387         column-width: 24em;
388 }
389 .diinfo > div {
390         overflow: hidden;
391         column-break-inside: avoid;
392         -webkit-column-break-inside: avoid;
393         position: relative; z-index: 1; /* webkit bug */
394 }
395
396 /* glyph cell overlay (digraph labels) */
397
398 .glyphs.dilabel td {
399         padding: 0;
400         padding-bottom: 1.1ex; /* reserve space for label */
401         vertical-align: bottom;
402 }
403 .glyphs.dilabel small {
404         font-size: 50%;
405         display: block;
406         margin-top: 0.2ex;
407         margin-bottom: -2.2ex; /* take cell padding */
408 }
409 .glyphs.dilabel small.digraph {
410         background: #000;
411         color: #FFF;
412         opacity: 0.3;
413 }
414 .glyphs.dilabel small.value {
415         background: #600;
416         color: #FFF;
417         opacity: 0.3;
418 }
419
420 /* character properties */
421
422 .X  {background: #FFF} /* unidentified */
423 .Mc, .Me, .Zl, .Zp      {background: #F00} /* unstyled */
424 .X > span               {background: #898; background: rgba(0, 0, 0, .25)} /* invisible contents */
425
426 /* letter scripts */
427 .Armenian,
428 .Greek    {background: #FFE8CF}
429 .Cyrillic {background: #FFDDA8}
430 .Latin    {background: #FFB}
431 .Aramaic,
432 .Hebrew   {background: #FFD}
433 .Arabic   {background: #EFE}
434 .African  {background: #DED}
435 .Brahmic  {background: #FBB} /* same as number */
436 .Khmer    {background: #FBA}
437 .Hangul,
438 .Syllabic {background: #DEA}
439 .Katakana {background: #DFA}
440 .Hiragana {background: #DFC}
441 .Bopomofo {background: #BFC}
442 .Han      {background: #CFD}
443 .Alpha    {background: #ADA} /* other scripts */
444
445 /* other categories */
446 .Nd, .Nl, .No         {background: #FDD} /* number */
447 .Sc                   {background: #FCD} /* currency */
448 .Sm                   {background: #ECE} /* math */
449 .So                   {background: #DCF} /* symbol */
450 .Pd, .Po, .Pc         {background: #CDF} /* punctuation */
451 .Ps, .Pe, .Pi, .Pf    {background: #BEF} /* quote */
452 .Lm, .Sk              {background: #CEE} /* spacing modifier */
453 .Mn                   {background: #ACC} /* modifier */
454 .Cc, .Cf {color: #666; background: #BBB} /* control */
455 .Zs                   {background: #ACB} /* space */
456 .Co, .Xi.Co           {background: #DCC} /* private */
457 .Xi, .Cs              {background: #CCC} /* invalid */
458 .Xd                   {color: #844} /* deprecated */
459 .Xr                   {color: #888} /* reserved (digraph reverse or proposal) */
460 .dimap .Xr            {background: #EEE} /* reversed digraph */
461 .ccmap .Xr {opacity:.4}
462
463 /* support levels */
464 .l1 {background: #FDD} /* no, unsupported, other */
465 .l2 {background: #FED} /* partial, restricted, unofficial */
466         /* default u-prop, u-bmp */
467 .l3 {background: #FFD} /* almost, imperfect, common */
468         /* default u-di, u-lat1 */
469 .l4 {background: #EFD} /* yes, supported, ubiquitous, native */
470         /* default u-ascii */
471 .l5 {background: #DFD} /* complete, perfect */
472 .l0 {background: #EEE} /* unknown, omitted */
473 .ex {     color: #888; color: rgba(0, 0, 0, .5)} /* experimental, disfavoured */
474 .u-invalid {background: #BBB} /* invalid, impossible */
475
476 /* foreground representation */
477 #digraphs .u-l3 {color: #080} /* partial */
478 #digraphs .u-l3.ex {color: #4C0} /* experimental */
479 #digraphs .u-l2 {color: #A44; color: rgba(128, 0, 0, .6)} /* unofficial proposal */
480 #digraphs .u-l1 {color: #D00; color: rgba(255, 0, 0, .8)} /* minimal or invalid */
481
482 /* support percentage (browser cells) */
483 .p0         {opacity: .6}
484 .p0.p       {opacity: 1}
485 .p::after   {content: '!'; color: #F00}
486 .p4::after  {color: #C00}
487 .p3::after  {color: #A00}
488 .p2::after  {color: #800}
489 .p1::after,
490 .p0::after  {color: #000}
491 .p09::after {opacity: .9}
492 .p08::after {opacity: .8}
493 .p07::after {opacity: .7}
494 .p06::after {opacity: .6}
495 .p05::after {opacity: .5}
496 .p04::after {opacity: .4}
497 .p03::after {opacity: .3}
498 .p02::after {opacity: .2}
499 .p01::after {opacity: .1}
500 .p00::after {display: none}
501
502 /* code syntax */
503 .sy-comment    { color: #888 }
504 .sy-constant   { color: #008 }
505 .sy-identifier { color: #804 }
506 .sy-statement  { }
507 .sy-preProc    { }
508 .sy-type,
509 .sy-special    { color: #408 }
510 .sy-error      { font-weight: bold; background-color: #F00; color: #FFF }
511 .sy-todo       { background-color: #FF0 }
512
513 /* boolean alternate */
514 .glyphs b      { font-weight: normal; color: #800 }
515
516 /* hover effects */
517 .X:hover {cursor: help}
518 .X:hover > span                            {background: #FFF} /* whitespace marker */
519 .Greek:hover, .Armenian:hover              {background: #FA8}
520 .Cyrillic:hover                            {background: #FB7}
521 .Latin:hover                               {background: #EE4}
522 .Hebrew:hover, .Aramaic:hover              {background: #FFA}
523 .Arabic:hover                              {background: #CFD}
524 .African:hover                             {background: #BDB}
525 .Syllabic:hover, .Hangul:hover             {background: #CE6}
526 .Katakana:hover                            {background: #BF7}
527 .Hiragana:hover                            {background: #AF8}
528 .Bopomofo:hover                            {background: #8FA}
529 .Brahmic:hover                             {background: #F77}
530 .Khmer:hover                               {background: #F87}
531 .Han:hover                                 {background: #5EB}
532 .Alpha:hover                               {background: #5C5}
533 .Nd:hover, .Nl:hover, .No:hover            {background: #F99} /* number */
534 .Sc:hover                                  {background: #F8C} /* currency */
535 .Sm:hover                                  {background: #F8F} /* math */
536 .So:hover                                  {background: #A8F} /* symbol */
537 .Pd:hover, .Po:hover, .Pc:hover            {background: #8AF} /* punctuation */
538 .Ps:hover, .Pe:hover, .Pi:hover, .Pf:hover {background: #8DF} /* quote */
539 .Lm:hover, .Sk:hover                       {background: #BFF} /* spacing modifier */
540 .Mn:hover                                  {background: #CDE} /* modifier */
541 .Zs:hover                                  {background: #CED} /* space */
542 .Cc:hover, .Cf:hover                       {background: #DDD} /* control */
543 .Co:hover                                  {background: #A77} /* private */
544 .Xr:hover                                  {background: #FFF} /* reserved */
545 .Xi:hover                                  {background: #DDD} /* invalid */
546 .l0:hover                                  {background: #888}
547 .l1:hover                                  {background: #F88}
548 .l2:hover                                  {background: #FC8}
549 .l3:hover                                  {background: #FF8}
550 .l4:hover                                  {background: #CF8}
551 .l5:hover                                  {background: #8F8}
552 .u-l3:hover    {outline: 1px solid #080}
553 .u-l3.ex:hover {outline: 1px solid #8F0}
554 .u-l2:hover    {outline: 1px solid #800}
555 .u-l1:hover    {outline: 1px solid #F00}
556
557 /* key type colorization */
558
559 .c-sa,
560 .g1 {background: #BFE} /* cyan: info */
561 .c-na,
562 .g2 {background: #BFB} /* green: motion */
563 .g3 {background: #DFA} /* greenish: jump (g2+) */
564 .c-af,
565 .g4 {background: #FFA} /* yellow: command */
566 .c-eu,
567 .g5 {background: #FDA} /* orangish: open (g6-) */
568 .g6 {background: #FCA} /* orange: insert */
569 .c-as,
570 .g7 {background: #FCC} /* red: mode */
571 .c-an,
572 .g8 {background: #ECE} /* purple: visual (g7+) */
573 .c-oc,
574 .g9 {background: #CCF} /* blue: prefix */
575
576 .c-sa:hover,
577 .g1 a:hover, .g1[onclick]:hover {background: #5ED}
578 .c-na:hover,
579 .g2 a:hover, .g2[onclick]:hover {background: #7E7}
580 .g3 a:hover, .g3[onclick]:hover {background: #CE6}
581 .c-af:hover,
582 .g4 a:hover, .g4[onclick]:hover {background: #EE4}
583 .c-eu:hover,
584 .g5 a:hover, .g5[onclick]:hover {background: #FA6}
585 .g6 a:hover, .g6[onclick]:hover {background: #F97}
586 .c-as:hover,
587 .g7 a:hover, .g7[onclick]:hover {background: #F88}
588 .c-an:hover,
589 .g8 a:hover, .g8[onclick]:hover {background: #D9D}
590 .c-oc:hover,
591 .g9 a:hover, .g9[onclick]:hover {background: #99F}
592
593 .no {
594         background: #EEE; /* unassigned */
595 }
596 .keys td.ni {
597         border: 0;
598         padding: 1px; /* same size as borderlessless keys */
599         background: none;
600 }
601
602 dl.legend dt.more,
603 .keys td.more b {
604         text-shadow: #F20 0 0 0.1em;
605 }
606 dl.legend dt.more:hover,
607 .keys td.more:hover b {
608         text-shadow: #F20 0 0 0.5em, #FC0 0 0 0.2em;
609 }
610 dl.legend dt.new,
611 .keys td.new {
612         border-style: dashed;
613 }
614 dl.legend dt.ext,
615 .keys td.ext {
616         opacity: .6;
617 }
618
619 /* l/r help columns */
620
621 .help {
622         display: table;
623         width: 100%;
624 }
625 .help > * {
626         display: table-cell;
627         width: 20%;
628         vertical-align: top;
629 }
630
631 .left dl.legend {
632         margin-left: 6.4em; /* a bit over 6.2em to allow for borders+padding (border-sizing would work too) */
633 }
634 .left dl.legend dt {
635         margin-left: -6.4em; /* msie<=6 multiply this by two for some reason */
636         float: left;
637         clear: left;
638 }
639 .left dl.legend dd {
640         float: left; /* align next to dt (except msie<=7 does just the opposite) */
641 }
642 .right dl.legend {
643         margin-right: 6.4em;
644 }
645 .right dl.legend dt {
646         margin-right: -6.4em;
647         float: right;
648         clear: right;
649 }
650 .right dl.legend dd {
651         float: right;
652 }
653 .right {
654         text-align: right;
655 }
656
657 /* help/legend */
658
659 dl.legend dt {
660         margin: 0 0 1px; /* distinct keys */
661         height: auto; /* not key-height */
662         padding: 2px 0;
663 }
664 dl.legend dd {
665         margin: 3px 0.4em 0; /* align text (add dt border+padding height) */
666         padding: 0;
667 }
668
669 dl.legend-options dt {
670         background: #CCC;
671 }
672
673 ul.legend-set {
674         clear: right;
675         padding-top: 1ex;
676 }
677 ul.legend-set li {
678         margin: 6px 0; /* similar to dl legends */
679 }
680
681 .legend {
682         margin-top: 1em;
683 }
684 .legend table {
685         width: 100%;
686 }
687 .legend td {
688         padding: 0 0.2em;
689 }
690
691 /* images */
692
693 figure {
694         margin: 0;
695         position: relative;
696 }
697 figure img {
698         vertical-align: bottom;
699         width: 100%;
700 }
701
702 @media (min-width: 60em) {
703         figcaption {
704                 padding: 0 1em;
705                 color: #000;
706                 background: rgba(255, 255, 255, .66);
707                 position: absolute;
708                 right: 0;
709                 bottom: 0;
710                 max-width: 100%;
711                 box-sizing: border-box;
712         }
713         .gallery li.parent:hover > figure > figcaption,
714         .gallery figure:hover > figcaption {
715                 /* highlight title of current and parents */
716                 font-size: 175%;
717                 right: 50%;
718                 bottom: 50%;
719                 transform: translate(50%, 50%);
720                 margin-left: -60%; /* keep width */
721         }
722 }
723
724 /* image gallery */
725
726 .gallery {
727         display: grid;
728         grid: auto-flow dense / repeat(auto-fit, minmax(200px, 1fr));
729         grid-gap: 1px;
730 }
731 .gallery li, .gallery ul {
732         display: contents;
733 }
734 .gallery figure {
735         overflow: hidden;
736         box-sizing: border-box;
737         hyphens: auto;
738         max-width: 900px;
739 }
740 .gallery figcaption > small {
741         display: inline-block;
742 }
743
744 @media (min-width: 403px) and (min-height: 266px) {
745         /* able to fit 2 cells of 200x133 */
746         .gallery li.large > figure {
747                 grid-row: span 2;
748                 grid-column: span 2;
749         }
750 }
751 @media (min-width: 603px) and (min-height: 400px) {
752         /* fit 3 cells of 200x133 */
753         .gallery > li:first-child > figure,
754         .gallery li.huge > figure {
755                 grid-row: span 3;
756                 grid-column: span 3;
757         }
758 }
759
760 .gallery figure, .gallery figcaption {
761         transition: all .5s ease-in;
762 }
763 .gallery figure:hover ~ ul figcaption {
764         /* mark all children */
765         color: #FFF;
766         background: rgba(0, 0, 0, .5);
767 }
768
769 .gallery figure[data-sup]:after {
770         position: absolute;
771         right: 0;
772         content: attr(data-sup);
773         color: #FFF;
774         background: #0006;
775         border-radius: 1em;
776         padding: .1ex .4em;
777         margin: .4em;
778 }
779 .gallery .expand > figure[data-sup]:after {
780         content: '+' attr(data-sup);
781         background: #0008;
782         font-size: 150%;
783         border: 2px solid #FFF8;
784 }
785
786 /* specialised galleries */
787
788 body#word {
789         margin: 8px 1px;
790 }
791
792 table.gallery {
793         grid-auto-flow: row;
794         grid-template-columns: repeat(auto-fit, minmax(2em, max-content)); /* 1fr */
795 }
796 table.gallery tbody,
797 table.gallery tr {
798         display: contents;
799 }
800 table.gallery tr > :first-child {
801         grid-column: 1;
802         -grid-row: span 6;
803         margin: auto; /* vertical-align: middle */
804 }
805 table.gallery tr > :nth-child(2) {
806         grid-column: 2; /* in case 1st is missing */
807 }
808 table.gallery td {
809         border: 0; /* does not collapse */
810         outline: 1px solid #888; /* over grid-gap */
811 }
812
813 /* page-specific */
814
815 #browser td > a {
816         text-decoration: none;
817 }
818 #browser td > a:active,
819 #browser td > a:hover {
820         text-decoration: underline;
821 }
822 #browser tr .aside {
823         font-size: 80%;
824         overflow: hidden;
825         height: 0;
826         -webkit-transition: all 1s ease-in;
827         -o-transition: all 1s ease-in;
828         -moz-transition: all 1s ease-in;
829         transition: height 1s ease-in;
830 }
831 #browser tr .aside p {
832         margin: 1ex 0;
833 }
834 #browser tr.target .aside,
835 #browser tr:target .aside {
836         height: auto;
837 }
838 #browser td.X {
839         white-space: nowrap; /* some browsers break on dashes */
840 }
841
842 #browser tr:target > td:first-of-type,
843 #browser tr.focus > td:first-of-type {
844         background: inherit;
845 }
846 #browser tr.focus > td {
847         border-bottom-color: #000;
848 }
849
850 form.aside {
851         position: absolute;
852         top: 3ex;
853         right: 1em;
854 }
855
856 .family-name {
857         font-variant: small-caps;
858 }
859
860 #index nav {
861         columns: 3;
862         -moz-columns: 3;
863         -webkit-columns: 3;
864 }
865 nav > .section {
866         break-inside: avoid;
867         -webkit-column-break-inside: avoid; /* webkit */
868         page-break-inside: avoid; /* moz */
869         overflow: hidden; /* webkit workaround */
870 }
871 #index nav a {
872         display: inline-block;
873         margin-top: 1em;
874 }
875
876 .units tbody tr:hover:not(.race) {
877         background: #EEE;
878 }
879 .unit-gas {
880         color: #040;
881 }
882 .unit-min, .unit-min a:not(:hover) {
883         color: #004;
884 }
885 .unit-supply {
886         color: #080;
887 }
888 .unit-o {color: #C08} /* organic */
889 .unit-u {color: #44C} /* mechanic */
890 .unit-p {color: #0A8} /* psionic */
891 .unit-composed {
892         color: #C88;
893 }
894 .unit-air {
895         color: #08C;
896 }
897 .unit-x {color: #888}
898 .unit-s {color: #890}
899 .unit-m {color: #C70}
900 .unit-l {color: #D22}
901 .unit-h {color: #804}
902 .magic-opt:before,
903 .magic-opt:after {
904         color: #000;
905 }
906 .hurtrel, .units .hurtrel {
907         color: #778;
908 }
909 tbody .unit-shield {
910         color: #64A;
911 }
912 .unit-pdd {
913         color: #A8C;
914 }
915 .unit-splash {
916         color: #4A0;
917 }
918 .hurt-a {
919         color: #036;
920 }
921 .hurt-g {
922         color: #063;
923 }
924 .unit-massive {
925         color: #D88;
926 }
927 .unit-detect::before {
928         color: #0A8;
929 }
930 .unit-jump {
931         color: #8A4;
932 }
933 body .magic-perma {
934                 text-decoration-color: #8C0;
935            -moz-text-decoration-color: #8C0;
936         -webkit-text-decoration-color: #8C0;
937 }
938
939 /* printing hints */
940
941 @page {
942         size: landscape;
943         margin: 0;
944 }
945
946 @media print {
947         ul.legend-set {display: none} /* current options only relevant on dynamic media */
948 }
949
950 /* terse optimisation */
951
952 @media (min-height: 112ex) and (min-width: 90em) {
953         .keys td {
954                 padding: 1ex 0 1ex .1em;
955                 width: 7em;
956         }
957 }
958
959 @media (max-width: 79em) {
960         .keys td {
961                 position: relative; /* hides overflow */
962                 width: 4.5em;
963         }
964         .keys td b,
965         .keys .meta td b,
966         .keys .ctrl td b,
967         .keys .lead td b { /* leading chars always fit */
968                 position: absolute; /* background */
969                 right: 0; /* least overlap in corner */
970                 font-size: 250%;
971                 line-height: 2.5ex;
972                 opacity: .5;
973                 color: #FFF;
974         }
975
976         .row2 {margin-left: 5.3em} /* 7em / Δtd(6em : 4.5em) */
977         .row3 {margin-left: 6em}   /* 8em / Δtd */
978         .row4 {margin-left: 7.5em} /* 10em / Δtd */
979
980         /* letter scripts columns to rows */
981         .legend .glyphs:first-child td:not(td td) {
982                 display: table-row;
983         }
984         .legend .glyphs td > table {
985                 width: auto;
986                 display: inline-block;
987                 margin: 1px 0 1px 1ex;
988                 vertical-align: -6px;
989         }
990         .legend .glyphs td td {
991                 margin: 2px;
992         }
993
994         @media (max-width: 61em) {
995                 .keys td {
996                         width: 3em;
997                         height: 6.75ex; /* 3 lines */
998                         font-size: 80%;
999                 }
1000                 .keys td b,
1001                 .keys .meta td b,
1002                 .keys .ctrl td b,
1003                 .keys .lead td b {
1004                         line-height: 4ex;
1005                 }
1006
1007                 .row2 {margin-left: 3.5em} /* 7em / Δtd(6em : 3em) */
1008                 .row3 {margin-left: 4em}   /* 8em / Δtd */
1009                 .row4 {margin-left: 5em}   /* 10em / Δtd */
1010         }
1011
1012         @media (max-width: 42em) {
1013                 /* flatten right legend column on mobile */
1014                 .help > * {
1015                         display: table-row;
1016                         width: auto;
1017                 }
1018                 ul.legend-set {
1019                         clear: left;
1020                 }
1021                 .right dl.legend {
1022                         margin-right: 0;
1023                         margin-left: 6.4em;
1024                 }
1025                 .right dl.legend dt {
1026                         margin-right: 0;
1027                         margin-left: -6.4em;
1028                         float: left;
1029                         clear: left;
1030                 }
1031                 .right dl.legend dd {
1032                         float: left;
1033                 }
1034         }
1035 }
1036
1037 /*
1038 @media screen and (orientation: portrait) and (max-width: 62em) {
1039         body table.keys,
1040         #rows {
1041                 margin-top: 1ex;
1042                 transform: rotate(90deg);
1043                 transform-origin: top left;
1044                 margin-left: 40em;
1045                 margin-bottom: 30em;
1046                 font-size: 80%;
1047         }
1048 }
1049 */