/* webshit weekly. One file, no build step. In the spirit of n-gate.com: Comic Sans, small caps, green links. */

/* Comic Neue (SIL OFL 1.1, see fonts/OFL.txt), self-hosted for visitors without Comic Sans.
   local() first, so an installed copy is used instead of downloading. */
@font-face {
  font-family: "Comic Neue";
  src: local("Comic Neue"), local("ComicNeue-Regular"), url("fonts/comic-neue-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Comic Neue";
  src: local("Comic Neue Bold"), local("ComicNeue-Bold"), url("fonts/comic-neue-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #eee;
  --fg: #111;
  --muted: color-mix(in srgb, var(--fg) 60%, transparent);
  --link: #406940;
  --rule: color-mix(in srgb, var(--fg) 15%, transparent);
  --measure: 46rem;
  /* n-gate's stack. Comic Sans where installed; everyone else gets the bundled Comic Neue. */
  font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", "VGA", cursive;
  line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #222; --fg: #dcdccc; --link: #7f9f7f; }
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0 auto;
  padding: 1rem clamp(1rem, 5vw, 3rem) 3rem;
  max-width: calc(var(--measure) + 18rem);
  background: var(--bg);
  color: var(--fg);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
}
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
.small, .smalldate, .meta, #headerSubTitle { color: var(--muted); font-size: 0.8em; }

/* header, as on n-gate: "site. tagline" */
#header h1 { font-size: 1.6rem; margin: 0 0 1.5rem; }
#header h1 a { color: inherit; text-decoration: none; }
#headerSubTitle { font-weight: normal; }

/* navigation panel: floated right, small caps, current path in bold */
#side-bar { float: right; margin: 0 0 1rem 2rem; font-variant: small-caps; font-size: 0.95em; }
#side-bar * { font-variant: small-caps; }
#side-bar .sideBarTitle { margin: 0 0 0.25rem; }
#side-bar ul { list-style: none outside; margin: 0; padding-inline-start: 1em; }
#side-bar > ul { padding-inline-start: 0.25em; }
#side-bar a { text-decoration: none; }
#side-bar a:hover { text-decoration: underline; }
.thisPage { font-weight: bold; }
@media (max-width: 40rem) {
  #side-bar { float: none; margin: 0 0 1.5rem; padding-block-end: 0.75rem; border-block-end: 1px solid var(--rule); }
}

#main-copy { max-width: var(--measure); }
#main-copy h2 { font-size: 1.4rem; margin-block: 0 0.5rem; }
.intro { margin-block-end: 2rem; }

.entry { margin-block: 0 1.75rem; }
.storylink { font-size: 1.15em; font-variant: small-caps; font-weight: normal; margin: 0; }
.entry .meta { margin: 0.1rem 0 0.35rem; }
.entry p:last-child { margin-block-start: 0; }

.issues { list-style: none; padding: 0; }
.issues li { margin-block: 0.35rem; }

.pager { display: flex; justify-content: space-between; gap: 1rem; border-block-start: 1px solid var(--rule);
         padding-block-start: 1rem; font-variant: small-caps; }
#footer { clear: both; margin-block-start: 3rem; padding-block-start: 0.5rem; border-block-start: 1px solid var(--rule); }
#footer p { margin-block: 0.5rem; }

/* pricing page: a straight-faced SaaS pricing table */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-block: 1.5rem; }
.plan { position: relative; border: 1px solid var(--rule); border-radius: 0.75rem; padding: 1rem 1.25rem; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--link); box-shadow: 0 0 0 1px var(--link); }
.plan h3 { margin: 0; font-variant: small-caps; }
.plan .price { font-size: 1.6em; margin: 0.25rem 0 0.5rem; }
.plan .price .small { font-size: 0.5em; }
.plan .billing { margin: -0.5rem 0 0.5rem; }
code { font-size: 0.85em; }
.plan ul { padding-inline-start: 1.1em; margin: 0 0 1rem; flex: 1; }
.plan .badge { position: absolute; inset-block-start: -0.8em; inset-inline-start: 1rem; margin: 0; padding: 0 0.5em;
               background: var(--bg); color: var(--link); font-size: 0.75em; font-variant: small-caps; }
.button { display: inline-block; padding: 0.4em 0.9em; border-radius: 0.5em; border: 1px solid var(--link); color: var(--link);
          text-decoration: none; font-variant: small-caps; }
.button[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.button.current { border-style: dashed; color: var(--muted); border-color: var(--muted); }
.fineprint { margin-block-start: 2rem; }

/* the gate: NOT n-gate (NAND) = AND */
.gate.logo { height: 0.95em; width: 0.95em; vertical-align: -0.12em; margin-inline-end: 0.3em; }
.circuit { height: 1.1em; width: auto; vertical-align: -0.3em; color: var(--muted); }
.circuit.big { height: 3rem; color: var(--fg); }
.notgate a:has(.circuit) { text-decoration: none; }
.truth { border-collapse: collapse; margin-block: 1rem; font-size: 0.9em; }
.truth th, .truth td { border: 1px solid var(--rule); padding: 0.3em 0.7em; text-align: center; }
.truth th { font-weight: normal; font-variant: small-caps; }
.truth tr:last-child td:last-child { color: var(--link); font-weight: bold; }
