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