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