@charset "UTF-8";

/* DJR fun fonts */

@font-face {
  font-family: "Megazoid";
  src: url("/fonts/Megazoid-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Bradley Initials DJR";
  src: url("/font/djr/BradleyInitialsDJR-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Job Clarendon";
  src: url("/font/djr/JobClarendonVariable-VF.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
}

@font-face {
  font-family: "Map Roman";
  src: url("/font/djr/MapRomanVariable-VF.woff2") format("woff2");
  font-style: normal;
  font-weight: normal;
  font-stretch: 50% 100%;
}

@font-face {
  font-family: "Clavichord";
  src: url("/font/djr/ClavichordVariable-VF.woff2") format("woff2");
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "Megabase";
  src: url("/font/djr/Megabase-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: normal;
}



/* less fun fonts */

@font-face {
  font-family: "JetBrains Mono";
  src: url("/font/jetbrains-nl/JetBrainsMonoNL-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/font/jetbrains-nl/JetBrainsMonoNL-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: normal;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/font/jetbrains-nl/JetBrainsMonoNL-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: bold;
}

@font-face {
  font-family: "Noto Emoji";
  src: url("/font/noto-emoji/NotoEmoji-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
}

:root {
  --font-size: 1.25rem;
  --line-height: 2rem;
  --column-width: 36rem;
  --column-gap: 2rem;

  --board-shadow-offset: 2rem;

  /* -- fun fonts  -- */

  --f-megazoid: "Megazoid";
  --f-mz: var(--f-megazoid);

  --f-bradley-initials: "Bradley Initials DJR";
  --f-bi: var(--f-bradley-initials);

  --f-job-clarendon: "Job Clarendon";
  --f-jc: var(--f-job-clarendon);

  --f-map-roman: "Map Roman";
  --f-mr: var(--f-map-roman);

  --f-clavichord: "Clavichord";
  --f-cc: var(--f-clavichord);

  --f-megabase: "Megabase";
  --f-mb: var(--f-megabase);

  /* Selected from Riso colors: https://www.stencil.wiki/colors */
  --c-medium-blue: #3255A4;
  --c-cornflower: #62A8E5;
  --c-blue: #0078BF;
  --c-teal: #00838A;
  --c-flat-gold: #BB8B41;
  --c-hunter-green: #407060;
  --c-green: #00A95C;
  --c-red: #FF665E;
  --c-marine-red: #D2515E;
  --c-yellow: #FFE800;
  --c-fluorescent-pink: #FF48B0;
  --c-fluorescent-orange: #FF7477;
  --c-light-gray: #88898A;
  --c-lighter-gray: #AAABA0;
  --c-midnight: #435060;
  --c-indigo: #484D7A;
  --c-brown: #925F52;
  --c-paper-dingy: #DDDDDD;
  --c-paper-bright: #EEEEEE;
  --c-black: #222222;

  /* -- end of Spring '83 variables -- */
}

::selection {
  background-color: var(--c-fluorescent-orange);
}

::-moz-selection {
  background-color: var(--c-fluorescent-orange);
}

*, *::before, *::after {
  box-sizing: border-box;
  text-rendering: optimizeLegibility;
}

* {
  margin: 0;
}

input,
button,
textarea,
select {
  font-family: inherit;
}

input {
  width: 100%;
}

html {
  position: relative;
  font-size: 11px; /* base rem */
  min-height: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: hidden;

  /* the expressive power of UNaliased text... */
  -webkit-font-smoothing: antialiased;
   -moz-font-smoothing: antialiased;
        font-smoothing: antialiased;

  background: none;
  background-color: transparent;
}

body {
  position: relative;
  font-family: "JetBrains Mono", "Noto Emoji";
  font-size: 1.25rem;
  line-height: 2rem;
  background-color: var(--c-paper-dingy);
  min-height: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

textarea {
   border: none;
  outline: none;
}

svg#riso-palette {
  display: none;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  hyphens: auto;
  margin: 0 0 2rem 0;
}

i {
  font-style: italic;
  font-weight: normal;
}

a,
a:link {
  color: var(--c-blue);
}

a:visited {
  color: var(--c-indigo);
}

a:active {
  color: var(--c-fluorescent-pink);
}

p {
  margin: 0 0 2rem 0;
}

main {
  display: block;
  width: 100%;
  min-height: 100%;
  height: 100%;
}

springfile-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;

  background-color: rgba(0, 0, 0, 0.5);
}

springfile-modal textarea {
  position: fixed;
  top: 10vh;
  left: 10vw;
  width: 80vw;
  height: 80vh;
  padding: 1rem;
  background-color: var(--c-paper-bright);
  color: var(--c-black);
  z-index: 10000;
}

preview-modal {
  display: none;
  justify-content: center;
  align-items: center;

  position: fixed;
  z-index: 100000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;

  background-color: rgba(0, 0, 0, 0.5);
}

preview-modal board-preview {
  display: block;
  width: var(--column-width);
  /*min-height: calc(var(--column-width) / 1.4142);*/
  height: calc(var(--column-width) / 0.7071); /* 1 / sqrt(2) */
  padding: 0;
  background-color: transparent;
  color: var(--c-black);
  z-index: 1000000;
}

/*
Here's the scoop on the "leaky" CSS styles, re: Shadow DOM stuff;
https://lamplightdev.com/blog/2019/03/26/why-is-my-web-component-inheriting-styles/
*/

item-zone {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(100vw - var(--column-width));
  min-height: 100%;
}

main.minimized item-zone {
  width: 100vw;
}

main.minimized editor-zone {
  display: none;
}

item-banner {
  display: block;
  width: 100%;
  border-bottom: 1px dashed var(--c-indigo);
  margin: 2rem 0 2rem 0;
}

item-banner h1 {
  max-width: 40vw;
  font-family: "Times New Roman", "Times", serif;
  font-style: italic;
  line-height: 4rem;
  font-size: 3rem;
  text-align: center;
  margin: 0 auto 2rem auto;
}

item-banner h1 img {
  max-width: 100%;
}

item-banner h2 {
  line-height: 2rem;
  font-size: 1.25rem;
  text-align: center;
  margin: 0 0 2rem 0;
}

item-grid {
  position: relative;
  display: block;
  /*
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--column-width), 1fr));
  gap: 0;
  justify-items: center;
  align-items: center;
  */

  /* I love CSS columns!! */
  column-width: var(--column-width);
  column-count: auto;

  padding: 0 1rem 0 1rem;
  width: 100%;
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

board-item {
  display: block;
  position: relative;
  width: var(--column-width);
  /*min-height: calc(var(--column-width) / 1.4142);*/
  height: calc(var(--column-width) / 0.7071); /* 1 / sqrt(2) */
  break-inside: avoid-column;
  margin: 0 auto 4rem auto;
  contain: size layout paint style; /* woohoo */
}

board-item board-area {
  display: block;
  position: relative;
  /* in JS, apply top+left offsets in the range 1 .. var(--board-jitter)/2 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--c-paper-dingy);
}

/* This skinny little label goes across the top */
board-item board-area board-label {
  display: block;
  position: relative;
  top: 0;
  left: 2rem;
  width: 100%;
  height: 2rem;
  font-size: 1.25rem;
  color: var(--c-light-gray);
}

board-item board-area board-label:after {
  display: inline-block;
  content: '* * * Updated * * *';
  margin: 0 0 0 0.5rem;
  opacity: 0.0;
  color: var(--c-red);
  transition: opacity 10s ease-out;
}

board-item.refreshed board-area board-label:after {
  opacity: 1.0;
  transition: none; /* "snap" to this state */
}

/* Remember, these all "beat" the Shadow DOM declarations */
board-item board-area board-content {
  display: block;
  position: absolute;
  top: 2rem;
  left: var(--board-shadow-offset);
  width: calc(100% - var(--board-shadow-offset));
  /* -2rem for the board-label: */
  height: calc(100% - 2rem - var(--board-shadow-offset));
  border: none;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 100;
  contain: size layout paint style; /* woohoo */
}

board-item board-area view-source {
  display: block;
  position: absolute;
  /* adding height of label to shadow offset */
  top: calc(2rem + var(--board-shadow-offset));
  left: 0;
  width: calc(100% - var(--board-shadow-offset));
  /* -2rem for the board-label: */
  height: calc(100% - 2rem - var(--board-shadow-offset));
  overflow-y: hidden;
  z-index: 10;
  cursor: pointer;
}

board-item view-source textarea {
  display: block;
  font-size: 1.25rem;
  line-height: 2rem;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.125);
  color: var(--c-paper-bright);
  border-radius: 0;
  resize: none;
  cursor: pointer;
  padding: 1rem;
}

 board-item view-source textarea.showing {
  background-color: var(--c-midnight);
 }

/* preview */

board-item.preview input {
  width: 100%;
  border: none;
}

board-item.preview board-area,
board-item.preview board-area board-content {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* onward */

feed-item {
  position: relative;
  min-width: var(--column-width);
  break-inside: avoid-column;
}

feed-item feed-area {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;

  /* in JS, apply top+left offsets in the range 1 .. var(--board-jitter)/2 */
  top: 0;
  left: 0;
  width: 100%;
  height: auto;

  padding: 2rem;
}

feed-item feed-area h1 {
  font-size: 1.25rem;
  margin: 0 0 0 0;
  color: var(--c-light-gray);
  text-align: center;
}

feed-item feed-area h2 {
  font-size: 1.25rem;
  margin: 0 0 0.125rem 0;
  text-align: center;
}

feed-item feed-area p {
  font-size: 1.25rem;
  color: var(--c-red);
  text-align: center;
}

editor-zone {
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 1rem;
  width: var(--column-width);
  height: 100vh;
  background-color: var(--c-hunter-green);
  color: var(--c-paper-dingy);
  padding: 1rem;
  overflow-y: auto;
}

editor-zone h1 {
  font-size: 2.0rem;
  line-height: 2rem;
  margin: 0 0 2rem 0;
  font-weight: normal;
  color: var(--c-black);
}

editor-zone p {
  margin: 0 0 0 0;
}

editor-zone drop-zone {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background-color: var(--c-cornflower);

  padding: 2rem;
  /* this is a hack, because I don't know why I'm getting overflow-x in the first place */
  overflow-x: hidden;
}

editor-zone drop-zone p {
  text-align: center;
  color: var(--c-black);
  margin: 0 0 2rem 0;
}

editor-zone drop-zone a,
editor-zone drop-zone a:link,
editor-zone drop-zone a:visited {
  color: var(--c-black);
}

editor-zone drop-zone a:hover,
editor-zone drop-zone a:active {
  color: var(--c-yellow);
}

editor-zone drop-zone.drop-glow {
  border: 2px solid var(--c-yellow);
}

editor-zone drop-zone label {
  display: block;
  background-color: var(--c-blue);
  color: var(--c-black);
  cursor: pointer;
  height: 2rem;
  line-height: 2rem;
  padding: 0 0.5rem 0 0.5rem;
  user-select: none;
  margin: 0 0 2rem 0;
}

editor-zone drop-zone label:hover {
  color: var(--c-yellow);
}

editor-zone drop-zone input[type=file] {
  display: block;
  width: auto;
  color: var(--c-black);
}

editor-zone server-zone {
  display: flex;
  flex-direction: column;
  width: 100%;
}

editor-zone server-zone server-choice {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

editor-zone server-choice label {
  display: inline-block;
  width: auto;
}

editor-zone server-choice select {
  display: inline-block;
  width: auto;
}

editor-zone key-zone {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
}

editor-zone key-display {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}

editor-zone key-display p {
  text-align: left;
  height: 2rem;
}

editor-zone publish-button {
  position: relative;
  width: 100%;
  height: 6rem;
  line-height: 6rem;
  font-size: 2rem;
  background-color: var(--c-green);
  color: var(--c-paper-bright);
  cursor: pointer;
  text-align: center;
  padding: 0;
}

editor-zone publish-button:hover {
  background-color:  var(--c-flat-gold);
  color: var(--c-yellow);
}

editor-zone publish-button.byte-overflow {
  cursor: not-allowed;
  color: var(--c-light-gray);
  background-color: var(--c-midnight);
}

editor-zone publish-button.byte-overflow:hover {
  background-color: var(--c-midnight);
}

editor-zone action-row {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  font-size: 1.25rem;
  line-height: 2rem;
  gap: 1rem;
  width: 100%;
  height: 2rem;
}

editor-zone action-row p {
  display: block;
  color: var(--c-paper-dingy);
  margin: 0 0 0 0;
}

editor-zone action-row action-link {
  display: block;
  background-color: var(--c-flat-gold);
  color: var(--c-black);
  cursor: pointer;
  height: 2rem;
  line-height: 2rem;
  padding: 0 0.5rem 0 0.5rem;
  user-select: none;
  margin: 0 0 0 0;
}

editor-zone action-row action-link.load-keypair {
  padding:  0 0 0 0;
}

editor-zone action-row action-link label {
  display: block;
  height: 2rem;
  padding: 0 0.25rem 0 0.25rem;
  background-color: var(--c-red);
  cursor: not-allowed;
}

editor-zone action-row .dangerous {
  background-color: var(--c-marine-red);
  cursor: not-allowed;
}

action-link:hover {
  color: var(--c-yellow);
}

editor-zone editor-meta {
  color: #abb2bf; /* following ace one-dark theme */
  width: 100%;
  font-size: 1.25rem;
  height: auto;
}

editor-zone byte-counter {
  width: 100%;
  height: 2rem;
  text-align: right;
}

editor-zone byte-counter.byte-overflow {
  color: var(--c-black);
}

editor-wrap {
  position: relative;
  width: 100%;
  min-height: 24rem;
  flex-grow: 100;
  flex-basis: 1;
  font-variant-ligatures: none;
}

pre.editor {
  display: block;
  position: relative;
  width: auto;
  min-height: 100%;
  line-height: 2rem;
}

@media only screen and (max-width: 800px) {
  item-zone {
    display: none;
  }

  editor-zone {
    width: 100%;
  }
}

/* ACE EDITOR THEME */

.ace-spring-client .ace_gutter {
  background: none;
  color: none;
}

.ace-spring-client .ace_print-margin {
  width: 1px;
  background: var(--c-paper-bright);
}

.ace-spring-client {
  background-color: var(--c-black);
  color: var(--c-paper-bright);
}

.ace-spring-client .ace_cursor {
  color: var(--c-fluorescent-pink);
}

.ace-spring-client .ace_marker-layer .ace_selection {
  background: var(--c-midnight);
}

.ace-spring-client.ace_multiselect .ace_selection.ace_start {

  box-shadow: 0 0 3px 0 #000;
  border-radius: 2px

}

.ace-spring-client .ace_marker-layer .ace_step {
  background: var(--c-teal);
}

.ace-spring-client .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid var(--c-fluorescent-pink);
}

.ace-spring-client .ace_marker-layer .ace_active-line {
  background: rgba(255, 255, 255, 0.125);
}

.ace-spring-client .ace_gutter-active-line {
    /*
    background-color: rgba(76, 87, 103, .19)
    */
}

.ace-spring-client .ace_marker-layer .ace_selected-word {
  border: 1px solid var(--c-midnight);
}

.ace-spring-client .ace_fold {
  background-color: var(--c-cornflower);
  border-color: var(--c-light-gray);
}

.ace-spring-client .ace_keyword {
  color: var(--c-fluorescent-orange);
}

.ace-spring-client .ace_keyword.ace_operator {
  color: var(--c-fluorescent-orange);
}

.ace-spring-client .ace_keyword.ace_other.ace_unit {
  color: var(--c-fluorescent-pink);
}

.ace-spring-client .ace_constant.ace_language {
  color: var(--c-fluorescent-pink);
}

.ace-spring-client .ace_constant.ace_numeric {
  color: var(--c-fluorescent-pink);
}

.ace-spring-client .ace_constant.ace_character {
  color: var(--c-teal);
}

.ace-spring-client .ace_constant.ace_other {
  color: var(--c-teal);
}

.ace-spring-client .ace_support.ace_function {
  color: var(--c-cornflower);
}

.ace-spring-client .ace_support.ace_constant {
  color: var(--c-fluorescent-orange);
}

.ace-spring-client .ace_support.ace_class {
  color: var(--c-flat-gold);
}

.ace-spring-client .ace_support.ace_type {
  color: var(--c-flat-gold);
}

.ace-spring-client .ace_storage {
  color: var(--c-fluorescent-pink);
}

.ace-spring-client .ace_storage.ace_type {
  color: var(--c-fluorescent-pink);
}

.ace-spring-client .ace_invalid {
  color: var(--c-paper-bright);
  background-color: var(--red);
}

.ace-spring-client .ace_invalid.ace_deprecated {
  color: var(--c-black);
  background-color: var(--c-red);
}

.ace-spring-client .ace_string {
  color: var(--c-teal);
}

.ace-spring-client .ace_string.ace_regexp {
  color: var(--c-red);
}

.ace-spring-client .ace_comment {
  font-style: italic;
  color: var(--c-light-gray);
}

.ace-spring-client .ace_variable {
  color: var(--c-red);
}

.ace-spring-client .ace_variable.ace_parameter {
  color: var(--c-flat-gold);
}

.ace-spring-client .ace_meta.ace_tag {
  color: var(--c-red);
}

.ace-spring-client .ace_entity.ace_other.ace_attribute-name {
  color: var(--c-red);
}

.ace-spring-client .ace_entity.ace_name.ace_function {
  color: var(--c-cornflower);
}

.ace-spring-client .ace_entity.ace_name.ace_tag {
  color: var(--c-red);
}

.ace-spring-client .ace_markup.ace_heading {
  color: var(--c-green);
}

.ace-spring-client .ace_indent-guide {

}