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