@font-face {
  font-family: 'CommitMono-Regular';
  src: url('CommitMono-Regular.woff2') format('woff2');
}

a,
abbr,
acronym,
address,
applet,
article,
aside,
audio,
b,
big,
blockquote,
body,
canvas,
caption,
center,
cite,
code,
dd,
del,
details,
dfn,
div,
dl,
dt,
embed,
em,
figure,
figcaption,
fieldset,
footer,
form,
h1,
h2,
h3,
h4,
h5,
h6,
header,
hgroup,
html,
i,
iframe,
img,
ins,
kbd,
label,
legend,
li,
mark,
menu,
nav,
object,
ol,
output,
p,
pre,
q,
ruby,
s,
samp,
section,
small,
span,
strike,
strong,
sub,
summary,
sup,
table,
tbody,
td,
tfoot,
th,
thead,
time,
tr,
tt,
u,
ul,
var,
video {
  border: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  vertical-align: baseline;
}

a {
  background: var(--theme-border-subdued);
  color: var(--theme-text);

  &:hover {
    background: var(--theme-focused-foreground);
    color: var(--theme-text);
  }

  &:focus {
    background: var(--theme-focused-foreground);
    color: var(--theme-text);
    outline: 0;
  }
}

ul {
  list-style-position: inside;
  list-style-type: 'â–ª';
  text-indent: -1ch;
}

ol {
  list-style-type: '';
  list-style-position: inside;
  counter-reset: cupcake;
  text-indent: -1ch;
}

ul ul,
ul ol,
ol ul,
ol ol {
  padding-left: 2ch;
}

ol li {
  padding-left: 1ch;
  counter-increment: cupcake;
}

ul li:before {
  content: ' ';
  display: inline-block;
  width: 1ch;
  height: 0;
  visibility: hidden;
}

ol li:before {
  content: counters(cupcake, '.') '. ';
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

body.theme-blue {
  --theme-overlay: var(--color-blue-20-5);
  --theme-background: var(--color-blue-80);
  --theme-background-modal: var(--color-blue-70);
  --theme-background-modal-footer: var(--color-blue-90);
  --theme-background-input: var(--color-blue-60);
  --theme-border: var(--color-blue-70);
  --theme-border-subdued: var(--color-blue-60-2);
  --theme-error: var(--color-red-60);
  --theme-error-subdued: var(--color-red-60-3);
  --theme-primary: var(--color-gold-30);
  --theme-success: var(--color-green-60);
  --theme-success-subdued: var(--color-green-60-3);
  --theme-text: var(--color-blue-10);

  --theme-button: var(--color-blue-10);
  --theme-button-text: var(--color-blue-80);

  --theme-button-foreground: var(--color-blue-60);
  --theme-button-background: var(--color-blue-70);
  --theme-focused-foreground: var(--color-blue-50);
  --theme-focused-foreground-subdued: var(--color-blue-50-5);
}

body.theme-light {
  --theme-overlay: var(--color-black-100-4);
  --theme-background: var(--color-white);
  --theme-background-modal: var(--color-gray-20);
  --theme-background-modal-footer: var(--color-gray-40);
  --theme-background-input: var(--color-gray-10);
  --theme-border: var(--color-gray-20);
  --theme-border-subdued: var(--color-gray-40-2);
  --theme-error: var(--color-red-60);
  --theme-error-subdued: var(--color-red-60-3);
  --theme-primary: var(--color-blue-60);
  --theme-success: var(--color-neon-green-70);
  --theme-success-subdued: var(--color-neon-green-70-3);
  --theme-text: var(--color-black-100);

  --theme-button: var(--color-black-100);
  --theme-button-text: var(--color-white);

  --theme-button-foreground: var(--color-gray-30);
  --theme-button-background: var(--color-gray-20);
  --theme-focused-foreground: var(--color-neon-green-50);
  --theme-focused-foreground-subdued: var(--color-neon-green-50-5);
}

.theme-dark {
  --theme-overlay: var(--color-black-100-4);
  --theme-background: var(--color-black-100);
  --theme-background-modal: var(--color-gray-80);
  --theme-background-modal-footer: var(--color-gray-70);
  --theme-background-input: var(--color-gray-60);
  --theme-border: var(--color-gray-80);
  --theme-border-subdued: var(--color-gray-70-3);
  --theme-error: var(--color-red-60);
  --theme-error-subdued: var(--color-red-60-3);
  --theme-primary: var(--color-gold-30);
  --theme-success: var(--color-green-60);
  --theme-success-subdued: var(--color-green-60-3);
  --theme-text: var(--color-white);

  --theme-button: var(--color-white);
  --theme-button-text: var(--color-black-100);

  --theme-button-foreground: var(--color-gray-90);
  --theme-button-background: var(--color-gray-80);
  /*
  --theme-focused-foreground: var(--color-daybreak-10);
  --theme-focused-foreground-subdued: var(--color-daybreak-10-5);*/
  --theme-focused-foreground: var(--color-neon-green-80);
  --theme-focused-foreground-subdued: var(--color-neon-green-70);
}

body.theme-green {
  --theme-overlay: var(--color-neon-green-100-4);
  --theme-background: rgba(44, 255, 5);

  --theme-background-modal: var(--color-neon-green-50);
  --theme-background-modal-footer: var(--color-neon-green-50-5);
  --theme-background-input: var(--color-neon-green-30);
  --theme-border: var(--color-neon-green-60);
  --theme-border-subdued: var(--color-neon-green-60-3);
  --theme-error: var(--color-red-60);
  --theme-error-subdued: var(--color-red-60-3);
  --theme-primary: var(--color-gold-30);
  --theme-success: var(--color-green-60);
  --theme-success-subdued: var(--color-green-60-3);
  --theme-text: var(--color-neon-green-100);

  --theme-button: var(--color-neon-green-100);
  --theme-button-text: var(--color-neon-green-10);

  --theme-button-foreground: var(--color-neon-green-80);
  --theme-button-background: var(--color-neon-green-70);
  --theme-focused-foreground: rgba(255, 82, 243, 1);
  --theme-focused-foreground-subdued: rgba(255, 82, 243, 0.5);
}

html,
body {
  --color-black-100: rgba(0, 0, 0, 1);
  --color-black-100-1: rgba(0, 0, 0, 0.1);
  --color-black-100-2: rgba(0, 0, 0, 0.2);
  --color-black-100-4: rgba(0, 0, 0, 0.4);
  --color-black-daybreak-100: rgba(4, 2, 0, 1);
  --color-black-daybreak-100-4: rgba(4, 2, 0, 0.4);
  --color-blue-10: rgba(237, 245, 255, 1);
  --color-blue-100: rgba(0, 17, 65, 1);
  --color-blue-20: rgba(208, 226, 255, 1);
  --color-blue-20-1: rgba(208, 226, 255, 0.1);
  --color-blue-20-2: rgba(208, 226, 255, 0.2);
  --color-blue-20-5: rgba(208, 226, 255, 0.5);
  --color-blue-30: rgba(166, 200, 255, 1);
  --color-blue-40: rgba(120, 169, 255, 1);
  --color-blue-50: rgba(69, 137, 255, 1);
  --color-blue-50-5: rgba(69, 137, 255, 0.5);
  --color-blue-60: rgba(15, 98, 254, 1);
  --color-blue-60-2: rgba(15, 98, 254, 0.2);
  --color-blue-70: rgba(0, 67, 206, 1);
  --color-blue-80: rgba(0, 45, 156, 1);
  --color-blue-80-4: rgba(0, 45, 156, 0.4);
  --color-blue-80-6: rgba(0, 45, 156, 0.6);
  --color-blue-90: rgba(0, 29, 108, 1);
  --color-blue-90-6: rgba(0, 29, 108, 0.6);
  --color-daybreak: rgba(255, 108, 4, 1);
  --color-daybreak-1: rgba(255, 108, 4, 0.1);
  --color-daybreak-10: rgba(239, 99, 0, 1);
  --color-daybreak-10-5: rgba(239, 99, 0, 0.5);
  --color-daybreak-2: rgba(255, 108, 4, 0.2);
  --color-daybreak-20: rgba(220, 91, 0, 1);
  --color-daybreak-30: rgba(200, 83, 0, 1);
  --color-daybreak-4: rgba(255, 108, 4, 0.4);
  --color-daybreak-40: rgba(180, 75, 0, 1);
  --color-daybreak-40-2: rgba(180, 75, 0, 0.2);
  --color-daybreak-50: rgba(161, 67, 0, 1);
  --color-daybreak-60: rgba(141, 59, 0, 1);
  --color-daybreak-70: rgba(121, 50, 0, 1);
  --color-daybreak-70-3: rgba(121, 50, 0, 0.3);
  --color-daybreak-80: rgba(102, 42, 0, 1);
  --color-daybreak-90: rgba(82, 34, 0, 1);
  --color-gold-30: rgba(241, 194, 27, 1);
  --color-gray-10: rgba(244, 244, 244, 1);
  --color-gray-100: rgba(22, 22, 22, 1);
  --color-gray-20: rgba(224, 224, 224, 1);
  --color-gray-20-7: rgba(224, 224, 224, 0.7);
  --color-gray-30: rgba(198, 198, 198, 1);
  --color-gray-30-7: rgba(224, 224, 224, 0.7);
  --color-gray-40: rgba(168, 168, 168, 1);
  --color-gray-40-2: rgba(168, 168, 168, 0.2);
  --color-gray-50: rgba(141, 141, 141, 1);
  --color-gray-60: rgba(111, 111, 111, 1);
  --color-gray-70: rgba(82, 82, 82, 1);
  --color-gray-70-3: rgba(82, 82, 82, 0.3);
  --color-gray-80: rgba(57, 57, 57, 1);
  --color-gray-80-6: rgba(57, 57, 57, 0.6);
  --color-gray-90: rgba(38, 38, 38, 1);
  --color-gray-90-6: rgba(38, 38, 38, 0.6);
  --color-green-60: rgba(25, 128, 56, 1);
  --color-green-60-3: rgba(25, 128, 56, 0.3);
  --color-neon-green-10: rgba(242, 255, 233, 1);
  --color-neon-green-100: rgba(10, 44, 2, 1);
  --color-neon-green-100-1: rgba(10, 44, 2, 0.1);
  --color-neon-green-100-2: rgba(10, 44, 2, 0.2);
  --color-neon-green-100-4: rgba(10, 44, 2, 0.4);
  --color-neon-green-20: rgba(213, 255, 191, 1);
  --color-neon-green-30: rgba(178, 255, 148, 1);
  --color-neon-green-40: rgba(138, 255, 104, 1);
  --color-neon-green-50: rgba(92, 255, 59, 1);
  --color-neon-green-50-5: rgba(92, 255, 59, 0.5);
  --color-neon-green-60: rgba(46, 231, 29, 1);
  --color-neon-green-60-3: rgba(46, 231, 29, 0.3);
  --color-neon-green-70: rgba(0, 207, 0, 1);
  --color-neon-green-70-3: rgba(0, 207, 0, 0.3);
  --color-neon-green-70-7: rgba(0, 207, 0, 0.7);
  --color-neon-green-80: rgba(0, 159, 0, 1);
  --color-neon-green-80-1: rgba(0, 159, 0, 0.1);
  --color-neon-green-80-2: rgba(0, 159, 0, 0.2);
  --color-neon-green-80-4: rgba(0, 159, 0, 0.4);
  --color-neon-green-90: rgba(16, 107, 2, 1);
  --color-red-60: rgba(218, 30, 40, 1);
  --color-red-60-3: rgba(218, 30, 40, 0.3);
  --color-white: rgba(255, 255, 255, 1);
  --color-white-1: rgba(255, 255, 255, 0.1);
  --color-white-2: rgba(255, 255, 255, 0.2);
  --color-white-4: rgba(255, 255, 255, 0.4);

  --font-family: -apple-system, BlinkMacSystemFont, helvetica neue, helvetica, sans-serif;
  --font-family-mono: 'CommitMono-Regular', Consolas, monaco, monospace;
  --font-family-serif: Georgia, Times New Roman, serif;

  --theme-text: var(--color-black-100);
  --theme-line-height-base: 1.25;
  --font-size: 16px;

  --z-index-page: 1;
  --z-index-select: 3;
  --z-index-page-tooltips: 4;
  --z-index-page-popover: 5;
  --z-index-page-dropdown-menus: 6;
  --z-index-modals: 10;

  background: var(--theme-background);
  color: var(--theme-text);
  font-family: var(--font-family-mono);
  line-height: calc(var(--theme-line-height-base) * 1rem);

  font-size: var(--font-size);
  font-optical-sizing: auto;
  font-weight: 400;
  font-variant-numeric: tabular-nums lining-nums;

  &::-webkit-scrollbar {
    background: transparent;
    height: calc(var(--theme-line-height-base) * 1rem);
    width: 1ch;
  }
  &::-webkit-scrollbar-track {
    background: var(--theme-background);
  }
  &::-webkit-scrollbar-thumb {
    background: var(--theme-border);
  }
  &::-webkit-scrollbar-thumb:hover {
    background: var(--theme-border);
  }
}

.body {
  font-family: var(--font-family-mono);
  max-width: 80ch;
}

.pixel {
  height: 1px;
  left: 0;
  position: absolute;
  top: 0;
  width: 1px;
}

.grid {
  display: block;
  padding: calc(var(--font-size) * var(--theme-line-height-base)) 2ch calc(var(--font-size) * var(--theme-line-height-base)) 2ch;
}

.row {
  display: block;
  outline: 0;
  border: 0;
  transition: 200ms ease background;

  &:focus {
     background: var(--theme-focused-foreground);
  }
}

.badge {
  display: inline-block;
  vertical-align: top;
  text-align: center;
  font-weight: 400;
  margin: 0;
  outline: 0;
  border: 0;
  font-family: var(--font-family-mono);
  font-size: 10px;
  min-height: calc(var(--theme-line-height-base) * var(--font-size));
  text-transform: uppercase;
  transition: 200ms ease all;
  background: var(--theme-border);
  padding: 0 1ch 0 1ch;
}

.action-bar {
  background: var(--theme-background);
  box-shadow: inset 0 0 0 1px var(--theme-border);
  position: fixed;
  top: 0;
  left: 2ch;
  z-index: 1;
}

.hotkey {
  background: var(--theme-button-foreground);
  color: var(--theme-text);
  flex-shrink: 0;
  cursor: pointer;
  font-weight: 400;
  transition: 200ms ease background;
  padding: 0 1ch 0 1ch;
  user-select: none;
  flex-shrink: 0;
  text-indent: 0ch;
}

.content {
  box-shadow: inset 0 0 0 2px var(--theme-button-foreground);
  background: var(--theme-button-background);
  text-indent: 0ch;
  min-width: 10%;
  width: 100%;
  font-weight: 400;
  cursor: pointer;
  padding: 0 1ch 0 1ch;
  text-transform: uppercase;
  transition: 200ms ease background;
  user-select: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: 0;
  border: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family-mono);
  font-size: var(--font-size);
  text-decoration: none;

  &:hover .hotkey {
    background: var(--theme-focused-foreground);
  }

  &:hover .content {
    box-shadow: inset 0 0 0 2px var(--theme-focused-foreground);
  }

  &:focus .hotkey {
    background: var(--theme-focused-foreground);
  }

  &:focus .content {
    box-shadow: inset 0 0 0 2px var(--theme-focused-foreground);
  }
}

.selected {
  .content {
    background: var(--theme-focused-foreground);
  }
}

.actionlistitem {
  align-items: flex-start;
  background: transparent;
  color: var(--theme-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  outline: 0;
  border: 0;
  text-decoration: none;

  &:visited {
    background: transparent;
    color: var(--theme-text);
  }

  &:hover {
    background: transparent;
    color: var(--theme-text);
  }

  &:hover .actionlistitem-icon {
    background: var(--theme-focused-foreground);
  }

  &:focus .actionlistitem-icon {
    background: var(--theme-focused-foreground);
  }

  &:hover .actionlistitem-text {
    box-shadow: inset 0 0 0 2px var(--theme-focused-foreground);
  }

  &:focus .actionlistitem-text {
    box-shadow: inset 0 0 0 2px var(--theme-focused-foreground);
  }
}

.actionlistitem-icon {
  align-items: center;
  background: var(--theme-button-foreground);
  display: inline-flex;
  flex-shrink: 0;
  height: calc(var(--font-size) * var(--theme-line-height-base));
  justify-content: center;
  width: 3ch;
  user-select: none;
  transition: 200ms ease background;
}

.actionlistitem-text {
  align-items: center;
  align-self: stretch;
  background: var(--theme-button-background);
  display: inline-flex;
  justify-content: flex-start;
  min-width: 10%;
  padding: 0 1ch 0 1ch;
  user-select: none;
  width: 100%;
}

.card {
  position: relative;
  display: block;
  padding: 0 1ch calc((var(--font-size) * 0.5) * var(--theme-line-height-base)) 1ch;
  white-space: prewrap;
}

.card-children {
  box-shadow:
    inset 2px 0 0 0 var(--theme-text),
    inset -2px 0 0 0 var(--theme-text),
    inset 0 -2px 0 0 var(--theme-text);
  display: block;
  padding: calc((var(--font-size) * 0.5) * var(--theme-line-height-base)) 2ch calc(var(--font-size) * var(--theme-line-height-base)) 2ch;

  overflow-x: auto;
  overflow-y: hidden;

  &::-webkit-scrollbar {
    display: none;
  }

  scrollbar-width: none;
}

.card-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.card-left {
  min-width: 10%;
  width: 100%;
  box-shadow:
    inset 2px 0 0 0 var(--theme-text),
    inset 0 2px 0 0 var(--theme-text);
  padding: calc((var(--font-size) * 0.5) * var(--theme-line-height-base)) 2ch 0px 1ch;
}

.card-right {
  min-width: 10%;
  width: 100%;
  box-shadow:
    inset -2px 0 0 0 var(--theme-text),
    inset 0 2px 0 0 var(--theme-text);
  padding: calc((var(--font-size) * 0.5) * var(--theme-line-height-base)) 2ch 0px 1ch;
}

.card-title {
  flex-shrink: 0;
  padding: 0 1ch 0 1ch;
  font-size: var(--font-size);
  font-weight: 400;
}

.divider {
  align-items: center;
  border: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: calc(var(--font-size) * var(--theme-line-height-base));
  justify-content: center;
  outline: 0;
  width: 100%;
}

.divider-line {
  background: var(--theme-text);
  display: block;
  flex-shrink: 0;
  height: 2px;
  width: 100%;
}
