+/* images */
+
+figure {
+ margin: 0;
+ position: relative;
+}
+figure img {
+ vertical-align: bottom;
+ width: 100%;
+}
+
+@media (min-width: 60em) {
+ figcaption {
+ padding: 0 1em;
+ color: #000;
+ background: rgba(255, 255, 255, .66);
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ max-width: 100%;
+ box-sizing: border-box;
+ }
+ .gallery li.parent:hover > figure > figcaption,
+ .gallery figure:hover > figcaption {
+ /* highlight title of current and parents */
+ font-size: 175%;
+ right: 50%;
+ bottom: 50%;
+ transform: translate(50%, 50%);
+ margin-left: -60%; /* keep width */
+ }
+}
+
+/* image gallery */
+
+.gallery {
+ display: grid;
+ grid: auto-flow dense / repeat(auto-fit, minmax(200px, 1fr));
+ grid-gap: 1px;
+}
+.gallery li, .gallery ul {
+ display: contents;
+}
+.gallery figure {
+ overflow: hidden;
+ box-sizing: border-box;
+}
+.gallery figcaption > small {
+ display: inline-block;
+}
+
+@media (min-width: 403px) and (min-height: 266px) {
+ /* able to fit 2 cells of 200x133 */
+ .gallery li.large > figure {
+ grid-row: span 2;
+ grid-column: span 2;
+ }
+}
+@media (min-width: 603px) and (min-height: 400px) {
+ /* fit 3 cells of 200x133 */
+ .gallery > ul > li:first-child > figure,
+ .gallery li.huge > figure {
+ grid-row: span 3;
+ grid-column: span 3;
+ }
+}
+
+.gallery figure, .gallery figcaption {
+ transition: all .5s ease-in;
+}
+.gallery figure:hover ~ ul figcaption {
+ /* mark all children */
+ color: #FFF;
+ background: rgba(0, 0, 0, .5);
+}
+
+/* specialised galleries */
+
+body#word {
+ margin: 8px 1px;
+}
+
+table.gallery {
+ grid-auto-flow: row;
+ grid-template-columns: repeat(auto-fit, minmax(2em, max-content)); /* 1fr */
+}
+table.gallery tbody,
+table.gallery tr {
+ display: contents;
+}
+table.gallery tr > :first-child {
+ grid-column: 1;
+ -grid-row: span 6;
+ margin: auto; /* vertical-align: middle */
+}
+table.gallery tr > :nth-child(2) {
+ grid-column: 2; /* in case 1st is missing */
+}
+table.gallery td {
+ border: 0; /* does not collapse */
+ outline: 1px solid #888; /* over grid-gap */
+}
+
+/* page-specific */
+
+#browser td > a {
+ text-decoration: none;
+}
+#browser td > a:active,
+#browser td > a:hover {
+ text-decoration: underline;
+}
+#browser tr .aside {
+ font-size: 80%;
+ overflow: hidden;
+ height: 0;
+ -webkit-transition: all 1s ease-in;
+ -o-transition: all 1s ease-in;
+ -moz-transition: all 1s ease-in;
+ transition: height 1s ease-in;
+}
+#browser tr .aside p {
+ margin: 1ex 0;
+}
+#browser tr.target .aside,
+#browser tr:target .aside {
+ height: auto;
+}
+#browser td.X {
+ white-space: nowrap; /* some browsers break on dashes */
+}
+
+#browser tr:target > td:first-of-type,
+#browser tr.focus > td:first-of-type {
+ background: inherit;
+}
+#browser tr.focus > td {
+ border-bottom-color: #000;
+}
+
+form.aside {
+ position: absolute;
+ top: 3ex;
+ right: 1em;
+}
+
+.family-name {
+ font-variant: small-caps;
+}
+
+#index nav {
+ columns: 3;
+ -moz-columns: 3;
+ -webkit-columns: 3;
+}
+nav > .section {
+ break-inside: avoid;
+ -webkit-column-break-inside: avoid; /* webkit */
+ page-break-inside: avoid; /* moz */
+ overflow: hidden; /* webkit workaround */
+}
+#index nav a {
+ display: inline-block;
+ margin-top: 1em;
+}
+
+.units tbody tr:hover:not(.race) {
+ background: #EEE;
+}
+.unit-gas {
+ color: #040;
+}
+.unit-min, .unit-min a:not(:hover) {
+ color: #004;
+}
+.unit-supply {
+ color: #080;
+}
+.unit-o {color: #C08} /* organic */
+.unit-u {color: #44C} /* mechanic */
+.unit-p {color: #0A8} /* psionic */
+.unit-composed {
+ color: #C88;
+}
+.unit-air {
+ color: #08C;
+}
+.unit-x {color: #888}
+.unit-s {color: #890}
+.unit-m {color: #C70}
+.unit-l {color: #D22}
+.unit-h {color: #804}
+.magic-opt:before,
+.magic-opt:after {
+ color: #000;
+}
+.hurtrel, .units .hurtrel {
+ color: #778;
+}
+tbody .unit-shield {
+ color: #64A;
+}
+.unit-pdd {
+ color: #A8C;
+}
+.unit-splash {
+ color: #4A0;
+}
+.hurt-a {
+ color: #036;
+}
+.hurt-g {
+ color: #063;
+}
+.unit-massive {
+ color: #D88;
+}
+.unit-detect::before {
+ color: #0A8;
+}
+.unit-jump {
+ color: #8A4;
+}
+body .magic-perma {
+ text-decoration-color: #8C0;
+ -moz-text-decoration-color: #8C0;
+ -webkit-text-decoration-color: #8C0;
+}
+