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