@import url("fonts/fonts.css"); /* See fonts/LICENSE.md */ /* Base */ :root { --primary-color: #60c030; --secondary-color: #ffffff; --background-color: #111; --foreground-color: #ccc; --link-color: #9fff6f; --dim-color: #888; --box-shadow-style: inset 0 -1px 0; --fast: 0.2s; --slow: 0.4s; } *, *::before, *::after { max-width: 100%; transition: all var(--fast); } /* Typography */ html { /* 1rem works out at 20px. */ font-size: 1.25em; } body { background-color: var(--background-color); color: var(--foreground-color); font-family: "HK Grotesk", sans-serif; font-variant-ligatures: no-common-ligatures; font-weight: 300; line-height: 2rem; } code, kbd, samp { font-family: "Fira Mono", monospace; /* Better match surrounding HK Grotesk. */ font-size: 0.9rem; } :link, :visited { color: var(--link-color); font-weight: 400; opacity: 0.8; box-shadow: var(--box-shadow-style) transparent; } :link:focus, :link:hover, :visited:focus, :visited:hover { opacity: 1; filter: none; box-shadow: var(--box-shadow-style) currentcolor; outline: 0; } /* Layout */ html, body { margin: 0; padding: 0; } body { display: grid; grid-template-columns: 1rem 1fr minmax(1rem, 40rem) 1fr 1rem; } body > * { grid-column: 3/4; } /* Top and bottom navigation, article footer */ .topnav { margin-top: 10vh; margin-bottom: 1rem; } footer { border-top: 1px solid; margin-top: -1px; margin-bottom: 1rem; } .bottomnav { border-top: 1px solid; margin-top: -1px; margin-bottom: 10vh; } /* Logo */ .logo { display: block; position: relative; height: 4rem; width: 4rem; margin-bottom: -0.5rem; margin-left: auto; margin-right: auto; padding-bottom: 0.5rem; } .logo circle { fill: var(--primary-color); stroke-width: 0; } .logo path { fill: var(--secondary-color); } .bottomnav .logo { margin-top: 2rem; } .bottomnav .logo circle { fill: var(--background-color); stroke: var(--dim-color); stroke-width: 12px; } .bottomnav .logo path { fill: var(--dim-color); } .bottomnav a .logo circle { stroke: var(--link-color); } .bottomnav a .logo path { fill: var(--link-color); } .logo span { display: block; position: absolute; top: 0; left: 5rem; line-height: 4rem; opacity: 0; transition-property: opacity; } .logo:focus span, .logo:hover span { height: auto; width: auto; opacity: 1; } /* Nearby pages */ nav.nearby { display: block; margin-top: 1rem; } nav.nearby a { display: block; margin-top: 1rem; margin-right: 1rem; } nav.nearby a span { display: inline-block; width: 1rem; margin-right: 1rem; } nav.nearby a[rel="up"] span { content: "↑ "; } nav.nearby a[rel="next"] span { content: "→ "; } nav.nearby a[rel="prev"] span { content: "← "; } @media (min-width: 42rem) { nav.nearby { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-right:0; } nav.nearby a { grid-row: 1/2; margin-top: 0; margin-right: 0; text-align: center; } nav.nearby a span { width: 100%; } nav.nearby a[rel="up"] { grid-column: 2/3; text-align: center; } nav.nearby a[rel="next"] { grid-column: 3/4; text-align: right; } nav.nearby a[rel="prev"] { grid-column: 1/2; text-align: left; } } /* Page heading */ header { margin-bottom: 1rem; } .pagetitle { margin-top: 0; margin-bottom: 0; padding-top: 1rem; padding-bottom: 1rem; font-size: 2rem; line-height: 2rem; text-align: center; } summary { display: block; box-shadow: var(--box-shadow-style) transparent; cursor: pointer; } summary:focus, summary:hover { outline: 0; box-shadow: var(--box-shadow-style) currentcolor; } summary::before { content: "⋮"; line-height: 2rem; width: 1rem; padding-top: 1rem; padding-left: 1rem; float: right; text-align: center; } details[open] summary::before { content: "×"; } summary::-webkit-details-marker { display: none; } summary h1::before { /* Keep the summary centred. */ content: " "; height: 2rem; width: 1rem; padding-right: 1rem; float: left; } details > section { border-bottom: 1px solid; margin-top: 1rem; padding-bottom: calc(1rem - 1px); } details > section > * { display: inline-block; margin-right: 1rem; opacity: 0; transition: opacity var(--slow); } details[open] > section > * { opacity: 1; } header .image { /* The height is overridden by inline styles for some articles. */ height: 4rem; background-position: center; background-size: cover; opacity: 0.5; } /* Lists of links */ footer .smalllinks { margin-top: 1rem; margin-bottom: 1rem; } .smalllinks ul { display: inline; padding-left: 0; } .smalllinks li { display: inline; } .smalllinks h2, .smalllinks a { display: inline-block; margin-top: 0; margin-bottom: 0; margin-right: 1rem; } .biglinks { margin-top: 1rem; margin-bottom: 1rem; padding-left: 0; list-style-type: none; } .biglinks li { margin-top: 1rem; color: var(--dim-color); } .biglinks li a { display: block; } .biglinks li a > * { display: inline-block; margin-right: 1rem; } .biglinks li strong { display: inline-block; margin-top: 0; margin-bottom: 0; font-weight: 700; } .biglinks li a strong ~ * { color: var(--dim-color); } .biglinks li a:focus strong ~ *, .biglinks li a:hover strong ~ * { color: var(--link-color); } /* Headings */ h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0; font-size: 1rem; font-weight: 300; } article > main h1, article > main h2, article > main h3, article > main h4, article > main h5, article > main h6 { margin-top: 2rem; margin-bottom: 1rem; } article > main section h1, article > main h4 { font-size: 1.7rem; } article > main section section h1, article > main h5 { font-size: 1.4rem; } article > main section section section h1, article > main h6 { font-size: 1.1rem; } /* Common structures */ a { text-decoration: none; } address { font-style: inherit; } aside, .inset { max-width: 50%; float: right; margin-left: 1rem; } blockquote { margin-left: 2rem; margin-right: 2rem; } figure { margin-left: 0rem; margin-right: 0rem; } figure + figure { border-top: 1px solid; margin-top: -1px; } figcaption { margin-left: 2rem; margin-right: 2rem; } figcaption > * { display: inline-block; margin-right: 1rem; } hr { height: 0; border: 0; border-top: 1px solid; margin-top: calc(1rem - 1px); margin-bottom: 1rem; padding: 0; color: var(--foreground-color); } img, object { display: inline-block; margin-left: auto; margin-right: auto; text-align: center; } ol, ul { margin-left: 0; padding-left: 1rem; } p { margin-top: 1rem; margin-bottom: 1rem; } pre { line-height: 1rem; } strong { /* Without this, the weight increases from 300 to 400, which isn't distinct enough. */ font-weight: 700; }