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