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